pyvista.read_grdecl

Contents

pyvista.read_grdecl#

read_grdecl(
filename: str | Path,
elevation: bool = True,
other_keywords: Sequence[str] | None = None,
) ExplicitStructuredGrid[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.DataObject.user_dict:

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