.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/geometries/c03_recumbent_fold.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_c03_recumbent_fold.py: Model 3 - Recumbent Fold ======================== This script demonstrates how to create a geological model of a recumbent fold using GemPy, a Python-based, open-source library for implicit geological modeling. .. GENERATED FROM PYTHON SOURCE LINES 8-17 .. code-block:: Python # Import necessary libraries import gempy as gp import gempy_viewer as gpv # sphinx_gallery_thumbnail_number = 2 .. GENERATED FROM PYTHON SOURCE LINES 18-20 Generate the model Define the path to data .. GENERATED FROM PYTHON SOURCE LINES 20-42 .. 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='recumbent', extent=[0, 1000, 0, 1000, 0, 1000], resolution=[50, 50, 50], refinement=6, importer_helper=gp.data.ImporterHelper( path_to_orientations=path_to_data + "model3_orientations.csv", path_to_surface_points=path_to_data + "model3_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: 16bd39d19892d9a70aa41b1141f130894de6a36910f27e98ec712351f9373ce2 Orientations hash: 1d12a150cd6f3faa81b8bbebc167ba69de4ac85fc524b771bd97ce94eb2a3e60 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 43-44 Plot the initial geological model in the y direction .. GENERATED FROM PYTHON SOURCE LINES 44-49 .. code-block:: Python gpv.plot_2d(geo_data, direction=['y'], show_results=False) # Plot the result of the model in the y direction with data gpv.plot_2d(geo_data, direction=['y'], show_data=True) .. rst-class:: sphx-glr-horizontal * .. image-sg:: /examples/geometries/images/sphx_glr_c03_recumbent_fold_001.png :alt: Cell Number: mid Direction: y :srcset: /examples/geometries/images/sphx_glr_c03_recumbent_fold_001.png :class: sphx-glr-multi-img * .. image-sg:: /examples/geometries/images/sphx_glr_c03_recumbent_fold_002.png :alt: Cell Number: mid Direction: y :srcset: /examples/geometries/images/sphx_glr_c03_recumbent_fold_002.png :class: sphx-glr-multi-img .. rst-class:: sphx-glr-script-out .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 50-51 .. code-block:: Python gpv.plot_3d(geo_data, show_surfaces=True) .. image-sg:: /examples/geometries/images/sphx_glr_c03_recumbent_fold_003.png :alt: c03 recumbent fold :srcset: /examples/geometries/images/sphx_glr_c03_recumbent_fold_003.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 5.725 seconds) .. _sphx_glr_download_examples_geometries_c03_recumbent_fold.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: c03_recumbent_fold.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: c03_recumbent_fold.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_