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')
- property angrot¶
Model grid rotation angle. None if not defined in the MODFLOW 6 grid file.
- Returns
angrot
- Return type
float
- property bot¶
Bottom of the model cells.
- Returns
bot
- Return type
ndarray of floats
- property cell2d¶
cell2d data for a DISV grid. None for DIS and DISU grids.
- Returns
cell2d
- Return type
list of lists
- property cellcenters¶
Cell centers (x,y).
- Returns
cellcenters
- Return type
ndarray of floats
- property 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
- property 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
- property grid_type¶
Grid type defined in the MODFLOW 6 grid file.
- Returns
grid_type
- Return type
str
- property ia¶
CRS row pointers for the model grid.
- Returns
ia
- Return type
ndarray of ints
- property iavert¶
CRS cell pointers for cell vertices.
- Returns
iavert
- Return type
ndarray of ints
- property idomain¶
IDOMAIN for the model grid. None if not defined in the MODFLOW 6 grid file.
- Returns
idomain
- Return type
ndarray of ints
- property iverts¶
Vertex numbers comprising each cell for every cell in model grid.
- Returns
iverts
- Return type
list of lists of ints
- property ja¶
CRS column pointers for the model grid.
- Returns
ja
- Return type
ndarray of ints
- property javert¶
CRS vertex numbers for the vertices comprising each cell.
- Returns
javerts
- Return type
ndarray of ints
- property modelgrid¶
Model grid object.
- Returns
modelgrid
- Return type
- property ncells¶
Number of cells.
- Returns
ncells
- Return type
int
- property ncol¶
Number of columns. None for DISV and DISU grids.
- Returns
ncol
- Return type
int
- property ncpl¶
Number of cells per layer. None for DISU grids.
- Returns
ncpl
- Return type
int
- property nja¶
Number of non-zero entries in the CRS column pointer vector.
- Returns
nja
- Return type
int
- property nlay¶
Number of layers. None for DISU grids.
- Returns
nlay
- Return type
int
- property nodes¶
Number of nodes.
- Returns
nodes
- Return type
int
- property nrow¶
Number of rows. None for DISV and DISU grids.
- Returns
nrow
- Return type
int
- property shape¶
Shape of the model grid (tuple).
- Returns
shape
- Return type
tuple
- property 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
- property verts¶
x,y location of each vertex that defines the model grid.
- Returns
verts
- Return type
ndarray of floats
- property xorigin¶
x-origin of the model grid. None if not defined in the MODFLOW 6 grid file.
- Returns
xorigin
- Return type
float
- property yorigin¶
y-origin of the model grid. None if not defined in the MODFLOW 6 grid file.
- Returns
yorigin
- Return type
float