flopy.mt3d.mtlkt Module

class flopy.mt3d.mtlkt.Mt3dLkt(model, nlkinit=0, mxlkbc=0, icbclk=None, ietlak=0, coldlak=0.0, lk_stress_period_data=None, dtype=None, extension='lkt', unitnumber=None, filenames=None, **kwargs)

MT3D-USGS LaKe Transport package class

Parameters:

model : model object

The model object (of type flopy.mt3dms.mt.Mt3dms) to which this package will be added.

nlkinit : int

is equal to the number of simulated lakes as specified in the flow simulation

mxlkbc : int

must be greater than or equal to the sum total of boundary conditions applied to each lake

icbclk : int

is equal to the unit number on which lake-by-lake transport information will be printed. This unit number must appear in the NAM input file required for every MT3D-USGS simulation.

ietlak : int

specifies whether or not evaporation as simulated in the flow solution will act as a mass sink. = 0, Mass does not exit the model via simulated lake evaporation != 0, Mass may leave the lake via simulated lake evaporation

coldlak : array of floats

is a vector of real numbers representing the initial concentrations in the simulated lakes. The length of the vector is equal to the number of simulated lakes, NLKINIT. Initial lake concentrations should be in the same order as the lakes appearing in the LAK input file corresponding to the MODFLOW simulation.

ntmp : int

is an integer value corresponding to the number of specified lake boundary conditions to follow. For the first stress period, this value must be greater than or equal to zero, but may be less than zero in subsequent stress periods.

ilkbc : int

is the lake number for which the current boundary condition will be specified

ilkbctyp : int

specifies what the boundary condition type is for ilakbc
1 a precipitation boundary. If precipitation directly to lakes

is simulated in the flow model and a non-zero concentration (default is zero) is desired, use ISFBCTYP = 1;

2 a runoff boundary condition that is not the same thing as

runoff simulated in the UZF1 package and routed to a lake (or stream) using the IRNBND array. Users who specify runoff in the LAK input via the RNF variable appearing in record set 9a and want to assign a non-zero concentration (default is zero) associated with this specified source, use ISFBCTYP=2;

3 a Pump boundary condition. Users who specify a withdrawl

from a lake via the WTHDRW variable appearing in record set 9a and want to assign a non-zero concentration (default is zero) associated with this specified source, use ISFBCTYP=2;

4 an evaporation boundary condition. In models where evaporation

is simulated directly from the surface of the lake, users can use this boundary condition to specify a non-zero concentration (default is zero) associated with the evaporation losses.

extension : string

Filename extension (default is ‘lkt’)

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 lake output name will be created using the model name and lake concentration observation extension (for example, modflowtest.cbc and modflowtest.lkcobs.out), if icbclk is a number greater than zero. If a single string is passed the package will be set to the string and lake concentration observation output name will be created using the model name and .lkcobs.out extension, if icbclk 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
>>> mt = flopy.mt3d.Mt3dms()
>>> lkt = flopy.mt3d.Mt3dLkt(mt)
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 get_default_dtype(ncomp=1)

Construct a dtype for the recarray containing the list of boundary conditions interacting with the lake (i.e., pumps, specified runoff...)

static load(f, model, nlak=None, nper=None, ncomp=None, 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.mt3d.mt.Mt3dms) to which this package will be added.

nlak : int

number of lakes to be simulated

nper : int

number of stress periods

ncomp : int

number of species to be simulated

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:

lkt : MT3D-USGS object

MT3D-USGS object.

Examples

>>> import flopy
>>> import os
>>> os.chdir(r'C:       emp\LKT')
>>> mt = flopy.mt3d.Mt3dms.load('lkt_mt.nam', exe_name = 'mt3d-usgs_1.0.00.exe',
>>>                            load_only='btn')
>>> lkt = flopy.mt3d.Mt3dLkt.load('test.lkt', mt)
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