flopy.seawat.swt module

class Seawat(modelname='swttest', namefile_ext='nam', modflowmodel=None, mt3dmodel=None, version='seawat', exe_name='swtv4', structured=True, listunit=2, model_ws='.', external_path=None, verbose=False, load=True, silent=0)[source]

Bases: flopy.mbase.BaseModel

SEAWAT Model Class.

Parameters:
  • modelname (string, optional) – Name of model. This string will be used to name the SEAWAT input that are created with write_model. (the default is ‘swttest’)
  • namefile_ext (string, optional) – Extension for the namefile (the default is ‘nam’)
  • version (string, optional) – Version of SEAWAT to use (the default is ‘seawat’).
  • exe_name (string, optional) – The name of the executable to use (the default is ‘swtv4.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.seawat.swt.Seawat()
change_model_ws(new_pth=None, reset_external=False)[source]

Change the model work space.

Parameters:new_pth (str) – Location of new model workspace. If this path does not exist, it will be created. (default is None, which will be assigned to the present working directory).
Returns:val – Can be used to see what packages are in the model, and can then be used with get_package to pull out individual packages.
Return type:list of strings
get_ifrefm()[source]
get_nrow_ncol_nlay_nper()[source]
classmethod load(f, version='seawat', exe_name='swtv4', verbose=False, model_ws='.', load_only=None)[source]

Load an existing model.

Parameters:
  • f (string) – Full path and name of SEAWAT name file.
  • version (string) – The version of SEAWAT (seawat) (default is seawat)
  • exe_name (string) – The name of the executable to use if this loaded model is run. (default is swtv4.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. [‘lpf’, ‘adv’]) (default is None, which means that all will be loaded)
Returns:

m – flopy Seawat model object

Return type:

flopy.seawat.swt.Seawat

Examples

>>> import flopy
>>> m = flopy.seawat.swt.Seawat.load(f)
mcomp
modelgrid
modeltime
ncol
ncomp
nlay
nper
nrow
nrow_ncol_nlay_nper
write_name_file()[source]

Write the name file

Returns:
Return type:None
class SeawatList(model, extension='list', listunit=7)[source]

Bases: flopy.pakbase.Package

List Package class

write_file()[source]

Every Package needs its own write_file function