# autogenerated file, do not modify
from os import PathLike, curdir
from typing import Union
from flopy.mf6.data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator
from flopy.mf6.mfpackage import MFChildPackages, MFPackage
[docs]class ModflowGwfriv(MFPackage):
"""
ModflowGwfriv defines a RIV package.
Parameters
----------
auxiliary : [string]
defines an array of one or more auxiliary variable names. there is no limit on
the number of auxiliary variables that can be provided on this line; however,
lists of information provided in subsequent blocks must have a column of data
for each auxiliary variable name defined here. the number of auxiliary
variables detected on this line determines the value for naux. comments cannot
be provided anywhere on this line as they will be interpreted as auxiliary
variable names. auxiliary variables may not be used by the package, but they
will be available for use by other parts of the program. the program will
terminate with an error if auxiliary variables are specified on more than one
line in the options block.
auxmultname : string
name of auxiliary variable to be used as multiplier of riverbed conductance.
boundnames : keyword
keyword to indicate that boundary names may be provided with the list of river
cells.
print_input : keyword
keyword to indicate that the list of river information will be written to the
listing file immediately after it is read.
print_flows : keyword
keyword to indicate that the list of river flow rates will be printed to the
listing file for every stress period time step in which 'budget print' is
specified in output control. if there is no output control option and
'print_flows' is specified, then flow rates are printed for the last time step
of each stress period.
save_flows : keyword
keyword to indicate that river flow terms will be written to the file specified
with 'budget fileout' in output control.
timeseries : record ts6 filein ts6_filename
Contains data for the ts package. Data can be passed as a dictionary to the ts
package with variable names as keys and package data as values. Data for the
timeseries variable is also acceptable. See ts package documentation for more
information.
observations : record obs6 filein obs6_filename
Contains data for the obs package. Data can be passed as a dictionary to the
obs package with variable names as keys and package data as values. Data for
the observations variable is also acceptable. See obs package documentation for
more information.
mover : keyword
keyword to indicate that this instance of the river package can be used with
the water mover (mvr) package. when the mover option is specified, additional
memory is allocated within the package to store the available, provided, and
received water.
maxbound : integer
integer value specifying the maximum number of rivers cells that will be
specified for use during any stress period.
stress_period_data : [list]
"""
auxiliary = ArrayTemplateGenerator(("gwf6", "riv", "options", "auxiliary"))
ts_filerecord = ListTemplateGenerator(("gwf6", "riv", "options", "ts_filerecord"))
obs_filerecord = ListTemplateGenerator(("gwf6", "riv", "options", "obs_filerecord"))
stress_period_data = ListTemplateGenerator(
("gwf6", "riv", "period", "stress_period_data")
)
package_abbr = "gwfriv"
_package_type = "riv"
dfn_file_name = "gwf-riv.dfn"
dfn = [
["header", "multi-package", "package-type stress-package"],
[
"block options",
"name auxiliary",
"type string",
"shape (naux)",
"reader urword",
"optional true",
],
[
"block options",
"name auxmultname",
"type string",
"shape",
"reader urword",
"optional true",
],
[
"block options",
"name boundnames",
"type keyword",
"shape",
"reader urword",
"optional true",
],
[
"block options",
"name print_input",
"type keyword",
"reader urword",
"optional true",
"mf6internal iprpak",
],
[
"block options",
"name print_flows",
"type keyword",
"reader urword",
"optional true",
"mf6internal iprflow",
],
[
"block options",
"name save_flows",
"type keyword",
"reader urword",
"optional true",
"mf6internal ipakcb",
],
[
"block options",
"name ts_filerecord",
"type record ts6 filein ts6_filename",
"shape",
"reader urword",
"tagged true",
"optional true",
"construct_package ts",
"construct_data timeseries",
"parameter_name timeseries",
],
[
"block options",
"name ts6",
"type keyword",
"shape",
"in_record true",
"reader urword",
"tagged true",
"optional false",
],
[
"block options",
"name filein",
"type keyword",
"shape",
"in_record true",
"reader urword",
"tagged true",
"optional false",
],
[
"block options",
"name ts6_filename",
"type string",
"preserve_case true",
"in_record true",
"reader urword",
"optional false",
"tagged false",
],
[
"block options",
"name obs_filerecord",
"type record obs6 filein obs6_filename",
"shape",
"reader urword",
"tagged true",
"optional true",
"construct_package obs",
"construct_data observations",
"parameter_name continuous",
],
[
"block options",
"name obs6",
"type keyword",
"shape",
"in_record true",
"reader urword",
"tagged true",
"optional false",
],
[
"block options",
"name obs6_filename",
"type string",
"preserve_case true",
"in_record true",
"tagged false",
"reader urword",
"optional false",
],
[
"block options",
"name mover",
"type keyword",
"tagged true",
"reader urword",
"optional true",
],
[
"block dimensions",
"name maxbound",
"type integer",
"reader urword",
"optional false",
],
[
"block period",
"name iper",
"type integer",
"block_variable True",
"in_record true",
"tagged false",
"shape",
"valid",
"reader urword",
"optional false",
],
[
"block period",
"name stress_period_data",
"type recarray cellid stage cond rbot aux boundname",
"shape (maxbound)",
"reader urword",
"mf6internal spd",
],
[
"block period",
"name cellid",
"type integer",
"shape (ncelldim)",
"tagged false",
"in_record true",
"reader urword",
],
[
"block period",
"name stage",
"type double precision",
"shape",
"tagged false",
"in_record true",
"reader urword",
"time_series true",
],
[
"block period",
"name cond",
"type double precision",
"shape",
"tagged false",
"in_record true",
"reader urword",
"time_series true",
],
[
"block period",
"name rbot",
"type double precision",
"shape",
"tagged false",
"in_record true",
"reader urword",
"time_series true",
],
[
"block period",
"name aux",
"type double precision",
"in_record true",
"tagged false",
"shape (naux)",
"reader urword",
"optional true",
"time_series true",
"mf6internal auxvar",
],
[
"block period",
"name boundname",
"type string",
"shape",
"tagged false",
"in_record true",
"reader urword",
"optional true",
],
]
def __init__(
self,
model,
loading_package=False,
auxiliary=None,
auxmultname=None,
boundnames=None,
print_input=None,
print_flows=None,
save_flows=None,
timeseries=None,
observations=None,
mover=None,
maxbound=None,
stress_period_data=None,
filename=None,
pname=None,
**kwargs,
):
"""
ModflowGwfriv defines a RIV package.
Parameters
----------
model
Model that this package is a part of. Package is automatically
added to model when it is initialized.
loading_package : bool
Do not set this parameter. It is intended for debugging and internal
processing purposes only.
auxiliary : [string]
defines an array of one or more auxiliary variable names. there is no limit on
the number of auxiliary variables that can be provided on this line; however,
lists of information provided in subsequent blocks must have a column of data
for each auxiliary variable name defined here. the number of auxiliary
variables detected on this line determines the value for naux. comments cannot
be provided anywhere on this line as they will be interpreted as auxiliary
variable names. auxiliary variables may not be used by the package, but they
will be available for use by other parts of the program. the program will
terminate with an error if auxiliary variables are specified on more than one
line in the options block.
auxmultname : string
name of auxiliary variable to be used as multiplier of riverbed conductance.
boundnames : keyword
keyword to indicate that boundary names may be provided with the list of river
cells.
print_input : keyword
keyword to indicate that the list of river information will be written to the
listing file immediately after it is read.
print_flows : keyword
keyword to indicate that the list of river flow rates will be printed to the
listing file for every stress period time step in which 'budget print' is
specified in output control. if there is no output control option and
'print_flows' is specified, then flow rates are printed for the last time step
of each stress period.
save_flows : keyword
keyword to indicate that river flow terms will be written to the file specified
with 'budget fileout' in output control.
timeseries : record ts6 filein ts6_filename
Contains data for the ts package. Data can be passed as a dictionary to the ts
package with variable names as keys and package data as values. Data for the
timeseries variable is also acceptable. See ts package documentation for more
information.
observations : record obs6 filein obs6_filename
Contains data for the obs package. Data can be passed as a dictionary to the
obs package with variable names as keys and package data as values. Data for
the observations variable is also acceptable. See obs package documentation for
more information.
mover : keyword
keyword to indicate that this instance of the river package can be used with
the water mover (mvr) package. when the mover option is specified, additional
memory is allocated within the package to store the available, provided, and
received water.
maxbound : integer
integer value specifying the maximum number of rivers cells that will be
specified for use during any stress period.
stress_period_data : [list]
filename : str
File name for this package.
pname : str
Package name for this package.
parent_file : MFPackage
Parent package file that references this package. Only needed for
utility packages (mfutl*). For example, mfutllaktab package must have
a mfgwflak package parent_file.
"""
super().__init__(model, "riv", filename, pname, loading_package, **kwargs)
self.auxiliary = self.build_mfdata("auxiliary", auxiliary)
self.auxmultname = self.build_mfdata("auxmultname", auxmultname)
self.boundnames = self.build_mfdata("boundnames", boundnames)
self.print_input = self.build_mfdata("print_input", print_input)
self.print_flows = self.build_mfdata("print_flows", print_flows)
self.save_flows = self.build_mfdata("save_flows", save_flows)
self._ts_filerecord = self.build_mfdata("ts_filerecord", None)
self._ts_package = self.build_child_package(
"ts", timeseries, "timeseries", self._ts_filerecord
)
self._obs_filerecord = self.build_mfdata("obs_filerecord", None)
self._obs_package = self.build_child_package(
"obs", observations, "continuous", self._obs_filerecord
)
self.mover = self.build_mfdata("mover", mover)
self.maxbound = self.build_mfdata("maxbound", maxbound)
self.stress_period_data = self.build_mfdata(
"stress_period_data", stress_period_data
)
self._init_complete = True