flopy.mfusg.mfusg module
Mfusg module.
- class MfUsg(modelname='modflowusgtest', structured=True, model_ws: str | PathLike = '.', **kwargs)[source]
Bases:
Modflow
MODFLOW-USG Model Class.
- Parameters:
modelname (str or PathLike, default "modflowusgtest".) – 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.
exe_name (str, default "mfusg") – The name of the executable to use.
structured (bool, default True) – Specify if model grid is structured (default) or unstructured.
listunit (int, default 2) – Unit number for the list file.
model_ws (str, default ".") – 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.
Notes
Examples
>>> import flopy >>> usg = flopy.mfusg.MfUsg()
- classmethod load(f: str, version='mfusg', exe_name: str | PathLike = 'mfusg', verbose=False, model_ws: str | PathLike = '.', load_only=None, forgive=False, check=True)[source]
Load an existing MODFLOW-USG model.
- Parameters:
f (str) – Name of MODFLOW name file to load.
version (str, default "mfusg") – MODFLOW version. Must be “mfusg”.
exe_name (str, default "mfusg") – MODFLOW executable name.
verbose (bool, default False) – Show messages that can be useful for debugging.
model_ws (str or PathLike, default ".") – Model workspace path. Default is the current directory.
load_only (list, str or None) – List of case insensitive packages to load, e.g. [“bas6”, “lpf”]. One package can also be specified, e.g. “rch”. Default is None, which attempts to load all files. An empty list [] will not load any additional packages than is necessary. At a minimum, “dis” or “disu” is always loaded.
forgive (bool, optional, default False) – Option to raise exceptions on package load failure, which can be useful for debugging. Default False.
check (boolean, optional) – Check model input for common errors. Default True.
- Return type:
Examples
>>> import flopy >>> ml = flopy.mfusg.MfUsg.load('model.nam')