Read SGeMS Grid

Read SGeMS Grid file formats.

# sphinx_gallery_thumbnail_number = 2
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._download_file('A_WLreferenceCAT.sgems')

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

Out:

UniformGrid (0x7f4d851d4dc8)
  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 Arrays:     1
warped = grid.cell_data_to_point_data().warp_by_scalar(scale_factor=5)
warped.plot()
../../_images/sphx_glr_read-sgems-grid_001.png

Out:

[(572.9532651874126, 592.9532651874126, 448.4532651874127), (130.0, 150.0, 5.5), (0.0, 0.0, 1.0)]
# grid_url = 'http://www.trainingimages.org/uploads/3/4/7/0/34703305/maules_creek_3d.zip'
filename, _ = examples.downloads._download_file('Maules_Creek_3D.SGEMS.zip')

grid = SGeMSGridReader().apply(filename)
grid.plot(categories=True)
../../_images/sphx_glr_read-sgems-grid_002.png

Out:

[(618.9217566667041, 548.9217566667041, 488.9217566667041), (170.0, 100.0, 40.0), (0.0, 0.0, 1.0)]
# grid_url = 'http://www.trainingimages.org/uploads/3/4/7/0/34703305/ti_horizons_continuous.zip'
filename, _ = examples.downloads._download_file('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

Out:

[(97.27406610312548, 97.27406610312548, 97.27406610312548), (20.0, 20.0, 20.0), (0.0, 0.0, 1.0)]
# grid_url = 'http://www.trainingimages.org/uploads/3/4/7/0/34703305/ti.zip'
filename, _ = examples.downloads._download_file('ti.sgems.zip')

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

Out:

[(175.0, 358.0, 1540.1227443055736), (175.0, 358.0, 0.5), (0.0, 1.0, 0.0)]
grid.plot(scalars='seismic', cpos='xy')
../../_images/sphx_glr_read-sgems-grid_005.png

Out:

[(175.0, 358.0, 1540.1227443055736), (175.0, 358.0, 0.5), (0.0, 1.0, 0.0)]

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

Gallery generated by Sphinx-Gallery