gemgis.visualization.create_temperature_map
gemgis.visualization.create_temperature_map#
- gemgis.visualization.create_temperature_map(dem: rasterio.io.DatasetReader, mesh: pyvista.core.pointset.PolyData, name: str = 'Thickness [m]', apply_threshold: bool = True, tsurface: Union[float, int] = 10, gradient: Union[float, int] = 0.03) pyvista.core.pointset.PolyData #
Creating a temperature map for a surface at depth taking the topography into account
- Parameters
dem (rasterio.io.DatasetReader) – Digital Elevation Model of the area
mesh (pv.core.pointset.PolyData) – PolyData dataset for which the temperature at depth will be calculated
name (str) – Name of the array to be added to the mesh, e.g.
name='Thickness [m]'
, default is'Thickness [m]'
apply_threshold (bool) – Variable to apply a threshold to the mesh to remove vertices that were located above the topography. Options include:
True
orFalse
, default set toTrue
tsurface (Union[float, int]) – Surface temperature in degrees Celsius, e.g.
tsurface=10
, default is10
degrees Cgradient (Union[float, int]) – Geothermal gradient in degrees celsius per meter, e.g.
gradient=0.03
, default is0.03
degrees C per m
- Returns
mesh – PolyData dataset including a temperature data array
- Return type
pv.core.pointset.PolyData
New in version 1.0.x.
Example
>>> # Loading Libraries and Files >>> import gemgis as gg >>> import rasterio >>> import pyvista as pv >>> dem = rasterio.open(fp='raster.tif') >>> mesh = pv.read(filename='mesh1.vtk') >>> mesh PolyData Information N Cells 4174 N Points 2303 X Bounds 9.720e+00, 9.623e+02 Y Bounds 1.881e+02, 9.491e+02 Z Bounds 3.050e+02, 7.250e+02 N Arrays 0
>>> # Creating temperature map >>> mesh = gg.visualization.create_temperature_map(dem=dem, mesh=mesh) >>> mesh Header UnstructuredGrid Information N Cells 3946 N Points 2130 X Bounds 9.720e+00, 9.623e+02 Y Bounds 1.881e+02, 9.491e+02 Z Bounds 3.050e+02, 7.250e+02 N Arrays 2 Data Arrays Name Field Type N Comp Min Max Thickness [m] Points float64 1 9.321e-02 2.020e+02 Temperature [°C] Points float64 1 1.000e+01 1.606e+01
See also
create_depth_map
Creating depth map from PolyData dataset
create_depth_maps_from_gempy
Creating depth maps from GemPy Model Surfaces
create_thickness_maps
Creating thickness map from PolyData datasets