|
52 | 52 | geo_model: gp.data.GeoModel = gp.create_geomodel(
|
53 | 53 | project_name='Tutorial_ch1_1_Basics',
|
54 | 54 | extent=[0, 2000, 0, 2000, 0, 750],
|
55 |
| - refinement=4, # * Here we define the number of octree levels. If octree levels are defined, the resolution is ignored. |
| 55 | + refinement=6, # * Here we define the number of octree levels. If octree levels are defined, the resolution is ignored. |
56 | 56 | importer_helper=gp.data.ImporterHelper(
|
57 | 57 | path_to_orientations=data_path + "/data/input_data/getting_started/simple_fault_model_orientations.csv",
|
58 | 58 | path_to_surface_points=data_path + "/data/input_data/getting_started/simple_fault_model_points.csv",
|
|
68 | 68 | # simplifies the process of passing multiple arguments needed for importing data and will likely see further
|
69 | 69 | # extensions in the future. Currently, one of its uses is to handle `pooch` arguments for downloading data from the internet.
|
70 | 70 | #
|
71 |
| -# |
| 71 | +# |
| 72 | +# |
| 73 | +# ### Reviewing the Imported Data |
| 74 | +# |
| 75 | +# Now that the `geo_model` object is set up and the data imported from the CSV files, we review the data imported using the properties `surface_points_copy` and `orientations_copy`. |
| 76 | +# |
| 77 | +# Using `structural_frame.element_id_name_map`, we can see which ID corresponds to which structural element name in the data. |
72 | 78 |
|
73 |
| -# The input data can be reviewed using the properties `surface_points` and `orientations`. However, note that at this point, |
74 |
| -# the sequence of formations and their assignment to series are still arbitrary. We will rectify this in the subsequent steps. |
75 | 79 |
|
76 | 80 | # %%
|
77 | 81 | geo_model.surface_points_copy
|
|
107 | 111 | # "newer" series.
|
108 | 112 | #
|
109 | 113 | # By default, we create a simple sequence inferred from the data:
|
110 |
| -# |
| 114 | +# |
| 115 | +# |
| 116 | +# ## Setting Up the Structural Framework |
| 117 | +# |
| 118 | +# Each data entry includes an ID that corresponds to a formation name, which GemPy uses to create a base structural framework. |
| 119 | +# However, the sequence of these formations is still arbitrary, as they have all automatically been assigned to the default |
| 120 | +# structural group in our `geo_model` object. We will fix this in the subsequent steps. |
111 | 121 |
|
112 | 122 | # %%
|
113 | 123 | geo_model.structural_frame
|
|
124 | 134 | # input data.
|
125 | 135 | #
|
126 | 136 |
|
| 137 | +# ### Declaring the Sequential Order of Structural Elements (Geological Formations) |
| 138 | +# |
| 139 | +# In our model, we want the geological units to appear in the correct chronological order. This order could be determined by a sequence |
| 140 | +# of stratigraphic deposition, unconformities due to erosion, or other lithological genesis events like igneous intrusions. A similar |
| 141 | +# age-related order is declared for faults in our model. In GemPy, we use the function `gempy.map_stack_to_surfaces` to assign formations |
| 142 | +# or faults to different sequential series by declaring them in a Python dictionary. |
| 143 | + |
| 144 | +# |
| 145 | +# The correct ordering of series is crucial for model construction! It's possible to assign several surfaces to one series. The order of |
| 146 | +# units within a series only affects the color code, so we recommend maintaining consistency. The order can be defined by simply changing |
| 147 | +# the order of the lists within the `gempy.core.data.StructuralFrame.structural_groups` and `gempy.core.data.StructuralGroups.elements` attributes. |
| 148 | +# |
| 149 | +# Faults are treated as independent groups and must be younger than the groups they affect. The relative order between different faults |
| 150 | +# defines their tectonic relationship (the first entry is the youngest). |
| 151 | +# |
| 152 | +# For a model with simple sequential stratigraphy, all layer formations can be assigned to one series without an issue. All unit |
| 153 | +# boundaries and their order would then be determined by interface points. However, to model more complex lithostratigraphical |
| 154 | +# relations and interactions, separate series definitions become important. For example, modeling an unconformity or an intrusion |
| 155 | +# that disrupts older stratigraphy would require declaring a younger series. |
| 156 | +# |
| 157 | +# By default, a simple sequence/group is created inferred from the data as shown above. |
| 158 | +# |
| 159 | +# Our example model comprises four main layers (plus an underlying basement that is automatically generated by GemPy) and one main |
| 160 | +# normal fault displacing those layers. Assuming a simple stratigraphy where each younger unit was deposited onto the underlying |
| 161 | +# older one, we can assign these layer formations to one structural group called "Strat_Series". For the fault, we declare a |
| 162 | +# respective "Fault_Series" as the first key entry in the mapping dictionary. We could give any other names to these series; |
| 163 | +# the formations, however, have to be referred to as named in the input data. |
| 164 | +# |
| 165 | +# In the following, we map the "Main Fault" to the "Fault Series" and the individual formations to the "Strat Series". |
127 | 166 |
|
128 | 167 | # %%
|
129 | 168 | gp.map_stack_to_surfaces(
|
|
135 | 174 | }
|
136 | 175 | )
|
137 | 176 |
|
| 177 | +# %% |
| 178 | +# Note how the structural frame still indicates the "Fault Series" group to have a relation type "erode". |
| 179 | +# We still need to tell GemPy that we want this group to be a fault. We do this using the function `set_is_fault`. |
| 180 | + |
138 | 181 | geo_model.structural_frame # Display the resulting structural frame
|
139 | 182 |
|
140 | 183 | # %%
|
|
162 | 205 | # Visualizing input data
|
163 | 206 | # ~~~~~~~~~~~~~~~~~~~~~~
|
164 | 207 | #
|
165 |
| -# We can also visualize our input data. This might for example be useful |
166 |
| -# to check if all points and measurements are defined the way we want them |
167 |
| -# to. Using the function :obj:`gempy_viewer.plot2d`, we attain a 2D projection of our |
168 |
| -# data points onto a plane of chosen *direction* (we can choose this |
169 |
| -# attribute to be either :math:`x`, :math:`y` or :math:`z`). |
170 |
| -# |
| 208 | +# Since we have already imported our input data, we can go ahead and visualize it in 2D and 3D. This can be useful to check if all points |
| 209 | +# and orientations are defined the way we want them to be. Using the function `gempy_viewer.plot2d`, we obtain a 2D projection of our |
| 210 | +# data points onto a plane of the chosen *direction* (we can choose this attribute to be either $x$, $y$ or $z$, with the default being $y$). |
| 211 | +# Below, we can freely switch the direction and check out the projection from different sides to get a good idea. |
| 212 | + |
171 | 213 |
|
172 | 214 | # %%
|
173 | 215 | plot = gpv.plot_2d(geo_model, show_lith=False, show_boundaries=False)
|
174 | 216 |
|
175 | 217 | # %%
|
176 |
| -# Using :obj:`gempy_viewer.plot_3d`, # we can also visualize this data in 3D. Note that |
177 |
| -# direct 3D visualization in GemPy requires `the Visualization |
178 |
| -# Toolkit <https://www.vtk.org/>`__ (VTK) to be installed. |
179 |
| -# |
| 218 | + #Beyond 2D, however, we can also visualize our input data in full 3D using `gempy_viewer.plot_3d`. Note that direct 3D visualization |
| 219 | +# in GemPy requires [the Visualization Toolkit](https://www.vtk.org/) (VTK) to be installed. |
| 220 | + |
180 | 221 |
|
181 | 222 | # %%
|
182 | 223 | gpv.plot_3d(geo_model, image=False, plotter_type='basic')
|
183 | 224 |
|
184 | 225 | # %%
|
185 | 226 | # Model Generation
|
186 | 227 | # ~~~~~~~~~~~~~~~~
|
187 |
| -# Once we've correctly defined all our primary information in our |
188 |
| -# `gempy.core.data.GeoModel` object (referred to as `geo_model` in these tutorials), |
189 |
| -# we can proceed to the next step: preparing the input data for interpolation. |
| 228 | +# Once we've correctly defined all our primary information in our `gempy.core.data.GeoModel` object (referred to as `geo_model` |
| 229 | +# in these tutorials), we can proceed with the model computation step. We can go ahead and save the solution of a specific computation |
| 230 | +# as we do below, but solutions are also stored within the `gempy.core.data.GeoModel` object for future reference. |
190 | 231 | #
|
191 | 232 | #
|
192 | 233 | # .. admonition:: New in GemPy 3! Numpy and TensorFlow backend
|
|
0 commit comments