flopy.modpath.mp7 module

mp7 module. Contains the Modpath7List and Modpath7 classes.

class Modpath7(modelname='modpath7test', simfile_ext='mpsim', namefile_ext='mpnam', version='modpath7', exe_name='mp7.exe', flowmodel=None, headfilename=None, budgetfilename=None, model_ws=None, verbose=False)[source]

Bases: flopy.mbase.BaseModel

Modpath 7 base class

modelname : str
Basename for MODPATH 7 input and output files (default is ‘modpath7test’).
simfile_ext : str
Filename extension of the MODPATH 7 simulation file (default is ‘mpsim’).
namefile_ext : str
Filename extension of the MODPATH 7 namefile (default is ‘mpnam’).
version : str
String that defines the MODPATH version. Valid versions are ‘modpath7’ (default is ‘modpath7’).
exe_name : str
The name of the executable to use (the default is ‘mp7’).
flowmodel : flopy.modflow.Modflow or flopy.mf6.MFModel object
MODFLOW model
headfilename : str
Filename of the MODFLOW output head file. If headfilename is not provided then it will be set from the flowmodel (default is None).
budgetfilename : str
Filename of the MODFLOW output cell-by-cell budget file. If budgetfilename is not provided then it will be set from the flowmodel (default is None).
model_ws : str
model workspace. Directory name to create model data sets. (default is the current working directory).
verbose : bool
Print additional information to the screen (default is False).
>>> import flopy
>>> m = flopy.modflow.Modflow.load('mf2005.nam')
>>> mp = flopy.modpath.Modpath7('mf2005_mp', flowmodel=m)
classmethod create_mp7(modelname='modpath7test', trackdir='forward', flowmodel=None, exe_name='mp7', model_ws='.', verbose=False, columncelldivisions=2, rowcelldivisions=2, layercelldivisions=2, nodes=None)[source]

Create a default MODPATH 7 model using a passed flowmodel with 8 particles in user-specified node locations or every active model cell.

Parameters:
  • modelname (str) – Basename for MODPATH 7 input and output files (default is ‘modpath7test’).
  • trackdir (str) – Keyword that defines the MODPATH particle tracking direction. Available trackdir’s are ‘backward’ and ‘forward’. (default is ‘forward’)
  • flowmodel (flopy.modflow.Modflow or flopy.mf6.MFModel object) – MODFLOW model
  • exe_name (str) – The name of the executable to use (the default is ‘mp7’).
  • model_ws (str) – model workspace. Directory name to create model data sets. (default is the current working directory).
  • verbose (bool) – Print additional information to the screen (default is False).
  • columncelldivisions (int) – Number of particles in a cell in the column (x-coordinate) direction (default is 2).
  • rowcelldivisions (int) – Number of particles in a cell in the row (y-coordinate) direction (default is 2).
  • layercelldivisions (int) – Number of particles in a cell in the layer (z-coordinate) direction (default is 2).
  • nodes (int, list of ints, tuple of ints, or np.ndarray) – Nodes (zero-based) with particles. If (default is node 0).
Returns:

mp

Return type:

Modpath7 object

Examples

>>> import flopy
>>> m = flopy.modflow.Modflow.load('mf2005.nam')
>>> mp = flopy.modpath.Modpath7.create_mp7(flowmodel=m)
hdry
hnoflo
laytyp
write_name_file()[source]

Write the name file

Returns:
Return type:None
class Modpath7List(model, extension='list', unitnumber=None)[source]

Bases: flopy.pakbase.Package

List package class

write_file()[source]

Every Package needs its own write_file function