flopy.modflow.mfsub Module

mfsub module. Contains the ModflowSub class. Note that the user can access the ModflowSub class as flopy.modflow.ModflowSub.

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

class flopy.modflow.mfsub.ModflowSub(model, ipakcb=None, isuboc=0, idsave=None, idrest=None, nndb=1, ndb=1, nmz=1, nn=20, ac1=0.0, ac2=0.2, itmin=5, ln=0, ldn=0, rnb=1, hc=100000.0, sfe=0.0001, sfv=0.001, com=0.0, dp=[1e-06, 6e-06, 0.0006], dstart=1.0, dhc=100000.0, dcom=0.0, dz=1.0, nz=1, ids15=None, ids16=None, extension='sub', unitnumber=None, filenames=None)

MODFLOW SUB Package Class.

Parameters:

model : model object

The model object (of type flopy.modflow.mf.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 0).

isuboc : int

isuboc is a flag used to control output of information generated by the SUB Package. (default is 0).

idsave : int

idsave is a flag and a unit number on which restart records for delay interbeds will be saved at the end of the simulation. (default is 0).

idrest : int

idrest is a flag and a unit number on which restart records for delay interbeds will be read in at the start of the simulation (default is 0).

nndb : int

nndb is the number of systems of no-delay interbeds. (default is 1).

ndb : int

ndb is the number of systems of delay interbeds. (default is 1).

nmz : int

nmz is the number of material zones that are needed to define the hydraulic properties of systems of delay interbeds. Each material zone is defined by a combination of vertical hydraulic conductivity, elastic specific storage, and inelastic specific storage. (default is 1).

nn : int

nn is the number of nodes used to discretize the half space to approximate the head distributions in systems of delay interbeds. (default is 20).

ac1 : float

ac1 is an acceleration parameter. This parameter is used to predict the aquifer head at the interbed boundaries on the basis of the head change computed for the previous iteration. A value of 0.0 results in the use of the aquifer head at the previous iteration. Limited experience indicates that optimum values may range from 0.0 to 0.6. (default is 0).

ac2 : float

ac2 is an acceleration parameter. This acceleration parameter is a multiplier for the head changes to compute the head at the new iteration. Values are normally between 1.0 and 2.0, but the optimum is probably closer to 1.0 than to 2.0. However this parameter also can be used to help convergence of the iterative solution by using values between 0 and 1. (default is 0.2).

itmin : int

ITMIN is the minimum number of iterations for which one-dimensional equations will be solved for flow in interbeds when the Strongly Implicit Procedure (SIP) is used to solve the ground-water flow equations. If the current iteration level is greater than ITMIN and the SIP convergence criterion for head closure (HCLOSE) is met at a particular cell, the one-dimensional equations for that cell will not be solved. The previous solution will be used. The value of ITMIN is not used if a solver other than SIP is used to solve the ground-water flow equations. (default is 5).

ln : int or array of ints (nndb)

ln is a one-dimensional array specifying the model layer assignments for each system of no-delay interbeds. (default is 0).

ldn : int or array of ints (ndb)

ldn is a one-dimensional array specifying the model layer assignments for each system of delay interbeds.(default is 0).

rnb : float or array of floats (ndb, nrow, ncol)

rnb is an array specifying the factor nequiv at each cell for each system of delay interbeds. The array also is used to define the areal extent of each system of interbeds. For cells beyond the areal extent of the system of interbeds, enter a number less than 1.0 in the corresponding element of this array. (default is 1).

hc : float or array of floats (nndb, nrow, ncol)

hc is an array specifying the preconsolidation head or preconsolidation stress in terms of head in the aquifer for systems of no-delay interbeds. For any model cells in which specified HC is greater than the corresponding value of starting head, the value of HC will be set to that of starting head. (default is 100000).

sfe : float or array of floats (nndb, nrow, ncol)

sfe is an array specifying the dimensionless elastic skeletal storage coefficient for systems of no-delay interbeds. (default is 1.e-4).

sfv : float or array of floats (nndb, nrow, ncol)

sfv is an array specifying the dimensionless inelastic skeletal storage coefficient for systems of no-delay interbeds. (default is 1.e-3).

com : float or array of floats (nndb, nrow, ncol)

