Source code for flopy.mf6.modflow.mfutlts

# 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 ModflowUtlts(MFPackage): """ ModflowUtlts defines a TS 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, default False Do not set this parameter. It is intended for debugging and internal processing purposes only. time_series_namerecord : (names, time_series_names) xxx * names : keyword xxx * time_series_names : [string] Name by which a package references a particular time-array series. The name must be unique among all time-array series used in a package. interpolation_methodrecord : (methods, interpolation_method) xxx * methods : keyword xxx * interpolation_method : [string] Interpolation method, which is either STEPWISE or LINEAR. interpolation_methodrecord_single : record xxx method : keyword xxx interpolation_method_single : string interpolation method, which is either stepwise or linear. sfacrecord : (sfacs, sfacval) xxx * sfacs : keyword xxx * sfacval : [double precision] Scale factor, which will multiply all array values in time series. SFAC is an optional attribute; if omitted, SFAC = 1.0. sfacrecord_single : (sfacval) xxx * sfacval : [double precision] Scale factor, which will multiply all array values in time series. SFAC is an optional attribute; if omitted, SFAC = 1.0. sfac : keyword xxx timeseries : [(ts_time, ts_array)] xxx * ts_time : double precision A numeric time relative to the start of the simulation, in the time unit used in the simulation. Times must be strictly increasing. * ts_array : [double precision] A 2-D array of numeric, floating-point values, or a constant value, readable by the U2DREL array-reading utility. 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`. """ time_series_namerecord = ListTemplateGenerator( ("ts", "attributes", "time_series_namerecord") ) interpolation_methodrecord = ListTemplateGenerator( ("ts", "attributes", "interpolation_methodrecord") ) interpolation_methodrecord_single = ListTemplateGenerator( ("ts", "attributes", "interpolation_methodrecord_single") ) sfacrecord = ListTemplateGenerator(("ts", "attributes", "sfacrecord")) sfacrecord_single = ListTemplateGenerator(("ts", "attributes", "sfacrecord_single")) timeseries = ListTemplateGenerator(("ts", "timeseries", "timeseries")) package_abbr = "utlts" _package_type = "ts" dfn_file_name = "utl-ts.dfn" dfn = [ ["header", "multi-package"], [ "block attributes", "name time_series_namerecord", "type record names time_series_names", "shape", "reader urword", "tagged false", "optional false", ], [ "block attributes", "name names", "other_names name", "type keyword", "shape", "reader urword", "optional false", "in_record true", ], [ "block attributes", "name time_series_names", "type string", "shape (any1d)", "tagged false", "reader urword", "optional false", "in_record true", ], [ "block attributes", "name interpolation_methodrecord", "type record methods interpolation_method", "shape", "reader urword", "tagged false", "optional true", ], [ "block attributes", "name methods", "type keyword", "shape", "reader urword", "optional false", "in_record true", ], [ "block attributes", "name interpolation_method", "type string", "valid stepwise linear linearend", "shape (time_series_names)", "tagged false", "reader urword", "optional false", "in_record true", ], [ "block attributes", "name interpolation_methodrecord_single", "type record method interpolation_method_single", "shape", "reader urword", "tagged false", "optional true", ], [ "block attributes", "name method", "type keyword", "shape", "reader urword", "optional false", ], [ "block attributes", "name interpolation_method_single", "type string", "valid stepwise linear linearend", "shape", "tagged false", "reader urword", "optional false", ], [ "block attributes", "name sfacrecord", "type record sfacs sfacval", "shape", "reader urword", "tagged true", "optional true", ], [ "block attributes", "name sfacs", "type keyword", "shape", "reader urword", "optional false", "in_record true", ], [ "block attributes", "name sfacval", "type double precision", "shape (<time_series_name)", "tagged false", "reader urword", "optional false", "in_record true", ], [ "block attributes", "name sfacrecord_single", "type record sfac sfacval", "shape", "reader urword", "tagged true", "optional true", ], [ "block attributes", "name sfac", "type keyword", "shape", "tagged false", "reader urword", "optional false", ], [ "block timeseries", "name timeseries", "type recarray ts_time ts_array", "shape", "reader urword", "tagged true", "optional false", ], [ "block timeseries", "name ts_time", "type double precision", "shape", "tagged false", "reader urword", "optional false", "repeating false", "in_record true", ], [ "block timeseries", "name ts_array", "type double precision", "shape (time_series_names)", "tagged false", "reader urword", "optional false", "in_record true", ], ] def __init__( self, parent_package, loading_package=False, time_series_namerecord=None, interpolation_methodrecord=None, interpolation_methodrecord_single=None, sfacrecord=None, sfacrecord_single=None, timeseries=None, filename=None, pname=None, **kwargs, ): """Initialize ModflowUtlts.""" super().__init__( parent=parent_package, package_type="ts", filename=filename, pname=pname, loading_package=loading_package, **kwargs, ) self.time_series_namerecord = self.build_mfdata( "time_series_namerecord", time_series_namerecord ) self.interpolation_methodrecord = self.build_mfdata( "interpolation_methodrecord", interpolation_methodrecord ) self.interpolation_methodrecord_single = self.build_mfdata( "interpolation_methodrecord_single", interpolation_methodrecord_single ) self.sfacrecord = self.build_mfdata("sfacrecord", sfacrecord) self.sfacrecord_single = self.build_mfdata( "sfacrecord_single", sfacrecord_single ) self.timeseries = self.build_mfdata("timeseries", timeseries) self._init_complete = True
[docs]class UtltsPackages(MFChildPackages): """ UtltsPackages is a container class for the ModflowUtlts class. """ package_abbr = "utltspackages"
[docs] def initialize( self, time_series_namerecord=None, interpolation_methodrecord=None, interpolation_methodrecord_single=None, sfacrecord=None, sfacrecord_single=None, timeseries=None, filename=None, pname=None, ): """ Initialize a new ModflowUtlts package, removing any sibling child packages attached to the same parent package. See :class:`ModflowUtlts` for parameter definitions. """ new_package = ModflowUtlts( self._cpparent, time_series_namerecord=time_series_namerecord, interpolation_methodrecord=interpolation_methodrecord, interpolation_methodrecord_single=interpolation_methodrecord_single, sfacrecord=sfacrecord, sfacrecord_single=sfacrecord_single, timeseries=timeseries, filename=filename, pname=pname, child_builder_call=True, ) self.init_package(new_package, filename)
[docs] def append_package( self, time_series_namerecord=None, interpolation_methodrecord=None, interpolation_methodrecord_single=None, sfacrecord=None, sfacrecord_single=None, timeseries=None, filename=None, pname=None, ): """ Add a new ModflowUtlts package to the container. See :class:`ModflowUtlts` for parameter definitions. """ new_package = ModflowUtlts( self._cpparent, time_series_namerecord=time_series_namerecord, interpolation_methodrecord=interpolation_methodrecord, interpolation_methodrecord_single=interpolation_methodrecord_single, sfacrecord=sfacrecord, sfacrecord_single=sfacrecord_single, timeseries=timeseries, filename=filename, pname=pname, child_builder_call=True, ) self._append_package(new_package, filename)