flopy.mt3d.mt module

class Mt3dList(model, extension='list', listunit=7)[source]

Bases: flopy.pakbase.Package

List package class

write_file()[source]

Every Package needs its own write_file function

class Mt3dms(modelname='mt3dtest', namefile_ext='nam', modflowmodel=None, ftlfilename='mt3d_link.ftl', ftlfree=False, version='mt3dms', exe_name='mt3dms.exe', structured=True, listunit=None, ftlunit=None, model_ws='.', external_path=None, verbose=False, load=True, silent=0)[source]

Bases: flopy.mbase.BaseModel

MT3DMS Model Class.

Parameters:
  • modelname (string, optional) – Name of model. This string will be used to name the MODFLOW input that are created with write_model. (the default is ‘mt3dtest’)
  • namefile_ext (string, optional) – Extension for the namefile (the default is ‘nam’)
  • modflowmodel (flopy.modflow.mf.Modflow) – This is a flopy Modflow model object upon which this Mt3dms model is based. (the default is None)
  • version (string, optional) – Version of MT3DMS to use (the default is ‘mt3dms’).
  • exe_name (string, optional) – The name of the executable to use (the default is ‘mt3dms.exe’).
  • listunit (integer, optional) – Unit number for the list file (the default is 2).
  • model_ws (string, optional) – model workspace. Directory name to create model data sets. (default is the present working directory).
  • external_path (string) – Location for external files (default is None).
  • verbose (boolean, optional) – Print additional information to the screen (default is False).
  • load (boolean, optional) – (default is True).
  • silent (integer) – (default is 0)

Notes

Examples

>>> import flopy
>>> m = flopy.mt3d.mt.Mt3dms()
get_nrow_ncol_nlay_nper()[source]
classmethod load(f, version='mt3dms', exe_name='mt3dms.exe', verbose=False, model_ws='.', load_only=None, forgive=False, modflowmodel=None)[source]

Load an existing model.

Parameters:
  • f (string) – Full path and name of MT3D name file.
  • version (string) – The version of MT3D (mt3dms, or mt3d-usgs) (default is mt3dms)
  • exe_name (string) – The name of the executable to use if this loaded model is run. (default is mt3dms.exe)
  • verbose (bool) – Write information on the load process if True. (default is False)
  • model_ws (string) – The path for the model workspace. (default is the current working directory ‘.’)
  • load_only (list of strings) – Filetype(s) to load (e.g. [‘btn’, ‘adv’]) (default is None, which means that all will be loaded)
  • forgive (bool, optional) – Option to raise exceptions on package load failure, which can be useful for debugging. Default False.
  • modflowmodel (flopy.modflow.mf.Modflow) – This is a flopy Modflow model object upon which this Mt3dms model is based. (the default is None)
Returns:

mt – flopy Mt3d model object

Return type:

flopy.mt3d.mt.Mt3dms

Notes

The load method does not retain the name for the MODFLOW-generated FTL file. This can be added manually after the MT3D model has been loaded. The syntax for doing this manually is mt.ftlfilename = ‘example.ftl’

Examples

>>> import flopy
>>> f = 'example.nam'
>>> mt = flopy.mt3d.mt.Mt3dms.load(f)
>>> mt.ftlfilename = 'example.ftl'
static load_mas(fname)[source]

Load an mt3d mas file and return a numpy recarray

Parameters:fname (str) – name of MT3D mas file
Returns:r
Return type:np.ndarray
static load_obs(fname)[source]

Load an mt3d obs file and return a numpy recarray

Parameters:fname (str) – name of MT3D obs file
Returns:r
Return type:np.ndarray
load_results(**kwargs)[source]
mcomp
modelgrid
modeltime
ncol
ncomp
nlay
nper
nrow
nrow_ncol_nlay_nper
solver_tols
sr
write_name_file()[source]

Write the name file.