flopy.mfusg.mfusgrch module
mfusgrch module. Contains the MfUsgRch class. Note that the user can access the MfUsgRch class as flopy.mfusg.MfUsgRch.
- class MfUsgRch(model, nrchop=3, ipakcb=None, rech=0.001, irch=0, seepelev=0, mxrtzones=0, iconc=0, selev=None, iznrch=None, rchconc=None, unitnumber=None, filenames=None)[source]
Bases:
ModflowRchMFUSG TRANSPORT Recharge Package Class.
- Parameters:
model (model object) – The model object (of type
flopy.modflow.mf.Modflow) to which this package will be added.ipakcb (int, optional) – Toggles whether cell-by-cell budget data should be saved. If None or zero, budget data will not be saved (default is None).
nrchop (int) – is the recharge option code. 1: Recharge to top grid layer only 2: Recharge to layer defined in irch 3: Recharge to highest active cell (default is 3).
rech (float or filename or ndarray or dict keyed on kper (zero-based)) – Recharge flux (default is 1.e-3, which is used for all stress periods)
irch (int or filename or ndarray or dict keyed on kper (zero-based)) – Layer (for an unstructured grid) or node (for an unstructured grid) to which recharge is applied in each vertical column (only used when nrchop=2). Default is 0, which is used for all stress periods.
extension (string) – Filename extension (default is ‘rch’)
unitnumber (int) – File unit number (default is None).
filenames (str or list of str) – Filenames to use for the package and the output files. If filenames=None the package name will be created using the model name and package extension and the cbc output name will be created using the model name and .cbc extension (for example, modflowtest.cbc), if ipakcb is a number greater than zero. If a single string is passed the package will be set to the string and cbc output names will be created using the model name and .cbc extension, if ipakcb is a number greater than zero. To define the names for all package files (input and output) the length of the list of strings should be 2. Default is None.
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.
Examples
- classmethod load(f, model, nper=None, ext_unit_dict=None, check=True)[source]
Load an existing package.
- Parameters:
f (filename or file handle) – File to load.
model (model object) – The model object (of type
flopy.modflow.mf.Modflow) to which this package will be added.nper (int) – The number of stress periods. If nper is None, then nper will be obtained from the model object. (default is None).
ext_unit_dict (dictionary, optional) – If the arrays in the file are specified using EXTERNAL, or older style array control records, then f should be a file handle. In this case ext_unit_dict is required, which can be constructed using the function
flopy.utils.mfreadnam.parsenamefile.check (boolean) – Check package data for common errors. (default True)
- Returns:
rch – MfUsgRch object.
- Return type:
MfUsgRch object
Examples
>>> import flopy >>> m = flopy.modflow.Modflow() >>> rch = flopy.modflow.MfUsgRch.load('test.rch', m)