diff --git a/flopy/mf6/modflow/__init__.py b/flopy/mf6/modflow/__init__.py index c009179e2d..9c76165ac8 100644 --- a/flopy/mf6/modflow/__init__.py +++ b/flopy/mf6/modflow/__init__.py @@ -82,6 +82,7 @@ from .mfgwtssm import ModflowGwtssm from .mfgwtuzt import ModflowGwtuzt from .mfims import ModflowIms +from .mfmve import ModflowMve from .mfmvr import ModflowMvr from .mfmvt import ModflowMvt from .mfnam import ModflowNam @@ -93,7 +94,6 @@ from .mfprtnam import ModflowPrtnam from .mfprtoc import ModflowPrtoc from .mfprtprp import ModflowPrtprp -from .mfpts import ModflowPts from .mfsimulation import MFSimulation from .mftdis import ModflowTdis from .mfutlats import ModflowUtlats diff --git a/flopy/mf6/modflow/mfgweadv.py b/flopy/mf6/modflow/mfgweadv.py index 2a37750678..41b131437b 100644 --- a/flopy/mf6/modflow/mfgweadv.py +++ b/flopy/mf6/modflow/mfgweadv.py @@ -20,8 +20,8 @@ class ModflowGweadv(MFPackage): Do not set this parameter. It is intended for debugging and internal processing purposes only. scheme : string - scheme used to solve the advection term. can be upstream, central, or tvd. if - not specified, upstream weighting is the default weighting scheme. + scheme used to solve the advection term. can be upstream, central, tvd, or + utvd. if not specified, upstream weighting is the default weighting scheme. ats_percel : double precision fractional cell distance submitted by the adv package to the adaptive time stepping (ats) package. if ats_percel is specified and the ats package is diff --git a/flopy/mf6/modflow/mfgwectp.py b/flopy/mf6/modflow/mfgwectp.py index 937f047b95..2cf4332c36 100644 --- a/flopy/mf6/modflow/mfgwectp.py +++ b/flopy/mf6/modflow/mfgwectp.py @@ -105,7 +105,7 @@ class ModflowGwectp(MFPackage): _package_type = "ctp" dfn_file_name = "gwe-ctp.dfn" dfn = [ - ["header", "multi-package"], + ["header", "multi-package", "package-type stress-package"], [ "block options", "name auxiliary", @@ -136,7 +136,7 @@ class ModflowGwectp(MFPackage): "type keyword", "reader urword", "optional true", - "mf6internal iprflow", + "mf6internal iprpak", ], [ "block options", @@ -144,7 +144,7 @@ class ModflowGwectp(MFPackage): "type keyword", "reader urword", "optional true", - "mf6internal ipakcb", + "mf6internal iprflow", ], [ "block options", @@ -152,7 +152,7 @@ class ModflowGwectp(MFPackage): "type keyword", "reader urword", "optional true", - "mf6internal iprpak", + "mf6internal ipakcb", ], [ "block options", diff --git a/flopy/mf6/modflow/mfgwedis.py b/flopy/mf6/modflow/mfgwedis.py index 304cc6e100..8dc4dbd6d5 100644 --- a/flopy/mf6/modflow/mfgwedis.py +++ b/flopy/mf6/modflow/mfgwedis.py @@ -54,6 +54,13 @@ class ModflowGwedis(MFPackage): modflow 6 simulation input. this option only has an effect when an output model netcdf file is configured and the simulation is run in validate mode, otherwise it is ignored. + crs : [string] + is a real-world coordinate reference system (crs) for the model, for example, + an epsg integer code (e.g. 26915), authority string (i.e. epsg:26915), or open + geospatial consortium well-known text (wkt) specification. limited to 5000 + characters. the entry for crs does not affect the model simulation, but it is + written to the binary grid file so that postprocessors can locate the grid in + space. packagedata : record ncf6 filein ncf6_filename Contains data for the ncf package. Data can be passed as a dictionary to the ncf package with variable names as keys and package data as values. Data for @@ -95,6 +102,7 @@ class ModflowGwedis(MFPackage): """ grb_filerecord = ListTemplateGenerator(("gwe6", "dis", "options", "grb_filerecord")) + crs = ArrayTemplateGenerator(("gwe6", "dis", "options", "crs")) ncf_filerecord = ListTemplateGenerator(("gwe6", "dis", "options", "ncf_filerecord")) delr = ArrayTemplateGenerator(("gwe6", "dis", "griddata", "delr")) delc = ArrayTemplateGenerator(("gwe6", "dis", "griddata", "delc")) @@ -202,7 +210,6 @@ class ModflowGwedis(MFPackage): "preserve_case true", "reader urword", "optional true", - "developmode true", ], [ "block options", @@ -330,6 +337,7 @@ def __init__( angrot=None, export_array_ascii=None, export_array_netcdf=None, + crs=None, packagedata=None, nlay=1, nrow=2, @@ -365,6 +373,7 @@ def __init__( self.export_array_netcdf = self.build_mfdata( "export_array_netcdf", export_array_netcdf ) + self.crs = self.build_mfdata("crs", crs) self._ncf_filerecord = self.build_mfdata("ncf_filerecord", None) self._ncf_package = self.build_child_package( "ncf", packagedata, "packagedata", self._ncf_filerecord diff --git a/flopy/mf6/modflow/mfgwedisu.py b/flopy/mf6/modflow/mfgwedisu.py index 7339edf08f..b3c8589058 100644 --- a/flopy/mf6/modflow/mfgwedisu.py +++ b/flopy/mf6/modflow/mfgwedisu.py @@ -58,6 +58,13 @@ class ModflowGwedisu(MFPackage): export_array_ascii : keyword keyword that specifies input griddata arrays should be written to layered ascii output files. + crs : [string] + is a real-world coordinate reference system (crs) for the model, for example, + an epsg integer code (e.g. 26915), authority string (i.e. epsg:26915), or open + geospatial consortium well-known text (wkt) specification. limited to 5000 + characters. the entry for crs does not affect the model simulation, but it is + written to the binary grid file so that postprocessors can locate the grid in + space. nodes : integer is the number of cells in the model grid. nja : integer @@ -177,6 +184,7 @@ class ModflowGwedisu(MFPackage): grb_filerecord = ListTemplateGenerator( ("gwe6", "disu", "options", "grb_filerecord") ) + crs = ArrayTemplateGenerator(("gwe6", "disu", "options", "crs")) top = ArrayTemplateGenerator(("gwe6", "disu", "griddata", "top")) bot = ArrayTemplateGenerator(("gwe6", "disu", "griddata", "bot")) area = ArrayTemplateGenerator(("gwe6", "disu", "griddata", "area")) @@ -290,7 +298,6 @@ class ModflowGwedisu(MFPackage): "preserve_case true", "reader urword", "optional true", - "developmode true", ], [ "block dimensions", @@ -498,6 +505,7 @@ def __init__( angrot=None, vertical_offset_tolerance=0.0, export_array_ascii=None, + crs=None, nodes=None, nja=None, nvert=None, @@ -539,6 +547,7 @@ def __init__( self.export_array_ascii = self.build_mfdata( "export_array_ascii", export_array_ascii ) + self.crs = self.build_mfdata("crs", crs) self.nodes = self.build_mfdata("nodes", nodes) self.nja = self.build_mfdata("nja", nja) self.nvert = self.build_mfdata("nvert", nvert) diff --git a/flopy/mf6/modflow/mfgwedisv.py b/flopy/mf6/modflow/mfgwedisv.py index 389c20f60c..f61bca8f03 100644 --- a/flopy/mf6/modflow/mfgwedisv.py +++ b/flopy/mf6/modflow/mfgwedisv.py @@ -57,6 +57,13 @@ class ModflowGwedisv(MFPackage): modflow 6 simulation input. this option only has an effect when an output model netcdf file is configured and the simulation is run in validate mode, otherwise it is ignored. + crs : [string] + is a real-world coordinate reference system (crs) for the model, for example, + an epsg integer code (e.g. 26915), authority string (i.e. epsg:26915), or open + geospatial consortium well-known text (wkt) specification. limited to 5000 + characters. the entry for crs does not affect the model simulation, but it is + written to the binary grid file so that postprocessors can locate the grid in + space. packagedata : record ncf6 filein ncf6_filename Contains data for the ncf package. Data can be passed as a dictionary to the ncf package with variable names as keys and package data as values. Data for @@ -123,6 +130,7 @@ class ModflowGwedisv(MFPackage): grb_filerecord = ListTemplateGenerator( ("gwe6", "disv", "options", "grb_filerecord") ) + crs = ArrayTemplateGenerator(("gwe6", "disv", "options", "crs")) ncf_filerecord = ListTemplateGenerator( ("gwe6", "disv", "options", "ncf_filerecord") ) @@ -232,7 +240,6 @@ class ModflowGwedisv(MFPackage): "preserve_case true", "reader urword", "optional true", - "developmode true", ], [ "block options", @@ -429,6 +436,7 @@ def __init__( angrot=None, export_array_ascii=None, export_array_netcdf=None, + crs=None, packagedata=None, nlay=None, ncpl=None, @@ -464,6 +472,7 @@ def __init__( self.export_array_netcdf = self.build_mfdata( "export_array_netcdf", export_array_netcdf ) + self.crs = self.build_mfdata("crs", crs) self._ncf_filerecord = self.build_mfdata("ncf_filerecord", None) self._ncf_package = self.build_child_package( "ncf", packagedata, "packagedata", self._ncf_filerecord diff --git a/flopy/mf6/modflow/mfgweesl.py b/flopy/mf6/modflow/mfgweesl.py index b02626d8fe..3af905a24c 100644 --- a/flopy/mf6/modflow/mfgweesl.py +++ b/flopy/mf6/modflow/mfgweesl.py @@ -106,7 +106,7 @@ class ModflowGweesl(MFPackage): _package_type = "esl" dfn_file_name = "gwe-esl.dfn" dfn = [ - ["header", "multi-package"], + ["header", "multi-package", "package-type stress-package"], [ "block options", "name auxiliary", diff --git a/flopy/mf6/modflow/mfgwelke.py b/flopy/mf6/modflow/mfgwelke.py index 11ecf74fbf..691058ba25 100644 --- a/flopy/mf6/modflow/mfgwelke.py +++ b/flopy/mf6/modflow/mfgwelke.py @@ -87,6 +87,11 @@ class ModflowGwelke(MFPackage): 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. + dev_nonexpanding_matrix : keyword + keyword that solves the feature temperature with a general mixing equation and + adds the result to the right-hand side of the gwe equations, instead of adding + a row to the solution matrix for each feature. this development option is not + supported. packagedata : [(lakeno, strt, ktf, rbthcnd, aux, boundname)] * lakeno : integer integer value that defines the lake number associated with the specified PERIOD @@ -205,7 +210,7 @@ class ModflowGwelke(MFPackage): _package_type = "lke" dfn_file_name = "gwe-lke.dfn" dfn = [ - ["header", "multi-package"], + ["header", "multi-package", "package-type advanced-stress-package"], [ "block options", "name flow_package_name", @@ -440,6 +445,13 @@ class ModflowGwelke(MFPackage): "reader urword", "optional false", ], + [ + "block options", + "name dev_nonexpanding_matrix", + "type keyword", + "reader urword", + "optional true", + ], [ "block packagedata", "name packagedata", @@ -657,6 +669,7 @@ def __init__( budgetcsv_filerecord=None, timeseries=None, observations=None, + dev_nonexpanding_matrix=None, packagedata=None, lakeperioddata=None, filename=None, @@ -704,6 +717,9 @@ def __init__( self._obs_package = self.build_child_package( "obs", observations, "continuous", self._obs_filerecord ) + self.dev_nonexpanding_matrix = self.build_mfdata( + "dev_nonexpanding_matrix", dev_nonexpanding_matrix + ) self.packagedata = self.build_mfdata("packagedata", packagedata) self.lakeperioddata = self.build_mfdata("lakeperioddata", lakeperioddata) diff --git a/flopy/mf6/modflow/mfgwemwe.py b/flopy/mf6/modflow/mfgwemwe.py index a62a614fd3..ceddcec313 100644 --- a/flopy/mf6/modflow/mfgwemwe.py +++ b/flopy/mf6/modflow/mfgwemwe.py @@ -87,6 +87,11 @@ class ModflowGwemwe(MFPackage): 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. + dev_nonexpanding_matrix : keyword + keyword that solves the feature temperature with a general mixing equation and + adds the result to the right-hand side of the gwe equations, instead of adding + a row to the solution matrix for each feature. this development option is not + supported. packagedata : [(mawno, strt, ktf, fthk, aux, boundname)] * mawno : integer integer value that defines the well number associated with the specified PERIOD @@ -189,7 +194,7 @@ class ModflowGwemwe(MFPackage): _package_type = "mwe" dfn_file_name = "gwe-mwe.dfn" dfn = [ - ["header", "multi-package"], + ["header", "multi-package", "package-type advanced-stress-package"], [ "block options", "name flow_package_name", @@ -424,6 +429,13 @@ class ModflowGwemwe(MFPackage): "reader urword", "optional false", ], + [ + "block options", + "name dev_nonexpanding_matrix", + "type keyword", + "reader urword", + "optional true", + ], [ "block packagedata", "name packagedata", @@ -611,6 +623,7 @@ def __init__( budgetcsv_filerecord=None, timeseries=None, observations=None, + dev_nonexpanding_matrix=None, packagedata=None, mweperioddata=None, filename=None, @@ -658,6 +671,9 @@ def __init__( self._obs_package = self.build_child_package( "obs", observations, "continuous", self._obs_filerecord ) + self.dev_nonexpanding_matrix = self.build_mfdata( + "dev_nonexpanding_matrix", dev_nonexpanding_matrix + ) self.packagedata = self.build_mfdata("packagedata", packagedata) self.mweperioddata = self.build_mfdata("mweperioddata", mweperioddata) diff --git a/flopy/mf6/modflow/mfgweoc.py b/flopy/mf6/modflow/mfgweoc.py index 1270a025d3..6734ba080a 100644 --- a/flopy/mf6/modflow/mfgweoc.py +++ b/flopy/mf6/modflow/mfgweoc.py @@ -21,13 +21,16 @@ class ModflowGweoc(MFPackage): processing purposes only. budget_filerecord : (budgetfile) * budgetfile : string - name of the output file to write budget information. + name of the output file to write budget information. Data are written to this + file only for time steps in which SAVE BUDGET is specified in a PERIOD block. + If SAVE BUDGET is specified in a PERIOD block and this file is not specified, + MODFLOW 6 will terminate with an error. 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. + information. If specified, a budget summary record will be written to this file + for every time step of the simulation. temperature_filerecord : (temperaturefile) * temperaturefile : string diff --git a/flopy/mf6/modflow/mfgwesfe.py b/flopy/mf6/modflow/mfgwesfe.py index 750ce52752..8323883877 100644 --- a/flopy/mf6/modflow/mfgwesfe.py +++ b/flopy/mf6/modflow/mfgwesfe.py @@ -87,6 +87,11 @@ class ModflowGwesfe(MFPackage): 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. + dev_nonexpanding_matrix : keyword + keyword that solves the feature temperature with a general mixing equation and + adds the result to the right-hand side of the gwe equations, instead of adding + a row to the solution matrix for each feature. this development option is not + supported. packagedata : [(rno, strt, ktf, rbthcnd, aux, boundname)] * rno : integer integer value that defines the reach number associated with the specified @@ -210,7 +215,7 @@ class ModflowGwesfe(MFPackage): _package_type = "sfe" dfn_file_name = "gwe-sfe.dfn" dfn = [ - ["header", "multi-package"], + ["header", "multi-package", "package-type advanced-stress-package"], [ "block options", "name flow_package_name", @@ -445,6 +450,13 @@ class ModflowGwesfe(MFPackage): "reader urword", "optional false", ], + [ + "block options", + "name dev_nonexpanding_matrix", + "type keyword", + "reader urword", + "optional true", + ], [ "block packagedata", "name packagedata", @@ -662,6 +674,7 @@ def __init__( budgetcsv_filerecord=None, timeseries=None, observations=None, + dev_nonexpanding_matrix=None, packagedata=None, reachperioddata=None, filename=None, @@ -709,6 +722,9 @@ def __init__( self._obs_package = self.build_child_package( "obs", observations, "continuous", self._obs_filerecord ) + self.dev_nonexpanding_matrix = self.build_mfdata( + "dev_nonexpanding_matrix", dev_nonexpanding_matrix + ) self.packagedata = self.build_mfdata("packagedata", packagedata) self.reachperioddata = self.build_mfdata("reachperioddata", reachperioddata) diff --git a/flopy/mf6/modflow/mfgweuze.py b/flopy/mf6/modflow/mfgweuze.py index 90d449bdda..bf61bdc0e5 100644 --- a/flopy/mf6/modflow/mfgweuze.py +++ b/flopy/mf6/modflow/mfgweuze.py @@ -87,6 +87,11 @@ class ModflowGweuze(MFPackage): 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. + dev_nonexpanding_matrix : keyword + keyword that solves the feature temperature with a general mixing equation and + adds the result to the right-hand side of the gwe equations, instead of adding + a row to the solution matrix for each feature. this development option is not + supported. packagedata : [(uzfno, strt, aux, boundname)] * uzfno : integer integer value that defines the UZF cell number associated with the specified @@ -192,7 +197,7 @@ class ModflowGweuze(MFPackage): _package_type = "uze" dfn_file_name = "gwe-uze.dfn" dfn = [ - ["header", "multi-package"], + ["header", "multi-package", "package-type advanced-stress-package"], [ "block options", "name flow_package_name", @@ -427,6 +432,13 @@ class ModflowGweuze(MFPackage): "reader urword", "optional false", ], + [ + "block options", + "name dev_nonexpanding_matrix", + "type keyword", + "reader urword", + "optional true", + ], [ "block packagedata", "name packagedata", @@ -606,6 +618,7 @@ def __init__( budgetcsv_filerecord=None, timeseries=None, observations=None, + dev_nonexpanding_matrix=None, packagedata=None, uzeperioddata=None, filename=None, @@ -653,6 +666,9 @@ def __init__( self._obs_package = self.build_child_package( "obs", observations, "continuous", self._obs_filerecord ) + self.dev_nonexpanding_matrix = self.build_mfdata( + "dev_nonexpanding_matrix", dev_nonexpanding_matrix + ) self.packagedata = self.build_mfdata("packagedata", packagedata) self.uzeperioddata = self.build_mfdata("uzeperioddata", uzeperioddata) diff --git a/flopy/mf6/modflow/mfgwfchdg.py b/flopy/mf6/modflow/mfgwfchdg.py index 8b6148cec0..49c6fa1bd6 100644 --- a/flopy/mf6/modflow/mfgwfchdg.py +++ b/flopy/mf6/modflow/mfgwfchdg.py @@ -19,6 +19,14 @@ class ModflowGwfchdg(MFPackage): loading_package : bool, default False Do not set this parameter. It is intended for debugging and internal processing purposes only. + readarraygrid : keyword + indicates that array-based grid input will be used for the constant head + package. this keyword must be specified to use array-based grid input. when + readarraygrid is specified, values must be provided for every cell within a + model grid, even those cells that have an idomain value less than one. values + assigned to cells with idomain values less than one are not used and have no + effect on simulation results. no data cells should contain the value dnodata + (3.0e+30). 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, @@ -65,9 +73,12 @@ class ModflowGwfchdg(MFPackage): aux : [double precision] is an array of values for auxiliary variable aux(iaux), where iaux is a value from 1 to naux, and aux(iaux) must be listed as part of the auxiliary - variables. a separate array can be specified for each auxiliary variable. if - the value specified here for the auxiliary variable is the same as auxmultname, - then the head array will be multiplied by this array. + variables. a separate array can be specified for each auxiliary variable. if + an array is not specified for an auxiliary variable, then it will retain its + value from the most recently specified period block. if an auxiliary variable + array has never been specified, its value is zero. if the value specified here + for the auxiliary variable is the same as auxmultname, then the head array will + be multiplied by this array. filename : str or PathLike, optional Name or path of file where this package is stored. @@ -95,7 +106,7 @@ class ModflowGwfchdg(MFPackage): "type keyword", "reader urword", "optional false", - "developmode true", + "developmode false", "default true", ], [ @@ -243,6 +254,7 @@ def __init__( self, model, loading_package=False, + readarraygrid=True, auxiliary=None, auxmultname=None, print_input=None, @@ -268,6 +280,7 @@ def __init__( **kwargs, ) + self.readarraygrid = self.build_mfdata("readarraygrid", readarraygrid) self.auxiliary = self.build_mfdata("auxiliary", auxiliary) self.auxmultname = self.build_mfdata("auxmultname", auxmultname) self.print_input = self.build_mfdata("print_input", print_input) diff --git a/flopy/mf6/modflow/mfgwfcsub.py b/flopy/mf6/modflow/mfgwfcsub.py index e59a3ac517..b6dfcaf79a 100644 --- a/flopy/mf6/modflow/mfgwfcsub.py +++ b/flopy/mf6/modflow/mfgwfcsub.py @@ -36,6 +36,24 @@ class ModflowGwfcsub(MFPackage): compressibility of water. typical values of beta are 4.6512e-10 1/pa or 2.2270e-8 lb/square foot in si and english units, respectively. by default, beta is 4.6512e-10 1/pa. + elastic_inelastic_smoothing : keyword + keyword to activate smoothing of the delay interbed skeletal specific storage + as the effective stress exceeds the preconsolidation stress. when active, the + skeletal specific storage is smoothly transitioned from the elastic value to + the inelastic value over a small window (0.001 of the preconsolidation stress) + instead of switching discontinuously at the preconsolidation stress. activating + this option can improve convergence of models with delay interbeds. by default, + the elastic to inelastic transition is discontinuous. + strict_effective_stress : keyword + keyword to terminate the simulation when the calculated effective stress is + small or negative, instead of regularizing it. by default the effective stress + used to calculate the skeletal specific storage is not allowed to fall below a + small fraction (0.001) of the geostatic stress, which keeps the specific + storage bounded and allows the simulation to continue; a warning reports the + number of time steps in which a negative effective stress was regularized. + negative effective stress typically occurs in uppermost cells where simulated + water levels rise above land surface. this keyword is deprecated and will be + removed in a future release. head_based : keyword keyword to indicate the head-based formulation will be used to simulate coarse- grained aquifer materials and no-delay and delay interbeds. specifying @@ -198,7 +216,13 @@ class ModflowGwfcsub(MFPackage): block, PCS0 is the initial offset from the calculated initial head or initial preconsolidation head in the CSUB interbed and the initial preconsolidation stress is calculated from the calculated initial effective stress or calculated - initial geostatic stress, respectively. + initial geostatic stress, respectively. When PCS0 is a relative offset, the + sign depends on the formulation. For the default effective-stress formulation, + specify a positive PCS0 for an overconsolidated interbed since the + preconsolidation stress is greater than the initial effective stress. If + HEAD_BASED is specified, specify a negative PCS0 for an overconsolidated + interbed since the preconsolidation head is less than the initial head. A PCS0 + of zero is normally consolidated in both formulations. * thick_frac : double precision is the interbed thickness or cell fraction of the interbed. Interbed thickness is specified as a fraction of the cell thickness if CELL_FRACTION is specified @@ -341,6 +365,23 @@ class ModflowGwfcsub(MFPackage): "optional true", "default 4.6512e-10", ], + [ + "block options", + "name elastic_inelastic_smoothing", + "type keyword", + "reader urword", + "optional true", + "mf6internal ei_smoothing", + ], + [ + "block options", + "name strict_effective_stress", + "type keyword", + "reader urword", + "optional true", + "deprecated 6.8.0", + "mf6internal strict_stress", + ], [ "block options", "name head_based", @@ -1026,6 +1067,8 @@ def __init__( save_flows=None, gammaw=9806.65, beta=4.6512e-10, + elastic_inelastic_smoothing=None, + strict_effective_stress=None, head_based=None, initial_preconsolidation_head=None, ndelaycells=None, @@ -1074,6 +1117,12 @@ def __init__( self.save_flows = self.build_mfdata("save_flows", save_flows) self.gammaw = self.build_mfdata("gammaw", gammaw) self.beta = self.build_mfdata("beta", beta) + self.elastic_inelastic_smoothing = self.build_mfdata( + "elastic_inelastic_smoothing", elastic_inelastic_smoothing + ) + self.strict_effective_stress = self.build_mfdata( + "strict_effective_stress", strict_effective_stress + ) self.head_based = self.build_mfdata("head_based", head_based) self.initial_preconsolidation_head = self.build_mfdata( "initial_preconsolidation_head", initial_preconsolidation_head diff --git a/flopy/mf6/modflow/mfgwfdis.py b/flopy/mf6/modflow/mfgwfdis.py index d28c91ea50..3cd158bd99 100644 --- a/flopy/mf6/modflow/mfgwfdis.py +++ b/flopy/mf6/modflow/mfgwfdis.py @@ -54,6 +54,13 @@ class ModflowGwfdis(MFPackage): modflow 6 simulation input. this option only has an effect when an output model netcdf file is configured and the simulation is run in validate mode, otherwise it is ignored. + crs : [string] + is a real-world coordinate reference system (crs) for the model, for example, + an epsg integer code (e.g. 26915), authority string (i.e. epsg:26915), or open + geospatial consortium well-known text (wkt) specification. limited to 5000 + characters. the entry for crs does not affect the model simulation, but it is + written to the binary grid file so that postprocessors can locate the grid in + space. packagedata : record ncf6 filein ncf6_filename Contains data for the ncf package. Data can be passed as a dictionary to the ncf package with variable names as keys and package data as values. Data for @@ -95,6 +102,7 @@ class ModflowGwfdis(MFPackage): """ grb_filerecord = ListTemplateGenerator(("gwf6", "dis", "options", "grb_filerecord")) + crs = ArrayTemplateGenerator(("gwf6", "dis", "options", "crs")) ncf_filerecord = ListTemplateGenerator(("gwf6", "dis", "options", "ncf_filerecord")) delr = ArrayTemplateGenerator(("gwf6", "dis", "griddata", "delr")) delc = ArrayTemplateGenerator(("gwf6", "dis", "griddata", "delc")) @@ -202,7 +210,6 @@ class ModflowGwfdis(MFPackage): "preserve_case true", "reader urword", "optional true", - "developmode true", ], [ "block options", @@ -330,6 +337,7 @@ def __init__( angrot=None, export_array_ascii=None, export_array_netcdf=None, + crs=None, packagedata=None, nlay=1, nrow=2, @@ -365,6 +373,7 @@ def __init__( self.export_array_netcdf = self.build_mfdata( "export_array_netcdf", export_array_netcdf ) + self.crs = self.build_mfdata("crs", crs) self._ncf_filerecord = self.build_mfdata("ncf_filerecord", None) self._ncf_package = self.build_child_package( "ncf", packagedata, "packagedata", self._ncf_filerecord diff --git a/flopy/mf6/modflow/mfgwfdisu.py b/flopy/mf6/modflow/mfgwfdisu.py index e45634f643..8de18ce067 100644 --- a/flopy/mf6/modflow/mfgwfdisu.py +++ b/flopy/mf6/modflow/mfgwfdisu.py @@ -58,6 +58,13 @@ class ModflowGwfdisu(MFPackage): export_array_ascii : keyword keyword that specifies input griddata arrays should be written to layered ascii output files. + crs : [string] + is a real-world coordinate reference system (crs) for the model, for example, + an epsg integer code (e.g. 26915), authority string (i.e. epsg:26915), or open + geospatial consortium well-known text (wkt) specification. limited to 5000 + characters. the entry for crs does not affect the model simulation, but it is + written to the binary grid file so that postprocessors can locate the grid in + space. nodes : integer is the number of cells in the model grid. nja : integer @@ -177,6 +184,7 @@ class ModflowGwfdisu(MFPackage): grb_filerecord = ListTemplateGenerator( ("gwf6", "disu", "options", "grb_filerecord") ) + crs = ArrayTemplateGenerator(("gwf6", "disu", "options", "crs")) top = ArrayTemplateGenerator(("gwf6", "disu", "griddata", "top")) bot = ArrayTemplateGenerator(("gwf6", "disu", "griddata", "bot")) area = ArrayTemplateGenerator(("gwf6", "disu", "griddata", "area")) @@ -290,7 +298,6 @@ class ModflowGwfdisu(MFPackage): "preserve_case true", "reader urword", "optional true", - "developmode true", ], [ "block dimensions", @@ -498,6 +505,7 @@ def __init__( angrot=None, vertical_offset_tolerance=0.0, export_array_ascii=None, + crs=None, nodes=None, nja=None, nvert=None, @@ -539,6 +547,7 @@ def __init__( self.export_array_ascii = self.build_mfdata( "export_array_ascii", export_array_ascii ) + self.crs = self.build_mfdata("crs", crs) self.nodes = self.build_mfdata("nodes", nodes) self.nja = self.build_mfdata("nja", nja) self.nvert = self.build_mfdata("nvert", nvert) diff --git a/flopy/mf6/modflow/mfgwfdisv.py b/flopy/mf6/modflow/mfgwfdisv.py index 457ba7c05c..8cc96a6148 100644 --- a/flopy/mf6/modflow/mfgwfdisv.py +++ b/flopy/mf6/modflow/mfgwfdisv.py @@ -57,6 +57,13 @@ class ModflowGwfdisv(MFPackage): modflow 6 simulation input. this option only has an effect when an output model netcdf file is configured and the simulation is run in validate mode, otherwise it is ignored. + crs : [string] + is a real-world coordinate reference system (crs) for the model, for example, + an epsg integer code (e.g. 26915), authority string (i.e. epsg:26915), or open + geospatial consortium well-known text (wkt) specification. limited to 5000 + characters. the entry for crs does not affect the model simulation, but it is + written to the binary grid file so that postprocessors can locate the grid in + space. packagedata : record ncf6 filein ncf6_filename Contains data for the ncf package. Data can be passed as a dictionary to the ncf package with variable names as keys and package data as values. Data for @@ -123,6 +130,7 @@ class ModflowGwfdisv(MFPackage): grb_filerecord = ListTemplateGenerator( ("gwf6", "disv", "options", "grb_filerecord") ) + crs = ArrayTemplateGenerator(("gwf6", "disv", "options", "crs")) ncf_filerecord = ListTemplateGenerator( ("gwf6", "disv", "options", "ncf_filerecord") ) @@ -232,7 +240,6 @@ class ModflowGwfdisv(MFPackage): "preserve_case true", "reader urword", "optional true", - "developmode true", ], [ "block options", @@ -429,6 +436,7 @@ def __init__( angrot=None, export_array_ascii=None, export_array_netcdf=None, + crs=None, packagedata=None, nlay=None, ncpl=None, @@ -464,6 +472,7 @@ def __init__( self.export_array_netcdf = self.build_mfdata( "export_array_netcdf", export_array_netcdf ) + self.crs = self.build_mfdata("crs", crs) self._ncf_filerecord = self.build_mfdata("ncf_filerecord", None) self._ncf_package = self.build_child_package( "ncf", packagedata, "packagedata", self._ncf_filerecord diff --git a/flopy/mf6/modflow/mfgwfdrng.py b/flopy/mf6/modflow/mfgwfdrng.py index e1386a1118..1c3cc038b2 100644 --- a/flopy/mf6/modflow/mfgwfdrng.py +++ b/flopy/mf6/modflow/mfgwfdrng.py @@ -19,6 +19,13 @@ class ModflowGwfdrng(MFPackage): loading_package : bool, default False Do not set this parameter. It is intended for debugging and internal processing purposes only. + readarraygrid : keyword + indicates that array-based grid input will be used for the drain package. this + keyword must be specified to use array-based grid input. when readarraygrid is + specified, values must be provided for every cell within a model grid, even + those cells that have an idomain value less than one. values assigned to cells + with idomain values less than one are not used and have no effect on simulation + results. no data cells should contain the value dnodata (3.0e+30). 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, @@ -85,9 +92,12 @@ class ModflowGwfdrng(MFPackage): aux : [double precision] is an array of values for auxiliary variable aux(iaux), where iaux is a value from 1 to naux, and aux(iaux) must be listed as part of the auxiliary - variables. a separate array can be specified for each auxiliary variable. if - the value specified here for the auxiliary variable is the same as auxmultname, - then the conductance array will be multiplied by this array. + variables. a separate array can be specified for each auxiliary variable. if + an array is not specified for an auxiliary variable, then it will retain its + value from the most recently specified period block. if an auxiliary variable + array has never been specified, its value is zero. if the value specified here + for the auxiliary variable is the same as auxmultname, then the conductance + array will be multiplied by this array. filename : str or PathLike, optional Name or path of file where this package is stored. @@ -116,7 +126,7 @@ class ModflowGwfdrng(MFPackage): "type keyword", "reader urword", "optional false", - "developmode true", + "developmode false", "default true", ], [ @@ -290,6 +300,7 @@ def __init__( self, model, loading_package=False, + readarraygrid=True, auxiliary=None, auxmultname=None, auxdepthname=None, @@ -318,6 +329,7 @@ def __init__( **kwargs, ) + self.readarraygrid = self.build_mfdata("readarraygrid", readarraygrid) self.auxiliary = self.build_mfdata("auxiliary", auxiliary) self.auxmultname = self.build_mfdata("auxmultname", auxmultname) self.auxdepthname = self.build_mfdata("auxdepthname", auxdepthname) diff --git a/flopy/mf6/modflow/mfgwfevta.py b/flopy/mf6/modflow/mfgwfevta.py index 4fd535f6cb..cbdfbfd429 100644 --- a/flopy/mf6/modflow/mfgwfevta.py +++ b/flopy/mf6/modflow/mfgwfevta.py @@ -86,10 +86,11 @@ class ModflowGwfevta(MFPackage): is an array of values for auxiliary variable aux(iaux), where iaux is a value from 1 to naux, and aux(iaux) must be listed as part of the auxiliary variables. a separate array can be specified for each auxiliary variable. if - an array is not specified for an auxiliary variable, then a value of zero is - assigned. if the value specified here for the auxiliary variable is the same - as auxmultname, then the evapotranspiration rate will be multiplied by this - array. + an array is not specified for an auxiliary variable, then it will retain its + value from the most recently specified period block. if an auxiliary variable + array has never been specified, its value is zero. if the value specified here + for the auxiliary variable is the same as auxmultname, then the + evapotranspiration rate will be multiplied by this array. filename : str or PathLike, optional Name or path of file where this package is stored. diff --git a/flopy/mf6/modflow/mfgwfghbg.py b/flopy/mf6/modflow/mfgwfghbg.py index 415872ee4e..66429e0ff4 100644 --- a/flopy/mf6/modflow/mfgwfghbg.py +++ b/flopy/mf6/modflow/mfgwfghbg.py @@ -19,6 +19,14 @@ class ModflowGwfghbg(MFPackage): loading_package : bool, default False Do not set this parameter. It is intended for debugging and internal processing purposes only. + readarraygrid : keyword + indicates that array-based grid input will be used for the general-head + boundary package. this keyword must be specified to use array-based grid + input. when readarraygrid is specified, values must be provided for every cell + within a model grid, even those cells that have an idomain value less than one. + values assigned to cells with idomain values less than one are not used and + have no effect on simulation results. no data cells should contain the value + dnodata (3.0e+30). 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, @@ -72,9 +80,12 @@ class ModflowGwfghbg(MFPackage): aux : [double precision] is an array of values for auxiliary variable aux(iaux), where iaux is a value from 1 to naux, and aux(iaux) must be listed as part of the auxiliary - variables. a separate array can be specified for each auxiliary variable. if - the value specified here for the auxiliary variable is the same as auxmultname, - then the conductance array will be multiplied by this array. + variables. a separate array can be specified for each auxiliary variable. if + an array is not specified for an auxiliary variable, then it will retain its + value from the most recently specified period block. if an auxiliary variable + array has never been specified, its value is zero. if the value specified here + for the auxiliary variable is the same as auxmultname, then the conductance + array will be multiplied by this array. filename : str or PathLike, optional Name or path of file where this package is stored. @@ -103,7 +114,7 @@ class ModflowGwfghbg(MFPackage): "type keyword", "reader urword", "optional false", - "developmode true", + "developmode false", "default true", ], [ @@ -261,6 +272,7 @@ def __init__( self, model, loading_package=False, + readarraygrid=True, auxiliary=None, auxmultname=None, print_input=None, @@ -287,6 +299,7 @@ def __init__( **kwargs, ) + self.readarraygrid = self.build_mfdata("readarraygrid", readarraygrid) self.auxiliary = self.build_mfdata("auxiliary", auxiliary) self.auxmultname = self.build_mfdata("auxmultname", auxmultname) self.print_input = self.build_mfdata("print_input", print_input) diff --git a/flopy/mf6/modflow/mfgwfhfb.py b/flopy/mf6/modflow/mfgwfhfb.py index 90e3ef1b1d..a3c2f1a187 100644 --- a/flopy/mf6/modflow/mfgwfhfb.py +++ b/flopy/mf6/modflow/mfgwfhfb.py @@ -32,11 +32,10 @@ class ModflowGwfhfb(MFPackage): file, CELLID1 is the layer, row, and column numbers of the cell. For a grid that uses the DISV input file, CELLID1 is the layer number and CELL2D number for the two cells. If the model uses the unstructured discretization (DISU) - input file, then CELLID1 is the node numbers for the cell. The barrier is - located between cells designated as CELLID1 and CELLID2. For models that use - the DIS and DISV grid types, the layer number for CELLID1 and CELLID2 must be - the same. For all grid types, cells must be horizontally or vertically - adjacent. + input file, then CELLID1 is the node number for the cell. The barrier is + located between cells designated as CELLID1 and CELLID2. The program will + terminate with an error if CELLID1 and CELLID2 are not horizontally or + vertically adjacent. * cellid2 : [integer] identifier for the second cell. See CELLID1 for description of how to specify. * hydchr : double precision diff --git a/flopy/mf6/modflow/mfgwflak.py b/flopy/mf6/modflow/mfgwflak.py index f761adb648..fab618f1e8 100644 --- a/flopy/mf6/modflow/mfgwflak.py +++ b/flopy/mf6/modflow/mfgwflak.py @@ -84,22 +84,61 @@ class ModflowGwflak(MFPackage): 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. + dev_force_fallback : keyword + keyword that solves every active lake with the substitution fallback under the + implicit formulation, instead of only those lakes that are too poorly + conditioned to solve as a matrix unknown. this development option is not + supported. + dev_groundwater_head_conductance : keyword + keyword that calculates the conductance for horizontal connections using the + groundwater head instead of the lake stage. this development option is not + supported. + dev_maximum_outlet_depth : double precision + real number value that defines the maximum depth used to calculate outlet flow. + this development option is not supported. surfdep : double precision real value that defines the surface depression depth for vertical lake-gwf connections. if specified, surfdep must be greater than or equal to zero. if surfdep is not specified, a default value of zero is used for all vertical lake-gwf connections. + implicit : keyword + keyword that activates the implicit formulation. with this option each lake + stage is solved as an additional unknown in the groundwater flow matrix, + instead of by the default substitution-iteration solver. the implicit + formulation typically converges in far fewer outer iterations for steady-state + and strongly coupled lakes and can solve problems for which the default + formulation fails to converge. converged results are equivalent to the default + formulation. the implicit formulation makes the coefficient matrix asymmetric + and therefore requires the bicgstab linear acceleration in the iterative model + solution (ims). each lake must have at least one groundwater connection when + the implicit option is active because the implicit formulation solves the lake + stage through its lakebed seepage; the program will terminate with an error if + a lake with no groundwater connections is specified with the implicit option. + if a lake stage becomes too poorly conditioned to solve as a matrix unknown, + which can happen for a weakly connected or disconnected lake, that lake is + solved automatically by the default substitution solver instead, so the + implicit formulation remains as robust as the default formulation. the newton + formulation is recommended for lakes that may become perched (disconnected from + the aquifer), because results obtained with the standard rewetting (rewet) + capability can otherwise differ between the two approaches. maximum_iterations : integer integer value that defines the maximum number of newton-raphson iterations allowed for a lake. by default, maximum_iterations is equal to 100. maximum_iterations would only need to be increased from the default value if - one or more lakes in a simulation has a large water budget error. + one or more lakes in a simulation has a large water budget error. this option + applies only to the default substitution-iteration solver; when the implicit + option is active the lake stage is solved within the groundwater flow matrix + and its convergence is controlled by the iterative model solution (ims) + settings instead. maximum_stage_change : double precision real value that defines the lake stage closure tolerance. by default, maximum_stage_change is equal to :math:`1 times 10^{-5}`. the maximum_stage_change would only need to be increased or decreased from the default value if the water budget error for one or more lakes is too small or - too large, respectively. + too large, respectively. this option applies only to the default substitution- + iteration solver; when the implicit option is active the lake stage is solved + within the groundwater flow matrix and its convergence is controlled by the + iterative model solution (ims) settings instead. time_conversion : double precision real value that is used to convert user-specified manning's roughness coefficients or gravitational acceleration used to calculate outlet flows from @@ -679,6 +718,27 @@ class ModflowGwflak(MFPackage): "reader urword", "optional true", ], + [ + "block options", + "name dev_force_fallback", + "type keyword", + "reader urword", + "optional true", + ], + [ + "block options", + "name dev_groundwater_head_conductance", + "type keyword", + "reader urword", + "optional true", + ], + [ + "block options", + "name dev_maximum_outlet_depth", + "type double precision", + "reader urword", + "optional true", + ], [ "block options", "name surfdep", @@ -686,6 +746,13 @@ class ModflowGwflak(MFPackage): "reader urword", "optional true", ], + [ + "block options", + "name implicit", + "type keyword", + "reader urword", + "optional true", + ], [ "block options", "name maximum_iterations", @@ -1226,7 +1293,11 @@ def __init__( timeseries=None, observations=None, mover=None, + dev_force_fallback=None, + dev_groundwater_head_conductance=None, + dev_maximum_outlet_depth=None, surfdep=None, + implicit=None, maximum_iterations=None, maximum_stage_change=None, time_conversion=None, @@ -1278,7 +1349,17 @@ def __init__( "obs", observations, "continuous", self._obs_filerecord ) self.mover = self.build_mfdata("mover", mover) + self.dev_force_fallback = self.build_mfdata( + "dev_force_fallback", dev_force_fallback + ) + self.dev_groundwater_head_conductance = self.build_mfdata( + "dev_groundwater_head_conductance", dev_groundwater_head_conductance + ) + self.dev_maximum_outlet_depth = self.build_mfdata( + "dev_maximum_outlet_depth", dev_maximum_outlet_depth + ) self.surfdep = self.build_mfdata("surfdep", surfdep) + self.implicit = self.build_mfdata("implicit", implicit) self.maximum_iterations = self.build_mfdata( "maximum_iterations", maximum_iterations ) diff --git a/flopy/mf6/modflow/mfgwfmaw.py b/flopy/mf6/modflow/mfgwfmaw.py index 09cea44c34..7d3aa08915 100644 --- a/flopy/mf6/modflow/mfgwfmaw.py +++ b/flopy/mf6/modflow/mfgwfmaw.py @@ -74,6 +74,23 @@ class ModflowGwfmaw(MFPackage): when flow corrections are activated, unit head gradients are used to calculate the flow between a multi-aquifer well and a connected gwf cell. by default, flow corrections are not made. + non_vertical_wells : keyword + keyword that activates support for non-vertical (slanted) multi-aquifer well + connections. when this option is specified, an angledata block can be used to + assign a tilt angle (deviation from vertical) to individual multi-aquifer well + connections. the saturated conductance for a connection listed in the + angledata block is scaled by the in-cell screen length, which is calculated + from the screen top, screen bottom, and tilt angle (or specified directly), + instead of the vertical screen thickness. by default, all multi-aquifer well + connections are assumed to be vertical. the tilt angle and connection length + scale the conductance for a single connection only and do not route flow + through intervening cells; a well that passes through more than one cell (a + slanted well or a horizontal lateral) must have a separate connection to each + cell that it penetrates. for a connection that uses the specified conductance + equation, the saturated conductance is used unchanged (the length correction is + not applied because the conductance is provided by the user), but the screen + top and bottom are honored so that the connection saturation is calculated over + the correct interval rather than over the full cell. flowing_wells : keyword keyword that activates the flowing wells option for the multi-aquifer well package. @@ -120,6 +137,10 @@ class ModflowGwfmaw(MFPackage): 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. + dev_peaceman_effective_radius : keyword + keyword that calculates the effective radius for structured grids using the + approach of peaceman (1983) instead of the default approach. this development + option is not supported. nmawwells : integer integer value specifying the number of multi-aquifer wells that will be simulated for all stress periods. @@ -188,8 +209,8 @@ class ModflowGwfmaw(MFPackage): NMAWWELLS. * icon : integer integer value that defines the GWF connection number for this multi-aquifer - well connection entry. ICONN must be greater than zero and less than or equal - to NGWFNODES for multi-aquifer well IFNO. + well connection entry. ICON must be greater than zero and less than or equal to + NGWFNODES for multi-aquifer well IFNO. * cellid : [integer] is the cell identifier, and depends on the type of grid that is used for the simulation. For a structured grid that uses the DIS input file, CELLID is the @@ -234,6 +255,48 @@ class ModflowGwfmaw(MFPackage): CONDEQN is SKIN, CUMULATIVE, or MEAN, the program will terminate with an error if RADIUS_SKIN is less than or equal to the RADIUS for the multi-aquifer well. + angledata : [(ifno, icon, angle, conn_length)] + * ifno : integer + integer value that defines the well number associated with the specified PERIOD + data on the line. IFNO must be greater than zero and less than or equal to + NMAWWELLS. + * icon : integer + integer value that defines the GWF connection number for this multi-aquifer + well connection entry. ICON must be greater than zero and less than or equal to + NGWFNODES for multi-aquifer well IFNO. + * angle : double precision + value that defines the tilt angle of the multi-aquifer well connection, in + degrees measured as a deviation from vertical. ANGLE must be greater than or + equal to 0.0 (a vertical connection) and less than or equal to 90.0 (a + horizontal connection) degrees. The in-cell screen length used to calculate + the saturated conductance is computed from the screen top, screen bottom, well + radius, and ANGLE, unless CONN_LENGTH is specified. The horizontal distance + spanned by a connection grows rapidly as ANGLE approaches 90.0 degrees, and a + warning is issued if it is greater than the maximum horizontal extent of the + connected cell. A connection that is intended to pass through more than one + cell should be specified as a separate connection to each cell that it passes + through. If a connection passes through more than one cell unintentionally, + ANGLE or CONN_LENGTH should be reduced. + * conn_length : double precision + optional value that defines the length of the multi-aquifer well screen within + the connected GWF cell. If CONN_LENGTH is specified (and greater than zero), + it is used directly as the in-cell screen length; otherwise, the in-cell screen + length is calculated from the screen top, screen bottom, well radius, and + ANGLE. CONN_LENGTH must be specified for horizontal connections (ANGLE equal + to 90.0 degrees) because the in-cell screen length cannot be derived from the + screen elevations for a horizontal connection. A warning is issued if the + horizontal distance spanned by the connection is greater than the maximum + horizontal extent of the connected cell. The MEAN conductance equation is + recommended for horizontal connections. For a horizontal connection using the + MEAN conductance equation, SCRN_TOP and SCRN_BOT do not affect the magnitude of + the saturated conductance but do determine the elevation range over which the + connection saturates and dewaters; SCRN_TOP and SCRN_BOT should be set to the + top and bottom of the horizontal borehole so that the vertical screen extent + (SCRN_TOP :math:`-` SCRN_BOT) equals the well diameter (2 times RADIUS). The + program snaps SCRN_TOP to SCRN_BOT plus the well diameter when the specified + extent is essentially equal to the well diameter, and otherwise issues a + warning. + perioddata : [(ifno, mawsetting)] * ifno : integer integer value that defines the well number associated with the specified period @@ -381,6 +444,7 @@ class ModflowGwfmaw(MFPackage): connectiondata = ListTemplateGenerator( ("gwf6", "maw", "connectiondata", "connectiondata") ) + angledata = ListTemplateGenerator(("gwf6", "maw", "angledata", "angledata")) perioddata = ListTemplateGenerator(("gwf6", "maw", "period", "perioddata")) package_abbr = "gwfmaw" _package_type = "maw" @@ -545,6 +609,13 @@ class ModflowGwfmaw(MFPackage): "reader urword", "optional true", ], + [ + "block options", + "name non_vertical_wells", + "type keyword", + "reader urword", + "optional true", + ], [ "block options", "name flowing_wells", @@ -678,6 +749,13 @@ class ModflowGwfmaw(MFPackage): "reader urword", "optional true", ], + [ + "block options", + "name dev_peaceman_effective_radius", + "type keyword", + "reader urword", + "optional true", + ], [ "block dimensions", "name nmawwells", @@ -839,6 +917,53 @@ class ModflowGwfmaw(MFPackage): "in_record true", "reader urword", ], + [ + "block angledata", + "name angledata", + "type recarray ifno icon angle conn_length", + "reader urword", + "optional true", + ], + [ + "block angledata", + "name ifno", + "type integer", + "shape", + "tagged false", + "in_record true", + "reader urword", + "numeric_index true", + ], + [ + "block angledata", + "name icon", + "type integer", + "shape", + "tagged false", + "in_record true", + "reader urword", + "numeric_index true", + ], + [ + "block angledata", + "name angle", + "type double precision", + "shape", + "tagged false", + "in_record true", + "reader urword", + "numeric_index false", + ], + [ + "block angledata", + "name conn_length", + "type double precision", + "shape", + "tagged false", + "in_record true", + "reader urword", + "optional true", + ], [ "block period", "name iper", @@ -1082,6 +1207,7 @@ def __init__( budgetcsv_filerecord=None, no_well_storage=None, flow_correction=None, + non_vertical_wells=None, flowing_wells=None, shutdown_theta=None, shutdown_kappa=None, @@ -1089,9 +1215,11 @@ def __init__( timeseries=None, observations=None, mover=None, + dev_peaceman_effective_radius=None, nmawwells=None, packagedata=None, connectiondata=None, + angledata=None, perioddata=None, filename=None, pname=None, @@ -1122,6 +1250,9 @@ def __init__( ) self.no_well_storage = self.build_mfdata("no_well_storage", no_well_storage) self.flow_correction = self.build_mfdata("flow_correction", flow_correction) + self.non_vertical_wells = self.build_mfdata( + "non_vertical_wells", non_vertical_wells + ) self.flowing_wells = self.build_mfdata("flowing_wells", flowing_wells) self.shutdown_theta = self.build_mfdata("shutdown_theta", shutdown_theta) self.shutdown_kappa = self.build_mfdata("shutdown_kappa", shutdown_kappa) @@ -1137,9 +1268,13 @@ def __init__( "obs", observations, "continuous", self._obs_filerecord ) self.mover = self.build_mfdata("mover", mover) + self.dev_peaceman_effective_radius = self.build_mfdata( + "dev_peaceman_effective_radius", dev_peaceman_effective_radius + ) self.nmawwells = self.build_mfdata("nmawwells", nmawwells) self.packagedata = self.build_mfdata("packagedata", packagedata) self.connectiondata = self.build_mfdata("connectiondata", connectiondata) + self.angledata = self.build_mfdata("angledata", angledata) self.perioddata = self.build_mfdata("perioddata", perioddata) self._init_complete = True diff --git a/flopy/mf6/modflow/mfgwfnpf.py b/flopy/mf6/modflow/mfgwfnpf.py index 1a1f1af634..0a01969810 100644 --- a/flopy/mf6/modflow/mfgwfnpf.py +++ b/flopy/mf6/modflow/mfgwfnpf.py @@ -350,6 +350,7 @@ class ModflowGwfnpf(MFPackage): "in_record true", "reader urword", "optional false", + "tagged true", ], [ "block options", @@ -358,6 +359,7 @@ class ModflowGwfnpf(MFPackage): "in_record true", "reader urword", "optional false", + "tagged true", ], [ "block options", @@ -366,6 +368,7 @@ class ModflowGwfnpf(MFPackage): "in_record true", "reader urword", "optional false", + "tagged true", ], [ "block options", diff --git a/flopy/mf6/modflow/mfgwfoc.py b/flopy/mf6/modflow/mfgwfoc.py index a5a083b4f1..e9f8991dc2 100644 --- a/flopy/mf6/modflow/mfgwfoc.py +++ b/flopy/mf6/modflow/mfgwfoc.py @@ -21,13 +21,16 @@ class ModflowGwfoc(MFPackage): processing purposes only. budget_filerecord : (budgetfile) * budgetfile : string - name of the output file to write budget information. + name of the output file to write budget information. Data are written to this + file only for time steps in which SAVE BUDGET is specified in a PERIOD block. + If SAVE BUDGET is specified in a PERIOD block and this file is not specified, + MODFLOW 6 will terminate with an error. 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. + information. If specified, a budget summary record will be written to this file + for every time step of the simulation. head_filerecord : (headfile) * headfile : string diff --git a/flopy/mf6/modflow/mfgwfrcha.py b/flopy/mf6/modflow/mfgwfrcha.py index e319c01310..21632b32a1 100644 --- a/flopy/mf6/modflow/mfgwfrcha.py +++ b/flopy/mf6/modflow/mfgwfrcha.py @@ -85,9 +85,11 @@ class ModflowGwfrcha(MFPackage): is an array of values for auxiliary variable aux(iaux), where iaux is a value from 1 to naux, and aux(iaux) must be listed as part of the auxiliary variables. a separate array can be specified for each auxiliary variable. if - an array is not specified for an auxiliary variable, then a value of zero is - assigned. if the value specified here for the auxiliary variable is the same - as auxmultname, then the recharge array will be multiplied by this array. + an array is not specified for an auxiliary variable, then it will retain its + value from the most recently specified period block. if an auxiliary variable + array has never been specified, its value is zero. if the value specified here + for the auxiliary variable is the same as auxmultname, then the recharge array + will be multiplied by this array. filename : str or PathLike, optional Name or path of file where this package is stored. diff --git a/flopy/mf6/modflow/mfgwfrivg.py b/flopy/mf6/modflow/mfgwfrivg.py index 3472aef279..4145923f60 100644 --- a/flopy/mf6/modflow/mfgwfrivg.py +++ b/flopy/mf6/modflow/mfgwfrivg.py @@ -19,6 +19,13 @@ class ModflowGwfrivg(MFPackage): loading_package : bool, default False Do not set this parameter. It is intended for debugging and internal processing purposes only. + readarraygrid : keyword + indicates that array-based grid input will be used for the river package. this + keyword must be specified to use array-based grid input. when readarraygrid is + specified, values must be provided for every cell within a model grid, even + those cells that have an idomain value less than one. values assigned to cells + with idomain values less than one are not used and have no effect on simulation + results. no data cells should contain the value dnodata (3.0e+30). 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, @@ -72,9 +79,12 @@ class ModflowGwfrivg(MFPackage): aux : [double precision] is an array of values for auxiliary variable aux(iaux), where iaux is a value from 1 to naux, and aux(iaux) must be listed as part of the auxiliary - variables. a separate array can be specified for each auxiliary variable. if - the value specified here for the auxiliary variable is the same as auxmultname, - then the conductance array will be multiplied by this array. + variables. a separate array can be specified for each auxiliary variable. if + an array is not specified for an auxiliary variable, then it will retain its + value from the most recently specified period block. if an auxiliary variable + array has never been specified, its value is zero. if the value specified here + for the auxiliary variable is the same as auxmultname, then the conductance + array will be multiplied by this array. filename : str or PathLike, optional Name or path of file where this package is stored. @@ -104,7 +114,7 @@ class ModflowGwfrivg(MFPackage): "type keyword", "reader urword", "optional false", - "developmode true", + "developmode false", "default True", ], [ @@ -272,6 +282,7 @@ def __init__( self, model, loading_package=False, + readarraygrid=True, auxiliary=None, auxmultname=None, print_input=None, @@ -299,6 +310,7 @@ def __init__( **kwargs, ) + self.readarraygrid = self.build_mfdata("readarraygrid", readarraygrid) self.auxiliary = self.build_mfdata("auxiliary", auxiliary) self.auxmultname = self.build_mfdata("auxmultname", auxmultname) self.print_input = self.build_mfdata("print_input", print_input) diff --git a/flopy/mf6/modflow/mfgwfsfr.py b/flopy/mf6/modflow/mfgwfsfr.py index 0f3e2d1138..753582615b 100644 --- a/flopy/mf6/modflow/mfgwfsfr.py +++ b/flopy/mf6/modflow/mfgwfsfr.py @@ -22,6 +22,16 @@ class ModflowGwfsfr(MFPackage): storage : keyword keyword that activates storage contributions to the stream-flow routing package continuity equation. + ats_courant : double precision + real number value that defines the target courant number submitted by the sfr + package to the adaptive time stepping (ats) package. if ats_courant is + specified and the ats package is active, the sfr package will compute the time + step that achieves the target courant number for the most constraining reach + (the reach with the highest wave celerity-to-length ratio) and submit that time + step to the ats package. the storage option must be active when ats_courant is + specified. ats_courant must be greater than zero. a recommended baseline + value is 1.0, which targets unit courant number; values between 0.5 and 2.0 are + generally acceptable for kinematic wave routing. 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, @@ -127,8 +137,13 @@ class ModflowGwfsfr(MFPackage): seconds. dev_storage_weight : double precision real number value that defines the time weighting factor used to calculate the - change in channel storage. storage_weight must have a value between 0.5 and 1. - default storage_weight value is 1. + change in channel storage. dev_storage_weight must have a value between 0.5 and + 1. the default dev_storage_weight value is 1, which is fully implicit and is + recommended for all practical applications. + dev_no_check : keyword + keyword that deactivates the checks of reach geometry relative to the model + grid and of reach parameters for reasonable values. this development option is + not supported. nreaches : integer integer value specifying the number of stream reaches. there must be nreaches entries in the packagedata block. @@ -458,6 +473,13 @@ class ModflowGwfsfr(MFPackage): "reader urword", "optional true", ], + [ + "block options", + "name ats_courant", + "type double precision", + "reader urword", + "optional true", + ], [ "block options", "name auxiliary", @@ -763,6 +785,13 @@ class ModflowGwfsfr(MFPackage): "reader urword", "optional true", ], + [ + "block options", + "name dev_no_check", + "type keyword", + "reader urword", + "optional true", + ], [ "block dimensions", "name nreaches", @@ -1319,6 +1348,7 @@ def __init__( model, loading_package=False, storage=None, + ats_courant=None, auxiliary=None, boundnames=None, print_input=None, @@ -1339,6 +1369,7 @@ def __init__( length_conversion=None, time_conversion=None, dev_storage_weight=None, + dev_no_check=None, nreaches=None, packagedata=None, crosssections=None, @@ -1361,6 +1392,7 @@ def __init__( ) self.storage = self.build_mfdata("storage", storage) + self.ats_courant = self.build_mfdata("ats_courant", ats_courant) self.auxiliary = self.build_mfdata("auxiliary", auxiliary) self.boundnames = self.build_mfdata("boundnames", boundnames) self.print_input = self.build_mfdata("print_input", print_input) @@ -1403,6 +1435,7 @@ def __init__( self.dev_storage_weight = self.build_mfdata( "dev_storage_weight", dev_storage_weight ) + self.dev_no_check = self.build_mfdata("dev_no_check", dev_no_check) self.nreaches = self.build_mfdata("nreaches", nreaches) self.packagedata = self.build_mfdata("packagedata", packagedata) self.crosssections = self.build_mfdata("crosssections", crosssections) diff --git a/flopy/mf6/modflow/mfgwfuzf.py b/flopy/mf6/modflow/mfgwfuzf.py index a867e687f9..89358247bd 100644 --- a/flopy/mf6/modflow/mfgwfuzf.py +++ b/flopy/mf6/modflow/mfgwfuzf.py @@ -82,6 +82,9 @@ class ModflowGwfuzf(MFPackage): 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. + dev_no_final_check : keyword + keyword that deactivates the final convergence check of the change in uzf + recharge. this development option is not supported. 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 @@ -526,6 +529,13 @@ class ModflowGwfuzf(MFPackage): "reader urword", "optional true", ], + [ + "block options", + "name dev_no_final_check", + "type keyword", + "reader urword", + "optional true", + ], [ "block options", "name simulate_et", @@ -836,6 +846,7 @@ def __init__( timeseries=None, observations=None, mover=None, + dev_no_final_check=None, simulate_et=None, linear_gwet=None, square_gwet=None, @@ -886,6 +897,9 @@ def __init__( "obs", observations, "continuous", self._obs_filerecord ) self.mover = self.build_mfdata("mover", mover) + self.dev_no_final_check = self.build_mfdata( + "dev_no_final_check", dev_no_final_check + ) 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) diff --git a/flopy/mf6/modflow/mfgwfwel.py b/flopy/mf6/modflow/mfgwfwel.py index 54da47dcf4..ae22cc9a2d 100644 --- a/flopy/mf6/modflow/mfgwfwel.py +++ b/flopy/mf6/modflow/mfgwfwel.py @@ -54,11 +54,13 @@ class ModflowGwfwel(MFPackage): rates are adjusted to 0 or a smaller negative value when the head in the cell is equal to or less than the calculated interval above the cell bottom. auto_flow_reduce is set to 0.1 if the specified value is less than or equal to - zero. by default, negative pumping rates are not reduced during a simulation. - this auto_flow_reduce option only applies to wells in model cells that are - marked as 'convertible' (icelltype /= 0) in the node property flow (npf) input - file. reduction in flow will not occur for wells in cells marked as confined - (icelltype = 0). + zero. auto_flow_reduce is set to 1.0 if the specified value is greater than 1.0 + and the flow_reduction_length option is not specified (that is, the value is + interpreted as a fraction of the cell thickness). by default, negative pumping + rates are not reduced during a simulation. this auto_flow_reduce option only + applies to wells in model cells that are marked as 'convertible' (icelltype /= + 0) in the node property flow (npf) input file. reduction in flow will not occur + for wells in cells marked as confined (icelltype = 0). afrcsv_filerecord : (afrcsvfile) * afrcsvfile : string name of the comma-separated value (CSV) output file to write information about @@ -72,6 +74,24 @@ class ModflowGwfwel(MFPackage): not specified in the options block. the program will terminate with an error if the flow_reduction_length option is specified and the auto_flow_reduce value specified in the options block is less than or equal to zero. + auto_flow_reduce_auxname : string + name of a variable listed in auxiliary that defines the per-well + auto_flow_reduce value used to compute the flow reduction threshold for each + well. the auxiliary variable is interpreted the same way as the global + auto_flow_reduce value: as a length above the cell bottom when + flow_reduction_length is specified, or otherwise as a fraction of the cell + thickness. when specified, the per-well auxiliary value overrides the global + auto_flow_reduce value for that well. a warning will be issued if + auto_flow_reduce_auxname is specified but auto_flow_reduce is not specified in + the options block. a warning will be issued if auto_flow_reduce_auxname is + specified but flow_reduction_length is not specified in the options block. the + program will terminate with an error if auto_flow_reduce_auxname is specified + but no auxiliary variables are specified, or if the named auxiliary variable + cannot be found. the per-well value must be greater than zero and less than or + equal to 1 when flow_reduction_length is not specified, or greater than zero + and less than or equal to the cell thickness when flow_reduction_length is + specified; the program will terminate with an error if a value is outside the + valid range. 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 @@ -245,6 +265,15 @@ class ModflowGwfwel(MFPackage): "optional true", "mf6internal iflowredlen", ], + [ + "block options", + "name auto_flow_reduce_auxname", + "type string", + "shape", + "reader urword", + "optional true", + "mf6internal afrauxname", + ], [ "block options", "name ts_filerecord", @@ -410,6 +439,7 @@ def __init__( auto_flow_reduce=None, afrcsv_filerecord=None, flow_reduction_length=None, + auto_flow_reduce_auxname=None, timeseries=None, observations=None, mover=None, @@ -442,6 +472,9 @@ def __init__( self.flow_reduction_length = self.build_mfdata( "flow_reduction_length", flow_reduction_length ) + self.auto_flow_reduce_auxname = self.build_mfdata( + "auto_flow_reduce_auxname", auto_flow_reduce_auxname + ) self._ts_filerecord = self.build_mfdata("ts_filerecord", None) self._ts_package = self.build_child_package( "ts", timeseries, "timeseries", self._ts_filerecord diff --git a/flopy/mf6/modflow/mfgwfwelg.py b/flopy/mf6/modflow/mfgwfwelg.py index 5fec9ff505..67e32d67a4 100644 --- a/flopy/mf6/modflow/mfgwfwelg.py +++ b/flopy/mf6/modflow/mfgwfwelg.py @@ -19,6 +19,14 @@ class ModflowGwfwelg(MFPackage): loading_package : bool, default False Do not set this parameter. It is intended for debugging and internal processing purposes only. + readarraygrid : keyword + indicates that array-based grid input will be used for the well boundary + package. this keyword must be specified to use array-based grid input. when + readarraygrid is specified, values must be provided for every cell within a + model grid, even those cells that have an idomain value less than one. values + assigned to cells with idomain values less than one are not used and have no + effect on simulation results. no data cells should contain the value dnodata + (3.0e+30). 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, @@ -94,9 +102,12 @@ class ModflowGwfwelg(MFPackage): aux : [double precision] is an array of values for auxiliary variable aux(iaux), where iaux is a value from 1 to naux, and aux(iaux) must be listed as part of the auxiliary - variables. a separate array can be specified for each auxiliary variable. if - the value specified here for the auxiliary variable is the same as auxmultname, - then the well rate array will be multiplied by this array. + variables. a separate array can be specified for each auxiliary variable. if + an array is not specified for an auxiliary variable, then it will retain its + value from the most recently specified period block. if an auxiliary variable + array has never been specified, its value is zero. if the value specified here + for the auxiliary variable is the same as auxmultname, then the well rate array + will be multiplied by this array. filename : str or PathLike, optional Name or path of file where this package is stored. @@ -127,7 +138,7 @@ class ModflowGwfwelg(MFPackage): "type keyword", "reader urword", "optional false", - "developmode true", + "developmode false", "default true", ], [ @@ -333,6 +344,7 @@ def __init__( self, model, loading_package=False, + readarraygrid=True, auxiliary=None, auxmultname=None, print_input=None, @@ -361,6 +373,7 @@ def __init__( **kwargs, ) + self.readarraygrid = self.build_mfdata("readarraygrid", readarraygrid) self.auxiliary = self.build_mfdata("auxiliary", auxiliary) self.auxmultname = self.build_mfdata("auxmultname", auxmultname) self.print_input = self.build_mfdata("print_input", print_input) diff --git a/flopy/mf6/modflow/mfgwtcnc.py b/flopy/mf6/modflow/mfgwtcnc.py index 05d9516b5f..be320494cb 100644 --- a/flopy/mf6/modflow/mfgwtcnc.py +++ b/flopy/mf6/modflow/mfgwtcnc.py @@ -105,7 +105,7 @@ class ModflowGwtcnc(MFPackage): _package_type = "cnc" dfn_file_name = "gwt-cnc.dfn" dfn = [ - ["header", "multi-package"], + ["header", "multi-package", "package-type stress-package"], [ "block options", "name auxiliary", @@ -136,7 +136,7 @@ class ModflowGwtcnc(MFPackage): "type keyword", "reader urword", "optional true", - "mf6internal iprflow", + "mf6internal iprpak", ], [ "block options", @@ -144,7 +144,7 @@ class ModflowGwtcnc(MFPackage): "type keyword", "reader urword", "optional true", - "mf6internal ipakcb", + "mf6internal iprflow", ], [ "block options", @@ -152,7 +152,7 @@ class ModflowGwtcnc(MFPackage): "type keyword", "reader urword", "optional true", - "mf6internal iprpak", + "mf6internal ipakcb", ], [ "block options", diff --git a/flopy/mf6/modflow/mfgwtdis.py b/flopy/mf6/modflow/mfgwtdis.py index a32722915f..e5bdb39b9d 100644 --- a/flopy/mf6/modflow/mfgwtdis.py +++ b/flopy/mf6/modflow/mfgwtdis.py @@ -54,6 +54,13 @@ class ModflowGwtdis(MFPackage): modflow 6 simulation input. this option only has an effect when an output model netcdf file is configured and the simulation is run in validate mode, otherwise it is ignored. + crs : [string] + is a real-world coordinate reference system (crs) for the model, for example, + an epsg integer code (e.g. 26915), authority string (i.e. epsg:26915), or open + geospatial consortium well-known text (wkt) specification. limited to 5000 + characters. the entry for crs does not affect the model simulation, but it is + written to the binary grid file so that postprocessors can locate the grid in + space. packagedata : record ncf6 filein ncf6_filename Contains data for the ncf package. Data can be passed as a dictionary to the ncf package with variable names as keys and package data as values. Data for @@ -95,6 +102,7 @@ class ModflowGwtdis(MFPackage): """ grb_filerecord = ListTemplateGenerator(("gwt6", "dis", "options", "grb_filerecord")) + crs = ArrayTemplateGenerator(("gwt6", "dis", "options", "crs")) ncf_filerecord = ListTemplateGenerator(("gwt6", "dis", "options", "ncf_filerecord")) delr = ArrayTemplateGenerator(("gwt6", "dis", "griddata", "delr")) delc = ArrayTemplateGenerator(("gwt6", "dis", "griddata", "delc")) @@ -202,7 +210,6 @@ class ModflowGwtdis(MFPackage): "preserve_case true", "reader urword", "optional true", - "developmode true", ], [ "block options", @@ -330,6 +337,7 @@ def __init__( angrot=None, export_array_ascii=None, export_array_netcdf=None, + crs=None, packagedata=None, nlay=1, nrow=2, @@ -365,6 +373,7 @@ def __init__( self.export_array_netcdf = self.build_mfdata( "export_array_netcdf", export_array_netcdf ) + self.crs = self.build_mfdata("crs", crs) self._ncf_filerecord = self.build_mfdata("ncf_filerecord", None) self._ncf_package = self.build_child_package( "ncf", packagedata, "packagedata", self._ncf_filerecord diff --git a/flopy/mf6/modflow/mfgwtdisu.py b/flopy/mf6/modflow/mfgwtdisu.py index df4674d08f..826dbf6ac7 100644 --- a/flopy/mf6/modflow/mfgwtdisu.py +++ b/flopy/mf6/modflow/mfgwtdisu.py @@ -58,6 +58,13 @@ class ModflowGwtdisu(MFPackage): export_array_ascii : keyword keyword that specifies input griddata arrays should be written to layered ascii output files. + crs : [string] + is a real-world coordinate reference system (crs) for the model, for example, + an epsg integer code (e.g. 26915), authority string (i.e. epsg:26915), or open + geospatial consortium well-known text (wkt) specification. limited to 5000 + characters. the entry for crs does not affect the model simulation, but it is + written to the binary grid file so that postprocessors can locate the grid in + space. nodes : integer is the number of cells in the model grid. nja : integer @@ -177,6 +184,7 @@ class ModflowGwtdisu(MFPackage): grb_filerecord = ListTemplateGenerator( ("gwt6", "disu", "options", "grb_filerecord") ) + crs = ArrayTemplateGenerator(("gwt6", "disu", "options", "crs")) top = ArrayTemplateGenerator(("gwt6", "disu", "griddata", "top")) bot = ArrayTemplateGenerator(("gwt6", "disu", "griddata", "bot")) area = ArrayTemplateGenerator(("gwt6", "disu", "griddata", "area")) @@ -290,7 +298,6 @@ class ModflowGwtdisu(MFPackage): "preserve_case true", "reader urword", "optional true", - "developmode true", ], [ "block dimensions", @@ -498,6 +505,7 @@ def __init__( angrot=None, vertical_offset_tolerance=0.0, export_array_ascii=None, + crs=None, nodes=None, nja=None, nvert=None, @@ -539,6 +547,7 @@ def __init__( self.export_array_ascii = self.build_mfdata( "export_array_ascii", export_array_ascii ) + self.crs = self.build_mfdata("crs", crs) self.nodes = self.build_mfdata("nodes", nodes) self.nja = self.build_mfdata("nja", nja) self.nvert = self.build_mfdata("nvert", nvert) diff --git a/flopy/mf6/modflow/mfgwtdisv.py b/flopy/mf6/modflow/mfgwtdisv.py index 469999a33e..05169ef97c 100644 --- a/flopy/mf6/modflow/mfgwtdisv.py +++ b/flopy/mf6/modflow/mfgwtdisv.py @@ -57,6 +57,13 @@ class ModflowGwtdisv(MFPackage): modflow 6 simulation input. this option only has an effect when an output model netcdf file is configured and the simulation is run in validate mode, otherwise it is ignored. + crs : [string] + is a real-world coordinate reference system (crs) for the model, for example, + an epsg integer code (e.g. 26915), authority string (i.e. epsg:26915), or open + geospatial consortium well-known text (wkt) specification. limited to 5000 + characters. the entry for crs does not affect the model simulation, but it is + written to the binary grid file so that postprocessors can locate the grid in + space. packagedata : record ncf6 filein ncf6_filename Contains data for the ncf package. Data can be passed as a dictionary to the ncf package with variable names as keys and package data as values. Data for @@ -123,6 +130,7 @@ class ModflowGwtdisv(MFPackage): grb_filerecord = ListTemplateGenerator( ("gwt6", "disv", "options", "grb_filerecord") ) + crs = ArrayTemplateGenerator(("gwt6", "disv", "options", "crs")) ncf_filerecord = ListTemplateGenerator( ("gwt6", "disv", "options", "ncf_filerecord") ) @@ -232,7 +240,6 @@ class ModflowGwtdisv(MFPackage): "preserve_case true", "reader urword", "optional true", - "developmode true", ], [ "block options", @@ -429,6 +436,7 @@ def __init__( angrot=None, export_array_ascii=None, export_array_netcdf=None, + crs=None, packagedata=None, nlay=None, ncpl=None, @@ -464,6 +472,7 @@ def __init__( self.export_array_netcdf = self.build_mfdata( "export_array_netcdf", export_array_netcdf ) + self.crs = self.build_mfdata("crs", crs) self._ncf_filerecord = self.build_mfdata("ncf_filerecord", None) self._ncf_package = self.build_child_package( "ncf", packagedata, "packagedata", self._ncf_filerecord diff --git a/flopy/mf6/modflow/mfgwtlkt.py b/flopy/mf6/modflow/mfgwtlkt.py index 475fa75257..38ee2e07c5 100644 --- a/flopy/mf6/modflow/mfgwtlkt.py +++ b/flopy/mf6/modflow/mfgwtlkt.py @@ -87,6 +87,11 @@ class ModflowGwtlkt(MFPackage): 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. + dev_nonexpanding_matrix : keyword + keyword that solves the feature concentration with a general mixing equation + and adds the result to the right-hand side of the gwt equations, instead of + adding a row to the solution matrix for each feature. this development option + is not supported. packagedata : [(ifno, strt, aux, boundname)] * ifno : integer integer value that defines the feature (lake) number associated with the @@ -202,7 +207,7 @@ class ModflowGwtlkt(MFPackage): _package_type = "lkt" dfn_file_name = "gwt-lkt.dfn" dfn = [ - ["header", "multi-package"], + ["header", "multi-package", "package-type advanced-stress-package"], [ "block options", "name flow_package_name", @@ -437,6 +442,13 @@ class ModflowGwtlkt(MFPackage): "reader urword", "optional false", ], + [ + "block options", + "name dev_nonexpanding_matrix", + "type keyword", + "reader urword", + "optional true", + ], [ "block packagedata", "name packagedata", @@ -636,6 +648,7 @@ def __init__( budgetcsv_filerecord=None, timeseries=None, observations=None, + dev_nonexpanding_matrix=None, packagedata=None, lakeperioddata=None, filename=None, @@ -683,6 +696,9 @@ def __init__( self._obs_package = self.build_child_package( "obs", observations, "continuous", self._obs_filerecord ) + self.dev_nonexpanding_matrix = self.build_mfdata( + "dev_nonexpanding_matrix", dev_nonexpanding_matrix + ) self.packagedata = self.build_mfdata("packagedata", packagedata) self.lakeperioddata = self.build_mfdata("lakeperioddata", lakeperioddata) diff --git a/flopy/mf6/modflow/mfgwtmwt.py b/flopy/mf6/modflow/mfgwtmwt.py index 5451783a30..2cdcd4f487 100644 --- a/flopy/mf6/modflow/mfgwtmwt.py +++ b/flopy/mf6/modflow/mfgwtmwt.py @@ -87,6 +87,11 @@ class ModflowGwtmwt(MFPackage): 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. + dev_nonexpanding_matrix : keyword + keyword that solves the feature concentration with a general mixing equation + and adds the result to the right-hand side of the gwt equations, instead of + adding a row to the solution matrix for each feature. this development option + is not supported. packagedata : [(ifno, strt, aux, boundname)] * ifno : integer integer value that defines the feature (well) number associated with the @@ -182,7 +187,7 @@ class ModflowGwtmwt(MFPackage): _package_type = "mwt" dfn_file_name = "gwt-mwt.dfn" dfn = [ - ["header", "multi-package"], + ["header", "multi-package", "package-type advanced-stress-package"], [ "block options", "name flow_package_name", @@ -417,6 +422,13 @@ class ModflowGwtmwt(MFPackage): "reader urword", "optional false", ], + [ + "block options", + "name dev_nonexpanding_matrix", + "type keyword", + "reader urword", + "optional true", + ], [ "block packagedata", "name packagedata", @@ -586,6 +598,7 @@ def __init__( budgetcsv_filerecord=None, timeseries=None, observations=None, + dev_nonexpanding_matrix=None, packagedata=None, mwtperioddata=None, filename=None, @@ -633,6 +646,9 @@ def __init__( self._obs_package = self.build_child_package( "obs", observations, "continuous", self._obs_filerecord ) + self.dev_nonexpanding_matrix = self.build_mfdata( + "dev_nonexpanding_matrix", dev_nonexpanding_matrix + ) self.packagedata = self.build_mfdata("packagedata", packagedata) self.mwtperioddata = self.build_mfdata("mwtperioddata", mwtperioddata) diff --git a/flopy/mf6/modflow/mfgwtoc.py b/flopy/mf6/modflow/mfgwtoc.py index 7137af6639..ae4f58b53d 100644 --- a/flopy/mf6/modflow/mfgwtoc.py +++ b/flopy/mf6/modflow/mfgwtoc.py @@ -21,13 +21,16 @@ class ModflowGwtoc(MFPackage): processing purposes only. budget_filerecord : (budgetfile) * budgetfile : string - name of the output file to write budget information. + name of the output file to write budget information. Data are written to this + file only for time steps in which SAVE BUDGET is specified in a PERIOD block. + If SAVE BUDGET is specified in a PERIOD block and this file is not specified, + MODFLOW 6 will terminate with an error. 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. + information. If specified, a budget summary record will be written to this file + for every time step of the simulation. concentration_filerecord : (concentrationfile) * concentrationfile : string diff --git a/flopy/mf6/modflow/mfgwtsft.py b/flopy/mf6/modflow/mfgwtsft.py index c8c79f053b..33b7d56511 100644 --- a/flopy/mf6/modflow/mfgwtsft.py +++ b/flopy/mf6/modflow/mfgwtsft.py @@ -87,6 +87,11 @@ class ModflowGwtsft(MFPackage): 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. + dev_nonexpanding_matrix : keyword + keyword that solves the feature concentration with a general mixing equation + and adds the result to the right-hand side of the gwt equations, instead of + adding a row to the solution matrix for each feature. this development option + is not supported. packagedata : [(ifno, strt, aux, boundname)] * ifno : integer integer value that defines the feature (reach) number associated with the @@ -204,7 +209,7 @@ class ModflowGwtsft(MFPackage): _package_type = "sft" dfn_file_name = "gwt-sft.dfn" dfn = [ - ["header", "multi-package"], + ["header", "multi-package", "package-type advanced-stress-package"], [ "block options", "name flow_package_name", @@ -439,6 +444,13 @@ class ModflowGwtsft(MFPackage): "reader urword", "optional false", ], + [ + "block options", + "name dev_nonexpanding_matrix", + "type keyword", + "reader urword", + "optional true", + ], [ "block packagedata", "name packagedata", @@ -638,6 +650,7 @@ def __init__( budgetcsv_filerecord=None, timeseries=None, observations=None, + dev_nonexpanding_matrix=None, packagedata=None, reachperioddata=None, filename=None, @@ -685,6 +698,9 @@ def __init__( self._obs_package = self.build_child_package( "obs", observations, "continuous", self._obs_filerecord ) + self.dev_nonexpanding_matrix = self.build_mfdata( + "dev_nonexpanding_matrix", dev_nonexpanding_matrix + ) self.packagedata = self.build_mfdata("packagedata", packagedata) self.reachperioddata = self.build_mfdata("reachperioddata", reachperioddata) diff --git a/flopy/mf6/modflow/mfgwtsrc.py b/flopy/mf6/modflow/mfgwtsrc.py index 653f2305b3..c363443416 100644 --- a/flopy/mf6/modflow/mfgwtsrc.py +++ b/flopy/mf6/modflow/mfgwtsrc.py @@ -120,7 +120,7 @@ class ModflowGwtsrc(MFPackage): _package_type = "src" dfn_file_name = "gwt-src.dfn" dfn = [ - ["header", "multi-package"], + ["header", "multi-package", "package-type stress-package"], [ "block options", "name auxiliary", diff --git a/flopy/mf6/modflow/mfgwtuzt.py b/flopy/mf6/modflow/mfgwtuzt.py index ad8ed01e18..f4be064b9e 100644 --- a/flopy/mf6/modflow/mfgwtuzt.py +++ b/flopy/mf6/modflow/mfgwtuzt.py @@ -88,6 +88,11 @@ class ModflowGwtuzt(MFPackage): 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. + dev_nonexpanding_matrix : keyword + keyword that solves the feature concentration with a general mixing equation + and adds the result to the right-hand side of the gwt equations, instead of + adding a row to the solution matrix for each feature. this development option + is not supported. packagedata : [(ifno, strt, aux, boundname)] * ifno : integer integer value that defines the feature (UZF object) number associated with the @@ -192,7 +197,7 @@ class ModflowGwtuzt(MFPackage): _package_type = "uzt" dfn_file_name = "gwt-uzt.dfn" dfn = [ - ["header", "multi-package"], + ["header", "multi-package", "package-type advanced-stress-package"], [ "block options", "name flow_package_name", @@ -427,6 +432,13 @@ class ModflowGwtuzt(MFPackage): "reader urword", "optional false", ], + [ + "block options", + "name dev_nonexpanding_matrix", + "type keyword", + "reader urword", + "optional true", + ], [ "block packagedata", "name packagedata", @@ -606,6 +618,7 @@ def __init__( budgetcsv_filerecord=None, timeseries=None, observations=None, + dev_nonexpanding_matrix=None, packagedata=None, uztperioddata=None, filename=None, @@ -653,6 +666,9 @@ def __init__( self._obs_package = self.build_child_package( "obs", observations, "continuous", self._obs_filerecord ) + self.dev_nonexpanding_matrix = self.build_mfdata( + "dev_nonexpanding_matrix", dev_nonexpanding_matrix + ) self.packagedata = self.build_mfdata("packagedata", packagedata) self.uztperioddata = self.build_mfdata("uztperioddata", uztperioddata) diff --git a/flopy/mf6/modflow/mfims.py b/flopy/mf6/modflow/mfims.py index 8590d03cdd..2910449be5 100644 --- a/flopy/mf6/modflow/mfims.py +++ b/flopy/mf6/modflow/mfims.py @@ -47,17 +47,6 @@ class ModflowIms(MFPackage): linear solver parameters assigned using a specified complexity can be modified in the nonlinear and linear blocks. if the complexity option is not specified, nonlinear and linear variables will be assigned the simple complexity values. - csv_output_filerecord : (csvfile) - * csvfile : string - name of the ascii comma separated values output file to write solver - convergence information. If PRINT_OPTION is NONE or SUMMARY, comma separated - values output includes maximum head change convergence information at the end - of each outer iteration for each time step. If PRINT_OPTION is ALL, comma - separated values output includes maximum head change and maximum residual - convergence information for the solution and each model (if the solution - includes more than one model) and linear acceleration information for each - inner iteration. - csv_outer_output_filerecord : (outer_csvfile) * outer_csvfile : string name of the ascii comma separated values output file to write maximum @@ -107,14 +96,30 @@ class ModflowIms(MFPackage): allowable outer iterations minus the product of this value and the maximum allowable outer iterations, then the ats (if active) will decrease the time step length by a factor of 1 / dtadj. - outer_hclose : double precision - real value defining the head change criterion for convergence of the outer - (nonlinear) iterations, in units of length. when the maximum absolute value of - the head change at all nodes during an iteration is less than or equal to - outer_hclose, iteration stops. commonly, outer_hclose equals 0.01. the - outer_hclose option has been deprecated in favor of the more general - outer_dvclose (for dependent variable), however either one can be specified in - order to maintain backward compatibility. + dev_ptc : keyword + keyword that activates pseudo-transient continuation (ptc). ptc is active by + default, so this keyword has an effect only when it follows no_ptc in the + options block. this development option is not supported. + dev_ptc_output_filerecord : (dev_ptcfile) + * dev_ptcfile : string + name of the ascii output file to write pseudo-transient continuation + information. + + dev_ptc_option : keyword + keyword that uses the norm of the right-hand side and the l2 norm of the + residual to set the initial pseudo-transient continuation value, instead of the + default approach. specifying the keyword also activates pseudo-transient + continuation. this development option is not supported. + dev_ptc_exponent : double precision + real number value that defines the exponent used to reduce the pseudo-transient + continuation value between outer iterations. the value must be greater than + zero and is 1 by default. specifying the value also activates pseudo-transient + continuation. this development option is not supported. + dev_ptc_del0 : double precision + real number value that defines the initial pseudo-transient continuation value, + which is equivalent to an initial time step length. the value must be greater + than zero. specifying the value also activates pseudo-transient continuation. + this development option is not supported. outer_dvclose : double precision real value defining the dependent-variable (for example, head) change criterion for convergence of the outer (nonlinear) iterations, in units of the dependent- @@ -125,17 +130,6 @@ class ModflowIms(MFPackage): for backward compatibility with previous versions of modflow 6 but eventually outer_hclose will be deprecated and specification of outer_hclose will cause modflow 6 to terminate with an error. - outer_rclosebnd : double precision - real value defining the residual tolerance for convergence of model packages - that solve a separate equation not solved by the ims linear solver. this value - represents the maximum allowable residual between successive outer iterations - at any single model package element. an example of a model package that would - use outer_rclosebnd to evaluate convergence is the sfr package which solves a - continuity equation for each reach. the outer_rclosebnd option is deprecated - and has no effect on simulation results as of version 6.1.1. the keyword, - outer_rclosebnd can be still be specified for backward compatibility with - previous versions of modflow 6 but eventually specification of outer_rclosebnd - will cause modflow 6 to terminate with an error. outer_maximum : integer integer value defining the maximum number of outer (nonlinear) iterations -- that is, calls to the solution routine. for a linear problem outer_maximum @@ -232,16 +226,6 @@ class ModflowIms(MFPackage): number typically depends on the characteristics of the matrix solution scheme being used. for nonlinear problems, inner_maximum usually ranges from 60 to 600; a value of 100 will be sufficient for most linear problems. - inner_hclose : double precision - real value defining the head change criterion for convergence of the inner - (linear) iterations, in units of length. when the maximum absolute value of the - head change at all nodes during an iteration is less than or equal to - inner_hclose, the matrix solver assumes convergence. commonly, inner_hclose is - set equal to or an order of magnitude less than the outer_hclose value - specified for the nonlinear block. the inner_hclose keyword has been - deprecated in favor of the more general inner_dvclose (for dependent variable), - however either one can be specified in order to maintain backward - compatibility. inner_dvclose : double precision real value defining the dependent-variable (for example, head) change criterion for convergence of the inner (linear) iterations, in units of the dependent- @@ -336,9 +320,6 @@ class ModflowIms(MFPackage): """ - csv_output_filerecord = ListTemplateGenerator( - ("ims", "options", "csv_output_filerecord") - ) csv_outer_output_filerecord = ListTemplateGenerator( ("ims", "options", "csv_outer_output_filerecord") ) @@ -346,6 +327,9 @@ class ModflowIms(MFPackage): ("ims", "options", "csv_inner_output_filerecord") ) no_ptcrecord = ListTemplateGenerator(("ims", "options", "no_ptcrecord")) + dev_ptc_output_filerecord = ListTemplateGenerator( + ("ims", "options", "dev_ptc_output_filerecord") + ) rcloserecord = ListTemplateGenerator(("ims", "linear", "rcloserecord")) package_abbr = "ims" _package_type = "ims" @@ -366,39 +350,6 @@ class ModflowIms(MFPackage): "reader urword", "optional true", ], - [ - "block options", - "name csv_output_filerecord", - "type record csv_output fileout csvfile", - "shape", - "reader urword", - "tagged true", - "optional true", - "deprecated 6.1.1", - ], - [ - "block options", - "name csv_output", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - "deprecated 6.1.1", - ], - [ - "block options", - "name csvfile", - "type string", - "preserve_case true", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - "deprecated 6.1.1", - ], [ "block options", "name csv_outer_output_filerecord", @@ -502,27 +453,69 @@ class ModflowIms(MFPackage): "optional true", ], [ - "block nonlinear", - "name outer_hclose", + "block options", + "name dev_ptc", + "type keyword", + "reader urword", + "optional true", + ], + [ + "block options", + "name dev_ptc_output_filerecord", + "type record dev_ptc_output fileout dev_ptcfile", + "shape", + "reader urword", + "tagged true", + "optional true", + ], + [ + "block options", + "name dev_ptc_output", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name dev_ptcfile", + "type string", + "preserve_case true", + "shape", + "in_record true", + "reader urword", + "tagged false", + "optional false", + ], + [ + "block options", + "name dev_ptc_option", + "type keyword", + "reader urword", + "optional true", + ], + [ + "block options", + "name dev_ptc_exponent", "type double precision", "reader urword", "optional true", - "deprecated 6.1.1", ], [ - "block nonlinear", - "name outer_dvclose", + "block options", + "name dev_ptc_del0", "type double precision", "reader urword", - "optional false", + "optional true", ], [ "block nonlinear", - "name outer_rclosebnd", + "name outer_dvclose", "type double precision", "reader urword", - "optional true", - "deprecated 6.1.1", + "optional false", ], [ "block nonlinear", @@ -601,14 +594,6 @@ class ModflowIms(MFPackage): "reader urword", "optional false", ], - [ - "block linear", - "name inner_hclose", - "type double precision", - "reader urword", - "optional true", - "deprecated 6.1.1", - ], [ "block linear", "name inner_dvclose", @@ -698,14 +683,16 @@ def __init__( loading_package=False, print_option=None, complexity=None, - csv_output_filerecord=None, csv_outer_output_filerecord=None, csv_inner_output_filerecord=None, no_ptcrecord=None, ats_outer_maximum_fraction=None, - outer_hclose=None, + dev_ptc=None, + dev_ptc_output_filerecord=None, + dev_ptc_option=None, + dev_ptc_exponent=None, + dev_ptc_del0=None, outer_dvclose=None, - outer_rclosebnd=None, outer_maximum=None, under_relaxation=None, under_relaxation_gamma=None, @@ -717,7 +704,6 @@ def __init__( backtracking_reduction_factor=None, backtracking_residual_limit=None, inner_maximum=None, - inner_hclose=None, inner_dvclose=None, rcloserecord=None, linear_acceleration=None, @@ -743,9 +729,6 @@ def __init__( self.print_option = self.build_mfdata("print_option", print_option) self.complexity = self.build_mfdata("complexity", complexity) - self.csv_output_filerecord = self.build_mfdata( - "csv_output_filerecord", csv_output_filerecord - ) self.csv_outer_output_filerecord = self.build_mfdata( "csv_outer_output_filerecord", csv_outer_output_filerecord ) @@ -756,9 +739,14 @@ def __init__( self.ats_outer_maximum_fraction = self.build_mfdata( "ats_outer_maximum_fraction", ats_outer_maximum_fraction ) - self.outer_hclose = self.build_mfdata("outer_hclose", outer_hclose) + self.dev_ptc = self.build_mfdata("dev_ptc", dev_ptc) + self.dev_ptc_output_filerecord = self.build_mfdata( + "dev_ptc_output_filerecord", dev_ptc_output_filerecord + ) + self.dev_ptc_option = self.build_mfdata("dev_ptc_option", dev_ptc_option) + self.dev_ptc_exponent = self.build_mfdata("dev_ptc_exponent", dev_ptc_exponent) + self.dev_ptc_del0 = self.build_mfdata("dev_ptc_del0", dev_ptc_del0) self.outer_dvclose = self.build_mfdata("outer_dvclose", outer_dvclose) - self.outer_rclosebnd = self.build_mfdata("outer_rclosebnd", outer_rclosebnd) self.outer_maximum = self.build_mfdata("outer_maximum", outer_maximum) self.under_relaxation = self.build_mfdata("under_relaxation", under_relaxation) self.under_relaxation_gamma = self.build_mfdata( @@ -786,7 +774,6 @@ def __init__( "backtracking_residual_limit", backtracking_residual_limit ) self.inner_maximum = self.build_mfdata("inner_maximum", inner_maximum) - self.inner_hclose = self.build_mfdata("inner_hclose", inner_hclose) self.inner_dvclose = self.build_mfdata("inner_dvclose", inner_dvclose) self.rcloserecord = self.build_mfdata("rcloserecord", rcloserecord) self.linear_acceleration = self.build_mfdata( diff --git a/flopy/mf6/modflow/mfmve.py b/flopy/mf6/modflow/mfmve.py new file mode 100644 index 0000000000..62af479a5f --- /dev/null +++ b/flopy/mf6/modflow/mfmve.py @@ -0,0 +1,246 @@ +# 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 + + +class ModflowMve(MFPackage): + """ + ModflowMve defines a MVE 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, default False + Do not set this parameter. It is intended for debugging and internal + processing purposes only. + print_input : keyword + keyword to indicate that the list of mover information will be written to the + listing file immediately after it is read. + print_flows : keyword + keyword to indicate that the list of lake 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 lake flow terms will be written to the file specified + with 'budget fileout' in output control. + budget_filerecord : record + budgetcsv_filerecord : record + + 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`. + + """ + + budget_filerecord = ListTemplateGenerator(("mve", "options", "budget_filerecord")) + budgetcsv_filerecord = ListTemplateGenerator( + ("mve", "options", "budgetcsv_filerecord") + ) + package_abbr = "mve" + _package_type = "mve" + dfn_file_name = "gwe-mve.dfn" + dfn = [ + ["header"], + [ + "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 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", + "type string", + "preserve_case true", + "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", + ], + ] + + def __init__( + self, + parent_model_or_package, + loading_package=False, + print_input=None, + print_flows=None, + save_flows=None, + budget_filerecord=None, + budgetcsv_filerecord=None, + filename=None, + pname=None, + **kwargs, + ): + """Initialize ModflowMve.""" + super().__init__( + parent=parent_model_or_package, + package_type="mve", + filename=filename, + pname=pname, + loading_package=loading_package, + **kwargs, + ) + + 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.budget_filerecord = self.build_mfdata( + "budget_filerecord", budget_filerecord + ) + self.budgetcsv_filerecord = self.build_mfdata( + "budgetcsv_filerecord", budgetcsv_filerecord + ) + + self._init_complete = True + + +class MvePackages(MFChildPackages): + """ + MvePackages is a container class for the ModflowMve class. + """ + + package_abbr = "mvepackages" + + def initialize( + self, + print_input=None, + print_flows=None, + save_flows=None, + budget_filerecord=None, + budgetcsv_filerecord=None, + filename=None, + pname=None, + ): + """ + Initialize a new ModflowMve package, removing any sibling + child packages attached to the same parent package. + + See :class:`ModflowMve` for parameter definitions. + """ + new_package = ModflowMve( + self._cpparent, + print_input=print_input, + print_flows=print_flows, + save_flows=save_flows, + budget_filerecord=budget_filerecord, + budgetcsv_filerecord=budgetcsv_filerecord, + filename=filename, + pname=pname, + child_builder_call=True, + ) + self.init_package(new_package, filename) + + def append_package( + self, + print_input=None, + print_flows=None, + save_flows=None, + budget_filerecord=None, + budgetcsv_filerecord=None, + filename=None, + pname=None, + ): + """ + Add a new ModflowMve package to the container. + + See :class:`ModflowMve` for parameter definitions. + """ + new_package = ModflowMve( + self._cpparent, + print_input=print_input, + print_flows=print_flows, + save_flows=save_flows, + budget_filerecord=budget_filerecord, + budgetcsv_filerecord=budgetcsv_filerecord, + filename=filename, + pname=pname, + child_builder_call=True, + ) + self._append_package(new_package, filename) diff --git a/flopy/mf6/modflow/mfnam.py b/flopy/mf6/modflow/mfnam.py index 3cad43c6fc..debd1e89ff 100644 --- a/flopy/mf6/modflow/mfnam.py +++ b/flopy/mf6/modflow/mfnam.py @@ -60,7 +60,7 @@ class ModflowNam(MFPackage): is the user-assigned name of the model. The model name cannot exceed 16 characters and must not have blanks within the name. The model name is case insensitive; any lowercase letters are converted and stored as upper case - letters. + letters. Model names must be unique. exchanges : [(exgtype, exgfile, exgmnamea, exgmnameb)] is the list of exchange types, exchange files, and model names. diff --git a/flopy/mf6/modflow/mfprtdis.py b/flopy/mf6/modflow/mfprtdis.py index 89ea68f765..9b197c363d 100644 --- a/flopy/mf6/modflow/mfprtdis.py +++ b/flopy/mf6/modflow/mfprtdis.py @@ -54,6 +54,13 @@ class ModflowPrtdis(MFPackage): modflow 6 simulation input. this option only has an effect when an output model netcdf file is configured and the simulation is run in validate mode, otherwise it is ignored. + crs : [string] + is a real-world coordinate reference system (crs) for the model, for example, + an epsg integer code (e.g. 26915), authority string (i.e. epsg:26915), or open + geospatial consortium well-known text (wkt) specification. limited to 5000 + characters. the entry for crs does not affect the model simulation, but it is + written to the binary grid file so that postprocessors can locate the grid in + space. packagedata : record ncf6 filein ncf6_filename Contains data for the ncf package. Data can be passed as a dictionary to the ncf package with variable names as keys and package data as values. Data for @@ -95,6 +102,7 @@ class ModflowPrtdis(MFPackage): """ grb_filerecord = ListTemplateGenerator(("prt6", "dis", "options", "grb_filerecord")) + crs = ArrayTemplateGenerator(("prt6", "dis", "options", "crs")) ncf_filerecord = ListTemplateGenerator(("prt6", "dis", "options", "ncf_filerecord")) delr = ArrayTemplateGenerator(("prt6", "dis", "griddata", "delr")) delc = ArrayTemplateGenerator(("prt6", "dis", "griddata", "delc")) @@ -201,7 +209,6 @@ class ModflowPrtdis(MFPackage): "preserve_case true", "reader urword", "optional true", - "developmode true", ], [ "block options", @@ -322,6 +329,7 @@ def __init__( angrot=None, export_array_ascii=None, export_array_netcdf=None, + crs=None, packagedata=None, nlay=1, nrow=2, @@ -357,6 +365,7 @@ def __init__( self.export_array_netcdf = self.build_mfdata( "export_array_netcdf", export_array_netcdf ) + self.crs = self.build_mfdata("crs", crs) self._ncf_filerecord = self.build_mfdata("ncf_filerecord", None) self._ncf_package = self.build_child_package( "ncf", packagedata, "packagedata", self._ncf_filerecord diff --git a/flopy/mf6/modflow/mfprtdisv.py b/flopy/mf6/modflow/mfprtdisv.py index 6c87de4e28..ca5c31cae4 100644 --- a/flopy/mf6/modflow/mfprtdisv.py +++ b/flopy/mf6/modflow/mfprtdisv.py @@ -55,6 +55,13 @@ class ModflowPrtdisv(MFPackage): modflow 6 simulation input. this option only has an effect when an output model netcdf file is configured and the simulation is run in validate mode, otherwise it is ignored. + crs : [string] + is a real-world coordinate reference system (crs) for the model, for example, + an epsg integer code (e.g. 26915), authority string (i.e. epsg:26915), or open + geospatial consortium well-known text (wkt) specification. limited to 5000 + characters. the entry for crs does not affect the model simulation, but it is + written to the binary grid file so that postprocessors can locate the grid in + space. packagedata : record ncf6 filein ncf6_filename Contains data for the ncf package. Data can be passed as a dictionary to the ncf package with variable names as keys and package data as values. Data for @@ -121,6 +128,7 @@ class ModflowPrtdisv(MFPackage): grb_filerecord = ListTemplateGenerator( ("prt6", "disv", "options", "grb_filerecord") ) + crs = ArrayTemplateGenerator(("prt6", "disv", "options", "crs")) ncf_filerecord = ListTemplateGenerator( ("prt6", "disv", "options", "ncf_filerecord") ) @@ -229,7 +237,6 @@ class ModflowPrtdisv(MFPackage): "preserve_case true", "reader urword", "optional true", - "developmode true", ], [ "block options", @@ -421,6 +428,7 @@ def __init__( angrot=None, export_array_ascii=None, export_array_netcdf=None, + crs=None, packagedata=None, nlay=None, ncpl=None, @@ -456,6 +464,7 @@ def __init__( self.export_array_netcdf = self.build_mfdata( "export_array_netcdf", export_array_netcdf ) + self.crs = self.build_mfdata("crs", crs) self._ncf_filerecord = self.build_mfdata("ncf_filerecord", None) self._ncf_package = self.build_child_package( "ncf", packagedata, "packagedata", self._ncf_filerecord diff --git a/flopy/mf6/modflow/mfprtoc.py b/flopy/mf6/modflow/mfprtoc.py index 9eb5e9be6a..7bfe501bf9 100644 --- a/flopy/mf6/modflow/mfprtoc.py +++ b/flopy/mf6/modflow/mfprtoc.py @@ -21,13 +21,16 @@ class ModflowPrtoc(MFPackage): processing purposes only. budget_filerecord : (budgetfile) * budgetfile : string - name of the output file to write budget information. + name of the output file to write budget information. Data are written to this + file only for time steps in which SAVE BUDGET is specified in a PERIOD block. + If SAVE BUDGET is specified in a PERIOD block and this file is not specified, + MODFLOW 6 will terminate with an error. 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. + information. If specified, a budget summary record will be written to this file + for every time step of the simulation. track_filerecord : (trackfile) * trackfile : string @@ -64,18 +67,17 @@ class ModflowPrtoc(MFPackage): track_dropped : keyword keyword to indicate that particle tracking output is to be written when a particle is dropped to the water table via dry_tracking_method drop. - track_timesrecord : (track_times, times) - * track_times : keyword - keyword indicating tracking times will follow - * times : [double precision] - times to track, relative to the beginning of the simulation. - - track_timesfilerecord : (timesfile) - * timesfile : string - name of the tracking times file - dev_dump_event_trace : keyword print a verbose particle tracking event trace to standard output + scratch_buffer : keyword + keyword to stage track events in a temporary (scratch) file instead of an in- + memory buffer. particle tracking results calculated during a time step are + buffered, and output is deferred, until successful completion of the time step. + by default, results are buffered in memory. however, for simulations in which a + very large number of track events is generated during a time step, memory + limits can be exceeded. in such cases, the scratch_buffer option can be invoked + to buffer results in a scratch file until successful completion of the time + step. buffering in a scratch file is typically slower than buffering in memory. ntracktimes : integer is the number of user-specified particle tracking times in the tracktimes block. @@ -122,12 +124,6 @@ class ModflowPrtoc(MFPackage): trackcsv_filerecord = ListTemplateGenerator( ("prt6", "oc", "options", "trackcsv_filerecord") ) - track_timesrecord = ListTemplateGenerator( - ("prt6", "oc", "options", "track_timesrecord") - ) - track_timesfilerecord = ListTemplateGenerator( - ("prt6", "oc", "options", "track_timesfilerecord") - ) tracktimes = ListTemplateGenerator(("prt6", "oc", "tracktimes", "tracktimes")) saverecord = ListTemplateGenerator(("prt6", "oc", "period", "saverecord")) printrecord = ListTemplateGenerator(("prt6", "oc", "period", "printrecord")) @@ -329,76 +325,18 @@ class ModflowPrtoc(MFPackage): ], [ "block options", - "name track_timesrecord", - "type record track_times times", - "shape", - "reader urword", - "tagged true", - "optional true", - "mf6internal ttimesrec", - "removed 6.6.0", - ], - [ - "block options", - "name track_times", + "name dev_dump_event_trace", "type keyword", "reader urword", - "in_record true", - "tagged true", - "shape", - "removed 6.6.0", - ], - [ - "block options", - "name times", - "type double precision", - "shape (any1d)", - "reader urword", - "in_record true", - "tagged false", - "repeating true", - "removed 6.6.0", - ], - [ - "block options", - "name track_timesfilerecord", - "type record track_timesfile timesfile", - "shape", - "reader urword", - "tagged true", "optional true", - "mf6internal ttimesfilerec", - "removed 6.6.0", - ], - [ - "block options", - "name track_timesfile", - "type keyword", - "reader urword", - "in_record true", - "tagged true", - "shape", - "removed 6.6.0", - ], - [ - "block options", - "name timesfile", - "type string", - "preserve_case true", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - "removed 6.6.0", + "mf6internal dev_dump_evtrace", ], [ "block options", - "name dev_dump_event_trace", + "name scratch_buffer", "type keyword", "reader urword", "optional true", - "mf6internal dev_dump_evtrace", ], [ "block dimensions", @@ -554,9 +492,8 @@ def __init__( track_weaksink=None, track_usertime=None, track_dropped=None, - track_timesrecord=None, - track_timesfilerecord=None, dev_dump_event_trace=None, + scratch_buffer=None, ntracktimes=None, tracktimes=None, saverecord=None, @@ -595,15 +532,10 @@ def __init__( self.track_weaksink = self.build_mfdata("track_weaksink", track_weaksink) self.track_usertime = self.build_mfdata("track_usertime", track_usertime) self.track_dropped = self.build_mfdata("track_dropped", track_dropped) - self.track_timesrecord = self.build_mfdata( - "track_timesrecord", track_timesrecord - ) - self.track_timesfilerecord = self.build_mfdata( - "track_timesfilerecord", track_timesfilerecord - ) self.dev_dump_event_trace = self.build_mfdata( "dev_dump_event_trace", dev_dump_event_trace ) + self.scratch_buffer = self.build_mfdata("scratch_buffer", scratch_buffer) self.ntracktimes = self.build_mfdata("ntracktimes", ntracktimes) self.tracktimes = self.build_mfdata("tracktimes", tracktimes) self.saverecord = self.build_mfdata("saverecord", saverecord) diff --git a/flopy/mf6/modflow/mfprtprp.py b/flopy/mf6/modflow/mfprtprp.py index 410b770025..cd8bd64553 100644 --- a/flopy/mf6/modflow/mfprtprp.py +++ b/flopy/mf6/modflow/mfprtprp.py @@ -98,18 +98,6 @@ class ModflowPrtprp(MFPackage): note that drape does not apply to attempted release into a cell for which idomain <= 0, which is considered not to exist in the simulation. attempted release into a such a cell results in an error. - release_timesrecord : (release_times, times) - * release_times : keyword - keyword indicating release times will follow - * times : [double precision] - times to release, relative to the beginning of the simulation. RELEASE_TIMES - and RELEASE_TIMESFILE are mutually exclusive. - - release_timesfilerecord : (timesfile) - * timesfile : string - name of the release times file. RELEASE_TIMES and RELEASE_TIMESFILE are - mutually exclusive. - dry_tracking_method : string is a string indicating how particles should behave in dry-but-active cells (as can occur with the newton formulation). the value can be 'drop', 'stop', or @@ -238,12 +226,6 @@ class ModflowPrtprp(MFPackage): trackcsv_filerecord = ListTemplateGenerator( ("prt6", "prp", "options", "trackcsv_filerecord") ) - release_timesrecord = ListTemplateGenerator( - ("prt6", "prp", "options", "release_timesrecord") - ) - release_timesfilerecord = ListTemplateGenerator( - ("prt6", "prp", "options", "release_timesfilerecord") - ) packagedata = ListTemplateGenerator(("prt6", "prp", "packagedata", "packagedata")) releasetimes = ListTemplateGenerator( ("prt6", "prp", "releasetimes", "releasetimes") @@ -410,72 +392,6 @@ class ModflowPrtprp(MFPackage): "reader urword", "optional true", ], - [ - "block options", - "name release_timesrecord", - "type record release_times times", - "shape", - "reader urword", - "tagged true", - "optional true", - "mf6internal releasetr", - "removed 6.6.0", - ], - [ - "block options", - "name release_times", - "type keyword", - "reader urword", - "in_record true", - "tagged true", - "shape", - "removed 6.6.0", - ], - [ - "block options", - "name times", - "type double precision", - "shape (any1d)", - "reader urword", - "in_record true", - "tagged false", - "repeating true", - "removed 6.6.0", - ], - [ - "block options", - "name release_timesfilerecord", - "type record release_timesfile timesfile", - "shape", - "reader urword", - "tagged true", - "optional true", - "mf6internal release_timesfr", - "removed 6.6.0", - ], - [ - "block options", - "name release_timesfile", - "type keyword", - "reader urword", - "in_record true", - "tagged true", - "shape", - "mf6internal release_timesfn", - "removed 6.6.0", - ], - [ - "block options", - "name timesfile", - "type string", - "preserve_case true", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - "removed 6.6.0", - ], [ "block options", "name dry_tracking_method", @@ -691,17 +607,6 @@ class ModflowPrtprp(MFPackage): "in_record true", "reader urword", ], - [ - "block period", - "name fraction", - "type double precision", - "shape (