flopy.mf6.utils.binarygrid_util module¶
Module to read MODFLOW 6 binary grid files (*.grb) that define the model grid binary output files. The module contains the MfGrdFile class that can be accessed by the user.
-
class
MfGrdFile
(filename, precision='double', verbose=False)[source]¶ Bases:
flopy.utils.utils_def.FlopyBinaryData
The MfGrdFile class.
Parameters: - filename (str) – Name of the MODFLOW 6 binary grid file
- precision (string) – ‘single’ or ‘double’. Default is ‘double’.
- verbose (bool) – Write information to standard output. Default is False.
Notes
The MfGrdFile class provides simple ways to retrieve data from binary MODFLOW 6 binary grid files (.grb). The binary grid file contains data that can be used for post processing MODFLOW 6 model results. For example, the ia and ja arrays for a model grid.
Examples
>>> import flopy >>> gobj = flopy.utils.MfGrdFile('test.dis.grb')
-
angrot
¶ Model grid rotation angle. None if not defined in the MODFLOW 6 grid file.
Returns: angrot Return type: float
-
bot
¶ Bottom of the model cells.
Returns: bot Return type: ndarray of floats
-
cell2d
¶ cell2d data for a DISV grid. None for DIS and DISU grids.
Returns: cell2d Return type: list of lists
-
cellcenters
¶ Cell centers (x,y).
Returns: cellcenters Return type: ndarray of floats
-
delc
¶ Cell size in the column direction (x-direction). None if not defined in the MODFLOW 6 grid file.
Returns: delc Return type: ndarray of floats
-
delr
¶ Cell size in the row direction (y-direction). None if not defined in the MODFLOW 6 grid file.
Returns: delr Return type: ndarray of floats
-
grid_type
¶ Grid type defined in the MODFLOW 6 grid file.
Returns: grid_type Return type: str
-
ia
¶ CRS row pointers for the model grid.
Returns: ia Return type: ndarray of ints
-
iavert
¶ CRS cell pointers for cell vertices.
Returns: iavert Return type: ndarray of ints
-
idomain
¶ IDOMAIN for the model grid. None if not defined in the MODFLOW 6 grid file.
Returns: idomain Return type: ndarray of ints
-
iverts
¶ Vertex numbers comprising each cell for every cell in model grid.
Returns: iverts Return type: list of lists of ints
-
ja
¶ CRS column pointers for the model grid.
Returns: ja Return type: ndarray of ints
-
javert
¶ CRS vertex numbers for the vertices comprising each cell.
Returns: javerts Return type: ndarray of ints
-
modelgrid
¶ Model grid object.
Returns: modelgrid Return type: StructuredGrid, VertexGrid, UnstructuredGrid
-
ncells
¶ Number of cells.
Returns: ncells Return type: int
-
ncol
¶ Number of columns. None for DISV and DISU grids.
Returns: ncol Return type: int
-
ncpl
¶ Number of cells per layer. None for DISU grids.
Returns: ncpl Return type: int
-
nja
¶ Number of non-zero entries in the CRS column pointer vector.
Returns: nja Return type: int
-
nlay
¶ Number of layers. None for DISU grids.
Returns: nlay Return type: int
-
nodes
¶ Number of nodes.
Returns: nodes Return type: int
-
nrow
¶ Number of rows. None for DISV and DISU grids.
Returns: nrow Return type: int
-
shape
¶ Shape of the model grid (tuple).
Returns: shape Return type: tuple
-
spatialreference
¶ Spatial reference for model grid.
Returns: spatialreference Return type: SpatialReference
-
top
¶ Top of the model cells in the upper model layer for DIS and DISV grids. Top of the model cells for DISU grids.
Returns: top Return type: ndarray of floats
-
verts
¶ x,y location of each vertex that defines the model grid.
Returns: verts Return type: ndarray of floats
-
xorigin
¶ x-origin of the model grid. None if not defined in the MODFLOW 6 grid file.
Returns: xorigin Return type: float
-
yorigin
¶ y-origin of the model grid. None if not defined in the MODFLOW 6 grid file.
Returns: yorigin Return type: float