flopy.modflow.mflmt module

mflmt module. Contains the ModflowLmt class. Note that the user can access the ModflowLmt class as flopy.modflow.ModflowLmt.

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

class ModflowLmt(model, output_file_name='mt3d_link.ftl', output_file_unit=54, output_file_header='extended', output_file_format='unformatted', extension='lmt6', package_flows=[], unitnumber=None, filenames=None)[source]

Bases: flopy.pakbase.Package

MODFLOW Link-MT3DMS Package Class.

Parameters:
  • model (model object) – The model object (of type flopy.modflow.mf.Modflow) to which this package will be added.
  • output_file_name (string) – Filename for output file (default is ‘mt3d_link.ftl’)
  • unitnumber (int) – File unit number (default is 24).
  • output_file_unit (int) – Output file unit number, pertaining to the file identified by output_file_name (default is 54).
  • output_file_header (string) – Header for the output file (default is ‘extended’)
  • output_file_format ({'formatted', 'unformatted'}) – Format of the output file (default is ‘unformatted’)
  • package_flows (['sfr', 'lak', 'uzf']) – Specifies which of the advanced package flows should be added to the flow-transport link (FTL) file. The addition of these flags may quickly increase the FTL file size. Thus, the user must specifically request their amendment within the FTL file. Default is not to add these terms to the FTL file by omitting the keyword package_flows from the LMT input file. One or multiple strings can be passed as a list to the argument.
  • extension (string) – Filename extension (default is ‘lmt6’)
  • unitnumber – File unit number (default is None).
  • filenames (str or list of str) – Filenames to use for the package. If filenames=None the package name will be created using the model name and package extension. If a single string is passed the package will be set to the string. 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.

Examples

>>> import flopy
>>> m = flopy.modflow.Modflow()
>>> lmt = flopy.modflow.ModflowLmt(m, output_file_name='mt3d_linkage.ftl')
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:

lmt – ModflowLmt object.

Return type:

ModflowLmt object

Examples

>>> import flopy
>>> m = flopy.modflow.Modflow()
>>> lmt = flopy.modflow.ModflowGhb.load('test.lmt', m)
write_file()[source]

Write the package file.

Returns:
Return type:None