Purpose of the issue is to describe dependencies and agree on some standards. I assume some (all?) of these must be baked into this code base.
- Position of template (model) metadata
- Position of ensemble metadata
- Behavior of reruns and restarts
- Awareness of FMU realization
- Behavior in template runs vs FMU runs
Prototype referred to: Johan Sverdrup implementation + existing Drogon temporary code.
Ensemble metadata
In prototype: <iter>\share\metadata\fmu_ensemble.yaml
on \scratch, on ensemble level.
Example: \scratch\osefax\peesv\mycase\share\iter-0\metadata\fmu_ensemble.yaml
This file is copied into each realization during runtime by ERT postsim hook workflow, placed under share\runinfo\fmu_ensemble.yaml
to contain each realization (avoid that realization goes out of itself to get data).
In prototype, ensemble metadata is handled by a completely separate script intended to be run through ERT workflows.
Suggestion ๐
Same as prototype, except suggest to embed ensemble metadata into the same code base as other metadata and use the same core functionality.
Reruns
In prototype, if ensemble metadata already exists, a sanity check is performed (same case name, etc). If sanity check passes, the existing ensemble metadata is kept, but an item is appended to the runs
block.
Suggestion ๐
Keep the general behavior as in the prototype. When ensemble metadata is first made, establish the metadata and put created
as the first item in events
. If metadata already exists, perform sanity check, then overwrite existing metadata. Keep the existing events
but append an updated
-item. (Suggest to use this behavior for all metadata!)
Location: the ensemble-level share
folder. For an iteration, this would be scratch\<asset>\<user>\<case>\<iter>\share\metadata\fmu_ensemble.yaml
.
Template metadata
In prototype: fmu_template.yaml
on revision root.
Example: \resmod\ff\21.0.0\users\user\21.0.0_mycopy\fmu_template.yaml
This file is copied into the realization during runtime, with the same location.
Suggestion ๐
Embed into global_variables
under a metadata
tag.
Read it during export jobs from already standard location of global_variables
.
Awareness of realization
Each realization must be aware of its own realization id, as this is part of the metadata.
In prototype: The realization is injected into global_variables
by an ERT FORWARD_JOB.
Example: fmu_realization: 41
Suggestion ๐
Continue to place it in global_variables
by a FORWARD_JOB, but follow the proposed metadata structure:
{realization: {id: 41}}
Template runs vs FMU runs
Must work both when running template directy (RMS GUI or other settings) and in FMU runs through ERT. In current prototype, the following behavior is used:
- In template runs, metadata without the
fmu_ensemble
block is produced. Realization
tag is exported, with value null
. These are not valid metadata according to standards, but can still be used for debugging.
- In batch runs, ensemble metadata is required. The code checks that ensemble metadata is present if realization is set.
realization |
ensemble metadata |
Behavior |
Description |
X |
|
FAIL |
Normal run, missing ensemble metadata |
|
X |
FAIL |
Normal run, missing realization |
X |
X |
OK |
Normal run |
|
|
OK |
Template run |