Skip to content

Commit

Permalink
REV: Set depth as default vertical_domain
Browse files Browse the repository at this point in the history
  • Loading branch information
tnatt committed Sep 25, 2024
1 parent 8d293da commit 05933ca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/fmu/dataio/dataio.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ class ExportData:
Note also: If missing or empty, export() may still be done, but without a
metadata file (this feature may change in future releases).
content: Optional, default is "depth". Is a string or a dictionary with one key.
content: Optional. Is a string or a dictionary with one key.
Example is "depth" or {"fluid_contact": {"xxx": "yyy", "zzz": "uuu"}}.
Content is checked agains a white-list for validation!
Expand Down Expand Up @@ -308,10 +308,10 @@ class ExportData:
[[20200101, "monitor"], [20180101, "base"]] or just [[2021010]]. The output
to metadata will from version 0.9 be different (API change)
vertical_domain: Optional. String with vertical domain either "time" or "depth".
It is also possible to provide a reference for the vertical scale, see the
domain_reference key. Note that if the ``content`` is "depth" or "time"
the vertical_domain will be set accordingly.
vertical_domain: Optional. String with vertical domain either "time" or "depth"
(default). It is also possible to provide a reference for the vertical scale,
see the domain_reference key. Note that if the ``content`` is "depth" or
"time" the vertical_domain will be set accordingly.
workflow: Short tag desciption of workflow (as description)
Expand Down Expand Up @@ -403,7 +403,7 @@ class ExportData:
timedata: Optional[List[list]] = None
unit: Optional[str] = ""
verbosity: str = "DEPRECATED" # remove in version 2
vertical_domain: Optional[Union[str, dict]] = None # dict input is deprecated
vertical_domain: Union[str, dict] = "depth" # dict input is deprecated
workflow: Optional[Union[str, Dict[str, str]]] = None # dict input is deprecated
table_index: Optional[list] = None

Expand Down
2 changes: 1 addition & 1 deletion tests/test_units/test_dataio.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ def test_vertical_domain(regsurf, globalconfig1):
mymeta = ExportData(config=globalconfig1, content="thickness").generate_metadata(
regsurf
)
assert "vertical_domain" not in mymeta["data"]
assert mymeta["data"]["vertical_domain"] == "depth" # default value
assert mymeta["data"]["domain_reference"] == "msl" # default value

# test invalid input
Expand Down

0 comments on commit 05933ca

Please sign in to comment.