Skip to content

Commit

Permalink
ENH: Add fmu.realization.is_reference to schema
Browse files Browse the repository at this point in the history
  • Loading branch information
tnatt committed Oct 8, 2024
1 parent 9dec59d commit 0d80677
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
13 changes: 13 additions & 0 deletions schema/definitions/0.8.0/schema/fmu_results.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"fmu.iteration.uuid",
"fmu.model",
"fmu.realization.id",
"fmu.realization.is_reference",
"fmu.realization.name",
"fmu.realization.uuid",
"fmu.workflow",
Expand Down Expand Up @@ -6140,6 +6141,18 @@
"title": "Id",
"type": "integer"
},
"is_reference": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Reference"
},
"jobs": {
"anyOf": [
{},
Expand Down
15 changes: 15 additions & 0 deletions src/fmu/dataio/_model/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,21 @@ class Realization(BaseModel):
"""The universally unique identifier for this realization. It is a hash of
``fmu.case.uuid`` and ``fmu.iteration.uuid`` and ``fmu.realization.id``."""

is_reference: Optional[bool] = Field(default=None)
"""
Flag used to determine if this realization is tagged as a reference.
Typically, a reference realization is one that includes prediction surfaces and
maintains all other input parameters at their default settings. However, caution
must be exercised when putting logic upon this field, as this is simply a selected
realization by the user and no guarantees of what the realization represents
can be made.
.. note::
Please note that users should not set this flag in the metadata upon export;
it is intended to be configured through interactions with the Sumo GUI.
"""


class CountryItem(BaseModel):
"""A single country in the ``smda.masterdata.country`` list of countries
Expand Down
1 change: 1 addition & 0 deletions src/fmu/dataio/_model/root.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ def dump() -> dict:
"fmu.iteration.uuid",
"fmu.model",
"fmu.realization.id",
"fmu.realization.is_reference",
"fmu.realization.name",
"fmu.realization.uuid",
"fmu.workflow",
Expand Down

0 comments on commit 0d80677

Please sign in to comment.