pyvista.read_grdecl

Contents

pyvista.read_grdecl#

read_grdecl(filename, elevation=True, other_keywords=None)[source]#

Read a GRDECL file ('.GRDECL').

Parameters:
filenamestr | Path

The path to the GRDECL file to read.

elevationbool, default: True

If True, convert depths to elevations and flip grid along Z axis.

other_keywordssequence[str], optional

Additional keywords to read that are ignored by default.

Returns:
pyvista.ExplicitStructuredGrid

Output explicit structured grid.

Examples

Read a '.GRDECL' file.

>>> import pyvista as pv
>>> grid = pv.read('file.GRDECL')  

Unused keywords contained in the file are stored in pyvista.ExplicitStructuredGrid.user_dict:

>>> grid.user_dict  
{"MAPUNITS": ..., "GRIDUNIT": ..., ...}