diff --git a/src/fmu/config/_configparserfmu_ipl.py b/src/fmu/config/_configparserfmu_ipl.py index e751455..a9abfb2 100644 --- a/src/fmu/config/_configparserfmu_ipl.py +++ b/src/fmu/config/_configparserfmu_ipl.py @@ -393,7 +393,6 @@ def _freeform_handle_entry( # inner function def _fixtheentry(variable, myval, subtype, count=None, template=False): - logger.info("Fix freeform entry %s (subtype %s)", variable, subtype) tmpvalue = str(myval) if "~" in tmpvalue: diff --git a/src/fmu/config/configparserfmu.py b/src/fmu/config/configparserfmu.py index 7b36f65..f4cbacd 100644 --- a/src/fmu/config/configparserfmu.py +++ b/src/fmu/config/configparserfmu.py @@ -388,13 +388,11 @@ def _cleanify_doubleunderscores(self): newcfg = deepcopy(self._config) for key, val in self._config.items(): - if isinstance(val, dict): subkeyorder = [] _tmps = {} for subkey, subval in val.items(): - if subkey.startswith("__"): if isinstance(subval, dict): for subsubkey, subsubval in subval.items(): @@ -507,7 +505,6 @@ def _get_sysinfo(commentmarker="#"): @staticmethod def _force_create_folders(folderlist): - for folder in folderlist: if folder is None: continue @@ -519,7 +516,6 @@ def _force_create_folders(folderlist): @staticmethod def _check_folders(folderlist): - for folder in folderlist: if folder is None: continue @@ -594,7 +590,6 @@ def _get_required_form(stream, template=False, ipl=False): if isinstance(stream, list): pass elif isinstance(stream, str): - if "~" in stream: value, tvalue = stream.split("~") value = value.strip() diff --git a/src/fmu/config/etc.py b/src/fmu/config/etc.py index 42e1ff2..eb19ba7 100644 --- a/src/fmu/config/etc.py +++ b/src/fmu/config/etc.py @@ -64,7 +64,6 @@ class Interaction(object): """ def __init__(self): - self._callclass = None self._caller = None self._lformat = None @@ -311,7 +310,6 @@ def _get_class_from_frame(frame): return outer[0] def _output(self, idx, level, string): - # pylint: disable=too-many-branches prefix = "" diff --git a/src/fmu/config/fmuconfigrunner.py b/src/fmu/config/fmuconfigrunner.py index 0ded912..c2bd9f2 100644 --- a/src/fmu/config/fmuconfigrunner.py +++ b/src/fmu/config/fmuconfigrunner.py @@ -21,7 +21,6 @@ def _do_parse_args(args): - if args is None: args = sys.argv[1:] diff --git a/src/fmu/config/utilities.py b/src/fmu/config/utilities.py index 53b67ce..36f72dd 100644 --- a/src/fmu/config/utilities.py +++ b/src/fmu/config/utilities.py @@ -1,21 +1,28 @@ """Module with some simple functions, e.g. for parsing for YAML into RMS """ +from yaml.loader import Loader + # for ordered dicts! from fmu.config import oyaml as yaml +from fmu.config._loader import ConstructorError, FmuLoader -def yaml_load(filename, safe=True, tool=None): +def yaml_load(filename, safe=True, tool=None, loader="standard"): """Load as YAML file, return a dictionary of type OrderedDict which is the config. Returning an ordered dictionary is a main feature of this loader. It makes it much - easier to compare the dictionaries returned. + easier to compare the dictionaries returned. In addition, it allows for reading the + input (extended) YAML format, if key ``allow_extended`` is True. Args: filename (str): Name of file (YAML formatted) - safe (bool): If True (default), then use `safe_load` + safe (bool): If True (default), then use `safe_load` when allow_extended is + set to False. Not applied if loader is "fmu". tool (str): Refers to a particular main section in the config. - Default is None, which measn 'all'. + Default is None, which means 'all'. + loader (str): If "fmu", the in-house FMU extended YAML loader that allows + use of e.g. `!include` is applied; otherwise the default is "standard" YAML. Example:: >>> import fmu.config.utilities as utils @@ -23,18 +30,28 @@ def yaml_load(filename, safe=True, tool=None): """ + useloader = FmuLoader if loader.lower() == "fmu" else Loader + with open(filename, "r", encoding="utf-8") as stream: - if safe: - cfg = yaml.safe_load(stream) - else: - cfg = yaml.load(stream) + try: + if safe and loader.lower() != "fmu": + cfg = yaml.safe_load(stream) + else: + cfg = yaml.load(stream, Loader=useloader) + except ConstructorError as cerr: + if "!include" in str(cerr): + print( + "\n*** Consider setting loader='fmu' to read fmu.config " + "input style ***\n" + ) + raise if tool is not None: try: newcfg = cfg[tool] cfg = newcfg except Exception as exc: # pylint: disable=broad-except - print("Cannot import: {}".format(exc)) + print(f"Cannot import: {exc}") return None return cfg diff --git a/tests/data/yml/drogon/input/_access.yml b/tests/data/yml/drogon/input/_access.yml new file mode 100644 index 0000000..01605d8 --- /dev/null +++ b/tests/data/yml/drogon/input/_access.yml @@ -0,0 +1,5 @@ +asset: + name: Drogon +ssdl: + access_level: internal + rep_include: true diff --git a/tests/data/yml/drogon/input/_auxiliary.yml b/tests/data/yml/drogon/input/_auxiliary.yml new file mode 100644 index 0000000..1a62fd5 --- /dev/null +++ b/tests/data/yml/drogon/input/_auxiliary.yml @@ -0,0 +1,79 @@ +# This is auxiliary metadata that contains helper setup for mostly for SUMO +# * aliases +# * display settings + +# The key names are the modelling names used in RMS project (e.g. TopVolantis) while the "name" +# shall be the official SMDA name + +MSL: + stratigraphic: False + name: MSL + display_name: MSL + +Seabase: + stratigraphic: False + name: Seabase + display_name: Seabase + +TopVolantis: + stratigraphic: True + name: VOLANTIS GP. Top # this is the official DB name + display_name: Top Volantis + # additional names, given for demo purpose: + alias: + - TopVOLANTIS + - TOP_VOLANTIS + straigraphic_alias: + - TopValysar + - Valysar Fm. Top + +TopTherys: + stratigraphic: True + name: Therys Fm. Top + display_name: Top Therys + +TopVolon: + stratigraphic: True + name: Volon Fm. Top + display_name: Top Volon + +BaseVolon: + stratigraphic: True + name: Volon Fm. Base + display_name: Base Volon + +BaseVolantis: + stratigraphic: True + name: VOLANTIS GP. Base + display_name: Base Volantis + +Mantle: + stratigraphic: False + name: Mantle + +#========================================================================================= +# zones +Above: + stratigraphic: False + name: Above + display_name: Above Reservoir + +Valysar: + stratigraphic: True + name: Valysar Fm. + display_name: Valysar + +Therys: + stratigraphic: True + name: Therys Fm. + display_name: Therys + +Volon: + stratigraphic: True + name: Volon Fm. + display_name: Volon + +Below: + stratigraphic: False + name: Below + display_name: Below Reservoir diff --git a/tests/data/yml/drogon/input/_dates.yml b/tests/data/yml/drogon/input/_dates.yml new file mode 100644 index 0000000..9305e39 --- /dev/null +++ b/tests/data/yml/drogon/input/_dates.yml @@ -0,0 +1,19 @@ + SEISMIC_HIST_DATES: &4d_dates + - 2018-01-01 + - 2018-07-01 + - 2019-07-01 + - 2020-07-01 + + SEISMIC_HIST_DIFFDATES: &4d_diffdates + - [2018-07-01, 2018-01-01] + - [2019-07-01, 2018-01-01] + - [2020-07-01, 2018-01-01] + - [2019-07-01, 2018-07-01] + - [2020-07-01, 2019-07-01] + + ECLIPSE_INIT_DATE: &ecl_init_date 2018-01-01 #init date + + # eclipse dates should be aligned with rmsevents IORESTART keyword (restart reporting) + ECLIPSE_HIST_DATES: *4d_dates # same dates as in SEISMIC_HIST_DATES + + ECLIPSE_HIST_DIFFDATES: *4d_diffdates # same dates as in SEISMIC_HIST_DIFFDATES diff --git a/tests/data/yml/drogon/input/_dates_pred.yml b/tests/data/yml/drogon/input/_dates_pred.yml new file mode 100644 index 0000000..9d8b64f --- /dev/null +++ b/tests/data/yml/drogon/input/_dates_pred.yml @@ -0,0 +1,20 @@ + #seismic pred dates should include diff dates and relevant single dates + SEISMIC_PRED_DATES: &4d_pred_dates + - 2018-01-01 + - 2020-07-01 + - 2025-01-01 + + SEISMIC_PRED_DIFFDATES: &4d_pred_diffdates + - [2025-01-01, 2018-01-01] + - [2025-01-01, 2020-07-01] + + #ecl_dates should be aligned with rmsevents IORESTART keyword (restart reporting) + ECLIPSE_INIT_DATES: &ecl_init_dates + - 2018-01-01 + + ECLIPSE_PRED_DATES: &ecl_pred_dates + - 2025-01-01 + + ECLIPSE_PRED_DIFFDATES: &ecl_pred_diffdates + - [2025-01-01, 2018-01-01] + - [2025-01-01, 2020-07-01] diff --git a/tests/data/yml/drogon/input/_fwl_2dtable.yml b/tests/data/yml/drogon/input/_fwl_2dtable.yml new file mode 100644 index 0000000..a5dbf2f --- /dev/null +++ b/tests/data/yml/drogon/input/_fwl_2dtable.yml @@ -0,0 +1,13 @@ +# These data are currently *not* in use ; they are here for demo purpose! +# This is primarely an example on how to read 2D data from YAML +# in the RMS project it will be a demo_*.py script to show how +# it can be read by python + +# ZONE1 VALYSAR ZONE2 THERYS ZONE3 ZONE3 VOLON ZONE3 +- [1660 ~ , 1660 ~ , 1660 ~ ] # region 1 WestLowland +- [1667 ~ , 1667 ~ , 1680 ~ ] # region 2 CentralSouth +- [1668 ~ , 1667 ~ , 1680 ~ ] # region 3 CentralNorth +- [1661 ~ , 1667 ~ , 1680 ~ ] # region 4 NorthHorst +- [1655 ~ , 1664 ~ , 1680 ~ ] # region 5 CentralRamp +- [1632 ~ , 1667 ~ , 1680 ~ ] # region 6 CentralHorst +- [1688 ~ , 1667 ~ , 1690 ~ ] # region 7 EastLowland diff --git a/tests/data/yml/drogon/input/_fwl_dict.yml b/tests/data/yml/drogon/input/_fwl_dict.yml new file mode 100644 index 0000000..b75a27e --- /dev/null +++ b/tests/data/yml/drogon/input/_fwl_dict.yml @@ -0,0 +1,44 @@ +# These data are currently *not* in use ; they are here for demo purpose! +# This is primarely an example on how to read 2D data from YAML +# in the RMS project it will be a demo_*.py script to show how +# it can be read by python + +# ZONE1 VALYSAR ZONE2 THERYS ZONE3 ZONE3 VOLON ZONE3 +# - [1660 ~ , 1660 ~ , 1660 ~ ] # region 1 WestLowland +# - [1667 ~ , 1667 ~ , 1680 ~ ] # region 2 CentralSouth +# - [1668 ~ , 1667 ~ , 1680 ~ ] # region 3 CentralNorth +# - [1661 ~ , 1667 ~ , 1680 ~ ] # region 4 NorthHorst +# - [1655 ~ , 1664 ~ , 1680 ~ ] # region 5 CentralRamp +# - [1632 ~ , 1667 ~ , 1680 ~ ] # region 6 CentralHorst +# - [1688 ~ , 1667 ~ , 1690 ~ ] # region 7 EastLowland + +# better! use dictionary + +Westlowland: + Valysar: 1660 ~ + Therys: 1660 ~ + Volon: 1660 ~ +Centralsouth: + Valysar: 1667 ~ + Therys: 1667 ~ + Volon: 1680 ~ +CentralNorth: + Valysar: 1668 ~ + Therys: 1667 ~ + Volon: 1680 ~ +NorthHorst: + Valysar: 1661 ~ + Therys: 1667 ~ + Volon: 1680 ~ +CentralRamp: + Valysar: 1655 ~ + Therys: 1664 ~ + Volon: 1680 ~ +CentralHorst: + Valysar: 1632 ~ + Therys: 1667 ~ + Volon: 1680 ~ +Eastlowland: + Valysar: 1688 ~ + Therys: 1667 ~ + Volon: 1690 ~ diff --git a/tests/data/yml/drogon/input/_masterdata.yml b/tests/data/yml/drogon/input/_masterdata.yml new file mode 100644 index 0000000..2c473b0 --- /dev/null +++ b/tests/data/yml/drogon/input/_masterdata.yml @@ -0,0 +1,22 @@ +#======================================================================================== +# Master data section, to be used for SUMO master data metadata +# In global_master, use: +# masterdata: !include _masterdata.yml +#======================================================================================== + +smda: + country: + - identifier: Norway + uuid: ad214d85-8a1d-19da-e053-c918a4889309 + discovery: + - short_identifier: DROGON + uuid: ad214d85-8a1d-19da-e053-c918a4889309 + field: + - identifier: DROGON + uuid: 00000000-0000-0000-0000-000000000000 + coordinate_system: + identifier: ST_WGS84_UTM37N_P32637 + uuid: ad214d85-dac7-19da-e053-c918a4889309 + stratigraphic_column: + identifier: DROGON_HAS_NO_STRATCOLUMN + uuid: 00000000-0000-0000-0000-000000000000 diff --git a/tests/data/yml/drogon/input/_relperm_base.yml b/tests/data/yml/drogon/input/_relperm_base.yml new file mode 100644 index 0000000..c2af71f --- /dev/null +++ b/tests/data/yml/drogon/input/_relperm_base.yml @@ -0,0 +1,267 @@ +# +# relperm definitions to be accessed via YAML/Python +# +# rnyb Apr 20, all relperm variables given as dict +# where key = satnum number +# +# rnyb Jul 20 - base relperm (partly based on Reek case satnum 2) + +#--------------------------------- +# relperm endpoints and LET exponents +#--------------------------------- + +KRWEND: + 1: &krwend1 0.9 + 2: &krwend2 0.9 + 3: &krwend3 0.9 + 4: &krwend4 0.9 + 5: &krwend5 0.9 + 6: &krwend6 0.9 + 7: &krwend7 0.5 + 8: &krwend8 0.5 + 9: &krwend9 0.5 + 10: &krwend10 0.5 + 11: &krwend11 0.5 + 12: &krwend12 0.5 + +SORW: + 1: &sorw1 0.15 + 2: &sorw2 0.15 + 3: &sorw3 0.15 + 4: &sorw4 0.15 + 5: &sorw5 0.15 + 6: &sorw6 0.15 + 7: &sorw7 0.15 + 8: &sorw8 0.15 + 9: &sorw9 0.15 + 10: &sorw10 0.15 + 11: &sorw11 0.15 + 12: &sorw12 0.15 + +SORG: + 1: &sorg1 0.10 + 2: &sorg2 0.10 + 3: &sorg3 0.10 + 4: &sorg4 0.10 + 5: &sorg5 0.10 + 6: &sorg6 0.10 + 7: &sorg7 0.10 + 8: &sorg8 0.10 + 9: &sorg9 0.10 + 10: &sorg10 0.10 + 11: &sorg11 0.10 + 12: &sorg12 0.10 + +SGCR: + 1: &sgcr1 0.05 + 2: &sgcr2 0.05 + 3: &sgcr3 0.05 + 4: &sgcr4 0.05 + 5: &sgcr5 0.05 + 6: &sgcr6 0.05 + 7: &sgcr7 0.05 + 8: &sgcr8 0.05 + 9: &sgcr9 0.05 + 10: &sgcr10 0.05 + 11: &sgcr11 0.05 + 12: &sgcr12 0.05 + +KRGEND: + 1: &krgend1 0.95 + 2: &krgend2 0.95 + 3: &krgend3 0.95 + 4: &krgend4 0.95 + 5: &krgend5 0.95 + 6: &krgend6 0.95 + 7: &krgend7 0.95 + 8: &krgend8 0.95 + 9: &krgend9 0.95 + 10: &krgend10 0.95 + 11: &krgend11 0.95 + 12: &krgend12 0.95 + +# swl is calculated at a specified height, SWLHEIGHT, above the FWL +# swcr_add is a constant added to swl to achive swcr +# swcr is defined as follows: swcr=swl+swcr_add +SWCR_ADD: + 1: &swcr_add 0.01 #~ + 2: *swcr_add + 3: *swcr_add + 4: *swcr_add + 5: *swcr_add + 6: *swcr_add + 7: *swcr_add + 8: *swcr_add + 9: *swcr_add + 10: *swcr_add + 11: *swcr_add + 12: *swcr_add + +LW: + 1: &lw1 2.4 + 2: &lw2 2.4 + 3: &lw3 2.4 + 4: &lw4 2.4 + 5: &lw5 2.4 + 6: &lw6 2.4 + 7: &lw7 2.4 + 8: &lw8 2.4 + 9: &lw9 2.4 + 10: &lw10 2.4 + 11: &lw11 2.4 + 12: &lw12 2.4 + +EW: + 1: &ew1 3.2 + 2: &ew2 3.2 + 3: &ew3 3.2 + 4: &ew4 3.2 + 5: &ew5 3.2 + 6: &ew6 3.2 + 7: &ew7 3.2 + 8: &ew8 3.2 + 9: &ew9 3.2 + 10: &ew10 3.2 + 11: &ew11 3.2 + 12: &ew12 3.2 + +TW: + 1: &tw1 1.2 + 2: &tw2 1.2 + 3: &tw3 1.2 + 4: &tw4 1.2 + 5: &tw5 1.2 + 6: &tw6 1.2 + 7: &tw7 1.2 + 8: &tw8 1.2 + 9: &tw9 1.2 + 10: &tw10 1.2 + 11: &tw11 1.2 + 12: &tw12 1.2 + +LO: + 1: &lo1 3.7 + 2: &lo2 3.7 + 3: &lo3 3.7 + 4: &lo4 3.7 + 5: &lo5 3.7 + 6: &lo6 3.7 + 7: &lo7 3.7 + 8: &lo8 3.7 + 9: &lo9 3.7 + 10: &lo10 3.7 + 11: &lo11 3.7 + 12: &lo12 3.7 + +EO: + 1: &eo1 2.4 + 2: &eo2 2.4 + 3: &eo3 2.4 + 4: &eo4 2.4 + 5: &eo5 2.4 + 6: &eo6 2.4 + 7: &eo7 2.4 + 8: &eo8 2.4 + 9: &eo9 2.4 + 10: &eo10 2.4 + 11: &eo11 2.4 + 12: &eo12 2.4 + +TO: + 1: &to1 1.2 + 2: &to2 1.2 + 3: &to3 1.2 + 4: &to4 1.2 + 5: &to5 1.2 + 6: &to6 1.2 + 7: &to7 1.2 + 8: &to8 1.2 + 9: &to9 1.2 + 10: &to10 1.2 + 11: &to11 1.2 + 12: &to12 1.2 + +LOG: + 1: &log1 3.9 + 2: &log2 3.9 + 3: &log3 3.9 + 4: &log4 3.9 + 5: &log5 3.9 + 6: &log6 3.9 + 7: &log7 3.9 + 8: &log8 3.9 + 9: &log9 3.9 + 10: &log10 3.9 + 11: &log11 3.9 + 12: &log12 3.9 + +EOG: + 1: &eog1 1.8 + 2: &eog2 1.8 + 3: &eog3 1.8 + 4: &eog4 1.8 + 5: &eog5 1.8 + 6: &eog6 1.8 + 7: &eog7 1.8 + 8: &eog8 1.8 + 9: &eog9 1.8 + 10: &eog10 1.8 + 11: &eog11 1.8 + 12: &eog12 1.8 + +TOG: + 1: &tog1 1.0 + 2: &tog2 1.0 + 3: &tog3 1.0 + 4: &tog4 1.0 + 5: &tog5 1.0 + 6: &tog6 1.0 + 7: &tog7 1.0 + 8: &tog8 1.0 + 9: &tog9 1.0 + 10: &tog10 1.0 + 11: &tog11 1.0 + 12: &tog12 1.0 + +LG: + 1: &lg1 2.4 + 2: &lg2 2.4 + 3: &lg3 2.4 + 4: &lg4 2.4 + 5: &lg5 2.4 + 6: &lg6 2.4 + 7: &lg7 2.4 + 8: &lg8 2.4 + 9: &lg9 2.4 + 10: &lg10 2.4 + 11: &lg11 2.4 + 12: &lg12 2.4 + +EG: + 1: &eg1 1.6 + 2: &eg2 1.6 + 3: &eg3 1.6 + 4: &eg4 1.6 + 5: &eg5 1.6 + 6: &eg6 1.6 + 7: &eg7 1.6 + 8: &eg8 1.6 + 9: &eg9 1.6 + 10: &eg10 1.6 + 11: &eg11 1.6 + 12: &eg12 1.6 + +TG: + 1: &tg1 1.1 + 2: &tg2 1.1 + 3: &tg3 1.1 + 4: &tg4 1.1 + 5: &tg5 1.1 + 6: &tg6 1.1 + 7: &tg7 1.1 + 8: &tg8 1.1 + 9: &tg9 1.1 + 10: &tg10 1.1 + 11: &tg11 1.1 + 12: &tg12 1.1 + diff --git a/tests/data/yml/drogon/input/_relperm_high.yml b/tests/data/yml/drogon/input/_relperm_high.yml new file mode 100644 index 0000000..4a2ec81 --- /dev/null +++ b/tests/data/yml/drogon/input/_relperm_high.yml @@ -0,0 +1,267 @@ +# +# relperm definitions to be accessed via YAML/Python +# +# rnyb Apr 20, all relperm variables given as dict +# where key = satnum number +# +# rnyb Jul 20 - high relperm (partly based on Reek case satnum 2) + +#--------------------------------- +# relperm endpoints and LET exponents +#--------------------------------- + +KRWEND: + 1: &krwend1 0.8 + 2: &krwend2 0.8 + 3: &krwend3 0.8 + 4: &krwend4 0.8 + 5: &krwend5 0.8 + 6: &krwend6 0.8 + 7: &krwend7 0.3 + 8: &krwend8 0.3 + 9: &krwend9 0.3 + 10: &krwend10 0.3 + 11: &krwend11 0.3 + 12: &krwend12 0.3 + +SORW: + 1: &sorw1 0.20 + 2: &sorw2 0.20 + 3: &sorw3 0.20 + 4: &sorw4 0.20 + 5: &sorw5 0.20 + 6: &sorw6 0.20 + 7: &sorw7 0.20 + 8: &sorw8 0.20 + 9: &sorw9 0.20 + 10: &sorw10 0.20 + 11: &sorw11 0.20 + 12: &sorw12 0.20 + +SORG: + 1: &sorg1 0.10 + 2: &sorg2 0.10 + 3: &sorg3 0.10 + 4: &sorg4 0.10 + 5: &sorg5 0.10 + 6: &sorg6 0.10 + 7: &sorg7 0.10 + 8: &sorg8 0.10 + 9: &sorg9 0.10 + 10: &sorg10 0.10 + 11: &sorg11 0.10 + 12: &sorg12 0.10 + +SGCR: + 1: &sgcr1 0.05 + 2: &sgcr2 0.05 + 3: &sgcr3 0.05 + 4: &sgcr4 0.05 + 5: &sgcr5 0.05 + 6: &sgcr6 0.05 + 7: &sgcr7 0.05 + 8: &sgcr8 0.05 + 9: &sgcr9 0.05 + 10: &sgcr10 0.05 + 11: &sgcr11 0.05 + 12: &sgcr12 0.05 + +KRGEND: + 1: &krgend1 0.95 + 2: &krgend2 0.95 + 3: &krgend3 0.95 + 4: &krgend4 0.95 + 5: &krgend5 0.95 + 6: &krgend6 0.95 + 7: &krgend7 0.95 + 8: &krgend8 0.95 + 9: &krgend9 0.95 + 10: &krgend10 0.95 + 11: &krgend11 0.95 + 12: &krgend12 0.95 + +# swl is calculated at a specified height, SWLHEIGHT, above the FWL +# swcr_add is a constant added to swl to achive swcr +# swcr is defined as follows: swcr=swl+swcr_add +SWCR_ADD: + 1: &swcr_add 0.01 #~ + 2: *swcr_add + 3: *swcr_add + 4: *swcr_add + 5: *swcr_add + 6: *swcr_add + 7: *swcr_add + 8: *swcr_add + 9: *swcr_add + 10: *swcr_add + 11: *swcr_add + 12: *swcr_add + +LW: + 1: &lw1 3.1 + 2: &lw2 3.1 + 3: &lw3 3.1 + 4: &lw4 3.1 + 5: &lw5 3.1 + 6: &lw6 3.1 + 7: &lw7 3.1 + 8: &lw8 3.1 + 9: &lw9 3.1 + 10: &lw10 3.1 + 11: &lw11 3.1 + 12: &lw12 3.1 + +EW: + 1: &ew1 5.9 + 2: &ew2 5.9 + 3: &ew3 5.9 + 4: &ew4 5.9 + 5: &ew5 5.9 + 6: &ew6 5.9 + 7: &ew7 5.9 + 8: &ew8 5.9 + 9: &ew9 5.9 + 10: &ew10 5.9 + 11: &ew11 5.9 + 12: &ew12 5.9 + +TW: + 1: &tw1 0.8 + 2: &tw2 0.8 + 3: &tw3 0.8 + 4: &tw4 0.8 + 5: &tw5 0.8 + 6: &tw6 0.8 + 7: &tw7 0.8 + 8: &tw8 0.8 + 9: &tw9 0.8 + 10: &tw10 0.8 + 11: &tw11 0.8 + 12: &tw12 0.8 + +LO: + 1: &lo1 2.7 + 2: &lo2 2.7 + 3: &lo3 2.7 + 4: &lo4 2.7 + 5: &lo5 2.7 + 6: &lo6 2.7 + 7: &lo7 2.7 + 8: &lo8 2.7 + 9: &lo9 2.7 + 10: &lo10 2.7 + 11: &lo11 2.7 + 12: &lo12 2.7 + +EO: + 1: &eo1 1.5 + 2: &eo2 1.5 + 3: &eo3 1.5 + 4: &eo4 1.5 + 5: &eo5 1.5 + 6: &eo6 1.5 + 7: &eo7 1.5 + 8: &eo8 1.5 + 9: &eo9 1.5 + 10: &eo10 1.5 + 11: &eo11 1.5 + 12: &eo12 1.5 + +TO: + 1: &to1 1.4 + 2: &to2 1.4 + 3: &to3 1.4 + 4: &to4 1.4 + 5: &to5 1.4 + 6: &to6 1.4 + 7: &to7 1.4 + 8: &to8 1.4 + 9: &to9 1.4 + 10: &to10 1.4 + 11: &to11 1.4 + 12: &to12 1.4 + +LOG: + 1: &log1 3.0 + 2: &log2 3.0 + 3: &log3 3.0 + 4: &log4 3.0 + 5: &log5 3.0 + 6: &log6 3.0 + 7: &log7 3.0 + 8: &log8 3.0 + 9: &log9 3.0 + 10: &log10 3.0 + 11: &log11 3.0 + 12: &log12 3.0 + +EOG: + 1: &eog1 1.0 + 2: &eog2 1.0 + 3: &eog3 1.0 + 4: &eog4 1.0 + 5: &eog5 1.0 + 6: &eog6 1.0 + 7: &eog7 1.0 + 8: &eog8 1.0 + 9: &eog9 1.0 + 10: &eog10 1.0 + 11: &eog11 1.0 + 12: &eog12 1.0 + +TOG: + 1: &tog1 1.2 + 2: &tog2 1.2 + 3: &tog3 1.2 + 4: &tog4 1.2 + 5: &tog5 1.2 + 6: &tog6 1.2 + 7: &tog7 1.2 + 8: &tog8 1.2 + 9: &tog9 1.2 + 10: &tog10 1.2 + 11: &tog11 1.2 + 12: &tog12 1.2 + +LG: + 1: &lg1 3.1 + 2: &lg2 3.1 + 3: &lg3 3.1 + 4: &lg4 3.1 + 5: &lg5 3.1 + 6: &lg6 3.1 + 7: &lg7 3.1 + 8: &lg8 3.1 + 9: &lg9 3.1 + 10: &lg10 3.1 + 11: &lg11 3.1 + 12: &lg12 3.1 + +EG: + 1: &eg1 2.3 + 2: &eg2 2.3 + 3: &eg3 2.3 + 4: &eg4 2.3 + 5: &eg5 2.3 + 6: &eg6 2.3 + 7: &eg7 2.3 + 8: &eg8 2.3 + 9: &eg9 2.3 + 10: &eg10 2.3 + 11: &eg11 2.3 + 12: &eg12 2.3 + +TG: + 1: &tg1 1.0 + 2: &tg2 1.0 + 3: &tg3 1.0 + 4: &tg4 1.0 + 5: &tg5 1.0 + 6: &tg6 1.0 + 7: &tg7 1.0 + 8: &tg8 1.0 + 9: &tg9 1.0 + 10: &tg10 1.0 + 11: &tg11 1.0 + 12: &tg12 1.0 + diff --git a/tests/data/yml/drogon/input/_relperm_low.yml b/tests/data/yml/drogon/input/_relperm_low.yml new file mode 100644 index 0000000..0235b76 --- /dev/null +++ b/tests/data/yml/drogon/input/_relperm_low.yml @@ -0,0 +1,267 @@ +# +# relperm definitions to be accessed via YAML/Python +# +# rnyb Apr 20, all relperm variables given as dict +# where key = satnum number +# +# rnyb Jul 20 - low relperm (partly based on Reek case satnum 2) + +#--------------------------------- +# relperm endpoints and LET exponents +#--------------------------------- + +KRWEND: + 1: &krwend1 0.99 + 2: &krwend2 0.99 + 3: &krwend3 0.99 + 4: &krwend4 0.99 + 5: &krwend5 0.99 + 6: &krwend6 0.99 + 7: &krwend7 0.75 + 8: &krwend8 0.75 + 9: &krwend9 0.75 + 10: &krwend10 0.75 + 11: &krwend11 0.75 + 12: &krwend12 0.75 + +SORW: + 1: &sorw1 0.10 + 2: &sorw2 0.10 + 3: &sorw3 0.10 + 4: &sorw4 0.10 + 5: &sorw5 0.10 + 6: &sorw6 0.10 + 7: &sorw7 0.10 + 8: &sorw8 0.10 + 9: &sorw9 0.10 + 10: &sorw10 0.10 + 11: &sorw11 0.10 + 12: &sorw12 0.10 + +SORG: + 1: &sorg1 0.10 + 2: &sorg2 0.10 + 3: &sorg3 0.10 + 4: &sorg4 0.10 + 5: &sorg5 0.10 + 6: &sorg6 0.10 + 7: &sorg7 0.10 + 8: &sorg8 0.10 + 9: &sorg9 0.10 + 10: &sorg10 0.10 + 11: &sorg11 0.10 + 12: &sorg12 0.10 + +SGCR: + 1: &sgcr1 0.05 + 2: &sgcr2 0.05 + 3: &sgcr3 0.05 + 4: &sgcr4 0.05 + 5: &sgcr5 0.05 + 6: &sgcr6 0.05 + 7: &sgcr7 0.05 + 8: &sgcr8 0.05 + 9: &sgcr9 0.05 + 10: &sgcr10 0.05 + 11: &sgcr11 0.05 + 12: &sgcr12 0.05 + +KRGEND: + 1: &krgend1 0.95 + 2: &krgend2 0.95 + 3: &krgend3 0.95 + 4: &krgend4 0.95 + 5: &krgend5 0.95 + 6: &krgend6 0.95 + 7: &krgend7 0.95 + 8: &krgend8 0.95 + 9: &krgend9 0.95 + 10: &krgend10 0.95 + 11: &krgend11 0.95 + 12: &krgend12 0.95 + +# swl is calculated at a specified height, SWLHEIGHT, above the FWL +# swcr_add is a constant added to swl to achive swcr +# swcr is defined as follows: swcr=swl+swcr_add +SWCR_ADD: + 1: &swcr_add 0.01 #~ + 2: *swcr_add + 3: *swcr_add + 4: *swcr_add + 5: *swcr_add + 6: *swcr_add + 7: *swcr_add + 8: *swcr_add + 9: *swcr_add + 10: *swcr_add + 11: *swcr_add + 12: *swcr_add + +LW: + 1: &lw1 1.8 + 2: &lw2 1.8 + 3: &lw3 1.8 + 4: &lw4 1.8 + 5: &lw5 1.8 + 6: &lw6 1.8 + 7: &lw7 1.8 + 8: &lw8 1.8 + 9: &lw9 1.8 + 10: &lw10 1.8 + 11: &lw11 1.8 + 12: &lw12 1.8 + +EW: + 1: &ew1 1.9 + 2: &ew2 1.9 + 3: &ew3 1.9 + 4: &ew4 1.9 + 5: &ew5 1.9 + 6: &ew6 1.9 + 7: &ew7 1.9 + 8: &ew8 1.9 + 9: &ew9 1.9 + 10: &ew10 1.9 + 11: &ew11 1.9 + 12: &ew12 1.9 + +TW: + 1: &tw1 1.4 + 2: &tw2 1.4 + 3: &tw3 1.4 + 4: &tw4 1.4 + 5: &tw5 1.4 + 6: &tw6 1.4 + 7: &tw7 1.4 + 8: &tw8 1.4 + 9: &tw9 1.4 + 10: &tw10 1.4 + 11: &tw11 1.4 + 12: &tw12 1.4 + +LO: + 1: &lo1 4.2 + 2: &lo2 4.2 + 3: &lo3 4.2 + 4: &lo4 4.2 + 5: &lo5 4.2 + 6: &lo6 4.2 + 7: &lo7 4.2 + 8: &lo8 4.2 + 9: &lo9 4.2 + 10: &lo10 4.2 + 11: &lo11 4.2 + 12: &lo12 4.2 + +EO: + 1: &eo1 5.5 + 2: &eo2 5.5 + 3: &eo3 5.5 + 4: &eo4 5.5 + 5: &eo5 5.5 + 6: &eo6 5.5 + 7: &eo7 5.5 + 8: &eo8 5.5 + 9: &eo9 5.5 + 10: &eo10 5.5 + 11: &eo11 5.5 + 12: &eo12 5.5 + +TO: + 1: &to1 1.0 + 2: &to2 1.0 + 3: &to3 1.0 + 4: &to4 1.0 + 5: &to5 1.0 + 6: &to6 1.0 + 7: &to7 1.0 + 8: &to8 1.0 + 9: &to9 1.0 + 10: &to10 1.0 + 11: &to11 1.0 + 12: &to12 1.0 + +LOG: + 1: &log1 4.8 + 2: &log2 4.8 + 3: &log3 4.8 + 4: &log4 4.8 + 5: &log5 4.8 + 6: &log6 4.8 + 7: &log7 4.8 + 8: &log8 4.8 + 9: &log9 4.8 + 10: &log10 4.8 + 11: &log11 4.8 + 12: &log12 4.8 + +EOG: + 1: &eog1 3.0 + 2: &eog2 3.0 + 3: &eog3 3.0 + 4: &eog4 3.0 + 5: &eog5 3.0 + 6: &eog6 3.0 + 7: &eog7 3.0 + 8: &eog8 3.0 + 9: &eog9 3.0 + 10: &eog10 3.0 + 11: &eog11 3.0 + 12: &eog12 3.0 + +TOG: + 1: &tog1 0.8 + 2: &tog2 0.8 + 3: &tog3 0.8 + 4: &tog4 0.8 + 5: &tog5 0.8 + 6: &tog6 0.8 + 7: &tog7 0.8 + 8: &tog8 0.8 + 9: &tog9 0.8 + 10: &tog10 0.8 + 11: &tog11 0.8 + 12: &tog12 0.8 + +LG: + 1: &lg1 1.0 + 2: &lg2 1.0 + 3: &lg3 1.0 + 4: &lg4 1.0 + 5: &lg5 1.0 + 6: &lg6 1.0 + 7: &lg7 1.0 + 8: &lg8 1.0 + 9: &lg9 1.0 + 10: &lg10 1.0 + 11: &lg11 1.0 + 12: &lg12 1.0 + +EG: + 1: &eg1 1.3 + 2: &eg2 1.3 + 3: &eg3 1.3 + 4: &eg4 1.3 + 5: &eg5 1.3 + 6: &eg6 1.3 + 7: &eg7 1.3 + 8: &eg8 1.3 + 9: &eg9 1.3 + 10: &eg10 1.3 + 11: &eg11 1.3 + 12: &eg12 1.3 + +TG: + 1: &tg1 1.3 + 2: &tg2 1.3 + 3: &tg3 1.3 + 4: &tg4 1.3 + 5: &tg5 1.3 + 6: &tg6 1.3 + 7: &tg7 1.3 + 8: &tg8 1.3 + 9: &tg9 1.3 + 10: &tg10 1.3 + 11: &tg11 1.3 + 12: &tg12 1.3 + diff --git a/tests/data/yml/drogon/input/_relperm_truth.yml b/tests/data/yml/drogon/input/_relperm_truth.yml new file mode 100644 index 0000000..05867f9 --- /dev/null +++ b/tests/data/yml/drogon/input/_relperm_truth.yml @@ -0,0 +1,266 @@ +# +# relperm definitions to be accessed via YAML/Python +# +# rnyb Apr 20, all relperm variables given as dict +# where key = satnum number + + +#--------------------------------- +# relperm endpoints and LET exponents +#--------------------------------- + +KRWEND: + 1: &krwend1 0.9 #~ + 2: &krwend2 0.9 #~ + 3: &krwend3 0.9 #~ + 4: &krwend4 0.9 #~ + 5: &krwend5 0.9 #~ + 6: &krwend6 0.9 #~ + 7: &krwend7 0.5 #~ + 8: &krwend8 0.5 #~ + 9: &krwend9 0.5 #~ + 10: &krwend10 0.5 #~ + 11: &krwend11 0.5 #~ + 12: &krwend12 0.5 #~ + +SORW: + 1: &sorw1 0.15 #~ + 2: &sorw2 0.15 #~ + 3: &sorw3 0.15 #~ + 4: &sorw4 0.15 #~ + 5: &sorw5 0.15 #~ + 6: &sorw6 0.15 #~ + 7: &sorw7 0.15 #~ + 8: &sorw8 0.15 #~ + 9: &sorw9 0.15 #~ + 10: &sorw10 0.15 #~ + 11: &sorw11 0.15 #~ + 12: &sorw12 0.15 #~ + +SORG: + 1: &sorg1 0.10 #~ + 2: &sorg2 0.10 #~ + 3: &sorg3 0.10 #~ + 4: &sorg4 0.10 #~ + 5: &sorg5 0.10 #~ + 6: &sorg6 0.10 #~ + 7: &sorg7 0.10 #~ + 8: &sorg8 0.10 #~ + 9: &sorg9 0.10 #~ + 10: &sorg10 0.10 #~ + 11: &sorg11 0.10 #~ + 12: &sorg12 0.10 #~ + +SGCR: + 1: &sgcr1 0.05 #~ + 2: &sgcr2 0.05 #~ + 3: &sgcr3 0.05 #~ + 4: &sgcr4 0.05 #~ + 5: &sgcr5 0.05 #~ + 6: &sgcr6 0.05 #~ + 7: &sgcr7 0.05 #~ + 8: &sgcr8 0.05 #~ + 9: &sgcr9 0.05 #~ + 10: &sgcr10 0.05 #~ + 11: &sgcr11 0.05 #~ + 12: &sgcr12 0.05 #~ + +KRGEND: + 1: &krgend1 0.95 #~ + 2: &krgend2 0.95 #~ + 3: &krgend3 0.95 #~ + 4: &krgend4 0.95 #~ + 5: &krgend5 0.95 #~ + 6: &krgend6 0.95 #~ + 7: &krgend7 0.95 #~ + 8: &krgend8 0.95 #~ + 9: &krgend9 0.95 #~ + 10: &krgend10 0.95 #~ + 11: &krgend11 0.95 #~ + 12: &krgend12 0.95 #~ + +# swl is calculated at a specified height, SWLHEIGHT, above the FWL +# swcr_add is a constant added to swl to achive swcr +# swcr is defined as follows: swcr=swl+swcr_add +SWCR_ADD: + 1: &swcr_add 0.01 #~ + 2: *swcr_add + 3: *swcr_add + 4: *swcr_add + 5: *swcr_add + 6: *swcr_add + 7: *swcr_add + 8: *swcr_add + 9: *swcr_add + 10: *swcr_add + 11: *swcr_add + 12: *swcr_add + +LW: + 1: &lw1 3.8 #~ + 2: &lw2 3.8 #~ + 3: &lw3 3.8 #~ + 4: &lw4 3.8 #~ + 5: &lw5 3.8 #~ + 6: &lw6 3.8 #~ + 7: &lw7 3.8 #~ + 8: &lw8 3.8 #~ + 9: &lw9 3.8 #~ + 10: &lw10 3.8 #~ + 11: &lw11 3.8 #~ + 12: &lw12 3.8 #~ + +EW: + 1: &ew1 2.5 #~ + 2: &ew2 2.5 #~ + 3: &ew3 2.5 #~ + 4: &ew4 2.5 #~ + 5: &ew5 2.5 #~ + 6: &ew6 2.5 #~ + 7: &ew7 2.5 #~ + 8: &ew8 2.5 #~ + 9: &ew9 2.5 #~ + 10: &ew10 2.5 #~ + 11: &ew11 2.5 #~ + 12: &ew12 2.5 #~ + +TW: + 1: &tw1 0.9 #~ + 2: &tw2 0.9 #~ + 3: &tw3 0.9 #~ + 4: &tw4 0.9 #~ + 5: &tw5 0.9 #~ + 6: &tw6 0.9 #~ + 7: &tw7 0.9 #~ + 8: &tw8 0.9 #~ + 9: &tw9 0.9 #~ + 10: &tw10 0.9 #~ + 11: &tw11 0.9 #~ + 12: &tw12 0.9 #~ + +LO: + 1: &lo1 2.8 #~ + 2: &lo2 2.8 #~ + 3: &lo3 2.8 #~ + 4: &lo4 2.8 #~ + 5: &lo5 2.8 #~ + 6: &lo6 2.8 #~ + 7: &lo7 2.8 #~ + 8: &lo8 2.8 #~ + 9: &lo9 2.8 #~ + 10: &lo10 2.8 #~ + 11: &lo11 2.8 #~ + 12: &lo12 2.8 #~ + +EO: + 1: &eo1 2.5 #~ + 2: &eo2 2.5 #~ + 3: &eo3 2.5 #~ + 4: &eo4 2.5 #~ + 5: &eo5 2.5 #~ + 6: &eo6 2.5 #~ + 7: &eo7 2.5 #~ + 8: &eo8 2.5 #~ + 9: &eo9 2.5 #~ + 10: &eo10 2.5 #~ + 11: &eo11 2.5 #~ + 12: &eo12 2.5 #~ + +TO: + 1: &to1 1.4 #~ + 2: &to2 1.4 #~ + 3: &to3 1.4 #~ + 4: &to4 1.4 #~ + 5: &to5 1.4 #~ + 6: &to6 1.4 #~ + 7: &to7 1.4 #~ + 8: &to8 1.4 #~ + 9: &to9 1.4 #~ + 10: &to10 1.4 #~ + 11: &to11 1.4 #~ + 12: &to12 1.4 #~ + +LOG: + 1: &log1 2.8 #~ + 2: &log2 2.8 #~ + 3: &log3 2.8 #~ + 4: &log4 2.8 #~ + 5: &log5 2.8 #~ + 6: &log6 2.8 #~ + 7: &log7 2.8 #~ + 8: &log8 2.8 #~ + 9: &log9 2.8 #~ + 10: &log10 2.8 #~ + 11: &log11 2.8 #~ + 12: &log12 2.8 #~ + +EOG: + 1: &eog1 3.4 #~ + 2: &eog2 3.4 #~ + 3: &eog3 3.4 #~ + 4: &eog4 3.4 #~ + 5: &eog5 3.4 #~ + 6: &eog6 3.4 #~ + 7: &eog7 3.4 #~ + 8: &eog8 3.4 #~ + 9: &eog9 3.4 #~ + 10: &eog10 3.4 #~ + 11: &eog11 3.4 #~ + 12: &eog12 3.4 #~ + +TOG: + 1: &tog1 1.3 #~ + 2: &tog2 1.3 #~ + 3: &tog3 1.3 #~ + 4: &tog4 1.3 #~ + 5: &tog5 1.3 #~ + 6: &tog6 1.3 #~ + 7: &tog7 1.3 #~ + 8: &tog8 1.3 #~ + 9: &tog9 1.3 #~ + 10: &tog10 1.3 #~ + 11: &tog11 1.3 #~ + 12: &tog12 1.3 #~ + +LG: + 1: &lg1 1.2 #~ + 2: &lg2 1.2 #~ + 3: &lg3 1.2 #~ + 4: &lg4 1.2 #~ + 5: &lg5 1.2 #~ + 6: &lg6 1.2 #~ + 7: &lg7 1.2 #~ + 8: &lg8 1.2 #~ + 9: &lg9 1.2 #~ + 10: &lg10 1.2 #~ + 11: &lg11 1.2 #~ + 12: &lg12 1.2 #~ + +EG: + 1: &eg1 1.2 #~ + 2: &eg2 1.2 #~ + 3: &eg3 1.2 #~ + 4: &eg4 1.2 #~ + 5: &eg5 1.2 #~ + 6: &eg6 1.2 #~ + 7: &eg7 1.2 #~ + 8: &eg8 1.2 #~ + 9: &eg9 1.2 #~ + 10: &eg10 1.2 #~ + 11: &eg11 1.2 #~ + 12: &eg12 1.2 #~ + +TG: + 1: &tg1 1.0 #~ + 2: &tg2 1.0 #~ + 3: &tg3 1.0 #~ + 4: &tg4 1.0 #~ + 5: &tg5 1.0 #~ + 6: &tg6 1.0 #~ + 7: &tg7 1.0 #~ + 8: &tg8 1.0 #~ + 9: &tg9 1.0 #~ + 10: &tg10 1.0 #~ + 11: &tg11 1.0 #~ + 12: &tg12 1.0 #~ + diff --git a/tests/data/yml/drogon/input/_rms_horizons.yml b/tests/data/yml/drogon/input/_rms_horizons.yml new file mode 100644 index 0000000..fe6461a --- /dev/null +++ b/tests/data/yml/drogon/input/_rms_horizons.yml @@ -0,0 +1,9 @@ +# +# All the static HORIZONS and ZONES definitions to be accessed via IPL or YAML/Python +# + +TOP_RES: + - TopVolantis + - TopTherys + - TopVolon + - BaseVolantis diff --git a/tests/data/yml/drogon/input/_rms_zones.yml b/tests/data/yml/drogon/input/_rms_zones.yml new file mode 100644 index 0000000..5ac9b8b --- /dev/null +++ b/tests/data/yml/drogon/input/_rms_zones.yml @@ -0,0 +1,8 @@ +# +# All the static HORIZONS and ZONES definitions to be accessed via YAML/Python +# + +ZONE_RES: &mainzns + - Valysar + - Therys + - Volon diff --git a/tests/data/yml/drogon/input/_seismic.yml b/tests/data/yml/drogon/input/_seismic.yml new file mode 100644 index 0000000..0204567 --- /dev/null +++ b/tests/data/yml/drogon/input/_seismic.yml @@ -0,0 +1,74 @@ +# NOTE: Cubes and names here would normally come from OpenWorks +# These would be placed on the project disk, outside the revision +# But in Drogon these are place on scratch to provide access in the courses + +# Data used for property modelling or to compare to seismic from geogrid +real_3d_path: "/scratch/fmu/share/drogon/modeldata/share/seismic/static/input" +real_3d_cropped_path: "/scratch/fmu/share/drogon/modeldata/share/seismic/static/21_0_0/cropped" +real_3d_depthconverted_path: "/scratch/fmu/share/drogon/modeldata/share/seismic/static/21_0_0/depthconverted" +3d_templatecube: "/scratch/fmu/share/drogon/modeldata/share/seismic/static/21_0_0/template/seismic_layout.segy" + +real_3d: + "18v": + ecldate: "20180101" + time: + amplitude_near: "owexport_ampl_near_time_2018.segy" + amplitude_far: "owexport_ampl_far_time_2018.segy" + relai_near: "owexport_rai_near_time_2018.segy" + relai_far: "owexport_rai_far_time_2018.segy" + +# Data used to compare with synthetic 4D seismic. Can be single vintages or difference cubes +# If single vintages are used as input, +# then difference cubes for relevant time intervals can be calculated in the workflow + +real_4d_path: "/scratch/fmu/share/drogon/modeldata/share/seismic/4d/input" +real_4d_cropped_path: "/scratch/fmu/share/drogon/modeldata/share/seismic/4d/21_0_0/cropped" +4d_templatecube: "/scratch/fmu/share/drogon/modeldata/share/seismic/4d/21_0_0/template/seismic_layout.sgy" + +real_4d: + "18h_18v": + ecldate: [2018-07-01, 2018-01-01] + time: + amplitude: "owexport_ampl_18h_18v.segy" + relai: "owexport_relai_18h_18v.segy" + + "19h_18v": + ecldate: [2019-07-01, 2018-01-01] + time: + amplitude: "owexport_ampl_19h_18v.segy" + relai: "owexport_relai_19h_18v.segy" + + "19h_18h": + ecldate: [2019-07-01, 2018-07-01] + time: + amplitude: "owexport_ampl_19h_18h.segy" + relai: "owexport_relai_19h_18h.segy" + + "20h_18v": + ecldate: [2020-07-01, 2018-01-01] + time: + amplitude: "owexport_ampl_20h_18v.segy" + relai: "owexport_relai_20h_18v.segy" + + "20h_19h": + ecldate: [2020-07-01, 2019-07-01] + time: + amplitude: "owexport_ampl_20h_19h.segy" + relai: "owexport_relai_20h_19h.segy" + +ATTRIBUTE_HORIZONS_4D: + - TopVolantis + - BaseVolantis + +ATTRIBUTE_HORIZONS_3D: + - TopVolantis + - TopTherys + - TopVolon + - BaseVolantis + +ZONES_4D: + valysar: ["topvolantis","toptherys"] + therys: ["toptherys", "topvolon"] + +ZONES_3D: + valysar: ["topvolantis","toptherys"] diff --git a/tests/data/yml/drogon/input/_stratigraphy.yml b/tests/data/yml/drogon/input/_stratigraphy.yml new file mode 100644 index 0000000..ac20239 --- /dev/null +++ b/tests/data/yml/drogon/input/_stratigraphy.yml @@ -0,0 +1,68 @@ +# This is stratigraphy metadata helper setup +# The key names are the modelling names used in RMS project (e.g. TopVolantis) while the "name" +# shall be the official SMDA name! + +#========================================================================================= +# tops + +MSL: + stratigraphic: False + name: MSL + +Seabase: + stratigraphic: False + name: Seabase + +TopVolantis: + stratigraphic: True + name: VOLANTIS GP. Top # this is the official DB name + # additional names, given for demo purpose: + alias: + - TopVOLANTIS + - TOP_VOLANTIS + stratigraphic_alias: + - TopValysar + - Valysar Fm. Top + +TopTherys: + stratigraphic: True + name: Therys Fm. Top + +TopVolon: + stratigraphic: True + name: Volon Fm. Top + +BaseVolon: + stratigraphic: True + name: Volon Fm. Base + +BaseVolantis: + stratigraphic: True + name: VOLANTIS GP. Base + +Mantle: + stratigraphic: False + name: Mantle + +#========================================================================================= +# zones/intervals + +Above: + stratigraphic: False + name: Above + +Valysar: + stratigraphic: True + name: Valysar Fm. + +Therys: + stratigraphic: True + name: Therys Fm. + +Volon: + stratigraphic: True + name: Volon Fm. + +Below: + stratigraphic: False + name: Below diff --git a/tests/data/yml/drogon/input/aps.yaml b/tests/data/yml/drogon/input/aps.yaml new file mode 100644 index 0000000..3e7b809 --- /dev/null +++ b/tests/data/yml/drogon/input/aps.yaml @@ -0,0 +1,41 @@ + APS: + facies_aps_volon: + APS_1_0_GF_GRF1_RESIDUAL_MAINRANGE: 900.0 ~ + APS_1_0_GF_GRF1_RESIDUAL_PERPRANGE: 200.0 ~ + APS_1_0_GF_GRF1_RESIDUAL_VERTRANGE: 5.0 ~ + APS_1_0_GF_GRF1_RESIDUAL_AZIMUTHANGLE: 5.0 ~ + APS_1_0_GF_GRF2_RESIDUAL_MAINRANGE: 1000.0 ~ + APS_1_0_GF_GRF2_RESIDUAL_PERPRANGE: 1000.0 ~ + APS_1_0_GF_GRF2_RESIDUAL_VERTRANGE: 5.0 ~ + APS_1_0_GF_GRF2_RESIDUAL_AZIMUTHANGLE: 0.0 ~ + APS_1_0_GF_GRF3_RESIDUAL_MAINRANGE: 800.0 ~ + APS_1_0_GF_GRF3_RESIDUAL_PERPRANGE: 800.0 ~ + APS_1_0_GF_GRF3_RESIDUAL_VERTRANGE: 1.0 ~ + APS_1_0_GF_GRF3_RESIDUAL_AZIMUTHANGLE: 0.0 ~ + + 900.0 + 200.0 + 5.0 + 5.0 +1000.0 +1000.0 + 5.0 + 0.0 + 800.0 + 800.0 + 1.0 + 0.0 + +facies_aps_volon_APS_1_0_GF_GRF1_RESIDUAL_MAINRANGE +facies_aps_volon_APS_1_0_GF_GRF1_RESIDUAL_PERPRANGE +facies_aps_volon_APS_1_0_GF_GRF1_RESIDUAL_VERTRANGE +facies_aps_volon_APS_1_0_GF_GRF1_RESIDUAL_AZIMUTHANGLE +facies_aps_volon_APS_1_0_GF_GRF2_RESIDUAL_MAINRANGE +facies_aps_volon_APS_1_0_GF_GRF2_RESIDUAL_PERPRANGE +facies_aps_volon_APS_1_0_GF_GRF2_RESIDUAL_VERTRANGE +facies_aps_volon_APS_1_0_GF_GRF2_RESIDUAL_AZIMUTHANGLE +facies_aps_volon_APS_1_0_GF_GRF3_RESIDUAL_MAINRANGE +facies_aps_volon_APS_1_0_GF_GRF3_RESIDUAL_PERPRANGE +facies_aps_volon_APS_1_0_GF_GRF3_RESIDUAL_VERTRANGE +facies_aps_volon_APS_1_0_GF_GRF3_RESIDUAL_AZIMUTHANGLE + diff --git a/tests/data/yml/drogon/input/global_master_config.yml b/tests/data/yml/drogon/input/global_master_config.yml new file mode 100644 index 0000000..5551e82 --- /dev/null +++ b/tests/data/yml/drogon/input/global_master_config.yml @@ -0,0 +1,687 @@ +######################################################################################### +# Master global config for Drogon +######################################################################################### + +revision: &revision 21.x.0.dev + +#======================================================================================== +# Global section +#======================================================================================== + + +global: + + dates: !include _dates.yml + seismic: !include _seismic.yml + + #------------------------------------------------------------------------------ + # Depth conversion velocity model alternatives, "alt0", "alt1" or "alt2" + # alt 1: contant V in overburden, constant V in Volantis + # alt 2: V = a*Tmap + b in overburden, constant V in Volantis (default) + #------------------------------------------------------------------------------ + DCONV_ALTERNATIVE: 2 ~ <> + + #------------------------------------------------------------------------------ + # Hum model mode: 0 PREDICTION, 1 SIMULATION + #------------------------------------------------------------------------------ + HUM_MODEL_MODE: 0 ~ <> + + #------------------------------------------------------------------------------ + # Facies model setup; + # 0 for using RMS common algorithms like belts, indicator etc + # 1 for using APS in all zones + #------------------------------------------------------------------------------ + FACIESMODEL_ALTERNATIVE: 1 ~ <> + + #------------------------------------------------------------------------------ + # Petrophysical model setup; + # 0 for simple, constant value per facies, + # 1 for standard multivariate analysis + #------------------------------------------------------------------------------ + PETROMODEL_ALTERNATIVE: 1 ~ <> + + #------------------------------------------------------------------------------ + # Seismic conditioning + # used in "switches_for_facies.py" (workflow: facies_basic + # used in ""switch for valysar_seiscond.py (workflow: facies_aps) + FACIES_VALYSAR_SEISCOND: 1 ~ <> # if 0 don't condition on seismic + #------------------------------------------------------------------------------ + + + #------------------------------------------------------------------------------ + # Gridmodel names + #------------------------------------------------------------------------------ + GEOGRIDNAME: Geogrid # sampling properties from individual zones. Modelling of saturations ++ + SIMGRIDNAME: Simgrid + ECLGRIDNAME: Eclipsegrid + GEOGRIDNAME_VALYSAR: Geogrid_Valysar # for modelling in Valysar + GEOGRIDNAME_THERYS: Geogrid_Vherys # for modelling in therys + GEOGRIDNAME_VOLON: Geogrid_Volon # for modelling in volon + ECLGRIDNAME_PRED: Eclipsegrid_pred # for prediction well planning + ECLGRIDNAME_PEM: Eclipsegrid_pem # for pem on eclipse grid + GEOGRIDNAME_PEM: Geogrid_pem # for pem on geo grid + SIMGRIDNAME_MAPS4AHM: Simgrid_maps4ahm # for preparing 4D maps for use as obs in AHM in ERT + GEOGRID_VALYSAR_SEISCOND: Geogrid_Valysar_seiscondtest # for demo examples of alterantive seismic conditioning methods + + #------------------------------------------------------------------------------ + # Simgrid active cells manipulation + #------------------------------------------------------------------------------ + + # ||rms: set_poro2zero_if_below_minpv.py|| + # set simgrid porosity to zero for cells with small porv (--> inactivated by Eclipse) + # minpv value is relative to a 100x100 cell (will be scaled to each cells dx*dy) + SIMGRID_MINPV: 100.0 ~ + + # ||rms: set_poro2zero_outside_area_of_interest.py|| + # 0 = do nothing + # 1 = set simgrid porosity to zero for cells outside area of interest + # outside area is defined as eqlnum 7 + SIMGRID_AREA_OF_INTEREST: 0 + + #------------------------------------------------------------------------------ + # Regions and contacts + #------------------------------------------------------------------------------ + + # this shows and example of a composite YAML which is easy in Python, but + # almost impossible with IPL. + REGIONS: + WestLowland: + NUM: 1 # region number + OWC: 1660.0 + FWL: 1660.0 + GOC: 1000.0 + COL: (238, 221, 130) # RGB color for RMS + EQT: 0 # EQUIL_TYPE (N value) + BO: 1.434 # Oil formation volume factor (rm3/sm3), used with rms volumetrics + RS: 140.8 # Gas oil ratio (sm3/sm3), used with rms volumetrics and 3d pem workflow + BG: 0.0043 # Gas formation volume factor (rm3/sm3), used with rms volumetrics + RV: 0.000153 # Liquid gas ratio (sm3/sm3), used with rms volumetrics + CentralSouth: + NUM: 2 + OWC: 1677.0 ~ + FWL: 1677.0 ~ + GOC: 1000.0 + EQT: 0 + COL: (105, 89, 205) + BO: 1.434 + RS: 140.8 + BG: 0.0043 + RV: 0.000153 + CentralNorth: + NUM: 3 + OWC: 1677.0 ~ + FWL: 1677.0 ~ + GOC: 1000.0 + EQT: 0 + COL: (238, 121, 159) + BO: 1.434 + RS: 140.8 + BG: 0.0043 + RV: 0.000153 + NorthHorst: + NUM: 4 + OWC: 1660.0 ~ + FWL: 1660.0 ~ + GOC: 1640.0 ~ + EQT: 0 + COL: (193, 255, 193) + BO: 1.628 + RS: 195.9 + BG: 0.0043 + RV: 0.000153 + CentralRamp: + NUM: 5 + OWC: 1677.0 ~ + FWL: 1677.0 ~ + GOC: 1000.0 + EQT: 0 + COL: (83, 134, 139) + BO: 1.434 + RS: 140.8 + BG: 0.0043 + RV: 0.000153 + CentralHorst: + NUM: 6 + OWC: 1677.0 ~ + FWL: 1677.0 ~ + GOC: 1000.0 + EQT: 0 + COL: (102, 205, 170) + BO: 1.434 + RS: 140.8 + BG: 0.0043 + RV: 0.000153 + EastLowland: + NUM: 7 + OWC: 1660.0 + FWL: 1660.0 + GOC: 1000.0 + EQT: 0 + COL: (39, 64, 139) + BO: 1.434 + RS: 140.8 + BG: 0.0043 + RV: 0.000153 + + # these are for example use *only*: + #FWL_EXAMPLE: !include _fwl_2dtable.yml + #FWL_BETTER_EXAMPLE: !include _fwl_dict.yml + + #------------------------------------------------------------------------------ + # Trend contour alternatives + # For all zones it is possible to run a simple uncertainty on input isochore + # trends, doing interpolation in 2 alterantive variants. The weight here is + # between 0 and 1 and is weight on alternative1, i.e. + # result = weight * alt1 + (1 - weight) * alt2 + #------------------------------------------------------------------------------ + + ISOTREND_ALT1W_VALYSAR: 0.9 ~ <> + ISOTREND_ALT1W_THERYS: 0.9 ~ <> + ISOTREND_ALT1W_VOLON: 0.5 ~ <> + + + #------------------------------------------------------------------------------ + # Facies + #------------------------------------------------------------------------------ + + # Facies codes with names + FACIES: &facies_code_names + 0: Floodplain + 1: Channel + 2: Crevasse + 5: Coal + 6: Calcite + 10: Offshore + 11: Lowershoreface + 12: Uppershoreface + + # Facies per zone + FACIES_ZONE: + Valysar: + 0: Floodplain + 1: Channel + 2: Crevasse + 5: Coal + Therys: + 6: Calcite + 10: Offshore + 11: Lowershoreface + 12: Uppershoreface + Volon: + 0: Floodplain + 1: Channel + 6: Calcite + + + #------------------------------------------------------------------------------ + # Facies settings + # Only used when FACIESMODEL_ALTERNATIVE = 0 + #------------------------------------------------------------------------------ + + # Therys facies job alternatives - alt1=Indicators, alt2=Belts + # used in "switches_for_facies.py" (workflow: facies_basic) + FACIES_THERYS_ALT2: 1 ~ <> # if 1 use facies model alt2 + + # Channels in Valysar + # used in "modify_job_facies_valysar_*.py" (workflow: facies_basic) + VALYSAR_CHANNEL_AZIMUTH: 70.0 ~ + VALYSAR_CHANNEL_WIDTH: 700.0 ~ + VALYSAR_CHANNEL_VOLFRAC: 0.6 ~ + + # Floodplain in Volon + # used in "modify_job_facies_volon.py" (workflow: facies_basic) + VOLON_FLOODPLAIN_AZIMUTH: 0.0 ~ + VOLON_FLOODPLAIN_VARIOGRAM_RANGE_PARALLEL: 800.0 ~ + VOLON_FLOODPLAIN_VARIOGRAM_RANGE_NORMAL: 200.0 ~ + VOLON_FLOODPLAIN_VOLFRAC: 0.3 ~ + + + #------------------------------------------------------------------------------ + # Simple property model - constant values per facies for each zone (subgrid) + # Only used when PETROMODEL_ALTERNATIVE = 0 + #------------------------------------------------------------------------------ + + # used in + # 1) "props_const_per_facies_valysar.py", etc (workflow: "facies_props_simple") + CONST_PROPS: + Valysar: + PORO: + Floodplain: 0.1 + Channel: 0.27 ~ + Crevasse: 0.22 ~ + Coal: 0.0 + PERMH: + Floodplain: 1.0 + Channel: 1000.0 ~ + Crevasse: 100.0 ~ + Coal: 0.0 + Therys: + PORO: + Offshore: 0.1 + Lowershoreface: 0.23 ~ + Uppershoreface: 0.31 ~ + Calcite: 0.0 + PERMH: + Offshore: 2.0 + Lowershoreface: 40.0 ~ + Uppershoreface: 1200.0 ~ + Calcite: 0.0 + Volon: + PORO: + Floodplain: 0.13 + Channel: 0.20 ~ + Calcite: 0.0 + PERMH: + Floodplain: 1.0 + Channel: 1100.0 ~ + Calcite: 0.0 + + #------------------------------------------------------------------------------ + # KvKh per facies code + #------------------------------------------------------------------------------ + + # used in + # 1) create_kv.py (workflow: facies_props_simple) + KVKH: + 0: 0.1 + 1: 0.6 ~ + 2: 0.3 ~ + 5: 0.1 + 6: 0.1 + 10: 0.5 + 11: 0.7 ~ + 12: 0.6 ~ + + #----------------------------------------- + # geo water saturation model, j-function a, b and swirr values + #----------------------------------------- + + # used in + # 1) swinit_oil (workflow: make_sw) + # 2) swinit_gas (workflow: make_sw) + + # WARNING: current RMS set-up does not read these values ; manually entered in jobs + + # JFUNC settings per facies. NB Facies names must be exact same as in FACIES + JFUNCTIONS: + Floodplain: + AOIL: &aoilfl 30.0 #~ + BOIL: &boilfl -6.0 #~ + SWIRROIL: &swirroilfl 0.2 #~ + AGAS: &agasfl 20.0 #~ + BGAS: &bgasfl -6.0 #~ + SWIRRGAS: &swirrgasfl 0.0 #~ + + Channel: + AOIL: &aoilch 4.5 #~ + BOIL: &boilch -2.2 #~ + SWIRROIL: &swirroilch 0.0 #~ + AGAS: &agasch 3.8 #~ + BGAS: &bgasch -1.9 #~ + SWIRRGAS: &swirrgasch 0.0 #~ + + Crevasse: + AOIL: &aoilcr 6.5 #~ + BOIL: &boilcr -3.3 #~ + SWIRROIL: &swirroilcr 0.0 #~ + AGAS: &agascr 7.5 #~ + BGAS: &bgascr -2.6 #~ + SWIRRGAS: &swirrgascr 0.0 #~ + + Coal: + AOIL: &aoilnr 100 + BOIL: &boilnr -20 + SWIRROIL: &swirroilnr 1.0 + AGAS: &agasnr 100 + BGAS: &bgasnr -20 + SWIRRGAS: &swirrgasnr 1.0 + + Calcite: + AOIL: *aoilnr + BOIL: *boilnr + SWIRROIL: *swirroilnr + AGAS: *agasnr + BGAS: *bgasnr + SWIRRGAS: *swirrgasnr + + Offshore: + AOIL: &aoilof 25.0 #~ + BOIL: &boilof -6.0 #~ + SWIRROIL: &swirroilof 0.2 #~ + AGAS: &agasof 8.0 #~ + BGAS: &bgasof -7.0 #~ + SWIRRGAS: &swirrgasof 0.2 #~ + + Uppershoreface: + AOIL: &aoilus 4.5 #~ + BOIL: &boilus -2.2 #~ + SWIRROIL: &swirroilus 0.0 #~ + AGAS: &agasus 3.8 #~ + BGAS: &bgasus -1.9 #~ + SWIRRGAS: &swirrgasus 0.0 #~ + + Lowershoreface: + AOIL: &aoills 6.5 #~ + BOIL: &boills -3.3 #~ + SWIRROIL: &swirroills 0.1 #~ + AGAS: &agasls 5.8 #~ + BGAS: &bgasls -2.6 #~ + SWIRRGAS: &swirrgasls 0.1 #~ + + #------------------------------------------------------------------------------ + # Input for APS jobs + #------------------------------------------------------------------------------ + APS: + facies_aps_valysar: + APS_1_0_GF_GRF1_RESIDUAL_MAINRANGE: 2000.0 ~ + APS_1_0_GF_GRF1_RESIDUAL_PERPRANGE: 400.0 ~ + APS_1_0_GF_GRF1_RESIDUAL_VERTRANGE: 5.0 ~ + APS_1_0_GF_GRF1_RESIDUAL_AZIMUTHANGLE: 70.0 ~ + APS_1_0_GF_GRF2_RESIDUAL_MAINRANGE: 1000.0 ~ + APS_1_0_GF_GRF2_RESIDUAL_PERPRANGE: 1000.0 ~ + APS_1_0_GF_GRF2_RESIDUAL_VERTRANGE: 5.0 ~ + APS_1_0_GF_GRF2_RESIDUAL_AZIMUTHANGLE: 70.0 ~ + APS_1_0_GF_GRF3_RESIDUAL_MAINRANGE: 1000.0 ~ + APS_1_0_GF_GRF3_RESIDUAL_PERPRANGE: 1000.0 ~ + APS_1_0_GF_GRF3_RESIDUAL_VERTRANGE: 5.0 ~ + APS_1_0_GF_GRF3_RESIDUAL_AZIMUTHANGLE: 0.0 ~ + + facies_aps_therys_v2: + APS_1_0_GF_GRF1_RESIDUAL_MAINRANGE: 1000.0 ~ + APS_1_0_GF_GRF1_RESIDUAL_PERPRANGE: 6000.0 ~ + APS_1_0_GF_GRF1_RESIDUAL_VERTRANGE: 5.0 ~ + APS_1_0_GF_GRF1_TREND_AZIMUTH: 300.0 ~ + APS_1_0_GF_GRF1_TREND_STACKANGLE: 0.015 ~ + APS_1_0_GF_GRF2_RESIDUAL_MAINRANGE: 6000.0 ~ + APS_1_0_GF_GRF2_RESIDUAL_PERPRANGE: 1000.0 ~ + APS_1_0_GF_GRF2_RESIDUAL_VERTRANGE: 5.0 ~ + APS_1_0_GF_GRF2_RESIDUAL_AZIMUTHANGLE: 10.0 ~ + APS_1_0_GF_GRF3_RESIDUAL_MAINRANGE: 1500.0 ~ + APS_1_0_GF_GRF3_RESIDUAL_PERPRANGE: 1500.0 ~ + APS_1_0_GF_GRF3_RESIDUAL_VERTRANGE: 1.0 ~ + APS_1_0_GF_GRF3_RESIDUAL_AZIMUTHANGLE: 10.0 ~ + + facies_aps_volon: + APS_1_0_GF_GRF1_RESIDUAL_MAINRANGE: 900.0 ~ + APS_1_0_GF_GRF1_RESIDUAL_PERPRANGE: 200.0 ~ + APS_1_0_GF_GRF1_RESIDUAL_VERTRANGE: 5.0 ~ + APS_1_0_GF_GRF1_RESIDUAL_AZIMUTHANGLE: 5.0 ~ + APS_1_0_GF_GRF2_RESIDUAL_MAINRANGE: 1000.0 ~ + APS_1_0_GF_GRF2_RESIDUAL_PERPRANGE: 1000.0 ~ + APS_1_0_GF_GRF2_RESIDUAL_VERTRANGE: 5.0 ~ + APS_1_0_GF_GRF2_RESIDUAL_AZIMUTHANGLE: 0.0 ~ + APS_1_0_GF_GRF3_RESIDUAL_MAINRANGE: 800.0 ~ + APS_1_0_GF_GRF3_RESIDUAL_PERPRANGE: 800.0 ~ + APS_1_0_GF_GRF3_RESIDUAL_VERTRANGE: 1.0 ~ + APS_1_0_GF_GRF3_RESIDUAL_AZIMUTHANGLE: 0.0 ~ + + #------------------------------------------------------------------------------ + # Satnum parameter related + #------------------------------------------------------------------------------ + + # creating satnum for eclipse involves 3 main steps: + # 1) create satnum parameter on geogrid + # 2) upscale satnum to simgrid + # 3) refine satnum by splitting it vertically based on sw value + # --> referenced as "upper" and "lower" + + # Satnum number and corresponding facies name + # used to create satnum parameter on geogrid (rms: satnum_geo.py) + # [define as dict where key=satnum_number and value=facies_name(s)] + SATNUM_FACIES_MAPPING: + 0: Coal, Calcite + 1: Channel + 2: Crevasse + 3: Uppershoreface + 4: Lowershoreface + 5: Offshore + 6: Floodplain + + # upscaled satnum will be split in 2 vertically (rms: satnum_sim.py) + # Satnum split criteria is given as sw fraction + # [define as dict where key = satnum number and value = sw split value] + SATNUM_SPLIT_SW: + 1: 0.3 # Channel + 2: 0.3 # Crevasse + 3: 0.3 # Uppershoreface + 4: 0.3 # Lowershoreface + 5: 0.3 # Offshore + 6: 0.3 # Floodplain + + # resulting satnum values: + # Channel: upper = 1, lower = 7 + # Crevasse: upper = 2, lower = 8 + # Uppershoreface: upper = 3, lower = 9 + # Lowershoreface: upper = 4, lower = 10 + # Offshore: upper = 5, lower = 11 + # Floodplain: upper = 6, lower = 12 + # Coal&Calcite (non-reservoir): set to satnum=0 and inactivate + + #------------------------------------------------------------------------------ + # Eclipse relperm and pc related + # --> used by rms:prepare_pyscal_input.py + #------------------------------------------------------------------------------ + + # satnum comments + SATNUM_COMMENT: + 0: "CalciteCoal" + 1: "Channel_upper" + 2: "Crevasse_upper" + 3: "Uppershoreface_upper" + 4: "Lowershoreface_upper" + 5: "Offshore_upper" + 6: "Floodplain_upper" + 7: "Channel_lower" + 8: "Crevasse_lower" + 9: "Uppershoreface_lower" + 10: "Lowershoreface_lower" + 11: "Offshore_lower" + 12: "Floodplain_lower" + + # reference perm used in pc calc, one value per satnum + PERMREF: + 1: &permrefch 1050.0 ~ + 2: &permrefcr 100.0 ~ + 3: &permrefus 1200.0 ~ + 4: &permrefls 40.0 ~ + 5: &permrefof 2.0 ~ + 6: &permreffl 1.0 ~ + 7: *permrefch + 8: *permrefcr + 9: *permrefus + 10: *permrefls + 11: *permrefof + 12: *permreffl + + # reference poro used in pc calc, one value per satnum + POROREF: + 1: &pororefch 0.24 ~ + 2: &pororefcr 0.22 ~ + 3: &pororefus 0.31 ~ + 4: &pororefls 0.23 ~ + 5: &pororefof 0.10 ~ + 6: &pororeffl 0.13 ~ + 7: *pororefch + 8: *pororefcr + 9: *pororefus + 10: *pororefls + 11: *pororefof + 12: *pororeffl + + # a values in rms simplified J (use same values as input to geo sw) + AVALUE: + 1: *aoilch + 2: *aoilcr + 3: *aoilus + 4: *aoills + 5: *aoilof + 6: *aoilfl + 7: *aoilch + 8: *aoilcr + 9: *aoilus + 10: *aoills + 11: *aoilof + 12: *aoilfl + + # b values in rms simplified J (use same values as input to geo sw) + BVALUE: + 1: *boilch + 2: *boilcr + 3: *boilus + 4: *boills + 5: *boilof + 6: *boilfl + 7: *boilch + 8: *boilcr + 9: *boilus + 10: *boills + 11: *boilof + 12: *boilfl + + # swirr used in simplified J equation (use same values as input to geo sw) + # (asymptotic value; higher values will shift curves towards higher sw) + SWIRR: + 1: *swirroilch + 2: *swirroilcr + 3: *swirroilus + 4: *swirroills + 5: *swirroilof + 6: *swirroilfl + 7: *swirroilch + 8: *swirroilcr + 9: *swirroilus + 10: *swirroills + 11: *swirroilof + 12: *swirroilfl + + # Used for EQUIL and PEM workflows + REF_DEPTH: 1750 + REF_PRESSURE: 310.0 + + # Densities at res cond (rough "average" estimate) + # Used in RMS: + # - J to Pcow conversion (prepare_pyscal_input.py) + # - Compute initial pressure (compute_initial_pressure_etc_for_pem.py) + # - FWL_WG (make_contacts.py) + + DENSITY: + OIL: + 1: 0.68 + 2: 0.68 + 3: 0.68 + 4: 0.68 + 5: 0.68 + 6: 0.68 + 7: 0.68 + 8: 0.68 + 9: 0.68 + 10: 0.68 + 11: 0.68 + 12: 0.68 + + WATER: + 1: 0.97 + 2: 0.97 + 3: 0.97 + 4: 0.97 + 5: 0.97 + 6: 0.97 + 7: 0.97 + 8: 0.97 + 9: 0.97 + 10: 0.97 + 11: 0.97 + 12: 0.97 + + GAS: + 1: 0.267 + 2: 0.267 + 3: 0.267 + 4: 0.267 + 5: 0.267 + 6: 0.267 + 7: 0.267 + 8: 0.267 + 9: 0.267 + 10: 0.267 + 11: 0.267 + 12: 0.267 + + # for computing swl (swl = sw at swlheight). + # if gas cap is present, increase height to "compensate" for Pcow vs Pcgw difference + SWLHEIGHT: 350.0 ~ + + #--------------------------------- + # LET relperm exponents and endpoints + #--------------------------------- + + RELPERM_BASE: !include _relperm_base.yml + RELPERM_HIGH: !include _relperm_high.yml + RELPERM_LOW: !include _relperm_low.yml + + # relperm interpolation value + RELPERM_INT_WO: 0.0 ~ + RELPERM_INT_GO: 0.0 ~ + + + #--------------------------------- + # Fault seal + #--------------------------------- + + # Curve scaling factor for faultzone perm vs SGR + FAULT_SEAL_SCALING: 1.0 ~ + + + #--------------------------------- + # PEM related + #--------------------------------- + + VPCARB: 4472 + VSCARB: 2766 + DENSCARB: 2710 + + VPCOAL: 2160 + VSCOAL: 870 + DENSCOAL: 1750 + + +#======================================================================================= +# RMS IPL section +# The "rms" in fmuconfig is magic in the sense that special processing is done e.g. to +# convert YAML to RMS IPL when we have a mix of IPL and Python. +# +# Since there are no IPL's in Drogon, this section is small. Instead collect the RMS +# under "global" (or "rms2") which is more general YAML that can be parsed +# directly in Python. But "rms" used for special categories as listed below. +#======================================================================================= +rms: + horizons: !include _rms_horizons.yml + zones: !include _rms_zones.yml + + +#======================================================================================== +# The model, masterdata and visuals sections, to be used for SUMO metadata. +#======================================================================================== + +model: + name: ff + revision: *revision + +masterdata: !include _masterdata.yml +access: !include _access.yml +stratigraphy: !include _stratigraphy.yml + + +#======================================================================================== +# Experimental +# Here are *very technical* switches that are purely related to the simplification or +# dataio/sumo projects that are still under development. Normal fields should skip this +# part! +# Contact JRIV for details +#======================================================================================== + +experimental: + + # determine if e.g. seismic "pre" data are written from fmu.dataio as observation per + # realization, or as preprocessed on case level! + FMU_CONTEXT: "realization" # alternative is "preprocessed" diff --git a/tests/data/yml/drogon/input/global_master_config_pred.yml b/tests/data/yml/drogon/input/global_master_config_pred.yml new file mode 100644 index 0000000..0c06a1f --- /dev/null +++ b/tests/data/yml/drogon/input/global_master_config_pred.yml @@ -0,0 +1,48 @@ +######################################################################################### +# Master global config for Drogon +######################################################################################### +revision: &revision dev +#======================================================================================== +# Global section +#======================================================================================== + + +global: + + dates: !include _dates_pred.yml + seismic: !include _seismic.yml + + + #------------------------------------------------------------------------------ + # Gridmodel names + #------------------------------------------------------------------------------ + GEOGRIDNAME: Geogrid + SIMGRIDNAME: Simgrid + ECLGRIDNAME: Eclipsegrid + ECLGRIDNAME_PEM: Eclipsegrid_pem # for pem on eclipse grid + GEOGRIDNAME_PEM: Geogrid_pem # for pem on geo grid + SIMGRIDNAME_MAPS4AHM: Simgrid_maps4ahm # for preparing 4D maps for use as obs in AHM in ERT#======================================================================================= +# RMS IPL section +# The "rms" in fmuconfig is magic in the sense that special processing is done e.g. to +# convert YAML to RMS IPL when we have a mix of IPL and Python. +# +# Since there are no IPL's in Drogon, this section is small. Instead collect the RMS +# under "global" (or "rms2") which is more general YAML that can be parsed +# directly in Python. But "rms" used for special categories as listed below. +#======================================================================================= +rms: + horizons: !include _rms_horizons.yml + zones: !include _rms_zones.yml + + +#======================================================================================== +# The model, masterdata and visuals sections, to be used for SUMO metadata. +#======================================================================================== + +model: + name: ff + revision: *revision + +masterdata: !include _masterdata.yml +access: !include _access.yml +stratigraphy: !include _stratigraphy.yml diff --git a/tests/test_config_functions.py b/tests/test_config_functions.py index c1e4bdc..f81634b 100644 --- a/tests/test_config_functions.py +++ b/tests/test_config_functions.py @@ -81,7 +81,6 @@ def test_ipl_cast_value(): def test_free_form_handle_entry(): - decl, expr = _freeform_handle_entry("MYVAR", 2, None, "int", False) assert decl == "Int MYVAR\n" assert expr == "MYVAR = 2\n" diff --git a/tests/test_etc.py b/tests/test_etc.py index b8989ac..570b47a 100644 --- a/tests/test_etc.py +++ b/tests/test_etc.py @@ -2,8 +2,11 @@ import os import pytest +import yaml +from yaml.constructor import ConstructorError from fmu.config import etc +from fmu.config import utilities as util fmux = etc.Interaction() logger = fmux.basiclogger(__name__) @@ -11,6 +14,8 @@ logger.info("Running tests...") +DROGON = "tests/data/yml/drogon/input/global_master_config.yml" + # always this statement if not fmux.testsetup(): raise SystemExit() @@ -88,3 +93,36 @@ def test_user_msg(): fmux.warning("This is also a warning") fmux.error("This is an error") fmux.critical("This is a critical error", sysexit=False) + + +def test_load_input_extended_yaml(): + """Test loading YAML will extended "fmu" option.""" + cfg = util.yaml_load(DROGON, loader="fmu") + + assert cfg["revision"] == "21.x.0.dev" + assert ( + cfg["masterdata"]["smda"]["coordinate_system"]["uuid"] + == "ad214d85-dac7-19da-e053-c918a4889309" + ) + + +def test_load_input_extended_yaml_shallfail(): + """Test loading non-standard YAML which shall fail when allow_extended is False.""" + with pytest.raises(ConstructorError, match=r"!include"): + _ = util.yaml_load(DROGON, loader="standard") + + +def test_load_yaml_compare(tmp_path): + """Test loading YAML and compare results with/without allow_extended.""" + + cfg = util.yaml_load(DROGON, loader="fmu") + + yfile = tmp_path / "drogon.yml" + with open(yfile, "w", encoding="utf-8") as stream: + yaml.dump(cfg, stream, allow_unicode=True) + + # read a standard YAML file both with normal and extended option + cfg1 = util.yaml_load(yfile, loader="fmu") + cfg2 = util.yaml_load(yfile, loader="standard") + + assert cfg1 == cfg2