flopy.modflow.mfparbc Module

mfparbc module. Contains the ModflowParBc class. Note that the user can access the ModflowParBc class as flopy.modflow.ModflowParBc.

class flopy.modflow.mfparbc.ModflowParBc(bc_parms)

Class for loading boundary condition parameter data for MODFLOW packages that use list data (WEL, GHB, DRN, etc.). This Class is also used to create hfb6 data from hfb parameters. Class also includes methods to create data arrays using pval and boundary condition parameter data.

Notes

Parameters are supported in Flopy only when reading in existing models. Parameter values are converted to native values in Flopy and the connection to “parameters” is thus nonexistent.

get(fkey)

overload get to return a value from the bc_parms dictionary

static load(f, npar, dt, verbose=False)

Load bc property parameters from an existing bc package that uses list data (e.g. WEL, RIV, etc.).

Parameters:

f : file handle

npar : int

The number of parameters.

dt : numpy.dtype

numpy.dtype for the particular list boundary condition.

verbose : bool

Boolean flag to control output. (default is False)

Returns:

dictionary : dictionary object with parameters in file f

static loadarray(f, npar, verbose=False)

Load bc property parameters from an existing bc package that uses array data (e.g. RCH, EVT).

Parameters:

f : file handle

npar : int

The number of parameters.

verbose : bool

Boolean flag to control output. (default is False)

Returns:

dictionary : dictionary object with parameters in file f

static parameter_bcfill(model, shape, parm_dict, pak_parms)

Fill an array with parameters using zone, mult, and pval data.

Parameters:

model : model object

The model object (of type flopy.modflow.mf.Modflow) to which this package will be added.

shape : tuple

The shape of the returned data array. Typically shape is (nrow, ncol)

parm_dict : list

dictionary of parameter instances

pak_parms : dict

dictionary that includes all of the parameter data for a package

Returns:

data : numpy array

Filled array resulting from applications of zone, mult, pval, and parameter data.

Examples

for rch and evt >>> data = flopy.modflow.mfparbc.ModflowParBc.parameter_bcfill(m, (nrow, ncol), >>> .......’rech’, parm_dict, pak_parms)