flopy.modflow.mffhb module

mffhb module. Contains the ModflowFhb class. Note that the user can access the ModflowFhb class as flopy.modflow.ModflowFhb.

Additional information for this MODFLOW package can be found at the Online MODFLOW Guide.

class ModflowFhb(model, nbdtim=1, nflw=0, nhed=0, ifhbss=0, ipakcb=None, nfhbx1=0, nfhbx2=0, ifhbpt=0, bdtimecnstm=1.0, bdtime=[0.0], cnstm5=1.0, ds5=None, cnstm7=1.0, ds7=None, extension='fhb', unitnumber=None, filenames=None)[source]

Bases: flopy.pakbase.Package

MODFLOW Flow and Head Boundary Package Class.

Parameters:
  • model (model object) – The model object (of type flopy.modflow.mf.ModflowFhb) to which this package will be added.
  • nbdtim (int) – The number of times at which flow and head will be specified for all selected cells. (default is 1)
  • nflw (int) – Number of cells at which flows will be specified. (default is 0)
  • nhed (int) – Number of cells at which heads will be specified. (default is 0)
  • ifhbss (int) – FHB steady-state option flag. If the simulation includes any transient-state stress periods, the flag is read but not used; in this case, specified-flow, specified-head, and auxiliary-variable values will be interpolated for steady-state stress periods in the same way that values are interpolated for transient stress periods. If the simulation includes only steady-state stress periods, the flag controls how flow, head, and auxiliary-variable values will be computed for each steady-state solution. (default is 0)
  • ipakcb (int) – A flag that is used to determine if cell-by-cell budget data should be saved. If ipakcb is non-zero cell-by-cell budget data will be saved. (default is None).
  • nfhbx1 (int) – Number of auxiliary variables whose values will be computed for each time step for each specified-flow cell. Auxiliary variables are currently not supported. (default is 0)
  • nfhbx2 (int) – Number of auxiliary variables whose values will be computed for each time step for each specified-head cell. Auxiliary variables are currently not supported. (default is 0)
  • ifhbpt (int) – Flag for printing values of data list. Applies to datasets 4b, 5b, 6b, 7b, and 8b. If ifhbpt > 0, datasets read at the beginning of the simulation will be printed. Otherwise, the datasets will not be printed. (default is 0).
  • bdtimecnstm (float) – A constant multiplier for data list bdtime. (default is 1.0)
  • bdtime (float or list of floats) – Simulation time at which values of specified flow and (or) values of specified head will be read. nbdtim values are required. (default is 0.0)
  • cnstm5 (float) – A constant multiplier for data list flwrat. (default is 1.0)
  • ds5 (list or numpy array or recarray) –

    Each FHB flwrat cell (dataset 5) is defined through definition of layer(int), row(int), column(int), iaux(int), flwrat[nbdtime](float). There should be nflw entries. (default is None) The simplest form is a list of lists with the FHB flow boundaries. This gives the form of:

    ds5 =
    [
        [lay, row, col, iaux, flwrat1, flwra2, ..., flwrat(nbdtime)],
        [lay, row, col, iaux, flwrat1, flwra2, ..., flwrat(nbdtime)],
        [lay, row, col, iaux, flwrat1, flwra2, ..., flwrat(nbdtime)],
        [lay, row, col, iaux, flwrat1, flwra2, ..., flwrat(nbdtime)]
    ]
    
  • cnstm7 (float) – A constant multiplier for data list sbhedt. (default is 1.0)
  • ds7 (list or numpy array or recarray) –

    Each FHB sbhed cell (dataset 7) is defined through definition of layer(int), row(int), column(int), iaux(int), sbhed[nbdtime](float). There should be nhed entries. (default is None) The simplest form is a list of lists with the FHB flow boundaries. This gives the form of:

    ds7 =
    [
        [lay, row, col, iaux, sbhed1, sbhed2, ..., sbhed(nbdtime)],
        [lay, row, col, iaux, sbhed1, sbhed2, ..., sbhed(nbdtime)],
        [lay, row, col, iaux, sbhed1, sbhed2, ..., sbhed(nbdtime)],
        [lay, row, col, iaux, sbhed1, sbhed2, ..., sbhed(nbdtime)]
    ]
    
  • extension (string) – Filename extension (default is ‘fhb’)
  • 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 ipakcbc 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 ipakcbc 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 not supported in FloPy.

Examples

>>> import flopy
>>> m = flopy.modflow.Modflow()
>>> fhb = flopy.modflow.ModflowFhb(m)
static get_default_dtype(nbdtim=1, structured=True, head=False)[source]
static get_empty(ncells=0, nbdtim=1, structured=True, head=False)[source]
classmethod load(f, model, nper=None, ext_unit_dict=None)[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.
Returns:

fhb – ModflowFhb object.

Return type:

ModflowFhb object

Examples

>>> import flopy
>>> m = flopy.modflow.Modflow()
>>> fhb = flopy.modflow.ModflowFhb.load('test.fhb', m)
write_file()[source]

Write the package file.

Returns:
Return type:None