flopy.mt3d.mt module
- class Mt3dms(modelname='mt3dtest', namefile_ext='nam', modflowmodel=None, ftlfilename='mt3d_link.ftl', ftlfree=False, version='mt3dms', exe_name='mt3dms', structured=True, listunit=16, ftlunit=10, model_ws='.', external_path=None, verbose=False, load=True, silent=0)[source]
Bases:
BaseModel
MT3DMS Model Class.
- Parameters:
modelname (str, default "mt3dtest") – Name of model. This string will be used to name the MODFLOW input that are created with write_model.
namefile_ext (str, default "nam") – Extension for the namefile.
modflowmodel (flopy.modflow.mf.Modflow) – This is a flopy Modflow model object upon which this Mt3dms model is based.
ftlfilename (str, default "mt3d_link.ftl") – Name of flow-transport link file.
ftlfree (TYPE, default False) – If flow-link transport file is formatted (True) or unformatted (False, default).
version (str, default "mt3dms") – Mt3d version. Choose one of: “mt3dms” (default) or “mt3d-usgs”.
exe_name (str, default "mt3dms") – The name of the executable to use.
structured (bool, default True) – Specify if model grid is structured (default) or unstructured.
listunit (int, default 16) – Unit number for the list file.
ftlunit (int, default 10) – Unit number for flow-transport link file.
model_ws (str, optional) – Model workspace. Directory name to create model data sets. Default is the present working directory.
external_path (str, optional) – Location for external files.
verbose (bool, default False) – Print additional information to the screen.
load (bool, default True) – Load model.
silent (int, default 0) – Silent option.
Notes
Examples
>>> import flopy >>> m = flopy.mt3d.mt.Mt3dms()
- classmethod load(f, version='mt3dms', exe_name='mt3dms', verbose=False, model_ws='.', load_only=None, forgive=False, modflowmodel=None)[source]
Load an existing model.
- Parameters:
f (str) – Path to MT3D name file to load.
version (str, default "mt3dms") – Mt3d version. Choose one of: “mt3dms” (default) or “mt3d-usgs”.
exe_name (str, default "mt3dms") – The name of the executable to use.
verbose (bool, default False) – Print information on the load process if True.
model_ws (str, default ".") – Model workspace path. Default is the current directory.
load_only (list of str, optional) – Packages to load (e.g. [‘btn’, ‘adv’]). Default None means that all packages will be loaded.
forgive (bool, default False) – Option to raise exceptions on package load failure, which can be useful for debugging.
modflowmodel (flopy.modflow.mf.Modflow, optional) – This is a flopy Modflow model object upon which this Mt3dms model is based.
- Return type:
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 >>> mt = flopy.mt3d.mt.Mt3dms.load('example.nam') >>> 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
- property mcomp
- property modelgrid
- property modeltime
- property ncol
- property ncomp
- property nlay
- property nper
- property nrow
- property nrow_ncol_nlay_nper
- property solver_tols
- property sr