# 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 ModflowUtlobs(MFPackage):
"""
ModflowUtlobs defines a OBS package.
Parameters
----------
digits : integer
keyword and an integer digits specifier used for conversion of simulated values
to text on output. if not specified, the default is the maximum number of
digits stored in the program (as written with the g0 fortran specifier). when
simulated values are written to a comma-separated value text file specified in
a continuous block below, the digits specifier controls the number of
significant digits with which simulated values are written to the output file.
the digits specifier has no effect on the number of significant digits with
which the simulation time is written for continuous observations. if digits is
specified as zero, then observations are written with the default setting,
which is the maximum number of digits.
print_input : keyword
keyword to indicate that the list of observation information will be written to
the listing file immediately after it is read.
continuous : list
"""
continuous = ListTemplateGenerator(("obs", "continuous", "continuous"))
package_abbr = "utlobs"
_package_type = "obs"
dfn_file_name = "utl-obs.dfn"
dfn = [
["header", "multi-package"],
[
"block options",
"name digits",
"type integer",
"shape",
"reader urword",
"optional true",
],
[
"block options",
"name print_input",
"type keyword",
"reader urword",
"optional true",
],
[
"block continuous",
"name output",
"type record fileout obs_output_file_name binary",
"shape",
"block_variable true",
"in_record false",
"reader urword",
"optional false",
],
[
"block continuous",
"name fileout",
"type keyword",
"shape",
"in_record true",
"reader urword",
"tagged true",
"optional false",
],
[
"block continuous",
"name obs_output_file_name",
"type string",
"preserve_case true",
"in_record true",
"shape",
"tagged false",
"reader urword",
],
[
"block continuous",
"name binary",
"type keyword",
"in_record true",
"shape",
"reader urword",
"optional true",
],
[
"block continuous",
"name continuous",
"type recarray obsname obstype id id2",
"shape",
"reader urword",
"optional false",
],
[
"block continuous",
"name obsname",
"type string",
"shape",
"tagged false",
"in_record true",
"reader urword",
],
[
"block continuous",
"name obstype",
"type string",
"shape",
"tagged false",
"in_record true",
"reader urword",
],
[
"block continuous",
"name id",
"type string",
"shape",
"tagged false",
"in_record true",
"reader urword",
"numeric_index true",
],
[
"block continuous",
"name id2",
"type string",
"shape",
"tagged false",
"in_record true",
"reader urword",
"optional true",
"numeric_index true",
],
]
def __init__(
self,
parent_model_or_package,
loading_package=False,
digits=None,
print_input=None,
continuous=None,
filename=None,
pname=None,
**kwargs,
):
"""
ModflowUtlobs defines a OBS package.
Parameters
----------
parent_model_or_package
Parent_model_or_package that this package is a part of. Package is automatically
added to parent_model_or_package when it is initialized.
loading_package : bool
Do not set this parameter. It is intended for debugging and internal
processing purposes only.
digits : integer
keyword and an integer digits specifier used for conversion of simulated values
to text on output. if not specified, the default is the maximum number of
digits stored in the program (as written with the g0 fortran specifier). when
simulated values are written to a comma-separated value text file specified in
a continuous block below, the digits specifier controls the number of
significant digits with which simulated values are written to the output file.
the digits specifier has no effect on the number of significant digits with
which the simulation time is written for continuous observations. if digits is
specified as zero, then observations are written with the default setting,
which is the maximum number of digits.
print_input : keyword
keyword to indicate that the list of observation information will be written to
the listing file immediately after it is read.
continuous : 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_model_or_package, "obs", filename, pname, loading_package, **kwargs
)
self.digits = self.build_mfdata("digits", digits)
self.print_input = self.build_mfdata("print_input", print_input)
self.continuous = self.build_mfdata("continuous", continuous)
self._init_complete = True
[docs]class UtlobsPackages(MFChildPackages):
"""
UtlobsPackages is a container class for the ModflowUtlobs class.
Methods
-------
initialize
Initializes a new ModflowUtlobs package removing any sibling child
packages attached to the same parent package. See ModflowUtlobs init
documentation for definition of parameters.
append_package
Adds a new ModflowUtlobs package to the container. See ModflowUtlobs
init documentation for definition of parameters.
"""
package_abbr = "utlobspackages"
[docs] def initialize(
self,
digits=None,
print_input=None,
continuous=None,
filename=None,
pname=None,
):
new_package = ModflowUtlobs(
self._cpparent,
digits=digits,
print_input=print_input,
continuous=continuous,
filename=filename,
pname=pname,
child_builder_call=True,
)
self.init_package(new_package, filename)