flopy.modflow.mfswr1 module

mfswr module. Contains the ModflowSwr1 class. Note that the user can access the ModflowSwr1 class as flopy.modflow.ModflowSwr1.

Additional information for this MODFLOW process can be found at the Online MODFLOW Guide.

class ModflowSwr1(model, extension='swr', unitnumber=None, filenames=None)[source]

Bases: flopy.pakbase.Package

MODFLOW Surface-Water Routing Class.

Parameters:
  • model (model object) – The model object (of type flopy.modflow.mf.Modflow) to which this package will be added.
  • extension (string) – Filename extension (default is ‘swr’)
  • unitnumber (int) – File unit number (default is None).
  • filenames (str or list of str) – Filenames to use for the package. If filenames=None the package name will be created using the model name and package extension. If a single string is passed the package will be set to the string. Default is None.

Notes

SWR1 Class is only used to write SWR1 filename to name file. Full functionality still needs to be implemented.

Examples

>>> import flopy
>>> m = flopy.modflow.Modflow()
>>> swr = flopy.modflow.ModflowSwr1(m)
classmethod load(f, model, 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: class:flopy.modflow.mf.Modflow) to which this package will be added.
  • ext_unit_dict (dictionary, optional) – If the arrays in the file are specified using EXTERNAL, or older style array control records, then f should be a file handle. In this case ext_unit_dict is required, which can be constructed using the function flopy.utils.mfreadnam.parsenamefile.
Returns:

swr – ModflowSwr1 object (of type flopy.modflow.mfbas.ModflowSwr1)

Return type:

ModflowSwr1 object

Notes

Load method still needs to be implemented.

Examples

>>> import flopy
>>> m = flopy.modflow.Modflow()
>>> swr = flopy.modflow.ModflowSwr1.load('test.swr', m)
write_file()[source]

Write the package file.

Returns:
Return type:None