flopy.modflow.mfparbc module¶
mfparbc module. Contains the ModflowParBc class. Note that the user can access the ModflowParBc class as flopy.modflow.ModflowParBc.
-
class
ModflowParBc
(bc_parms)[source]¶ Bases:
object
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.
-
classmethod
load
(f, npar, dt, model, ext_unit_dict=None, verbose=False)[source]¶ 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
Return type: dictionary object with parameters in file f
Examples
-
static
loadarray
(f, npar, verbose=False)[source]¶ 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
Return type: dictionary object with parameters in file f
Examples
-
static
parameter_bcfill
(model, shape, parm_dict, pak_parms)[source]¶ 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 – Filled array resulting from applications of zone, mult, pval, and parameter data.
Return type: numpy array
Examples
for rch and evt >>> data = flopy.modflow.mfparbc.ModflowParBc.parameter_bcfill(m, (nrow, ncol), >>> …….’rech’, parm_dict, pak_parms)
- model (model object) – The model object (of type
-
classmethod