com is an array specifying the starting compaction in each system of no-delay interbeds. Compaction values computed by the package are added to values in this array so that printed or stored values of compaction and land subsidence may include previous components. Values in this array do not affect calculations of storage changes or resulting compaction. For simulations in which output values are to reflect compaction and subsidence since the start of the simulation, enter zero values for all elements of this array. (default is 0).

dp : list or array of floats (nmz, 3)

Data item includes nmz records, each with a value of vertical hydraulic conductivity, elastic specific storage, and inelastic specific storage. (default is [1.e-6, 6.e-6, 6.e-4]).

dstart : float or array of floats (ndb, nrow, ncol)

dstart is an array specifying starting head in interbeds for systems of delay interbeds. For a particular location in a system of interbeds, the starting head is applied to every node in the string of nodes that approximates flow in half of a doubly draining interbed. (default is 1).

dhc : float or array of floats (ndb, nrow, ncol)

dhc is an array specifying the starting preconsolidation head in interbeds for systems of delay interbeds. For a particular location in a system of interbeds, the starting preconsolidation head is applied to every node in the string of nodes that approximates flow in half of a doubly draining interbed. For any location at which specified starting preconsolidation head is greater than the corresponding value of the starting head, Dstart, the value of the starting preconsolidation head will be set to that of the starting head. (default is 100000).

dcom : float or array of floats (ndb, nrow, ncol)

dcom is an array specifying the starting compaction in each system of delay interbeds. Compaction values computed by the package are added to values in this array so that printed or stored values of compaction and land subsidence may include previous components. Values in this array do not affect calculations of storage changes or resulting compaction. For simulations in which output values are to reflect compaction and subsidence since the start of the simulation, enter zero values for all elements of this array. (default is 0).

dz : float or array of floats (ndb, nrow, ncol)

dz is an array specifying the equivalent thickness for a system of delay interbeds. (default is 1).

nz : int or array of ints (ndb, nrow, ncol)

nz is an array specifying the material zone numbers for systems of delay interbeds. The zone number for each location in the model grid selects the hydraulic conductivity, elastic specific storage, and inelastic specific storage of the interbeds. (default is 1).

ids15 : list or array of ints (12)

Format codes and unit numbers for subsidence, compaction by model layer, compaction by interbed system, vertical displacement, no-delay preconsolidation, and delay preconsolidation will be printed. If ids15 is None and isuboc>0 then print code 0 will be used for all data which is output to the binary subsidence output file (unit=1051). The 12 entries in ids15 correspond to ifm1, iun1, ifm2, iun2, ifm3, iun3, ifm4, iun4, ifm5, iun5, ifm6, and iun6 variables. (default is None).

ids16 : list or array of ints (isuboc, 17)

Stress period and time step range and print and save flags used to control printing and saving of information generated by the SUB Package during program execution. Each row of ids16 corresponds to isp1, isp2, its1, its2, ifl1, ifl2, ifl3, ifl4, ifl5, ifl6, ifl7, ifl8, ifl9, ifl10, ifl11, ifl12, and ifl13 variables for isuboc entries. isp1, isp2, its1, and its2 are stress period and time step ranges. ifl1 and ifl2 control subsidence printing and saving. ifl3 and ifl4 control compaction by model layer printing and saving. ifl5 and ifl6 control compaction by interbed system printing and saving. ifl7 and ifl8 control vertical displacement printing and saving. ifl9 and ifl10 control critical head for no-delay interbeds printing and saving. ifl11 and ifl12 control critical head for delay interbeds printing and saving. ifl13 controls volumetric budget for delay interbeds printing. If ids16 is None and isuboc>0 then all available subsidence output will be printed and saved to the binary subsidence output file (unit=1051). (default is None).

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 and other sub output files will be created using the model name and .cbc and swt output extensions (for example, modflowtest.cbc), if ipakcbc and other sub output files (dataset 15) are numbers greater than zero. If a single string is passed the package name will be set to the string and other sub output files will be set to the model name with the appropriate output file extensions. To define the names for all package files (input and output) the length of the list of strings should be 9. 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. Parameters are not supported in the SUB Package.

Examples

>>> import flopy
>>> m = flopy.modflow.Modflow()
>>> sub = flopy.modflow.ModflowSub(m)
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.

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:

sub : ModflowSub object

Examples

>>> import flopy
>>> m = flopy.modflow.Modflow()
>>> sub = flopy.modflow.ModflowSub.load('test.sub', 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(check=False)

Write the package file.

Returns:None