flopy.mt3d.mtsft module

class Mt3dSft(model, nsfinit=0, mxsfbc=0, icbcsf=0, ioutobs=0, ietsfr=0, isfsolv=1, wimp=0.5, wups=1.0, cclosesf=1e-06, mxitersf=10, crntsf=1.0, iprtxmd=0, coldsf=0.0, dispsf=0.0, nobssf=0, obs_sf=None, sf_stress_period_data=None, unitnumber=None, filenames=None, dtype=None, extension='sft', **kwargs)[source]

Bases: flopy.pakbase.Package

MT3D-USGS StreamFlow Transport package class

Parameters:
  • model (model object) – The model object (of type flopy.mt3dms.mt.Mt3dms) to which this package will be added.
  • nsfinit (int) – Is the number of simulated stream reaches (in SFR2, the number of stream reaches is greater than or equal to the number of stream segments). This is equal to NSTRM found on the first line of the SFR2 input file. If NSFINIT > 0 then surface-water transport is solved in the stream network while taking into account groundwater exchange and precipitation and evaporation sources and sinks. Otherwise, if NSFINIT < 0, the surface-water network as represented by the SFR2 flow package merely acts as a boundary condition to the groundwater transport problem; transport in the surface-water network is not simulated.
  • mxsfbc (int) – Is the maximum number of stream boundary conditions.
  • icbcsf (int) – Is an integer value that directs MT3D-USGS to write reach-by-reach concentration information to unit ICBCSF.
  • ioutobs (int) – Is the unit number of the output file for simulated concentrations at specified gage locations. The NAM file must also list the unit number to which observation information will be written.
  • ietsfr (int) – Specifies whether or not mass will exit the surface-water network with simulated evaporation. If IETSFR = 0, then mass does not leave via stream evaporation. If IETSFR > 0, then mass is allowed to exit the simulation with the simulated evaporation.
  • isfsolv (int) – Specifies the numerical technique that will be used to solve the transport problem in the surface water network. The first release of MT3D-USGS (version 1.0) only allows for a finite-difference formulation and regardless of what value the user specifies, the variable defaults to 1, meaning the finite-difference solution is invoked.
  • wimp (float) – Is the stream solver time weighting factor. Ranges between 0.0 and 1.0. Values of 0.0, 0.5, or 1.0 correspond to explicit, Crank-Nicolson, and fully implicit schemes, respectively.
  • wups (float) – Is the space weighting factor employed in the stream network solver. Ranges between 0.0 and 1.0. Values of 0.0 and 1.0 correspond to a central-in-space and upstream weighting factors, respectively.
  • cclosesf (float) – Is the closure criterion for the SFT solver
  • mxitersf (int) – Limits the maximum number of iterations the SFT solver can use to find a solution of the stream transport problem.
  • crntsf (float) – Is the Courant constraint specific to the SFT time step, its value has no bearing upon the groundwater transport solution time step.
  • iprtxmd (int) – A flag to print SFT solution information to the standard output file. IPRTXMD = 0 means no SFT solution information is printed; IPRTXMD = 1 means SFT solution summary information is printed at the end of every MT3D-USGS outer iteration; and IPRTXMD = 2 means SFT solution details are written for each SFT outer iteration that calls the xMD solver that solved SFT equations.
  • coldsf (array of floats) – Represents the initial concentrations in the surface water network. The length of the array is equal to the number of stream reaches and starting concentration values should be entered in the same order that individual reaches are entered for record set 2 in the SFR2 input file. To specify starting concentrations for other species in a multi-species simulation, include additional keywords, such as coldsf2, coldsf3, and so forth.
  • dispsf (array of floats) – Is the dispersion coefficient [L2 T-1] for each stream reach in the simulation and can vary for each simulated component of the simulation. That is, the length of the array is equal to the number of simulated stream reaches times the number of simulated components. Values of dispersion for each reach should be entered in the same order that individual reaches are entered for record set 2 in the SFR2 input file. To specify dispsf for other species in a multi-species simulation, include additional keywords, such as dispsf2, dispsf3, and so forth.
  • nobssf (int) – Specifies the number of surface flow observation points for monitoring simulated concentrations in streams.
  • isobs (int) – The segment number for each stream flow concentration observation point.
  • irobs (int) – The reach number for each stream flow concentration observation point.
  • ntmp (int) – The number of specified stream boundary conditions to follow. For the first stress period, this value must be greater than or equal to zero, but may be less than zero in subsequent stress periods.
  • isegbc (int) – Is the segment number for which the current boundary condition will be applied.
  • irchbc (int) – Is the reach number for which the current boundary condition will be applied.
  • isfbctyp (int) –
    Specifies, for ISEGBC/IRCHBC, what the boundary condition type is
    0 A headwater boundary. That is, for streams entering at the
    boundary of the simulated domain that need a specified concentration, use ISFBCTYP = 0
    1 a precipitation boundary. If precipitation directly to
    channels is simulated in the flow model and a non-zero concentration (default is zero) is desired, use ISFBCTYP = 1
    2 a runoff boundary condition that is not the same thing as
    runoff simulated in the UZF1 package and routed to a stream (or lake) using the IRNBND array. Users who specify runoff in the SFR2 input via the RUNOFF variable appearing in either record sets 4b or 6a and want to assign a non-zero concentration (default is zero) associated with this specified source, use ISFBCTYP=2;
    3 a constant-concentration boundary. Any ISEGBC/IRCHBC
    combination may set equal to a constant concentration boundary condition.

    4 a pumping boundary condition. 5 an evaporation boundary condition. In models where

    evaporation is simulated directly from the surface of the channel, users can use this boundary condition to specify a non-zero concentration (default is zero) associated with the evaporation losses.
  • cbcsf (float) – Is the specified concentration associated with the current boundary condition entry. Repeat CBCSF for each simulated species (NCOMP).
  • extension (string) – Filename extension (default is ‘sft’)
  • unitnumber (int) – File unit number (default is None).
  • filenames (str or list of str) – Filenames to use for the package and the output files. If filenames=None the package name will be created using the model name and package extension and the sfr output name will be created using the model name and lake concentration observation extension (for example, modflowtest.cbc and modflowtest.sftcobs.out), if ioutobs is a number greater than zero. If a single string is passed the package will be set to the string and sfr concentration observation output name will be created using the model name and .sftcobs.out extension, if ioutobs is a number greater than zero. To define the names for all package files (input and output) the length of the list of strings should be 2. Default is None.

Notes

Parameters are not supported in FloPy.

Examples

>>> import flopy
>>> datadir = 'examples/data/mt3d_test/mfnwt_mt3dusgs/sft_crnkNic'
>>> mf = flopy.modflow.Modflow.load(
...     'CrnkNic.nam', model_ws=datadir, load_only=['dis', 'bas6'])
>>> sfr = flopy.modflow.ModflowSfr2.load('CrnkNic.sfr2', mf)
>>> chk = sfr.check()
>>> # initialize an MT3D-USGS model
>>> mt = flopy.mt3d.Mt3dms.load(
...     'CrnkNic.mtnam', exe_name='mt3d-usgs_1.0.00.exe',
>>>     model_ws=datadir, load_only='btn')
>>> sft = flopy.mt3d.Mt3dSft.load(mt, 'CrnkNic.sft')
static get_default_dtype(ncomp=1)[source]

Construct a dtype for the recarray containing the list of surface water boundary conditions.

classmethod load(f, model, nsfinit=None, nper=None, ncomp=None, ext_unit_dict=None)[source]

Load an existing package.

Parameters:
  • f (filename or file handle) – File to load.
  • model (model object) – The model object (of type flopy.mt3d.mt.Mt3dms) to which this package will be added.
  • nsfinit (int) – number of simulated stream reaches in the surface-water transport process.
  • isfsolv (int) – Specifies the numerical technique that will be used to solve the transport problem in the surface water network. The first release of MT3D-USGS (version 1.0) only allows for a finite-difference formulation and regardless of what value the user specifies, the variable defaults to 1, meaning the finite-difference solution is invoked.
  • wimp (float) – Is the stream solver time weighting factor. Ranges between 0.0 and 1.0. Values of 0.0, 0.5, or 1.0 correspond to explicit, Crank-Nicolson, and fully implicit schemes, respectively.
  • wups (float) – Is the space weighting factor employed in the stream network solver. Ranges between 0.0 and 1.0. Values of 0.0 and 1.0 correspond to a central-in-space and upstream weighting factors, respectively.
  • cclosesf (float) – Is the closure criterion for the SFT solver
  • mxitersf (int) – Limits the maximum number of iterations the SFT solver can use to find a solution of the stream transport problem.
  • crntsf (float) – Is the Courant constraint specific to the SFT time step, its value has no bearing upon the groundwater transport solution time step.
  • iprtxmd (int) – a flag to print SFT solution information to the standard output file. IPRTXMD can equal 0, 1, or 2, and will write increasing amounts of solver information to the standard output file, respectively.
Returns:

sft – MT3D-USGS object

Return type:

MT3D-USGS object

Examples

>>> import os
>>> import flopy
>>> mf = flopy.modflow.Modflow.load('CrnkNic_mf.nam',
...                                 load_only=['dis', 'bas6'])
>>> sfr = flopy.modflow.ModflowSfr2.load('CrnkNic.sfr2', mf)
>>> mt = flopy.mt3d.Mt3dms.load('CrnkNic_mt.nam', load_only='btn')
>>> sft = flopy.mt3d.Mt3dSft.load('CrnkNic.sft', mt)
write_file()[source]

Write the package file

Returns:
Return type:None

Examples

>>> import flopy
>>> datadir = .examples/data/mt3d_test/mfnwt_mt3dusgs/sft_crnkNic
>>> mt = flopy.mt3d.Mt3dms.load(
...     'CrnkNic.mtnam', exe_name='mt3d-usgs_1.0.00.exe',
...     model_ws=datadir, verbose=True)
>>> mt.name = 'CrnkNic_rewrite'
>>> mt.sft.dispsf.fmtin = '(10F12.2)'
>>> mt.write_input()