.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/geometries/a01_horizontal_stratigraphic.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_a01_horizontal_stratigraphic.py: Model 1 - Horizontal stratigraphy ================================== A simple example with horizontal layers This script demonstrates how to create a basic model with horizontally stacked layers using GemPy, a Python-based, open-source library for implicit geological modeling. .. GENERATED FROM PYTHON SOURCE LINES 13-14 Import necessary libraries .. GENERATED FROM PYTHON SOURCE LINES 14-20 .. code-block:: Python import gempy as gp import gempy_viewer as gpv # sphinx_gallery_thumbnail_number = 2 .. GENERATED FROM PYTHON SOURCE LINES 21-23 Generate the model Define the path to data .. GENERATED FROM PYTHON SOURCE LINES 23-43 .. code-block:: Python data_path = 'https://raw.githubusercontent.com/cgre-aachen/gempy_data/master/' # Create a GeoModel instance data = gp.create_geomodel( project_name='horizontal', extent=[0, 1000, 0, 1000, 0, 1000], refinement=6, importer_helper=gp.data.ImporterHelper( path_to_orientations=data_path + "/data/input_data/jan_models/model1_orientations.csv", path_to_surface_points=data_path + "/data/input_data/jan_models/model1_surface_points.csv" ) ) # Map geological series to surfaces gp.map_stack_to_surfaces( gempy_model=data, mapping_object={"Strat_Series": ('rock2', 'rock1')} ) # Compute the geological model gp.compute_model(data) geo_data = data .. rst-class:: sphx-glr-script-out .. code-block:: none Surface points hash: 6f1a39ed77e87a4057f03629c946b1876b87e24409cadfe0e1cf7ab1488f69e4 Orientations hash: 04c307ae23f70252fe54144a2fb95ca7d96584a2d497ea539ed32dfd23e7cd5d Setting Backend To: AvailableBackends.numpy .. GENERATED FROM PYTHON SOURCE LINES 44-45 Plot the initial geological model in the y direction without results .. GENERATED FROM PYTHON SOURCE LINES 45-50 .. code-block:: Python gpv.plot_2d(geo_data, direction=['y'], show_results=False) # Plot the result of the model in the x and y direction with data and without boundaries gpv.plot_2d(geo_data, direction=['x'], show_data=True, show_boundaries=False) gpv.plot_2d(geo_data, direction=['y'], show_data=True, show_boundaries=False) .. rst-class:: sphx-glr-horizontal * .. image-sg:: /examples/geometries/images/sphx_glr_a01_horizontal_stratigraphic_001.png :alt: Cell Number: mid Direction: y :srcset: /examples/geometries/images/sphx_glr_a01_horizontal_stratigraphic_001.png :class: sphx-glr-multi-img * .. image-sg:: /examples/geometries/images/sphx_glr_a01_horizontal_stratigraphic_002.png :alt: Cell Number: mid Direction: x :srcset: /examples/geometries/images/sphx_glr_a01_horizontal_stratigraphic_002.png :class: sphx-glr-multi-img * .. image-sg:: /examples/geometries/images/sphx_glr_a01_horizontal_stratigraphic_003.png :alt: Cell Number: mid Direction: y :srcset: /examples/geometries/images/sphx_glr_a01_horizontal_stratigraphic_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 2.550 seconds) .. _sphx_glr_download_examples_geometries_a01_horizontal_stratigraphic.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: a01_horizontal_stratigraphic.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: a01_horizontal_stratigraphic.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: a01_horizontal_stratigraphic.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_