Read SGeMS Grid

Read SGeMS Grid file formats. The examples shown here are downloaded from Multiple-point Geostatistics stochastic modeling with training images website.

# sphinx_gallery_thumbnail_number = 2
import pyvista
from pyvista import examples
from PVGeo.gslib import SGeMSGridReader
grid_url = 'http://www.trainingimages.org/uploads/3/4/7/0/34703305/a_wlreferencecat.zip'
filename, _ = examples.downloads._retrieve_file(grid_url, 'A_WLreferenceCAT.sgems.zip')

grid = SGeMSGridReader().apply(filename)
print(grid)

Out:

UniformGrid (0x7f23c47305e8)
  N Cells:      78000
  N Points:     157122
  X Bounds:     0.000e+00, 2.600e+02
  Y Bounds:     0.000e+00, 3.000e+02
  Z Bounds:     0.000e+00, 1.000e+00
  Dimensions:   261, 301, 2
  Spacing:      1.000e+00, 1.000e+00, 1.000e+00
  N Scalars:    1
warped = grid.cell_data_to_point_data().warp_by_scalar(scale_factor=5)
warped.plot()
../../_images/sphx_glr_read-sgems-grid_001.png
grid_url = 'http://www.trainingimages.org/uploads/3/4/7/0/34703305/maules_creek_3d.zip'
filename, _ = examples.downloads._retrieve_file(grid_url, 'Maules_Creek_3D.SGEMS.zip')

grid = SGeMSGridReader().apply(filename)
grid.plot(categories=True)
../../_images/sphx_glr_read-sgems-grid_002.png
grid_url = 'http://www.trainingimages.org/uploads/3/4/7/0/34703305/ti_horizons_continuous.zip'
filename, _ = examples.downloads._retrieve_file(grid_url, 'TI_horizons_continuous.SGEMS.zip')

grid = SGeMSGridReader().apply(filename)
grid.threshold([-4, 1.06]).plot(clim=grid.get_data_range())
../../_images/sphx_glr_read-sgems-grid_003.png
grid_url = 'http://www.trainingimages.org/uploads/3/4/7/0/34703305/ti.zip'
filename, _ = examples.downloads._retrieve_file(grid_url, 'ti.sgems.zip')

grid = SGeMSGridReader().apply(filename)
grid.plot(scalars='photo', cpos='xy', cmap='bone')
../../_images/sphx_glr_read-sgems-grid_004.png
grid.plot(scalars='seismic', cpos='xy')
../../_images/sphx_glr_read-sgems-grid_005.png

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

Gallery generated by Sphinx-Gallery