Skip to content

Commit

Permalink
Adapt everest to run_reservoirsimulator
Browse files Browse the repository at this point in the history
This is a fixup of a regression from 1ae12f6
  • Loading branch information
berland committed Jan 13, 2025
1 parent ea36931 commit 5a0ff5f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
1 change: 0 additions & 1 deletion .github/workflows/test_ert_with_flow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ jobs:
- name: Run Everest on an example configuration with flow
run: |
set +e
pushd test-data/everest/egg/everest/model
everest lint config_flow.yml
everest run config_flow.yml
Expand Down
13 changes: 12 additions & 1 deletion src/everest/simulator/everest_to_ert.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,18 @@ def _extract_forward_model(ever_config: EverestConfig, ert_config):
fm_steps = ert_config.get(ErtConfigKeys.FORWARD_MODEL, [])
for job in forward_model:
job_name, *args = job.split()
fm_steps.append([job_name, args])
match job_name:
# All three reservoir simulator fm_steps map to
# "run_reservoirsimulator" which requires the simulator name
# as its first argument.
case "eclipse100":
fm_steps.append(["eclipse100", ["eclipse", *args]])
case "eclipse300":
fm_steps.append(["eclipse300", ["e300", *args]])
case "flow":
fm_steps.append(["flow", ["flow", *args]])
case _:
fm_steps.append([job_name, args])

ert_config[ErtConfigKeys.FORWARD_MODEL] = fm_steps

Expand Down
2 changes: 1 addition & 1 deletion tests/everest/test_egg_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ def _generate_exp_ert_config(config_path, output_dir):
],
[
"eclipse100",
["eclipse/model/EGG.DATA", "--version", "2020.2"],
["eclipse", "eclipse/model/EGG.DATA", "--version", "2020.2"],
],
["rf", ["-s", "eclipse/model/EGG", "-o", "rf"]],
],
Expand Down

0 comments on commit 5a0ff5f

Please sign in to comment.