# 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 ModflowUtltvs(MFPackage):
"""
ModflowUtltvs defines a TVS package.
Parameters
----------
disable_storage_change_integration : keyword
keyword that deactivates inclusion of storage derivative terms in the sto
package matrix formulation. in the absence of this keyword (the default), the
groundwater storage formulation will be modified to correctly adjust heads
based on transient variations in stored water volumes arising from changes to
ss and sy properties.
print_input : keyword
keyword to indicate that information for each change to a storage property in a
cell will be written to the model listing file.
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.
perioddata : list
"""
ts_filerecord = ListTemplateGenerator(("tvs", "options", "ts_filerecord"))
perioddata = ListTemplateGenerator(("tvs", "period", "perioddata"))
package_abbr = "utltvs"
_package_type = "tvs"
dfn_file_name = "utl-tvs.dfn"
dfn = [
["header"],
[
"block options",
"name disable_storage_change_integration",
"type keyword",
"reader urword",
"optional true",
],
[
"block options",
"name print_input",
"type keyword",
"reader urword",
"optional true",
],
[
"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 period",
"name iper",
"type integer",
"block_variable True",
"in_record true",
"tagged false",
"shape",
"valid",
"reader urword",
"optional false",
],
[
"block period",
"name perioddata",
"type recarray cellid tvssetting",
"shape",
"reader urword",
],
[
"block period",
"name cellid",
"type integer",
"shape (ncelldim)",
"tagged false",
"in_record true",
"reader urword",
],
[
"block period",
"name tvssetting",
"type keystring ss sy",
"shape",
"tagged false",
"in_record true",
"reader urword",
],
[
"block period",
"name ss",
"type double precision",
"shape",
"tagged true",
"in_record true",
"reader urword",
"time_series true",
],
[
"block period",
"name sy",
"type double precision",
"shape",
"tagged true",
"in_record true",
"reader urword",
"time_series true",
],
]
def __init__(
self,
parent_package,
loading_package=False,
disable_storage_change_integration=None,
print_input=None,
timeseries=None,
perioddata=None,
filename=None,
pname=None,
**kwargs,
):
"""
ModflowUtltvs defines a TVS package.
Parameters
----------
parent_package
Parent_package that this package is a part of. Package is automatically
added to parent_package when it is initialized.
loading_package : bool
Do not set this parameter. It is intended for debugging and internal
processing purposes only.
disable_storage_change_integration : keyword
keyword that deactivates inclusion of storage derivative terms in the sto
package matrix formulation. in the absence of this keyword (the default), the
groundwater storage formulation will be modified to correctly adjust heads
based on transient variations in stored water volumes arising from changes to
ss and sy properties.
print_input : keyword
keyword to indicate that information for each change to a storage property in a
cell will be written to the model listing file.
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.
perioddata : 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__(
parent_package, "tvs", filename, pname, loading_package, **kwargs
)
self.disable_storage_change_integration = self.build_mfdata(
"disable_storage_change_integration", disable_storage_change_integration
)
self.print_input = self.build_mfdata("print_input", print_input)
self._ts_filerecord = self.build_mfdata("ts_filerecord", None)
self._ts_package = self.build_child_package(
"ts", timeseries, "timeseries", self._ts_filerecord
)
self.perioddata = self.build_mfdata("perioddata", perioddata)
self._init_complete = True
[docs]class UtltvsPackages(MFChildPackages):
"""
UtltvsPackages is a container class for the ModflowUtltvs class.
Methods
-------
initialize
Initializes a new ModflowUtltvs package removing any sibling child
packages attached to the same parent package. See ModflowUtltvs init
documentation for definition of parameters.
append_package
Adds a new ModflowUtltvs package to the container. See ModflowUtltvs
init documentation for definition of parameters.
"""
package_abbr = "utltvspackages"
[docs] def initialize(
self,
disable_storage_change_integration=None,
print_input=None,
timeseries=None,
perioddata=None,
filename=None,
pname=None,
):
new_package = ModflowUtltvs(
self._cpparent,
disable_storage_change_integration=disable_storage_change_integration,
print_input=print_input,
timeseries=timeseries,
perioddata=perioddata,
filename=filename,
pname=pname,
child_builder_call=True,
)
self.init_package(new_package, filename)
[docs] def append_package(
self,
disable_storage_change_integration=None,
print_input=None,
timeseries=None,
perioddata=None,
filename=None,
pname=None,
):
new_package = ModflowUtltvs(
self._cpparent,
disable_storage_change_integration=disable_storage_change_integration,
print_input=print_input,
timeseries=timeseries,
perioddata=perioddata,
filename=filename,
pname=pname,
child_builder_call=True,
)
self._append_package(new_package, filename)