.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/geometries/f06_unconformity.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_examples_geometries_f06_unconformity.py: Model 6 - Unconformity ====================== Modeling unconformities through the combination of scalar fields This script creates an unconformity cutting an anticline structure using GemPy, an open-source, Python-based library for building implicit geological models. .. GENERATED FROM PYTHON SOURCE LINES 10-19 .. code-block:: Python # Importing necessary libraries import gempy as gp import gempy_viewer as gpv from gempy_engine.core.data.stack_relation_type import StackRelationType # sphinx_gallery_thumbnail_number = 2 .. GENERATED FROM PYTHON SOURCE LINES 20-22 Generate the model Define the path to data .. GENERATED FROM PYTHON SOURCE LINES 22-49 .. code-block:: Python data_path = 'https://raw.githubusercontent.com/cgre-aachen/gempy_data/master/' path_to_data = data_path + "/data/input_data/jan_models/" # Create a GeoModel instance data = gp.create_geomodel( project_name='unconformity', extent=[0, 1000, 0, 1000, 0, 1000], refinement=6, importer_helper=gp.data.ImporterHelper( path_to_orientations=path_to_data + "model6_orientations.csv", path_to_surface_points=path_to_data + "model6_surface_points.csv" ) ) # Map geological series to surfaces gp.map_stack_to_surfaces( gempy_model=data, mapping_object={ "Strat_Series1": 'rock3', "Strat_Series2": ('rock2', 'rock1') } ) # Define the structural relation data.structural_frame.structural_groups[0].structural_relation = StackRelationType.ERODE # Compute the geological model gp.compute_model(data) geo_data = data .. rst-class:: sphx-glr-script-out .. code-block:: none Surface points hash: 7f8130574e9fd3deb75ffcbfcafff5b6b832d233ee95246f4be17e5cb8575712 Orientations hash: 580fd4be0d29ee09c4018f629b4a1b3545faeae127e6532e66f730e7f0203e69 Setting Backend To: AvailableBackends.numpy Chunking done: 6 chunks Chunking done: 6 chunks .. GENERATED FROM PYTHON SOURCE LINES 50-51 Plot the initial geological model in the y direction .. GENERATED FROM PYTHON SOURCE LINES 51-53 .. code-block:: Python gpv.plot_2d(geo_data, direction=['y'], show_results=False) .. image-sg:: /examples/geometries/images/sphx_glr_f06_unconformity_001.png :alt: Cell Number: mid Direction: y :srcset: /examples/geometries/images/sphx_glr_f06_unconformity_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 54-55 Plot the result of the model in the y and x directions with data .. GENERATED FROM PYTHON SOURCE LINES 55-58 .. code-block:: Python gpv.plot_2d(geo_data, direction='y', show_data=True) gpv.plot_2d(geo_data, direction='x', show_data=True) .. rst-class:: sphx-glr-horizontal * .. image-sg:: /examples/geometries/images/sphx_glr_f06_unconformity_002.png :alt: Cell Number: mid Direction: y :srcset: /examples/geometries/images/sphx_glr_f06_unconformity_002.png :class: sphx-glr-multi-img * .. image-sg:: /examples/geometries/images/sphx_glr_f06_unconformity_003.png :alt: Cell Number: mid Direction: x :srcset: /examples/geometries/images/sphx_glr_f06_unconformity_003.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.078 seconds) .. _sphx_glr_download_examples_geometries_f06_unconformity.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: f06_unconformity.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: f06_unconformity.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: f06_unconformity.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_