Skip to content

Commit

Permalink
FIX: Add support for content='transmissibilities'
Browse files Browse the repository at this point in the history
  • Loading branch information
tnatt committed Oct 7, 2024
1 parent 578ec03 commit dff8763
Show file tree
Hide file tree
Showing 3 changed files with 316 additions and 2 deletions.
308 changes: 308 additions & 0 deletions schema/definitions/0.8.0/schema/fmu_results.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@
{
"$ref": "#/$defs/TimeSeriesData"
},
{
"$ref": "#/$defs/TransmissibilitiesData"
},
{
"$ref": "#/$defs/VelocityData"
},
Expand Down Expand Up @@ -8864,6 +8867,311 @@
"title": "TracklogEvent",
"type": "object"
},
"TransmissibilitiesData": {
"description": "The ``data`` block contains information about the data contained in this object.\nThis class contains metadata for transmissibilities.",
"properties": {
"alias": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Alias"
},
"base": {
"anyOf": [
{
"$ref": "#/$defs/Layer"
},
{
"type": "null"
}
],
"default": null
},
"bbox": {
"anyOf": [
{
"$ref": "#/$defs/BoundingBox3D"
},
{
"$ref": "#/$defs/BoundingBox2D"
},
{
"type": "null"
}
],
"default": null,
"title": "Bbox"
},
"content": {
"const": "transmissibilities",
"enum": [
"transmissibilities"
],
"title": "Content",
"type": "string"
},
"description": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Description"
},
"domain_reference": {
"anyOf": [
{
"$ref": "#/$defs/DomainReference"
},
{
"type": "null"
}
],
"default": null,
"examples": [
"msl",
"sb",
"rkb"
]
},
"format": {
"examples": [
"irap_binary"
],
"title": "Format",
"type": "string"
},
"geometry": {
"anyOf": [
{
"$ref": "#/$defs/Geometry"
},
{
"type": "null"
}
],
"default": null
},
"grid_model": {
"anyOf": [
{
"$ref": "#/$defs/GridModel"
},
{
"type": "null"
}
],
"default": null
},
"is_observation": {
"title": "Is Observation",
"type": "boolean"
},
"is_prediction": {
"title": "Is Prediction",
"type": "boolean"
},
"layout": {
"anyOf": [
{
"$ref": "#/$defs/Layout"
},
{
"type": "null"
}
],
"default": null,
"examples": [
"regular",
"cornerpoint"
]
},
"name": {
"examples": [
"VIKING GP. Top"
],
"title": "Name",
"type": "string"
},
"offset": {
"default": 0.0,
"title": "Offset",
"type": "number"
},
"spec": {
"anyOf": [
{
"$ref": "#/$defs/CPGridPropertySpecification"
},
{
"$ref": "#/$defs/CPGridSpecification"
},
{
"$ref": "#/$defs/FaultRoomSurfaceSpecification"
},
{
"$ref": "#/$defs/PointSpecification"
},
{
"$ref": "#/$defs/CubeSpecification"
},
{
"$ref": "#/$defs/PolygonsSpecification"
},
{
"$ref": "#/$defs/SurfaceSpecification"
},
{
"$ref": "#/$defs/TableSpecification"
},
{
"type": "null"
}
],
"default": null,
"title": "Spec"
},
"stratigraphic": {
"title": "Stratigraphic",
"type": "boolean"
},
"stratigraphic_alias": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Stratigraphic Alias"
},
"table_index": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"examples": [
[
"ZONE",
"REGION"
]
],
"title": "Table Index"
},
"tagname": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"examples": [
"ds_extract_geogrid",
"ds_post_strucmod"
],
"title": "Tagname"
},
"time": {
"anyOf": [
{
"$ref": "#/$defs/Time"
},
{
"type": "null"
}
],
"default": null
},
"top": {
"anyOf": [
{
"$ref": "#/$defs/Layer"
},
{
"type": "null"
}
],
"default": null
},
"undef_is_zero": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Undef Is Zero"
},
"unit": {
"default": "",
"examples": [
"m"
],
"title": "Unit",
"type": "string"
},
"vertical_domain": {
"anyOf": [
{
"$ref": "#/$defs/VerticalDomain"
},
{
"type": "null"
}
],
"default": null,
"examples": [
"depth",
"time"
]
}
},
"required": [
"content",
"name",
"stratigraphic",
"format",
"is_observation",
"is_prediction"
],
"title": "TransmissibilitiesData",
"type": "object"
},
"User": {
"description": "The ``user`` block holds information about the user.",
"properties": {
Expand Down
1 change: 1 addition & 0 deletions src/fmu/dataio/_model/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,7 @@ class AnyData(RootModel):
ThicknessData,
TimeData,
TimeSeriesData,
TransmissibilitiesData,
VelocityData,
VolumesData,
WellPicksData,
Expand Down
9 changes: 7 additions & 2 deletions tests/test_units/test_contents.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,15 @@ def test_content_timeseries(dataframe, globalconfig2):
assert meta["data"]["content"] == "timeseries"


def test_content_transmissibilities(gridproperty, globalconfig2):
def test_content_transmissibilities(dataframe, globalconfig2):
"""Test export of the transmissibilities content."""
meta = ExportData(
config=globalconfig2,
name="MyName",
content="transmissibilities",
).generate_metadata(dataframe)

# not supported (?)
assert meta["data"]["content"] == "transmissibilities"


def test_content_velocity(regsurf, globalconfig2):
Expand Down

0 comments on commit dff8763

Please sign in to comment.