flopy.modflow.mfbcf Module

class flopy.modflow.mfbcf.ModflowBcf(model, ipakcb=None, intercellt=0, laycon=3, trpy=1.0, hdry=-1e+30, iwdflg=0, wetfct=0.1, iwetit=1, ihdwet=0, tran=1.0, hy=1.0, vcont=1.0, sf1=1e-05, sf2=0.15, wetdry=-0.01, extension='bcf', unitnumber=None, filenames=None)

MODFLOW Block Centered Flow Package Class.

Parameters:

model : model object

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

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 53)

intercellt : int

Intercell transmissivities, harmonic mean (0), arithmetic mean (1), logarithmetic 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 computd for cells that become wet (default is 0)

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)

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 (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)

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 ipakcbc 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 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.

Examples

>>> import flopy
>>> ml = flopy.modflow.Modflow()
>>> bcf = flopy.modflow.ModflowBcf(ml)
check(f=None, verbose=True, level=1)

Check package data for common errors.

Parameters:

f : str or file handle

String defining file name or file handle for summary file of check method output. If a sting is passed a file handle is created. If f is None, check method does not write results to a summary file. (default is None)

verbose : bool

Boolean flag used to determine if check method results are written to the screen

level : int

Check method analysis level. If level=0, summary checks are performed. If level=1, full checks are performed.

Returns:

None

Examples

>>> import flopy
>>> m = flopy.modflow.Modflow.load('model.nam')
>>> m.dis.check()
static load(f, model, ext_unit_dict=None)

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:

wel : ModflowBcf object

ModflowBcf object.

Examples

>>> import flopy
>>> m = flopy.modflow.Modflow()
>>> wel = flopy.modflow.ModflowBcf.load('test.bcf', m)
plot(**kwargs)

Plot 2-D, 3-D, transient 2-D, and stress period list (MfList) package input data

Parameters:

**kwargs : dict

filename_base
: str

Base file name that will be used to automatically generate file names for output image files. Plots will be exported as image files if file_name_base is not None. (default is None)

file_extension
: str

Valid matplotlib.pyplot file extension for savefig(). Only used if filename_base is not None. (default is ‘png’)

mflay
: int

MODFLOW zero-based layer number to return. If None, then all all layers will be included. (default is None)

kper
: int

MODFLOW zero-based stress period number to return. (default is zero)

key
: str

MfList dictionary key. (default is None)

Returns:

axes : list

Empty list is returned if filename_base is not None. Otherwise a list of matplotlib.pyplot.axis are returned.

Examples

>>> import flopy
>>> ml = flopy.modflow.Modflow.load('test.nam')
>>> ml.dis.plot()
to_shapefile(filename, **kwargs)

Export 2-D, 3-D, and transient 2-D model data to shapefile (polygons). Adds an attribute for each layer in each data array

Parameters:

filename : str

Shapefile name to write

Returns:

None

Examples

>>> import flopy
>>> ml = flopy.modflow.Modflow.load('test.nam')
>>> ml.lpf.to_shapefile('test_hk.shp')
write_file()

Write the package file.

Returns:None