diff --git a/src/ert/analysis/_es_update.py b/src/ert/analysis/_es_update.py index 141cbef8068..9f4b66cda70 100644 --- a/src/ert/analysis/_es_update.py +++ b/src/ert/analysis/_es_update.py @@ -5,6 +5,7 @@ from collections import UserDict from dataclasses import dataclass, field from datetime import datetime +from fnmatch import fnmatch from pathlib import Path from typing import ( TYPE_CHECKING, @@ -31,6 +32,7 @@ from ert.config import Field, GenKwConfig, SurfaceConfig +from ..config.analysis_config import UpdateSettings from ..config.analysis_module import ESSettings, IESSettings from . import misfit_preprocessor from .event import AnalysisEvent, AnalysisStatusEvent, AnalysisTimeEvent @@ -128,14 +130,6 @@ def __next__(self) -> T: return result -@dataclass -class UpdateSettings: - std_cutoff: float = 1e-6 - alpha: float = 3.0 - misfit_preprocess: bool = False - min_required_realizations: int = 2 - - class TempStorage(UserDict): # type: ignore def __getitem__(self, key: str) -> npt.NDArray[np.double]: value: Union[npt.NDArray[np.double], xr.DataArray] = self.data[key] @@ -350,6 +344,15 @@ def _get_obs_and_measure_data( ) +def _expand_wildcards( + input_list: npt.NDArray[np.str_], patterns: List[str] +) -> List[str]: + matches = [] + for pattern in patterns: + matches.extend([val for val in input_list if fnmatch(val, pattern)]) + return list(set(matches)) + + def _load_observations_and_responses( source_fs: EnsembleReader, alpha: float, @@ -357,7 +360,7 @@ def _load_observations_and_responses( global_std_scaling: float, iens_ative_index: npt.NDArray[np.int_], selected_observations: List[Observation], - misfit_process: bool, + misfit_process: Optional[List[List[str]]], update_step_name: str, ) -> Tuple[ npt.NDArray[np.float_], @@ -388,9 +391,12 @@ def _load_observations_and_responses( obs_mask = np.logical_and(ens_mean_mask, ens_std_mask) if misfit_process: - scaling[obs_mask] *= misfit_preprocessor.main( - S[obs_mask], scaled_errors[obs_mask] - ) + for input_group in misfit_process: + group = _expand_wildcards(obs_keys, input_group) + obs_group_mask = np.isin(obs_keys, group) & obs_mask + scaling[obs_group_mask] *= misfit_preprocessor.main( + S[obs_group_mask], scaled_errors[obs_group_mask] + ) update_snapshot = [] for ( @@ -608,7 +614,7 @@ def analysis_ES( source_fs: EnsembleReader, target_fs: EnsembleAccessor, progress_callback: Callable[[AnalysisEvent], None], - misfit_process: bool, + misfit_process: Optional[List[List[str]]], ) -> None: iens_active_index = np.flatnonzero(ens_mask) @@ -777,7 +783,7 @@ def analysis_IES( target_fs: EnsembleAccessor, sies_smoother: Optional[ies.SIES], progress_callback: Callable[[AnalysisEvent], None], - misfit_preprocessor: bool, + misfit_preprocessor: List[List[str]], sies_step_length: Callable[[int], float], initial_mask: npt.NDArray[np.bool_], ) -> ies.SIES: @@ -933,10 +939,10 @@ def _write_update_report(path: Path, snapshot: SmootherSnapshot, run_id: str) -> def _assert_has_enough_realizations( - ens_mask: npt.NDArray[np.bool_], analysis_config: UpdateSettings + ens_mask: npt.NDArray[np.bool_], min_required_realizations: int ) -> None: active_realizations = ens_mask.sum() - if active_realizations < analysis_config.min_required_realizations: + if active_realizations < min_required_realizations: raise ErtAnalysisError( f"There are {active_realizations} active realisations left, which is " "less than the minimum specified - stopping assimilation.", @@ -977,7 +983,7 @@ def smoother_update( analysis_config = UpdateSettings() if analysis_config is None else analysis_config es_settings = ESSettings() if es_settings is None else es_settings ens_mask = prior_storage.get_realization_mask_with_responses() - _assert_has_enough_realizations(ens_mask, analysis_config) + _assert_has_enough_realizations(ens_mask, analysis_config.min_required_realizations) smoother_snapshot = _create_smoother_snapshot( prior_storage.name, @@ -998,7 +1004,7 @@ def smoother_update( prior_storage, posterior_storage, progress_callback, - analysis_config.misfit_preprocess, + analysis_config.auto_scale, ) if log_path is not None: @@ -1037,7 +1043,7 @@ def iterative_smoother_update( ) ens_mask = prior_storage.get_realization_mask_with_responses() - _assert_has_enough_realizations(ens_mask, update_settings) + _assert_has_enough_realizations(ens_mask, update_settings.min_required_realizations) smoother_snapshot = _create_smoother_snapshot( prior_storage.name, @@ -1058,7 +1064,7 @@ def iterative_smoother_update( target_fs=posterior_storage, sies_smoother=sies_smoother, progress_callback=progress_callback, - misfit_preprocessor=update_settings.misfit_preprocess, + misfit_preprocessor=update_settings.auto_scale, sies_step_length=sies_step_length, initial_mask=initial_mask, ) diff --git a/src/ert/cli/model_factory.py b/src/ert/cli/model_factory.py index 77d10334c76..b4a2698f7a4 100644 --- a/src/ert/cli/model_factory.py +++ b/src/ert/cli/model_factory.py @@ -5,7 +5,6 @@ import numpy as np -from ert.analysis._es_update import UpdateSettings from ert.cli import ( ENSEMBLE_EXPERIMENT_MODE, ENSEMBLE_SMOOTHER_MODE, @@ -14,7 +13,8 @@ ITERATIVE_ENSEMBLE_SMOOTHER_MODE, TEST_RUN_MODE, ) -from ert.config import ConfigWarning, ErtConfig, HookRuntime +from ert.config import ConfigWarning, ErtConfig +from ert.config.analysis_config import UpdateSettings from ert.run_models import ( BaseRunModel, EnsembleExperiment, @@ -35,23 +35,13 @@ from ert.validation import ActiveRange if TYPE_CHECKING: - from typing import List import numpy.typing as npt - from ert.config import Workflow from ert.namespace import Namespace from ert.storage import StorageAccessor -def _misfit_preprocessor(workflows: List[Workflow]) -> bool: - for workflow in workflows: - for job, _ in workflow: - if job.name == "MISFIT_PREPROCESSOR": - return True - return False - - def create_model( config: ErtConfig, storage: StorageAccessor, @@ -65,15 +55,7 @@ def create_model( "ensemble_size": config.model_config.num_realizations, }, ) - ert_analysis_config = config.analysis_config - update_settings = UpdateSettings( - std_cutoff=ert_analysis_config.std_cutoff, - alpha=ert_analysis_config.enkf_alpha, - misfit_preprocess=_misfit_preprocessor( - config.hooked_workflows[HookRuntime.PRE_FIRST_UPDATE] - ), - min_required_realizations=ert_analysis_config.minimum_required_realizations, - ) + update_settings = config.analysis_config.observation_settings if args.mode == TEST_RUN_MODE: return _setup_single_test_run(config, storage, args) diff --git a/src/ert/config/analysis_config.py b/src/ert/config/analysis_config.py index f177b9558cd..31caab2ba21 100644 --- a/src/ert/config/analysis_config.py +++ b/src/ert/config/analysis_config.py @@ -1,4 +1,7 @@ +from __future__ import annotations + import logging +from dataclasses import dataclass, field from math import ceil from os.path import realpath from pathlib import Path @@ -43,6 +46,12 @@ def __init__( self._min_realization = min_realization options: Dict[str, Dict[str, Any]] = {"STD_ENKF": {}, "IES_ENKF": {}} + observation_settings: Dict[str, Any] = { + "alpha": alpha, + "std_cutoff": std_cutoff, + "auto_scale": [], + "min_required_realizations": min_realization, + } analysis_set_var = [] if analysis_set_var is None else analysis_set_var inversion_str_map: Final = { "STD_ENKF": { @@ -64,6 +73,16 @@ def __init__( all_errors = [] for module_name, var_name, value in analysis_set_var: + if module_name == "OBSERVATIONS": + if var_name == "AUTO_SCALE": + observation_settings["auto_scale"].append(value.split(",")) + else: + all_errors.append( + ConfigValidationError( + f"Unknown module: {module_name} with variable: {var_name}" + ) + ) + continue if var_name in deprecated_keys: errors.append(var_name) continue @@ -110,6 +129,7 @@ def __init__( try: self.es_module = ESSettings(**options["STD_ENKF"]) self.ies_module = IESSettings(**options["IES_ENKF"]) + self.observation_settings = UpdateSettings(**observation_settings) except ValidationError as err: for error in err.errors(): error["loc"] = tuple( @@ -226,7 +246,6 @@ def __repr__(self) -> str: return ( "AnalysisConfig(" f"alpha={self._alpha}, " - f"std_cutoff={self._std_cutoff}, " f"stop_long_running={self._stop_long_running}, " f"max_runtime={self._max_runtime}, " f"min_realization={self._min_realization}, " @@ -247,10 +266,7 @@ def __eq__(self, other: object) -> bool: if self.stop_long_running != other.stop_long_running: return False - if self.std_cutoff != other.std_cutoff: - return False - - if self.enkf_alpha != other.enkf_alpha: + if self.observation_settings != other.observation_settings: return False if self.ies_module != other.ies_module: @@ -265,3 +281,11 @@ def __eq__(self, other: object) -> bool: if self.minimum_required_realizations != other.minimum_required_realizations: return False return True + + +@dataclass +class UpdateSettings: + std_cutoff: float = 1e-6 + alpha: float = 3.0 + auto_scale: List[List[str]] = field(default_factory=list) + min_required_realizations: int = 2 diff --git a/src/ert/config/ert_config.py b/src/ert/config/ert_config.py index 956ed3e578b..886915227f4 100644 --- a/src/ert/config/ert_config.py +++ b/src/ert/config/ert_config.py @@ -634,11 +634,29 @@ def _workflows_from_dict( filename = path.basename(work[0]) if len(work) == 1 else work[1] try: existed = filename in workflows - workflows[filename] = Workflow.from_file( + workflow = Workflow.from_file( work[0], substitution_list, workflow_jobs, ) + for job, args in workflow: + if job.name == "MISFIT_PREPROCESSOR": + message = ( + ( + f"MISFIT_PREPROCESSOR is removed, use SCALE_OBSERVATIONS" + f"option instead for: {filename}, " + f"example: SCALE_OBSERVATIONS * -- all observations" + ), + ) + if args: + # This means the user has configured a config file to the workflow + # so we can assume they have customized the obs groups + message += ( + "example: SCALE_OBSERVATIONS 'obs_*' -- all observations starting with obs_" + "Add multiple lines of SCALE_OBSERVATIONS to set up multiple groups" + ) + errors.append(ErrorInfo(message=message).set_context(work[0])) + workflows[filename] = workflow if existed: ConfigWarning.ert_context_warn( f"Workflow {filename!r} was added twice", work[0] diff --git a/src/ert/gui/tools/run_analysis/run_analysis_tool.py b/src/ert/gui/tools/run_analysis/run_analysis_tool.py index 99488203c18..6684bf73413 100644 --- a/src/ert/gui/tools/run_analysis/run_analysis_tool.py +++ b/src/ert/gui/tools/run_analysis/run_analysis_tool.py @@ -8,7 +8,6 @@ from qtpy.QtWidgets import QApplication, QMessageBox from ert.analysis import ErtAnalysisError, smoother_update -from ert.analysis._es_update import UpdateSettings from ert.analysis.event import AnalysisEvent, AnalysisStatusEvent, AnalysisTimeEvent from ert.enkf_main import EnKFMain, _seed_sequence from ert.gui.ertnotifier import ErtNotifier @@ -48,12 +47,7 @@ def run(self): error: Optional[str] = None config = self._ert.ert_config rng = np.random.default_rng(_seed_sequence(config.random_seed)) - update_settings = UpdateSettings( - std_cutoff=config.analysis_config.std_cutoff, - alpha=config.analysis_config.enkf_alpha, - misfit_preprocess=False, - min_required_realizations=config.analysis_config.minimum_required_realizations, - ) + update_settings = config.analysis_config.observation_settings try: smoother_update( self._source_fs, diff --git a/src/ert/libres_facade.py b/src/ert/libres_facade.py index 94c4e94e26d..71b4c2e4275 100644 --- a/src/ert/libres_facade.py +++ b/src/ert/libres_facade.py @@ -25,7 +25,6 @@ from ert.shared.version import __version__ from ert.storage import EnsembleReader -from .analysis._es_update import UpdateSettings from .enkf_main import EnKFMain, ensemble_context _logger = logging.getLogger(__name__) @@ -80,18 +79,12 @@ def smoother_update( ) -> SmootherSnapshot: if rng is None: rng = np.random.default_rng() - analysis_config = UpdateSettings( - std_cutoff=self.config.analysis_config.std_cutoff, - alpha=self.config.analysis_config.enkf_alpha, - misfit_preprocess=misfit_process, - min_required_realizations=self.config.analysis_config.minimum_required_realizations, - ) update_snapshot = smoother_update( prior_storage, posterior_storage, run_id, self._enkf_main.update_configuration, - analysis_config, + self.config.analysis_config.observation_settings, self.config.analysis_config.es_module, rng, progress_callback, diff --git a/src/ert/run_models/ensemble_smoother.py b/src/ert/run_models/ensemble_smoother.py index a4381a53475..c3a03366a37 100644 --- a/src/ert/run_models/ensemble_smoother.py +++ b/src/ert/run_models/ensemble_smoother.py @@ -14,7 +14,7 @@ from ert.run_models.run_arguments import ESRunArguments from ert.storage import StorageAccessor -from ..analysis._es_update import UpdateSettings +from ..config.analysis_config import UpdateSettings from ..config.analysis_module import ESSettings from .base_run_model import BaseRunModel, ErtRunError from .event import RunModelStatusEvent, RunModelUpdateBeginEvent, RunModelUpdateEndEvent diff --git a/src/ert/run_models/iterated_ensemble_smoother.py b/src/ert/run_models/iterated_ensemble_smoother.py index 0e05aa7e5ae..91031e24bac 100644 --- a/src/ert/run_models/iterated_ensemble_smoother.py +++ b/src/ert/run_models/iterated_ensemble_smoother.py @@ -15,7 +15,7 @@ from ert.run_models.run_arguments import SIESRunArguments from ert.storage import EnsembleAccessor, StorageAccessor -from ..analysis._es_update import UpdateSettings +from ..config.analysis_config import UpdateSettings from ..config.analysis_module import IESSettings from .base_run_model import BaseRunModel, ErtRunError from .event import RunModelStatusEvent, RunModelUpdateBeginEvent, RunModelUpdateEndEvent diff --git a/src/ert/run_models/multiple_data_assimilation.py b/src/ert/run_models/multiple_data_assimilation.py index 2c788209898..8ea97cdc094 100644 --- a/src/ert/run_models/multiple_data_assimilation.py +++ b/src/ert/run_models/multiple_data_assimilation.py @@ -14,7 +14,7 @@ from ert.run_models.run_arguments import ESMDARunArguments from ert.storage import EnsembleAccessor, StorageAccessor -from ..analysis._es_update import UpdateSettings +from ..config.analysis_config import UpdateSettings from ..config.analysis_module import ESSettings from .base_run_model import BaseRunModel, ErtRunError from .event import RunModelStatusEvent, RunModelUpdateBeginEvent, RunModelUpdateEndEvent diff --git a/tests/integration_tests/analysis/test_es_update.py b/tests/integration_tests/analysis/test_es_update.py index e8fd1c2469b..8147baf7e3a 100644 --- a/tests/integration_tests/analysis/test_es_update.py +++ b/tests/integration_tests/analysis/test_es_update.py @@ -11,12 +11,12 @@ from ert.analysis import ErtAnalysisError, UpdateConfiguration, smoother_update from ert.analysis._es_update import ( TempStorage, - UpdateSettings, _create_temporary_parameter_storage, ) from ert.analysis.configuration import UpdateStep from ert.cli import ENSEMBLE_SMOOTHER_MODE from ert.config import AnalysisConfig, ErtConfig, GenDataConfig, GenKwConfig +from ert.config.analysis_config import UpdateSettings from ert.config.analysis_module import ESSettings from ert.storage import open_storage from ert.storage.realization_storage_state import RealizationStorageState diff --git a/tests/unit_tests/analysis/snapshots/test_es_update/test_update_report/0-misfit_preprocess2/update_log b/tests/unit_tests/analysis/snapshots/test_es_update/test_update_report/0-misfit_preprocess2/update_log new file mode 100644 index 00000000000..91941c243fc --- /dev/null +++ b/tests/unit_tests/analysis/snapshots/test_es_update/test_update_report/0-misfit_preprocess2/update_log @@ -0,0 +1,222 @@ +====================================================================================================================================================== +Time: +Parent ensemble: default_0 +Target ensemble: new_ensemble +Alpha: 3.0 +Global scaling: 1.0 +Standard cutoff: 1e-06 +Run id: id +Update step: ALL_ACTIVE +------------------------------------------------------------------------------------------------------------------------------------------------------ + Observed history | Simulated data | Status +------------------------------------------------------------------------------------------------------------------------------------------------------ + 1 : FOPR 0.002 +/- 0.566 (0.100 * 5.657) | 0.076 +/- 0.105 | Active + 2 : FOPR 0.008 +/- 0.566 (0.100 * 5.657) | 0.079 +/- 0.107 | Active + 3 : FOPR 0.018 +/- 0.566 (0.100 * 5.657) | 0.085 +/- 0.110 | Active + 4 : FOPR 0.032 +/- 0.566 (0.100 * 5.657) | 0.092 +/- 0.114 | Active + 5 : FOPR 0.050 +/- 0.566 (0.100 * 5.657) | 0.103 +/- 0.118 | Active + 6 : FOPR 0.071 +/- 0.566 (0.100 * 5.657) | 0.117 +/- 0.122 | Active + 7 : FOPR 0.097 +/- 0.566 (0.100 * 5.657) | 0.133 +/- 0.128 | Active + 8 : FOPR 0.126 +/- 0.566 (0.100 * 5.657) | 0.151 +/- 0.134 | Active + 9 : FOPR 0.159 +/- 0.566 (0.100 * 5.657) | 0.171 +/- 0.140 | Active + 10 : FOPR 0.194 +/- 0.566 (0.100 * 5.657) | 0.193 +/- 0.148 | Active + 11 : FOPR 0.233 +/- 0.539 (0.100 * 5.385) | 0.221 +/- 0.154 | Active + 12 : FOPR 0.274 +/- 0.539 (0.100 * 5.385) | 0.251 +/- 0.161 | Active + 13 : FOPR 0.318 +/- 0.539 (0.100 * 5.385) | 0.293 +/- 0.164 | Active + 14 : FOPR 0.363 +/- 0.539 (0.100 * 5.385) | 0.340 +/- 0.163 | Active + 15 : FOPR 0.411 +/- 0.539 (0.100 * 5.385) | 0.389 +/- 0.163 | Active + 16 : FOPR 0.460 +/- 0.539 (0.100 * 5.385) | 0.439 +/- 0.163 | Active + 17 : FOPR 0.510 +/- 0.539 (0.100 * 5.385) | 0.491 +/- 0.164 | Active + 18 : FOPR 0.561 +/- 0.566 (0.100 * 5.657) | 0.544 +/- 0.164 | Active + 19 : FOPR 0.613 +/- 0.566 (0.100 * 5.657) | 0.598 +/- 0.164 | Active + 20 : FOPR 0.666 +/- 0.566 (0.100 * 5.657) | 0.652 +/- 0.163 | Active + 21 : FOPR 0.718 +/- 0.566 (0.100 * 5.657) | 0.706 +/- 0.164 | Active + 22 : FOPR 0.770 +/- 0.332 (0.100 * 3.317) | 0.760 +/- 0.164 | Active + 23 : FOPR 0.823 +/- 0.332 (0.100 * 3.317) | 0.813 +/- 0.164 | Active + 24 : FOPR 0.875 +/- 0.332 (0.100 * 3.317) | 0.864 +/- 0.164 | Active + 25 : FOPR 0.926 +/- 0.332 (0.100 * 3.317) | 0.914 +/- 0.165 | Active + 26 : FOPR 0.977 +/- 0.332 (0.100 * 3.317) | 0.963 +/- 0.165 | Active + 27 : FOPR 1.027 +/- 0.341 (0.103 * 3.317) | 1.008 +/- 0.167 | Active + 28 : FOPR 1.075 +/- 0.357 (0.108 * 3.317) | 1.049 +/- 0.169 | Active + 29 : FOPR 1.122 +/- 0.372 (0.112 * 3.317) | 1.089 +/- 0.171 | Active + 30 : FOPR 1.166 +/- 0.387 (0.117 * 3.317) | 1.126 +/- 0.172 | Active + 31 : FOPR 1.208 +/- 0.400 (0.121 * 3.317) | 1.160 +/- 0.174 | Active + 32 : FOPR 1.247 +/- 0.414 (0.125 * 3.317) | 1.192 +/- 0.175 | Active + 33 : FOPR 1.284 +/- 0.257 (0.128 * 2.000) | 1.219 +/- 0.175 | Active + 34 : FOPR 1.317 +/- 0.263 (0.132 * 2.000) | 1.243 +/- 0.175 | Active + 35 : FOPR 1.346 +/- 0.269 (0.135 * 2.000) | 1.263 +/- 0.176 | Active + 36 : FOPR 1.371 +/- 0.274 (0.137 * 2.000) | 1.279 +/- 0.176 | Active + 37 : FOPR 1.392 +/- 0.462 (0.139 * 3.317) | 1.292 +/- 0.177 | Active + 38 : FOPR 1.407 +/- 0.467 (0.141 * 3.317) | 1.300 +/- 0.179 | Active + 39 : FOPR 1.418 +/- 0.470 (0.142 * 3.317) | 1.303 +/- 0.181 | Active + 40 : FOPR 1.422 +/- 0.472 (0.142 * 3.317) | 1.303 +/- 0.183 | Active + 41 : FOPR 1.424 +/- 0.472 (0.142 * 3.317) | 1.299 +/- 0.185 | Active + 42 : FOPR 1.425 +/- 0.473 (0.143 * 3.317) | 1.294 +/- 0.187 | Active + 43 : FOPR 1.427 +/- 0.473 (0.143 * 3.317) | 1.290 +/- 0.188 | Active + 44 : FOPR 1.430 +/- 0.474 (0.143 * 3.317) | 1.283 +/- 0.189 | Active + 45 : FOPR 1.433 +/- 0.475 (0.143 * 3.317) | 1.275 +/- 0.187 | Active + 46 : FOPR 1.438 +/- 0.477 (0.144 * 3.317) | 1.263 +/- 0.186 | Active + 47 : FOPR 1.443 +/- 0.479 (0.144 * 3.317) | 1.250 +/- 0.186 | Active + 48 : FOPR 1.449 +/- 0.435 (0.145 * 3.000) | 1.237 +/- 0.186 | Active + 49 : FOPR 1.455 +/- 0.436 (0.145 * 3.000) | 1.222 +/- 0.185 | Active + 50 : FOPR 1.460 +/- 0.438 (0.146 * 3.000) | 1.207 +/- 0.184 | Active + 51 : FOPR 1.466 +/- 0.655 (0.147 * 4.472) | 1.190 +/- 0.184 | Active + 52 : FOPR 1.470 +/- 0.658 (0.147 * 4.472) | 1.170 +/- 0.183 | Active + 53 : FOPR 1.474 +/- 0.659 (0.147 * 4.472) | 1.146 +/- 0.183 | Active + 54 : FOPR 1.475 +/- 0.660 (0.148 * 4.472) | 1.122 +/- 0.184 | Active + 55 : FOPR 1.474 +/- 0.442 (0.147 * 3.000) | 1.098 +/- 0.188 | Active + 56 : FOPR 1.469 +/- 0.657 (0.147 * 4.472) | 1.077 +/- 0.192 | Active + 57 : FOPR 1.461 +/- 0.653 (0.146 * 4.472) | 1.053 +/- 0.194 | Active + 58 : FOPR 1.449 +/- 0.435 (0.145 * 3.000) | 1.027 +/- 0.196 | Active + 59 : FOPR 1.436 +/- 0.642 (0.144 * 4.472) | 1.002 +/- 0.196 | Active + 60 : FOPR 1.421 +/- 0.636 (0.142 * 4.472) | 0.975 +/- 0.197 | Active + 61 : FOPR 1.403 +/- 0.421 (0.140 * 3.000) | 0.947 +/- 0.200 | Active + 62 : FOPR 1.379 +/- 0.617 (0.138 * 4.472) | 0.928 +/- 0.200 | Active + 63 : FOPR 1.353 +/- 0.605 (0.135 * 4.472) | 0.902 +/- 0.203 | Active + 64 : FOPR 1.324 +/- 0.592 (0.132 * 4.472) | 0.878 +/- 0.206 | Active + 65 : FOPR 1.297 +/- 0.580 (0.130 * 4.472) | 0.851 +/- 0.210 | Active + 66 : FOPR 1.270 +/- 0.381 (0.127 * 3.000) | 0.824 +/- 0.213 | Active + 67 : FOPR 1.243 +/- 0.373 (0.124 * 3.000) | 0.801 +/- 0.215 | Active + 68 : FOPR 1.216 +/- 0.365 (0.122 * 3.000) | 0.781 +/- 0.216 | Active + 69 : FOPR 1.189 +/- 0.532 (0.119 * 4.472) | 0.762 +/- 0.216 | Active + 70 : FOPR 1.161 +/- 0.519 (0.116 * 4.472) | 0.744 +/- 0.215 | Active + 71 : FOPR 1.134 +/- 0.507 (0.113 * 4.472) | 0.725 +/- 0.212 | Active + 72 : FOPR 1.112 +/- 0.497 (0.111 * 4.472) | 0.704 +/- 0.206 | Active + 73 : FOPR 1.091 +/- 0.488 (0.109 * 4.472) | 0.683 +/- 0.200 | Active + 74 : FOPR 1.072 +/- 0.479 (0.107 * 4.472) | 0.661 +/- 0.194 | Active + 75 : FOPR 1.053 +/- 0.471 (0.105 * 4.472) | 0.640 +/- 0.189 | Active + 76 : FOPR 1.033 +/- 0.462 (0.103 * 4.472) | 0.619 +/- 0.185 | Active + 77 : FOPR 1.013 +/- 0.545 (0.101 * 5.385) | 0.597 +/- 0.181 | Active + 78 : FOPR 0.995 +/- 0.539 (0.100 * 5.385) | 0.576 +/- 0.176 | Active + 79 : FOPR 0.975 +/- 0.539 (0.100 * 5.385) | 0.555 +/- 0.171 | Active + 80 : FOPR 0.956 +/- 0.539 (0.100 * 5.385) | 0.533 +/- 0.171 | Active + 81 : FOPR 0.936 +/- 0.539 (0.100 * 5.385) | 0.513 +/- 0.171 | Active + 82 : FOPR 0.916 +/- 0.539 (0.100 * 5.385) | 0.494 +/- 0.170 | Active + 83 : FOPR 0.893 +/- 0.539 (0.100 * 5.385) | 0.477 +/- 0.169 | Active + 84 : FOPR 0.869 +/- 0.539 (0.100 * 5.385) | 0.462 +/- 0.169 | Active + 85 : FOPR 0.842 +/- 0.539 (0.100 * 5.385) | 0.447 +/- 0.170 | Active + 86 : FOPR 0.812 +/- 0.539 (0.100 * 5.385) | 0.432 +/- 0.170 | Active + 87 : FOPR 0.779 +/- 0.539 (0.100 * 5.385) | 0.417 +/- 0.171 | Active + 88 : FOPR 0.742 +/- 0.539 (0.100 * 5.385) | 0.403 +/- 0.170 | Active + 89 : FOPR 0.702 +/- 0.539 (0.100 * 5.385) | 0.389 +/- 0.171 | Active + 90 : FOPR 0.661 +/- 0.539 (0.100 * 5.385) | 0.379 +/- 0.171 | Active + 91 : FOPR 0.619 +/- 0.539 (0.100 * 5.385) | 0.370 +/- 0.171 | Active + 92 : FOPR 0.578 +/- 0.539 (0.100 * 5.385) | 0.361 +/- 0.169 | Active + 93 : FOPR 0.540 +/- 0.539 (0.100 * 5.385) | 0.354 +/- 0.168 | Active + 94 : FOPR 0.505 +/- 0.539 (0.100 * 5.385) | 0.349 +/- 0.166 | Active + 95 : FOPR 0.475 +/- 0.539 (0.100 * 5.385) | 0.344 +/- 0.165 | Active + 96 : FOPR 0.450 +/- 0.539 (0.100 * 5.385) | 0.340 +/- 0.165 | Active + 97 : FOPR 0.431 +/- 0.539 (0.100 * 5.385) | 0.344 +/- 0.168 | Active + 98 : FOPR 0.419 +/- 0.539 (0.100 * 5.385) | 0.350 +/- 0.171 | Active + 99 : FOPR 0.410 +/- 0.539 (0.100 * 5.385) | 0.349 +/- 0.171 | Active + 100 : FOPR 0.406 +/- 0.539 (0.100 * 5.385) | 0.350 +/- 0.173 | Active + 101 : FOPR 0.404 +/- 0.539 (0.100 * 5.385) | 0.347 +/- 0.171 | Active + 102 : FOPR 0.399 +/- 0.539 (0.100 * 5.385) | 0.344 +/- 0.168 | Active + 103 : FOPR 0.389 +/- 0.539 (0.100 * 5.385) | 0.346 +/- 0.165 | Active + 104 : FOPR 0.374 +/- 0.539 (0.100 * 5.385) | 0.348 +/- 0.162 | Active + 105 : FOPR 0.355 +/- 0.539 (0.100 * 5.385) | 0.350 +/- 0.156 | Active + 106 : FOPR 0.332 +/- 0.173 (0.100 * 1.732) | 0.350 +/- 0.148 | Active + 107 : FOPR 0.306 +/- 0.173 (0.100 * 1.732) | 0.349 +/- 0.140 | Active + 108 : FOPR 0.282 +/- 0.173 (0.100 * 1.732) | 0.348 +/- 0.133 | Active + 109 : FOPR 0.264 +/- 0.458 (0.100 * 4.583) | 0.344 +/- 0.125 | Active + 110 : FOPR 0.248 +/- 0.458 (0.100 * 4.583) | 0.340 +/- 0.118 | Active + 111 : FOPR 0.233 +/- 0.458 (0.100 * 4.583) | 0.337 +/- 0.114 | Active + 112 : FOPR 0.219 +/- 0.458 (0.100 * 4.583) | 0.335 +/- 0.112 | Active + 113 : FOPR 0.205 +/- 0.458 (0.100 * 4.583) | 0.334 +/- 0.110 | Active + 114 : FOPR 0.192 +/- 0.458 (0.100 * 4.583) | 0.333 +/- 0.110 | Active + 115 : FOPR 0.180 +/- 0.458 (0.100 * 4.583) | 0.332 +/- 0.109 | Active + 116 : FOPR 0.169 +/- 0.458 (0.100 * 4.583) | 0.330 +/- 0.107 | Active + 117 : FOPR 0.160 +/- 0.458 (0.100 * 4.583) | 0.327 +/- 0.106 | Active + 118 : FOPR 0.152 +/- 0.458 (0.100 * 4.583) | 0.323 +/- 0.105 | Active + 119 : FOPR 0.146 +/- 0.458 (0.100 * 4.583) | 0.317 +/- 0.102 | Active + 120 : FOPR 0.141 +/- 0.458 (0.100 * 4.583) | 0.310 +/- 0.100 | Active + 121 : FOPR 0.137 +/- 0.458 (0.100 * 4.583) | 0.303 +/- 0.098 | Active + 122 : FOPR 0.134 +/- 0.458 (0.100 * 4.583) | 0.296 +/- 0.096 | Active + 123 : FOPR 0.130 +/- 0.458 (0.100 * 4.583) | 0.290 +/- 0.094 | Active + 124 : FOPR 0.127 +/- 0.458 (0.100 * 4.583) | 0.284 +/- 0.092 | Active + 125 : FOPR 0.123 +/- 0.458 (0.100 * 4.583) | 0.279 +/- 0.090 | Active + 126 : FOPR 0.119 +/- 0.458 (0.100 * 4.583) | 0.275 +/- 0.088 | Active + 127 : FOPR 0.120 +/- 0.458 (0.100 * 4.583) | 0.270 +/- 0.085 | Active + 128 : FOPR 0.128 +/- 0.458 (0.100 * 4.583) | 0.266 +/- 0.081 | Active + 129 : FOPR 0.136 +/- 0.458 (0.100 * 4.583) | 0.263 +/- 0.077 | Active + 130 : FOPR 0.143 +/- 0.100 | 0.261 +/- 0.073 | Active + 131 : FOPR 0.150 +/- 0.200 (0.100 * 2.000) | 0.258 +/- 0.069 | Active + 132 : FOPR 0.155 +/- 0.200 (0.100 * 2.000) | 0.256 +/- 0.066 | Active + 133 : FOPR 0.159 +/- 0.200 (0.100 * 2.000) | 0.254 +/- 0.063 | Active + 134 : FOPR 0.163 +/- 0.200 (0.100 * 2.000) | 0.251 +/- 0.061 | Active + 135 : FOPR 0.166 +/- 0.346 (0.100 * 3.464) | 0.248 +/- 0.059 | Active + 136 : FOPR 0.167 +/- 0.346 (0.100 * 3.464) | 0.247 +/- 0.058 | Active + 137 : FOPR 0.167 +/- 0.346 (0.100 * 3.464) | 0.245 +/- 0.058 | Active + 138 : FOPR 0.166 +/- 0.346 (0.100 * 3.464) | 0.243 +/- 0.058 | Active + 139 : FOPR 0.165 +/- 0.346 (0.100 * 3.464) | 0.243 +/- 0.058 | Active + 140 : FOPR 0.164 +/- 0.346 (0.100 * 3.464) | 0.242 +/- 0.059 | Active + 141 : FOPR 0.165 +/- 0.346 (0.100 * 3.464) | 0.243 +/- 0.059 | Active + 142 : FOPR 0.169 +/- 0.346 (0.100 * 3.464) | 0.243 +/- 0.059 | Active + 143 : FOPR 0.176 +/- 0.346 (0.100 * 3.464) | 0.242 +/- 0.058 | Active + 144 : FOPR 0.186 +/- 0.346 (0.100 * 3.464) | 0.242 +/- 0.057 | Active + 145 : FOPR 0.197 +/- 0.346 (0.100 * 3.464) | 0.241 +/- 0.057 | Active + 146 : FOPR 0.211 +/- 0.346 (0.100 * 3.464) | 0.239 +/- 0.058 | Active + 147 : FOPR 0.225 +/- 0.100 | 0.238 +/- 0.059 | Active + 148 : FOPR 0.239 +/- 0.141 (0.100 * 1.414) | 0.238 +/- 0.061 | Active + 149 : FOPR 0.252 +/- 0.141 (0.100 * 1.414) | 0.238 +/- 0.061 | Active + 150 : FOPR 0.264 +/- 0.224 (0.100 * 2.236) | 0.237 +/- 0.061 | Active + 151 : FOPR 0.275 +/- 0.224 (0.100 * 2.236) | 0.236 +/- 0.062 | Active + 152 : FOPR 0.285 +/- 0.224 (0.100 * 2.236) | 0.236 +/- 0.064 | Active + 153 : FOPR 0.295 +/- 0.224 (0.100 * 2.236) | 0.236 +/- 0.066 | Active + 154 : FOPR 0.303 +/- 0.224 (0.100 * 2.236) | 0.235 +/- 0.069 | Active + 155 : FOPR 0.309 +/- 0.245 (0.100 * 2.449) | 0.234 +/- 0.072 | Active + 156 : FOPR 0.312 +/- 0.245 (0.100 * 2.449) | 0.231 +/- 0.074 | Active + 157 : FOPR 0.313 +/- 0.245 (0.100 * 2.449) | 0.229 +/- 0.076 | Active + 158 : FOPR 0.310 +/- 0.245 (0.100 * 2.449) | 0.225 +/- 0.077 | Active + 159 : FOPR 0.304 +/- 0.245 (0.100 * 2.449) | 0.220 +/- 0.078 | Active + 160 : FOPR 0.296 +/- 0.245 (0.100 * 2.449) | 0.215 +/- 0.078 | Active + 161 : FOPR 0.286 +/- 0.566 (0.100 * 5.657) | 0.209 +/- 0.078 | Active + 162 : FOPR 0.275 +/- 0.566 (0.100 * 5.657) | 0.202 +/- 0.078 | Active + 163 : FOPR 0.264 +/- 0.566 (0.100 * 5.657) | 0.195 +/- 0.079 | Active + 164 : FOPR 0.253 +/- 0.566 (0.100 * 5.657) | 0.188 +/- 0.079 | Active + 165 : FOPR 0.241 +/- 0.566 (0.100 * 5.657) | 0.181 +/- 0.080 | Active + 166 : FOPR 0.230 +/- 0.566 (0.100 * 5.657) | 0.173 +/- 0.082 | Active + 167 : FOPR 0.218 +/- 0.566 (0.100 * 5.657) | 0.167 +/- 0.084 | Active + 168 : FOPR 0.207 +/- 0.566 (0.100 * 5.657) | 0.161 +/- 0.086 | Active + 169 : FOPR 0.197 +/- 0.566 (0.100 * 5.657) | 0.155 +/- 0.088 | Active + 170 : FOPR 0.187 +/- 0.566 (0.100 * 5.657) | 0.149 +/- 0.090 | Active + 171 : FOPR 0.178 +/- 0.566 (0.100 * 5.657) | 0.143 +/- 0.092 | Active + 172 : FOPR 0.168 +/- 0.539 (0.100 * 5.385) | 0.138 +/- 0.094 | Active + 173 : FOPR 0.159 +/- 0.539 (0.100 * 5.385) | 0.132 +/- 0.095 | Active + 174 : FOPR 0.150 +/- 0.539 (0.100 * 5.385) | 0.128 +/- 0.096 | Active + 175 : FOPR 0.141 +/- 0.539 (0.100 * 5.385) | 0.124 +/- 0.096 | Active + 176 : FOPR 0.134 +/- 0.539 (0.100 * 5.385) | 0.120 +/- 0.096 | Active + 177 : FOPR 0.127 +/- 0.539 (0.100 * 5.385) | 0.116 +/- 0.097 | Active + 178 : FOPR 0.120 +/- 0.539 (0.100 * 5.385) | 0.113 +/- 0.097 | Active + 179 : FOPR 0.115 +/- 0.539 (0.100 * 5.385) | 0.110 +/- 0.096 | Active + 180 : FOPR 0.111 +/- 0.539 (0.100 * 5.385) | 0.107 +/- 0.096 | Active + 181 : FOPR 0.107 +/- 0.539 (0.100 * 5.385) | 0.105 +/- 0.095 | Active + 182 : FOPR 0.101 +/- 0.539 (0.100 * 5.385) | 0.102 +/- 0.095 | Active + 183 : FOPR 0.096 +/- 0.539 (0.100 * 5.385) | 0.100 +/- 0.095 | Active + 184 : FOPR 0.089 +/- 0.539 (0.100 * 5.385) | 0.097 +/- 0.096 | Active + 185 : FOPR 0.081 +/- 0.539 (0.100 * 5.385) | 0.094 +/- 0.096 | Active + 186 : FOPR 0.073 +/- 0.539 (0.100 * 5.385) | 0.092 +/- 0.098 | Active + 187 : FOPR 0.065 +/- 0.539 (0.100 * 5.385) | 0.090 +/- 0.099 | Active + 188 : FOPR 0.058 +/- 0.539 (0.100 * 5.385) | 0.088 +/- 0.101 | Active + 189 : FOPR 0.050 +/- 0.539 (0.100 * 5.385) | 0.087 +/- 0.103 | Active + 190 : FOPR 0.044 +/- 0.539 (0.100 * 5.385) | 0.086 +/- 0.104 | Active + 191 : FOPR 0.038 +/- 0.539 (0.100 * 5.385) | 0.085 +/- 0.106 | Active + 192 : FOPR 0.033 +/- 0.539 (0.100 * 5.385) | 0.084 +/- 0.107 | Active + 193 : FOPR 0.029 +/- 0.539 (0.100 * 5.385) | 0.084 +/- 0.108 | Active + 194 : FOPR 0.026 +/- 0.566 (0.100 * 5.657) | 0.084 +/- 0.108 | Active + 195 : FOPR 0.024 +/- 0.566 (0.100 * 5.657) | 0.084 +/- 0.109 | Active + 196 : FOPR 0.022 +/- 0.566 (0.100 * 5.657) | 0.084 +/- 0.109 | Active + 197 : FOPR 0.021 +/- 0.566 (0.100 * 5.657) | 0.084 +/- 0.109 | Active + 198 : FOPR 0.020 +/- 0.566 (0.100 * 5.657) | 0.084 +/- 0.110 | Active + 199 : FOPR 0.020 +/- 0.566 (0.100 * 5.657) | 0.084 +/- 0.110 | Active + 200 : FOPR 0.020 +/- 0.566 (0.100 * 5.657) | 0.084 +/- 0.110 | Active + 201 : WOPR_OP1_108 0.300 +/- 0.075 | 0.257 +/- 0.099 | Active + 202 : WOPR_OP1_144 0.200 +/- 0.035 | 0.183 +/- 0.106 | Active + 203 : WOPR_OP1_190 0.015 +/- 0.010 | 0.042 +/- 0.041 | Active + 204 : WOPR_OP1_36 0.700 +/- 0.070 | 0.650 +/- 0.084 | Active + 205 : WOPR_OP1_72 0.500 +/- 0.050 | 0.405 +/- 0.170 | Active + 206 : WOPR_OP1_9 0.100 +/- 0.050 | 0.096 +/- 0.060 | Active + 207 : WPR_DIFF_1 0.000 +/- 0.100 | -0.011 +/- 0.060 | Active + 208 : WPR_DIFF_1 0.100 +/- 0.200 | 0.081 +/- 0.126 | Active + 209 : WPR_DIFF_1 0.200 +/- 0.150 | 0.073 +/- 0.130 | Active + 210 : WPR_DIFF_1 0.000 +/- 0.050 | 0.127 +/- 0.125 | Active diff --git a/tests/unit_tests/analysis/snapshots/test_es_update/test_update_report/0-misfit_preprocess3/update_log b/tests/unit_tests/analysis/snapshots/test_es_update/test_update_report/0-misfit_preprocess3/update_log new file mode 100644 index 00000000000..2a670099b41 --- /dev/null +++ b/tests/unit_tests/analysis/snapshots/test_es_update/test_update_report/0-misfit_preprocess3/update_log @@ -0,0 +1,222 @@ +====================================================================================================================================================== +Time: +Parent ensemble: default_0 +Target ensemble: new_ensemble +Alpha: 3.0 +Global scaling: 1.0 +Standard cutoff: 1e-06 +Run id: id +Update step: ALL_ACTIVE +------------------------------------------------------------------------------------------------------------------------------------------------------ + Observed history | Simulated data | Status +------------------------------------------------------------------------------------------------------------------------------------------------------ + 1 : FOPR 0.002 +/- 0.566 (0.100 * 5.657) | 0.076 +/- 0.105 | Active + 2 : FOPR 0.008 +/- 0.566 (0.100 * 5.657) | 0.079 +/- 0.107 | Active + 3 : FOPR 0.018 +/- 0.566 (0.100 * 5.657) | 0.085 +/- 0.110 | Active + 4 : FOPR 0.032 +/- 0.566 (0.100 * 5.657) | 0.092 +/- 0.114 | Active + 5 : FOPR 0.050 +/- 0.566 (0.100 * 5.657) | 0.103 +/- 0.118 | Active + 6 : FOPR 0.071 +/- 0.566 (0.100 * 5.657) | 0.117 +/- 0.122 | Active + 7 : FOPR 0.097 +/- 0.566 (0.100 * 5.657) | 0.133 +/- 0.128 | Active + 8 : FOPR 0.126 +/- 0.566 (0.100 * 5.657) | 0.151 +/- 0.134 | Active + 9 : FOPR 0.159 +/- 0.566 (0.100 * 5.657) | 0.171 +/- 0.140 | Active + 10 : FOPR 0.194 +/- 0.566 (0.100 * 5.657) | 0.193 +/- 0.148 | Active + 11 : FOPR 0.233 +/- 0.539 (0.100 * 5.385) | 0.221 +/- 0.154 | Active + 12 : FOPR 0.274 +/- 0.539 (0.100 * 5.385) | 0.251 +/- 0.161 | Active + 13 : FOPR 0.318 +/- 0.539 (0.100 * 5.385) | 0.293 +/- 0.164 | Active + 14 : FOPR 0.363 +/- 0.539 (0.100 * 5.385) | 0.340 +/- 0.163 | Active + 15 : FOPR 0.411 +/- 0.539 (0.100 * 5.385) | 0.389 +/- 0.163 | Active + 16 : FOPR 0.460 +/- 0.539 (0.100 * 5.385) | 0.439 +/- 0.163 | Active + 17 : FOPR 0.510 +/- 0.539 (0.100 * 5.385) | 0.491 +/- 0.164 | Active + 18 : FOPR 0.561 +/- 0.566 (0.100 * 5.657) | 0.544 +/- 0.164 | Active + 19 : FOPR 0.613 +/- 0.566 (0.100 * 5.657) | 0.598 +/- 0.164 | Active + 20 : FOPR 0.666 +/- 0.566 (0.100 * 5.657) | 0.652 +/- 0.163 | Active + 21 : FOPR 0.718 +/- 0.566 (0.100 * 5.657) | 0.706 +/- 0.164 | Active + 22 : FOPR 0.770 +/- 0.332 (0.100 * 3.317) | 0.760 +/- 0.164 | Active + 23 : FOPR 0.823 +/- 0.332 (0.100 * 3.317) | 0.813 +/- 0.164 | Active + 24 : FOPR 0.875 +/- 0.332 (0.100 * 3.317) | 0.864 +/- 0.164 | Active + 25 : FOPR 0.926 +/- 0.332 (0.100 * 3.317) | 0.914 +/- 0.165 | Active + 26 : FOPR 0.977 +/- 0.332 (0.100 * 3.317) | 0.963 +/- 0.165 | Active + 27 : FOPR 1.027 +/- 0.341 (0.103 * 3.317) | 1.008 +/- 0.167 | Active + 28 : FOPR 1.075 +/- 0.357 (0.108 * 3.317) | 1.049 +/- 0.169 | Active + 29 : FOPR 1.122 +/- 0.372 (0.112 * 3.317) | 1.089 +/- 0.171 | Active + 30 : FOPR 1.166 +/- 0.387 (0.117 * 3.317) | 1.126 +/- 0.172 | Active + 31 : FOPR 1.208 +/- 0.400 (0.121 * 3.317) | 1.160 +/- 0.174 | Active + 32 : FOPR 1.247 +/- 0.414 (0.125 * 3.317) | 1.192 +/- 0.175 | Active + 33 : FOPR 1.284 +/- 0.257 (0.128 * 2.000) | 1.219 +/- 0.175 | Active + 34 : FOPR 1.317 +/- 0.263 (0.132 * 2.000) | 1.243 +/- 0.175 | Active + 35 : FOPR 1.346 +/- 0.269 (0.135 * 2.000) | 1.263 +/- 0.176 | Active + 36 : FOPR 1.371 +/- 0.274 (0.137 * 2.000) | 1.279 +/- 0.176 | Active + 37 : FOPR 1.392 +/- 0.462 (0.139 * 3.317) | 1.292 +/- 0.177 | Active + 38 : FOPR 1.407 +/- 0.467 (0.141 * 3.317) | 1.300 +/- 0.179 | Active + 39 : FOPR 1.418 +/- 0.470 (0.142 * 3.317) | 1.303 +/- 0.181 | Active + 40 : FOPR 1.422 +/- 0.472 (0.142 * 3.317) | 1.303 +/- 0.183 | Active + 41 : FOPR 1.424 +/- 0.472 (0.142 * 3.317) | 1.299 +/- 0.185 | Active + 42 : FOPR 1.425 +/- 0.473 (0.143 * 3.317) | 1.294 +/- 0.187 | Active + 43 : FOPR 1.427 +/- 0.473 (0.143 * 3.317) | 1.290 +/- 0.188 | Active + 44 : FOPR 1.430 +/- 0.474 (0.143 * 3.317) | 1.283 +/- 0.189 | Active + 45 : FOPR 1.433 +/- 0.475 (0.143 * 3.317) | 1.275 +/- 0.187 | Active + 46 : FOPR 1.438 +/- 0.477 (0.144 * 3.317) | 1.263 +/- 0.186 | Active + 47 : FOPR 1.443 +/- 0.479 (0.144 * 3.317) | 1.250 +/- 0.186 | Active + 48 : FOPR 1.449 +/- 0.435 (0.145 * 3.000) | 1.237 +/- 0.186 | Active + 49 : FOPR 1.455 +/- 0.436 (0.145 * 3.000) | 1.222 +/- 0.185 | Active + 50 : FOPR 1.460 +/- 0.438 (0.146 * 3.000) | 1.207 +/- 0.184 | Active + 51 : FOPR 1.466 +/- 0.655 (0.147 * 4.472) | 1.190 +/- 0.184 | Active + 52 : FOPR 1.470 +/- 0.658 (0.147 * 4.472) | 1.170 +/- 0.183 | Active + 53 : FOPR 1.474 +/- 0.659 (0.147 * 4.472) | 1.146 +/- 0.183 | Active + 54 : FOPR 1.475 +/- 0.660 (0.148 * 4.472) | 1.122 +/- 0.184 | Active + 55 : FOPR 1.474 +/- 0.442 (0.147 * 3.000) | 1.098 +/- 0.188 | Active + 56 : FOPR 1.469 +/- 0.657 (0.147 * 4.472) | 1.077 +/- 0.192 | Active + 57 : FOPR 1.461 +/- 0.653 (0.146 * 4.472) | 1.053 +/- 0.194 | Active + 58 : FOPR 1.449 +/- 0.435 (0.145 * 3.000) | 1.027 +/- 0.196 | Active + 59 : FOPR 1.436 +/- 0.642 (0.144 * 4.472) | 1.002 +/- 0.196 | Active + 60 : FOPR 1.421 +/- 0.636 (0.142 * 4.472) | 0.975 +/- 0.197 | Active + 61 : FOPR 1.403 +/- 0.421 (0.140 * 3.000) | 0.947 +/- 0.200 | Active + 62 : FOPR 1.379 +/- 0.617 (0.138 * 4.472) | 0.928 +/- 0.200 | Active + 63 : FOPR 1.353 +/- 0.605 (0.135 * 4.472) | 0.902 +/- 0.203 | Active + 64 : FOPR 1.324 +/- 0.592 (0.132 * 4.472) | 0.878 +/- 0.206 | Active + 65 : FOPR 1.297 +/- 0.580 (0.130 * 4.472) | 0.851 +/- 0.210 | Active + 66 : FOPR 1.270 +/- 0.381 (0.127 * 3.000) | 0.824 +/- 0.213 | Active + 67 : FOPR 1.243 +/- 0.373 (0.124 * 3.000) | 0.801 +/- 0.215 | Active + 68 : FOPR 1.216 +/- 0.365 (0.122 * 3.000) | 0.781 +/- 0.216 | Active + 69 : FOPR 1.189 +/- 0.532 (0.119 * 4.472) | 0.762 +/- 0.216 | Active + 70 : FOPR 1.161 +/- 0.519 (0.116 * 4.472) | 0.744 +/- 0.215 | Active + 71 : FOPR 1.134 +/- 0.507 (0.113 * 4.472) | 0.725 +/- 0.212 | Active + 72 : FOPR 1.112 +/- 0.497 (0.111 * 4.472) | 0.704 +/- 0.206 | Active + 73 : FOPR 1.091 +/- 0.488 (0.109 * 4.472) | 0.683 +/- 0.200 | Active + 74 : FOPR 1.072 +/- 0.479 (0.107 * 4.472) | 0.661 +/- 0.194 | Active + 75 : FOPR 1.053 +/- 0.471 (0.105 * 4.472) | 0.640 +/- 0.189 | Active + 76 : FOPR 1.033 +/- 0.462 (0.103 * 4.472) | 0.619 +/- 0.185 | Active + 77 : FOPR 1.013 +/- 0.545 (0.101 * 5.385) | 0.597 +/- 0.181 | Active + 78 : FOPR 0.995 +/- 0.539 (0.100 * 5.385) | 0.576 +/- 0.176 | Active + 79 : FOPR 0.975 +/- 0.539 (0.100 * 5.385) | 0.555 +/- 0.171 | Active + 80 : FOPR 0.956 +/- 0.539 (0.100 * 5.385) | 0.533 +/- 0.171 | Active + 81 : FOPR 0.936 +/- 0.539 (0.100 * 5.385) | 0.513 +/- 0.171 | Active + 82 : FOPR 0.916 +/- 0.539 (0.100 * 5.385) | 0.494 +/- 0.170 | Active + 83 : FOPR 0.893 +/- 0.539 (0.100 * 5.385) | 0.477 +/- 0.169 | Active + 84 : FOPR 0.869 +/- 0.539 (0.100 * 5.385) | 0.462 +/- 0.169 | Active + 85 : FOPR 0.842 +/- 0.539 (0.100 * 5.385) | 0.447 +/- 0.170 | Active + 86 : FOPR 0.812 +/- 0.539 (0.100 * 5.385) | 0.432 +/- 0.170 | Active + 87 : FOPR 0.779 +/- 0.539 (0.100 * 5.385) | 0.417 +/- 0.171 | Active + 88 : FOPR 0.742 +/- 0.539 (0.100 * 5.385) | 0.403 +/- 0.170 | Active + 89 : FOPR 0.702 +/- 0.539 (0.100 * 5.385) | 0.389 +/- 0.171 | Active + 90 : FOPR 0.661 +/- 0.539 (0.100 * 5.385) | 0.379 +/- 0.171 | Active + 91 : FOPR 0.619 +/- 0.539 (0.100 * 5.385) | 0.370 +/- 0.171 | Active + 92 : FOPR 0.578 +/- 0.539 (0.100 * 5.385) | 0.361 +/- 0.169 | Active + 93 : FOPR 0.540 +/- 0.539 (0.100 * 5.385) | 0.354 +/- 0.168 | Active + 94 : FOPR 0.505 +/- 0.539 (0.100 * 5.385) | 0.349 +/- 0.166 | Active + 95 : FOPR 0.475 +/- 0.539 (0.100 * 5.385) | 0.344 +/- 0.165 | Active + 96 : FOPR 0.450 +/- 0.539 (0.100 * 5.385) | 0.340 +/- 0.165 | Active + 97 : FOPR 0.431 +/- 0.539 (0.100 * 5.385) | 0.344 +/- 0.168 | Active + 98 : FOPR 0.419 +/- 0.539 (0.100 * 5.385) | 0.350 +/- 0.171 | Active + 99 : FOPR 0.410 +/- 0.539 (0.100 * 5.385) | 0.349 +/- 0.171 | Active + 100 : FOPR 0.406 +/- 0.539 (0.100 * 5.385) | 0.350 +/- 0.173 | Active + 101 : FOPR 0.404 +/- 0.539 (0.100 * 5.385) | 0.347 +/- 0.171 | Active + 102 : FOPR 0.399 +/- 0.539 (0.100 * 5.385) | 0.344 +/- 0.168 | Active + 103 : FOPR 0.389 +/- 0.539 (0.100 * 5.385) | 0.346 +/- 0.165 | Active + 104 : FOPR 0.374 +/- 0.539 (0.100 * 5.385) | 0.348 +/- 0.162 | Active + 105 : FOPR 0.355 +/- 0.539 (0.100 * 5.385) | 0.350 +/- 0.156 | Active + 106 : FOPR 0.332 +/- 0.173 (0.100 * 1.732) | 0.350 +/- 0.148 | Active + 107 : FOPR 0.306 +/- 0.173 (0.100 * 1.732) | 0.349 +/- 0.140 | Active + 108 : FOPR 0.282 +/- 0.173 (0.100 * 1.732) | 0.348 +/- 0.133 | Active + 109 : FOPR 0.264 +/- 0.458 (0.100 * 4.583) | 0.344 +/- 0.125 | Active + 110 : FOPR 0.248 +/- 0.458 (0.100 * 4.583) | 0.340 +/- 0.118 | Active + 111 : FOPR 0.233 +/- 0.458 (0.100 * 4.583) | 0.337 +/- 0.114 | Active + 112 : FOPR 0.219 +/- 0.458 (0.100 * 4.583) | 0.335 +/- 0.112 | Active + 113 : FOPR 0.205 +/- 0.458 (0.100 * 4.583) | 0.334 +/- 0.110 | Active + 114 : FOPR 0.192 +/- 0.458 (0.100 * 4.583) | 0.333 +/- 0.110 | Active + 115 : FOPR 0.180 +/- 0.458 (0.100 * 4.583) | 0.332 +/- 0.109 | Active + 116 : FOPR 0.169 +/- 0.458 (0.100 * 4.583) | 0.330 +/- 0.107 | Active + 117 : FOPR 0.160 +/- 0.458 (0.100 * 4.583) | 0.327 +/- 0.106 | Active + 118 : FOPR 0.152 +/- 0.458 (0.100 * 4.583) | 0.323 +/- 0.105 | Active + 119 : FOPR 0.146 +/- 0.458 (0.100 * 4.583) | 0.317 +/- 0.102 | Active + 120 : FOPR 0.141 +/- 0.458 (0.100 * 4.583) | 0.310 +/- 0.100 | Active + 121 : FOPR 0.137 +/- 0.458 (0.100 * 4.583) | 0.303 +/- 0.098 | Active + 122 : FOPR 0.134 +/- 0.458 (0.100 * 4.583) | 0.296 +/- 0.096 | Active + 123 : FOPR 0.130 +/- 0.458 (0.100 * 4.583) | 0.290 +/- 0.094 | Active + 124 : FOPR 0.127 +/- 0.458 (0.100 * 4.583) | 0.284 +/- 0.092 | Active + 125 : FOPR 0.123 +/- 0.458 (0.100 * 4.583) | 0.279 +/- 0.090 | Active + 126 : FOPR 0.119 +/- 0.458 (0.100 * 4.583) | 0.275 +/- 0.088 | Active + 127 : FOPR 0.120 +/- 0.458 (0.100 * 4.583) | 0.270 +/- 0.085 | Active + 128 : FOPR 0.128 +/- 0.458 (0.100 * 4.583) | 0.266 +/- 0.081 | Active + 129 : FOPR 0.136 +/- 0.458 (0.100 * 4.583) | 0.263 +/- 0.077 | Active + 130 : FOPR 0.143 +/- 0.100 | 0.261 +/- 0.073 | Active + 131 : FOPR 0.150 +/- 0.200 (0.100 * 2.000) | 0.258 +/- 0.069 | Active + 132 : FOPR 0.155 +/- 0.200 (0.100 * 2.000) | 0.256 +/- 0.066 | Active + 133 : FOPR 0.159 +/- 0.200 (0.100 * 2.000) | 0.254 +/- 0.063 | Active + 134 : FOPR 0.163 +/- 0.200 (0.100 * 2.000) | 0.251 +/- 0.061 | Active + 135 : FOPR 0.166 +/- 0.346 (0.100 * 3.464) | 0.248 +/- 0.059 | Active + 136 : FOPR 0.167 +/- 0.346 (0.100 * 3.464) | 0.247 +/- 0.058 | Active + 137 : FOPR 0.167 +/- 0.346 (0.100 * 3.464) | 0.245 +/- 0.058 | Active + 138 : FOPR 0.166 +/- 0.346 (0.100 * 3.464) | 0.243 +/- 0.058 | Active + 139 : FOPR 0.165 +/- 0.346 (0.100 * 3.464) | 0.243 +/- 0.058 | Active + 140 : FOPR 0.164 +/- 0.346 (0.100 * 3.464) | 0.242 +/- 0.059 | Active + 141 : FOPR 0.165 +/- 0.346 (0.100 * 3.464) | 0.243 +/- 0.059 | Active + 142 : FOPR 0.169 +/- 0.346 (0.100 * 3.464) | 0.243 +/- 0.059 | Active + 143 : FOPR 0.176 +/- 0.346 (0.100 * 3.464) | 0.242 +/- 0.058 | Active + 144 : FOPR 0.186 +/- 0.346 (0.100 * 3.464) | 0.242 +/- 0.057 | Active + 145 : FOPR 0.197 +/- 0.346 (0.100 * 3.464) | 0.241 +/- 0.057 | Active + 146 : FOPR 0.211 +/- 0.346 (0.100 * 3.464) | 0.239 +/- 0.058 | Active + 147 : FOPR 0.225 +/- 0.100 | 0.238 +/- 0.059 | Active + 148 : FOPR 0.239 +/- 0.141 (0.100 * 1.414) | 0.238 +/- 0.061 | Active + 149 : FOPR 0.252 +/- 0.141 (0.100 * 1.414) | 0.238 +/- 0.061 | Active + 150 : FOPR 0.264 +/- 0.224 (0.100 * 2.236) | 0.237 +/- 0.061 | Active + 151 : FOPR 0.275 +/- 0.224 (0.100 * 2.236) | 0.236 +/- 0.062 | Active + 152 : FOPR 0.285 +/- 0.224 (0.100 * 2.236) | 0.236 +/- 0.064 | Active + 153 : FOPR 0.295 +/- 0.224 (0.100 * 2.236) | 0.236 +/- 0.066 | Active + 154 : FOPR 0.303 +/- 0.224 (0.100 * 2.236) | 0.235 +/- 0.069 | Active + 155 : FOPR 0.309 +/- 0.245 (0.100 * 2.449) | 0.234 +/- 0.072 | Active + 156 : FOPR 0.312 +/- 0.245 (0.100 * 2.449) | 0.231 +/- 0.074 | Active + 157 : FOPR 0.313 +/- 0.245 (0.100 * 2.449) | 0.229 +/- 0.076 | Active + 158 : FOPR 0.310 +/- 0.245 (0.100 * 2.449) | 0.225 +/- 0.077 | Active + 159 : FOPR 0.304 +/- 0.245 (0.100 * 2.449) | 0.220 +/- 0.078 | Active + 160 : FOPR 0.296 +/- 0.245 (0.100 * 2.449) | 0.215 +/- 0.078 | Active + 161 : FOPR 0.286 +/- 0.566 (0.100 * 5.657) | 0.209 +/- 0.078 | Active + 162 : FOPR 0.275 +/- 0.566 (0.100 * 5.657) | 0.202 +/- 0.078 | Active + 163 : FOPR 0.264 +/- 0.566 (0.100 * 5.657) | 0.195 +/- 0.079 | Active + 164 : FOPR 0.253 +/- 0.566 (0.100 * 5.657) | 0.188 +/- 0.079 | Active + 165 : FOPR 0.241 +/- 0.566 (0.100 * 5.657) | 0.181 +/- 0.080 | Active + 166 : FOPR 0.230 +/- 0.566 (0.100 * 5.657) | 0.173 +/- 0.082 | Active + 167 : FOPR 0.218 +/- 0.566 (0.100 * 5.657) | 0.167 +/- 0.084 | Active + 168 : FOPR 0.207 +/- 0.566 (0.100 * 5.657) | 0.161 +/- 0.086 | Active + 169 : FOPR 0.197 +/- 0.566 (0.100 * 5.657) | 0.155 +/- 0.088 | Active + 170 : FOPR 0.187 +/- 0.566 (0.100 * 5.657) | 0.149 +/- 0.090 | Active + 171 : FOPR 0.178 +/- 0.566 (0.100 * 5.657) | 0.143 +/- 0.092 | Active + 172 : FOPR 0.168 +/- 0.539 (0.100 * 5.385) | 0.138 +/- 0.094 | Active + 173 : FOPR 0.159 +/- 0.539 (0.100 * 5.385) | 0.132 +/- 0.095 | Active + 174 : FOPR 0.150 +/- 0.539 (0.100 * 5.385) | 0.128 +/- 0.096 | Active + 175 : FOPR 0.141 +/- 0.539 (0.100 * 5.385) | 0.124 +/- 0.096 | Active + 176 : FOPR 0.134 +/- 0.539 (0.100 * 5.385) | 0.120 +/- 0.096 | Active + 177 : FOPR 0.127 +/- 0.539 (0.100 * 5.385) | 0.116 +/- 0.097 | Active + 178 : FOPR 0.120 +/- 0.539 (0.100 * 5.385) | 0.113 +/- 0.097 | Active + 179 : FOPR 0.115 +/- 0.539 (0.100 * 5.385) | 0.110 +/- 0.096 | Active + 180 : FOPR 0.111 +/- 0.539 (0.100 * 5.385) | 0.107 +/- 0.096 | Active + 181 : FOPR 0.107 +/- 0.539 (0.100 * 5.385) | 0.105 +/- 0.095 | Active + 182 : FOPR 0.101 +/- 0.539 (0.100 * 5.385) | 0.102 +/- 0.095 | Active + 183 : FOPR 0.096 +/- 0.539 (0.100 * 5.385) | 0.100 +/- 0.095 | Active + 184 : FOPR 0.089 +/- 0.539 (0.100 * 5.385) | 0.097 +/- 0.096 | Active + 185 : FOPR 0.081 +/- 0.539 (0.100 * 5.385) | 0.094 +/- 0.096 | Active + 186 : FOPR 0.073 +/- 0.539 (0.100 * 5.385) | 0.092 +/- 0.098 | Active + 187 : FOPR 0.065 +/- 0.539 (0.100 * 5.385) | 0.090 +/- 0.099 | Active + 188 : FOPR 0.058 +/- 0.539 (0.100 * 5.385) | 0.088 +/- 0.101 | Active + 189 : FOPR 0.050 +/- 0.539 (0.100 * 5.385) | 0.087 +/- 0.103 | Active + 190 : FOPR 0.044 +/- 0.539 (0.100 * 5.385) | 0.086 +/- 0.104 | Active + 191 : FOPR 0.038 +/- 0.539 (0.100 * 5.385) | 0.085 +/- 0.106 | Active + 192 : FOPR 0.033 +/- 0.539 (0.100 * 5.385) | 0.084 +/- 0.107 | Active + 193 : FOPR 0.029 +/- 0.539 (0.100 * 5.385) | 0.084 +/- 0.108 | Active + 194 : FOPR 0.026 +/- 0.566 (0.100 * 5.657) | 0.084 +/- 0.108 | Active + 195 : FOPR 0.024 +/- 0.566 (0.100 * 5.657) | 0.084 +/- 0.109 | Active + 196 : FOPR 0.022 +/- 0.566 (0.100 * 5.657) | 0.084 +/- 0.109 | Active + 197 : FOPR 0.021 +/- 0.566 (0.100 * 5.657) | 0.084 +/- 0.109 | Active + 198 : FOPR 0.020 +/- 0.566 (0.100 * 5.657) | 0.084 +/- 0.110 | Active + 199 : FOPR 0.020 +/- 0.566 (0.100 * 5.657) | 0.084 +/- 0.110 | Active + 200 : FOPR 0.020 +/- 0.566 (0.100 * 5.657) | 0.084 +/- 0.110 | Active + 201 : WOPR_OP1_108 0.300 +/- 0.075 | 0.257 +/- 0.099 | Active + 202 : WOPR_OP1_144 0.200 +/- 0.049 (0.035 * 1.414) | 0.183 +/- 0.106 | Active + 203 : WOPR_OP1_190 0.015 +/- 0.014 (0.010 * 1.414) | 0.042 +/- 0.041 | Active + 204 : WOPR_OP1_36 0.700 +/- 0.070 | 0.650 +/- 0.084 | Active + 205 : WOPR_OP1_72 0.500 +/- 0.050 | 0.405 +/- 0.170 | Active + 206 : WOPR_OP1_9 0.100 +/- 0.050 | 0.096 +/- 0.060 | Active + 207 : WPR_DIFF_1 0.000 +/- 0.100 | -0.011 +/- 0.060 | Active + 208 : WPR_DIFF_1 0.100 +/- 0.200 | 0.081 +/- 0.126 | Active + 209 : WPR_DIFF_1 0.200 +/- 0.150 | 0.073 +/- 0.130 | Active + 210 : WPR_DIFF_1 0.000 +/- 0.050 | 0.127 +/- 0.125 | Active diff --git a/tests/unit_tests/analysis/test_es_update.py b/tests/unit_tests/analysis/test_es_update.py index a8cc3e2622d..49c047af2cd 100644 --- a/tests/unit_tests/analysis/test_es_update.py +++ b/tests/unit_tests/analysis/test_es_update.py @@ -17,10 +17,10 @@ iterative_smoother_update, smoother_update, ) -from ert.analysis._es_update import UpdateSettings from ert.analysis.configuration import UpdateStep from ert.analysis.row_scaling import RowScaling from ert.config import Field, GenDataConfig, GenKwConfig +from ert.config.analysis_config import UpdateSettings from ert.config.analysis_module import ESSettings, IESSettings from ert.field_utils import Shape @@ -73,7 +73,9 @@ def remove_timestamp_from_logfile(log_file: Path): fout.write(buf) -@pytest.mark.parametrize("misfit_preprocess", [True, False]) +@pytest.mark.parametrize( + "misfit_preprocess", [[["*"]], [], [["FOPR"]], [["FOPR"], ["WOPR_OP1_1*"]]] +) def test_update_report( snake_oil_case_storage, snake_oil_storage, snapshot, misfit_preprocess ): @@ -98,12 +100,17 @@ def test_update_report( list(ert_config.observations.keys()), ert_config.ensemble_config.parameters, ), - UpdateSettings(misfit_preprocess=misfit_preprocess), + UpdateSettings(auto_scale=misfit_preprocess), ESSettings(inversion="subspace"), log_path=Path("update_log"), ) log_file = Path(ert_config.analysis_config.log_path) / "id.txt" remove_timestamp_from_logfile(log_file) + snapshot.snapshot_dir = ( + str(snapshot.snapshot_dir).replace("misfit_preprocess0", "True") + if misfit_preprocess + else str(snapshot.snapshot_dir).replace("misfit_preprocess0", "False") + ) snapshot.assert_match(log_file.read_text("utf-8"), "update_log") diff --git a/tests/unit_tests/config/test_analysis_config.py b/tests/unit_tests/config/test_analysis_config.py index 757ccbaf150..1878a3b249e 100644 --- a/tests/unit_tests/config/test_analysis_config.py +++ b/tests/unit_tests/config/test_analysis_config.py @@ -205,7 +205,7 @@ def test_default_std_cutoff_is_set(): @given(st.floats(allow_nan=False, allow_infinity=False)) def test_std_cutoff_is_set_from_corresponding_key(value): assert AnalysisConfig.from_dict({ConfigKeys.STD_CUTOFF: value}).std_cutoff == value - assert AnalysisConfig(std_cutoff=value).std_cutoff == value + assert AnalysisConfig(std_cutoff=value).observation_settings.std_cutoff == value def test_default_max_runtime_is_unlimited(): @@ -310,3 +310,18 @@ def test_incorrect_variable_deprecation_warning(config, expected): } ) assert expected in [str(warning.message) for warning in all_warnings] + + +@pytest.mark.parametrize( + "config", + [ + ["OBSERVATIONS", "AUTO_SCALE", "OBS_*"], + ], +) +def test_misfit_configuration(config): + analysis_config = AnalysisConfig.from_dict( + { + ConfigKeys.ANALYSIS_SET_VAR: [config], + } + ) + assert analysis_config.observation_settings.auto_scale == [["OBS_*"]]