.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "tutorials/ch1_fundamentals/ch1_4_onlap_relations.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_tutorials_ch1_fundamentals_ch1_4_onlap_relations.py: 1.4: Unconformity relationships =============================== .. GENERATED FROM PYTHON SOURCE LINES 6-8 .. code-block:: Python # sphinx_gallery_thumbnail_number = 2 .. GENERATED FROM PYTHON SOURCE LINES 9-10 Importing gempy .. GENERATED FROM PYTHON SOURCE LINES 10-19 .. code-block:: Python import gempy as gp import gempy_viewer as gpv # Aux imports import numpy as np import os np.random.seed(1515) .. GENERATED FROM PYTHON SOURCE LINES 20-22 We import a model from an existing folder, representing a subduction zone with onlap relationships. .. GENERATED FROM PYTHON SOURCE LINES 22-38 .. code-block:: Python data_path = os.path.abspath('../../') geo_model: gp.data.GeoModel = gp.create_geomodel( project_name='Onlap_relations', extent=[-200, 1000, -500, 500, -1000, 0], resolution=[50, 50, 50], refinement=6, importer_helper=gp.data.ImporterHelper( path_to_orientations=data_path + "/data/input_data/tut-ch1-4/tut_ch1-4_orientations.csv", path_to_surface_points=data_path + "/data/input_data/tut-ch1-4/tut_ch1-4_points.csv", ) ) gp.set_topography_from_random(grid=geo_model.grid, d_z=np.array([-600, -100])) .. rst-class:: sphx-glr-script-out .. code-block:: none Active grids: ['topography'] .. GENERATED FROM PYTHON SOURCE LINES 39-41 .. code-block:: Python gpv.plot_2d(geo_model) .. image-sg:: /tutorials/ch1_fundamentals/images/sphx_glr_ch1_4_onlap_relations_001.png :alt: Cell Number: mid Direction: y :srcset: /tutorials/ch1_fundamentals/images/sphx_glr_ch1_4_onlap_relations_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 44-45 Raw structural frame .. GENERATED FROM PYTHON SOURCE LINES 45-47 .. code-block:: Python geo_model.structural_frame .. raw:: html
Structural Groups: StructuralGroup:
Name:default_formation
Structural Relation:StackRelationType.ERODE
Elements:
StructuralElement:
Name:onlap_surface

StructuralElement:
Name:rock1

StructuralElement:
Name:rock2

StructuralElement:
Name:rock3

StructuralElement:
Name:seafloor
Fault Relations:
default_fo...
default_formation
True
False


.. GENERATED FROM PYTHON SOURCE LINES 48-89 .. code-block:: Python geo_model.transform.apply_anisotropy(gp.data.GlobalAnisotropy.NONE) gp.add_structural_group( model=geo_model, group_index=0, structural_group_name="seafloor_series", elements=[geo_model.structural_frame.get_element_by_name("seafloor")], structural_relation=gp.data.StackRelationType.ERODE, ) gp.add_structural_group( model=geo_model, group_index=1, structural_group_name="right_series", elements=[ geo_model.structural_frame.get_element_by_name("rock1"), geo_model.structural_frame.get_element_by_name("rock2"), ], structural_relation=gp.data.StackRelationType.ONLAP ) gp.add_structural_group( model=geo_model, group_index=2, structural_group_name="onlap_series", elements=[geo_model.structural_frame.get_element_by_name("onlap_surface")], structural_relation=gp.data.StackRelationType.ERODE ) gp.add_structural_group( model=geo_model, group_index=3, structural_group_name="left_series", elements=[geo_model.structural_frame.get_element_by_name("rock3")], structural_relation=gp.data.StackRelationType.BASEMENT ) gp.remove_structural_group_by_name(model=geo_model, group_name="default_formation") # Final structural frame geo_model.structural_frame .. raw:: html
Structural Groups: StructuralGroup:
Name:seafloor_series
Structural Relation:StackRelationType.ERODE
Elements:
StructuralElement:
Name:seafloor

StructuralGroup:
Name:right_series
Structural Relation:StackRelationType.ONLAP
Elements:
StructuralElement:
Name:rock1

StructuralElement:
Name:rock2

StructuralGroup:
Name:onlap_series
Structural Relation:StackRelationType.ERODE
Elements:
StructuralElement:
Name:onlap_surface

StructuralGroup:
Name:left_series
Structural Relation:StackRelationType.BASEMENT
Elements:
StructuralElement:
Name:rock3
Fault Relations:
seafloor_s...right_seri...onlap_seri...left_serie...
seafloor_series
right_series
onlap_series
left_series
True
False


