Read SGeMS Grid

Read SGeMS Grid file formats.

# sphinx_gallery_thumbnail_number = 2
import os

import pooch

from PVGeo.gslib import SGeMSGridReader
# grid_url = 'http://www.trainingimages.org/uploads/3/4/7/0/34703305/a_wlreferencecat.zip'
url = "https://raw.githubusercontent.com/pyvista/vtk-data/master/Data/A_WLreferenceCAT.sgems"
file_path = pooch.retrieve(url=url, known_hash=None)

grid = SGeMSGridReader().apply(file_path)
grid
HeaderData Arrays
UniformGridInformation
N Cells78000
N Points157122
X Bounds0.000e+00, 2.600e+02
Y Bounds0.000e+00, 3.000e+02
Z Bounds0.000e+00, 1.000e+00
Dimensions261, 301, 2
Spacing1.000e+00, 1.000e+00, 1.000e+00
N Arrays1
NameFieldTypeN CompMinMax
varCellsint6410.000e+002.000e+00


warped = grid.cell_data_to_point_data().warp_by_scalar(scale_factor=5)
warped.plot()
read sgems grid
# grid_url = 'http://www.trainingimages.org/uploads/3/4/7/0/34703305/maules_creek_3d.zip'
url = "https://raw.githubusercontent.com/pyvista/vtk-data/master/Data/Maules_Creek_3D.SGEMS.zip"
file_paths = pooch.retrieve(url=url, known_hash=None, processor=pooch.Unzip())
file_path = [f for f in file_paths if os.path.basename(f) == "Maules_Creek_3D.SGEMS"][0]
file_path
'/home/runner/.cache/pooch/db952eed0c325d1a10fc03d53f46f9a9-Maules_Creek_3D.SGEMS.zip.unzip/Maules_Creek_3D.SGEMS'
grid = SGeMSGridReader().apply(file_path)
grid
HeaderData Arrays
UniformGridInformation
N Cells5440000
N Points5551821
X Bounds0.000e+00, 3.400e+02
Y Bounds0.000e+00, 2.000e+02
Z Bounds0.000e+00, 8.000e+01
Dimensions341, 201, 81
Spacing1.000e+00, 1.000e+00, 1.000e+00
N Arrays1
NameFieldTypeN CompMinMax
faciesCellsint6410.000e+001.000e+00


grid.plot(categories=True)
read sgems grid
# grid_url = 'http://www.trainingimages.org/uploads/3/4/7/0/34703305/ti_horizons_continuous.zip'
url = "https://raw.githubusercontent.com/pyvista/vtk-data/master/Data/TI_horizons_continuous.SGEMS.zip"
file_paths = pooch.retrieve(url=url, known_hash=None, processor=pooch.Unzip())
file_path = [f for f in file_paths if os.path.basename(f) == "TI_horizons_continuous.SGEMS"][0]
file_path
'/home/runner/.cache/pooch/cb332143f44792c75fe40091d3efa739-TI_horizons_continuous.SGEMS.zip.unzip/TI_horizons_continuous.SGEMS'
grid = SGeMSGridReader().apply(file_path)
grid.threshold([-4, 1.06]).plot(clim=grid.get_data_range())
read sgems grid
# grid_url = 'http://www.trainingimages.org/uploads/3/4/7/0/34703305/ti.zip'
url = "https://raw.githubusercontent.com/pyvista/vtk-data/master/Data/ti.sgems.zip"
file_paths = pooch.retrieve(url=url, known_hash=None, processor=pooch.Unzip())
file_path = [f for f in file_paths if os.path.basename(f) == "ti.sgems"][0]
file_path

grid = SGeMSGridReader().apply(file_path)
grid.plot(scalars="photo", cpos="xy", cmap="bone")
read sgems grid
grid.plot(scalars="seismic", cpos="xy")
read sgems grid

Total running time of the script: ( 0 minutes 40.389 seconds)

Gallery generated by Sphinx-Gallery