Skip to content

Commit

Permalink
ENH: Add facies_thickness as content type (#465)
Browse files Browse the repository at this point in the history
  • Loading branch information
janbjorge authored Feb 9, 2024
1 parent 018c7c7 commit f4908a8
Show file tree
Hide file tree
Showing 4 changed files with 264 additions and 0 deletions.
257 changes: 257 additions & 0 deletions schema/definitions/0.8.0/schema/fmu_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
"discriminator": {
"mapping": {
"depth": "#/$defs/DepthContent",
"facies_thickness": "#/$defs/FaciesThicknessContent",
"fault_lines": "#/$defs/FaultLinesContent",
"field_outline": "#/$defs/FieldOutlineContent",
"field_region": "#/$defs/FieldRegionContent",
Expand Down Expand Up @@ -123,6 +124,9 @@
{
"$ref": "#/$defs/DepthContent"
},
{
"$ref": "#/$defs/FaciesThicknessContent"
},
{
"$ref": "#/$defs/FaultLinesContent"
},
Expand Down Expand Up @@ -1130,6 +1134,259 @@
"title": "FMUTimeObject",
"type": "object"
},
"FaciesThicknessContent": {
"properties": {
"content": {
"const": "facies_thickness",
"title": "Content"
},
"alias": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Alias"
},
"bbox": {
"anyOf": [
{
"$ref": "#/$defs/BoundingBox"
},
{
"type": "null"
}
],
"default": null
},
"description": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Description"
},
"format": {
"examples": [
"irap_binary"
],
"title": "Format",
"type": "string"
},
"grid_model": {
"anyOf": [
{
"$ref": "#/$defs/GridModel"
},
{
"type": "null"
}
],
"default": null
},
"is_observation": {
"title": "Is observation flag",
"type": "boolean"
},
"is_prediction": {
"title": "Is prediction flag",
"type": "boolean"
},
"layout": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"examples": [
"regular"
],
"title": "Layout"
},
"name": {
"description": "Name of the data object. If stratigraphic, match the entry in the stratigraphic column",
"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/CubeSpecification"
},
{
"$ref": "#/$defs/PolygonsSpecification"
},
{
"$ref": "#/$defs/SurfaceSpecification"
},
{
"$ref": "#/$defs/TableSpecification"
},
{
"$ref": "#/$defs/WellPointsDictionaryCaseSpecification"
},
{
"type": "null"
}
],
"default": null,
"title": "Spec"
},
"stratigraphic_alias": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Stratigraphic Alias"
},
"stratigraphic": {
"description": "True if data object represents an entity in the stratigraphic column",
"title": "Stratigraphic",
"type": "boolean"
},
"tagname": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A semi-human readable tag for internal usage and uniqueness",
"examples": [
"ds_extract_geogrid",
"ds_post_strucmod"
],
"title": "Tagname"
},
"time": {
"anyOf": [
{
"$ref": "#/$defs/Time"
},
{
"type": "null"
}
],
"default": null
},
"undef_is_zero": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Flag if undefined values are to be interpreted as zero",
"title": "Undef Is Zero"
},
"unit": {
"default": "",
"examples": [
"m"
],
"title": "Unit",
"type": "string"
},
"vertical_domain": {
"anyOf": [
{
"enum": [
"depth",
"time"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"examples": [
"depth"
],
"title": "Vertical Domain"
},
"base": {
"anyOf": [
{
"$ref": "#/$defs/Layer"
},
{
"type": "null"
}
],
"default": null
},
"top": {
"anyOf": [
{
"$ref": "#/$defs/Layer"
},
{
"type": "null"
}
],
"default": null
}
},
"required": [
"content",
"format",
"is_observation",
"is_prediction",
"name",
"stratigraphic"
],
"title": "FaciesThicknessContent",
"type": "object"
},
"FaultLinesContent": {
"properties": {
"content": {
Expand Down
1 change: 1 addition & 0 deletions schema/definitions/0.8.0/schema/fmu_results.json
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@
"description": "The contents of this data object",
"enum": [
"depth",
"facies_thickness",
"time",
"thickness",
"property",
Expand Down
5 changes: 5 additions & 0 deletions src/fmu/dataio/datastructure/meta/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ class DepthContent(Content):
depth_reference: Literal["msl", "sb", "rkb"]


class FaciesThicknessContent(Content):
content: Literal[enums.ContentEnum.facies_thickness]


class FaultLinesContent(Content):
content: Literal[enums.ContentEnum.fault_lines]

Expand Down Expand Up @@ -326,6 +330,7 @@ class AnyContent(RootModel):
root: Annotated[
Union[
DepthContent,
FaciesThicknessContent,
FaultLinesContent,
FieldOutlineContent,
FieldRegionContent,
Expand Down
1 change: 1 addition & 0 deletions src/fmu/dataio/datastructure/meta/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

class ContentEnum(str, Enum):
depth = "depth"
facies_thickness = "facies_thickness"
fault_lines = "fault_lines"
field_outline = "field_outline"
field_region = "field_region"
Expand Down

0 comments on commit f4908a8

Please sign in to comment.