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', flowmodel=None, headfilename=None, budgetfilename=None, model_ws=None, verbose=False)[source]

Bases: BaseModel

Modpath 7 class.

Parameters:
  • modelname (str, default "modpath7test") – Basename for MODPATH 7 input and output files.

  • simfile_ext (str, default "mpsim") – Filename extension of the MODPATH 7 simulation file.

  • namefile_ext (str, default mpnam") – Filename extension of the MODPATH 7 namefile.

  • version (str, default "modpath7") – String that defines the MODPATH version. Valid versions are “modpath7” (default).

  • exe_name (str, default "mp7") – The name of the executable to use.

  • flowmodel (flopy.modflow.Modflow or flopy.mf6.MFModel object) – MODFLOW model object.

  • headfilename (str, optional) – Filename of the MODFLOW output head file. If headfilename is not provided then it will be set from the flowmodel.

  • budgetfilename (str, optional) – Filename of the MODFLOW output cell-by-cell budget file. If budgetfilename is not provided then it will be set from the flowmodel.

  • model_ws (str, default ".") – Model workspace. Directory name to create model data sets. Default is the current working directory.

  • verbose (bool, default False) – Print additional information to the screen.

Examples

>>> 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)
property hdry
property hnoflo
property laytyp
write_name_file()[source]

Write the name file

Return type:

None

class Modpath7List(model, extension='list', unitnumber=None)[source]

Bases: Package

List package class

write_file()[source]

Every Package needs its own write_file function