Example 22 - Coal Measures
Contents
Example 22 - Coal Measures#
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 6875 m wide (W-E extent) and 9954 m high (N-S extent). The vertical model extent varies 500 m and 1250 m. The model represents coal measures which were mapped on the surface and at depth using boreholes.
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
[1]:
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
img = mpimg.imread('../images/cover_example22.png')
plt.figure(figsize=(10, 10))
imgplot = plt.imshow(img)
plt.axis('off')
plt.tight_layout()
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
.
[2]:
import warnings
warnings.filterwarnings("ignore")
import gemgis as gg
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.
[3]:
import geopandas as gpd
import rasterio
[4]:
file_path = 'data/example22/'
gg.download_gemgis_data.download_tutorial_data(filename="example22_coal_measures.zip", dirpath=file_path)
Downloading file 'example22_coal_measures.zip' from 'https://rwth-aachen.sciebo.de/s/AfXRsZywYDbUF34/download?path=%2Fexample22_coal_measures.zip' to 'C:\Users\ale93371\Documents\gemgis\docs\getting_started\example\data\example22'.
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()
.
[5]:
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
img = mpimg.imread('../images/dem_example22.png')
plt.figure(figsize=(10, 10))
imgplot = plt.imshow(img)
plt.axis('off')
plt.tight_layout()
[6]:
topo = gpd.read_file(file_path + 'topo22.shp')
topo.head()
[6]:
id | Z | geometry | |
---|---|---|---|
0 | None | 950 | LINESTRING (6001.096 12.580, 6136.515 195.703,... |
1 | None | 900 | LINESTRING (5508.664 11.041, 5542.518 117.222,... |
2 | None | 850 | LINESTRING (3151.144 4.886, 3160.377 221.864, ... |
3 | None | 950 | LINESTRING (1889.286 18.735, 1878.514 141.843,... |
4 | None | 1000 | LINESTRING (21.120 7446.770, 227.327 7482.163,... |
Interpolating the contour lines#
[7]:
topo_raster = gg.vector.interpolate_raster(gdf=topo, value='Z', method='rbf', res=10)
Plotting the raster#
[8]:
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import make_axes_locatable
fix, ax = plt.subplots(1, figsize=(10, 10))
topo.plot(ax=ax, aspect='equal', column='Z', cmap='gist_earth')
im = ax.imshow(topo_raster, origin='lower', extent=[0, 6875, 0, 9954], cmap='gist_earth')
divider = make_axes_locatable(ax)
cax = divider.append_axes("right", size="5%", pad=0.05)
cbar = plt.colorbar(im, cax=cax)
cbar.set_label('Altitude [m]')
ax.set_xlabel('X [m]')
ax.set_ylabel('Y [m]')
ax.set_xlim(0, 6875)
ax.set_ylim(0, 9954)
[8]:
(0.0, 9954.0)
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.
Opening Raster#
The previously computed and saved raster can now be opened using rasterio.
[9]:
topo_raster = rasterio.open(file_path + 'raster22.tif')
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.
[10]:
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
img = mpimg.imread('../images/interfaces_example22.png')
plt.figure(figsize=(10, 10))
imgplot = plt.imshow(img)
plt.axis('off')
plt.tight_layout()
[11]:
interfaces = gpd.read_file(file_path + 'interfaces22.shp')
interfaces.head()
[11]:
id | formation | geometry | |
---|---|---|---|
0 | None | MiddleCoal | LINESTRING (7.271 6412.662, 159.617 6449.594, ... |
1 | None | MiddleCoal | LINESTRING (2429.423 7811.477, 2543.298 7865.3... |
2 | None | MiddleCoal | LINESTRING (2314.009 2839.449, 2423.267 2800.9... |
3 | None | MiddleCoal | LINESTRING (6865.930 1990.004, 6756.672 1866.8... |
4 | None | MiddleCoal | LINESTRING (824.401 4356.757, 964.436 4259.809... |
Extracting Z coordinate from Digital Elevation Model#
[12]:
interfaces_coords = gg.vector.extract_xyz(gdf=interfaces, dem=topo_raster)
interfaces_coords = interfaces_coords.sort_values(by='formation', ascending=False)
interfaces_coords.head()
[12]:
formation | geometry | X | Y | Z | |
---|---|---|---|---|---|
0 | MiddleCoal | POINT (7.271 6412.662) | 7.27 | 6412.66 | 951.72 |
205 | MiddleCoal | POINT (6536.616 5044.623) | 6536.62 | 5044.62 | 945.45 |
223 | MiddleCoal | POINT (1772.333 4008.976) | 1772.33 | 4008.98 | 1008.61 |
222 | MiddleCoal | POINT (1675.385 3935.111) | 1675.39 | 3935.11 | 1004.46 |
221 | MiddleCoal | POINT (1603.059 3916.645) | 1603.06 | 3916.65 | 1000.21 |
[13]:
interfaces_lowercoal = gpd.read_file(file_path + 'interfaces22a.shp')
interfaces_lowercoal['Z'] = interfaces_lowercoal['Z']+600
interfaces_lowercoal.head()
[13]:
id | formation | Z | geometry | |
---|---|---|---|---|
0 | None | LowerCoal | 700 | LINESTRING (1544.583 9919.704, 1381.465 9491.9... |
1 | None | LowerCoal | 650 | LINESTRING (2147.813 9941.247, 2003.161 9708.8... |
2 | None | LowerCoal | 750 | LINESTRING (16.504 3161.069, 290.419 3342.654,... |
3 | None | LowerCoal | 800 | LINESTRING (3540.473 5306.228, 3508.157 5141.5... |
4 | None | LowerCoal | 700 | LINESTRING (3365.044 11.041, 3417.365 180.315,... |
[14]:
interfaces_coords_lowercoal = gg.vector.extract_xy(gdf=interfaces_lowercoal)
interfaces_coords_lowercoal = interfaces_coords_lowercoal.sort_values(by='formation', ascending=False)
interfaces_coords_lowercoal.head()
[14]:
formation | Z | geometry | X | Y | |
---|---|---|---|---|---|
0 | LowerCoal | 700.00 | POINT (1544.583 9919.704) | 1544.58 | 9919.70 |
206 | LowerCoal | 700.00 | POINT (3951.346 2165.433) | 3951.35 | 2165.43 |
213 | LowerCoal | 700.00 | POINT (4414.541 3553.476) | 4414.54 | 3553.48 |
212 | LowerCoal | 700.00 | POINT (4332.981 3356.503) | 4332.98 | 3356.50 |
211 | LowerCoal | 700.00 | POINT (4245.267 3102.593) | 4245.27 | 3102.59 |
[15]:
import pandas as pd
interfaces_coords = pd.concat([interfaces_coords, interfaces_coords_lowercoal])
interfaces_coords = interfaces_coords[interfaces_coords['formation'].isin(['MiddleCoal', 'LowerCoal'])].reset_index()
interfaces_coords
[15]:
index | formation | geometry | X | Y | Z | |
---|---|---|---|---|---|---|
0 | 0 | MiddleCoal | POINT (7.271 6412.662) | 7.27 | 6412.66 | 951.72 |
1 | 205 | MiddleCoal | POINT (6536.616 5044.623) | 6536.62 | 5044.62 | 945.45 |
2 | 223 | MiddleCoal | POINT (1772.333 4008.976) | 1772.33 | 4008.98 | 1008.61 |
3 | 222 | MiddleCoal | POINT (1675.385 3935.111) | 1675.39 | 3935.11 | 1004.46 |
4 | 221 | MiddleCoal | POINT (1603.059 3916.645) | 1603.06 | 3916.65 | 1000.21 |
... | ... | ... | ... | ... | ... | ... |
635 | 104 | LowerCoal | POINT (5250.137 7492.935) | 5250.14 | 7492.94 | 750.00 |
636 | 103 | LowerCoal | POINT (5247.059 7556.028) | 5247.06 | 7556.03 | 750.00 |
637 | 102 | LowerCoal | POINT (5205.510 7612.966) | 5205.51 | 7612.97 | 750.00 |
638 | 101 | LowerCoal | POINT (5156.267 7637.587) | 5156.27 | 7637.59 | 750.00 |
639 | 312 | LowerCoal | POINT (6862.853 886.647) | 6862.85 | 886.65 | 750.00 |
640 rows × 6 columns
Plotting the Interface Points#
[16]:
fig, ax = plt.subplots(1, figsize=(10, 10))
interfaces.plot(ax=ax, column='formation', legend=True, aspect='equal')
interfaces_lowercoal.plot(ax=ax, column='formation', legend=True, aspect='equal')
interfaces_coords.plot(ax=ax, column='formation', legend=True, aspect='equal')
plt.grid()
ax.set_xlabel('X [m]')
ax.set_ylabel('Y [m]')
ax.set_xlim(0, 6875)
ax.set_ylim(0, 9954)
[16]:
(0.0, 9954.0)
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.
[17]:
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
img = mpimg.imread('../images/orientations_example22.png')
plt.figure(figsize=(10, 10))
imgplot = plt.imshow(img)
plt.axis('off')
plt.tight_layout()
[18]:
strikes = gpd.read_file(file_path + 'strikes22.shp')
strikes.head()
[18]:
id | formation | Z | geometry | |
---|---|---|---|---|
0 | 4 | MiddleCoal1 | 1050 | LINESTRING (5399.405 6655.800, 4311.437 5714.023) |
1 | 3 | MiddleCoal1 | 1000 | LINESTRING (5844.133 5890.991, 3757.451 4279.814) |
2 | 2 | MiddleCoal1 | 950 | LINESTRING (6116.510 5133.876, 3277.330 3110.287) |
3 | 1 | MiddleCoal1 | 900 | LINESTRING (6231.924 4242.882, 3554.323 2383.949) |
Calculate Orientations for each formation#
[19]:
orientations_coal1 = gg.vector.calculate_orientations_from_strike_lines(gdf=strikes[strikes['formation'] == 'MiddleCoal1'].sort_values(by='Z', ascending=True).reset_index())
orientations_coal1
[19]:
dip | azimuth | Z | geometry | polarity | formation | X | Y | |
---|---|---|---|---|---|---|---|---|
0 | 3.79 | 144.85 | 925.00 | POINT (4795.021 3717.749) | 1.00 | MiddleCoal1 | 4795.02 | 3717.75 |
1 | 4.24 | 143.74 | 975.00 | POINT (4748.856 4603.742) | 1.00 | MiddleCoal1 | 4748.86 | 4603.74 |
2 | 3.59 | 141.62 | 1025.00 | POINT (4828.107 5635.157) | 1.00 | MiddleCoal1 | 4828.11 | 5635.16 |
[20]:
gradients = gpd.read_file(file_path + 'gradients22.shp')
gradients.head()
[20]:
id | formation | dZ | geometry | |
---|---|---|---|---|
0 | None | LowerCoal | 50 | LINESTRING (1199.880 9087.185, 1618.448 8957.922) |
1 | None | LowerCoal | 50 | LINESTRING (664.360 7856.104, 1307.600 7699.141) |
2 | None | LowerCoal | 50 | LINESTRING (119.607 4772.246, 1193.725 6431.128) |
3 | None | LowerCoal | 50 | LINESTRING (5207.049 8991.776, 4653.062 9558.074) |
4 | None | LowerCoal | 50 | LINESTRING (3668.198 7622.199, 3181.921 8173.107) |
[21]:
orientations_lowercoal = gg.vector.extract_orientations_from_map(gdf=gradients)
orientations_lowercoal = gg.vector.extract_xyz(gdf=orientations_lowercoal, dem=topo_raster)
orientations_lowercoal
[21]:
formation | geometry | azimuth | dip | X | Y | polarity | Z | |
---|---|---|---|---|---|---|---|---|
0 | LowerCoal | POINT (1409.164 9022.553) | 107.16 | 6.51 | 1409.16 | 9022.55 | 1.00 | 973.93 |
1 | LowerCoal | POINT (985.980 7777.623) | 103.71 | 4.32 | 985.98 | 7777.62 | 1.00 | 981.51 |
2 | LowerCoal | POINT (656.666 5601.687) | 32.92 | 1.45 | 656.67 | 5601.69 | 1.00 | 945.90 |
3 | LowerCoal | POINT (4930.056 9274.925) | 315.63 | 3.61 | 4930.06 | 9274.92 | 1.00 | 1090.31 |
4 | LowerCoal | POINT (3425.059 7897.653) | 318.57 | 3.89 | 3425.06 | 7897.65 | 1.00 | 995.92 |
5 | LowerCoal | POINT (2487.899 6960.493) | 314.81 | 4.42 | 2487.90 | 6960.49 | 1.00 | 1019.35 |
6 | LowerCoal | POINT (3529.701 7108.222) | 315.90 | 5.13 | 3529.70 | 7108.22 | 1.00 | 1067.49 |
7 | LowerCoal | POINT (2172.434 5789.427) | 316.92 | 4.88 | 2172.43 | 5789.43 | 1.00 | 1062.76 |
8 | LowerCoal | POINT (2386.335 5018.463) | 313.43 | 3.99 | 2386.33 | 5018.46 | 1.00 | 1034.22 |
9 | LowerCoal | POINT (1443.019 3995.127) | 309.88 | 4.69 | 1443.02 | 3995.13 | 1.00 | 989.47 |
10 | LowerCoal | POINT (1890.825 3479.611) | 40.77 | 0.00 | 1890.82 | 3479.61 | 1.00 | 997.89 |
11 | LowerCoal | POINT (4346.831 6503.454) | 36.23 | 1.02 | 4346.83 | 6503.45 | 1.00 | 1051.44 |
12 | LowerCoal | POINT (5197.816 5730.951) | 113.56 | 3.41 | 5197.82 | 5730.95 | 1.00 | 1057.67 |
13 | LowerCoal | POINT (4383.763 4315.208) | 122.29 | 3.91 | 4383.76 | 4315.21 | 1.00 | 1047.62 |
14 | LowerCoal | POINT (3226.547 3827.392) | 121.01 | 3.92 | 3226.55 | 3827.39 | 1.00 | 976.97 |
15 | LowerCoal | POINT (2777.203 3124.137) | 115.19 | 3.33 | 2777.20 | 3124.14 | 1.00 | 939.69 |
16 | LowerCoal | POINT (3598.949 2710.186) | 114.22 | 2.93 | 3598.95 | 2710.19 | 1.00 | 924.46 |
17 | LowerCoal | POINT (3004.953 1058.999) | 113.13 | 2.27 | 3004.95 | 1059.00 | 1.00 | 859.77 |
18 | LowerCoal | POINT (4319.132 1906.906) | 103.48 | 3.39 | 4319.13 | 1906.91 | 1.00 | 890.47 |
19 | LowerCoal | POINT (4683.839 3113.365) | 108.71 | 3.47 | 4683.84 | 3113.36 | 1.00 | 965.82 |
20 | LowerCoal | POINT (5265.525 4350.601) | 123.11 | 4.23 | 5265.53 | 4350.60 | 1.00 | 1004.28 |
21 | LowerCoal | POINT (6033.412 5581.682) | 118.78 | 3.50 | 6033.41 | 5581.68 | 1.00 | 962.60 |
22 | LowerCoal | POINT (6448.902 6720.432) | 115.24 | 3.20 | 6448.90 | 6720.43 | 1.00 | 1044.93 |
23 | LowerCoal | POINT (5911.843 3310.338) | 116.91 | 0.00 | 5911.84 | 3310.34 | 1.00 | 908.53 |
24 | LowerCoal | POINT (6308.866 2057.713) | 316.05 | 4.03 | 6308.87 | 2057.71 | 1.00 | 858.20 |
25 | LowerCoal | POINT (5600.995 1343.686) | 327.04 | 4.28 | 5600.99 | 1343.69 | 1.00 | 844.53 |
26 | LowerCoal | POINT (6331.949 934.352) | 311.05 | 3.35 | 6331.95 | 934.35 | 1.00 | 931.46 |
27 | LowerCoal | POINT (5867.216 477.313) | 320.58 | 3.76 | 5867.22 | 477.31 | 1.00 | 915.96 |
28 | LowerCoal | POINT (2760.276 9053.330) | 116.16 | 0.00 | 2760.28 | 9053.33 | 1.00 | 1003.53 |
Merging Orientations#
[22]:
import pandas as pd
orientations = pd.concat([orientations_coal1]).reset_index()
orientations['formation'] = ['MiddleCoal', 'MiddleCoal', 'MiddleCoal']
orientations = pd.concat([orientations, orientations_lowercoal]).reset_index()
orientations = orientations[orientations['formation'].isin(['LowerCoal', 'MiddleCoal'])]
orientations.head()
[22]:
level_0 | index | dip | azimuth | Z | geometry | polarity | formation | X | Y | |
---|---|---|---|---|---|---|---|---|---|---|
0 | 0 | 0.00 | 3.79 | 144.85 | 925.00 | POINT (4795.021 3717.749) | 1.00 | MiddleCoal | 4795.02 | 3717.75 |
1 | 1 | 1.00 | 4.24 | 143.74 | 975.00 | POINT (4748.856 4603.742) | 1.00 | MiddleCoal | 4748.86 | 4603.74 |
2 | 2 | 2.00 | 3.59 | 141.62 | 1025.00 | POINT (4828.107 5635.157) | 1.00 | MiddleCoal | 4828.11 | 5635.16 |
3 | 0 | NaN | 6.51 | 107.16 | 973.93 | POINT (1409.164 9022.553) | 1.00 | LowerCoal | 1409.16 | 9022.55 |
4 | 1 | NaN | 4.32 | 103.71 | 981.51 | POINT (985.980 7777.623) | 1.00 | LowerCoal | 985.98 | 7777.62 |
Plotting the Orientations#
[23]:
fig, ax = plt.subplots(1, figsize=(10, 10))
interfaces.plot(ax=ax, column='formation', legend=True, aspect='equal')
interfaces_lowercoal.plot(ax=ax, column='formation', legend=True, aspect='equal')
interfaces_coords.plot(ax=ax, column='formation', legend=True, aspect='equal')
orientations.plot(ax=ax, color='red', aspect='equal')
plt.grid()
ax.set_xlabel('X [m]')
ax.set_ylabel('Y [m]')
ax.set_xlim(0, 6875)
ax.set_ylim(0, 9954)
[23]:
(0.0, 9954.0)
GemPy Model Construction#
The structural geological model will be constructed using the GemPy
package.
[24]:
import gempy as gp
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.
Creating new Model#
[25]:
geo_model = gp.create_model('Model22')
geo_model
[25]:
Model22 2022-04-05 11:20
Initiate Data#
[26]:
gp.init_data(geo_model, [0, 6875, 0, 9954, 500, 1250], [100, 100, 100],
surface_points_df=interfaces_coords[interfaces_coords['Z'] != 0],
orientations_df=orientations,
default_values=True)
Active grids: ['regular']
[26]:
Model22 2022-04-05 11:20
Model Surfaces#
[27]:
geo_model.surfaces
[27]:
surface | series | order_surfaces | color | id | |
---|---|---|---|---|---|
0 | MiddleCoal | Default series | 1 | #015482 | 1 |
1 | LowerCoal | Default series | 2 | #9f0052 | 2 |
Mapping the Stack to Surfaces#
[28]:
gp.map_stack_to_surfaces(geo_model,
{
'Strata1': ('MiddleCoal', 'LowerCoal'),
},
remove_unused_series=True)
geo_model.add_surfaces('Basement')
[28]:
surface | series | order_surfaces | color | id | |
---|---|---|---|---|---|
0 | MiddleCoal | Strata1 | 1 | #015482 | 1 |
1 | LowerCoal | Strata1 | 2 | #9f0052 | 2 |
2 | Basement | Strata1 | 3 | #ffbe00 | 3 |
Adding additional Orientations#
[29]:
geo_model.add_orientations(X=380, Y=9550, Z=1025, surface='MiddleCoal', orientation=[107, 15, 1])
geo_model.add_orientations(X=1700, Y=9775, Z=1025, surface='MiddleCoal', orientation=[107, 15, 1])
[29]:
X | Y | Z | G_x | G_y | G_z | smooth | surface | |
---|---|---|---|---|---|---|---|---|
0 | 4795.02 | 3717.75 | 925.00 | 0.04 | -0.05 | 1.00 | 0.01 | MiddleCoal |
1 | 4748.86 | 4603.74 | 975.00 | 0.04 | -0.06 | 1.00 | 0.01 | MiddleCoal |
2 | 4828.11 | 5635.16 | 1025.00 | 0.04 | -0.05 | 1.00 | 0.01 | MiddleCoal |
32 | 380.00 | 9550.00 | 1025.00 | 0.25 | -0.08 | 0.97 | 0.01 | MiddleCoal |
33 | 1700.00 | 9775.00 | 1025.00 | 0.25 | -0.08 | 0.97 | 0.01 | MiddleCoal |
3 | 1409.16 | 9022.55 | 973.93 | 0.11 | -0.03 | 0.99 | 0.01 | LowerCoal |
4 | 985.98 | 7777.62 | 981.51 | 0.07 | -0.02 | 1.00 | 0.01 | LowerCoal |
5 | 656.67 | 5601.69 | 945.90 | 0.01 | 0.02 | 1.00 | 0.01 | LowerCoal |
6 | 4930.06 | 9274.92 | 1090.31 | -0.04 | 0.05 | 1.00 | 0.01 | LowerCoal |
7 | 3425.06 | 7897.65 | 995.92 | -0.04 | 0.05 | 1.00 | 0.01 | LowerCoal |
8 | 2487.90 | 6960.49 | 1019.35 | -0.05 | 0.05 | 1.00 | 0.01 | LowerCoal |
9 | 3529.70 | 7108.22 | 1067.49 | -0.06 | 0.06 | 1.00 | 0.01 | LowerCoal |
10 | 2172.43 | 5789.43 | 1062.76 | -0.06 | 0.06 | 1.00 | 0.01 | LowerCoal |
11 | 2386.33 | 5018.46 | 1034.22 | -0.05 | 0.05 | 1.00 | 0.01 | LowerCoal |
12 | 1443.02 | 3995.13 | 989.47 | -0.06 | 0.05 | 1.00 | 0.01 | LowerCoal |
13 | 1890.82 | 3479.61 | 997.89 | 0.00 | 0.00 | 1.00 | 0.01 | LowerCoal |
14 | 4346.83 | 6503.45 | 1051.44 | 0.01 | 0.01 | 1.00 | 0.01 | LowerCoal |
15 | 5197.82 | 5730.95 | 1057.67 | 0.05 | -0.02 | 1.00 | 0.01 | LowerCoal |
16 | 4383.76 | 4315.21 | 1047.62 | 0.06 | -0.04 | 1.00 | 0.01 | LowerCoal |
17 | 3226.55 | 3827.39 | 976.97 | 0.06 | -0.04 | 1.00 | 0.01 | LowerCoal |
18 | 2777.20 | 3124.14 | 939.69 | 0.05 | -0.02 | 1.00 | 0.01 | LowerCoal |
19 | 3598.95 | 2710.19 | 924.46 | 0.05 | -0.02 | 1.00 | 0.01 | LowerCoal |
20 | 3004.95 | 1059.00 | 859.77 | 0.04 | -0.02 | 1.00 | 0.01 | LowerCoal |
21 | 4319.13 | 1906.91 | 890.47 | 0.06 | -0.01 | 1.00 | 0.01 | LowerCoal |
22 | 4683.84 | 3113.36 | 965.82 | 0.06 | -0.02 | 1.00 | 0.01 | LowerCoal |
23 | 5265.53 | 4350.60 | 1004.28 | 0.06 | -0.04 | 1.00 | 0.01 | LowerCoal |
24 | 6033.41 | 5581.68 | 962.60 | 0.05 | -0.03 | 1.00 | 0.01 | LowerCoal |
25 | 6448.90 | 6720.43 | 1044.93 | 0.05 | -0.02 | 1.00 | 0.01 | LowerCoal |
26 | 5911.84 | 3310.34 | 908.53 | 0.00 | 0.00 | 1.00 | 0.01 | LowerCoal |
27 | 6308.87 | 2057.71 | 858.20 | -0.05 | 0.05 | 1.00 | 0.01 | LowerCoal |
28 | 5600.99 | 1343.69 | 844.53 | -0.04 | 0.06 | 1.00 | 0.01 | LowerCoal |
29 | 6331.95 | 934.35 | 931.46 | -0.04 | 0.04 | 1.00 | 0.01 | LowerCoal |
30 | 5867.22 | 477.31 | 915.96 | -0.04 | 0.05 | 1.00 | 0.01 | LowerCoal |
31 | 2760.28 | 9053.33 | 1003.53 | 0.00 | 0.00 | 1.00 | 0.01 | LowerCoal |
Showing the Number of Data Points#
[30]:
gg.utils.show_number_of_data_points(geo_model=geo_model)
[30]:
surface | series | order_surfaces | color | id | No. of Interfaces | No. of Orientations | |
---|---|---|---|---|---|---|---|
0 | MiddleCoal | Strata1 | 1 | #015482 | 1 | 327 | 5 |
1 | LowerCoal | Strata1 | 2 | #9f0052 | 2 | 313 | 29 |
2 | Basement | Strata1 | 3 | #ffbe00 | 3 | 0 | 0 |
Loading Digital Elevation Model#
[31]:
geo_model.set_topography(
source='gdal', filepath=file_path + 'raster22.tif')
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']
[31]:
Grid Object. Values:
array([[ 34.375 , 49.77 , 503.75 ],
[ 34.375 , 49.77 , 511.25 ],
[ 34.375 , 49.77 , 518.75 ],
...,
[6869.98906706, 9928.98994975, 1228.36560059],
[6869.98906706, 9938.99396985, 1228.96081543],
[6869.98906706, 9948.99798995, 1229.55761719]])
Plotting Input Data#
[32]:
gp.plot_2d(geo_model, direction='z', show_lith=False, show_boundaries=False)
plt.grid()
[33]:
gp.plot_3d(geo_model, image=False, plotter_type='basic', notebook=True)
[33]:
<gempy.plot.vista.GemPyToVista at 0x151a458fca0>
Setting the Interpolator#
[34]:
gp.set_interpolator(geo_model,
compile_theano=True,
theano_optimizer='fast_compile',
verbose=[],
update_kriging=False
)
Compiling theano function...
Level of Optimization: fast_compile
Device: cpu
Precision: float64
Number of faults: 0
Compilation Done!
Kriging values:
values
range 12120.65
$C_o$ 3497862.88
drift equations [3]
[34]:
<gempy.core.interpolator.InterpolatorModel at 0x1519d051df0>
Computing Model#
[35]:
sol = gp.compute_model(geo_model, compute_mesh=True)
Plotting Cross Sections#
[36]:
gp.plot_2d(geo_model, direction=['x', 'x', 'y', 'y'], cell_number=[25, 75, 25, 75], show_topography=True, show_data=False)
[36]:
<gempy.plot.visualization_2d.Plot2D at 0x151a5bcdbb0>
Plotting 3D Model#
[37]:
gpv = gp.plot_3d(geo_model, image=False, show_topography=True,
plotter_type='basic', notebook=True, show_lith=True, ve=5)
[ ]: