flopy.modpath.mp6 module

class Modpath6(modelname='modpathtest', simfile_ext='mpsim', namefile_ext='mpnam', version='modpath', exe_name: str | PathLike = 'mp6', modflowmodel=None, dis_file: str | PathLike | None = None, dis_unit=87, head_file: str | PathLike | None = None, budget_file: str | PathLike | None = None, model_ws: str | PathLike | None = None, external_path: str | PathLike | None = None, verbose=False, load=True, listunit=7)[source]

Bases: BaseModel

Modpath6 class.

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

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

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

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

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

  • modflowmodel (flopy.modflow.Modflow) – MODFLOW model object with one of LPF, BCF6, or UPW packages.

  • dis_file (str or PathLike) – Required dis file name.

  • dis_unit (int, default 87) – Optional dis file unit number.

  • head_file (str or PathLike) – Required filename of the MODFLOW output head file.

  • budget_file (str or PathLike) – Required filename of the MODFLOW output cell-by-cell budget file.

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

  • external_path (str or PathLike, optional) – Location for external files.

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

  • load (bool, default True) – Load model.

  • listunit (int, default 7) – LIST file unit number.

create_mpsim(simtype='pathline', trackdir='forward', packages='WEL', start_time=0, default_ifaces=None, ParticleColumnCount=4, ParticleRowCount=4, MinRow=0, MinColumn=0, MaxRow=None, MaxColumn=None)[source]

Create a MODPATH simulation file using available MODFLOW boundary package data.

Parameters:
  • simtype (str) –

    Keyword defining the MODPATH simulation type. Available simtype’s

    are ‘endpoint’, ‘pathline’, and ‘timeseries’. (default is ‘PATHLINE’)

  • trackdir (str) – Keyword that defines the MODPATH particle tracking direction. Available trackdir’s are ‘backward’ and ‘forward’. (default is ‘forward’)

  • packages (None, str or list of strings) – Keyword defining the modflow packages used to create initial particle locations. Supported packages are ‘WEL’, ‘MNW2’ and ‘RCH’. (default is ‘WEL’).

  • start_time (float or tuple) –

    Sets the value of MODPATH reference time relative to MODFLOW time. float : value of MODFLOW simulation time at which to start the particle tracking simulation.

    Sets the value of MODPATH ReferenceTimeOption to 1.

    tuple(period, step, time fraction) MODFLOW stress period, time step and fraction

    between 0 and 1 at which to start the particle tracking simulation. Sets the value of MODPATH ReferenceTimeOption to 2.

  • default_ifaces (list) – List of cell faces (1-6; see MODPATH6 manual, fig. 7) on which to start particles. (default is None, meaning ifaces will vary depending on packages argument above)

  • ParticleRowCount (int) – Rows of particles to start on each cell index face (iface).

  • ParticleColumnCount (int) – Columns of particles to start on each cell index face (iface).

Returns:

mpsim

Return type:

ModpathSim object

getmf()[source]
getsim()[source]
property mf
next_ext_unit()[source]

Function to encapsulate next_ext_unit attribute

property sim
write_name_file()[source]

Write the name file

Return type:

None

class Modpath6List(model, extension='list', listunit=7)[source]

Bases: Package

List package class

write_file()[source]

Every Package needs its own write_file function