Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MISFIT_PREPROCESSOR to ERT template #217

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"cwrap>=1.6",
"ecl>=2.9",
"ecl2df>=0.8.1",
"ert>=2.17",
"ert~=2.21b0",
"fmu-ensemble>=1.2",
"hyperopt>=0.2.5",
"jinja2>=2.10",
Expand All @@ -23,6 +23,7 @@
"pyscal>=0.7.4",
"pyvista>=0.23",
"pyyaml>=5.2",
"semeio~=1.0b0",
"scikit-learn>=0.22",
"scipy>=1.4",
"webviz-config>=0.0.42",
Expand Down
10 changes: 10 additions & 0 deletions src/flownet/ert/_create_ert_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,16 @@ def create_ert_setup( # pylint: disable=too-many-arguments
with open(os.path.join(output_folder, "pipfreeze.output"), "w") as fh:
subprocess.call(["pip", "freeze"], stdout=fh)

shutil.copyfile(
_MODULE_FOLDER / ".." / "static" / "MISFIT_PREPROCESSOR_WORKFLOW",
output_folder / "MISFIT_PREPROCESSOR_WORKFLOW",
)

shutil.copyfile(
_MODULE_FOLDER / ".." / "static" / "misfit_preprocessor_config.yml",
output_folder / "misfit_preprocessor_config.yml",
)

for section in ["RUNSPEC", "PROPS", "SOLUTION", "SCHEDULE"]:
static_source_path = pathlib.Path(static_path) / f"{section}.inc"
if static_source_path.is_file():
Expand Down
2 changes: 1 addition & 1 deletion src/flownet/ert/_run_subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import psutil

TIMEOUT = 900 # Kill ERT if no new output to stdout for 15 minutes.
TIMEOUT = 3600 # Kill ERT if no new output to stdout for 15 minutes.


def run_ert_subprocess(command: str, cwd: pathlib.Path, runpath: str) -> None:
Expand Down
1 change: 1 addition & 0 deletions src/flownet/static/MISFIT_PREPROCESSOR_WORKFLOW
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MISFIT_PREPROCESSOR misfit_preprocessor_config.yml
4 changes: 4 additions & 0 deletions src/flownet/static/misfit_preprocessor_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
workflow:
type: auto_scale
clustering:
type: limited_kmeans
2 changes: 2 additions & 0 deletions src/flownet/templates/ahm_config.ert.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ LOAD_WORKFLOW SAVE_ITERATION_ANALYTICS_WORKFLOW_{{ loop.index - 1 }}
HOOK_WORKFLOW SAVE_ITERATION_ANALYTICS_WORKFLOW_{{ loop.index - 1 }} POST_SIMULATION
{% endfor %}
{%- endif %}
LOAD_WORKFLOW MISFIT_PREPROCESSOR_WORKFLOW
HOOK_WORKFLOW MISFIT_PREPROCESSOR_WORKFLOW PRE_FIRST_UPDATE

GEN_KW FLOWNET_PARAMETERS ./EMPTYFILE ./EMPTYFILE ./parameters.ertparam

Expand Down