flopy.mfusg.mfusgbcf module

Mfusgbcf module.

Contains the MfUsgBcf class. Note that the user can access the MfUsgBcf class as flopy.mfusg.MfUsgBcf.

class MfUsgBcf(model, ipakcb=None, intercellt=0, laycon=3, trpy=1.0, hdry=-1e+30, iwdflg=0, wetfct=0.1, iwetit=1, ihdwet=0, ikvflag=0, ikcflag=0, tran=1.0, hy=1.0, vcont=1.0, kv=1.0, anglex=0.0, ksat=1.0, sf1=1e-05, sf2=0.15, wetdry=-0.01, extension='bcf', unitnumber=None, filenames=None, add_package=True)[source]

Bases: ModflowBcf

Block Centered Flow (BCF) Package Class for MODFLOW-USG.

Parameters:
  • model (model object) – The model object (of type flopy.modflow.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).

  • intercellt (int) – Intercell transmissivities, harmonic mean (0), arithmetic mean (1), logarithmic mean (2), combination (3). (default is 0)

  • laycon (int) – Layer type, confined (0), unconfined (1), constant T, variable S (2), variable T, variable S (default is 3)

  • trpy (float or array of floats (nlay)) – horizontal anisotropy ratio (default is 1.0)

  • hdry (float) – head assigned when cell is dry - used as indicator(default is -1E+30)

  • iwdflg (int) – flag to indicate if wetting is inactive (0) or not (non zero) (default is 0)

  • wetfct (float) – factor used when cell is converted from dry to wet (default is 0.1)

  • iwetit (int) – iteration interval in wetting/drying algorithm (default is 1)

  • ihdwet (int) – flag to indicate how initial head is computed for cells that become wet (default is 0)

  • ikvflag (int) – flag indicating if vertical hydraulic conductivity is input instead of leakance between two layers.

  • ikcflag (int) – flag indicating if hydraulic conductivity or transmissivity information is input for each of the nodes or whether this information is directly input for the nodal connections. The easiest input format is to provide the hydraulic conductivity or transmissivity values to the cells using a zero value for IKCFLAG.

  • anglex (float or array of floats (njag)) – is the angle (in radians) between the horizontal x-axis and the outward normal to the face between a node and its connecting nodes. The angle varies between zero and 6.283185 (two pi being 360 degrees).

  • tran (float or array of floats (nlay, nrow, ncol), optional) – transmissivity (only read if laycon is 0 or 2) (default is 1.0)

  • hy (float or array of floats (nlay, nrow, ncol)) – hydraulic conductivity (only read if laycon is 1 or 3) (default is 1.0)

  • vcont (float or array of floats (nlay-1, nrow, ncol)) – vertical leakance between layers (default is 1.0)

  • kv (float or array of floats (nlay, nrow, ncol)) – is the vertical hydraulic conductivity of the cell and the leakance is computed for each vertical connection.

  • sf1 (float or array of floats (nlay, nrow, ncol)) – specific storage (confined) or storage coefficient (unconfined), read when there is at least one transient stress period. (default is 1e-5)

  • sf2 (float or array of floats (nlay, nrow, ncol)) – specific yield, only read when laycon is 2 or 3 and there is at least one transient stress period (default is 0.15)

  • wetdry (float) – a combination of the wetting threshold and a flag to indicate which neighboring cells can cause a cell to become wet (default is -0.01)

  • ksat (float or array of floats (njag)) – inter-block saturated hydraulic conductivity or transmissivity (if IKCFLAG = 1) or the inter-block conductance (if IKCFLAG = - 1) of the connection between nodes n and m.

  • extension (string) – Filename extension (default is ‘bcf’)

  • 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 name 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.

  • add_package (bool) – Flag to add the initialised package object to the parent model object. Default is True.

Notes

Examples

>>> import flopy
>>> ml = flopy.mfusg.MfUsg()
>>> disu = flopy.mfusg.MfUsgDisU(model=ml, nlay=1, nodes=1,
             iac=[1], njag=1,ja=np.array([0]), fahl=[1.0], cl12=[1.0])
>>> bcf = flopy.mfusg.MfUsgBcf(ml)
classmethod load(f, model, 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.

  • 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:

bcf

Return type:

MfUsgBcf object

Examples

>>> import flopy
>>> m = flopy.mfusg.MfUsg()
>>> disu = flopy.mfusg.MfUsgDisU(
    model=m, nlay=1, nodes=1, iac=[1], njag=1,ja=np.array([0]), fahl=[1.0], cl12=[1.0])
>>> bcf = flopy.mfusg.MfUsgBcf.load('test.bcf', m)
write_file(f=None)[source]

Write the BCF package file.

Parameters:

f (open file object.) – Default is None, which will result in MfUsg.fn_path being opened for writing.