.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/geometries/6_unconformity.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_6_unconformity.py: Model 6 - Unconformity ====================== .. GENERATED FROM PYTHON SOURCE LINES 8-11 An unconformity cutting an anticline structure. We start by importing the necessary dependencies: .. GENERATED FROM PYTHON SOURCE LINES 13-14 Importing GemPy .. GENERATED FROM PYTHON SOURCE LINES 14-19 .. code-block:: python3 import gempy as gp import pandas as pd pd.set_option('precision', 2) .. GENERATED FROM PYTHON SOURCE LINES 20-22 Creating the model by importing the input data and displaying it: .. GENERATED FROM PYTHON SOURCE LINES 24-31 .. 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('unconformity', extent=[0, 1000, 0, 1000, 0, 1000], resolution=[50, 50, 50], path_o=path_to_data + "model6_orientations.csv", path_i=path_to_data + "model6_surface_points.csv") .. rst-class:: sphx-glr-script-out Out: .. code-block:: none Active grids: ['regular'] .. GENERATED FROM PYTHON SOURCE LINES 32-34 .. 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 400 2.00e-06 rock1 NaN NaN NaN
1 0 500 400 2.00e-06 rock1 NaN NaN NaN
2 0 800 400 2.00e-06 rock1 NaN NaN NaN
3 100 200 500 2.00e-06 rock1 NaN NaN NaN
4 100 500 500 2.00e-06 rock1 NaN NaN NaN
5 100 800 500 2.00e-06 rock1 NaN NaN NaN
6 200 200 600 2.00e-06 rock1 NaN NaN NaN
7 200 500 600 2.00e-06 rock1 NaN NaN NaN
8 200 800 600 2.00e-06 rock1 NaN NaN NaN
9 800 200 600 2.00e-06 rock1 NaN NaN NaN
10 800 500 600 2.00e-06 rock1 NaN NaN NaN
11 800 800 600 2.00e-06 rock1 NaN NaN NaN
12 900 200 500 2.00e-06 rock1 NaN NaN NaN
13 900 500 500 2.00e-06 rock1 NaN NaN NaN
14 900 800 500 2.00e-06 rock1 NaN NaN NaN
15 1000 200 400 2.00e-06 rock1 NaN NaN NaN
16 1000 500 400 2.00e-06 rock1 NaN NaN NaN
17 1000 800 400 2.00e-06 rock1 NaN NaN NaN
18 0 200 600 2.00e-06 rock2 NaN NaN NaN
19 0 500 600 2.00e-06 rock2 NaN NaN NaN
20 0 800 600 2.00e-06 rock2 NaN NaN NaN
21 1000 200 600 2.00e-06 rock2 NaN NaN NaN
22 1000 500 600 2.00e-06 rock2 NaN NaN NaN
23 1000 800 600 2.00e-06 rock2 NaN NaN NaN
24 100 200 700 2.00e-06 rock2 NaN NaN NaN
25 100 500 700 2.00e-06 rock2 NaN NaN NaN
26 100 800 700 2.00e-06 rock2 NaN NaN NaN
27 900 200 700 2.00e-06 rock2 NaN NaN NaN
28 900 500 700 2.00e-06 rock2 NaN NaN NaN
29 900 800 700 2.00e-06 rock2 NaN NaN NaN
30 200 200 701 2.00e-06 rock3 NaN NaN NaN
31 200 500 701 2.00e-06 rock3 NaN NaN NaN
32 200 800 701 2.00e-06 rock3 NaN NaN NaN
33 500 200 701 2.00e-06 rock3 NaN NaN NaN
34 500 500 701 2.00e-06 rock3 NaN NaN NaN
35 500 800 701 2.00e-06 rock3 NaN NaN NaN
36 800 200 701 2.00e-06 rock3 NaN NaN NaN
37 800 500 701 2.00e-06 rock3 NaN NaN NaN
38 800 800 701 2.00e-06 rock3 NaN NaN NaN
orientations 2 100 500 500 1.00e-02 rock1 -7.07e-01 1.00e-12 0.71
3 900 500 500 1.00e-02 rock1 7.07e-01 1.00e-12 0.71
0 100 500 700 1.00e-02 rock2 -7.07e-01 1.00e-12 0.71
1 900 500 700 1.00e-02 rock2 7.07e-01 1.00e-12 0.71
4 500 500 701 1.00e-02 rock3 1.00e-12 1.00e-12 1.00


.. GENERATED FROM PYTHON SOURCE LINES 35-37 Setting and ordering the units and series: .. GENERATED FROM PYTHON SOURCE LINES 39-43 .. code-block:: python3 gp.map_stack_to_surfaces(geo_data, {"Strat_Series1": ('rock3'), "Strat_Series2": ('rock2', 'rock1'), "Basement_Series": ('basement')}) .. raw:: html
surface series order_surfaces color id
2 rock3 Strat_Series1 1 #ffbe00 1
0 rock1 Strat_Series2 1 #015482 2
1 rock2 Strat_Series2 2 #9f0052 3
3 basement Basement_Series 1 #728f02 4


.. GENERATED FROM PYTHON SOURCE LINES 44-46 .. code-block:: python3 gp.plot_2d(geo_data, direction='y') .. image:: /examples/geometries/images/sphx_glr_6_unconformity_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 47-49 Calculating the model: .. GENERATED FROM PYTHON SOURCE LINES 51-53 .. 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, 3] .. GENERATED FROM PYTHON SOURCE LINES 54-56 .. code-block:: python3 sol = gp.compute_model(geo_data) .. GENERATED FROM PYTHON SOURCE LINES 57-59 Displaying the result in x and y direction: .. GENERATED FROM PYTHON SOURCE LINES 61-64 .. code-block:: python3 gp.plot_2d(geo_data, cell_number=25, direction='y', show_data=True) .. image:: /examples/geometries/images/sphx_glr_6_unconformity_002.png :alt: Cell Number: 25 Direction: y :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 65-66 sphinx_gallery_thumbnail_number = 2 .. GENERATED FROM PYTHON SOURCE LINES 66-70 .. code-block:: python3 gp.plot_2d(geo_data, cell_number=25, direction='x', show_data=True) gp.save_model(geo_data) .. image:: /examples/geometries/images/sphx_glr_6_unconformity_003.png :alt: Cell Number: 25 Direction: x :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 6.574 seconds) .. _sphx_glr_download_examples_geometries_6_unconformity.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: 6_unconformity.py <6_unconformity.py>` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: 6_unconformity.ipynb <6_unconformity.ipynb>` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_