Note
Go to the end to download the full example code
Perth basin.¶
import os
# Importing GemPy
import gempy as gp
import gempy_viewer as gpv
# Importing auxiliary libraries
import matplotlib
matplotlib.rcParams['figure.figsize'] = (20.0, 10.0)
os.environ["aesara_FLAGS"] = "mode=FAST_RUN,device=cuda"
cwd = os.getcwd()
if 'examples' not in cwd:
data_path = os.getcwd() + '/examples'
else:
data_path = cwd + '/../..'
geo_model: gp.data.GeoModel = gp.create_geomodel(
project_name='Perth_Basin',
extent=[337000, 400000, 6640000, 6710000, -18000, 1000],
resolution=[100, 100, 100],
refinement=4,
importer_helper=gp.data.ImporterHelper(
path_to_orientations=data_path + "/data/input_data/perth_basin/Paper_GU2F_sc_faults_topo_Foliations.csv",
path_to_surface_points=data_path + "/data/input_data/perth_basin/Paper_GU2F_sc_faults_topo_Points.csv",
)
)
del_surfaces = ['Cadda', 'Woodada_Kockatea', 'Cattamarra']
for s in del_surfaces:
gp.remove_element_by_name(geo_model, s)
geo_model.structural_frame
gp.map_stack_to_surfaces(
gempy_model=geo_model,
mapping_object={
"fault_Abrolhos_Transfer": ["Abrolhos_Transfer"],
"fault_Coomallo": ["Coomallo"],
"fault_Eneabba_South": ["Eneabba_South"],
"fault_Hypo_fault_W": ["Hypo_fault_W"],
"fault_Hypo_fault_E": ["Hypo_fault_E"],
"fault_Urella_North": ["Urella_North"],
"fault_Darling": ["Darling"],
"fault_Urella_South": ["Urella_South"],
"Sedimentary_Series": ['Cretaceous', 'Yarragadee', 'Eneabba', 'Lesueur', 'Permian']
}
)
Select which series are faults¶
gp.set_is_fault(
geo_model,
fault_groups=[
"fault_Abrolhos_Transfer",
"fault_Coomallo",
"fault_Eneabba_South",
"fault_Hypo_fault_W",
"fault_Hypo_fault_E",
"fault_Urella_North",
"fault_Darling",
"fault_Urella_South"
],
)
gp.set_fault_relation(geo_model, fr)
[[False False False False False False False False True]
[False False False False False False False False True]
[False False False False False False False False True]
[False False False False False False False False True]
[False False False False False False False False True]
[False False False False False False False False True]
[False False False False False False False False True]
[False False False False False False False False True]
[False False False False False False False False False]]
%matplotlib inline
gpv.plot_2d(geo_model, direction=['z'])
<gempy_viewer.modules.plot_2d.visualization_2d.Plot2D object at 0x7fe083b40c40>
gp.set_topography_from_random(geo_model.grid)
[-2800. 1000.]
Active grids: ['topography']
<gempy.core.data.grid_modules.topography.Topography object at 0x7fe0d0253e20>
gpv.plot_3d(geo_model)
<gempy_viewer.modules.plot_3d.vista.GemPyToVista object at 0x7fe0848b50c0>
gp.compute_model(
gempy_model=geo_model,
engine_config= gp.data.GemPyEngineConfig(
backend=gp.data.AvailableBackends.PYTORCH,
dtype="float64",
)
)
Setting Backend To: AvailableBackends.PYTORCH
/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(
Condition number: 1908.8402911741252.
Condition number: 66361.2799128913.
Condition number: 66441.6487618764.
Condition number: 40320.98828234435.
Condition number: 39299.2334698527.
Condition number: 42968.81238468715.
Condition number: 45471.0519035656.
Condition number: 38436.90292047045.
Condition number: 481694.86151745764.
gpv.plot_2d(geo_model, cell_number="mid")
<gempy_viewer.modules.plot_2d.visualization_2d.Plot2D object at 0x7fe0d00d3a60>
gpv.plot_2d(geo_model, cell_number="mid", series_n=-1, show_scalar=True)
<gempy_viewer.modules.plot_2d.visualization_2d.Plot2D object at 0x7fe0848b7cd0>
gpv.plot_2d(geo_model, cell_number=[12], direction=["y"], show_data=True, show_topography=True)
<gempy_viewer.modules.plot_2d.visualization_2d.Plot2D object at 0x7fe0610ab1c0>
sphinx_gallery_thumbnail_number = 6
gpv.plot_3d(geo_model, show_topography=True)
<gempy_viewer.modules.plot_3d.vista.GemPyToVista object at 0x7fe060ec5e10>
Total running time of the script: (0 minutes 6.602 seconds)