Model 5 - FaultΒΆ

A simple fault model with constant offset. We start by importing the necessary dependencies:

Importing GemPy

import gempy as gp

import pandas as pd
pd.set_option('precision', 2)

Creating the model by importing the input data and displaying it:

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('fault', extent=[0, 1000, 0, 1000, 0, 1000], resolution=[50, 50, 50],
                          path_o=path_to_data + "model5_orientations.csv",
                          path_i=path_to_data + "model5_surface_points.csv")

Out:

Active grids: ['regular']
X Y Z smooth surface G_x G_y G_z
surface_points 0 0 200 600 2.00e-06 rock1 NaN NaN NaN
1 0 800 600 2.00e-06 rock1 NaN NaN NaN
2 200 200 600 2.00e-06 rock1 NaN NaN NaN
3 200 800 600 2.00e-06 rock1 NaN NaN NaN
4 800 200 200 2.00e-06 rock1 NaN NaN NaN
5 800 800 200 2.00e-06 rock1 NaN NaN NaN
6 1000 200 200 2.00e-06 rock1 NaN NaN NaN
7 1000 800 200 2.00e-06 rock1 NaN NaN NaN
8 0 200 800 2.00e-06 rock2 NaN NaN NaN
9 0 800 800 2.00e-06 rock2 NaN NaN NaN
10 200 200 800 2.00e-06 rock2 NaN NaN NaN
11 200 800 800 2.00e-06 rock2 NaN NaN NaN
12 800 200 400 2.00e-06 rock2 NaN NaN NaN
13 800 800 400 2.00e-06 rock2 NaN NaN NaN
14 1000 200 400 2.00e-06 rock2 NaN NaN NaN
15 1000 800 400 2.00e-06 rock2 NaN NaN NaN
16 500 500 500 2.00e-06 fault NaN NaN NaN
17 450 500 600 2.00e-06 fault NaN NaN NaN
18 500 200 500 2.00e-06 fault NaN NaN NaN
19 450 200 600 2.00e-06 fault NaN NaN NaN
20 500 800 500 2.00e-06 fault NaN NaN NaN
21 450 800 600 2.00e-06 fault NaN NaN NaN
orientations 1 100 500 600 1.00e-02 rock1 1.00e-12 1.00e-12 1.0
3 900 500 200 1.00e-02 rock1 1.00e-12 1.00e-12 1.0
0 100 500 800 1.00e-02 rock2 1.00e-12 1.00e-12 1.0
2 900 500 400 1.00e-02 rock2 1.00e-12 1.00e-12 1.0
4 500 500 500 1.00e-02 fault 8.66e-01 1.00e-12 0.5


Setting and ordering the units and series:

gp.map_stack_to_surfaces(geo_data, {"Fault_Series": 'fault',
                                    "Strat_Series": ('rock2', 'rock1')})
geo_data.set_is_fault(['Fault_Series'])

Out:

Fault colors changed. If you do not like this behavior, set change_color to False.
order_series BottomRelation isActive isFault isFinite
Fault_Series 1 Fault True True False
Strat_Series 2 Erosion True False False
Basement 3 Erosion False False False


gp.plot_2d(geo_data, direction='y')
Cell Number: mid Direction: y

Out:

<gempy.plot.visualization_2d.Plot2D object at 0x7ff9ca0f8850>

Calculating the model:

interp_data = gp.set_interpolator(geo_data, theano_optimizer='fast_compile')

Out:

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              1.7e+03
$C_o$              7.1e+04
drift equations  [3, 3, 3]

Displaying the result in x and y direction:

sphinx_gallery_thumbnail_number = 2

gp.plot_2d(geo_data, cell_number=25,
           direction='y', show_data=False, show_all_data=True)
Cell Number: 25 Direction: y

Out:

<gempy.plot.visualization_2d.Plot2D object at 0x7ff9bc5d9890>
gp.plot_2d(geo_data, cell_number=25,
           direction='x', show_data=True)
Cell Number: 25 Direction: x

Out:

<gempy.plot.visualization_2d.Plot2D object at 0x7ff9fa8b15d0>
gp.plot_2d(geo_data, cell_number=25,
           direction='y', show_data=True, show_scalar=True, series_n=1)


gp.save_model(geo_data)
Cell Number: 25 Direction: y

Out:

True

Total running time of the script: ( 0 minutes 8.850 seconds)

Gallery generated by Sphinx-Gallery