flopy.modflow.mfflwob Module

class flopy.modflow.mfflwob.ModflowFlwob(model, nqfb=0, nqcfb=0, nqtfb=0, iufbobsv=0, tomultfb=1.0, nqobfb=[], nqclfb=[], obsnam=[], irefsp=[], toffset=[], flwobs=[], layer=[], row=[], column=[], factor=[], flowtype=None, extension=['chob', 'obc', 'gbob', 'obg', 'drob', 'obd', 'rvob', 'obr'], unitnumber=[40, 140, 41, 141, 42, 142, 43, 143])

Head-dependent flow boundary Observation package class


nqfb : int

Number of cell groups for the head-dependent flow boundary observations

nqcfb : int

Greater than or equal to the total number of cells in all cell groups

nqtfb : int

Total number of head-dependent flow boundary observations for all cell groups

iufbobsv : int

unit number where output is saved

tomultfb : float

Time-offset multiplier for head-dependent flow boundary observations. The product of tomultfb and toffset must produce a time value in units consistent with other model input. tomultfb can be dimensionless or can be used to convert the units of toffset to the time unit used in the simulation.

nqobfb : int of length nqfb

The number of times at which flows are observed for the group of cells

nqclfb : int of length nqfb

Is a flag, and the absolute value of nqclfb is the number of cells in the group. If nqclfb is less than zero, factor = 1.0 for all cells in the group.

obsnam : string list of length nqtfb

Observation name

irefsp : int of length ngtfb

Stress period to which the observation time is referenced. The reference point is the beginning of the specified stress period.

toffset : float list of length nqtfb

Is the time from the beginning of the stress period irefsp to the time of the observation. toffset must be in units such that the product of toffset and tomultfb are consistent with other model input. For steady state observations, specify irefsp as the steady state stress period and toffset less than or equal to perlen of the stress period. If perlen is zero, set toffset to zero. If the observation falls within a time step, linearly interpolation is used between values at the beginning and end of the time step.

flwobs : float list of length nqtfb

Observed flow value from the head-dependent flow boundary into the aquifer (+) or the flow from the aquifer into the boundary (-)

layer : int list of length(nqfb, nqclfb)

layer index for the cell included in the cell group

row : int list of length(nqfb, nqclfb)

row index for the cell included in the cell group

column : int list of length(nqfb, nqclfb)

column index of the cell included in the cell group

factor : float list of length(nqfb, nqclfb)

Is the portion of the simulated gain or loss in the cell that is included in the total gain or loss for this cell group (fn of eq. 5).

flowtype : string

String that corresponds to the head-dependent flow boundary condition type (CHD, GHB, DRN, RIV)

extension : list of string

Filename extension (default is [‘chob’,’obc’,’gbob’,’obg’,’drob’,’obd’,


unitnumber : list of int

File unit number (default is [40, 140, 41, 141, 42, 142, 43, 143])

See also


check(f=None, verbose=True, level=1)

Check package data for common errors.


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.




>>> import flopy
>>> m = flopy.modflow.Modflow.load('model.nam')
>>> m.dis.check()
load(model, pack_type, f, nper=None, pop_key_list=None, check=True, unitnumber=None, ext_unit_dict=None)

The load method has not been implemented for this package.


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


**kwargs : dict

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

: str

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

: int

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

: int

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

: str

MfList dictionary key. (default is None)


axes : list

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


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


filename : str

Shapefile name to write




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

Write the package file