.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/geometries/7_combination.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_7_combination.py: Model 7 - Combination ====================== .. GENERATED FROM PYTHON SOURCE LINES 8-11 A folded domain featuring an unconformity and a fault. 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-33 .. 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('combination', extent=[0, 2500, 0, 1000, 0, 1000], resolution=[125, 50, 50], path_o=path_to_data + "model7_orientations.csv", path_i=path_to_data + "model7_surface_points.csv") .. rst-class:: sphx-glr-script-out Out: .. code-block:: none Active grids: ['regular'] .. GENERATED FROM PYTHON SOURCE LINES 34-36 .. code-block:: python3 geo_data.get_data() .. raw:: html
X Y Z smooth surface G_x G_y G_z
surface_points 0 0 0 800 2.00e-06 rock3 NaN NaN NaN
1 0 500 800 2.00e-06 rock3 NaN NaN NaN
2 0 1000 800 2.00e-06 rock3 NaN NaN NaN
3 500 0 800 2.00e-06 rock3 NaN NaN NaN
4 500 500 800 2.00e-06 rock3 NaN NaN NaN
... ... ... ... ... ... ... ... ... ...
orientations 4 0 1000 450 1.00e-02 rock2 -0.42 1.00e-12 0.91
1 0 500 250 1.00e-02 rock1 -0.42 1.00e-12 0.91
3 0 0 250 1.00e-02 rock1 -0.42 1.00e-12 0.91
5 0 1000 250 1.00e-02 rock1 -0.42 1.00e-12 0.91
7 2000 500 400 1.00e-02 fault 0.82 1.00e-12 0.57

110 rows × 8 columns



.. GENERATED FROM PYTHON SOURCE LINES 37-39 Setting and ordering the units and series: .. GENERATED FROM PYTHON SOURCE LINES 41-47 .. code-block:: python3 gp.map_stack_to_surfaces(geo_data, {"Fault_Series": ('fault'), "Strat_Series1": ('rock3'), "Strat_Series2": ('rock2','rock1'), "Basement_Series":('basement')}) geo_data.set_is_fault(['Fault_Series']) .. rst-class:: sphx-glr-script-out Out: .. code-block:: none Fault colors changed. If you do not like this behavior, set change_color to False. .. raw:: html
order_series BottomRelation isActive isFault isFinite
Fault_Series 1 Fault True True False
Strat_Series1 2 Erosion True False False
Strat_Series2 3 Erosion True False False
Basement_Series 4 Erosion False False False


.. GENERATED FROM PYTHON SOURCE LINES 48-50 .. code-block:: python3 gp.plot_2d(geo_data, direction='y') .. image:: /examples/geometries/images/sphx_glr_7_combination_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 51-53 Calculating the model: .. GENERATED FROM PYTHON SOURCE LINES 55-57 .. 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: 1 Compilation Done! Kriging values: values range 2872.28 $C_o$ 196428.57 drift equations [3, 3, 3, 3] .. GENERATED FROM PYTHON SOURCE LINES 58-60 .. code-block:: python3 sol = gp.compute_model(geo_data) .. GENERATED FROM PYTHON SOURCE LINES 61-63 Displaying the result in x and y direction: .. GENERATED FROM PYTHON SOURCE LINES 65-68 .. code-block:: python3 gp.plot_2d(geo_data, cell_number=5, direction='y', show_data=False, show_boundaries=True) .. image:: /examples/geometries/images/sphx_glr_7_combination_002.png :alt: Cell Number: 5 Direction: y :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 69-70 sphinx_gallery_thumbnail_number = 2 .. GENERATED FROM PYTHON SOURCE LINES 70-73 .. code-block:: python3 gp.plot_2d(geo_data, cell_number=5, direction='x', show_data=True) .. image:: /examples/geometries/images/sphx_glr_7_combination_003.png :alt: Cell Number: 5 Direction: x :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 74-75 .. code-block:: python3 gp.plot_3d(geo_data) gp.save_model(geo_data) .. image:: /examples/geometries/images/sphx_glr_7_combination_004.png :alt: 7 combination :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 16.459 seconds) .. _sphx_glr_download_examples_geometries_7_combination.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: 7_combination.py <7_combination.py>` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: 7_combination.ipynb <7_combination.ipynb>` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_