.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/geometries/3_recumbent_fold.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_geometries_3_recumbent_fold.py: Model 3 - Recumbent Fold ======================== .. GENERATED FROM PYTHON SOURCE LINES 8-11 A recumbent (overturned) fold. We start by importing the necessary dependencies: .. GENERATED FROM PYTHON SOURCE LINES 13-14 Importing GemPy .. GENERATED FROM PYTHON SOURCE LINES 14-20 .. code-block:: python3 import gempy as gp # Importing auxiliary libraries import pandas as pd pd.set_option('precision', 2) .. GENERATED FROM PYTHON SOURCE LINES 21-23 Creating the model by importing the input data and displaying it: .. GENERATED FROM PYTHON SOURCE LINES 25-32 .. code-block:: python3 data_path = 'https://raw.githubusercontent.com/cgre-aachen/gempy_data/master/' path_to_data = data_path + "/data/input_data/jan_models/" geo_data = gp.create_data('recumbent', extent=[0, 1000, 0, 1000, 0, 1000], resolution=[50, 50, 50], path_o=path_to_data + "model3_orientations.csv", path_i=path_to_data + "model3_surface_points.csv") .. rst-class:: sphx-glr-script-out Out: .. code-block:: none Active grids: ['regular'] .. GENERATED FROM PYTHON SOURCE LINES 33-35 .. code-block:: python3 geo_data.get_data() .. raw:: html
X Y Z smooth surface G_x G_y G_z
surface_points 0 0 200 800 2.00e-06 rock1 NaN NaN NaN
1 0 200 200 2.00e-06 rock1 NaN NaN NaN
2 100 200 790 2.00e-06 rock1 NaN NaN NaN
3 100 200 210 2.00e-06 rock1 NaN NaN NaN
4 200 200 780 2.00e-06 rock1 NaN NaN NaN
... ... ... ... ... ... ... ... ...
102 300 800 430 2.00e-06 rock2 NaN NaN NaN
103 400 800 560 2.00e-06 rock2 NaN NaN NaN
104 400 800 440 2.00e-06 rock2 NaN NaN NaN
orientations 0 200 500 780 1.00e-02 rock1 -0.1 1.00e-12 -1.0
1 200 500 220 1.00e-02 rock1 -0.1 1.00e-12 1.0

107 rows × 8 columns



.. GENERATED FROM PYTHON SOURCE LINES 36-38 Setting and ordering the units and series: .. GENERATED FROM PYTHON SOURCE LINES 40-42 .. code-block:: python3 gp.map_stack_to_surfaces(geo_data, {"Strat_Series": ('rock2', 'rock1'), "Basement_Series": ('basement')}) .. raw:: html
surface series order_surfaces color id
0 rock1 Strat_Series 1 #015482 1
1 rock2 Strat_Series 2 #9f0052 2
2 basement Basement_Series 1 #ffbe00 3


.. GENERATED FROM PYTHON SOURCE LINES 43-45 .. code-block:: python3 gp.plot_2d(geo_data, direction=['y']) .. image:: /examples/geometries/images/sphx_glr_3_recumbent_fold_001.png :alt: Cell Number: mid Direction: y :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 46-48 Calculating the model: .. GENERATED FROM PYTHON SOURCE LINES 50-52 .. code-block:: python3 interp_data = gp.set_interpolator(geo_data, theano_optimizer='fast_compile') .. rst-class:: sphx-glr-script-out Out: .. code-block:: none Setting kriging parameters to their default values. Compiling theano function... Level of Optimization: fast_compile Device: cpu Precision: float64 Number of faults: 0 Compilation Done! Kriging values: values range 1732.05 $C_o$ 71428.57 drift equations [3, 3] .. GENERATED FROM PYTHON SOURCE LINES 53-55 .. code-block:: python3 geo_data.additional_data .. raw:: html
values
Structure isLith True
isFault False
number faults 0
number surfaces 2
number series 2
number surfaces per series [2, 0]
len surfaces surface_points [55, 50]
len series surface_points [105, 0]
len series orientations [2, 0]
Options dtype float64
output geology
theano_optimizer fast_compile
device cpu
verbosity None
Kriging range 1732.05
$C_o$ 71428.57
drift equations [3, 3]
Rescaling rescaling factor 2000
centers [350.0, 500.0, 500.0]


.. GENERATED FROM PYTHON SOURCE LINES 56-58 .. code-block:: python3 sol = gp.compute_model(geo_data) .. GENERATED FROM PYTHON SOURCE LINES 59-61 Displaying the result in x and y direction: .. GENERATED FROM PYTHON SOURCE LINES 63-64 sphinx_gallery_thumbnail_number = 2 .. GENERATED FROM PYTHON SOURCE LINES 64-67 .. code-block:: python3 gp.plot_2d(geo_data, cell_number=[25], direction=['y'], show_data=True) gp.save_model(geo_data) .. image:: /examples/geometries/images/sphx_glr_3_recumbent_fold_002.png :alt: Cell Number: 25 Direction: y :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none True .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 9.014 seconds) .. _sphx_glr_download_examples_geometries_3_recumbent_fold.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: 3_recumbent_fold.py <3_recumbent_fold.py>` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: 3_recumbent_fold.ipynb <3_recumbent_fold.ipynb>` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_