Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: include (fault) surfaces from FaultRoom plugin #492

Merged
merged 1 commit into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/datastructure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ Meta export datastructure
.. autopydantic_model:: fmu.dataio.datastructure.meta.specification.TableSpecification
:model-show-json: false

.. autopydantic_model:: fmu.dataio.datastructure.meta.specification.WellPointsDictionaryCaseSpecification
.. autopydantic_model:: fmu.dataio.datastructure.meta.specification.FaultRoomSurfaceSpecification
:model-show-json: false

.. autopydantic_model:: fmu.dataio.datastructure.meta.specification.WellPointsDictionaryCaseSpecification
:model-show-json: false
19 changes: 19 additions & 0 deletions docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,25 @@ Python script

|

Exporting a faultroom plugin result surface
-------------------------------------------

The FaultRoom plugin for RMS produces special json files that e.g. can be viewed with DynaGeo.


Python script
~~~~~~~~~~~~~

.. literalinclude:: ../examples/s/d/nn/xcase/realization-0/iter-0/rms/bin/export_faultroom_surfaces.py
:language: python

.. toggle::

.. literalinclude:: ../examples/s/d/nn/xcase/realization-0/iter-0/share/results/maps/volantis_gp_top--faultroom_d1433e1.json
:language: yaml

|

Using fmu-dataio for post-processed data
----------------------------------------

Expand Down
1 change: 1 addition & 0 deletions examples/run_examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export _ERT_RUNPATH=$current/examples/s/d/nn/xcase/realization-0/iter-0

python export_faultpolygons.py
python export_propmaps.py
python export_faultroom_surfaces.py

cd $current/examples/s/d/nn/xcase/realization-0/iter-0/any/bin

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
"""Export faultroom surfaces via dataio with metadata."""

import logging
from pathlib import Path

import fmu.dataio as dataio
from fmu.config import utilities as utils

logger = logging.getLogger(__name__)
logger.setLevel(logging.WARNING)

CFG = utils.yaml_load("../../fmuconfig/output/global_variables.yml")

# if running outside RMS using files that are stored e.g. on rms/output
FAULTROOM_FILE = Path("../output/faultroom/some_faultroom.json")


def export_faultroom_surface():
"""Export faultroom data, json files made by FaultRoom plugin in RMS"""

# read file and return a FaultRoomSurface instance
faultroom_object = dataio.readers.read_faultroom_file(FAULTROOM_FILE)

ed = dataio.ExportData(
config=CFG,
content="fault_properties",
unit="unset",
vertical_domain={"depth": "msl"},
is_prediction=True,
is_observation=False,
workflow="rms structural model",
tagname=faultroom_object.tagname,
)

ed.export(faultroom_object)


if __name__ == "__main__":
export_faultroom_surface()
Loading