# 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 ModflowGwfuzf(MFPackage):
"""
ModflowGwfuzf defines a UZF 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 gwf cell area used by
uzf cell.
boundnames : keyword
keyword to indicate that boundary names may be provided with the list of uzf
cells.
print_input : keyword
keyword to indicate that the list of uzf information will be written to the
listing file immediately after it is read.
print_flows : keyword
keyword to indicate that the list of uzf 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 uzf flow terms will be written to the file specified
with 'budget fileout' in output control.
wc_filerecord : (wcfile)
* wcfile : string
name of the binary output file to write water content information.
budget_filerecord : (budgetfile)
* budgetfile : string
name of the binary output file to write budget information.
budgetcsv_filerecord : (budgetcsvfile)
* budgetcsvfile : string
name of the comma-separated value (CSV) output file to write budget summary
information. A budget summary record will be written to this file for each
time step of the simulation.
package_convergence_filerecord : (package_convergence_filename)
* package_convergence_filename : string
name of the comma spaced values output file to write package convergence
information.
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 uzf 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.
simulate_et : keyword
keyword specifying that et in the unsaturated (uzf) and saturated zones (gwf)
will be simulated. et can be simulated in the uzf cell and not the gwf cell by
omitting keywords linear_gwet and square_gwet.
linear_gwet : keyword
keyword specifying that groundwater et will be simulated using the original et
formulation of modflow-2005.
square_gwet : keyword
keyword specifying that groundwater et will be simulated by assuming a constant
et rate for groundwater levels between land surface (top) and land surface
minus the et extinction depth (top-extdp). groundwater et is smoothly reduced
from the pet rate to zero over a nominal interval at top-extdp.
simulate_gwseep : keyword
keyword specifying that groundwater discharge (gwseep) to land surface will be
simulated. groundwater discharge is nonzero when groundwater head is greater
than land surface. this option is no longer recommended; a better approach is
to use the drain package with discharge scaling as a way to handle seepage to
land surface. the drain package with discharge scaling is described in chapter
3 of the supplemental technical information.
unsat_etwc : keyword
keyword specifying that et in the unsaturated zone will be simulated as a
function of the specified pet rate while the water content (theta) is greater
than the et extinction water content (extwc).
unsat_etae : keyword
keyword specifying that et in the unsaturated zone will be simulated using a
capillary pressure based formulation. capillary pressure is calculated using
the brooks-corey retention function.
nuzfcells : integer
is the number of uzf cells. more than one uzf cell can be assigned to a gwf
cell; however, only one gwf cell can be assigned to a single uzf cell. if more
than one uzf cell is assigned to a gwf cell, then an auxiliary variable should
be used to reduce the surface area of the uzf cell with the auxmultname option.
ntrailwaves : integer
is the number of trailing waves. a recommended value of 7 can be used for
ntrailwaves. this value can be increased to lower mass balance error in the
unsaturated zone.
nwavesets : integer
is the number of wave sets. a recommended value of 40 can be used for
nwavesets. this value can be increased if more waves are required to resolve
variations in water content within the unsaturated zone.
packagedata : [list]
perioddata : list
"""
auxiliary = ArrayTemplateGenerator(("gwf6", "uzf", "options", "auxiliary"))
wc_filerecord = ListTemplateGenerator(("gwf6", "uzf", "options", "wc_filerecord"))
budget_filerecord = ListTemplateGenerator(
("gwf6", "uzf", "options", "budget_filerecord")
)
budgetcsv_filerecord = ListTemplateGenerator(
("gwf6", "uzf", "options", "budgetcsv_filerecord")
)
package_convergence_filerecord = ListTemplateGenerator(
("gwf6", "uzf", "options", "package_convergence_filerecord")
)
ts_filerecord = ListTemplateGenerator(("gwf6", "uzf", "options", "ts_filerecord"))
obs_filerecord = ListTemplateGenerator(("gwf6", "uzf", "options", "obs_filerecord"))
packagedata = ListTemplateGenerator(("gwf6", "uzf", "packagedata", "packagedata"))
perioddata = ListTemplateGenerator(("gwf6", "uzf", "period", "perioddata"))
package_abbr = "gwfuzf"
_package_type = "uzf"
dfn_file_name = "gwf-uzf.dfn"
dfn = [
["header", "multi-package", "package-type advanced-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",
],
[
"block options",
"name print_flows",
"type keyword",
"reader urword",
"optional true",
],
[
"block options",
"name save_flows",
"type keyword",
"reader urword",
"optional true",
],
[
"block options",
"name wc_filerecord",
"type record water_content fileout wcfile",
"shape",
"reader urword",
"tagged true",
"optional true",
],
[
"block options",
"name water_content",
"type keyword",
"shape",
"in_record true",
"reader urword",
"tagged true",
"optional false",
],
[
"block options",
"name wcfile",
"type string",
"preserve_case true",
"shape",
"in_record true",
"reader urword",
"tagged false",
"optional false",
],
[
"block options",
"name budget_filerecord",
"type record budget fileout budgetfile",
"shape",
"reader urword",
"tagged true",
"optional true",
],
[
"block options",
"name budget",
"type keyword",
"shape",
"in_record true",
"reader urword",
"tagged true",
"optional false",
],
[
"block options",
"name fileout",
"type keyword",
"shape",
"in_record true",
"reader urword",
"tagged true",
"optional false",
],
[
"block options",
"name budgetfile",
"preserve_case true",
"type string",
"shape",
"in_record true",
"reader urword",
"tagged false",
"optional false",
],
[
"block options",
"name budgetcsv_filerecord",
"type record budgetcsv fileout budgetcsvfile",
"shape",
"reader urword",
"tagged true",
"optional true",
],
[
"block options",
"name budgetcsv",
"type keyword",
"shape",
"in_record true",
"reader urword",
"tagged true",
"optional false",
],
[
"block options",
"name budgetcsvfile",
"type string",
"preserve_case true",
"shape",
"in_record true",
"reader urword",
"tagged false",
"optional false",
],
[
"block options",
"name package_convergence_filerecord",
"type record package_convergence fileout package_convergence_filename",
"shape",
"reader urword",
"tagged true",
"optional true",
],
[
"block options",
"name package_convergence",
"type keyword",
"shape",
"in_record true",
"reader urword",
"tagged true",
"optional false",
],
[
"block options",
"name package_convergence_filename",
"type string",
"shape",
"in_record true",
"reader urword",
"tagged false",
"optional false",
],
[
"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 options",
"name simulate_et",
"type keyword",
"tagged true",
"reader urword",
"optional true",
],
[
"block options",
"name linear_gwet",
"type keyword",
"tagged true",
"reader urword",
"optional true",
],
[
"block options",
"name square_gwet",
"type keyword",
"tagged true",
"reader urword",
"optional true",
],
[
"block options",
"name simulate_gwseep",
"type keyword",
"tagged true",
"reader urword",
"optional true",
"deprecated 6.5.0",
],
[
"block options",
"name unsat_etwc",
"type keyword",
"tagged true",
"reader urword",
"optional true",
],
[
"block options",
"name unsat_etae",
"type keyword",
"tagged true",
"reader urword",
"optional true",
],
[
"block dimensions",
"name nuzfcells",
"type integer",
"reader urword",
"optional false",
],
[
"block dimensions",
"name ntrailwaves",
"type integer",
"reader urword",
"optional false",
"default 7",
],
[
"block dimensions",
"name nwavesets",
"type integer",
"reader urword",
"optional false",
"default 40",
],
[
"block packagedata",
"name packagedata",
"type recarray ifno cellid landflag ivertcon surfdep vks thtr thts thti eps boundname",
"shape (nuzfcells)",
"reader urword",
],
[
"block packagedata",
"name ifno",
"type integer",
"shape",
"tagged false",
"in_record true",
"reader urword",
"numeric_index true",
],
[
"block packagedata",
"name cellid",
"type integer",
"shape (ncelldim)",
"tagged false",
"in_record true",
"reader urword",
],
[
"block packagedata",
"name landflag",
"type integer",
"shape",
"tagged false",
"in_record true",
"reader urword",
],
[
"block packagedata",
"name ivertcon",
"type integer",
"shape",
"tagged false",
"in_record true",
"reader urword",
"numeric_index true",
],
[
"block packagedata",
"name surfdep",
"type double precision",
"shape",
"tagged false",
"in_record true",
"reader urword",
],
[
"block packagedata",
"name vks",
"type double precision",
"shape",
"tagged false",
"in_record true",
"reader urword",
],
[
"block packagedata",
"name thtr",
"type double precision",
"shape",
"tagged false",
"in_record true",
"reader urword",
],
[
"block packagedata",
"name thts",
"type double precision",
"shape",
"tagged false",
"in_record true",
"reader urword",
],
[
"block packagedata",
"name thti",
"type double precision",
"shape",
"tagged false",
"in_record true",
"reader urword",
],
[
"block packagedata",
"name eps",
"type double precision",
"shape",
"tagged false",
"in_record true",
"reader urword",
],
[
"block packagedata",
"name boundname",
"type string",
"shape",
"tagged false",
"in_record true",
"reader urword",
"optional true",
],
[
"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 ifno finf pet extdp extwc ha hroot rootact aux",
"shape",
"reader urword",
],
[
"block period",
"name ifno",
"type integer",
"shape",
"tagged false",
"in_record true",
"reader urword",
"numeric_index true",
],
[
"block period",
"name finf",
"type string",
"shape",
"tagged false",
"in_record true",
"time_series true",
"reader urword",
],
[
"block period",
"name pet",
"type string",
"shape",
"tagged false",
"in_record true",
"reader urword",
"time_series true",
],
[
"block period",
"name extdp",
"type string",
"shape",
"tagged false",
"in_record true",
"reader urword",
"time_series true",
],
[
"block period",
"name extwc",
"type string",
"shape",
"tagged false",
"in_record true",
"reader urword",
"time_series true",
],
[
"block period",
"name ha",
"type string",
"shape",
"tagged false",
"in_record true",
"time_series true",
"reader urword",
],
[
"block period",
"name hroot",
"type string",
"shape",
"tagged false",
"in_record true",
"reader urword",
"time_series true",
],
[
"block period",
"name rootact",
"type string",
"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",
"time_series true",
"optional true",
],
]
def __init__(
self,
model,
loading_package=False,
auxiliary=None,
auxmultname=None,
boundnames=None,
print_input=None,
print_flows=None,
save_flows=None,
wc_filerecord=None,
budget_filerecord=None,
budgetcsv_filerecord=None,
package_convergence_filerecord=None,
timeseries=None,
observations=None,
mover=None,
simulate_et=None,
linear_gwet=None,
square_gwet=None,
simulate_gwseep=None,
unsat_etwc=None,
unsat_etae=None,
nuzfcells=None,
ntrailwaves=7,
nwavesets=40,
packagedata=None,
perioddata=None,
filename=None,
pname=None,
**kwargs,
):
"""
ModflowGwfuzf defines a UZF 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 gwf cell area used by
uzf cell.
boundnames : keyword
keyword to indicate that boundary names may be provided with the list of uzf
cells.
print_input : keyword
keyword to indicate that the list of uzf information will be written to the
listing file immediately after it is read.
print_flows : keyword
keyword to indicate that the list of uzf 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 uzf flow terms will be written to the file specified
with 'budget fileout' in output control.
wc_filerecord : record
budget_filerecord : record
budgetcsv_filerecord : record
package_convergence_filerecord : record
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 uzf 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.
simulate_et : keyword
keyword specifying that et in the unsaturated (uzf) and saturated zones (gwf)
will be simulated. et can be simulated in the uzf cell and not the gwf cell by
omitting keywords linear_gwet and square_gwet.
linear_gwet : keyword
keyword specifying that groundwater et will be simulated using the original et
formulation of modflow-2005.
square_gwet : keyword
keyword specifying that groundwater et will be simulated by assuming a constant
et rate for groundwater levels between land surface (top) and land surface
minus the et extinction depth (top-extdp). groundwater et is smoothly reduced
from the pet rate to zero over a nominal interval at top-extdp.
simulate_gwseep : keyword
keyword specifying that groundwater discharge (gwseep) to land surface will be
simulated. groundwater discharge is nonzero when groundwater head is greater
than land surface. this option is no longer recommended; a better approach is
to use the drain package with discharge scaling as a way to handle seepage to
land surface. the drain package with discharge scaling is described in chapter
3 of the supplemental technical information.
unsat_etwc : keyword
keyword specifying that et in the unsaturated zone will be simulated as a
function of the specified pet rate while the water content (theta) is greater
than the et extinction water content (extwc).
unsat_etae : keyword
keyword specifying that et in the unsaturated zone will be simulated using a
capillary pressure based formulation. capillary pressure is calculated using
the brooks-corey retention function.
nuzfcells : integer
is the number of uzf cells. more than one uzf cell can be assigned to a gwf
cell; however, only one gwf cell can be assigned to a single uzf cell. if more
than one uzf cell is assigned to a gwf cell, then an auxiliary variable should
be used to reduce the surface area of the uzf cell with the auxmultname option.
ntrailwaves : integer
is the number of trailing waves. a recommended value of 7 can be used for
ntrailwaves. this value can be increased to lower mass balance error in the
unsaturated zone.
nwavesets : integer
is the number of wave sets. a recommended value of 40 can be used for
nwavesets. this value can be increased if more waves are required to resolve
variations in water content within the unsaturated zone.
packagedata : [list]
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__(model, "uzf", 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.wc_filerecord = self.build_mfdata("wc_filerecord", wc_filerecord)
self.budget_filerecord = self.build_mfdata(
"budget_filerecord", budget_filerecord
)
self.budgetcsv_filerecord = self.build_mfdata(
"budgetcsv_filerecord", budgetcsv_filerecord
)
self.package_convergence_filerecord = self.build_mfdata(
"package_convergence_filerecord", package_convergence_filerecord
)
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.simulate_et = self.build_mfdata("simulate_et", simulate_et)
self.linear_gwet = self.build_mfdata("linear_gwet", linear_gwet)
self.square_gwet = self.build_mfdata("square_gwet", square_gwet)
self.simulate_gwseep = self.build_mfdata("simulate_gwseep", simulate_gwseep)
self.unsat_etwc = self.build_mfdata("unsat_etwc", unsat_etwc)
self.unsat_etae = self.build_mfdata("unsat_etae", unsat_etae)
self.nuzfcells = self.build_mfdata("nuzfcells", nuzfcells)
self.ntrailwaves = self.build_mfdata("ntrailwaves", ntrailwaves)
self.nwavesets = self.build_mfdata("nwavesets", nwavesets)
self.packagedata = self.build_mfdata("packagedata", packagedata)
self.perioddata = self.build_mfdata("perioddata", perioddata)
self._init_complete = True