<jupyter_start><jupyter_text>Perth basin![img](perth.png)  Setting up unviroment<jupyter_code>import warnings
warnings.filterwarnings("ignore")


%matplotlib inline
from pyvista import set_plot_theme
set_plot_theme('document')

import os

# Importing auxiliary libraries
import matplotlib
matplotlib.rcParams['figure.figsize'] = (20.0, 10.0)
os.environ["THEANO_FLAGS"] = "mode=FAST_RUN,device=cuda"
# Importing GemPy
import gempy as gp<jupyter_output><empty_output><jupyter_text>Initializing model<jupyter_code>data_path = 'https://raw.githubusercontent.com/cgre-aachen/gempy_data/master/'
geo_model = gp.create_model('Perth_Basin')
interp_data = gp.set_interpolator(geo_model,
                                  compile_theano=True,
                                  theano_optimizer='fast_run', gradient=False,
                                  dtype='float64')
gp.init_data(geo_model,
             extent=[337000, 400000, 6640000, 6710000, -18000, 1000],
             resolution=[100, 100, 100],
             path_i=data_path + "/data/input_data/Perth_basin/Paper_GU2F_sc_faults_topo_Points.csv",
             path_o=data_path + "/data/input_data/Perth_basin/Paper_GU2F_sc_faults_topo_Foliations.csv")<jupyter_output><empty_output><jupyter_text>Cleaning surfaces<jupyter_code>geo_model.surfaces
del_surfaces = ['Cadda', 'Woodada_Kockatea', 'Cattamarra']
geo_model.delete_surfaces(del_surfaces, remove_data=True)<jupyter_output><empty_output><jupyter_text>Setting geological features relationships<jupyter_code>geo_model.stack
gp.map_stack_to_surfaces(geo_model,
                          {"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_Urella_South": ["Urella_South"],
                           "fault_Darling": ["Darling"],
                           "Sedimentary_Series": ['Cretaceous',
                                                  'Yarragadee',
                                                  'Eneabba',
                                                  'Lesueur',
                                                  'Permian']
                           })
geo_model.series
order_series = ["fault_Abrolhos_Transfer",
                "fault_Coomallo",
                "fault_Eneabba_South",
                "fault_Hypo_fault_W",
                "fault_Hypo_fault_E",
                "fault_Urella_North",
                "fault_Darling",
                "fault_Urella_South",
                "Sedimentary_Series", 'Basement']

geo_model.reorder_series(order_series)<jupyter_output><empty_output><jupyter_text>Select which series are faults<jupyter_code>geo_model.faults
geo_model.set_is_fault(["fault_Abrolhos_Transfer",
                        "fault_Coomallo",
                        "fault_Eneabba_South",
                        "fault_Hypo_fault_W",
                        "fault_Hypo_fault_E",
                        "fault_Urella_North",
                        "fault_Darling",
                        "fault_Urella_South"])<jupyter_output><empty_output><jupyter_text>Fault Network<jupyter_code>geo_model.faults.faults_relations_df
fr = geo_model.faults.faults_relations_df.values
fr[:, :-2] = False
fr
geo_model.set_fault_relation(fr)<jupyter_output><empty_output><jupyter_text>Visualizing data<jupyter_code>gp.plot_2d(geo_model, direction=['z'], legend=False)
geo_model.set_topography(source='random')
gp.plot_3d(geo_model, show_topography=True)<jupyter_output><empty_output><jupyter_text>Compute model<jupyter_code>geo_model.update_to_interpolator()
gp.compute_model(geo_model)
gp.plot_2d(geo_model, cell_number=[25], legend=False)
gp.plot_2d(geo_model, cell_number=[25], series_n=-1, show_scalar=True, legend=False)
gp.plot_2d(geo_model, cell_number=[12], direction=["y"], show_data=True, show_topography=True, legend=False)
gp.plot_3d(geo_model, show_topography=True, plotter_type="background")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10623666113350723, 'fraction_numerical': 0.016125207493478778, 'mean_word_length': 2.696757230499562, 'pattern_counts': {'":': 9, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 11, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '8', 'dir': 'jupyter-structured-clean-dedup', 'id': '637603', 'license': 'MIT', 'n_tokens_mistral': 1484, 'n_tokens_neox': 1347, 'n_words': 147, 'path': 'workshops/EGU 2021/Perth_basin.ipynb', 'repo_name': 'cgre-aachen/gempy_workshops', 'size': '4217'}