# 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 ModflowUtlats(MFPackage):
"""
ModflowUtlats defines a ATS package.
Parameters
----------
maxats : integer
is the number of records in the subsequent perioddata block that will be used
for adaptive time stepping.
perioddata : list
"""
perioddata = ListTemplateGenerator(("ats", "perioddata", "perioddata"))
package_abbr = "utlats"
_package_type = "ats"
dfn_file_name = "utl-ats.dfn"
dfn = [
["header"],
[
"block dimensions",
"name maxats",
"type integer",
"reader urword",
"optional false",
"default 1",
],
[
"block perioddata",
"name perioddata",
"type recarray iperats dt0 dtmin dtmax dtadj dtfailadj",
"reader urword",
"optional false",
],
[
"block perioddata",
"name iperats",
"type integer",
"in_record true",
"tagged false",
"reader urword",
"optional false",
"numeric_index true",
],
[
"block perioddata",
"name dt0",
"type double precision",
"in_record true",
"tagged false",
"reader urword",
"optional false",
],
[
"block perioddata",
"name dtmin",
"type double precision",
"in_record true",
"tagged false",
"reader urword",
"optional false",
],
[
"block perioddata",
"name dtmax",
"type double precision",
"in_record true",
"tagged false",
"reader urword",
"optional false",
],
[
"block perioddata",
"name dtadj",
"type double precision",
"in_record true",
"tagged false",
"reader urword",
"optional false",
],
[
"block perioddata",
"name dtfailadj",
"type double precision",
"in_record true",
"tagged false",
"reader urword",
"optional false",
],
]
def __init__(
self,
parent_package,
loading_package=False,
maxats=1,
perioddata=None,
filename=None,
pname=None,
**kwargs,
):
"""
ModflowUtlats defines a ATS 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.
maxats : integer
is the number of records in the subsequent perioddata block that will be used
for adaptive time stepping.
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, "ats", filename, pname, loading_package, **kwargs
)
self.maxats = self.build_mfdata("maxats", maxats)
self.perioddata = self.build_mfdata("perioddata", perioddata)
self._init_complete = True
[docs]class UtlatsPackages(MFChildPackages):
"""
UtlatsPackages is a container class for the ModflowUtlats class.
Methods
-------
initialize
Initializes a new ModflowUtlats package removing any sibling child
packages attached to the same parent package. See ModflowUtlats init
documentation for definition of parameters.
append_package
Adds a new ModflowUtlats package to the container. See ModflowUtlats
init documentation for definition of parameters.
"""
package_abbr = "utlatspackages"
[docs] def initialize(
self,
maxats=1,
perioddata=None,
filename=None,
pname=None,
):
new_package = ModflowUtlats(
self._cpparent,
maxats=maxats,
perioddata=perioddata,
filename=filename,
pname=pname,
child_builder_call=True,
)
self.init_package(new_package, filename)
[docs] def append_package(
self,
maxats=1,
perioddata=None,
filename=None,
pname=None,
):
new_package = ModflowUtlats(
self._cpparent,
maxats=maxats,
perioddata=perioddata,
filename=filename,
pname=pname,
child_builder_call=True,
)
self._append_package(new_package, filename)