# 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 ModflowPrtfmi(MFPackage):
"""
ModflowPrtfmi defines a FMI package.
Parameters
----------
model
Model that this package is a part of. Package is automatically
added to model when it is initialized.
loading_package : bool, default False
Do not set this parameter. It is intended for debugging and internal
processing purposes only.
save_flows : keyword
keyword to indicate that fmi flow terms will be written to the file specified
with 'budget fileout' in output control.
packagedata : [(flowtype, filein, fname)]
* flowtype : string
is the word GWFBUDGET, GWFHEAD, or GWFGRID. If GWFBUDGET is specified, then
the corresponding file must be a budget file. If GWFHEAD is specified, the
file must be a head file. If GWFGRID is specified, the file must be a binary
grid file.
* filein : keyword
keyword to specify that an input filename is expected next.
* fname : string
is the name of the file containing flows. The path to the file should be
included if the file is not located in the folder where the program was run.
filename : str or PathLike, optional
Name or path of file where this package is stored.
pname : str, optional
Package name.
**kwargs
Extra keywords for :class:`flopy.mf6.mfpackage.MFPackage`.
"""
packagedata = ListTemplateGenerator(("prt6", "fmi", "packagedata", "packagedata"))
package_abbr = "prtfmi"
_package_type = "fmi"
dfn_file_name = "prt-fmi.dfn"
dfn = [
["header"],
[
"block options",
"name save_flows",
"type keyword",
"reader urword",
"optional true",
],
[
"block packagedata",
"name packagedata",
"type recarray flowtype filein fname",
"reader urword",
"optional true",
],
[
"block packagedata",
"name flowtype",
"in_record true",
"type string",
"tagged false",
"reader urword",
],
[
"block packagedata",
"name filein",
"type keyword",
"shape",
"in_record true",
"reader urword",
"tagged true",
"optional false",
],
[
"block packagedata",
"name fname",
"in_record true",
"type string",
"preserve_case true",
"tagged false",
"reader urword",
],
]
def __init__(
self,
model,
loading_package=False,
save_flows=None,
packagedata=None,
filename=None,
pname=None,
**kwargs,
):
"""Initialize ModflowPrtfmi."""
super().__init__(
parent=model,
package_type="fmi",
filename=filename,
pname=pname,
loading_package=loading_package,
**kwargs,
)
self.save_flows = self.build_mfdata("save_flows", save_flows)
self.packagedata = self.build_mfdata("packagedata", packagedata)
self._init_complete = True