.. GENERATED FROM PYTHON SOURCE LINES 90-92 .. code-block:: Python s = gp.compute_model(geo_model) .. rst-class:: sphx-glr-script-out .. code-block:: none Setting Backend To: AvailableBackends.numpy /home/leguark/gempy/gempy/core/data/geo_model.py:164: UserWarning: You are using refinement and passing a regular grid. The resolution of the regular grid will be overwritten warnings.warn( .. GENERATED FROM PYTHON SOURCE LINES 93-103 .. code-block:: Python gpv.plot_2d(geo_model, show_data=True) gpv.plot_3d( model=geo_model, show_surfaces=True, show_data=True, image=True, show_topography=True, kwargs_plot_structured_grid={'opacity': .2} ) .. image-sg:: /tutorials/ch1_fundamentals/images/sphx_glr_ch1_4_onlap_relations_002.png :alt: ch1 4 onlap relations :srcset: /tutorials/ch1_fundamentals/images/sphx_glr_ch1_4_onlap_relations_002.png :class: sphx-glr-single-img .. image-sg:: /tutorials/ch1_fundamentals/images/sphx_glr_ch1_4_onlap_relations_003.png :alt: Cell Number: mid Direction: y :srcset: /tutorials/ch1_fundamentals/images/sphx_glr_ch1_4_onlap_relations_003.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 104-132 .. code-block:: Python gpv.plot_2d( model=geo_model, cell_number=2, override_regular_grid=geo_model.solutions.raw_arrays.mask_matrix[0], show_data=True, kwargs_lithology={'cmap': 'gray', 'norm': None} ) gpv.plot_2d( model=geo_model, cell_number=2, override_regular_grid=geo_model.solutions.raw_arrays.mask_matrix[1], show_data=True, kwargs_lithology={'cmap': 'gray', 'norm': None} ) gpv.plot_2d( model=geo_model, cell_number=2, override_regular_grid=geo_model.solutions.raw_arrays.mask_matrix[2], show_data=True, kwargs_lithology={'cmap': 'gray', 'norm': None} ) gpv.plot_2d( model=geo_model, cell_number=2, override_regular_grid=geo_model.solutions.raw_arrays.mask_matrix[3], show_data=True, kwargs_lithology={'cmap': 'gray', 'norm': None} ) .. rst-class:: sphx-glr-horizontal * .. image-sg:: /tutorials/ch1_fundamentals/images/sphx_glr_ch1_4_onlap_relations_004.png :alt: Cell Number: 2 Direction: y :srcset: /tutorials/ch1_fundamentals/images/sphx_glr_ch1_4_onlap_relations_004.png :class: sphx-glr-multi-img * .. image-sg:: /tutorials/ch1_fundamentals/images/sphx_glr_ch1_4_onlap_relations_005.png :alt: Cell Number: 2 Direction: y :srcset: /tutorials/ch1_fundamentals/images/sphx_glr_ch1_4_onlap_relations_005.png :class: sphx-glr-multi-img * .. image-sg:: /tutorials/ch1_fundamentals/images/sphx_glr_ch1_4_onlap_relations_006.png :alt: Cell Number: 2 Direction: y :srcset: /tutorials/ch1_fundamentals/images/sphx_glr_ch1_4_onlap_relations_006.png :class: sphx-glr-multi-img * .. image-sg:: /tutorials/ch1_fundamentals/images/sphx_glr_ch1_4_onlap_relations_007.png :alt: Cell Number: 2 Direction: y :srcset: /tutorials/ch1_fundamentals/images/sphx_glr_ch1_4_onlap_relations_007.png :class: sphx-glr-multi-img .. rst-class:: sphx-glr-script-out .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 133-160 .. code-block:: Python gpv.plot_2d( model=geo_model, cell_number=2, override_regular_grid=geo_model.solutions.raw_arrays.mask_matrix_squeezed[0], show_data=True, kwargs_lithology={'cmap': 'gray', 'norm': None} ) gpv.plot_2d( model=geo_model, cell_number=2, override_regular_grid=geo_model.solutions.raw_arrays.mask_matrix_squeezed[1], show_data=True, kwargs_lithology={'cmap': 'gray', 'norm': None} ) gpv.plot_2d( model=geo_model, cell_number=2, override_regular_grid=geo_model.solutions.raw_arrays.mask_matrix_squeezed[2], show_data=True, kwargs_lithology={'cmap': 'gray', 'norm': None} ) gpv.plot_2d( model=geo_model, cell_number=2, override_regular_grid=geo_model.solutions.raw_arrays.mask_matrix_squeezed[3], show_data=True, kwargs_lithology={'cmap': 'gray', 'norm': None} ) .. rst-class:: sphx-glr-horizontal * .. image-sg:: /tutorials/ch1_fundamentals/images/sphx_glr_ch1_4_onlap_relations_008.png :alt: Cell Number: 2 Direction: y :srcset: /tutorials/ch1_fundamentals/images/sphx_glr_ch1_4_onlap_relations_008.png :class: sphx-glr-multi-img * .. image-sg:: /tutorials/ch1_fundamentals/images/sphx_glr_ch1_4_onlap_relations_009.png :alt: Cell Number: 2 Direction: y :srcset: /tutorials/ch1_fundamentals/images/sphx_glr_ch1_4_onlap_relations_009.png :class: sphx-glr-multi-img * .. image-sg:: /tutorials/ch1_fundamentals/images/sphx_glr_ch1_4_onlap_relations_010.png :alt: Cell Number: 2 Direction: y :srcset: /tutorials/ch1_fundamentals/images/sphx_glr_ch1_4_onlap_relations_010.png :class: sphx-glr-multi-img * .. image-sg:: /tutorials/ch1_fundamentals/images/sphx_glr_ch1_4_onlap_relations_011.png :alt: Cell Number: 2 Direction: y :srcset: /tutorials/ch1_fundamentals/images/sphx_glr_ch1_4_onlap_relations_011.png :class: sphx-glr-multi-img .. rst-class:: sphx-glr-script-out .. code-block:: none .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 7.243 seconds) .. _sphx_glr_download_tutorials_ch1_fundamentals_ch1_4_onlap_relations.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: ch1_4_onlap_relations.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: ch1_4_onlap_relations.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_