Example 8 - Faulted Layers
This example will show how to convert the geological map below using GemGIS
to a GemPy
model. This example is based on digitized data. The area is 2957 m wide (W-E extent) and 3715 m high (N-S extent). The vertical extent varies between 0 m and 1250 m. The model represents three faulted layers, red and yellow above a green basement. The map has been georeferenced with QGIS. The stratigraphic boundaries were digitized in QGIS. Strikes lines were digitized in QGIS as well and will be used
to calculate orientations for the GemPy
model. The contour lines were also digitized and will be interpolated with GemGIS
to create a topography for the model.
Map Source: An Introduction to Geological Structures and Maps by G.M. Bennison
Licensing
Computational Geosciences and Reservoir Engineering, RWTH Aachen University, Authors: Alexander Juestel. For more information contact: alexander.juestel(at)rwth-aachen.de
This work is licensed under a Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/)
Import GemGIS
If you have installed GemGIS
via pip or conda, you can import GemGIS
like any other package. If you have downloaded the repository, append the path to the directory where the GemGIS
repository is stored and then import GemGIS
.
Importing Libraries and loading Data
All remaining packages can be loaded in order to prepare the data and to construct the model. The example data is downloaded from an external server using pooch
. It will be stored in a data folder in the same directory where this notebook is stored.
Downloading file 'example08_faulted_layers.zip' from 'https://rwth-aachen.sciebo.de/s/AfXRsZywYDbUF34/download?path=%2Fexample08_faulted_layers.zip' to 'C:\Users\ale93371\Documents\gemgis\docs\getting_started\example\data\example08'.
Creating Digital Elevation Model from Contour Lines
The digital elevation model (DEM) will be created by interpolating contour lines digitized from the georeferenced map using the SciPy
Radial Basis Function interpolation wrapped in GemGIS
. The respective function used for that is gg.vector.interpolate_raster()
.
|
id |
Z |
geometry |
0 |
None |
800 |
LINESTRING (8.360 333.390, 94.504 303.527, 184... |
1 |
None |
700 |
LINESTRING (2954.497 1855.274, 2918.891 1755.3... |
2 |
None |
900 |
LINESTRING (3.765 3486.274, 124.368 3510.394, ... |
3 |
None |
800 |
LINESTRING (3.191 3280.676, 105.416 3314.559, ... |
4 |
None |
700 |
LINESTRING (3.191 2934.376, 53.729 2986.062, 1... |
Interpolating the contour lines
Saving the raster to disc
After the interpolation of the contour lines, the raster is saved to disc using gg.raster.save_as_tiff()
. The function will not be executed as a raster is already provided with the example data.
gg.raster.save_as_tiff(raster=topo_raster, path=file_path + 'raster8.tif', extent=[0, 2957, 0, 3715], crs='EPSG:4326', overwrite_file=True)
Opening Raster
The previously computed and saved raster can now be opened using rasterio.
Interface Points of stratigraphic boundaries
The interface points will be extracted from LineStrings digitized from the georeferenced map using QGIS. It is important to provide a formation name for each layer boundary. The vertical position of the interface point will be extracted from the digital elevation model using the GemGIS
function gg.vector.extract_xyz()
. The resulting GeoDataFrame now contains single points including the information about the respective formation.
|
id |
formation |
geometry |
0 |
None |
C |
LINESTRING (1714.018 3708.526, 1663.480 3610.8... |
1 |
None |
B |
LINESTRING (1352.212 3709.675, 1318.903 3630.4... |
2 |
None |
C |
LINESTRING (2089.608 876.100, 2059.744 795.698... |
3 |
None |
B |
LINESTRING (1757.665 920.895, 1725.504 829.007... |
4 |
None |
F1 |
LINESTRING (8.360 1153.485, 131.259 1129.364, ... |
Plotting the Interface Points
Orientations from Strike Lines
Strike lines connect outcropping stratigraphic boundaries (interfaces) of the same altitude. In other words: the intersections between topographic contours and stratigraphic boundaries at the surface. The height difference and the horizontal difference between two digitized lines is used to calculate the dip and azimuth and hence an orientation that is necessary for GemPy
. In order to calculate the orientations, each set of strikes lines/LineStrings for one formation must be given an id
number next to the altitude of the strike line. The id field is already predefined in QGIS. The strike line with the lowest altitude gets the id number 1
, the strike line with the highest altitude the the number according to the number of digitized strike lines. It is currently recommended to use one set of strike lines for each structural element of one formation as illustrated.
|
id |
formation |
Z |
geometry |
0 |
1 |
B1 |
500 |
LINESTRING (1645.103 652.699, 1651.420 479.261) |
1 |
1 |
C1 |
500 |
LINESTRING (2151.632 301.230, 2144.740 877.823) |
2 |
1 |
C |
600 |
LINESTRING (1148.337 2886.709, 1154.654 2403.152) |
3 |
2 |
C |
700 |
LINESTRING (1390.115 3204.869, 1390.690 2132.659) |
4 |
1 |
B |
600 |
LINESTRING (654.443 2938.970, 658.463 2486.999) |
Merging Orientations
|
index |
dip |
azimuth |
Z |
geometry |
polarity |
formation |
X |
Y |
0 |
0 |
64.17 |
180.06 |
550.00 |
POINT (2142.443 936.831) |
1.00 |
F1 |
2142.44 |
936.83 |
1 |
1 |
65.03 |
180.15 |
650.00 |
POINT (2034.906 985.072) |
1.00 |
F1 |
2034.91 |
985.07 |
2 |
2 |
65.86 |
180.16 |
750.00 |
POINT (1907.556 1031.877) |
1.00 |
F1 |
1907.56 |
1031.88 |
3 |
3 |
70.31 |
180.05 |
850.00 |
POINT (1732.539 1074.232) |
1.00 |
F1 |
1732.54 |
1074.23 |
4 |
4 |
66.70 |
180.12 |
950.00 |
POINT (1559.676 1118.740) |
1.00 |
F1 |
1559.68 |
1118.74 |
5 |
0 |
22.97 |
269.85 |
650.00 |
POINT (1270.949 2656.847) |
1.00 |
C |
1270.95 |
2656.85 |
6 |
0 |
23.26 |
269.27 |
550.00 |
POINT (2265.629 516.591) |
1.00 |
C |
2265.63 |
516.59 |
7 |
0 |
22.35 |
269.26 |
650.00 |
POINT (778.778 2702.073) |
1.00 |
B |
778.78 |
2702.07 |
8 |
1 |
22.74 |
269.74 |
750.00 |
POINT (1023.571 2506.812) |
1.00 |
B |
1023.57 |
2506.81 |
9 |
0 |
22.32 |
269.37 |
550.00 |
POINT (1771.304 559.376) |
1.00 |
B |
1771.30 |
559.38 |
Plotting the Orientations
GemPy Model Construction
The structural geological model will be constructed using the GemPy
package.
WARNING (theano.configdefaults): g++ not available, if using conda: `conda install m2w64-toolchain`
WARNING (theano.configdefaults): g++ not detected ! Theano will be unable to execute optimized C-implementations (for both CPU and GPU) and will default to Python implementations. Performance will be severely degraded. To remove this warning, set Theano flags cxx to an empty string.
WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
Initiate Data
Active grids: ['regular']
Model Surfaces
| surface | series | order_surfaces | color | id |
0 |
F1 |
Default series |
1 |
#015482 |
1 |
1 |
C |
Default series |
2 |
#9f0052 |
2 |
2 |
B |
Default series |
3 |
#ffbe00 |
3 |
Mapping the Stack to Surfaces
Fault colors changed. If you do not like this behavior, set change_color to False.
|
order_series |
BottomRelation |
isActive |
isFault |
isFinite |
Fault1 |
1 |
Fault |
True |
True |
False |
Strata1 |
2 |
Erosion |
True |
False |
False |
Showing the Number of Data Points
| surface | series | order_surfaces | color | id | No. of Interfaces | No. of Orientations |
0 |
F1 |
Fault1 |
1 |
#527682 |
1 |
24 |
5 |
1 |
C |
Strata1 |
1 |
#9f0052 |
2 |
43 |
2 |
2 |
B |
Strata1 |
2 |
#ffbe00 |
3 |
47 |
3 |
3 |
A |
Strata1 |
3 |
#728f02 |
4 |
0 |
0 |
Loading Digital Elevation Model
Cropped raster to geo_model.grid.extent.
depending on the size of the raster, this can take a while...
storing converted file...
Active grids: ['regular' 'topography']
Grid Object. Values:
array([[ 14.785 , 18.575 , 6.25 ],
[ 14.785 , 18.575 , 18.75 ],
[ 14.785 , 18.575 , 31.25 ],
...,
[2952.00506757, 3690.03360215, 931.20074463],
[2952.00506757, 3700.02016129, 933.94940186],
[2952.00506757, 3710.00672043, 936.69573975]])
Setting the Interpolator
Compiling theano function...
Level of Optimization: fast_compile
Device: cpu
Precision: float64
Number of faults: 1
Compilation Done!
Kriging values:
values
range 4909.95
$C_o$ 573989.86
drift equations [3, 3]
<gempy.core.interpolator.InterpolatorModel at 0x26186170bb0>
Plotting Cross Sections
<gempy.plot.visualization_2d.Plot2D at 0x261896b5c40>