mfsetup.tmr module

mfsetup.tmr.get_qx_qy_qz(cell_budget_file, binary_grid_file=None, cell_connections_df=None, version='mf6', kstpkper=(0, 0), specific_discharge=False, headfile=None, modelgrid=None)[source]

Get 2 or 3D arrays of cell by cell flows across the cell faces (for structured grid models).

Parameters:
cell_budget_filestr, pathlike, or instance of flopy.utils.binaryfile.CellBudgetFile

File path or pointer to MODFLOW cell budget file.

binary_grid_filestr or pathlike

File path to MODFLOW 6 binary grid (*.dis.grb) file. Not needed for MFNWT

cell_connections_dfDataFrame

DataFrame of cell connections that can be provided as an alternative to bindary_grid_file, to avoid having to get the connections with each call to get_qx_qy_qz. This can be produced by the :meth:mfsetup.grid.MFsetupGrid.intercell_connections method. Must have following columns:

n

from zero-based node number

kn

from zero-based layer

in

from zero-based row

jn

from zero-based column

m

to zero-based node number

kn

to zero-based layer

in

to zero-based row

jn

to zero-based column

versionstr

MODFLOW version- ‘mf6’ or other. If not ‘mf6’, the cell budget output is assumed to be formatted similar to a MODFLOW 2005 style model.

model_top2D numpy array of shape (nrow, ncol)

Model top elevations (only needed for modflow 2005 style models without a binary grid file)

model_bottom_array3D numpy array of shape (nlay, nrow, ncol)

Model bottom elevations (only needed for modflow 2005 style models without a binary grid file)

kstpkpertuple

zero-based (time step, stress period)

specific_dischargebool

Option to return arrays of specific discharge (1D vector components) instead of volumetric fluxes. By default, False

headfilestr, pathlike, or instance of flopy.utils.binaryfile.HeadFile

File path or pointer to MODFLOW head file. Only required if specific_discharge=True

modelgridinstance of MFsetupGrid object

Defaults to None, only required if specific_discharge=True

Returns:
Qx, Qy, Qztuple of 2 or 3D numpy arrays

Volumetric or specific discharge fluxes across cell faces.