We should expose a forward model that replaces existing ways the global configuration is generated.
Currently a common pattern is to generate the global variables as a pre-hook simulation workflow:
https://github.com/equinor/fmu-drogon/blob/bd9cf70e8e04b1e797b13b705f0402bf43b5e4c2/ert/model/drogon_design.ert#L99-L100
HOOK_WORKFLOW echo_config_file PRE_SIMULATION -- Write ert config file run information to scratch
HOOK_WORKFLOW run_fmuconfig PRE_SIMULATION -- Update "global_variables.yml" and "global_variables.yml.tmpl" files
HOOK_WORKFLOW run_fmuconfig_rate PRE_SIMULATION -- Update "rate_scaling.yml" and "rate_scaling.yml.tmpl" files
This means all assets have a distinct (if not copied from Drogon) series of workflow/jobs/scripts running very similar fmuconfig commands.
These workflows run a script like
#!/bin/bash
#
# Run the global configuration for RMS, both making IPL (not in Drogon)...
# and YAML versions from a common global config
#
#--------------------------------------------------
MASTER="../../fmuconfig/input/global_master_config.yml" # global variables config
OUTFOLDER="../../fmuconfig/output" # location of result files
ROOTNAME="global_variables" # root name of result files
#--------------------------------------------------
# Delete all previous versions
rm -f ${OUTFOLDER}/${ROOTNAME}.* # be careful with this!
#--------------------------------------------------
# run command for creating YAML version (+ ert tmpl version; yml.tmpl)
fmuconfig $MASTER --rootname $ROOTNAME --mode yml --destination $OUTFOLDER \
--template $OUTFOLDER
# run command for creating IPL version if needed (+ ert tmpl version; ipl.tmpl)
fmuconfig $MASTER --rootname $ROOTNAME --mode ipl --destination $OUTFOLDER \
--template $OUTFOLDER --tool rms
Hence a forward model could look something like:
FORWARD_MODEL FMUCONFIG( \
<CONFIG>="../../fmuconfig/input/global_master_config.yml" \
<OUTPUT_NAME>="global_variables" \ -- defaulted?
<OUTFOLDER>="../../fmuconfig/output" \ -- defaulted?
<WITH_IPL>="false" \ -- optional, default false
)
By abstracting this out we can manage this functionality centrally, apply validation to configurations, and begin to bring other configuration elements into a single group.
Examples for implementing Ert forward models can be found in a few places; the newer style of forward models can be found in runrms, grid3d-maps, semeio, etc.
See https://ert.readthedocs.io/en/latest/getting_started/howto/plugin_system.html for information about the plugin system.
We should expose a forward model that replaces existing ways the global configuration is generated.
Currently a common pattern is to generate the global variables as a pre-hook simulation workflow:
https://github.com/equinor/fmu-drogon/blob/bd9cf70e8e04b1e797b13b705f0402bf43b5e4c2/ert/model/drogon_design.ert#L99-L100
This means all assets have a distinct (if not copied from Drogon) series of workflow/jobs/scripts running very similar
fmuconfigcommands.These workflows run a script like
Hence a forward model could look something like:
By abstracting this out we can manage this functionality centrally, apply validation to configurations, and begin to bring other configuration elements into a single group.
Examples for implementing Ert forward models can be found in a few places; the newer style of forward models can be found in runrms, grid3d-maps, semeio, etc.
See https://ert.readthedocs.io/en/latest/getting_started/howto/plugin_system.html for information about the plugin system.