Skip to content

Commit

Permalink
Remove duplicate eclbase
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindeide committed Oct 22, 2024
1 parent 67e1ffc commit 12ffdba
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 9 deletions.
5 changes: 0 additions & 5 deletions src/ert/config/ensemble_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ class EnsembleConfig:
response_configs: Dict[str, ResponseConfig] = field(default_factory=dict)
parameter_configs: Dict[str, ParameterConfig] = field(default_factory=dict)
refcase: Optional[Refcase] = None
eclbase: Optional[str] = None

def __post_init__(self) -> None:
self._check_for_duplicate_names(
Expand Down Expand Up @@ -121,17 +120,13 @@ def make_field(field_list: List[str]) -> Field:
response_configs.append(instance)

refcase = Refcase.from_config_dict(config_dict)
eclbase = config_dict.get("ECLBASE")
if eclbase is not None:
eclbase = eclbase.replace("%d", "<IENS>")

return cls(
grid_file=grid_file_path,
response_configs={response.name: response for response in response_configs},
parameter_configs={
parameter.name: parameter for parameter in parameter_configs
},
eclbase=eclbase,
refcase=refcase,
)

Expand Down
2 changes: 1 addition & 1 deletion src/ert/libres_facade.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def load_from_forward_model(
runpath_format=self.config.model_config.runpath_format_string,
filename=str(self.config.runpath_file),
substitution_list=self.config.substitution_list,
eclbase=self.config.ensemble_config.eclbase,
eclbase=self.config.model_config.eclbase_format_string,
),
realisations,
ensemble=ensemble,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def run(self, ert_config: ErtConfig, workflow_args: List[Any]) -> None:
runpath_format=ert_config.model_config.runpath_format_string,
filename=str(ert_config.runpath_file),
substitution_list=ert_config.substitution_list,
eclbase=ert_config.ensemble_config.eclbase,
eclbase=ert_config.model_config.eclbase_format_string,
)
run_paths.write_runpath_list(
*self.get_ranges(
Expand Down
2 changes: 1 addition & 1 deletion src/ert/run_models/base_run_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def __init__(
runpath_format=config.model_config.runpath_format_string,
filename=str(config.runpath_file),
substitution_list=self.substitution_list,
eclbase=config.ensemble_config.eclbase,
eclbase=config.model_config.eclbase_format_string,
)
self._iter_snapshot: Dict[int, EnsembleSnapshot] = {}
self._status_queue = status_queue
Expand Down
2 changes: 1 addition & 1 deletion src/ert/simulator/batch_simulator_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def __post_init__(self) -> None:
runpath_format=ert_config.model_config.runpath_format_string,
filename=str(ert_config.runpath_file),
substitution_list=global_substitutions,
eclbase=ert_config.ensemble_config.eclbase,
eclbase=ert_config.model_config.eclbase_format_string,
)
self.run_args = create_run_arguments(
run_paths,
Expand Down

0 comments on commit 12ffdba

Please sign in to comment.