File tree Expand file tree Collapse file tree
test-data/ert/heat_equation Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111from functools import cache , cached_property , lru_cache
1212from multiprocessing .pool import ThreadPool
1313from pathlib import Path
14- from typing import TYPE_CHECKING
14+ from typing import TYPE_CHECKING , cast
1515from uuid import UUID
1616
1717import numpy as np
2727 ParameterConfig ,
2828 SummaryConfig ,
2929)
30+ from ert .config .field import Field , field_transform
3031from ert .exceptions import StorageError
3132from ert .substitutions import substitute_runpath_name
3233
@@ -892,7 +893,14 @@ def calculate_std_dev_for_parameter_group(
892893 data = self .load_parameters (parameter_group )
893894 if isinstance (data , pl .DataFrame ):
894895 return data .drop ("realization" ).std ().to_numpy ().reshape (- 1 )
895- return data .std ("realizations" )["values" ].to_numpy ()
896+ param_config = self .experiment .parameter_configuration .get (parameter_group )
897+ values = data ["values" ]
898+ if isinstance (param_config , Field ) and param_config .output_transformation :
899+ values = cast (
900+ xr .DataArray ,
901+ field_transform (values , param_config .output_transformation ),
902+ )
903+ return values .std ("realizations" ).to_numpy ()
896904
897905 def get_parameter_state (
898906 self , realization : int
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ GRID CASE.EGRID
2222OBS_CONFIG observations_loc.txt
2323ECLBASE HEAT
2424
25- FIELD COND PARAMETER cond.bgrdecl INIT_FILES:cond.bgrdecl FORWARD_INIT:True
25+ FIELD COND PARAMETER cond.bgrdecl INIT_FILES:cond.bgrdecl FORWARD_INIT:True INIT_TRANSFORM:LOG OUTPUT_TRANSFORM:EXP
2626
2727GEN_KW INIT_TEMP_SCALE init_temp_prior.txt
2828GEN_KW CORR_LENGTH corr_length_prior.txt
You can’t perform that action at this time.
0 commit comments