From d42aa1032d616502fc947344465c7009bd26f58e Mon Sep 17 00:00:00 2001 From: Bonelli Date: Fri, 6 Feb 2026 10:46:59 -0500 Subject: [PATCH 1/3] chore(mf6): regenerate mf6 module --- flopy/mf6/modflow/__init__.py | 5 + flopy/mf6/modflow/mfems.py | 6 + flopy/mf6/modflow/mfgnc.py | 115 +++++ flopy/mf6/modflow/mfgwe.py | 6 + flopy/mf6/modflow/mfgweadv.py | 26 + flopy/mf6/modflow/mfgwecnd.py | 139 +++++- flopy/mf6/modflow/mfgwectp.py | 183 +++++++ flopy/mf6/modflow/mfgwedis.py | 226 ++++++++- flopy/mf6/modflow/mfgwedisu.py | 354 +++++++++++++- flopy/mf6/modflow/mfgwedisv.py | 317 +++++++++++- flopy/mf6/modflow/mfgweesl.py | 182 +++++++ flopy/mf6/modflow/mfgweest.py | 125 +++++ flopy/mf6/modflow/mfgwefmi.py | 71 +++ flopy/mf6/modflow/mfgwegwe.py | 265 ++++++++++ flopy/mf6/modflow/mfgweic.py | 49 +- flopy/mf6/modflow/mfgwelke.py | 370 ++++++++++++++ flopy/mf6/modflow/mfgwemve.py | 77 +++ flopy/mf6/modflow/mfgwemwe.py | 343 +++++++++++++ flopy/mf6/modflow/mfgwenam.py | 169 ++++++- flopy/mf6/modflow/mfgweoc.py | 169 +++++++ flopy/mf6/modflow/mfgwesfe.py | 370 ++++++++++++++ flopy/mf6/modflow/mfgwessm.py | 133 +++++ flopy/mf6/modflow/mfgweuze.py | 336 +++++++++++++ flopy/mf6/modflow/mfgwfapi.py | 88 ++++ flopy/mf6/modflow/mfgwfbuy.py | 125 +++++ flopy/mf6/modflow/mfgwfchd.py | 192 ++++++++ flopy/mf6/modflow/mfgwfchdg.py | 439 +++++++++++++++++ flopy/mf6/modflow/mfgwfcsub.py | 606 +++++++++++++++++++++++ flopy/mf6/modflow/mfgwfdis.py | 226 ++++++++- flopy/mf6/modflow/mfgwfdisu.py | 354 +++++++++++++- flopy/mf6/modflow/mfgwfdisv.py | 317 +++++++++++- flopy/mf6/modflow/mfgwfdrn.py | 218 +++++++++ flopy/mf6/modflow/mfgwfdrng.py | 523 ++++++++++++++++++++ flopy/mf6/modflow/mfgwfevt.py | 264 +++++++++- flopy/mf6/modflow/mfgwfevta.py | 205 +++++++- flopy/mf6/modflow/mfgwfghb.py | 199 ++++++++ flopy/mf6/modflow/mfgwfghbg.py | 469 ++++++++++++++++++ flopy/mf6/modflow/mfgwfgnc.py | 115 +++++ flopy/mf6/modflow/mfgwfgwe.py | 1 + flopy/mf6/modflow/mfgwfgwf.py | 297 +++++++++++ flopy/mf6/modflow/mfgwfgwt.py | 1 + flopy/mf6/modflow/mfgwfhfb.py | 90 +++- flopy/mf6/modflow/mfgwfic.py | 49 +- flopy/mf6/modflow/mfgwflak.py | 735 +++++++++++++++++++++++++++- flopy/mf6/modflow/mfgwfmaw.py | 609 +++++++++++++++++++++++ flopy/mf6/modflow/mfgwfmvr.py | 216 ++++++++ flopy/mf6/modflow/mfgwfnam.py | 179 +++++++ flopy/mf6/modflow/mfgwfnpf.py | 411 +++++++++++++++- flopy/mf6/modflow/mfgwfoc.py | 167 +++++++ flopy/mf6/modflow/mfgwfprt.py | 1 + flopy/mf6/modflow/mfgwfrch.py | 195 +++++++- flopy/mf6/modflow/mfgwfrcha.py | 182 ++++++- flopy/mf6/modflow/mfgwfriv.py | 208 ++++++++ flopy/mf6/modflow/mfgwfrivg.py | 494 +++++++++++++++++++ flopy/mf6/modflow/mfgwfsfr.py | 815 +++++++++++++++++++++++++++++++ flopy/mf6/modflow/mfgwfsto.py | 171 ++++++- flopy/mf6/modflow/mfgwfuzf.py | 483 ++++++++++++++++++ flopy/mf6/modflow/mfgwfvsc.py | 156 ++++++ flopy/mf6/modflow/mfgwfwel.py | 248 ++++++++++ flopy/mf6/modflow/mfgwfwelg.py | 576 ++++++++++++++++++++++ flopy/mf6/modflow/mfgwt.py | 6 + flopy/mf6/modflow/mfgwtadv.py | 32 +- flopy/mf6/modflow/mfgwtapi.py | 88 ++++ flopy/mf6/modflow/mfgwtcnc.py | 183 +++++++ flopy/mf6/modflow/mfgwtdis.py | 226 ++++++++- flopy/mf6/modflow/mfgwtdisu.py | 354 +++++++++++++- flopy/mf6/modflow/mfgwtdisv.py | 317 +++++++++++- flopy/mf6/modflow/mfgwtdsp.py | 127 ++++- flopy/mf6/modflow/mfgwtfmi.py | 71 +++ flopy/mf6/modflow/mfgwtgwt.py | 265 ++++++++++ flopy/mf6/modflow/mfgwtic.py | 49 +- flopy/mf6/modflow/mfgwtist.py | 265 +++++++++- flopy/mf6/modflow/mfgwtlkt.py | 354 ++++++++++++++ flopy/mf6/modflow/mfgwtmst.py | 166 ++++++- flopy/mf6/modflow/mfgwtmvt.py | 77 +++ flopy/mf6/modflow/mfgwtmwt.py | 327 +++++++++++++ flopy/mf6/modflow/mfgwtnam.py | 169 ++++++- flopy/mf6/modflow/mfgwtoc.py | 169 +++++++ flopy/mf6/modflow/mfgwtsft.py | 354 ++++++++++++++ flopy/mf6/modflow/mfgwtsrc.py | 211 +++++++- flopy/mf6/modflow/mfgwtssm.py | 133 +++++ flopy/mf6/modflow/mfgwtuzt.py | 336 +++++++++++++ flopy/mf6/modflow/mfims.py | 361 ++++++++++++++ flopy/mf6/modflow/mfmvr.py | 196 ++++++++ flopy/mf6/modflow/mfmvt.py | 57 +++ flopy/mf6/modflow/mfnam.py | 248 ++++++++++ flopy/mf6/modflow/mfprtdis.py | 220 ++++++++- flopy/mf6/modflow/mfprtdisv.py | 313 +++++++++++- flopy/mf6/modflow/mfprtfmi.py | 61 +++ flopy/mf6/modflow/mfprtmip.py | 51 ++ flopy/mf6/modflow/mfprtnam.py | 88 ++++ flopy/mf6/modflow/mfprtoc.py | 339 ++++++++++++- flopy/mf6/modflow/mfprtprp.py | 472 +++++++++++++++++- flopy/mf6/modflow/mfpts.py | 129 +++++ flopy/mf6/modflow/mftdis.py | 109 +++++ flopy/mf6/modflow/mfutlats.py | 107 +++- flopy/mf6/modflow/mfutlhpc.py | 70 +++ flopy/mf6/modflow/mfutllaktab.py | 75 +++ flopy/mf6/modflow/mfutlncf.py | 128 +++++ flopy/mf6/modflow/mfutlobs.py | 84 ++++ flopy/mf6/modflow/mfutlsfrtab.py | 67 +++ flopy/mf6/modflow/mfutlspc.py | 106 ++++ flopy/mf6/modflow/mfutlspca.py | 73 +++ flopy/mf6/modflow/mfutltas.py | 108 ++++ flopy/mf6/modflow/mfutlts.py | 188 +++++++ flopy/mf6/modflow/mfutltvk.py | 111 +++++ flopy/mf6/modflow/mfutltvs.py | 111 +++++ tach.toml | 512 +++++++++---------- 108 files changed, 22985 insertions(+), 338 deletions(-) create mode 100644 flopy/mf6/modflow/mfgwfchdg.py create mode 100644 flopy/mf6/modflow/mfgwfdrng.py create mode 100644 flopy/mf6/modflow/mfgwfghbg.py create mode 100644 flopy/mf6/modflow/mfgwfrivg.py create mode 100644 flopy/mf6/modflow/mfgwfwelg.py diff --git a/flopy/mf6/modflow/__init__.py b/flopy/mf6/modflow/__init__.py index a83e0ec897..c009179e2d 100644 --- a/flopy/mf6/modflow/__init__.py +++ b/flopy/mf6/modflow/__init__.py @@ -25,14 +25,17 @@ from .mfgwfapi import ModflowGwfapi from .mfgwfbuy import ModflowGwfbuy from .mfgwfchd import ModflowGwfchd +from .mfgwfchdg import ModflowGwfchdg from .mfgwfcsub import ModflowGwfcsub from .mfgwfdis import ModflowGwfdis from .mfgwfdisu import ModflowGwfdisu from .mfgwfdisv import ModflowGwfdisv from .mfgwfdrn import ModflowGwfdrn +from .mfgwfdrng import ModflowGwfdrng from .mfgwfevt import ModflowGwfevt from .mfgwfevta import ModflowGwfevta from .mfgwfghb import ModflowGwfghb +from .mfgwfghbg import ModflowGwfghbg from .mfgwfgnc import ModflowGwfgnc from .mfgwfgwe import ModflowGwfgwe from .mfgwfgwf import ModflowGwfgwf @@ -49,11 +52,13 @@ from .mfgwfrch import ModflowGwfrch from .mfgwfrcha import ModflowGwfrcha from .mfgwfriv import ModflowGwfriv +from .mfgwfrivg import ModflowGwfrivg from .mfgwfsfr import ModflowGwfsfr from .mfgwfsto import ModflowGwfsto from .mfgwfuzf import ModflowGwfuzf from .mfgwfvsc import ModflowGwfvsc from .mfgwfwel import ModflowGwfwel +from .mfgwfwelg import ModflowGwfwelg from .mfgwt import ModflowGwt from .mfgwtadv import ModflowGwtadv from .mfgwtapi import ModflowGwtapi diff --git a/flopy/mf6/modflow/mfems.py b/flopy/mf6/modflow/mfems.py index da51659fa0..0b65bedcb0 100644 --- a/flopy/mf6/modflow/mfems.py +++ b/flopy/mf6/modflow/mfems.py @@ -33,6 +33,12 @@ class ModflowEms(MFPackage): _package_type = "ems" dfn_file_name = "sln-ems.dfn" dfn = [["header", ["solution_package", "*"]]] + spec = { + "advanced": False, + "multi": False, + "name": "sln-ems", + "sln": {"abbr": "ems", "pattern": "*"}, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgnc.py b/flopy/mf6/modflow/mfgnc.py index 3c56e769c1..b7f1ade612 100644 --- a/flopy/mf6/modflow/mfgnc.py +++ b/flopy/mf6/modflow/mfgnc.py @@ -174,6 +174,121 @@ class ModflowGnc(MFPackage): "reader urword", ], ] + spec = { + "advanced": False, + "dimensions": { + "numalphaj": { + "block": "dimensions", + "description": "is the number of contributing factors.", + "longname": "number of contributing factors", + "name": "numalphaj", + "optional": False, + "reader": "urword", + "type": "integer", + }, + "numgnc": { + "block": "dimensions", + "description": "is the number of gnc entries.", + "longname": "number of ghost node corrections", + "name": "numgnc", + "optional": False, + "reader": "urword", + "type": "integer", + }, + }, + "gncdata": { + "gncdata": { + "block": "gncdata", + "item": { + "block": "gncdata", + "fields": { + "alphasj": { + "block": "gncdata", + "description": "is the contributing factors for each contributing node in CELLIDSJ. Note that if the number of actual contributing cells is less than NUMALPHAJ for any ghost node, then dummy CELLIDS should be inserted with an associated contributing factor of zero. The sum of ALPHASJ should be less than one. This is because one minus the sum of ALPHASJ is equal to the alpha term (alpha n in equation 4-61 of the GWF Model report) that is multiplied by the head in cell n.", + "longname": "GNC contributing factors", + "name": "alphasj", + "reader": "urword", + "shape": "(numalphaj)", + "type": "double precision", + }, + "cellidm": { + "block": "gncdata", + "description": "is the cellid of the connecting cell, $m$, to which flow occurs from the ghost node. For a structured grid that uses the DIS input file, CELLIDM is the layer, row, and column numbers of the cell. For a grid that uses the DISV input file, CELLIDM is the layer number and CELL2D number for the two cells. If the model uses the unstructured discretization (DISU) input file, then CELLIDM is the node number for the cell.", + "longname": "GNC cellid n", + "name": "cellidm", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "cellidn": { + "block": "gncdata", + "description": "is the cellid of the cell, $n$, in which the ghost node is located. For a structured grid that uses the DIS input file, CELLIDN is the layer, row, and column numbers of the cell. For a grid that uses the DISV input file, CELLIDN is the layer number and CELL2D number for the two cells. If the model uses the unstructured discretization (DISU) input file, then CELLIDN is the node number for the cell.", + "longname": "GNC cellid n", + "name": "cellidn", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "cellidsj": { + "block": "gncdata", + "description": "is the array of CELLIDS for the contributing j cells, which contribute to the interpolated head value at the ghost node. This item contains one CELLID for each of the contributing cells of the ghost node. Note that if the number of actual contributing cells needed by the user is less than NUMALPHAJ for any ghost node, then a dummy CELLID of zero(s) should be inserted with an associated contributing factor of zero. For a structured grid that uses the DIS input file, CELLID is the layer, row, and column numbers of the cell. For a grid that uses the DISV input file, CELLID is the layer number and cell2d number for the two cells. If the model uses the unstructured discretization (DISU) input file, then CELLID is the node number for the cell.", + "longname": "GNC contributing cells", + "name": "cellidsj", + "numeric_index": "true", + "reader": "urword", + "shape": "(numalphaj)", + "type": "integer", + }, + }, + "name": "gncdata", + "reader": "urword", + "type": "record", + }, + "name": "gncdata", + "reader": "urword", + "shape": "(maxbound)", + "type": "recarray", + } + }, + "multi": False, + "name": "gwf-gnc", + "options": { + "explicit": { + "block": "options", + "description": "keyword to indicate that the ghost node correction is applied in an explicit manner on the right-hand side of the matrix. the explicit approach will likely require additional outer iterations. if the keyword is not specified, then the correction will be applied in an implicit manner on the left-hand side. the implicit approach will likely converge better, but may require additional memory. if the explicit keyword is not specified, then the bicgstab linear acceleration option should be specified within the linear block of the sparse matrix solver.", + "longname": "use explicit gnc formulation", + "name": "explicit", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of gnc 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.", + "longname": "print simulated flows to listing file", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of gnc information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + "ref": { + "abbr": "gnc", + "key": "gnc_filerecord", + "param": "gncdata", + "parent": "parent_model_or_package", + "val": "gncdata", + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwe.py b/flopy/mf6/modflow/mfgwe.py index d0d1f10639..f024d9e61d 100644 --- a/flopy/mf6/modflow/mfgwe.py +++ b/flopy/mf6/modflow/mfgwe.py @@ -42,6 +42,9 @@ class ModflowGwe(MFModel): save_flows : keyword keyword to indicate that all model package flow terms will be written to the file specified with 'budget fileout' in output control. + dependent_variable_scaling : keyword + flag to scale x and rhs to avoid very large positive or negative dependent + variable values nc_mesh2d_filerecord : record netcdf layered mesh fileout record. nc_structured_filerecord : record @@ -87,6 +90,7 @@ def __init__( print_input=None, print_flows=None, save_flows=None, + dependent_variable_scaling=None, nc_mesh2d_filerecord=None, nc_structured_filerecord=None, nc_filerecord=None, @@ -112,6 +116,8 @@ def __init__( self.print_flows = self.name_file.print_flows self.name_file.save_flows.set_data(save_flows) self.save_flows = self.name_file.save_flows + self.name_file.dependent_variable_scaling.set_data(dependent_variable_scaling) + self.dependent_variable_scaling = self.name_file.dependent_variable_scaling self.name_file.nc_mesh2d_filerecord.set_data(nc_mesh2d_filerecord) self.nc_mesh2d_filerecord = self.name_file.nc_mesh2d_filerecord self.name_file.nc_structured_filerecord.set_data(nc_structured_filerecord) diff --git a/flopy/mf6/modflow/mfgweadv.py b/flopy/mf6/modflow/mfgweadv.py index 2a37750678..d375483fcd 100644 --- a/flopy/mf6/modflow/mfgweadv.py +++ b/flopy/mf6/modflow/mfgweadv.py @@ -65,6 +65,32 @@ class ModflowGweadv(MFPackage): "optional true", ], ] + spec = { + "advanced": False, + "multi": False, + "name": "gwe-adv", + "options": { + "ats_percel": { + "block": "options", + "description": "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 active, a time step calculation will be made for each cell based on flow through the cell and cell properties. the largest time step will be calculated such that the advective fractional cell distance (ats_percel) is not exceeded for any active cell in the grid. this time-step constraint will be submitted to the ats package, perhaps with constraints submitted by other packages, in the calculation of the time step. ats_percel must be greater than zero. if a value of zero is specified for ats_percel the program will automatically reset it to an internal no data value to indicate that time steps should not be subject to this constraint.", + "longname": "fractional cell distance used for time step calculation", + "name": "ats_percel", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "scheme": { + "block": "options", + "description": "scheme used to solve the advection term. can be upstream, central, or tvd. if not specified, upstream weighting is the default weighting scheme.", + "longname": "advective scheme", + "name": "scheme", + "optional": True, + "reader": "urword", + "type": "string", + "valid": "central upstream tvd", + }, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwecnd.py b/flopy/mf6/modflow/mfgwecnd.py index a21898848b..87e1b63be4 100644 --- a/flopy/mf6/modflow/mfgwecnd.py +++ b/flopy/mf6/modflow/mfgwecnd.py @@ -33,8 +33,11 @@ class ModflowGwecnd(MFPackage): keyword that specifies input griddata arrays should be written to layered ascii output files. export_array_netcdf : keyword - keyword that specifies input griddata arrays should be written to the model - output netcdf file. + keyword that specifies input gridded arrays should be written to the model + output netcdf file with attributes that support using the generated file as a + 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. alh : [double precision] longitudinal dispersivity in horizontal direction. if flow is strictly horizontal, then this is the longitudinal dispersivity that will be used. if @@ -201,6 +204,138 @@ class ModflowGwecnd(MFPackage): "optional true", ], ] + spec = { + "advanced": False, + "griddata": { + "alh": { + "block": "griddata", + "description": "longitudinal dispersivity in horizontal direction. if flow is strictly horizontal, then this is the longitudinal dispersivity that will be used. if flow is not strictly horizontal or strictly vertical, then the longitudinal dispersivity is a function of both alh and alv. if mechanical dispersion is represented (by specifying any dispersivity values) then this array is required.", + "layered": True, + "longname": "longitudinal dispersivity in horizontal direction", + "name": "alh", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "alv": { + "block": "griddata", + "description": "longitudinal dispersivity in vertical direction. if flow is strictly vertical, then this is the longitudinal dispsersivity value that will be used. if flow is not strictly horizontal or strictly vertical, then the longitudinal dispersivity is a function of both alh and alv. if this value is not specified and mechanical dispersion is represented, then this array is set equal to alh.", + "layered": True, + "longname": "longitudinal dispersivity in vertical direction", + "name": "alv", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "ath1": { + "block": "griddata", + "description": "transverse dispersivity in horizontal direction. this is the transverse dispersivity value for the second ellipsoid axis. if flow is strictly horizontal and directed in the x direction (along a row for a regular grid), then this value controls spreading in the y direction. if mechanical dispersion is represented (by specifying any dispersivity values) then this array is required.", + "layered": True, + "longname": "transverse dispersivity in horizontal direction", + "name": "ath1", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "ath2": { + "block": "griddata", + "description": "transverse dispersivity in horizontal direction. this is the transverse dispersivity value for the third ellipsoid axis. if flow is strictly horizontal and directed in the x direction (along a row for a regular grid), then this value controls spreading in the z direction. if this value is not specified and mechanical dispersion is represented, then this array is set equal to ath1.", + "layered": True, + "longname": "transverse dispersivity in horizontal direction", + "name": "ath2", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "atv": { + "block": "griddata", + "description": "transverse dispersivity when flow is in vertical direction. if flow is strictly vertical and directed in the z direction, then this value controls spreading in the x and y directions. if this value is not specified and mechanical dispersion is represented, then this array is set equal to ath2.", + "layered": True, + "longname": "transverse dispersivity when flow is in vertical direction", + "name": "atv", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "kts": { + "block": "griddata", + "description": "thermal conductivity of the solid aquifer material", + "layered": True, + "longname": "thermal conductivity of the aquifer material", + "name": "kts", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "ktw": { + "block": "griddata", + "description": "thermal conductivity of the simulated fluid. note that the cnd package does not account for the tortuosity of the flow paths when solving for the conductive spread of heat. if tortuosity plays an important role in the thermal conductivity calculation, its effect should be reflected in the value specified for ktw.", + "layered": True, + "longname": "thermal conductivity of the simulated fluid", + "name": "ktw", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + }, + "multi": False, + "name": "gwe-cnd", + "options": { + "export_array_ascii": { + "block": "options", + "description": "keyword that specifies input griddata arrays should be written to layered ascii output files.", + "longname": "export array variables to layered ascii files.", + "mf6internal": "export_ascii", + "name": "export_array_ascii", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "export_array_netcdf": { + "block": "options", + "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", + "extended": True, + "longname": "export array variables to netcdf output files.", + "mf6internal": "export_nc", + "name": "export_array_netcdf", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "xt3d_off": { + "block": "options", + "description": "deactivate the xt3d method and use the faster and less accurate approximation. this option may provide a fast and accurate solution under some circumstances, such as when flow aligns with the model grid, there is no mechanical dispersion, or when the longitudinal and transverse dispersivities are equal. this option may also be used to assess the computational demand of the xt3d approach by noting the run time differences with and without this option on.", + "longname": "deactivate xt3d", + "name": "xt3d_off", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "xt3d_rhs": { + "block": "options", + "description": "add xt3d terms to right-hand side, when possible. this option uses less memory, but may require more iterations.", + "longname": "xt3d on right-hand side", + "name": "xt3d_rhs", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwectp.py b/flopy/mf6/modflow/mfgwectp.py index 937f047b95..b987e8a5fc 100644 --- a/flopy/mf6/modflow/mfgwectp.py +++ b/flopy/mf6/modflow/mfgwectp.py @@ -298,6 +298,189 @@ class ModflowGwectp(MFPackage): "optional true", ], ] + spec = { + "advanced": False, + "dimensions": { + "maxbound": { + "block": "dimensions", + "description": "integer value specifying the maximum number of constant temperature cells that will be specified for use during any stress period.", + "longname": "maximum number of constant temperatures", + "name": "maxbound", + "optional": False, + "reader": "urword", + "type": "integer", + } + }, + "fkeys": { + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "ts_filerecord": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + }, + "multi": True, + "name": "gwe-ctp", + "options": { + "auxiliary": { + "block": "options", + "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", + "longname": "keyword to specify aux variables", + "name": "auxiliary", + "optional": True, + "reader": "urword", + "shape": "(naux)", + "type": "string", + }, + "auxmultname": { + "block": "options", + "description": "name of auxiliary variable to be used as multiplier of temperature value.", + "longname": "name of auxiliary variable for multiplier", + "name": "auxmultname", + "optional": True, + "reader": "urword", + "type": "string", + }, + "boundnames": { + "block": "options", + "description": "keyword to indicate that boundary names may be provided with the list of constant temperature cells.", + "name": "boundnames", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of constant temperature 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.", + "longname": "print calculated flows to listing file", + "mf6internal": "ipakcb", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of constant temperature information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "mf6internal": "iprflow", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that constant temperature flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save constant temperature flows to budget file", + "mf6internal": "iprpak", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "timeseries": { + "block": "options", + "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", + "name": "timeseries", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + "type": "record ts6 filein ts6_filename", + }, + }, + "period": { + "stress_period_data": { + "block": "period", + "item": { + "block": "period", + "fields": { + "aux": { + "block": "period", + "description": "represents the values of the auxiliary variables for each constant temperature. The values of auxiliary variables must be present for each constant temperature. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "auxiliary variables", + "mf6internal": "auxvar", + "name": "aux", + "optional": "true", + "reader": "urword", + "shape": "(naux)", + "time_series": "true", + "type": "double precision", + }, + "boundname": { + "block": "period", + "description": "name of the constant temperature cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", + "longname": "constant temperature name", + "name": "boundname", + "optional": "true", + "reader": "urword", + "type": "string", + }, + "cellid": { + "block": "period", + "description": "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 layer, row, and column. For a grid that uses the DISV input file, CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file, CELLID is the node number for the cell.", + "longname": "cell identifier", + "name": "cellid", + "reader": "urword", + "shape": "(ncelldim)", + "type": "integer", + }, + "temp": { + "block": "period", + "description": "is the constant temperature value. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "constant temperature value", + "mf6internal": "tspvar", + "name": "temp", + "reader": "urword", + "time_series": "true", + "type": "double precision", + }, + }, + "mf6internal": "spd", + "name": "stress_period_data", + "reader": "urword", + "type": "record", + }, + "mf6internal": "spd", + "name": "stress_period_data", + "reader": "urword", + "shape": "(maxbound)", + "type": "recarray", + }, + "transient_block": True, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwedis.py b/flopy/mf6/modflow/mfgwedis.py index 28b47d3907..586c11e908 100644 --- a/flopy/mf6/modflow/mfgwedis.py +++ b/flopy/mf6/modflow/mfgwedis.py @@ -49,8 +49,11 @@ class ModflowGwedis(MFPackage): keyword that specifies input griddata arrays should be written to layered ascii output files. export_array_netcdf : keyword - keyword that specifies input griddata arrays should be written to the model - output netcdf file. + keyword that specifies input gridded arrays should be written to the model + output netcdf file with attributes that support using the generated file as a + 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. 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 @@ -199,7 +202,7 @@ class ModflowGwedis(MFPackage): "preserve_case true", "reader urword", "optional true", - "prerelease true", + "developmode true", ], [ "block options", @@ -314,6 +317,223 @@ class ModflowGwedis(MFPackage): "optional true", ], ] + spec = { + "advanced": False, + "dimensions": { + "ncol": { + "block": "dimensions", + "default": 2, + "description": "is the number of columns in the model grid.", + "longname": "number of columns", + "name": "ncol", + "optional": False, + "reader": "urword", + "type": "integer", + }, + "nlay": { + "block": "dimensions", + "default": 1, + "description": "is the number of layers in the model grid.", + "longname": "number of layers", + "name": "nlay", + "optional": False, + "reader": "urword", + "type": "integer", + }, + "nrow": { + "block": "dimensions", + "default": 2, + "description": "is the number of rows in the model grid.", + "longname": "number of rows", + "name": "nrow", + "optional": False, + "reader": "urword", + "type": "integer", + }, + }, + "fkeys": { + "ncf_filerecord": { + "abbr": "ncf", + "key": "ncf_filerecord", + "param": "packagedata", + "parent": "parent_package", + "val": "packagedata", + } + }, + "griddata": { + "botm": { + "block": "griddata", + "default": 0.0, + "description": "is the bottom elevation for each cell.", + "layered": True, + "longname": "cell bottom elevation", + "name": "botm", + "netcdf": True, + "reader": "readarray", + "shape": "(ncol, nrow, nlay)", + "type": "double precision", + }, + "delc": { + "block": "griddata", + "default": 1.0, + "description": "is the row spacing in the column direction.", + "longname": "spacing along a column", + "name": "delc", + "netcdf": True, + "reader": "readarray", + "shape": "(nrow)", + "type": "double precision", + }, + "delr": { + "block": "griddata", + "default": 1.0, + "description": "is the column spacing in the row direction.", + "longname": "spacing along a row", + "name": "delr", + "netcdf": True, + "reader": "readarray", + "shape": "(ncol)", + "type": "double precision", + }, + "idomain": { + "block": "griddata", + "description": "is an optional array that characterizes the existence status of a cell. if the idomain array is not specified, then all model cells exist within the solution. if the idomain value for a cell is 0, the cell does not exist in the simulation. input and output values will be read and written for the cell, but internal to the program, the cell is excluded from the solution. if the idomain value for a cell is 1, the cell exists in the simulation. if the idomain value for a cell is -1, the cell does not exist in the simulation. furthermore, the first existing cell above will be connected to the first existing cell below. this type of cell is referred to as a 'vertical pass through' cell.", + "layered": True, + "longname": "idomain existence array", + "name": "idomain", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(ncol, nrow, nlay)", + "type": "integer", + }, + "top": { + "block": "griddata", + "default": 1.0, + "description": "is the top elevation for each cell in the top model layer.", + "longname": "cell top elevation", + "name": "top", + "netcdf": True, + "reader": "readarray", + "shape": "(ncol, nrow)", + "type": "double precision", + }, + }, + "multi": False, + "name": "gwe-dis", + "options": { + "angrot": { + "block": "options", + "description": "counter-clockwise rotation angle (in degrees) of the lower-left corner of the model grid. if not specified, then a default value of 0.0 is assigned. the value for angrot does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", + "longname": "rotation angle", + "name": "angrot", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "crs": { + "block": "options", + "description": "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.", + "developmode": True, + "longname": "crs user input string", + "name": "crs", + "optional": True, + "reader": "urword", + "shape": "lenbigline", + "type": "string", + }, + "export_array_ascii": { + "block": "options", + "description": "keyword that specifies input griddata arrays should be written to layered ascii output files.", + "longname": "export array variables to layered ascii files.", + "mf6internal": "export_ascii", + "name": "export_array_ascii", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "export_array_netcdf": { + "block": "options", + "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", + "extended": True, + "longname": "export array variables to netcdf output files.", + "mf6internal": "export_nc", + "name": "export_array_netcdf", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "grb_filerecord": { + "block": "options", + "fields": { + "grb6_filename": { + "block": "options", + "description": "defines a binary grid output file. If this option is not provided, the output file will have the same name as the discretization input file, plus extension '.grb'.", + "longname": "file name of GRB information", + "name": "grb6_filename", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "grb_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "length_units": { + "block": "options", + "description": "is the length units used for this model. values can be 'feet', 'meters', or 'centimeters'. if not specified, the default is 'unknown'.", + "longname": "model length units", + "name": "length_units", + "optional": True, + "reader": "urword", + "type": "string", + }, + "nogrb": { + "block": "options", + "description": "keyword to deactivate writing of the binary grid file.", + "longname": "do not write binary grid file", + "name": "nogrb", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "packagedata": { + "block": "options", + "description": "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 the packagedata variable is also acceptable. See ncf package documentation for more information.", + "name": "packagedata", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "ncf", + "key": "ncf_filerecord", + "param": "packagedata", + "parent": "parent_package", + "val": "packagedata", + }, + "type": "record ncf6 filein ncf6_filename", + }, + "xorigin": { + "block": "options", + "description": "x-position of the lower-left corner of the model grid. a default value of zero is assigned if not specified. the value for xorigin does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", + "longname": "x-position of the model grid origin", + "name": "xorigin", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "yorigin": { + "block": "options", + "description": "y-position of the lower-left corner of the model grid. if not specified, then a default value equal to zero is used. the value for yorigin does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", + "longname": "y-position of the model grid origin", + "name": "yorigin", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwedisu.py b/flopy/mf6/modflow/mfgwedisu.py index c2b494b708..4bb3666f46 100644 --- a/flopy/mf6/modflow/mfgwedisu.py +++ b/flopy/mf6/modflow/mfgwedisu.py @@ -290,7 +290,7 @@ class ModflowGwedisu(MFPackage): "preserve_case true", "reader urword", "optional true", - "prerelease true", + "developmode true", ], [ "block dimensions", @@ -485,6 +485,358 @@ class ModflowGwedisu(MFPackage): "numeric_index true", ], ] + spec = { + "advanced": False, + "cell2d": { + "cell2d": { + "block": "cell2d", + "item": { + "block": "cell2d", + "fields": { + "icell2d": { + "block": "cell2d", + "description": "is the cell2d number. Records in the CELL2D block must be listed in consecutive order from 1 to NODES.", + "longname": "cell2d number", + "name": "icell2d", + "numeric_index": "true", + "optional": "false", + "reader": "urword", + "type": "integer", + }, + "icvert": { + "block": "cell2d", + "description": "is an array of integer values containing vertex numbers (in the VERTICES block) used to define the cell. Vertices must be listed in clockwise order.", + "longname": "array of vertex numbers", + "name": "icvert", + "numeric_index": "true", + "optional": "false", + "reader": "urword", + "shape": "(ncvert)", + "type": "integer", + }, + "ncvert": { + "block": "cell2d", + "description": "is the number of vertices required to define the cell. There may be a different number of vertices for each cell.", + "longname": "number of cell vertices", + "name": "ncvert", + "optional": "false", + "reader": "urword", + "type": "integer", + }, + "xc": { + "block": "cell2d", + "description": "is the x-coordinate for the cell center.", + "longname": "x-coordinate for cell center", + "name": "xc", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + "yc": { + "block": "cell2d", + "description": "is the y-coordinate for the cell center.", + "longname": "y-coordinate for cell center", + "name": "yc", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + }, + "longname": "cell2d data", + "name": "cell2d", + "optional": False, + "reader": "urword", + "type": "record", + }, + "longname": "cell2d data", + "name": "cell2d", + "optional": False, + "reader": "urword", + "shape": "(nodes)", + "type": "recarray", + } + }, + "connectiondata": { + "angldegx": { + "block": "connectiondata", + "description": "is the angle (in degrees) between the horizontal x-axis and the outward normal to the face between a cell and its connecting cells. the angle varies between zero and 360.0 degrees, where zero degrees points in the positive x-axis direction, and 90 degrees points in the positive y-axis direction. angldegx is only needed if horizontal anisotropy is specified in the npf package, if the xt3d option is used in the npf package, or if the save_specific_discharge option is specified in the npf package. angldegx does not need to be specified if these conditions are not met. angldegx is of size nja; values specified for vertical connections and for the diagonal position are not used. note that angldegx is read in degrees, which is different from modflow-usg, which reads a similar variable (anglex) in radians.", + "jagged_array": "iac", + "longname": "angle of face normal to connection", + "name": "angldegx", + "optional": True, + "reader": "readarray", + "shape": "(nja)", + "type": "double precision", + }, + "cl12": { + "block": "connectiondata", + "description": "is the array containing connection lengths between the center of cell n and the shared face with each adjacent m cell.", + "jagged_array": "iac", + "longname": "connection lengths", + "name": "cl12", + "reader": "readarray", + "shape": "(nja)", + "type": "double precision", + }, + "hwva": { + "block": "connectiondata", + "description": "is a symmetric array of size nja. for horizontal connections, entries in hwva are the horizontal width perpendicular to flow. for vertical connections, entries in hwva are the vertical area for flow. thus, values in the hwva array contain dimensions of both length and area. entries in the hwva array have a one-to-one correspondence with the connections specified in the ja array. likewise, there is a one-to-one correspondence between entries in the hwva array and entries in the ihc array, which specifies the connection type (horizontal or vertical). entries in the hwva array must be symmetric; the program will terminate with an error if the value for hwva for an n to m connection does not equal the value for hwva for the corresponding n to m connection.", + "jagged_array": "iac", + "longname": "connection lengths", + "name": "hwva", + "reader": "readarray", + "shape": "(nja)", + "type": "double precision", + }, + "iac": { + "block": "connectiondata", + "description": "is the number of connections (plus 1) for each cell. the sum of all the entries in iac must be equal to nja.", + "longname": "number of cell connections", + "name": "iac", + "reader": "readarray", + "shape": "(nodes)", + "type": "integer", + }, + "ihc": { + "block": "connectiondata", + "description": "is an index array indicating the direction between node n and all of its m connections. if ihc = 0 then cell n and cell m are connected in the vertical direction. cell n overlies cell m if the cell number for n is less than m; cell m overlies cell n if the cell number for m is less than n. if ihc = 1 then cell n and cell m are connected in the horizontal direction. if ihc = 2 then cell n and cell m are connected in the horizontal direction, and the connection is vertically staggered. a vertically staggered connection is one in which a cell is horizontally connected to more than one cell in a horizontal connection.", + "jagged_array": "iac", + "longname": "connection type", + "name": "ihc", + "reader": "readarray", + "shape": "(nja)", + "type": "integer", + }, + "ja": { + "block": "connectiondata", + "description": "is a list of cell number (n) followed by its connecting cell numbers (m) for each of the m cells connected to cell n. the number of values to provide for cell n is iac(n). this list is sequentially provided for the first to the last cell. the first value in the list must be cell n itself, and the remaining cells must be listed in an increasing order (sorted from lowest number to highest). note that the cell and its connections are only supplied for the gwe cells and their connections to the other gwe cells. also note that the ja list input may be divided such that every node and its connectivity list can be on a separate line for ease in readability of the file. to further ease readability of the file, the node number of the cell whose connectivity is subsequently listed, may be expressed as a negative number, the sign of which is subsequently converted to positive by the code.", + "jagged_array": "iac", + "longname": "grid connectivity", + "name": "ja", + "numeric_index": True, + "reader": "readarray", + "shape": "(nja)", + "type": "integer", + }, + }, + "dimensions": { + "nja": { + "block": "dimensions", + "description": "is the sum of the number of connections and nodes. when calculating the total number of connections, the connection between cell n and cell m is considered to be different from the connection between cell m and cell n. thus, nja is equal to the total number of connections, including n to m and m to n, and the total number of cells.", + "longname": "number of columns", + "name": "nja", + "optional": False, + "reader": "urword", + "type": "integer", + }, + "nodes": { + "block": "dimensions", + "description": "is the number of cells in the model grid.", + "longname": "number of layers", + "name": "nodes", + "optional": False, + "reader": "urword", + "type": "integer", + }, + "nvert": { + "block": "dimensions", + "description": "is the total number of (x, y) vertex pairs used to define the plan-view shape of each cell in the model grid. if nvert is not specified or is specified as zero, then the vertices and cell2d blocks below are not read. nvert and the accompanying vertices and cell2d blocks should be specified for most simulations. if the xt3d or save_specific_discharge options are specified in the npf package, then this information is required.", + "longname": "number of vertices", + "name": "nvert", + "optional": True, + "reader": "urword", + "type": "integer", + }, + }, + "griddata": { + "area": { + "block": "griddata", + "description": "is the cell surface area (in plan view).", + "longname": "cell surface area", + "name": "area", + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "bot": { + "block": "griddata", + "description": "is the bottom elevation for each cell.", + "longname": "cell bottom elevation", + "name": "bot", + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "idomain": { + "block": "griddata", + "description": "is an optional array that characterizes the existence status of a cell. if the idomain array is not specified, then all model cells exist within the solution. if the idomain value for a cell is 0, the cell does not exist in the simulation. input and output values will be read and written for the cell, but internal to the program, the cell is excluded from the solution. if the idomain value for a cell is 1 or greater, the cell exists in the simulation. idomain values of -1 cannot be specified for the disu package.", + "layered": False, + "longname": "idomain existence array", + "name": "idomain", + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "integer", + }, + "top": { + "block": "griddata", + "description": "is the top elevation for each cell in the model grid.", + "longname": "cell top elevation", + "name": "top", + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + }, + "multi": False, + "name": "gwe-disu", + "options": { + "angrot": { + "block": "options", + "description": "counter-clockwise rotation angle (in degrees) of the model grid coordinate system relative to a real-world coordinate system. if not specified, then a default value of 0.0 is assigned. the value for angrot does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", + "longname": "rotation angle", + "name": "angrot", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "crs": { + "block": "options", + "description": "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.", + "developmode": True, + "longname": "crs user input string", + "name": "crs", + "optional": True, + "reader": "urword", + "shape": "lenbigline", + "type": "string", + }, + "export_array_ascii": { + "block": "options", + "description": "keyword that specifies input griddata arrays should be written to layered ascii output files.", + "longname": "export array variables to layered ascii files.", + "mf6internal": "export_ascii", + "name": "export_array_ascii", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "grb_filerecord": { + "block": "options", + "fields": { + "grb6_filename": { + "block": "options", + "description": "defines a binary grid output file. If this option is not provided, the output file will have the same name as the discretization input file, plus extension '.grb'.", + "longname": "file name of GRB information", + "name": "grb6_filename", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "grb_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "length_units": { + "block": "options", + "description": "is the length units used for this model. values can be 'feet', 'meters', or 'centimeters'. if not specified, the default is 'unknown'.", + "longname": "model length units", + "name": "length_units", + "optional": True, + "reader": "urword", + "type": "string", + }, + "nogrb": { + "block": "options", + "description": "keyword to deactivate writing of the binary grid file.", + "longname": "do not write binary grid file", + "name": "nogrb", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "vertical_offset_tolerance": { + "block": "options", + "default": 0.0, + "description": "checks are performed to ensure that the top of a cell is not higher than the bottom of an overlying cell. this option can be used to specify the tolerance that is used for checking. if top of a cell is above the bottom of an overlying cell by a value less than this tolerance, then the program will not terminate with an error. the default value is zero. this option should generally not be used.", + "longname": "vertical length dimension for top and bottom checking", + "mf6internal": "voffsettol", + "name": "vertical_offset_tolerance", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "xorigin": { + "block": "options", + "description": "x-position of the origin used for model grid vertices. this value should be provided in a real-world coordinate system. a default value of zero is assigned if not specified. the value for xorigin does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", + "longname": "x-position origin of the model grid coordinate system", + "name": "xorigin", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "yorigin": { + "block": "options", + "description": "y-position of the origin used for model grid vertices. this value should be provided in a real-world coordinate system. if not specified, then a default value equal to zero is used. the value for yorigin does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", + "longname": "y-position origin of the model grid coordinate system", + "name": "yorigin", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + }, + "vertices": { + "vertices": { + "block": "vertices", + "item": { + "block": "vertices", + "fields": { + "iv": { + "block": "vertices", + "description": "is the vertex number. Records in the VERTICES block must be listed in consecutive order from 1 to NVERT.", + "longname": "vertex number", + "name": "iv", + "numeric_index": "true", + "optional": "false", + "reader": "urword", + "type": "integer", + }, + "xv": { + "block": "vertices", + "description": "is the x-coordinate for the vertex.", + "longname": "x-coordinate for vertex", + "name": "xv", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + "yv": { + "block": "vertices", + "description": "is the y-coordinate for the vertex.", + "longname": "y-coordinate for vertex", + "name": "yv", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + }, + "longname": "vertices data", + "name": "vertices", + "optional": False, + "reader": "urword", + "type": "record", + }, + "longname": "vertices data", + "name": "vertices", + "optional": False, + "reader": "urword", + "shape": "(nvert)", + "type": "recarray", + } + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwedisv.py b/flopy/mf6/modflow/mfgwedisv.py index 2e5e5d7559..674d1a3756 100644 --- a/flopy/mf6/modflow/mfgwedisv.py +++ b/flopy/mf6/modflow/mfgwedisv.py @@ -52,8 +52,11 @@ class ModflowGwedisv(MFPackage): keyword that specifies input griddata arrays should be written to layered ascii output files. export_array_netcdf : keyword - keyword that specifies input griddata arrays should be written to the model - output netcdf file. + keyword that specifies input gridded arrays should be written to the model + output netcdf file with attributes that support using the generated file as a + 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. 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 @@ -229,7 +232,7 @@ class ModflowGwedisv(MFPackage): "preserve_case true", "reader urword", "optional true", - "prerelease true", + "developmode true", ], [ "block options", @@ -413,6 +416,314 @@ class ModflowGwedisv(MFPackage): "numeric_index true", ], ] + spec = { + "advanced": False, + "cell2d": { + "cell2d": { + "block": "cell2d", + "item": { + "block": "cell2d", + "fields": { + "icell2d": { + "block": "cell2d", + "description": "is the CELL2D number. Records in the CELL2D block must be listed in consecutive order from the first to the last.", + "longname": "cell2d number", + "name": "icell2d", + "numeric_index": "true", + "optional": "false", + "reader": "urword", + "type": "integer", + }, + "icvert": { + "block": "cell2d", + "description": "is an array of integer values containing vertex numbers (in the VERTICES block) used to define the cell. Vertices must be listed in clockwise order. Cells that are connected must share vertices.", + "longname": "array of vertex numbers", + "name": "icvert", + "numeric_index": "true", + "optional": "false", + "reader": "urword", + "shape": "(ncvert)", + "type": "integer", + }, + "ncvert": { + "block": "cell2d", + "description": "is the number of vertices required to define the cell. There may be a different number of vertices for each cell.", + "longname": "number of cell vertices", + "name": "ncvert", + "optional": "false", + "reader": "urword", + "type": "integer", + }, + "xc": { + "block": "cell2d", + "description": "is the x-coordinate for the cell center.", + "longname": "x-coordinate for cell center", + "name": "xc", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + "yc": { + "block": "cell2d", + "description": "is the y-coordinate for the cell center.", + "longname": "y-coordinate for cell center", + "name": "yc", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + }, + "longname": "cell2d data", + "name": "cell2d", + "optional": False, + "reader": "urword", + "type": "record", + }, + "longname": "cell2d data", + "name": "cell2d", + "optional": False, + "reader": "urword", + "shape": "(ncpl)", + "type": "recarray", + } + }, + "dimensions": { + "ncpl": { + "block": "dimensions", + "description": "is the number of cells per layer. this is a constant value for the grid and it applies to all layers.", + "longname": "number of cells per layer", + "name": "ncpl", + "optional": False, + "reader": "urword", + "type": "integer", + }, + "nlay": { + "block": "dimensions", + "description": "is the number of layers in the model grid.", + "longname": "number of layers", + "name": "nlay", + "optional": False, + "reader": "urword", + "type": "integer", + }, + "nvert": { + "block": "dimensions", + "description": "is the total number of (x, y) vertex pairs used to characterize the horizontal configuration of the model grid.", + "longname": "number of columns", + "name": "nvert", + "optional": False, + "reader": "urword", + "type": "integer", + }, + }, + "fkeys": { + "ncf_filerecord": { + "abbr": "ncf", + "key": "ncf_filerecord", + "param": "packagedata", + "parent": "parent_package", + "val": "packagedata", + } + }, + "griddata": { + "botm": { + "block": "griddata", + "description": "is the bottom elevation for each cell.", + "layered": True, + "longname": "model bottom elevation", + "name": "botm", + "netcdf": True, + "reader": "readarray", + "shape": "(ncpl, nlay)", + "type": "double precision", + }, + "idomain": { + "block": "griddata", + "description": "is an optional array that characterizes the existence status of a cell. if the idomain array is not specified, then all model cells exist within the solution. if the idomain value for a cell is 0, the cell does not exist in the simulation. input and output values will be read and written for the cell, but internal to the program, the cell is excluded from the solution. if the idomain value for a cell is 1, the cell exists in the simulation. if the idomain value for a cell is -1, the cell does not exist in the simulation. furthermore, the first existing cell above will be connected to the first existing cell below. this type of cell is referred to as a 'vertical pass through' cell.", + "layered": True, + "longname": "idomain existence array", + "name": "idomain", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(ncpl, nlay)", + "type": "integer", + }, + "top": { + "block": "griddata", + "description": "is the top elevation for each cell in the top model layer.", + "longname": "model top elevation", + "name": "top", + "netcdf": True, + "reader": "readarray", + "shape": "(ncpl)", + "type": "double precision", + }, + }, + "multi": False, + "name": "gwe-disv", + "options": { + "angrot": { + "block": "options", + "description": "counter-clockwise rotation angle (in degrees) of the model grid coordinate system relative to a real-world coordinate system. if not specified, then a default value of 0.0 is assigned. the value for angrot does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", + "longname": "rotation angle", + "name": "angrot", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "crs": { + "block": "options", + "description": "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.", + "developmode": True, + "longname": "crs user input string", + "name": "crs", + "optional": True, + "reader": "urword", + "shape": "lenbigline", + "type": "string", + }, + "export_array_ascii": { + "block": "options", + "description": "keyword that specifies input griddata arrays should be written to layered ascii output files.", + "longname": "export array variables to layered ascii files.", + "mf6internal": "export_ascii", + "name": "export_array_ascii", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "export_array_netcdf": { + "block": "options", + "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", + "extended": True, + "longname": "export array variables to netcdf output files.", + "mf6internal": "export_nc", + "name": "export_array_netcdf", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "grb_filerecord": { + "block": "options", + "fields": { + "grb6_filename": { + "block": "options", + "description": "defines a binary grid output file. If this option is not provided, the output file will have the same name as the discretization input file, plus extension '.grb'.", + "longname": "file name of GRB information", + "name": "grb6_filename", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "grb_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "length_units": { + "block": "options", + "description": "is the length units used for this model. values can be 'feet', 'meters', or 'centimeters'. if not specified, the default is 'unknown'.", + "longname": "model length units", + "name": "length_units", + "optional": True, + "reader": "urword", + "type": "string", + }, + "nogrb": { + "block": "options", + "description": "keyword to deactivate writing of the binary grid file.", + "longname": "do not write binary grid file", + "name": "nogrb", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "packagedata": { + "block": "options", + "description": "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 the packagedata variable is also acceptable. See ncf package documentation for more information.", + "name": "packagedata", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "ncf", + "key": "ncf_filerecord", + "param": "packagedata", + "parent": "parent_package", + "val": "packagedata", + }, + "type": "record ncf6 filein ncf6_filename", + }, + "xorigin": { + "block": "options", + "description": "x-position of the origin used for model grid vertices. this value should be provided in a real-world coordinate system. a default value of zero is assigned if not specified. the value for xorigin does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", + "longname": "x-position origin of the model grid coordinate system", + "name": "xorigin", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "yorigin": { + "block": "options", + "description": "y-position of the origin used for model grid vertices. this value should be provided in a real-world coordinate system. if not specified, then a default value equal to zero is used. the value for yorigin does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", + "longname": "y-position origin of the model grid coordinate system", + "name": "yorigin", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + }, + "vertices": { + "vertices": { + "block": "vertices", + "item": { + "block": "vertices", + "fields": { + "iv": { + "block": "vertices", + "description": "is the vertex number. Records in the VERTICES block must be listed in consecutive order from 1 to NVERT.", + "longname": "vertex number", + "name": "iv", + "numeric_index": "true", + "optional": "false", + "reader": "urword", + "type": "integer", + }, + "xv": { + "block": "vertices", + "description": "is the x-coordinate for the vertex.", + "longname": "x-coordinate for vertex", + "name": "xv", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + "yv": { + "block": "vertices", + "description": "is the y-coordinate for the vertex.", + "longname": "y-coordinate for vertex", + "name": "yv", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + }, + "longname": "vertices data", + "name": "vertices", + "optional": False, + "reader": "urword", + "type": "record", + }, + "longname": "vertices data", + "name": "vertices", + "optional": False, + "reader": "urword", + "shape": "(nvert)", + "type": "recarray", + } + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgweesl.py b/flopy/mf6/modflow/mfgweesl.py index b02626d8fe..89aa2c715b 100644 --- a/flopy/mf6/modflow/mfgweesl.py +++ b/flopy/mf6/modflow/mfgweesl.py @@ -298,6 +298,188 @@ class ModflowGweesl(MFPackage): "optional true", ], ] + spec = { + "advanced": False, + "dimensions": { + "maxbound": { + "block": "dimensions", + "description": "integer value specifying the maximum number of source cells that will be specified for use during any stress period.", + "longname": "maximum number of sources", + "name": "maxbound", + "optional": False, + "reader": "urword", + "type": "integer", + } + }, + "fkeys": { + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "ts_filerecord": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + }, + "multi": True, + "name": "gwe-esl", + "options": { + "auxiliary": { + "block": "options", + "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", + "longname": "keyword to specify aux variables", + "name": "auxiliary", + "optional": True, + "reader": "urword", + "shape": "(naux)", + "type": "string", + }, + "auxmultname": { + "block": "options", + "description": "name of auxiliary variable to be used as multiplier of energy loading rate.", + "longname": "name of auxiliary variable for multiplier", + "name": "auxmultname", + "optional": True, + "reader": "urword", + "type": "string", + }, + "boundnames": { + "block": "options", + "description": "keyword to indicate that boundary names may be provided with the list of energy source loading cells.", + "name": "boundnames", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of energy source loading 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.", + "longname": "print calculated flows to listing file", + "mf6internal": "iprflow", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of energy source loading information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "mf6internal": "iprpak", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that energy source loading flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save well flows to budget file", + "mf6internal": "ipakcb", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "timeseries": { + "block": "options", + "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", + "name": "timeseries", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + "type": "record ts6 filein ts6_filename", + }, + }, + "period": { + "stress_period_data": { + "block": "period", + "item": { + "block": "period", + "fields": { + "aux": { + "block": "period", + "description": "represents the values of the auxiliary variables for each energy source. The values of auxiliary variables must be present for each energy source. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "auxiliary variables", + "mf6internal": "auxvar", + "name": "aux", + "optional": "true", + "reader": "urword", + "shape": "(naux)", + "time_series": "true", + "type": "double precision", + }, + "boundname": { + "block": "period", + "description": "name of the energy source cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", + "longname": "well name", + "name": "boundname", + "optional": "true", + "reader": "urword", + "type": "string", + }, + "cellid": { + "block": "period", + "description": "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 layer, row, and column. For a grid that uses the DISV input file, CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file, CELLID is the node number for the cell.", + "longname": "cell identifier", + "name": "cellid", + "reader": "urword", + "shape": "(ncelldim)", + "type": "integer", + }, + "senerrate": { + "block": "period", + "description": "is the energy source loading rate. A positive value indicates addition of energy and a negative value indicates removal of energy. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "energy source loading rate", + "name": "senerrate", + "reader": "urword", + "time_series": "true", + "type": "double precision", + }, + }, + "mf6internal": "spd", + "name": "stress_period_data", + "reader": "urword", + "type": "record", + }, + "mf6internal": "spd", + "name": "stress_period_data", + "reader": "urword", + "shape": "(maxbound)", + "type": "recarray", + }, + "transient_block": True, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgweest.py b/flopy/mf6/modflow/mfgweest.py index b7e021a94c..0396697d7d 100644 --- a/flopy/mf6/modflow/mfgweest.py +++ b/flopy/mf6/modflow/mfgweest.py @@ -197,6 +197,131 @@ class ModflowGweest(MFPackage): "mf6internal rhos", ], ] + spec = { + "advanced": False, + "griddata": { + "decay_solid": { + "block": "griddata", + "description": "is the rate coefficient for zero-order decay for the solid phase. a negative value indicates heat (energy) production. the dimensions of zero-order decay in the solid phase are energy per mass of solid per time. zero-order decay in the solid phase will have no effect on simulation results unless zero_order_decay_solid is specified in the options block.", + "layered": True, + "longname": "solid phase decay rate coefficient", + "name": "decay_solid", + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "decay_water": { + "block": "griddata", + "description": "is the rate coefficient for zero-order decay for the aqueous phase of the mobile domain. a negative value indicates heat (energy) production. the dimensions of zero-order decay in the aqueous phase are energy per length cubed (volume of water) per time. zero-order decay in the aqueous phase will have no effect on simulation results unless zero_order_decay_water is specified in the options block.", + "layered": True, + "longname": "aqueous phase decay rate coefficient", + "name": "decay_water", + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "density_solid": { + "block": "griddata", + "description": "is a user-specified value of the density of aquifer material not considering the voids. value will remain fixed for the entire simulation. for example, if working in si units, values may be entered as kilograms per cubic meter.", + "layered": True, + "longname": "density of aquifer material", + "mf6internal": "rhos", + "name": "density_solid", + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "heat_capacity_solid": { + "block": "griddata", + "description": "is the mass-based heat capacity of dry solids (aquifer material). for example, units of j/kg/c may be used (or equivalent).", + "layered": True, + "longname": "heat capacity of the aquifer material", + "mf6internal": "cps", + "name": "heat_capacity_solid", + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "porosity": { + "block": "griddata", + "description": "is the mobile domain porosity, defined as the mobile domain pore volume per mobile domain volume. the gwe model does not support the concept of an immobile domain in the context of heat transport.", + "layered": True, + "longname": "porosity", + "name": "porosity", + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + }, + "multi": False, + "name": "gwe-est", + "options": { + "density_water": { + "block": "options", + "default": 1000.0, + "description": "density of water used by calculations related to heat storage and conduction. this value is set to 1,000 kg/m3 if no overriding value is specified. a user-specified value should be provided for models that use units other than kilograms and meters or if it is necessary to use a value other than the default.", + "longname": "density of water", + "mf6internal": "rhow", + "name": "density_water", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "heat_capacity_water": { + "block": "options", + "default": 4184.0, + "description": "heat capacity of water used by calculations related to heat storage and conduction. this value is set to 4,184 j/kg/c if no overriding value is specified. a user-specified value should be provided for models that use units other than kilograms, joules, and degrees celsius or it is necessary to use a value other than the default.", + "longname": "heat capacity of water", + "mf6internal": "cpw", + "name": "heat_capacity_water", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "latent_heat_vaporization": { + "block": "options", + "default": 2453500.0, + "description": "latent heat of vaporization is the amount of energy that is required to convert a given quantity of liquid into a gas and is associated with evaporative cooling. while the est package does not simulate evaporation, multiple other packages in a gwe simulation may. to avoid having to specify the latent heat of vaporization in multiple packages, it is specified in a single location and accessed wherever it is needed. for example, evaporation may occur from the surface of streams or lakes and the energy consumed by the change in phase would be needed in both the sfe and lke packages. this value is set to 2,453,500 j/kg if no overriding value is specified. a user-specified value should be provided for models that use units other than joules and kilograms or if it is necessary to use a value other than the default.", + "longname": "latent heat of vaporization", + "mf6internal": "latheatvap", + "name": "latent_heat_vaporization", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that est flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save calculated flows to budget file", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "zero_order_decay_solid": { + "block": "options", + "description": "is a text keyword to indicate that zero-order decay will occur in the solid phase. that is, decay occurs in the solid and is a rate per mass (not volume) of solid only. use of this keyword requires that decay_solid is specified in the griddata block.", + "longname": "activate zero-order decay in solid phase", + "mf6internal": "ord0_decay_solid", + "name": "zero_order_decay_solid", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "zero_order_decay_water": { + "block": "options", + "description": "is a text keyword to indicate that zero-order decay will occur in the aqueous phase. that is, decay occurs in the water and is a rate per volume of water only, not per volume of aquifer (i.e., grid cell). use of this keyword requires that decay_water is specified in the griddata block.", + "longname": "activate zero-order decay in aqueous phase", + "mf6internal": "ord0_decay_water", + "name": "zero_order_decay_water", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwefmi.py b/flopy/mf6/modflow/mfgwefmi.py index eaa534e1fd..49f15ec849 100644 --- a/flopy/mf6/modflow/mfgwefmi.py +++ b/flopy/mf6/modflow/mfgwefmi.py @@ -112,6 +112,77 @@ class ModflowGwefmi(MFPackage): "reader urword", ], ] + spec = { + "advanced": False, + "multi": False, + "name": "gwe-fmi", + "options": { + "flow_imbalance_correction": { + "block": "options", + "description": "correct for an imbalance in flows by assuming that any residual flow error comes in or leaves at the temperature of the cell. when this option is activated, the gwe model budget written to the listing file will contain two additional entries: flow-error and flow-correction. these two entries will be equal but opposite in sign. the flow-correction term is a mass flow that is added to offset the error caused by an imprecise flow balance. if these terms are not relatively small, the flow model should be rerun with stricter convergence tolerances.", + "longname": "correct for flow imbalance", + "mf6internal": "imbalancecorrect", + "name": "flow_imbalance_correction", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that fmi flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save calculated flow imbalance correction to budget file", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + "packagedata": { + "packagedata": { + "block": "packagedata", + "item": { + "block": "packagedata", + "fields": { + "filein": { + "block": "packagedata", + "description": "keyword to specify that an input filename is expected next.", + "longname": "file keyword", + "name": "filein", + "optional": "false", + "reader": "urword", + "type": "keyword", + }, + "flowtype": { + "block": "packagedata", + "description": "is the word GWFBUDGET, GWFHEAD, GWFGRID, GWFMOVER or the name of an advanced GWF stress package from a previous model run. If GWFBUDGET is specified, then the corresponding file must be a budget file. If GWFHEAD is specified, the file must be a head file. If GWFGRID is specified, the file must be a binary grid file. If GWFMOVER is specified, the file must be a mover file. If an advanced GWF stress package name appears then the corresponding file must be the budget file saved by a LAK, SFR, MAW or UZF Package.", + "longname": "flow type", + "name": "flowtype", + "reader": "urword", + "type": "string", + }, + "fname": { + "block": "packagedata", + "description": "is the name of the file containing flows. The path to the file should be included if the file is not located in the folder where the program was run.", + "longname": "file name", + "name": "fname", + "reader": "urword", + "type": "string", + }, + }, + "longname": "flowtype list", + "name": "packagedata", + "optional": True, + "reader": "urword", + "type": "record", + }, + "longname": "flowtype list", + "name": "packagedata", + "optional": True, + "reader": "urword", + "type": "recarray", + } + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwegwe.py b/flopy/mf6/modflow/mfgwegwe.py index a1cb8d3670..a832a49d5f 100644 --- a/flopy/mf6/modflow/mfgwegwe.py +++ b/flopy/mf6/modflow/mfgwegwe.py @@ -401,6 +401,271 @@ class ModflowGwegwe(MFPackage): "optional true", ], ] + spec = { + "advanced": False, + "dimensions": { + "nexg": { + "block": "dimensions", + "description": "keyword and integer value specifying the number of gwe-gwe exchanges.", + "longname": "number of exchanges", + "name": "nexg", + "optional": False, + "reader": "urword", + "type": "integer", + } + }, + "exchangedata": { + "exchangedata": { + "block": "exchangedata", + "item": { + "block": "exchangedata", + "fields": { + "aux": { + "block": "exchangedata", + "description": "represents the values of the auxiliary variables for each GWEGWE Exchange. The values of auxiliary variables must be present for each exchange. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block.", + "longname": "auxiliary variables", + "mf6internal": "auxvar", + "name": "aux", + "optional": "true", + "reader": "urword", + "shape": "(naux)", + "type": "double precision", + }, + "boundname": { + "block": "exchangedata", + "description": "name of the GWE Exchange cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", + "longname": "exchange boundname", + "name": "boundname", + "optional": "true", + "reader": "urword", + "type": "string", + }, + "cellidm1": { + "block": "exchangedata", + "description": "is the cellid of the cell in model 1 as specified in the simulation name file. For a structured grid that uses the DIS input file, CELLIDM1 is the layer, row, and column numbers of the cell. For a grid that uses the DISV input file, CELLIDM1 is the layer number and CELL2D number for the two cells. If the model uses the unstructured discretization (DISU) input file, then CELLIDM1 is the node number for the cell.", + "longname": "cellid of first cell", + "name": "cellidm1", + "numeric_index": "true", + "optional": "false", + "reader": "urword", + "type": "integer", + }, + "cellidm2": { + "block": "exchangedata", + "description": "is the cellid of the cell in model 2 as specified in the simulation name file. For a structured grid that uses the DIS input file, CELLIDM2 is the layer, row, and column numbers of the cell. For a grid that uses the DISV input file, CELLIDM2 is the layer number and CELL2D number for the two cells. If the model uses the unstructured discretization (DISU) input file, then CELLIDM2 is the node number for the cell.", + "longname": "cellid of second cell", + "name": "cellidm2", + "numeric_index": "true", + "optional": "false", + "reader": "urword", + "type": "integer", + }, + "cl1": { + "block": "exchangedata", + "description": "is the distance between the center of cell 1 and the its shared face with cell 2.", + "longname": "connection distance", + "name": "cl1", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + "cl2": { + "block": "exchangedata", + "description": "is the distance between the center of cell 2 and the its shared face with cell 1.", + "longname": "connection distance", + "name": "cl2", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + "hwva": { + "block": "exchangedata", + "description": "is the horizontal width of the flow connection between cell 1 and cell 2 if IHC $>$ 0, or it is the area perpendicular to flow of the vertical connection between cell 1 and cell 2 if IHC = 0.", + "longname": "horizontal cell width or area for vertical flow", + "name": "hwva", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + "ihc": { + "block": "exchangedata", + "description": "is an integer flag indicating the direction between node n and all of its m connections. If IHC = 0 then the connection is vertical. If IHC = 1 then the connection is horizontal. If IHC = 2 then the connection is horizontal for a vertically staggered grid.", + "longname": "integer flag for connection type", + "name": "ihc", + "optional": "false", + "reader": "urword", + "type": "integer", + }, + }, + "longname": "exchange data", + "name": "exchangedata", + "optional": False, + "reader": "urword", + "type": "record", + }, + "longname": "exchange data", + "name": "exchangedata", + "optional": False, + "reader": "urword", + "shape": "(nexg)", + "type": "recarray", + } + }, + "fkeys": { + "mve_filerecord": { + "abbr": "mve", + "key": "mve_filerecord", + "param": "perioddata", + "parent": "parent_model_or_package", + "val": "perioddata", + }, + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + }, + "multi": True, + "name": "exg-gwegwe", + "options": { + "adv_scheme": { + "block": "options", + "description": "scheme used to solve the advection term. can be upstream, central, or tvd. if not specified, upstream weighting is the default weighting scheme.", + "longname": "advective scheme", + "name": "adv_scheme", + "optional": True, + "reader": "urword", + "type": "string", + "valid": "upstream central tvd", + }, + "auxiliary": { + "block": "options", + "description": "an array of auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided. most auxiliary variables will not be used by the gwe-gwe exchange, but they will be available for use by other parts of the program. if an auxiliary variable with the name 'angldegx' is found, then this information will be used as the angle (provided in degrees) between the connection face normal and the x axis, where a value of zero indicates that a normal vector points directly along the positive x axis. the connection face normal is a normal vector on the cell face shared between the cell in model 1 and the cell in model 2 pointing away from the model 1 cell. additional information on 'angldegx' is provided in the description of the disu package. if an auxiliary variable with the name 'cdist' is found, then this information will be used as the straight-line connection distance, including the vertical component, between the two cell centers. both angldegx and cdist are required if specific discharge is calculated for either of the groundwater models.", + "longname": "keyword to specify aux variables", + "name": "auxiliary", + "optional": True, + "reader": "urword", + "shape": "(naux)", + "type": "string", + }, + "boundnames": { + "block": "options", + "description": "keyword to indicate that boundary names may be provided with the list of gwe exchange cells.", + "name": "boundnames", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "cnd_xt3d_off": { + "block": "options", + "description": "deactivate the xt3d method for the dispersive flux and use the faster and less accurate approximation for this exchange.", + "longname": "deactivate xt3d", + "name": "cnd_xt3d_off", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "cnd_xt3d_rhs": { + "block": "options", + "description": "add xt3d dispersion terms to right-hand side, when possible, for this exchange.", + "longname": "xt3d on right-hand side", + "name": "cnd_xt3d_rhs", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "dev_interfacemodel_on": { + "block": "options", + "description": "activates the interface model mechanism for calculating the coefficients at (and possibly near) the exchange. this keyword should only be used for development purposes.", + "longname": "activate interface model on exchange", + "mf6internal": "dev_ifmod_on", + "name": "dev_interfacemodel_on", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "gwfmodelname1": { + "block": "options", + "description": "keyword to specify name of first corresponding gwf model. in the simulation name file, the gwe6-gwe6 entry contains names for gwe models (exgmnamea and exgmnameb). the gwe model with the name exgmnamea must correspond to the gwf model with the name gwfmodelname1.", + "longname": "keyword to specify name of first corresponding gwf model", + "name": "gwfmodelname1", + "optional": False, + "reader": "urword", + "type": "string", + }, + "gwfmodelname2": { + "block": "options", + "description": "keyword to specify name of second corresponding gwf model. in the simulation name file, the gwe6-gwe6 entry contains names for gwe models (exgmnamea and exgmnameb). the gwe model with the name exgmnameb must correspond to the gwf model with the name gwfmodelname2.", + "longname": "keyword to specify name of second corresponding gwf model", + "name": "gwfmodelname2", + "optional": False, + "reader": "urword", + "type": "string", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "perioddata": { + "block": "options", + "description": "Contains data for the mve package. Data can be passed as a dictionary to the mve package with variable names as keys and package data as values. Data for the perioddata variable is also acceptable. See mve package documentation for more information.", + "name": "perioddata", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "mve", + "key": "mve_filerecord", + "param": "perioddata", + "parent": "parent_model_or_package", + "val": "perioddata", + }, + "type": "record mve6 filein mve6_filename", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of exchange flow rates will be printed to the listing file for every stress period in which 'save budget' is specified in output control.", + "longname": "keyword to print gwfgwf flows to list file", + "mf6internal": "iprflow", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of exchange entries will be echoed to the listing file immediately after it is read.", + "longname": "keyword to print input to list file", + "mf6internal": "iprpak", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that cell-by-cell flow terms will be written to the budget file for each model provided that the output control for the models are set up with the 'budget save file' option.", + "longname": "keyword to save gwfgwf flows", + "mf6internal": "ipakcb", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgweic.py b/flopy/mf6/modflow/mfgweic.py index 5e35dd2468..9736c67708 100644 --- a/flopy/mf6/modflow/mfgweic.py +++ b/flopy/mf6/modflow/mfgweic.py @@ -23,8 +23,11 @@ class ModflowGweic(MFPackage): keyword that specifies input griddata arrays should be written to layered ascii output files. export_array_netcdf : keyword - keyword that specifies input griddata arrays should be written to the model - output netcdf file. + keyword that specifies input gridded arrays should be written to the model + output netcdf file with attributes that support using the generated file as a + 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. strt : [double precision] is the initial (starting) temperature---that is, the temperature at the beginning of the gwe model simulation. strt must be specified for all gwe @@ -73,6 +76,48 @@ class ModflowGweic(MFPackage): "default 0.0", ], ] + spec = { + "advanced": False, + "griddata": { + "strt": { + "block": "griddata", + "default": 0.0, + "description": "is the initial (starting) temperature---that is, the temperature at the beginning of the gwe model simulation. strt must be specified for all gwe model simulations. one value is read for every model cell.", + "layered": True, + "longname": "starting temperature", + "name": "strt", + "netcdf": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + } + }, + "multi": False, + "name": "gwe-ic", + "options": { + "export_array_ascii": { + "block": "options", + "description": "keyword that specifies input griddata arrays should be written to layered ascii output files.", + "longname": "export array variables to layered ascii files.", + "mf6internal": "export_ascii", + "name": "export_array_ascii", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "export_array_netcdf": { + "block": "options", + "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", + "extended": True, + "longname": "export array variables to netcdf output files.", + "mf6internal": "export_nc", + "name": "export_array_netcdf", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwelke.py b/flopy/mf6/modflow/mfgwelke.py index 11ecf74fbf..db3b63fb0c 100644 --- a/flopy/mf6/modflow/mfgwelke.py +++ b/flopy/mf6/modflow/mfgwelke.py @@ -639,6 +639,376 @@ class ModflowGwelke(MFPackage): "time_series true", ], ] + spec = { + "advanced": False, + "fkeys": { + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "ts_filerecord": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + }, + "multi": True, + "name": "gwe-lke", + "options": { + "auxiliary": { + "block": "options", + "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", + "longname": "keyword to specify aux variables", + "name": "auxiliary", + "optional": True, + "reader": "urword", + "shape": "(naux)", + "type": "string", + }, + "boundnames": { + "block": "options", + "description": "keyword to indicate that boundary names may be provided with the list of lake cells.", + "name": "boundnames", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "budget_filerecord": { + "block": "options", + "fields": { + "budgetfile": { + "block": "options", + "description": "name of the binary output file to write budget information.", + "longname": "file keyword", + "name": "budgetfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "budget_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "budgetcsv_filerecord": { + "block": "options", + "fields": { + "budgetcsvfile": { + "block": "options", + "description": "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.", + "longname": "file keyword", + "name": "budgetcsvfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "budgetcsv_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "flow_package_auxiliary_name": { + "block": "options", + "description": "keyword to specify the name of an auxiliary variable in the corresponding flow package. if specified, then the simulated temperatures from this advanced transport package will be copied into the auxiliary variable specified with this name. note that the flow package must have an auxiliary variable with this name or the program will terminate with an error. if the flows for this advanced transport package are read from a file, then this option will have no effect.", + "longname": "keyword to specify name of temperature auxiliary variable in flow package", + "name": "flow_package_auxiliary_name", + "optional": True, + "reader": "urword", + "type": "string", + }, + "flow_package_name": { + "block": "options", + "description": "keyword to specify the name of the corresponding flow package. if not specified, then the corresponding flow package must have the same name as this advanced transport package (the name associated with this package in the gwe name file).", + "longname": "keyword to specify name of corresponding flow package", + "name": "flow_package_name", + "optional": True, + "reader": "urword", + "type": "string", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "print_flows": { + "block": "options", + "description": "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.", + "longname": "print calculated flows to listing file", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of lake information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_temperature": { + "block": "options", + "description": "keyword to indicate that the list of lake {#2} will be printed to the listing file for every stress period in which 'temperature print' is specified in output control. if there is no output control option and print_{#3} is specified, then {#2} are printed for the last time step of each stress period.", + "longname": "print calculated temperatures to listing file", + "name": "print_temperature", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that lake flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save lake flows to budget file", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "temperature_filerecord": { + "block": "options", + "fields": { + "tempfile": { + "block": "options", + "description": "name of the binary output file to write temperature information.", + "longname": "file keyword", + "name": "tempfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "temperature_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "timeseries": { + "block": "options", + "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", + "name": "timeseries", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + "type": "record ts6 filein ts6_filename", + }, + }, + "packagedata": { + "packagedata": { + "block": "packagedata", + "item": { + "block": "packagedata", + "fields": { + "aux": { + "block": "packagedata", + "description": "represents the values of the auxiliary variables for each lake. The values of auxiliary variables must be present for each lake. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "auxiliary variables", + "name": "aux", + "optional": "true", + "reader": "urword", + "shape": "(naux)", + "time_series": "true", + "type": "double precision", + }, + "boundname": { + "block": "packagedata", + "description": "name of the lake cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", + "longname": "lake name", + "name": "boundname", + "optional": "true", + "reader": "urword", + "type": "string", + }, + "ktf": { + "block": "packagedata", + "description": "is the thermal conductivity of the material between the aquifer cell and the lake. The thickness of the material is defined by the variable RBTHCND.", + "longname": "boundary thermal conductivity", + "name": "ktf", + "reader": "urword", + "type": "double precision", + }, + "lakeno": { + "block": "period", + "description": "integer value that defines the lake number associated with the specified PERIOD data on the line. LAKENO must be greater than zero and less than or equal to NLAKES.", + "longname": "lake number for this entry", + "name": "lakeno", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "rbthcnd": { + "block": "packagedata", + "description": "real value that defines the thickness of the lakebed material through which conduction occurs. Must be greater than 0.", + "longname": "streambed thickness", + "name": "rbthcnd", + "reader": "urword", + "type": "double precision", + }, + "strt": { + "block": "packagedata", + "description": "real value that defines the starting temperature for the lake.", + "longname": "starting lake temperature", + "name": "strt", + "reader": "urword", + "type": "double precision", + }, + }, + "name": "packagedata", + "reader": "urword", + "type": "record", + }, + "name": "packagedata", + "reader": "urword", + "shape": "(maxbound)", + "type": "recarray", + } + }, + "period": { + "lakeperioddata": { + "block": "period", + "item": { + "block": "period", + "fields": { + "lakeno": { + "block": "period", + "description": "integer value that defines the lake number associated with the specified period data on the line. lakeno must be greater than zero and less than or equal to nlakes.", + "longname": "lake number for this entry", + "name": "lakeno", + "numeric_index": True, + "reader": "urword", + "type": "integer", + }, + "laksetting": { + "block": "period", + "choices": { + "auxiliaryrecord": { + "block": "period", + "fields": { + "auxiliary": { + "block": "period", + "description": "keyword for specifying auxiliary variable.", + "name": "auxiliary", + "reader": "urword", + "type": "keyword", + }, + "auxname": { + "block": "period", + "description": "name for the auxiliary variable to be assigned AUXVAL. AUXNAME must match one of the auxiliary variable names defined in the OPTIONS block. If AUXNAME does not match one of the auxiliary variable names defined in the OPTIONS block the data are ignored.", + "name": "auxname", + "reader": "urword", + "type": "string", + }, + "auxval": { + "block": "period", + "description": "value for the auxiliary variable. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "auxiliary variable value", + "name": "auxval", + "reader": "urword", + "time_series": "true", + "type": "double precision", + }, + }, + "name": "auxiliaryrecord", + "reader": "urword", + "type": "record", + }, + "evaporation": { + "block": "period", + "description": "use of the evaporation keyword is allowed in the lke package; however, the specified value is not currently used in lke calculations. instead, the latent heat of evaporation is multiplied by the simulated evaporation rate for determining the thermal energy lost from a stream reach.", + "longname": "evaporation temperature", + "name": "evaporation", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "ext-inflow": { + "block": "period", + "description": "real or character value that defines the temperature of external inflow for the lake. users are free to use whatever temperature scale they want, which might include negative temperatures. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "ext-inflow temperature", + "name": "ext-inflow", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "rainfall": { + "block": "period", + "description": "real or character value that defines the rainfall temperature for the lake. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "rainfall temperature", + "name": "rainfall", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "runoff": { + "block": "period", + "description": "real or character value that defines the temperature of runoff for the lake. users are free to use whatever temperature scale they want, which might include negative temperatures. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "runoff temperature", + "name": "runoff", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "status": { + "block": "period", + "description": "keyword option to define lake status. status can be active, inactive, or constant. by default, status is active, which means that temperature will be calculated for the lake. if a lake is inactive, then there will be no energy fluxes into or out of the lake and the inactive value will be written for the lake temperature. if a lake is constant, then the temperature for the lake will be fixed at the user specified value.", + "longname": "lake temperature status", + "name": "status", + "reader": "urword", + "type": "string", + }, + "temperature": { + "block": "period", + "description": "real or character value that defines the temperature for the lake. the specified temperature is only applied if the lake is a constant temperature lake. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "lake temperature", + "name": "temperature", + "reader": "urword", + "time_series": True, + "type": "string", + }, + }, + "description": "line of information that is parsed into a keyword and values. keyword values that can be used to start the laksetting string include: status, temperature, rainfall, evaporation, runoff, and auxiliary. these settings are used to assign the temperature associated with the corresponding flow terms. temperatures cannot be specified for all flow terms. for example, the lake package supports a 'withdrawal' flow term. if this withdrawal term is active, then water will be withdrawn from the lake at the calculated temperature of the lake.", + "name": "laksetting", + "reader": "urword", + "type": "keystring", + }, + }, + "name": "lakeperioddata", + "reader": "urword", + "type": "record", + }, + "name": "lakeperioddata", + "reader": "urword", + "type": "recarray", + }, + "transient_block": True, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwemve.py b/flopy/mf6/modflow/mfgwemve.py index d4f6728291..d563e525cd 100644 --- a/flopy/mf6/modflow/mfgwemve.py +++ b/flopy/mf6/modflow/mfgwemve.py @@ -154,6 +154,83 @@ class ModflowGwemve(MFPackage): "optional false", ], ] + spec = { + "advanced": False, + "multi": False, + "name": "gwe-mve", + "options": { + "budget_filerecord": { + "block": "options", + "fields": { + "budgetfile": { + "block": "options", + "description": "name of the binary output file to write budget information.", + "longname": "file keyword", + "name": "budgetfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "budget_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "budgetcsv_filerecord": { + "block": "options", + "fields": { + "budgetcsvfile": { + "block": "options", + "description": "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.", + "longname": "file keyword", + "name": "budgetcsvfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "budgetcsv_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "print_flows": { + "block": "options", + "description": "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.", + "longname": "print calculated flows to listing file", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of mover information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that lake flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save lake flows to budget file", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + "ref": { + "abbr": "mve", + "key": "mve_filerecord", + "param": "perioddata", + "parent": "parent_model_or_package", + "val": "perioddata", + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwemwe.py b/flopy/mf6/modflow/mfgwemwe.py index a62a614fd3..0ecfb1acd9 100644 --- a/flopy/mf6/modflow/mfgwemwe.py +++ b/flopy/mf6/modflow/mfgwemwe.py @@ -593,6 +593,349 @@ class ModflowGwemwe(MFPackage): "time_series true", ], ] + spec = { + "advanced": False, + "fkeys": { + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "ts_filerecord": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + }, + "multi": True, + "name": "gwe-mwe", + "options": { + "auxiliary": { + "block": "options", + "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", + "longname": "keyword to specify aux variables", + "name": "auxiliary", + "optional": True, + "reader": "urword", + "shape": "(naux)", + "type": "string", + }, + "boundnames": { + "block": "options", + "description": "keyword to indicate that boundary names may be provided with the list of well cells.", + "name": "boundnames", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "budget_filerecord": { + "block": "options", + "fields": { + "budgetfile": { + "block": "options", + "description": "name of the binary output file to write budget information.", + "longname": "file keyword", + "name": "budgetfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "budget_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "budgetcsv_filerecord": { + "block": "options", + "fields": { + "budgetcsvfile": { + "block": "options", + "description": "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.", + "longname": "file keyword", + "name": "budgetcsvfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "budgetcsv_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "flow_package_auxiliary_name": { + "block": "options", + "description": "keyword to specify the name of an auxiliary variable in the corresponding flow package. if specified, then the simulated temperatures from this advanced transport package will be copied into the auxiliary variable specified with this name. note that the flow package must have an auxiliary variable with this name or the program will terminate with an error. if the flows for this advanced transport package are read from a file, then this option will have no effect.", + "longname": "keyword to specify name of temperature auxiliary variable in flow package", + "name": "flow_package_auxiliary_name", + "optional": True, + "reader": "urword", + "type": "string", + }, + "flow_package_name": { + "block": "options", + "description": "keyword to specify the name of the corresponding flow package. if not specified, then the corresponding flow package must have the same name as this advanced transport package (the name associated with this package in the gwe name file).", + "longname": "keyword to specify name of corresponding flow package", + "name": "flow_package_name", + "optional": True, + "reader": "urword", + "type": "string", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of well 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.", + "longname": "print calculated flows to listing file", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of well information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_temperature": { + "block": "options", + "description": "keyword to indicate that the list of well {#2} will be printed to the listing file for every stress period in which 'temperature print' is specified in output control. if there is no output control option and print_{#3} is specified, then {#2} are printed for the last time step of each stress period.", + "longname": "print calculated temperatures to listing file", + "name": "print_temperature", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that well flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save well flows to budget file", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "temperature_filerecord": { + "block": "options", + "fields": { + "tempfile": { + "block": "options", + "description": "name of the binary output file to write temperature information.", + "longname": "file keyword", + "name": "tempfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "temperature_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "timeseries": { + "block": "options", + "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", + "name": "timeseries", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + "type": "record ts6 filein ts6_filename", + }, + }, + "packagedata": { + "packagedata": { + "block": "packagedata", + "item": { + "block": "packagedata", + "fields": { + "aux": { + "block": "packagedata", + "description": "represents the values of the auxiliary variables for each well. The values of auxiliary variables must be present for each well. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "auxiliary variables", + "name": "aux", + "optional": "true", + "reader": "urword", + "shape": "(naux)", + "time_series": "true", + "type": "double precision", + }, + "boundname": { + "block": "packagedata", + "description": "name of the well cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", + "longname": "well name", + "name": "boundname", + "optional": "true", + "reader": "urword", + "type": "string", + }, + "fthk": { + "block": "packagedata", + "description": "real value that defines the thickness of the material through which conduction occurs. Must be greater than 0.", + "longname": "thickness of the well feature", + "name": "fthk", + "reader": "urword", + "type": "double precision", + }, + "ktf": { + "block": "packagedata", + "description": "is the thermal conductivity of the material between the aquifer cell and the feature. The thickness of the material is defined by the variable FTHK.", + "longname": "thermal conductivity of the feature", + "name": "ktf", + "reader": "urword", + "type": "double precision", + }, + "mawno": { + "block": "period", + "description": "integer value that defines the well number associated with the specified PERIOD data on the line. MAWNO must be greater than zero and less than or equal to NMAWWELLS.", + "longname": "well number for this entry", + "name": "mawno", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "strt": { + "block": "packagedata", + "description": "real value that defines the starting temperature for the well.", + "longname": "starting well temperature", + "name": "strt", + "reader": "urword", + "type": "double precision", + }, + }, + "name": "packagedata", + "reader": "urword", + "type": "record", + }, + "name": "packagedata", + "reader": "urword", + "shape": "(maxbound)", + "type": "recarray", + } + }, + "period": { + "mweperioddata": { + "block": "period", + "item": { + "block": "period", + "fields": { + "mawno": { + "block": "period", + "description": "integer value that defines the well number associated with the specified period data on the line. mawno must be greater than zero and less than or equal to nmawwells.", + "longname": "well number for this entry", + "name": "mawno", + "numeric_index": True, + "reader": "urword", + "type": "integer", + }, + "mwesetting": { + "block": "period", + "choices": { + "auxiliaryrecord": { + "block": "period", + "fields": { + "auxiliary": { + "block": "period", + "description": "keyword for specifying auxiliary variable.", + "name": "auxiliary", + "reader": "urword", + "type": "keyword", + }, + "auxname": { + "block": "period", + "description": "name for the auxiliary variable to be assigned AUXVAL. AUXNAME must match one of the auxiliary variable names defined in the OPTIONS block. If AUXNAME does not match one of the auxiliary variable names defined in the OPTIONS block the data are ignored.", + "name": "auxname", + "reader": "urword", + "type": "string", + }, + "auxval": { + "block": "period", + "description": "value for the auxiliary variable. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "auxiliary variable value", + "name": "auxval", + "reader": "urword", + "time_series": "true", + "type": "double precision", + }, + }, + "name": "auxiliaryrecord", + "reader": "urword", + "type": "record", + }, + "rate": { + "block": "period", + "description": "real or character value that defines the injection temperature $(e.g.,:^{circ}c:or:^{circ}f)$ for the well. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "well injection temperature", + "name": "rate", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "status": { + "block": "period", + "description": "keyword option to define well status. status can be active, inactive, or constant. by default, status is active, which means that temperature will be calculated for the well. if a well is inactive, then there will be no solute mass fluxes into or out of the well and the inactive value will be written for the well temperature. if a well is constant, then the temperature for the well will be fixed at the user specified value.", + "longname": "well temperature status", + "name": "status", + "reader": "urword", + "type": "string", + }, + "temperature": { + "block": "period", + "description": "real or character value that defines the temperature for the well. the specified temperature is only applied if the well is a constant temperature well. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "well temperature", + "name": "temperature", + "reader": "urword", + "time_series": True, + "type": "string", + }, + }, + "description": "line of information that is parsed into a keyword and values. keyword values that can be used to start the mwesetting string include: status, temperature, rainfall, evaporation, runoff, and auxiliary. these settings are used to assign the temperature of associated with the corresponding flow terms. temperatures cannot be specified for all flow terms. for example, the multi-aquifer well package supports a 'withdrawal' flow term. if this withdrawal term is active, then water will be withdrawn from the well at the calculated temperature of the well.", + "name": "mwesetting", + "reader": "urword", + "type": "keystring", + }, + }, + "name": "mweperioddata", + "reader": "urword", + "type": "record", + }, + "name": "mweperioddata", + "reader": "urword", + "type": "recarray", + }, + "transient_block": True, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwenam.py b/flopy/mf6/modflow/mfgwenam.py index 7f399fc957..898fb7fb42 100644 --- a/flopy/mf6/modflow/mfgwenam.py +++ b/flopy/mf6/modflow/mfgwenam.py @@ -36,6 +36,9 @@ class ModflowGwenam(MFPackage): save_flows : keyword keyword to indicate that all model package flow terms will be written to the file specified with 'budget fileout' in output control. + dependent_variable_scaling : keyword + flag to scale x and rhs to avoid very large positive or negative dependent + variable values nc_mesh2d_filerecord : (ncmesh2dfile) netcdf layered mesh fileout record. * ncmesh2dfile : string @@ -129,7 +132,6 @@ class ModflowGwenam(MFPackage): "reader urword", "optional true", "mf6internal idv_scale", - "prerelease true", ], [ "block options", @@ -281,6 +283,167 @@ class ModflowGwenam(MFPackage): "optional true", ], ] + spec = { + "advanced": False, + "multi": False, + "name": "gwe-nam", + "options": { + "dependent_variable_scaling": { + "block": "options", + "description": "flag to scale x and rhs to avoid very large positive or negative dependent variable values", + "longname": "flag to scale x and rhs", + "mf6internal": "idv_scale", + "name": "dependent_variable_scaling", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "list": { + "block": "options", + "description": "is name of the listing file to create for this gwe model. if not specified, then the name of the list file will be the basename of the gwe model name file and the '.lst' extension. for example, if the gwe name file is called 'my.model.nam' then the list file will be called 'my.model.lst'.", + "longname": "name of listing file", + "name": "list", + "optional": True, + "reader": "urword", + "type": "string", + }, + "nc_filerecord": { + "block": "options", + "description": "netcdf filerecord", + "fields": { + "netcdf_filename": { + "block": "options", + "description": "defines a NetCDF input file.", + "extended": "true", + "longname": "netcdf input filename", + "mf6internal": "netcdf_fname", + "name": "netcdf_filename", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "nc_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "nc_mesh2d_filerecord": { + "block": "options", + "description": "netcdf layered mesh fileout record.", + "fields": { + "ncmesh2dfile": { + "block": "options", + "description": "name of the NetCDF ugrid layered mesh output file.", + "extended": "true", + "longname": "file keyword", + "name": "ncmesh2dfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "ncmesh2drec", + "name": "nc_mesh2d_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "nc_structured_filerecord": { + "block": "options", + "description": "netcdf structured fileout record.", + "fields": { + "ncstructfile": { + "block": "options", + "description": "name of the NetCDF structured output file.", + "extended": "true", + "longname": "file keyword", + "name": "ncstructfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "ncstructrec", + "name": "nc_structured_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of all model package 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.", + "longname": "print calculated flows to listing file", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of all model stress package information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that all model package flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save flows for all packages to budget file", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + "packages": { + "packages": { + "block": "packages", + "item": { + "block": "packages", + "fields": { + "fname": { + "block": "packages", + "description": "is the name of the file containing the package input. The path to the file should be included if the file is not located in the folder where the program was run.", + "longname": "file name", + "name": "fname", + "reader": "urword", + "type": "string", + }, + "ftype": { + "block": "packages", + "description": "is the file type, which must be one of the following character values shown in table~ref{table:ftype-gwe}. Ftype may be entered in any combination of uppercase and lowercase.", + "longname": "package type", + "name": "ftype", + "reader": "urword", + "type": "string", + }, + "pname": { + "block": "packages", + "description": "is the user-defined name for the package. PNAME is restricted to 16 characters. No spaces are allowed in PNAME. PNAME character values are read and stored by the program for stress packages only. These names may be useful for labeling purposes when multiple stress packages of the same type are located within a single GWE Model. If PNAME is specified for a stress package, then PNAME will be used in the flow budget table in the listing file; it will also be used for the text entry in the cell-by-cell budget file. PNAME is case insensitive and is stored in all upper case letters.", + "longname": "user name for package", + "name": "pname", + "optional": "true", + "reader": "urword", + "type": "string", + }, + }, + "longname": "package list", + "name": "packages", + "optional": False, + "reader": "urword", + "type": "record", + }, + "longname": "package list", + "name": "packages", + "optional": False, + "reader": "urword", + "type": "recarray", + } + }, + } def __init__( self, @@ -290,6 +453,7 @@ def __init__( print_input=None, print_flows=None, save_flows=None, + dependent_variable_scaling=None, nc_mesh2d_filerecord=None, nc_structured_filerecord=None, nc_filerecord=None, @@ -312,6 +476,9 @@ def __init__( 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.dependent_variable_scaling = self.build_mfdata( + "dependent_variable_scaling", dependent_variable_scaling + ) self.nc_mesh2d_filerecord = self.build_mfdata( "nc_mesh2d_filerecord", nc_mesh2d_filerecord ) diff --git a/flopy/mf6/modflow/mfgweoc.py b/flopy/mf6/modflow/mfgweoc.py index d000b56120..ece7c73f60 100644 --- a/flopy/mf6/modflow/mfgweoc.py +++ b/flopy/mf6/modflow/mfgweoc.py @@ -92,6 +92,7 @@ class ModflowGweoc(MFPackage): "reader urword", "tagged true", "optional true", + "mf6internal budfilerec", ], [ "block options", @@ -132,6 +133,7 @@ class ModflowGweoc(MFPackage): "reader urword", "tagged true", "optional true", + "mf6internal budcsvfilerec", ], [ "block options", @@ -162,6 +164,7 @@ class ModflowGweoc(MFPackage): "reader urword", "tagged true", "optional true", + "mf6internal tempfilerec", ], [ "block options", @@ -183,6 +186,7 @@ class ModflowGweoc(MFPackage): "reader urword", "tagged false", "optional false", + "mf6internal tempfile", ], [ "block options", @@ -191,6 +195,7 @@ class ModflowGweoc(MFPackage): "shape", "reader urword", "optional true", + "mf6internal tempprintrec", ], [ "block options", @@ -364,6 +369,170 @@ class ModflowGweoc(MFPackage): "reader urword", ], ] + spec = { + "advanced": False, + "multi": False, + "name": "gwe-oc", + "options": { + "budget_filerecord": { + "block": "options", + "fields": { + "budgetfile": { + "block": "options", + "description": "name of the output file to write budget information.", + "longname": "file keyword", + "name": "budgetfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "budfilerec", + "name": "budget_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "budgetcsv_filerecord": { + "block": "options", + "fields": { + "budgetcsvfile": { + "block": "options", + "description": "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.", + "longname": "file keyword", + "name": "budgetcsvfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "budcsvfilerec", + "name": "budgetcsv_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "temperature_filerecord": { + "block": "options", + "fields": { + "temperaturefile": { + "block": "options", + "description": "name of the output file to write temperature information.", + "longname": "file keyword", + "mf6internal": "tempfile", + "name": "temperaturefile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "tempfilerec", + "name": "temperature_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "temperatureprintrecord": { + "block": "options", + "fields": { + "print_format": { + "block": "options", + "description": "keyword to specify format for printing to the listing file.", + "longname": "keyword to indicate that a print format follows", + "name": "print_format", + "optional": "false", + "reader": "urword", + "type": "keyword", + }, + "temperature": { + "block": "options", + "description": "keyword to specify that record corresponds to temperature.", + "longname": "temperature keyword", + "name": "temperature", + "optional": "false", + "reader": "urword", + "type": "keyword", + }, + }, + "mf6internal": "tempprintrec", + "name": "temperatureprintrecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + }, + "period": { + "printrecord": { + "block": "period", + "fields": { + "ocsetting": { + "block": "period", + "description": "specifies the steps for which the data will be saved.", + "name": "ocsetting", + "reader": "urword", + "type": "keystring all first last frequency steps", + }, + "print": { + "block": "period", + "description": "keyword to indicate that information will be printed this stress period.", + "longname": "keyword to save", + "name": "print", + "optional": "false", + "reader": "urword", + "type": "keyword", + }, + "rtype": { + "block": "period", + "description": "type of information to save or print. Can be BUDGET or TEMPERATURE.", + "longname": "record type", + "name": "rtype", + "optional": "false", + "reader": "urword", + "type": "string", + }, + }, + "name": "printrecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "saverecord": { + "block": "period", + "fields": { + "ocsetting": { + "block": "period", + "description": "specifies the steps for which the data will be saved.", + "name": "ocsetting", + "reader": "urword", + "type": "keystring all first last frequency steps", + }, + "rtype": { + "block": "period", + "description": "type of information to save or print. Can be BUDGET or TEMPERATURE.", + "longname": "record type", + "name": "rtype", + "optional": "false", + "reader": "urword", + "type": "string", + }, + "save": { + "block": "period", + "description": "keyword to indicate that information will be saved this stress period.", + "longname": "keyword to save", + "name": "save", + "optional": "false", + "reader": "urword", + "type": "keyword", + }, + }, + "name": "saverecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "transient_block": True, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwesfe.py b/flopy/mf6/modflow/mfgwesfe.py index 750ce52752..ba38c5cde8 100644 --- a/flopy/mf6/modflow/mfgwesfe.py +++ b/flopy/mf6/modflow/mfgwesfe.py @@ -644,6 +644,376 @@ class ModflowGwesfe(MFPackage): "time_series true", ], ] + spec = { + "advanced": False, + "fkeys": { + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "ts_filerecord": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + }, + "multi": True, + "name": "gwe-sfe", + "options": { + "auxiliary": { + "block": "options", + "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", + "longname": "keyword to specify aux variables", + "name": "auxiliary", + "optional": True, + "reader": "urword", + "shape": "(naux)", + "type": "string", + }, + "boundnames": { + "block": "options", + "description": "keyword to indicate that boundary names may be provided with the list of reach cells.", + "name": "boundnames", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "budget_filerecord": { + "block": "options", + "fields": { + "budgetfile": { + "block": "options", + "description": "name of the binary output file to write budget information.", + "longname": "file keyword", + "name": "budgetfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "budget_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "budgetcsv_filerecord": { + "block": "options", + "fields": { + "budgetcsvfile": { + "block": "options", + "description": "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.", + "longname": "file keyword", + "name": "budgetcsvfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "budgetcsv_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "flow_package_auxiliary_name": { + "block": "options", + "description": "keyword to specify the name of an auxiliary variable provided in the corresponding flow package (i.e., flow_package_name). if specified, then the simulated temperatures from this advanced energy transport package will be copied into the auxiliary variable specified with this name. note that the flow package must have an auxiliary variable with this name or the program will terminate with an error. if the flows for this advanced energy transport package are read from a file, then this option will have no effect.", + "longname": "keyword to specify name of temperature auxiliary variable in flow package", + "name": "flow_package_auxiliary_name", + "optional": True, + "reader": "urword", + "type": "string", + }, + "flow_package_name": { + "block": "options", + "description": "keyword to specify the name of the corresponding flow package. if not specified, then the corresponding flow package must have the same name as this advanced transport package (the name associated with this package in the gwe name file).", + "longname": "keyword to specify name of corresponding flow package", + "name": "flow_package_name", + "optional": True, + "reader": "urword", + "type": "string", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of reach 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.", + "longname": "print calculated flows to listing file", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of reach information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_temperature": { + "block": "options", + "description": "keyword to indicate that the list of reach {#2} will be printed to the listing file for every stress period in which 'temperature print' is specified in output control. if there is no output control option and print_{#3} is specified, then {#2} are printed for the last time step of each stress period.", + "longname": "print calculated temperature to listing file", + "name": "print_temperature", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that reach flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save reach flows to budget file", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "temperature_filerecord": { + "block": "options", + "fields": { + "tempfile": { + "block": "options", + "description": "name of the binary output file to write temperature information.", + "longname": "file keyword", + "name": "tempfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "temperature_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "timeseries": { + "block": "options", + "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", + "name": "timeseries", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + "type": "record ts6 filein ts6_filename", + }, + }, + "packagedata": { + "packagedata": { + "block": "packagedata", + "item": { + "block": "packagedata", + "fields": { + "aux": { + "block": "packagedata", + "description": "represents the values of the auxiliary variables for each reach. The values of auxiliary variables must be present for each reach. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "auxiliary variables", + "name": "aux", + "optional": "true", + "reader": "urword", + "shape": "(naux)", + "time_series": "true", + "type": "double precision", + }, + "boundname": { + "block": "packagedata", + "description": "name of the reach cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", + "longname": "well name", + "name": "boundname", + "optional": "true", + "reader": "urword", + "type": "string", + }, + "ktf": { + "block": "packagedata", + "description": "is the thermal conductivity of the material between the aquifer cell and the stream reach. The thickness of the material is defined by the variable RBTHCND.", + "longname": "boundary thermal conductivity", + "name": "ktf", + "reader": "urword", + "type": "double precision", + }, + "rbthcnd": { + "block": "packagedata", + "description": "real value that defines the thickness of the streambed material through which conduction occurs. Must be greater than 0.", + "longname": "streambed thickness", + "name": "rbthcnd", + "reader": "urword", + "type": "double precision", + }, + "rno": { + "block": "period", + "description": "integer value that defines the reach number associated with the specified PERIOD data on the line. RNO must be greater than zero and less than or equal to NREACHES.", + "longname": "reach number for this entry", + "name": "rno", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "strt": { + "block": "packagedata", + "description": "real value that defines the starting temperature for the reach.", + "longname": "starting reach temperature", + "name": "strt", + "reader": "urword", + "type": "double precision", + }, + }, + "name": "packagedata", + "reader": "urword", + "type": "record", + }, + "name": "packagedata", + "reader": "urword", + "shape": "(maxbound)", + "type": "recarray", + } + }, + "period": { + "reachperioddata": { + "block": "period", + "item": { + "block": "period", + "fields": { + "reachsetting": { + "block": "period", + "choices": { + "auxiliaryrecord": { + "block": "period", + "fields": { + "auxiliary": { + "block": "period", + "description": "keyword for specifying auxiliary variable.", + "name": "auxiliary", + "reader": "urword", + "type": "keyword", + }, + "auxname": { + "block": "period", + "description": "name for the auxiliary variable to be assigned AUXVAL. AUXNAME must match one of the auxiliary variable names defined in the OPTIONS block. If AUXNAME does not match one of the auxiliary variable names defined in the OPTIONS block the data are ignored.", + "name": "auxname", + "reader": "urword", + "type": "string", + }, + "auxval": { + "block": "period", + "description": "value for the auxiliary variable. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "auxiliary variable value", + "name": "auxval", + "reader": "urword", + "time_series": "true", + "type": "double precision", + }, + }, + "name": "auxiliaryrecord", + "reader": "urword", + "type": "record", + }, + "evaporation": { + "block": "period", + "description": "use of the evaporation keyword is allowed in the sfe package; however, the specified value is not currently used in sfe calculations. instead, the latent heat of evaporation is multiplied by the simulated evaporation rate for determining the thermal energy lost from a stream reach.", + "longname": "evaporation temperature", + "name": "evaporation", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "inflow": { + "block": "period", + "description": "real or character value that defines the temperature of inflow $(e.g.,:^{circ}c:or:^{circ}f)$ for the reach. users are free to use whatever temperature scale they want, which might include negative temperatures. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "inflow temperature", + "name": "inflow", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "rainfall": { + "block": "period", + "description": "real or character value that defines the rainfall temperature $(e.g.,:^{circ}c:or:^{circ}f)$ for the reach. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "rainfall temperature", + "name": "rainfall", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "runoff": { + "block": "period", + "description": "real or character value that defines the temperature of runoff $(e.g.,:^{circ}c:or:^{circ}f)$ for the reach. users are free to use whatever temperature scale they want, which might include negative temperatures. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "runoff temperature", + "name": "runoff", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "status": { + "block": "period", + "description": "keyword option to define reach status. status can be active, inactive, or constant. by default, status is active, which means that temperature will be calculated for the reach. if a reach is inactive, then there will be no energy fluxes into or out of the reach and the inactive value will be written for the reach temperature. if a reach is constant, then the temperature for the reach will be fixed at the user specified value.", + "longname": "reach temperature status", + "name": "status", + "reader": "urword", + "type": "string", + }, + "temperature": { + "block": "period", + "description": "real or character value that defines the temperature for the reach. the specified temperature is only applied if the reach is a constant temperature reach. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "reach temperature", + "name": "temperature", + "reader": "urword", + "time_series": True, + "type": "string", + }, + }, + "description": "line of information that is parsed into a keyword and values. keyword values that can be used to start the reachsetting string include: status, temperature, rainfall, evaporation, runoff, and auxiliary. these settings are used to assign the temperature of associated with the corresponding flow terms. temperatures cannot be specified for all flow terms. for example, the streamflow package supports a 'diversion' flow term. diversion water will be routed using the calculated temperature of the reach.", + "name": "reachsetting", + "reader": "urword", + "type": "keystring", + }, + "rno": { + "block": "period", + "description": "integer value that defines the reach number associated with the specified period data on the line. rno must be greater than zero and less than or equal to nreaches.", + "longname": "reach number for this entry", + "name": "rno", + "numeric_index": True, + "reader": "urword", + "type": "integer", + }, + }, + "name": "reachperioddata", + "reader": "urword", + "type": "record", + }, + "name": "reachperioddata", + "reader": "urword", + "type": "recarray", + }, + "transient_block": True, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwessm.py b/flopy/mf6/modflow/mfgwessm.py index 122344d078..9dffde1c84 100644 --- a/flopy/mf6/modflow/mfgwessm.py +++ b/flopy/mf6/modflow/mfgwessm.py @@ -202,6 +202,139 @@ class ModflowGwessm(MFPackage): "optional true", ], ] + spec = { + "advanced": False, + "fileinput": { + "fileinput": { + "block": "fileinput", + "item": { + "block": "fileinput", + "fields": { + "filein": { + "block": "fileinput", + "description": "keyword to specify that an input filename is expected next.", + "longname": "file keyword", + "name": "filein", + "optional": "false", + "reader": "urword", + "type": "keyword", + }, + "mixed": { + "block": "fileinput", + "description": "keyword to specify that these stress package boundaries will have the mixed condition. The MIXED condition is described in the SOURCES block for AUXMIXED. The MIXED condition allows for water to be withdrawn at a temperature that is less than the cell temperature. It is intended primarily for representing evapotranspiration.", + "longname": "mixed keyword", + "name": "mixed", + "optional": "true", + "reader": "urword", + "type": "keyword", + }, + "pname": { + "block": "fileinput", + "description": "name of the flow package for which an SPC6 input file contains a source temperature. If this flow package is represented using an advanced transport package (SFE, LKE, MWE, or UZE), then the advanced transport package will override SSM terms specified here.", + "longname": "package name", + "name": "pname", + "reader": "urword", + "type": "string", + }, + "spc6": { + "block": "fileinput", + "description": "keyword to specify that record corresponds to a source sink mixing input file.", + "longname": "head keyword", + "name": "spc6", + "optional": "false", + "reader": "urword", + "type": "keyword", + }, + "spc6_filename": { + "block": "fileinput", + "description": "character string that defines the path and filename for the file containing source and sink input data for the flow package. The SPC6_FILENAME file is a flexible input file that allows temperatures to be specified by stress period and with time series. Instructions for creating the SPC6_FILENAME input file are provided in the next section on file input for boundary temperatures.", + "longname": "spc file name", + "name": "spc6_filename", + "optional": "false", + "reader": "urword", + "type": "string", + }, + }, + "name": "fileinput", + "optional": True, + "reader": "urword", + "type": "record", + }, + "name": "fileinput", + "optional": True, + "reader": "urword", + "type": "recarray", + } + }, + "multi": False, + "name": "gwe-ssm", + "options": { + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of ssm 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.", + "longname": "print calculated flows to listing file", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that ssm flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save calculated flows to budget file", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + "sources": { + "sources": { + "block": "sources", + "item": { + "block": "sources", + "fields": { + "auxname": { + "block": "sources", + "description": "name of the auxiliary variable in the package PNAME. This auxiliary variable must exist and be specified by the user in that package. The values in this auxiliary variable will be used to set the temperature associated with the flows for that boundary package.", + "longname": "auxiliary variable name", + "name": "auxname", + "optional": "false", + "reader": "urword", + "type": "string", + }, + "pname": { + "block": "fileinput", + "description": "name of the flow package for which an SPC6 input file contains a source temperature. If this flow package is represented using an advanced transport package (SFE, LKE, MWE, or UZE), then the advanced transport package will override SSM terms specified here.", + "longname": "package name", + "name": "pname", + "reader": "urword", + "type": "string", + }, + "srctype": { + "block": "sources", + "description": "keyword indicating how temperature will be assigned for sources and sinks. Keyword must be specified as either AUX or AUXMIXED. For both options the user must provide an auxiliary variable in the corresponding flow package. The auxiliary variable must have the same name as the AUXNAME value that follows. If the AUX keyword is specified, then the auxiliary variable specified by the user will be assigned as the temperature value for groundwater sources (flows with a positive sign). For negative flow rates (sinks), groundwater will be withdrawn from the cell at the simulated temperature of the cell. The AUXMIXED option provides an alternative method for how to determine the temperature of sinks. If the cell temperature is larger than the user-specified auxiliary temperature, then the temperature of groundwater withdrawn from the cell will be assigned as the user-specified temperature. Alternatively, if the user-specified auxiliary temperature is larger than the cell temperature, then groundwater will be withdrawn at the cell temperature. Thus, the AUXMIXED option is designed to work with the Evapotranspiration (EVT) and Recharge (RCH) Packages where water may be withdrawn at a temperature that is less than the cell temperature.", + "longname": "source type", + "name": "srctype", + "optional": "false", + "reader": "urword", + "type": "string", + }, + }, + "longname": "package list", + "name": "sources", + "optional": False, + "reader": "urword", + "type": "record", + }, + "longname": "package list", + "name": "sources", + "optional": False, + "reader": "urword", + "type": "recarray", + } + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgweuze.py b/flopy/mf6/modflow/mfgweuze.py index 90d449bdda..1a203a35a7 100644 --- a/flopy/mf6/modflow/mfgweuze.py +++ b/flopy/mf6/modflow/mfgweuze.py @@ -588,6 +588,342 @@ class ModflowGweuze(MFPackage): "time_series true", ], ] + spec = { + "advanced": False, + "fkeys": { + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "ts_filerecord": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + }, + "multi": True, + "name": "gwe-uze", + "options": { + "auxiliary": { + "block": "options", + "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", + "longname": "keyword to specify aux variables", + "name": "auxiliary", + "optional": True, + "reader": "urword", + "shape": "(naux)", + "type": "string", + }, + "boundnames": { + "block": "options", + "description": "keyword to indicate that boundary names may be provided with the list of unsaturated zone flow cells.", + "name": "boundnames", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "budget_filerecord": { + "block": "options", + "fields": { + "budgetfile": { + "block": "options", + "description": "name of the binary output file to write budget information.", + "longname": "file keyword", + "name": "budgetfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "budget_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "budgetcsv_filerecord": { + "block": "options", + "fields": { + "budgetcsvfile": { + "block": "options", + "description": "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.", + "longname": "file keyword", + "name": "budgetcsvfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "budgetcsv_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "flow_package_auxiliary_name": { + "block": "options", + "description": "keyword to specify the name of an auxiliary variable in the corresponding flow package. if specified, then the simulated temperatures from this advanced transport package will be copied into the auxiliary variable specified with this name. note that the flow package must have an auxiliary variable with this name or the program will terminate with an error. if the flows for this advanced transport package are read from a file, then this option will have no effect.", + "longname": "keyword to specify name of concentration auxiliary variable in flow package", + "name": "flow_package_auxiliary_name", + "optional": True, + "reader": "urword", + "type": "string", + }, + "flow_package_name": { + "block": "options", + "description": "keyword to specify the name of the corresponding flow package. if not specified, then the corresponding flow package must have the same name as this advanced transport package (the name associated with this package in the gwe name file).", + "longname": "keyword to specify name of corresponding flow package", + "name": "flow_package_name", + "optional": True, + "reader": "urword", + "type": "string", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of unsaturated zone 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.", + "longname": "print calculated flows to listing file", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of unsaturated zone flow information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_temperature": { + "block": "options", + "description": "keyword to indicate that the list of uzf cell {#2} will be printed to the listing file for every stress period in which 'temperature print' is specified in output control. if there is no output control option and print_{#3} is specified, then {#2} are printed for the last time step of each stress period.", + "longname": "print calculated temperatures to listing file", + "name": "print_temperature", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that unsaturated zone flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save uze cell flows to budget file", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "temperature_filerecord": { + "block": "options", + "fields": { + "tempfile": { + "block": "options", + "description": "name of the binary output file to write temperature information.", + "longname": "file keyword", + "name": "tempfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "temperature_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "timeseries": { + "block": "options", + "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", + "name": "timeseries", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + "type": "record ts6 filein ts6_filename", + }, + }, + "packagedata": { + "packagedata": { + "block": "packagedata", + "item": { + "block": "packagedata", + "fields": { + "aux": { + "block": "packagedata", + "description": "represents the values of the auxiliary variables for each unsaturated zone flow. The values of auxiliary variables must be present for each unsaturated zone flow. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "auxiliary variables", + "name": "aux", + "optional": "true", + "reader": "urword", + "shape": "(naux)", + "time_series": "true", + "type": "double precision", + }, + "boundname": { + "block": "packagedata", + "description": "name of the unsaturated zone flow cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", + "longname": "UZF cell name", + "name": "boundname", + "optional": "true", + "reader": "urword", + "type": "string", + }, + "strt": { + "block": "packagedata", + "description": "real value that defines the starting temperature for the unsaturated zone flow cell.", + "longname": "starting UZF cell temperature", + "name": "strt", + "reader": "urword", + "type": "double precision", + }, + "uzfno": { + "block": "period", + "description": "integer value that defines the UZF cell number associated with the specified PERIOD data on the line. UZFNO must be greater than zero and less than or equal to NUZFCELLS.", + "longname": "unsaturated zone flow cell number for this entry", + "name": "uzfno", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + }, + "name": "packagedata", + "reader": "urword", + "type": "record", + }, + "name": "packagedata", + "reader": "urword", + "shape": "(maxbound)", + "type": "recarray", + } + }, + "period": { + "transient_block": True, + "uzeperioddata": { + "block": "period", + "item": { + "block": "period", + "fields": { + "uzesetting": { + "block": "period", + "choices": { + "auxiliaryrecord": { + "block": "period", + "fields": { + "auxiliary": { + "block": "period", + "description": "keyword for specifying auxiliary variable.", + "name": "auxiliary", + "reader": "urword", + "type": "keyword", + }, + "auxname": { + "block": "period", + "description": "name for the auxiliary variable to be assigned AUXVAL. AUXNAME must match one of the auxiliary variable names defined in the OPTIONS block. If AUXNAME does not match one of the auxiliary variable names defined in the OPTIONS block the data are ignored.", + "name": "auxname", + "reader": "urword", + "type": "string", + }, + "auxval": { + "block": "period", + "description": "value for the auxiliary variable. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "auxiliary variable value", + "name": "auxval", + "reader": "urword", + "time_series": "true", + "type": "double precision", + }, + }, + "name": "auxiliaryrecord", + "reader": "urword", + "type": "record", + }, + "infiltration": { + "block": "period", + "description": "real or character value that defines the temperature of the infiltration $(e.g.,:^{circ}c:or:^{circ}f)$ for the uzf cell. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "infiltration temperature", + "name": "infiltration", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "status": { + "block": "period", + "description": "keyword option to define uzf cell status. status can be active, inactive, or constant. by default, status is active, which means that temperature will be calculated for the uzf cell. if a uzf cell is inactive, then there will be no energy fluxes into or out of the uzf cell and the inactive value will be written for the uzf cell temperature. if a uzf cell is constant, then the temperature for the uzf cell will be fixed at the user specified value.", + "longname": "unsaturated zone flow cell temperature status", + "name": "status", + "reader": "urword", + "type": "string", + }, + "temperature": { + "block": "period", + "description": "real or character value that defines the temperature for the unsaturated zone flow cell. the specified temperature is only applied if the unsaturated zone flow cell is a constant temperature cell. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "unsaturated zone flow cell temperature", + "name": "temperature", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "uzet": { + "block": "period", + "description": "real or character value that states what fraction of the simulated unsaturated zone evapotranspiration is associated with evaporation. the evaporative losses from the unsaturated zone moisture content will have an evaporative cooling effect on the gwe cell from which the evaporation originated. if this value is larger than 1, then it will be reset to 1. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "unsaturated zone et temperature", + "name": "uzet", + "reader": "urword", + "time_series": True, + "type": "string", + }, + }, + "description": "line of information that is parsed into a keyword and values. keyword values that can be used to start the uzesetting string include: status, temperature, infiltration, uzet, and auxiliary. these settings are used to assign the temperature associated with the corresponding flow terms. temperatures cannot be specified for all flow terms.", + "name": "uzesetting", + "reader": "urword", + "type": "keystring", + }, + "uzfno": { + "block": "period", + "description": "integer value that defines the uzf cell number associated with the specified period data on the line. uzfno must be greater than zero and less than or equal to nuzfcells.", + "longname": "unsaturated zone flow cell number for this entry", + "name": "uzfno", + "numeric_index": True, + "reader": "urword", + "type": "integer", + }, + }, + "name": "uzeperioddata", + "reader": "urword", + "type": "record", + }, + "name": "uzeperioddata", + "reader": "urword", + "type": "recarray", + }, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwfapi.py b/flopy/mf6/modflow/mfgwfapi.py index bec2261702..e71b129c36 100644 --- a/flopy/mf6/modflow/mfgwfapi.py +++ b/flopy/mf6/modflow/mfgwfapi.py @@ -153,6 +153,94 @@ class ModflowGwfapi(MFPackage): "optional false", ], ] + spec = { + "advanced": False, + "dimensions": { + "maxbound": { + "block": "dimensions", + "description": "integer value specifying the maximum number of api boundary cells that will be specified for use during any stress period.", + "longname": "maximum number of user-defined api boundaries", + "name": "maxbound", + "optional": False, + "reader": "urword", + "type": "integer", + } + }, + "fkeys": { + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + } + }, + "multi": True, + "name": "gwf-api", + "options": { + "boundnames": { + "block": "options", + "description": "keyword to indicate that boundary names may be provided with the list of api boundary cells.", + "name": "boundnames", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "mover": { + "block": "options", + "description": "keyword to indicate that this instance of the api boundary package can be used with the water mover (mvr) package. when the mover option is specified, additional memory is allocated within the package to store the available, provided, and received water.", + "name": "mover", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of api boundary 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.", + "longname": "print calculated flows to listing file", + "mf6internal": "iprflow", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of api boundary information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "mf6internal": "iprpak", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that api boundary flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save api flows to budget file", + "mf6internal": "ipakcb", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwfbuy.py b/flopy/mf6/modflow/mfgwfbuy.py index fd7e4d6824..602b6a1a0f 100644 --- a/flopy/mf6/modflow/mfgwfbuy.py +++ b/flopy/mf6/modflow/mfgwfbuy.py @@ -215,6 +215,131 @@ class ModflowGwfbuy(MFPackage): "reader urword", ], ] + spec = { + "advanced": False, + "dimensions": { + "nrhospecies": { + "block": "dimensions", + "description": "number of species used in density equation of state. this value must be one or greater if the buy package is activated.", + "longname": "number of species used in density equation of state", + "name": "nrhospecies", + "optional": False, + "reader": "urword", + "type": "integer", + } + }, + "multi": False, + "name": "gwf-buy", + "options": { + "denseref": { + "block": "options", + "default": 1000.0, + "description": "fluid reference density used in the equation of state. this value is set to 1000. if not specified as an option.", + "longname": "reference density", + "name": "denseref", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "density_filerecord": { + "block": "options", + "fields": { + "densityfile": { + "block": "options", + "description": "name of the binary output file to write density information. The density file has the same format as the head file. Density values will be written to the density file whenever heads are written to the binary head file. The settings for controlling head output are contained in the Output Control option.", + "longname": "file keyword", + "name": "densityfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "density_fr", + "name": "density_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "dev_efh_formulation": { + "block": "options", + "description": "use the variable-density equivalent freshwater head formulation instead of the hydraulic head head formulation. this dev option has only been implemented for confined aquifer conditions and should generally not be used.", + "longname": "use equivalent freshwater head formulation", + "mf6internal": "dev_efh_form", + "name": "dev_efh_formulation", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "hhformulation_rhs": { + "block": "options", + "description": "use the variable-density hydraulic head formulation and add off-diagonal terms to the right-hand. this option will prevent the buy package from adding asymmetric terms to the flow matrix.", + "longname": "hh formulation on right-hand side", + "mf6internal": "hhform_rhs", + "name": "hhformulation_rhs", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + "packagedata": { + "packagedata": { + "block": "packagedata", + "item": { + "block": "packagedata", + "fields": { + "auxspeciesname": { + "block": "packagedata", + "description": "name of an auxiliary variable in a GWF stress package that will be used for this species to calculate a density value. If a density value is needed by the Buoyancy Package then it will use the concentration values in this AUXSPECIESNAME column in the density equation of state. For advanced stress packages (LAK, SFR, MAW, and UZF) that have an associated advanced transport package (LKT, SFT, MWT, and UZT), the FLOW_PACKAGE_AUXILIARY_NAME option in the advanced transport package can be used to transfer simulated concentrations into the flow package auxiliary variable. In this manner, the Buoyancy Package can calculate density values for lakes, streams, multi-aquifer wells, and unsaturated zone flow cells using simulated concentrations.", + "longname": "auxspeciesname", + "name": "auxspeciesname", + "reader": "urword", + "type": "string", + }, + "crhoref": { + "block": "packagedata", + "description": "real value that defines the reference concentration value used for this species in the density equation of state.", + "longname": "reference concentration value", + "name": "crhoref", + "reader": "urword", + "type": "double precision", + }, + "drhodc": { + "block": "packagedata", + "description": "real value that defines the slope of the density-concentration line for this species used in the density equation of state.", + "longname": "slope of the density-concentration line", + "name": "drhodc", + "reader": "urword", + "type": "double precision", + }, + "irhospec": { + "block": "packagedata", + "description": "integer value that defines the species number associated with the specified PACKAGEDATA data on the line. IRHOSPECIES must be greater than zero and less than or equal to NRHOSPECIES. Information must be specified for each of the NRHOSPECIES species or the program will terminate with an error. The program will also terminate with an error if information for a species is specified more than once.", + "longname": "species number for this entry", + "name": "irhospec", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "modelname": { + "block": "packagedata", + "description": "name of a GWT or GWE model used to simulate a species that will be used in the density equation of state. This name will have no effect if the simulation does not include a GWT or GWE model that corresponds to this GWF model.", + "longname": "modelname", + "name": "modelname", + "reader": "urword", + "type": "string", + }, + }, + "name": "packagedata", + "reader": "urword", + "type": "record", + }, + "name": "packagedata", + "reader": "urword", + "shape": "(nrhospecies)", + "type": "recarray", + } + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwfchd.py b/flopy/mf6/modflow/mfgwfchd.py index 92276a1bcb..6d305dfb74 100644 --- a/flopy/mf6/modflow/mfgwfchd.py +++ b/flopy/mf6/modflow/mfgwfchd.py @@ -306,6 +306,198 @@ class ModflowGwfchd(MFPackage): "optional true", ], ] + spec = { + "advanced": False, + "dimensions": { + "maxbound": { + "block": "dimensions", + "description": "integer value specifying the maximum number of constant-head cells that will be specified for use during any stress period.", + "longname": "maximum number of constant heads", + "name": "maxbound", + "optional": False, + "reader": "urword", + "type": "integer", + } + }, + "fkeys": { + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "ts_filerecord": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + }, + "multi": True, + "name": "gwf-chd", + "options": { + "auxiliary": { + "block": "options", + "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", + "longname": "keyword to specify aux variables", + "name": "auxiliary", + "optional": True, + "reader": "urword", + "shape": "(naux)", + "type": "string", + }, + "auxmultname": { + "block": "options", + "description": "name of auxiliary variable to be used as multiplier of chd head value.", + "longname": "name of auxiliary variable for multiplier", + "name": "auxmultname", + "optional": True, + "reader": "urword", + "type": "string", + }, + "boundnames": { + "block": "options", + "description": "keyword to indicate that boundary names may be provided with the list of constant-head cells.", + "name": "boundnames", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "dev_no_newton": { + "block": "options", + "description": "turn off newton for unconfined cells", + "longname": "turn off newton for unconfined cells", + "mf6internal": "inewton", + "name": "dev_no_newton", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of constant-head 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.", + "longname": "print chd flows to listing file", + "mf6internal": "iprflow", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of constant-head information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "mf6internal": "iprpak", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that constant-head flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save chd flows to budget file", + "mf6internal": "ipakcb", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "timeseries": { + "block": "options", + "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", + "name": "timeseries", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + "type": "record ts6 filein ts6_filename", + }, + }, + "period": { + "stress_period_data": { + "block": "period", + "item": { + "block": "period", + "fields": { + "aux": { + "block": "period", + "description": "represents the values of the auxiliary variables for each constant head. The values of auxiliary variables must be present for each constant head. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "auxiliary variables", + "mf6internal": "auxvar", + "name": "aux", + "optional": "true", + "reader": "urword", + "shape": "(naux)", + "time_series": "true", + "type": "double precision", + }, + "boundname": { + "block": "period", + "description": "name of the constant head boundary cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", + "longname": "constant head boundary name", + "name": "boundname", + "optional": "true", + "reader": "urword", + "type": "string", + }, + "cellid": { + "block": "period", + "description": "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 layer, row, and column. For a grid that uses the DISV input file, CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file, CELLID is the node number for the cell.", + "longname": "cell identifier", + "name": "cellid", + "reader": "urword", + "shape": "(ncelldim)", + "type": "integer", + }, + "head": { + "block": "period", + "description": "is the head at the boundary. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "head value assigned to constant head", + "name": "head", + "reader": "urword", + "time_series": "true", + "type": "double precision", + }, + }, + "mf6internal": "spd", + "name": "stress_period_data", + "reader": "urword", + "type": "record", + }, + "mf6internal": "spd", + "name": "stress_period_data", + "reader": "urword", + "shape": "(maxbound)", + "type": "recarray", + }, + "transient_block": True, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwfchdg.py b/flopy/mf6/modflow/mfgwfchdg.py new file mode 100644 index 0000000000..9f3b3edd8b --- /dev/null +++ b/flopy/mf6/modflow/mfgwfchdg.py @@ -0,0 +1,439 @@ +# 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 ModflowGwfchdg(MFPackage): + """ + ModflowGwfchdg defines a CHDG package. + + Parameters + ---------- + model + Model that this package is a part of. Package is automatically + added to model when it is initialized. + loading_package : bool, default False + Do not set this parameter. It is intended for debugging and internal + processing purposes only. + auxiliary : [string] + defines an array of one or more auxiliary variable names. there is no limit on + the number of auxiliary variables that can be provided on this line; however, + lists of information provided in subsequent blocks must have a column of data + for each auxiliary variable name defined here. the number of auxiliary + variables detected on this line determines the value for naux. comments cannot + be provided anywhere on this line as they will be interpreted as auxiliary + variable names. auxiliary variables may not be used by the package, but they + will be available for use by other parts of the program. the program will + terminate with an error if auxiliary variables are specified on more than one + line in the options block. + auxmultname : string + name of auxiliary variable to be used as multiplier of chd head value. + print_input : keyword + keyword to indicate that the list of constant-head information will be written + to the listing file immediately after it is read. + print_flows : keyword + keyword to indicate that the list of constant-head 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 constant-head flow terms will be written to the file + specified with 'budget fileout' in output control. + observations : record obs6 filein obs6_filename + Contains data for the obs package. Data can be passed as a dictionary to the + obs package with variable names as keys and package data as values. Data for + the observations variable is also acceptable. See obs package documentation for + more information. + export_array_netcdf : keyword + keyword that specifies input gridded arrays should be written to the model + output netcdf file with attributes that support using the generated file as a + 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. + dev_no_newton : keyword + turn off newton for unconfined cells + maxbound : integer + integer value specifying the maximum number of constant-head cells that will be + specified for use during any stress period. + head : [double precision] + is the head at the boundary. + 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. + + 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`. + + """ + + auxiliary = ArrayTemplateGenerator(("gwf6", "chdg", "options", "auxiliary")) + obs_filerecord = ListTemplateGenerator( + ("gwf6", "chdg", "options", "obs_filerecord") + ) + head = ArrayTemplateGenerator(("gwf6", "chdg", "period", "head")) + aux = ArrayTemplateGenerator(("gwf6", "chdg", "period", "aux")) + package_abbr = "gwfchdg" + _package_type = "chdg" + dfn_file_name = "gwf-chdg.dfn" + dfn = [ + ["header", "multi-package", "package-type stress-package"], + [ + "block options", + "name readarraygrid", + "type keyword", + "reader urword", + "optional false", + "developmode true", + "default true", + ], + [ + "block options", + "name auxiliary", + "type string", + "shape (naux)", + "reader urword", + "optional true", + ], + [ + "block options", + "name auxmultname", + "type string", + "shape", + "reader urword", + "optional true", + ], + [ + "block options", + "name print_input", + "type keyword", + "reader urword", + "optional true", + "mf6internal iprpak", + ], + [ + "block options", + "name print_flows", + "type keyword", + "reader urword", + "optional true", + "mf6internal iprflow", + ], + [ + "block options", + "name save_flows", + "type keyword", + "reader urword", + "optional true", + "mf6internal ipakcb", + ], + [ + "block options", + "name obs_filerecord", + "type record obs6 filein obs6_filename", + "shape", + "reader urword", + "tagged true", + "optional true", + "construct_package obs", + "construct_data observations", + "parameter_name continuous", + ], + [ + "block options", + "name obs6", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name filein", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name obs6_filename", + "type string", + "preserve_case true", + "in_record true", + "tagged false", + "reader urword", + "optional false", + ], + [ + "block options", + "name export_array_netcdf", + "type keyword", + "reader urword", + "optional true", + "mf6internal export_nc", + "extended true", + ], + [ + "block options", + "name dev_no_newton", + "type keyword", + "reader urword", + "optional true", + "mf6internal inewton", + ], + [ + "block dimensions", + "name maxbound", + "type integer", + "reader urword", + "optional true", + ], + [ + "block period", + "name iper", + "type integer", + "block_variable true", + "in_record true", + "tagged false", + "shape", + "valid", + "reader urword", + "optional false", + ], + [ + "block period", + "name head", + "type double precision", + "shape (nodes)", + "reader readarray", + "layered true", + "netcdf true", + "default 3.e30", + ], + [ + "block period", + "name aux", + "type double precision", + "shape (nodes)", + "reader readarray", + "layered true", + "netcdf true", + "optional true", + "mf6internal auxvar", + ], + ] + spec = { + "advanced": False, + "dimensions": { + "maxbound": { + "block": "dimensions", + "description": "integer value specifying the maximum number of constant-head cells that will be specified for use during any stress period.", + "longname": "maximum number of constant head cells in any stress period", + "name": "maxbound", + "optional": True, + "reader": "urword", + "type": "integer", + } + }, + "fkeys": { + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + } + }, + "multi": True, + "name": "gwf-chdg", + "options": { + "auxiliary": { + "block": "options", + "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", + "longname": "keyword to specify aux variables", + "name": "auxiliary", + "optional": True, + "reader": "urword", + "shape": "(naux)", + "type": "string", + }, + "auxmultname": { + "block": "options", + "description": "name of auxiliary variable to be used as multiplier of chd head value.", + "longname": "name of auxiliary variable for multiplier", + "name": "auxmultname", + "optional": True, + "reader": "urword", + "type": "string", + }, + "dev_no_newton": { + "block": "options", + "description": "turn off newton for unconfined cells", + "longname": "turn off newton for unconfined cells", + "mf6internal": "inewton", + "name": "dev_no_newton", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "export_array_netcdf": { + "block": "options", + "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", + "extended": True, + "longname": "export array variables to netcdf output files.", + "mf6internal": "export_nc", + "name": "export_array_netcdf", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of constant-head 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.", + "longname": "print chd flows to listing file", + "mf6internal": "iprflow", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of constant-head information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "mf6internal": "iprpak", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "readarraygrid": { + "block": "options", + "default": True, + "description": "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).", + "developmode": True, + "longname": "use array-based grid input", + "name": "readarraygrid", + "optional": False, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that constant-head flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save chd flows to budget file", + "mf6internal": "ipakcb", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + "period": { + "aux": { + "block": "period", + "description": "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.", + "layered": True, + "longname": "constant head auxiliary variable iaux", + "mf6internal": "auxvar", + "name": "aux", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "head": { + "block": "period", + "default": 3e30, + "description": "is the head at the boundary.", + "layered": True, + "longname": "head value assigned to constant head", + "name": "head", + "netcdf": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "transient_block": True, + }, + } + + def __init__( + self, + model, + loading_package=False, + auxiliary=None, + auxmultname=None, + print_input=None, + print_flows=None, + save_flows=None, + observations=None, + export_array_netcdf=None, + dev_no_newton=None, + maxbound=None, + head=3e30, + aux=None, + filename=None, + pname=None, + **kwargs, + ): + """Initialize ModflowGwfchdg.""" + super().__init__( + parent=model, + package_type="chdg", + filename=filename, + pname=pname, + loading_package=loading_package, + **kwargs, + ) + + self.auxiliary = self.build_mfdata("auxiliary", auxiliary) + self.auxmultname = self.build_mfdata("auxmultname", auxmultname) + 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._obs_filerecord = self.build_mfdata("obs_filerecord", None) + self._obs_package = self.build_child_package( + "obs", observations, "continuous", self._obs_filerecord + ) + self.export_array_netcdf = self.build_mfdata( + "export_array_netcdf", export_array_netcdf + ) + self.dev_no_newton = self.build_mfdata("dev_no_newton", dev_no_newton) + self.maxbound = self.build_mfdata("maxbound", maxbound) + self.head = self.build_mfdata("head", head) + self.aux = self.build_mfdata("aux", aux) + + self._init_complete = True diff --git a/flopy/mf6/modflow/mfgwfcsub.py b/flopy/mf6/modflow/mfgwfcsub.py index e59a3ac517..9972c132e0 100644 --- a/flopy/mf6/modflow/mfgwfcsub.py +++ b/flopy/mf6/modflow/mfgwfcsub.py @@ -1016,6 +1016,612 @@ class ModflowGwfcsub(MFPackage): "time_series true", ], ] + spec = { + "advanced": False, + "dimensions": { + "maxsig0": { + "block": "dimensions", + "description": "is the maximum number of cells that can have a specified stress offset. more than 1 stress offset can be assigned to a gwf cell. by default, maxsig0 is 0.", + "longname": "maximum number of stress offset cells", + "mf6internal": "maxbound", + "name": "maxsig0", + "optional": True, + "reader": "urword", + "type": "integer", + }, + "ninterbeds": { + "block": "dimensions", + "description": "is the number of csub interbed systems. more than 1 csub interbed systems can be assigned to a gwf cell; however, only 1 gwf cell can be assigned to a single csub interbed system.", + "longname": "number of csub interbed systems", + "name": "ninterbeds", + "optional": False, + "reader": "urword", + "type": "integer", + }, + }, + "fkeys": { + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "ts_filerecord": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + }, + "griddata": { + "cg_ske_cr": { + "block": "griddata", + "default": 1e-05, + "description": "is the initial elastic coarse-grained material specific storage or recompression index. the recompression index is specified if compression_indices is specified in the options block. specified or calculated elastic coarse-grained material specific storage values are not adjusted from initial values if head_based is specified in the options block.", + "layered": True, + "longname": "elastic coarse specific storage", + "name": "cg_ske_cr", + "netcdf": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "cg_theta": { + "block": "griddata", + "default": 0.2, + "description": "is the initial porosity of coarse-grained materials.", + "layered": True, + "longname": "initial coarse-grained material porosity", + "name": "cg_theta", + "netcdf": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "sgm": { + "block": "griddata", + "description": "is the specific gravity of moist or unsaturated sediments. if not specified, then a default value of 1.7 is assigned.", + "layered": True, + "longname": "specific gravity of moist sediments", + "name": "sgm", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "sgs": { + "block": "griddata", + "description": "is the specific gravity of saturated sediments. if not specified, then a default value of 2.0 is assigned.", + "layered": True, + "longname": "specific gravity of saturated sediments", + "name": "sgs", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + }, + "multi": False, + "name": "gwf-csub", + "options": { + "beta": { + "block": "options", + "default": 4.6512e-10, + "description": "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.", + "longname": "compressibility of water", + "name": "beta", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "boundnames": { + "block": "options", + "description": "keyword to indicate that boundary names may be provided with the list of csub cells.", + "name": "boundnames", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "cell_fraction": { + "block": "options", + "description": "keyword to indicate that the thickness of interbeds will be specified in terms of the fraction of cell thickness. if not specified, interbed thicknness must be specified.", + "longname": "keyword to indicate cell fraction interbed thickness", + "name": "cell_fraction", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "compaction_coarse_filerecord": { + "block": "options", + "fields": { + "coarse_compaction_filename": { + "block": "options", + "description": "name of the binary output file to write elastic coarse-grained material compaction information.", + "longname": "file keyword", + "mf6internal": "cmpcoarsefn", + "name": "coarse_compaction_filename", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "cmpcoarsefr", + "name": "compaction_coarse_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "compaction_elastic_filerecord": { + "block": "options", + "fields": { + "elastic_compaction_filename": { + "block": "options", + "description": "name of the binary output file to write elastic interbed compaction information.", + "longname": "file keyword", + "mf6internal": "elasticcmpfn", + "name": "elastic_compaction_filename", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "cmpelasticfr", + "name": "compaction_elastic_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "compaction_filerecord": { + "block": "options", + "fields": { + "compaction_filename": { + "block": "options", + "description": "name of the binary output file to write compaction information.", + "longname": "file keyword", + "mf6internal": "cmpfn", + "name": "compaction_filename", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "cmpfr", + "name": "compaction_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "compaction_inelastic_filerecord": { + "block": "options", + "fields": { + "inelastic_compaction_filename": { + "block": "options", + "description": "name of the binary output file to write inelastic interbed compaction information.", + "longname": "file keyword", + "mf6internal": "inelasticcmpfn", + "name": "inelastic_compaction_filename", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "cmpinelasticfr", + "name": "compaction_inelastic_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "compaction_interbed_filerecord": { + "block": "options", + "fields": { + "interbed_compaction_filename": { + "block": "options", + "description": "name of the binary output file to write interbed compaction information.", + "longname": "file keyword", + "mf6internal": "interbedcmpfn", + "name": "interbed_compaction_filename", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "cmpinterbedfr", + "name": "compaction_interbed_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "compression_indices": { + "block": "options", + "description": "keyword to indicate that the recompression (cr) and compression (cc) indices are specified instead of the elastic specific storage (sse) and inelastic specific storage (ssv) coefficients. if not specified, then elastic specific storage (sse) and inelastic specific storage (ssv) coefficients must be specified.", + "longname": "keyword to indicate cr and cc are read instead of sse and ssv", + "mf6internal": "icompress", + "name": "compression_indices", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "effective_stress_lag": { + "block": "options", + "description": "keyword to indicate the effective stress from the previous time step will be used to calculate specific storage values. this option can 1) help with convergence in models with thin cells and water table elevations close to land surface; 2) is identical to the approach used in the subwt package for modflow-2005; and 3) is only used if the effective-stress formulation is being used. by default, current effective stress values are used to calculate specific storage values.", + "longname": "keyword to indicate that specific storage will be calculate using the effective stress from the previous time step", + "mf6internal": "stress_lag", + "name": "effective_stress_lag", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "gammaw": { + "block": "options", + "default": 9806.65, + "description": "unit weight of water. for freshwater, gammaw is 9806.65 newtons/cubic meters or 62.48 lb/cubic foot in si and english units, respectively. by default, gammaw is 9806.65 newtons/cubic meters.", + "longname": "unit weight of water", + "name": "gammaw", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "head_based": { + "block": "options", + "description": "keyword to indicate the head-based formulation will be used to simulate coarse-grained aquifer materials and no-delay and delay interbeds. specifying head_based also specifies the initial_preconsolidation_head option.", + "longname": "keyword to indicate the head-based formulation will be used", + "name": "head_based", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "initial_preconsolidation_head": { + "block": "options", + "description": "keyword to indicate that preconsolidation heads will be specified for no-delay and delay interbeds in the packagedata block. if the specified_initial_interbed_state option is specified in the options block, user-specified preconsolidation heads in the packagedata block are absolute values. otherwise, user-specified preconsolidation heads in the packagedata block are relative to steady-state or initial heads.", + "longname": "keyword to indicate that preconsolidation heads will be specified", + "mf6internal": "precon_head", + "name": "initial_preconsolidation_head", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "ndelaycells": { + "block": "options", + "description": "number of nodes used to discretize delay interbeds. if not specified, then a default value of 19 is assigned.", + "longname": "number of interbed cell nodes", + "name": "ndelaycells", + "optional": True, + "reader": "urword", + "type": "integer", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "package_convergence_filerecord": { + "block": "options", + "fields": { + "package_convergence_filename": { + "block": "options", + "description": "name of the comma spaced values output file to write package convergence information.", + "longname": "file keyword", + "mf6internal": "pkgconvergefn", + "name": "package_convergence_filename", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "pkgconvergefr", + "name": "package_convergence_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of csub information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that cell-by-cell flow terms will be written to the file specified with 'budget save file' in output control.", + "longname": "keyword to save csub flows", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "specified_initial_delay_head": { + "block": "options", + "description": "keyword to indicate that absolute initial delay bed head will be specified for interbeds defined in the packagedata block. if specified_initial_delay_head and specified_initial_interbed_state are not specified then delay bed head values specified in the packagedata block are relative to simulated values if the first stress period is steady-state or initial gwf heads if the first stress period is transient.", + "longname": "keyword to indicate that absolute initial delay bed heads will be specified", + "mf6internal": "delay_head", + "name": "specified_initial_delay_head", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "specified_initial_interbed_state": { + "block": "options", + "description": "keyword to indicate that absolute preconsolidation stresses (heads) and delay bed heads will be specified for interbeds defined in the packagedata block. the specified_initial_interbed_state option is equivalent to specifying the specified_initial_preconsolitation_stress and specified_initial_delay_head. if specified_initial_interbed_state is not specified then preconsolidation stress (head) and delay bed head values specified in the packagedata block are relative to simulated values of the first stress period if steady-state or initial stresses and gwf heads if the first stress period is transient.", + "longname": "keyword to indicate that absolute initial states will be specified", + "mf6internal": "interbed_state", + "name": "specified_initial_interbed_state", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "specified_initial_preconsolidation_stress": { + "block": "options", + "description": "keyword to indicate that absolute preconsolidation stresses (heads) will be specified for interbeds defined in the packagedata block. if specified_initial_preconsolitation_stress and specified_initial_interbed_state are not specified then preconsolidation stress (head) values specified in the packagedata block are relative to simulated values if the first stress period is steady-state or initial stresses (heads) if the first stress period is transient.", + "longname": "keyword to indicate that absolute initial preconsolidation stresses (head) will be specified", + "mf6internal": "precon_stress", + "name": "specified_initial_preconsolidation_stress", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "straincg_filerecord": { + "block": "options", + "fields": { + "coarsestrain_filename": { + "block": "options", + "description": "name of the comma-separated-values output file to write final coarse-grained material strain information.", + "longname": "file keyword", + "mf6internal": "coarsestrainfn", + "name": "coarsestrain_filename", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "straincgfr", + "name": "straincg_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "strainib_filerecord": { + "block": "options", + "fields": { + "interbedstrain_filename": { + "block": "options", + "description": "name of the comma-separated-values output file to write final interbed strain information.", + "longname": "file keyword", + "mf6internal": "interbedstrainfn", + "name": "interbedstrain_filename", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "strainibfr", + "name": "strainib_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "timeseries": { + "block": "options", + "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", + "name": "timeseries", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + "type": "record ts6 filein ts6_filename", + }, + "update_material_properties": { + "block": "options", + "description": "keyword to indicate that the thickness and void ratio of coarse-grained and interbed sediments (delay and no-delay) will vary during the simulation. if not specified, the thickness and void ratio of coarse-grained and interbed sediments will not vary during the simulation.", + "longname": "keyword to indicate material properties can change during the simulations", + "mf6internal": "matprop", + "name": "update_material_properties", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "zdisplacement_filerecord": { + "block": "options", + "fields": { + "zdisplacement_filename": { + "block": "options", + "description": "name of the binary output file to write z-displacement information.", + "longname": "file keyword", + "mf6internal": "zdispfn", + "name": "zdisplacement_filename", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "zdispfr", + "name": "zdisplacement_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + }, + "packagedata": { + "packagedata": { + "block": "packagedata", + "item": { + "block": "packagedata", + "fields": { + "boundname": { + "block": "packagedata", + "description": "name of the CSUB cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", + "longname": "well name", + "name": "boundname", + "optional": "true", + "reader": "urword", + "type": "string", + }, + "cdelay": { + "block": "packagedata", + "description": "character string that defines the subsidence delay type for the interbed. Possible subsidence package CDELAY strings include: NODELAY--character keyword to indicate that delay will not be simulated in the interbed. DELAY--character keyword to indicate that delay will be simulated in the interbed.", + "longname": "delay type", + "name": "cdelay", + "reader": "urword", + "type": "string", + }, + "cellid": { + "block": "period", + "description": "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 layer, row, and column. For a grid that uses the DISV input file, CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file, CELLID is the node number for the cell.", + "longname": "cell identifier", + "name": "cellid", + "reader": "urword", + "shape": "(ncelldim)", + "type": "integer", + }, + "h0": { + "block": "packagedata", + "description": "is the initial offset from the head in cell cellid or the initial head in the delay interbed. H0 is the initial head in the delay bed if SPECIFIED_INITIAL_INTERBED_STATE or SPECIFIED_INITIAL_DELAY_HEAD are specified in the OPTIONS block. H0 can be any value if CDELAY is NODELAY.", + "longname": "initial delay interbed head", + "name": "h0", + "reader": "urword", + "type": "double precision", + }, + "icsubno": { + "block": "packagedata", + "description": "integer value that defines the CSUB interbed number associated with the specified PACKAGEDATA data on the line. CSUBNO must be greater than zero and less than or equal to NINTERBEDS. CSUB information must be specified for every CSUB cell or the program will terminate with an error. The program will also terminate with an error if information for a CSUB interbed number is specified more than once.", + "longname": "CSUB id number for this entry", + "name": "icsubno", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "kv": { + "block": "packagedata", + "description": "is the vertical hydraulic conductivity of the delay interbed. KV must be greater than 0 if CDELAY is DELAY. Otherwise, KV can be any value.", + "longname": "delay interbed vertical hydraulic conductivity", + "name": "kv", + "reader": "urword", + "type": "double precision", + }, + "pcs0": { + "block": "packagedata", + "description": "is the initial offset from the calculated initial effective stress or initial preconsolidation stress in the interbed, in units of height of a column of water. PCS0 is the initial preconsolidation stress if SPECIFIED_INITIAL_INTERBED_STATE or SPECIFIED_INITIAL_PRECONSOLIDATION_STRESS are specified in the OPTIONS block. If HEAD_BASED is specified in the OPTIONS 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.", + "longname": "initial stress", + "name": "pcs0", + "reader": "urword", + "type": "double precision", + }, + "rnb": { + "block": "packagedata", + "description": "is the interbed material factor equivalent number of interbeds in the interbed system represented by the interbed. RNB must be greater than or equal to 1 if CDELAY is DELAY. Otherwise, RNB can be any value.", + "longname": "delay interbed material factor", + "name": "rnb", + "reader": "urword", + "type": "double precision", + }, + "sse_cr": { + "block": "packagedata", + "description": "is the initial elastic coarse-grained material specific storage or recompression index of the interbed. The recompression index is specified if COMPRESSION_INDICES is specified in the OPTIONS block. Specified or calculated interbed elastic specific storage values are not adjusted from initial values if HEAD_BASED is specified in the OPTIONS block.", + "longname": "initial interbed elastic specific storage", + "name": "sse_cr", + "reader": "urword", + "type": "double precision", + }, + "ssv_cc": { + "block": "packagedata", + "description": "is the initial inelastic specific storage or compression index of the interbed. The compression index is specified if COMPRESSION_INDICES is specified in the OPTIONS block. Specified or calculated interbed inelastic specific storage values are not adjusted from initial values if HEAD_BASED is specified in the OPTIONS block.", + "longname": "initial interbed inelastic specific storage", + "name": "ssv_cc", + "reader": "urword", + "type": "double precision", + }, + "theta": { + "block": "packagedata", + "default": "0.2", + "description": "is the initial porosity of the interbed.", + "longname": "initial interbed porosity", + "name": "theta", + "reader": "urword", + "type": "double precision", + }, + "thick_frac": { + "block": "packagedata", + "description": "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 in the OPTIONS block.", + "longname": "interbed thickness or cell fraction", + "name": "thick_frac", + "reader": "urword", + "type": "double precision", + }, + }, + "name": "packagedata", + "optional": True, + "reader": "urword", + "type": "record", + }, + "name": "packagedata", + "optional": True, + "reader": "urword", + "shape": "(ninterbeds)", + "type": "recarray", + } + }, + "period": { + "stress_period_data": { + "block": "period", + "item": { + "block": "period", + "fields": { + "cellid": { + "block": "period", + "description": "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 layer, row, and column. For a grid that uses the DISV input file, CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file, CELLID is the node number for the cell.", + "longname": "cell identifier", + "name": "cellid", + "reader": "urword", + "shape": "(ncelldim)", + "type": "integer", + }, + "sig0": { + "block": "period", + "description": "is the stress offset for the cell. SIG0 is added to the calculated geostatic stress for the cell. SIG0 is specified only if MAXSIG0 is specified to be greater than 0 in the DIMENSIONS block. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "well stress offset", + "name": "sig0", + "reader": "urword", + "time_series": "true", + "type": "double precision", + }, + }, + "mf6internal": "spd", + "name": "stress_period_data", + "reader": "urword", + "type": "record", + }, + "mf6internal": "spd", + "name": "stress_period_data", + "reader": "urword", + "shape": "(maxsig0)", + "type": "recarray", + }, + "transient_block": True, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwfdis.py b/flopy/mf6/modflow/mfgwfdis.py index 88ad8d1edd..a76007d1da 100644 --- a/flopy/mf6/modflow/mfgwfdis.py +++ b/flopy/mf6/modflow/mfgwfdis.py @@ -49,8 +49,11 @@ class ModflowGwfdis(MFPackage): keyword that specifies input griddata arrays should be written to layered ascii output files. export_array_netcdf : keyword - keyword that specifies input griddata arrays should be written to the model - output netcdf file. + keyword that specifies input gridded arrays should be written to the model + output netcdf file with attributes that support using the generated file as a + 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. 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 @@ -199,7 +202,7 @@ class ModflowGwfdis(MFPackage): "preserve_case true", "reader urword", "optional true", - "prerelease true", + "developmode true", ], [ "block options", @@ -314,6 +317,223 @@ class ModflowGwfdis(MFPackage): "optional true", ], ] + spec = { + "advanced": False, + "dimensions": { + "ncol": { + "block": "dimensions", + "default": 2, + "description": "is the number of columns in the model grid.", + "longname": "number of columns", + "name": "ncol", + "optional": False, + "reader": "urword", + "type": "integer", + }, + "nlay": { + "block": "dimensions", + "default": 1, + "description": "is the number of layers in the model grid.", + "longname": "number of layers", + "name": "nlay", + "optional": False, + "reader": "urword", + "type": "integer", + }, + "nrow": { + "block": "dimensions", + "default": 2, + "description": "is the number of rows in the model grid.", + "longname": "number of rows", + "name": "nrow", + "optional": False, + "reader": "urword", + "type": "integer", + }, + }, + "fkeys": { + "ncf_filerecord": { + "abbr": "ncf", + "key": "ncf_filerecord", + "param": "packagedata", + "parent": "parent_package", + "val": "packagedata", + } + }, + "griddata": { + "botm": { + "block": "griddata", + "default": 0.0, + "description": "is the bottom elevation for each cell.", + "layered": True, + "longname": "cell bottom elevation", + "name": "botm", + "netcdf": True, + "reader": "readarray", + "shape": "(ncol, nrow, nlay)", + "type": "double precision", + }, + "delc": { + "block": "griddata", + "default": 1.0, + "description": "is the row spacing in the column direction.", + "longname": "spacing along a column", + "name": "delc", + "netcdf": True, + "reader": "readarray", + "shape": "(nrow)", + "type": "double precision", + }, + "delr": { + "block": "griddata", + "default": 1.0, + "description": "is the column spacing in the row direction.", + "longname": "spacing along a row", + "name": "delr", + "netcdf": True, + "reader": "readarray", + "shape": "(ncol)", + "type": "double precision", + }, + "idomain": { + "block": "griddata", + "description": "is an optional array that characterizes the existence status of a cell. if the idomain array is not specified, then all model cells exist within the solution. if the idomain value for a cell is 0, the cell does not exist in the simulation. input and output values will be read and written for the cell, but internal to the program, the cell is excluded from the solution. if the idomain value for a cell is 1 or greater, the cell exists in the simulation. if the idomain value for a cell is -1, the cell does not exist in the simulation. furthermore, the first existing cell above will be connected to the first existing cell below. this type of cell is referred to as a 'vertical pass through' cell.", + "layered": True, + "longname": "idomain existence array", + "name": "idomain", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(ncol, nrow, nlay)", + "type": "integer", + }, + "top": { + "block": "griddata", + "default": 1.0, + "description": "is the top elevation for each cell in the top model layer.", + "longname": "cell top elevation", + "name": "top", + "netcdf": True, + "reader": "readarray", + "shape": "(ncol, nrow)", + "type": "double precision", + }, + }, + "multi": False, + "name": "gwf-dis", + "options": { + "angrot": { + "block": "options", + "description": "counter-clockwise rotation angle (in degrees) of the lower-left corner of the model grid. if not specified, then a default value of 0.0 is assigned. the value for angrot does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", + "longname": "rotation angle", + "name": "angrot", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "crs": { + "block": "options", + "description": "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.", + "developmode": True, + "longname": "crs user input string", + "name": "crs", + "optional": True, + "reader": "urword", + "shape": "lenbigline", + "type": "string", + }, + "export_array_ascii": { + "block": "options", + "description": "keyword that specifies input griddata arrays should be written to layered ascii output files.", + "longname": "export array variables to layered ascii files.", + "mf6internal": "export_ascii", + "name": "export_array_ascii", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "export_array_netcdf": { + "block": "options", + "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", + "extended": True, + "longname": "export array variables to netcdf output files.", + "mf6internal": "export_nc", + "name": "export_array_netcdf", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "grb_filerecord": { + "block": "options", + "fields": { + "grb6_filename": { + "block": "options", + "description": "defines a binary grid output file. If this option is not provided, the output file will have the same name as the discretization input file, plus extension '.grb'.", + "longname": "file name of GRB information", + "name": "grb6_filename", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "grb_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "length_units": { + "block": "options", + "description": "is the length units used for this model. values can be 'feet', 'meters', or 'centimeters'. if not specified, the default is 'unknown'.", + "longname": "model length units", + "name": "length_units", + "optional": True, + "reader": "urword", + "type": "string", + }, + "nogrb": { + "block": "options", + "description": "keyword to deactivate writing of the binary grid file.", + "longname": "do not write binary grid file", + "name": "nogrb", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "packagedata": { + "block": "options", + "description": "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 the packagedata variable is also acceptable. See ncf package documentation for more information.", + "name": "packagedata", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "ncf", + "key": "ncf_filerecord", + "param": "packagedata", + "parent": "parent_package", + "val": "packagedata", + }, + "type": "record ncf6 filein ncf6_filename", + }, + "xorigin": { + "block": "options", + "description": "x-position of the lower-left corner of the model grid. a default value of zero is assigned if not specified. the value for xorigin does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", + "longname": "x-position of the model grid origin", + "name": "xorigin", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "yorigin": { + "block": "options", + "description": "y-position of the lower-left corner of the model grid. if not specified, then a default value equal to zero is used. the value for yorigin does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", + "longname": "y-position of the model grid origin", + "name": "yorigin", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwfdisu.py b/flopy/mf6/modflow/mfgwfdisu.py index d4abe1f359..ca83b13fb7 100644 --- a/flopy/mf6/modflow/mfgwfdisu.py +++ b/flopy/mf6/modflow/mfgwfdisu.py @@ -290,7 +290,7 @@ class ModflowGwfdisu(MFPackage): "preserve_case true", "reader urword", "optional true", - "prerelease true", + "developmode true", ], [ "block dimensions", @@ -485,6 +485,358 @@ class ModflowGwfdisu(MFPackage): "numeric_index true", ], ] + spec = { + "advanced": False, + "cell2d": { + "cell2d": { + "block": "cell2d", + "item": { + "block": "cell2d", + "fields": { + "icell2d": { + "block": "cell2d", + "description": "is the cell2d number. Records in the CELL2D block must be listed in consecutive order from 1 to NODES.", + "longname": "cell2d number", + "name": "icell2d", + "numeric_index": "true", + "optional": "false", + "reader": "urword", + "type": "integer", + }, + "icvert": { + "block": "cell2d", + "description": "is an array of integer values containing vertex numbers (in the VERTICES block) used to define the cell. Vertices must be listed in clockwise order.", + "longname": "array of vertex numbers", + "name": "icvert", + "numeric_index": "true", + "optional": "false", + "reader": "urword", + "shape": "(ncvert)", + "type": "integer", + }, + "ncvert": { + "block": "cell2d", + "description": "is the number of vertices required to define the cell. There may be a different number of vertices for each cell.", + "longname": "number of cell vertices", + "name": "ncvert", + "optional": "false", + "reader": "urword", + "type": "integer", + }, + "xc": { + "block": "cell2d", + "description": "is the x-coordinate for the cell center.", + "longname": "x-coordinate for cell center", + "name": "xc", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + "yc": { + "block": "cell2d", + "description": "is the y-coordinate for the cell center.", + "longname": "y-coordinate for cell center", + "name": "yc", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + }, + "longname": "cell2d data", + "name": "cell2d", + "optional": True, + "reader": "urword", + "type": "record", + }, + "longname": "cell2d data", + "name": "cell2d", + "optional": True, + "reader": "urword", + "shape": "(nodes)", + "type": "recarray", + } + }, + "connectiondata": { + "angldegx": { + "block": "connectiondata", + "description": "is the angle (in degrees) between the horizontal x-axis and the outward normal to the face between a cell and its connecting cells. the angle varies between zero and 360.0 degrees, where zero degrees points in the positive x-axis direction, and 90 degrees points in the positive y-axis direction. angldegx is only needed if horizontal anisotropy is specified in the npf package, if the xt3d option is used in the npf package, or if the save_specific_discharge option is specified in the npf package. angldegx does not need to be specified if these conditions are not met. angldegx is of size nja; values specified for vertical connections and for the diagonal position are not used. note that angldegx is read in degrees, which is different from modflow-usg, which reads a similar variable (anglex) in radians.", + "jagged_array": "iac", + "longname": "angle of face normal to connection", + "name": "angldegx", + "optional": True, + "reader": "readarray", + "shape": "(nja)", + "type": "double precision", + }, + "cl12": { + "block": "connectiondata", + "description": "is the array containing connection lengths between the center of cell n and the shared face with each adjacent m cell.", + "jagged_array": "iac", + "longname": "connection lengths", + "name": "cl12", + "reader": "readarray", + "shape": "(nja)", + "type": "double precision", + }, + "hwva": { + "block": "connectiondata", + "description": "is a symmetric array of size nja. for horizontal connections, entries in hwva are the horizontal width perpendicular to flow. for vertical connections, entries in hwva are the vertical area for flow. thus, values in the hwva array contain dimensions of both length and area. entries in the hwva array have a one-to-one correspondence with the connections specified in the ja array. likewise, there is a one-to-one correspondence between entries in the hwva array and entries in the ihc array, which specifies the connection type (horizontal or vertical). entries in the hwva array must be symmetric; the program will terminate with an error if the value for hwva for an n to m connection does not equal the value for hwva for the corresponding n to m connection.", + "jagged_array": "iac", + "longname": "connection lengths", + "name": "hwva", + "reader": "readarray", + "shape": "(nja)", + "type": "double precision", + }, + "iac": { + "block": "connectiondata", + "description": "is the number of connections (plus 1) for each cell. the sum of all the entries in iac must be equal to nja.", + "longname": "number of cell connections", + "name": "iac", + "reader": "readarray", + "shape": "(nodes)", + "type": "integer", + }, + "ihc": { + "block": "connectiondata", + "description": "is an index array indicating the direction between node n and all of its m connections. if ihc = 0 then cell n and cell m are connected in the vertical direction. cell n overlies cell m if the cell number for n is less than m; cell m overlies cell n if the cell number for m is less than n. if ihc = 1 then cell n and cell m are connected in the horizontal direction. if ihc = 2 then cell n and cell m are connected in the horizontal direction, and the connection is vertically staggered. a vertically staggered connection is one in which a cell is horizontally connected to more than one cell in a horizontal connection.", + "jagged_array": "iac", + "longname": "connection type", + "name": "ihc", + "reader": "readarray", + "shape": "(nja)", + "type": "integer", + }, + "ja": { + "block": "connectiondata", + "description": "is a list of cell number (n) followed by its connecting cell numbers (m) for each of the m cells connected to cell n. the number of values to provide for cell n is iac(n). this list is sequentially provided for the first to the last cell. the first value in the list must be cell n itself, and the remaining cells must be listed in an increasing order (sorted from lowest number to highest). note that the cell and its connections are only supplied for the gwf cells and their connections to the other gwf cells. also note that the ja list input may be divided such that every node and its connectivity list can be on a separate line for ease in readability of the file. to further ease readability of the file, the node number of the cell whose connectivity is subsequently listed, may be expressed as a negative number, the sign of which is subsequently converted to positive by the code.", + "jagged_array": "iac", + "longname": "grid connectivity", + "name": "ja", + "numeric_index": True, + "reader": "readarray", + "shape": "(nja)", + "type": "integer", + }, + }, + "dimensions": { + "nja": { + "block": "dimensions", + "description": "is the sum of the number of connections and nodes. when calculating the total number of connections, the connection between cell n and cell m is considered to be different from the connection between cell m and cell n. thus, nja is equal to the total number of connections, including n to m and m to n, and the total number of cells.", + "longname": "number of columns", + "name": "nja", + "optional": False, + "reader": "urword", + "type": "integer", + }, + "nodes": { + "block": "dimensions", + "description": "is the number of cells in the model grid.", + "longname": "number of layers", + "name": "nodes", + "optional": False, + "reader": "urword", + "type": "integer", + }, + "nvert": { + "block": "dimensions", + "description": "is the total number of (x, y) vertex pairs used to define the plan-view shape of each cell in the model grid. if nvert is not specified or is specified as zero, then the vertices and cell2d blocks below are not read. nvert and the accompanying vertices and cell2d blocks should be specified for most simulations. if the xt3d or save_specific_discharge options are specified in the npf package, then this information is required.", + "longname": "number of vertices", + "name": "nvert", + "optional": True, + "reader": "urword", + "type": "integer", + }, + }, + "griddata": { + "area": { + "block": "griddata", + "description": "is the cell surface area (in plan view).", + "longname": "cell surface area", + "name": "area", + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "bot": { + "block": "griddata", + "description": "is the bottom elevation for each cell.", + "longname": "cell bottom elevation", + "name": "bot", + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "idomain": { + "block": "griddata", + "description": "is an optional array that characterizes the existence status of a cell. if the idomain array is not specified, then all model cells exist within the solution. if the idomain value for a cell is 0, the cell does not exist in the simulation. input and output values will be read and written for the cell, but internal to the program, the cell is excluded from the solution. if the idomain value for a cell is 1 or greater, the cell exists in the simulation. idomain values of -1 cannot be specified for the disu package.", + "layered": False, + "longname": "idomain existence array", + "name": "idomain", + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "integer", + }, + "top": { + "block": "griddata", + "description": "is the top elevation for each cell in the model grid.", + "longname": "cell top elevation", + "name": "top", + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + }, + "multi": False, + "name": "gwf-disu", + "options": { + "angrot": { + "block": "options", + "description": "counter-clockwise rotation angle (in degrees) of the model grid coordinate system relative to a real-world coordinate system. if not specified, then a default value of 0.0 is assigned. the value for angrot does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", + "longname": "rotation angle", + "name": "angrot", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "crs": { + "block": "options", + "description": "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.", + "developmode": True, + "longname": "crs user input string", + "name": "crs", + "optional": True, + "reader": "urword", + "shape": "lenbigline", + "type": "string", + }, + "export_array_ascii": { + "block": "options", + "description": "keyword that specifies input griddata arrays should be written to layered ascii output files.", + "longname": "export array variables to layered ascii files.", + "mf6internal": "export_ascii", + "name": "export_array_ascii", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "grb_filerecord": { + "block": "options", + "fields": { + "grb6_filename": { + "block": "options", + "description": "defines a binary grid output file. If this option is not provided, the output file will have the same name as the discretization input file, plus extension '.grb'.", + "longname": "file name of GRB information", + "name": "grb6_filename", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "grb_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "length_units": { + "block": "options", + "description": "is the length units used for this model. values can be 'feet', 'meters', or 'centimeters'. if not specified, the default is 'unknown'.", + "longname": "model length units", + "name": "length_units", + "optional": True, + "reader": "urword", + "type": "string", + }, + "nogrb": { + "block": "options", + "description": "keyword to deactivate writing of the binary grid file.", + "longname": "do not write binary grid file", + "name": "nogrb", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "vertical_offset_tolerance": { + "block": "options", + "default": 0.0, + "description": "checks are performed to ensure that the top of a cell is not higher than the bottom of an overlying cell. this option can be used to specify the tolerance that is used for checking. if top of a cell is above the bottom of an overlying cell by a value less than this tolerance, then the program will not terminate with an error. the default value is zero. this option should generally not be used.", + "longname": "vertical length dimension for top and bottom checking", + "mf6internal": "voffsettol", + "name": "vertical_offset_tolerance", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "xorigin": { + "block": "options", + "description": "x-position of the origin used for model grid vertices. this value should be provided in a real-world coordinate system. a default value of zero is assigned if not specified. the value for xorigin does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", + "longname": "x-position origin of the model grid coordinate system", + "name": "xorigin", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "yorigin": { + "block": "options", + "description": "y-position of the origin used for model grid vertices. this value should be provided in a real-world coordinate system. if not specified, then a default value equal to zero is used. the value for yorigin does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", + "longname": "y-position origin of the model grid coordinate system", + "name": "yorigin", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + }, + "vertices": { + "vertices": { + "block": "vertices", + "item": { + "block": "vertices", + "fields": { + "iv": { + "block": "vertices", + "description": "is the vertex number. Records in the VERTICES block must be listed in consecutive order from 1 to NVERT.", + "longname": "vertex number", + "name": "iv", + "numeric_index": "true", + "optional": "false", + "reader": "urword", + "type": "integer", + }, + "xv": { + "block": "vertices", + "description": "is the x-coordinate for the vertex.", + "longname": "x-coordinate for vertex", + "name": "xv", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + "yv": { + "block": "vertices", + "description": "is the y-coordinate for the vertex.", + "longname": "y-coordinate for vertex", + "name": "yv", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + }, + "longname": "vertices data", + "name": "vertices", + "optional": True, + "reader": "urword", + "type": "record", + }, + "longname": "vertices data", + "name": "vertices", + "optional": True, + "reader": "urword", + "shape": "(nvert)", + "type": "recarray", + } + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwfdisv.py b/flopy/mf6/modflow/mfgwfdisv.py index ef1202320c..0911cc4277 100644 --- a/flopy/mf6/modflow/mfgwfdisv.py +++ b/flopy/mf6/modflow/mfgwfdisv.py @@ -52,8 +52,11 @@ class ModflowGwfdisv(MFPackage): keyword that specifies input griddata arrays should be written to layered ascii output files. export_array_netcdf : keyword - keyword that specifies input griddata arrays should be written to the model - output netcdf file. + keyword that specifies input gridded arrays should be written to the model + output netcdf file with attributes that support using the generated file as a + 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. 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 @@ -229,7 +232,7 @@ class ModflowGwfdisv(MFPackage): "preserve_case true", "reader urword", "optional true", - "prerelease true", + "developmode true", ], [ "block options", @@ -413,6 +416,314 @@ class ModflowGwfdisv(MFPackage): "numeric_index true", ], ] + spec = { + "advanced": False, + "cell2d": { + "cell2d": { + "block": "cell2d", + "item": { + "block": "cell2d", + "fields": { + "icell2d": { + "block": "cell2d", + "description": "is the CELL2D number. Records in the CELL2D block must be listed in consecutive order from the first to the last.", + "longname": "cell2d number", + "name": "icell2d", + "numeric_index": "true", + "optional": "false", + "reader": "urword", + "type": "integer", + }, + "icvert": { + "block": "cell2d", + "description": "is an array of integer values containing vertex numbers (in the VERTICES block) used to define the cell. Vertices must be listed in clockwise order. Cells that are connected must share vertices.", + "longname": "array of vertex numbers", + "name": "icvert", + "numeric_index": "true", + "optional": "false", + "reader": "urword", + "shape": "(ncvert)", + "type": "integer", + }, + "ncvert": { + "block": "cell2d", + "description": "is the number of vertices required to define the cell. There may be a different number of vertices for each cell.", + "longname": "number of cell vertices", + "name": "ncvert", + "optional": "false", + "reader": "urword", + "type": "integer", + }, + "xc": { + "block": "cell2d", + "description": "is the x-coordinate for the cell center.", + "longname": "x-coordinate for cell center", + "name": "xc", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + "yc": { + "block": "cell2d", + "description": "is the y-coordinate for the cell center.", + "longname": "y-coordinate for cell center", + "name": "yc", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + }, + "longname": "cell2d data", + "name": "cell2d", + "optional": False, + "reader": "urword", + "type": "record", + }, + "longname": "cell2d data", + "name": "cell2d", + "optional": False, + "reader": "urword", + "shape": "(ncpl)", + "type": "recarray", + } + }, + "dimensions": { + "ncpl": { + "block": "dimensions", + "description": "is the number of cells per layer. this is a constant value for the grid and it applies to all layers.", + "longname": "number of cells per layer", + "name": "ncpl", + "optional": False, + "reader": "urword", + "type": "integer", + }, + "nlay": { + "block": "dimensions", + "description": "is the number of layers in the model grid.", + "longname": "number of layers", + "name": "nlay", + "optional": False, + "reader": "urword", + "type": "integer", + }, + "nvert": { + "block": "dimensions", + "description": "is the total number of (x, y) vertex pairs used to characterize the horizontal configuration of the model grid.", + "longname": "number of columns", + "name": "nvert", + "optional": False, + "reader": "urword", + "type": "integer", + }, + }, + "fkeys": { + "ncf_filerecord": { + "abbr": "ncf", + "key": "ncf_filerecord", + "param": "packagedata", + "parent": "parent_package", + "val": "packagedata", + } + }, + "griddata": { + "botm": { + "block": "griddata", + "description": "is the bottom elevation for each cell.", + "layered": True, + "longname": "model bottom elevation", + "name": "botm", + "netcdf": True, + "reader": "readarray", + "shape": "(ncpl, nlay)", + "type": "double precision", + }, + "idomain": { + "block": "griddata", + "description": "is an optional array that characterizes the existence status of a cell. if the idomain array is not specified, then all model cells exist within the solution. if the idomain value for a cell is 0, the cell does not exist in the simulation. input and output values will be read and written for the cell, but internal to the program, the cell is excluded from the solution. if the idomain value for a cell is 1 or greater, the cell exists in the simulation. if the idomain value for a cell is -1, the cell does not exist in the simulation. furthermore, the first existing cell above will be connected to the first existing cell below. this type of cell is referred to as a 'vertical pass through' cell.", + "layered": True, + "longname": "idomain existence array", + "name": "idomain", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(ncpl, nlay)", + "type": "integer", + }, + "top": { + "block": "griddata", + "description": "is the top elevation for each cell in the top model layer.", + "longname": "model top elevation", + "name": "top", + "netcdf": True, + "reader": "readarray", + "shape": "(ncpl)", + "type": "double precision", + }, + }, + "multi": False, + "name": "gwf-disv", + "options": { + "angrot": { + "block": "options", + "description": "counter-clockwise rotation angle (in degrees) of the model grid coordinate system relative to a real-world coordinate system. if not specified, then a default value of 0.0 is assigned. the value for angrot does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", + "longname": "rotation angle", + "name": "angrot", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "crs": { + "block": "options", + "description": "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.", + "developmode": True, + "longname": "crs user input string", + "name": "crs", + "optional": True, + "reader": "urword", + "shape": "lenbigline", + "type": "string", + }, + "export_array_ascii": { + "block": "options", + "description": "keyword that specifies input griddata arrays should be written to layered ascii output files.", + "longname": "export array variables to layered ascii files.", + "mf6internal": "export_ascii", + "name": "export_array_ascii", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "export_array_netcdf": { + "block": "options", + "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", + "extended": True, + "longname": "export array variables to netcdf output files.", + "mf6internal": "export_nc", + "name": "export_array_netcdf", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "grb_filerecord": { + "block": "options", + "fields": { + "grb6_filename": { + "block": "options", + "description": "defines a binary grid output file. If this option is not provided, the output file will have the same name as the discretization input file, plus extension '.grb'.", + "longname": "file name of GRB information", + "name": "grb6_filename", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "grb_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "length_units": { + "block": "options", + "description": "is the length units used for this model. values can be 'feet', 'meters', or 'centimeters'. if not specified, the default is 'unknown'.", + "longname": "model length units", + "name": "length_units", + "optional": True, + "reader": "urword", + "type": "string", + }, + "nogrb": { + "block": "options", + "description": "keyword to deactivate writing of the binary grid file.", + "longname": "do not write binary grid file", + "name": "nogrb", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "packagedata": { + "block": "options", + "description": "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 the packagedata variable is also acceptable. See ncf package documentation for more information.", + "name": "packagedata", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "ncf", + "key": "ncf_filerecord", + "param": "packagedata", + "parent": "parent_package", + "val": "packagedata", + }, + "type": "record ncf6 filein ncf6_filename", + }, + "xorigin": { + "block": "options", + "description": "x-position of the origin used for model grid vertices. this value should be provided in a real-world coordinate system. a default value of zero is assigned if not specified. the value for xorigin does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", + "longname": "x-position origin of the model grid coordinate system", + "name": "xorigin", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "yorigin": { + "block": "options", + "description": "y-position of the origin used for model grid vertices. this value should be provided in a real-world coordinate system. if not specified, then a default value equal to zero is used. the value for yorigin does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", + "longname": "y-position origin of the model grid coordinate system", + "name": "yorigin", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + }, + "vertices": { + "vertices": { + "block": "vertices", + "item": { + "block": "vertices", + "fields": { + "iv": { + "block": "vertices", + "description": "is the vertex number. Records in the VERTICES block must be listed in consecutive order from 1 to NVERT.", + "longname": "vertex number", + "name": "iv", + "numeric_index": "true", + "optional": "false", + "reader": "urword", + "type": "integer", + }, + "xv": { + "block": "vertices", + "description": "is the x-coordinate for the vertex.", + "longname": "x-coordinate for vertex", + "name": "xv", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + "yv": { + "block": "vertices", + "description": "is the y-coordinate for the vertex.", + "longname": "y-coordinate for vertex", + "name": "yv", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + }, + "longname": "vertices data", + "name": "vertices", + "optional": False, + "reader": "urword", + "type": "record", + }, + "longname": "vertices data", + "name": "vertices", + "optional": False, + "reader": "urword", + "shape": "(nvert)", + "type": "recarray", + } + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwfdrn.py b/flopy/mf6/modflow/mfgwfdrn.py index 7653a4fb75..285360fc44 100644 --- a/flopy/mf6/modflow/mfgwfdrn.py +++ b/flopy/mf6/modflow/mfgwfdrn.py @@ -354,6 +354,224 @@ class ModflowGwfdrn(MFPackage): "optional true", ], ] + spec = { + "advanced": False, + "dimensions": { + "maxbound": { + "block": "dimensions", + "description": "integer value specifying the maximum number of drains cells that will be specified for use during any stress period.", + "longname": "maximum number of drains", + "name": "maxbound", + "optional": False, + "reader": "urword", + "type": "integer", + } + }, + "fkeys": { + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "ts_filerecord": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + }, + "multi": True, + "name": "gwf-drn", + "options": { + "auxdepthname": { + "block": "options", + "description": "name of a variable listed in auxiliary that defines the depth at which drainage discharge will be scaled. if a positive value is specified for the auxdepthname auxiliary variable, then elev is the elevation at which the drain starts to discharge and elev + ddrn (assuming ddrn is the auxdepthname variable) is the elevation when the drain conductance (cond) scaling factor is 1. if a negative drainage depth value is specified for ddrn, then elev + ddrn is the elevation at which the drain starts to discharge and elev is the elevation when the conductance (cond) scaling factor is 1. a linear- or cubic-scaling is used to scale the drain conductance (cond) when the standard or newton-raphson formulation is used, respectively. this discharge scaling option is described in more detail in chapter 3 of the supplemental technical information.", + "longname": "name of auxiliary variable for drainage depth", + "name": "auxdepthname", + "optional": True, + "reader": "urword", + "type": "string", + }, + "auxiliary": { + "block": "options", + "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", + "longname": "keyword to specify aux variables", + "name": "auxiliary", + "optional": True, + "reader": "urword", + "shape": "(naux)", + "type": "string", + }, + "auxmultname": { + "block": "options", + "description": "name of auxiliary variable to be used as multiplier of drain conductance.", + "longname": "name of auxiliary variable for multiplier", + "name": "auxmultname", + "optional": True, + "reader": "urword", + "type": "string", + }, + "boundnames": { + "block": "options", + "description": "keyword to indicate that boundary names may be provided with the list of drain cells.", + "name": "boundnames", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "dev_cubic_scaling": { + "block": "options", + "description": "cubic-scaling is used to scale the drain conductance", + "longname": "cubic-scaling", + "mf6internal": "icubicsfac", + "name": "dev_cubic_scaling", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "mover": { + "block": "options", + "description": "keyword to indicate that this instance of the drain package can be used with the water mover (mvr) package. when the mover option is specified, additional memory is allocated within the package to store the available, provided, and received water.", + "name": "mover", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of drain 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.", + "longname": "print calculated flows to listing file", + "mf6internal": "iprflow", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of drain information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "mf6internal": "iprpak", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that drain flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save chd flows to budget file", + "mf6internal": "ipakcb", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "timeseries": { + "block": "options", + "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", + "name": "timeseries", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + "type": "record ts6 filein ts6_filename", + }, + }, + "period": { + "stress_period_data": { + "block": "period", + "item": { + "block": "period", + "fields": { + "aux": { + "block": "period", + "description": "represents the values of the auxiliary variables for each drain. The values of auxiliary variables must be present for each drain. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "auxiliary variables", + "mf6internal": "auxvar", + "name": "aux", + "optional": "true", + "reader": "urword", + "shape": "(naux)", + "time_series": "true", + "type": "double precision", + }, + "boundname": { + "block": "period", + "description": "name of the drain cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", + "longname": "drain name", + "name": "boundname", + "optional": "true", + "reader": "urword", + "type": "string", + }, + "cellid": { + "block": "period", + "description": "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 layer, row, and column. For a grid that uses the DISV input file, CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file, CELLID is the node number for the cell.", + "longname": "cell identifier", + "name": "cellid", + "reader": "urword", + "shape": "(ncelldim)", + "type": "integer", + }, + "cond": { + "block": "period", + "description": "is the hydraulic conductance of the interface between the aquifer and the drain. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "drain conductance", + "name": "cond", + "reader": "urword", + "time_series": "true", + "type": "double precision", + }, + "elev": { + "block": "period", + "description": "is the elevation of the drain. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "drain elevation", + "name": "elev", + "reader": "urword", + "time_series": "true", + "type": "double precision", + }, + }, + "mf6internal": "spd", + "name": "stress_period_data", + "reader": "urword", + "type": "record", + }, + "mf6internal": "spd", + "name": "stress_period_data", + "reader": "urword", + "shape": "(maxbound)", + "type": "recarray", + }, + "transient_block": True, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwfdrng.py b/flopy/mf6/modflow/mfgwfdrng.py new file mode 100644 index 0000000000..3845040e92 --- /dev/null +++ b/flopy/mf6/modflow/mfgwfdrng.py @@ -0,0 +1,523 @@ +# 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 ModflowGwfdrng(MFPackage): + """ + ModflowGwfdrng defines a DRNG package. + + Parameters + ---------- + model + Model that this package is a part of. Package is automatically + added to model when it is initialized. + loading_package : bool, default False + Do not set this parameter. It is intended for debugging and internal + processing purposes only. + auxiliary : [string] + defines an array of one or more auxiliary variable names. there is no limit on + the number of auxiliary variables that can be provided on this line; however, + lists of information provided in subsequent blocks must have a column of data + for each auxiliary variable name defined here. the number of auxiliary + variables detected on this line determines the value for naux. comments cannot + be provided anywhere on this line as they will be interpreted as auxiliary + variable names. auxiliary variables may not be used by the package, but they + will be available for use by other parts of the program. the program will + terminate with an error if auxiliary variables are specified on more than one + line in the options block. + auxmultname : string + name of auxiliary variable to be used as multiplier of drain conductance. + auxdepthname : string + name of a variable listed in auxiliary that defines the depth at which drainage + discharge will be scaled. if a positive value is specified for the auxdepthname + auxiliary variable, then elev is the elevation at which the drain starts to + discharge and elev + ddrn (assuming ddrn is the auxdepthname variable) is the + elevation when the drain conductance (cond) scaling factor is 1. if a negative + drainage depth value is specified for ddrn, then elev + ddrn is the elevation + at which the drain starts to discharge and elev is the elevation when the + conductance (cond) scaling factor is 1. a linear- or cubic-scaling is used to + scale the drain conductance (cond) when the standard or newton-raphson + formulation is used, respectively. this discharge scaling option is described + in more detail in chapter 3 of the supplemental technical information. + print_input : keyword + keyword to indicate that the list of drain information will be written to the + listing file immediately after it is read. + print_flows : keyword + keyword to indicate that the list of drain 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 drain flow terms will be written to the file specified + with 'budget fileout' in output control. + observations : record obs6 filein obs6_filename + Contains data for the obs package. Data can be passed as a dictionary to the + obs package with variable names as keys and package data as values. Data for + the observations variable is also acceptable. See obs package documentation for + more information. + mover : keyword + keyword to indicate that this instance of the drain package can be used with + the water mover (mvr) package. when the mover option is specified, additional + memory is allocated within the package to store the available, provided, and + received water. + export_array_netcdf : keyword + keyword that specifies input gridded arrays should be written to the model + output netcdf file with attributes that support using the generated file as a + 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. + dev_cubic_scaling : keyword + cubic-scaling is used to scale the drain conductance + maxbound : integer + integer value specifying the maximum number of drains cells that will be + specified for use during any stress period. + elev : [double precision] + is the elevation of the drain. + cond : [double precision] + is the hydraulic conductance of the interface between the aquifer and the + drain. + 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. + + 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`. + + """ + + auxiliary = ArrayTemplateGenerator(("gwf6", "drng", "options", "auxiliary")) + obs_filerecord = ListTemplateGenerator( + ("gwf6", "drng", "options", "obs_filerecord") + ) + elev = ArrayTemplateGenerator(("gwf6", "drng", "period", "elev")) + cond = ArrayTemplateGenerator(("gwf6", "drng", "period", "cond")) + aux = ArrayTemplateGenerator(("gwf6", "drng", "period", "aux")) + package_abbr = "gwfdrng" + _package_type = "drng" + dfn_file_name = "gwf-drng.dfn" + dfn = [ + ["header", "multi-package", "package-type stress-package"], + [ + "block options", + "name readarraygrid", + "type keyword", + "reader urword", + "optional false", + "developmode true", + "default true", + ], + [ + "block options", + "name auxiliary", + "type string", + "shape (naux)", + "reader urword", + "optional true", + ], + [ + "block options", + "name auxmultname", + "type string", + "shape", + "reader urword", + "optional true", + ], + [ + "block options", + "name auxdepthname", + "type string", + "shape", + "reader urword", + "optional true", + ], + [ + "block options", + "name print_input", + "type keyword", + "reader urword", + "optional true", + "mf6internal iprpak", + ], + [ + "block options", + "name print_flows", + "type keyword", + "reader urword", + "optional true", + "mf6internal iprflow", + ], + [ + "block options", + "name save_flows", + "type keyword", + "reader urword", + "optional true", + "mf6internal ipakcb", + ], + [ + "block options", + "name obs_filerecord", + "type record obs6 filein obs6_filename", + "shape", + "reader urword", + "tagged true", + "optional true", + "construct_package obs", + "construct_data observations", + "parameter_name continuous", + ], + [ + "block options", + "name obs6", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name filein", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name obs6_filename", + "type string", + "preserve_case true", + "in_record true", + "tagged false", + "reader urword", + "optional false", + ], + [ + "block options", + "name mover", + "type keyword", + "tagged true", + "reader urword", + "optional true", + ], + [ + "block options", + "name export_array_netcdf", + "type keyword", + "reader urword", + "optional true", + "mf6internal export_nc", + "extended true", + ], + [ + "block options", + "name dev_cubic_scaling", + "type keyword", + "reader urword", + "optional true", + "mf6internal icubicsfac", + ], + [ + "block dimensions", + "name maxbound", + "type integer", + "reader urword", + "optional true", + ], + [ + "block period", + "name iper", + "type integer", + "block_variable true", + "in_record true", + "tagged false", + "shape", + "valid", + "reader urword", + "optional false", + ], + [ + "block period", + "name elev", + "type double precision", + "shape (nodes)", + "reader readarray", + "layered true", + "netcdf true", + "default 3.e30", + ], + [ + "block period", + "name cond", + "type double precision", + "shape (nodes)", + "reader readarray", + "layered true", + "netcdf true", + "default 3.e30", + ], + [ + "block period", + "name aux", + "type double precision", + "shape (nodes)", + "reader readarray", + "layered true", + "netcdf true", + "optional true", + "mf6internal auxvar", + ], + ] + spec = { + "advanced": False, + "dimensions": { + "maxbound": { + "block": "dimensions", + "description": "integer value specifying the maximum number of drains cells that will be specified for use during any stress period.", + "longname": "maximum number of drain cells in any stress period", + "name": "maxbound", + "optional": True, + "reader": "urword", + "type": "integer", + } + }, + "fkeys": { + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + } + }, + "multi": True, + "name": "gwf-drng", + "options": { + "auxdepthname": { + "block": "options", + "description": "name of a variable listed in auxiliary that defines the depth at which drainage discharge will be scaled. if a positive value is specified for the auxdepthname auxiliary variable, then elev is the elevation at which the drain starts to discharge and elev + ddrn (assuming ddrn is the auxdepthname variable) is the elevation when the drain conductance (cond) scaling factor is 1. if a negative drainage depth value is specified for ddrn, then elev + ddrn is the elevation at which the drain starts to discharge and elev is the elevation when the conductance (cond) scaling factor is 1. a linear- or cubic-scaling is used to scale the drain conductance (cond) when the standard or newton-raphson formulation is used, respectively. this discharge scaling option is described in more detail in chapter 3 of the supplemental technical information.", + "longname": "name of auxiliary variable for drainage depth", + "name": "auxdepthname", + "optional": True, + "reader": "urword", + "type": "string", + }, + "auxiliary": { + "block": "options", + "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", + "longname": "keyword to specify aux variables", + "name": "auxiliary", + "optional": True, + "reader": "urword", + "shape": "(naux)", + "type": "string", + }, + "auxmultname": { + "block": "options", + "description": "name of auxiliary variable to be used as multiplier of drain conductance.", + "longname": "name of auxiliary variable for multiplier", + "name": "auxmultname", + "optional": True, + "reader": "urword", + "type": "string", + }, + "dev_cubic_scaling": { + "block": "options", + "description": "cubic-scaling is used to scale the drain conductance", + "longname": "cubic-scaling", + "mf6internal": "icubicsfac", + "name": "dev_cubic_scaling", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "export_array_netcdf": { + "block": "options", + "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", + "extended": True, + "longname": "export array variables to netcdf output files.", + "mf6internal": "export_nc", + "name": "export_array_netcdf", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "mover": { + "block": "options", + "description": "keyword to indicate that this instance of the drain package can be used with the water mover (mvr) package. when the mover option is specified, additional memory is allocated within the package to store the available, provided, and received water.", + "name": "mover", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of drain 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.", + "longname": "print calculated flows to listing file", + "mf6internal": "iprflow", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of drain information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "mf6internal": "iprpak", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "readarraygrid": { + "block": "options", + "default": True, + "description": "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).", + "developmode": True, + "longname": "use array-based grid input", + "name": "readarraygrid", + "optional": False, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that drain flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save drng flows to budget file", + "mf6internal": "ipakcb", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + "period": { + "aux": { + "block": "period", + "description": "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.", + "layered": True, + "longname": "drain auxiliary variable iaux", + "mf6internal": "auxvar", + "name": "aux", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "cond": { + "block": "period", + "default": 3e30, + "description": "is the hydraulic conductance of the interface between the aquifer and the drain.", + "layered": True, + "longname": "drain conductance", + "name": "cond", + "netcdf": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "elev": { + "block": "period", + "default": 3e30, + "description": "is the elevation of the drain.", + "layered": True, + "longname": "drain elevation", + "name": "elev", + "netcdf": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "transient_block": True, + }, + } + + def __init__( + self, + model, + loading_package=False, + auxiliary=None, + auxmultname=None, + auxdepthname=None, + print_input=None, + print_flows=None, + save_flows=None, + observations=None, + mover=None, + export_array_netcdf=None, + dev_cubic_scaling=None, + maxbound=None, + elev=3e30, + cond=3e30, + aux=None, + filename=None, + pname=None, + **kwargs, + ): + """Initialize ModflowGwfdrng.""" + super().__init__( + parent=model, + package_type="drng", + filename=filename, + pname=pname, + loading_package=loading_package, + **kwargs, + ) + + self.auxiliary = self.build_mfdata("auxiliary", auxiliary) + self.auxmultname = self.build_mfdata("auxmultname", auxmultname) + self.auxdepthname = self.build_mfdata("auxdepthname", auxdepthname) + 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._obs_filerecord = self.build_mfdata("obs_filerecord", None) + self._obs_package = self.build_child_package( + "obs", observations, "continuous", self._obs_filerecord + ) + self.mover = self.build_mfdata("mover", mover) + self.export_array_netcdf = self.build_mfdata( + "export_array_netcdf", export_array_netcdf + ) + self.dev_cubic_scaling = self.build_mfdata( + "dev_cubic_scaling", dev_cubic_scaling + ) + self.maxbound = self.build_mfdata("maxbound", maxbound) + self.elev = self.build_mfdata("elev", elev) + self.cond = self.build_mfdata("cond", cond) + self.aux = self.build_mfdata("aux", aux) + + self._init_complete = True diff --git a/flopy/mf6/modflow/mfgwfevt.py b/flopy/mf6/modflow/mfgwfevt.py index 3fc1e7fbbf..e1cc101c24 100644 --- a/flopy/mf6/modflow/mfgwfevt.py +++ b/flopy/mf6/modflow/mfgwfevt.py @@ -64,8 +64,8 @@ class ModflowGwfevt(MFPackage): indicates that the proportion of the evapotranspiration rate at the et surface will be specified as petm0 in list input. maxbound : integer - integer value specifying the maximum number of evapotranspiration cells cells - that will be specified for use during any stress period. + integer value specifying the maximum number of evapotranspiration cells that + will be specified for use during any stress period. nseg : integer number of et segments. default is one. when nseg is greater than 1, the pxdp and petm arrays must be of size nseg - 1 and be listed in order from the @@ -416,6 +416,266 @@ class ModflowGwfevt(MFPackage): "optional true", ], ] + spec = { + "advanced": False, + "dimensions": { + "maxbound": { + "block": "dimensions", + "description": "integer value specifying the maximum number of evapotranspiration cells that will be specified for use during any stress period.", + "longname": "maximum number of evapotranspiration cells", + "name": "maxbound", + "optional": False, + "reader": "urword", + "type": "integer", + }, + "nseg": { + "block": "dimensions", + "description": "number of et segments. default is one. when nseg is greater than 1, the pxdp and petm arrays must be of size nseg - 1 and be listed in order from the uppermost segment down. values for pxdp must be listed first followed by the values for petm. pxdp defines the extinction-depth proportion at the bottom of a segment. petm defines the proportion of the maximum et flux rate at the bottom of a segment.", + "longname": "number of et segments", + "name": "nseg", + "optional": False, + "reader": "urword", + "type": "integer", + }, + }, + "fkeys": { + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "ts_filerecord": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + }, + "multi": True, + "name": "gwf-evt", + "options": { + "auxiliary": { + "block": "options", + "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", + "longname": "keyword to specify aux variables", + "name": "auxiliary", + "optional": True, + "reader": "urword", + "shape": "(naux)", + "type": "string", + }, + "auxmultname": { + "block": "options", + "description": "name of auxiliary variable to be used as multiplier of evapotranspiration rate.", + "longname": "name of auxiliary variable for multiplier", + "name": "auxmultname", + "optional": True, + "reader": "urword", + "type": "string", + }, + "boundnames": { + "block": "options", + "description": "keyword to indicate that boundary names may be provided with the list of evapotranspiration cells.", + "name": "boundnames", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "fixed_cell": { + "block": "options", + "description": "indicates that evapotranspiration will not be reassigned to a cell underlying the cell specified in the list if the specified cell is inactive.", + "longname": "if cell is dry do not apply evapotranspiration to underlying cell", + "name": "fixed_cell", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of evapotranspiration 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.", + "longname": "print evapotranspiration rates to listing file", + "mf6internal": "iprflow", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of evapotranspiration information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "mf6internal": "iprpak", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that evapotranspiration flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save evapotranspiration rates to budget file", + "mf6internal": "ipakcb", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "surf_rate_specified": { + "block": "options", + "description": "indicates that the proportion of the evapotranspiration rate at the et surface will be specified as petm0 in list input.", + "longname": "specify proportion of evapotranspiration rate at et surface", + "mf6internal": "surfratespec", + "name": "surf_rate_specified", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "timeseries": { + "block": "options", + "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", + "name": "timeseries", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + "type": "record ts6 filein ts6_filename", + }, + }, + "period": { + "stress_period_data": { + "block": "period", + "item": { + "block": "period", + "fields": { + "aux": { + "block": "period", + "description": "represents the values of the auxiliary variables for each evapotranspiration. The values of auxiliary variables must be present for each evapotranspiration. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "auxiliary variables", + "mf6internal": "auxvar", + "name": "aux", + "optional": "true", + "reader": "urword", + "shape": "(naux)", + "time_series": "true", + "type": "double precision", + }, + "boundname": { + "block": "period", + "description": "name of the evapotranspiration cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", + "longname": "evapotranspiration name", + "name": "boundname", + "optional": "true", + "reader": "urword", + "type": "string", + }, + "cellid": { + "block": "period", + "description": "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 layer, row, and column. For a grid that uses the DISV input file, CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file, CELLID is the node number for the cell.", + "longname": "cell identifier", + "name": "cellid", + "reader": "urword", + "shape": "(ncelldim)", + "type": "integer", + }, + "depth": { + "block": "period", + "description": "is the ET extinction depth ($L$). If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "ET extinction depth", + "name": "depth", + "reader": "urword", + "time_series": "true", + "type": "double precision", + }, + "petm": { + "block": "period", + "description": "is the proportion of the maximum ET flux rate at the bottom of a segment (dimensionless). petm is an array of size (nseg - 1). If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "proportion of maximum ET rate", + "name": "petm", + "optional": "true", + "reader": "urword", + "shape": "(nseg-1)", + "time_series": "true", + "type": "double precision", + }, + "petm0": { + "block": "period", + "description": "is the proportion of the maximum ET flux rate that will apply when head is at or above the ET surface (dimensionless). PETM0 is read only when the SURF_RATE_SPECIFIED option is used. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "proportion of maximum ET rate at ET surface", + "name": "petm0", + "optional": "true", + "reader": "urword", + "time_series": "true", + "type": "double precision", + }, + "pxdp": { + "block": "period", + "description": "is the proportion of the ET extinction depth at the bottom of a segment (dimensionless). pxdp is an array of size (nseg - 1). Values in pxdp must be greater than 0.0 and less than 1.0. pxdp values for a cell must increase monotonically. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "proportion of ET extinction depth", + "name": "pxdp", + "optional": "true", + "reader": "urword", + "shape": "(nseg-1)", + "time_series": "true", + "type": "double precision", + }, + "rate": { + "block": "period", + "description": "is the maximum ET flux rate ($LT^{-1}$). If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "maximum ET rate", + "name": "rate", + "reader": "urword", + "time_series": "true", + "type": "double precision", + }, + "surface": { + "block": "period", + "description": "is the elevation of the ET surface ($L$). If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "ET surface", + "name": "surface", + "reader": "urword", + "time_series": "true", + "type": "double precision", + }, + }, + "mf6internal": "spd", + "name": "stress_period_data", + "reader": "urword", + "type": "record", + }, + "mf6internal": "spd", + "name": "stress_period_data", + "reader": "urword", + "shape": "(maxbound)", + "type": "recarray", + }, + "transient_block": True, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwfevta.py b/flopy/mf6/modflow/mfgwfevta.py index 21668f696a..1040b182db 100644 --- a/flopy/mf6/modflow/mfgwfevta.py +++ b/flopy/mf6/modflow/mfgwfevta.py @@ -65,8 +65,11 @@ class ModflowGwfevta(MFPackage): the observations variable is also acceptable. See obs package documentation for more information. export_array_netcdf : keyword - keyword that specifies input griddata arrays should be written to the model - output netcdf file. + keyword that specifies input gridded arrays should be written to the model + output netcdf file with attributes that support using the generated file as a + 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. ievt : [integer] ievt is the layer number that defines the layer in each vertical column where evapotranspiration is applied. if ievt is omitted, evapotranspiration by @@ -274,6 +277,7 @@ class ModflowGwfevta(MFPackage): "reader readarray", "numeric_index true", "optional true", + "netcdf true", ], [ "block period", @@ -281,6 +285,7 @@ class ModflowGwfevta(MFPackage): "type double precision", "shape (ncol*nrow; ncpl)", "reader readarray", + "netcdf true", "default 0.", ], [ @@ -290,6 +295,7 @@ class ModflowGwfevta(MFPackage): "shape (ncol*nrow; ncpl)", "reader readarray", "time_series true", + "netcdf true", "default 1.e-3", ], [ @@ -298,6 +304,7 @@ class ModflowGwfevta(MFPackage): "type double precision", "shape (ncol*nrow; ncpl)", "reader readarray", + "netcdf true", "default 1.0", ], [ @@ -307,9 +314,203 @@ class ModflowGwfevta(MFPackage): "shape (ncol*nrow; ncpl)", "reader readarray", "time_series true", + "netcdf true", "mf6internal auxvar", ], ] + spec = { + "advanced": False, + "fkeys": { + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "tas_filerecord": { + "abbr": "tas", + "key": "tas_filerecord", + "param": "tas_array", + "parent": "parent_package", + "val": "timearrayseries", + }, + }, + "multi": True, + "name": "gwf-evta", + "options": { + "auxiliary": { + "block": "options", + "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", + "longname": "keyword to specify aux variables", + "name": "auxiliary", + "optional": True, + "reader": "urword", + "shape": "(naux)", + "type": "string", + }, + "auxmultname": { + "block": "options", + "description": "name of auxiliary variable to be used as multiplier of evapotranspiration rate.", + "longname": "name of auxiliary variable for multiplier", + "name": "auxmultname", + "optional": True, + "reader": "urword", + "type": "string", + }, + "export_array_netcdf": { + "block": "options", + "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", + "extended": True, + "longname": "export array variables to netcdf output files.", + "mf6internal": "export_nc", + "name": "export_array_netcdf", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "fixed_cell": { + "block": "options", + "description": "indicates that evapotranspiration will not be reassigned to a cell underlying the cell specified in the list if the specified cell is inactive.", + "longname": "if cell is dry do not apply evapotranspiration to underlying cell", + "name": "fixed_cell", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of evapotranspiration 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.", + "longname": "print evapotranspiration rates to listing file", + "mf6internal": "iprflow", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of evapotranspiration information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "mf6internal": "iprpak", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "readasarrays": { + "block": "options", + "default": True, + "description": "indicates that array-based input will be used for the evapotranspiration package. this keyword must be specified to use array-based input. when readasarrays is specified, values must be provided for every cell within a model layer, 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.", + "longname": "use array-based input", + "name": "readasarrays", + "optional": False, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that evapotranspiration flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save chd flows to budget file", + "mf6internal": "ipakcb", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "timearrayseries": { + "block": "options", + "description": "Contains data for the tas package. Data can be passed as a dictionary to the tas package with variable names as keys and package data as values. Data for the timearrayseries variable is also acceptable. See tas package documentation for more information.", + "name": "timearrayseries", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "tas", + "key": "tas_filerecord", + "param": "tas_array", + "parent": "parent_package", + "val": "timearrayseries", + }, + "type": "record tas6 filein tas6_filename", + }, + }, + "period": { + "aux": { + "block": "period", + "description": "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.", + "longname": "evapotranspiration auxiliary variable iaux", + "mf6internal": "auxvar", + "name": "aux", + "netcdf": True, + "reader": "readarray", + "shape": "(ncol*nrow; ncpl)", + "time_series": True, + "type": "double precision", + }, + "depth": { + "block": "period", + "default": 1.0, + "description": "is the et extinction depth ($l$).", + "longname": "extinction depth", + "name": "depth", + "netcdf": True, + "reader": "readarray", + "shape": "(ncol*nrow; ncpl)", + "type": "double precision", + }, + "ievt": { + "block": "period", + "description": "ievt is the layer number that defines the layer in each vertical column where evapotranspiration is applied. if ievt is omitted, evapotranspiration by default is applied to cells in layer 1. if ievt is specified, it must be specified as the first variable in the period block or modflow will terminate with an error.", + "longname": "layer number for evapotranspiration", + "name": "ievt", + "netcdf": True, + "numeric_index": True, + "optional": True, + "reader": "readarray", + "shape": "(ncol*nrow; ncpl)", + "type": "integer", + }, + "rate": { + "block": "period", + "default": 0.001, + "description": "is the maximum et flux rate ($lt^{-1}$).", + "longname": "evapotranspiration surface", + "name": "rate", + "netcdf": True, + "reader": "readarray", + "shape": "(ncol*nrow; ncpl)", + "time_series": True, + "type": "double precision", + }, + "surface": { + "block": "period", + "default": 0.0, + "description": "is the elevation of the et surface ($l$).", + "longname": "evapotranspiration surface", + "name": "surface", + "netcdf": True, + "reader": "readarray", + "shape": "(ncol*nrow; ncpl)", + "type": "double precision", + }, + "transient_block": True, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwfghb.py b/flopy/mf6/modflow/mfgwfghb.py index 418b42edc2..08c77acf76 100644 --- a/flopy/mf6/modflow/mfgwfghb.py +++ b/flopy/mf6/modflow/mfgwfghb.py @@ -325,6 +325,205 @@ class ModflowGwfghb(MFPackage): "optional true", ], ] + spec = { + "advanced": False, + "dimensions": { + "maxbound": { + "block": "dimensions", + "description": "integer value specifying the maximum number of general-head boundary cells that will be specified for use during any stress period.", + "longname": "maximum number of general-head boundaries", + "name": "maxbound", + "optional": False, + "reader": "urword", + "type": "integer", + } + }, + "fkeys": { + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "ts_filerecord": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + }, + "multi": True, + "name": "gwf-ghb", + "options": { + "auxiliary": { + "block": "options", + "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", + "longname": "keyword to specify aux variables", + "name": "auxiliary", + "optional": True, + "reader": "urword", + "shape": "(naux)", + "type": "string", + }, + "auxmultname": { + "block": "options", + "description": "name of auxiliary variable to be used as multiplier of general-head boundary conductance.", + "longname": "name of auxiliary variable for multiplier", + "name": "auxmultname", + "optional": True, + "reader": "urword", + "type": "string", + }, + "boundnames": { + "block": "options", + "description": "keyword to indicate that boundary names may be provided with the list of general-head boundary cells.", + "name": "boundnames", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "mover": { + "block": "options", + "description": "keyword to indicate that this instance of the general-head boundary package can be used with the water mover (mvr) package. when the mover option is specified, additional memory is allocated within the package to store the available, provided, and received water.", + "name": "mover", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of general-head boundary 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.", + "longname": "print calculated flows to listing file", + "mf6internal": "iprflow", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of general-head boundary information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "mf6internal": "iprpak", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that general-head boundary flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save chd flows to budget file", + "mf6internal": "ipakcb", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "timeseries": { + "block": "options", + "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", + "name": "timeseries", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + "type": "record ts6 filein ts6_filename", + }, + }, + "period": { + "stress_period_data": { + "block": "period", + "item": { + "block": "period", + "fields": { + "aux": { + "block": "period", + "description": "represents the values of the auxiliary variables for each general-head boundary. The values of auxiliary variables must be present for each general-head boundary. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "auxiliary variables", + "mf6internal": "auxvar", + "name": "aux", + "optional": "true", + "reader": "urword", + "shape": "(naux)", + "time_series": "true", + "type": "double precision", + }, + "bhead": { + "block": "period", + "description": "is the boundary head. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "boundary head", + "name": "bhead", + "reader": "urword", + "time_series": "true", + "type": "double precision", + }, + "boundname": { + "block": "period", + "description": "name of the general-head boundary cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", + "longname": "general-head boundary name", + "name": "boundname", + "optional": "true", + "reader": "urword", + "type": "string", + }, + "cellid": { + "block": "period", + "description": "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 layer, row, and column. For a grid that uses the DISV input file, CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file, CELLID is the node number for the cell.", + "longname": "cell identifier", + "name": "cellid", + "reader": "urword", + "shape": "(ncelldim)", + "type": "integer", + }, + "cond": { + "block": "period", + "description": "is the hydraulic conductance of the interface between the aquifer cell and the boundary. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "boundary conductance", + "name": "cond", + "reader": "urword", + "time_series": "true", + "type": "double precision", + }, + }, + "mf6internal": "spd", + "name": "stress_period_data", + "reader": "urword", + "type": "record", + }, + "mf6internal": "spd", + "name": "stress_period_data", + "reader": "urword", + "shape": "(maxbound)", + "type": "recarray", + }, + "transient_block": True, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwfghbg.py b/flopy/mf6/modflow/mfgwfghbg.py new file mode 100644 index 0000000000..43417ab8d7 --- /dev/null +++ b/flopy/mf6/modflow/mfgwfghbg.py @@ -0,0 +1,469 @@ +# 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 ModflowGwfghbg(MFPackage): + """ + ModflowGwfghbg defines a GHBG package. + + Parameters + ---------- + model + Model that this package is a part of. Package is automatically + added to model when it is initialized. + loading_package : bool, default False + Do not set this parameter. It is intended for debugging and internal + processing purposes only. + auxiliary : [string] + defines an array of one or more auxiliary variable names. there is no limit on + the number of auxiliary variables that can be provided on this line; however, + lists of information provided in subsequent blocks must have a column of data + for each auxiliary variable name defined here. the number of auxiliary + variables detected on this line determines the value for naux. comments cannot + be provided anywhere on this line as they will be interpreted as auxiliary + variable names. auxiliary variables may not be used by the package, but they + will be available for use by other parts of the program. the program will + terminate with an error if auxiliary variables are specified on more than one + line in the options block. + auxmultname : string + name of auxiliary variable to be used as multiplier of general-head boundary + conductance. + print_input : keyword + keyword to indicate that the list of general-head boundary information will be + written to the listing file immediately after it is read. + print_flows : keyword + keyword to indicate that the list of general-head boundary 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 general-head boundary flow terms will be written to + the file specified with 'budget fileout' in output control. + observations : record obs6 filein obs6_filename + Contains data for the obs package. Data can be passed as a dictionary to the + obs package with variable names as keys and package data as values. Data for + the observations variable is also acceptable. See obs package documentation for + more information. + mover : keyword + keyword to indicate that this instance of the general-head boundary package can + be used with the water mover (mvr) package. when the mover option is + specified, additional memory is allocated within the package to store the + available, provided, and received water. + export_array_netcdf : keyword + keyword that specifies input gridded arrays should be written to the model + output netcdf file with attributes that support using the generated file as a + 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. + maxbound : integer + integer value specifying the maximum number of general-head boundary cells that + will be specified for use during any stress period. + bhead : [double precision] + is the boundary head. + cond : [double precision] + is the hydraulic conductance of the interface between the aquifer cell and the + boundary. + 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. + + 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`. + + """ + + auxiliary = ArrayTemplateGenerator(("gwf6", "ghbg", "options", "auxiliary")) + obs_filerecord = ListTemplateGenerator( + ("gwf6", "ghbg", "options", "obs_filerecord") + ) + bhead = ArrayTemplateGenerator(("gwf6", "ghbg", "period", "bhead")) + cond = ArrayTemplateGenerator(("gwf6", "ghbg", "period", "cond")) + aux = ArrayTemplateGenerator(("gwf6", "ghbg", "period", "aux")) + package_abbr = "gwfghbg" + _package_type = "ghbg" + dfn_file_name = "gwf-ghbg.dfn" + dfn = [ + ["header", "multi-package", "package-type stress-package"], + [ + "block options", + "name readarraygrid", + "type keyword", + "reader urword", + "optional false", + "developmode true", + "default true", + ], + [ + "block options", + "name auxiliary", + "type string", + "shape (naux)", + "reader urword", + "optional true", + ], + [ + "block options", + "name auxmultname", + "type string", + "shape", + "reader urword", + "optional true", + ], + [ + "block options", + "name print_input", + "type keyword", + "reader urword", + "optional true", + "mf6internal iprpak", + ], + [ + "block options", + "name print_flows", + "type keyword", + "reader urword", + "optional true", + "mf6internal iprflow", + ], + [ + "block options", + "name save_flows", + "type keyword", + "reader urword", + "optional true", + "mf6internal ipakcb", + ], + [ + "block options", + "name obs_filerecord", + "type record obs6 filein obs6_filename", + "shape", + "reader urword", + "tagged true", + "optional true", + "construct_package obs", + "construct_data observations", + "parameter_name continuous", + ], + [ + "block options", + "name obs6", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name filein", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name obs6_filename", + "type string", + "preserve_case true", + "in_record true", + "tagged false", + "reader urword", + "optional false", + ], + [ + "block options", + "name mover", + "type keyword", + "tagged true", + "reader urword", + "optional true", + ], + [ + "block options", + "name export_array_netcdf", + "type keyword", + "reader urword", + "optional true", + "mf6internal export_nc", + "extended true", + ], + [ + "block dimensions", + "name maxbound", + "type integer", + "reader urword", + "optional true", + ], + [ + "block period", + "name iper", + "type integer", + "block_variable true", + "in_record true", + "tagged false", + "shape", + "valid", + "reader urword", + "optional false", + ], + [ + "block period", + "name bhead", + "type double precision", + "shape (nodes)", + "reader readarray", + "layered true", + "netcdf true", + "default 3.e30", + ], + [ + "block period", + "name cond", + "type double precision", + "shape (nodes)", + "reader readarray", + "layered true", + "netcdf true", + "default 3.e30", + ], + [ + "block period", + "name aux", + "type double precision", + "shape (nodes)", + "reader readarray", + "layered true", + "netcdf true", + "optional true", + "mf6internal auxvar", + ], + ] + spec = { + "advanced": False, + "dimensions": { + "maxbound": { + "block": "dimensions", + "description": "integer value specifying the maximum number of general-head boundary cells that will be specified for use during any stress period.", + "longname": "maximum number of general-head boundaries in any stress period", + "name": "maxbound", + "optional": True, + "reader": "urword", + "type": "integer", + } + }, + "fkeys": { + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + } + }, + "multi": True, + "name": "gwf-ghbg", + "options": { + "auxiliary": { + "block": "options", + "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", + "longname": "keyword to specify aux variables", + "name": "auxiliary", + "optional": True, + "reader": "urword", + "shape": "(naux)", + "type": "string", + }, + "auxmultname": { + "block": "options", + "description": "name of auxiliary variable to be used as multiplier of general-head boundary conductance.", + "longname": "name of auxiliary variable for multiplier", + "name": "auxmultname", + "optional": True, + "reader": "urword", + "type": "string", + }, + "export_array_netcdf": { + "block": "options", + "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", + "extended": True, + "longname": "export array variables to netcdf output files.", + "mf6internal": "export_nc", + "name": "export_array_netcdf", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "mover": { + "block": "options", + "description": "keyword to indicate that this instance of the general-head boundary package can be used with the water mover (mvr) package. when the mover option is specified, additional memory is allocated within the package to store the available, provided, and received water.", + "name": "mover", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of general-head boundary 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.", + "longname": "print calculated flows to listing file", + "mf6internal": "iprflow", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of general-head boundary information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "mf6internal": "iprpak", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "readarraygrid": { + "block": "options", + "default": True, + "description": "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).", + "developmode": True, + "longname": "use array-based grid input", + "name": "readarraygrid", + "optional": False, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that general-head boundary flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save ghbg flows to budget file", + "mf6internal": "ipakcb", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + "period": { + "aux": { + "block": "period", + "description": "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.", + "layered": True, + "longname": "general-head boundary auxiliary variable iaux", + "mf6internal": "auxvar", + "name": "aux", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "bhead": { + "block": "period", + "default": 3e30, + "description": "is the boundary head.", + "layered": True, + "longname": "boundary head", + "name": "bhead", + "netcdf": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "cond": { + "block": "period", + "default": 3e30, + "description": "is the hydraulic conductance of the interface between the aquifer cell and the boundary.", + "layered": True, + "longname": "boundary conductance", + "name": "cond", + "netcdf": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "transient_block": True, + }, + } + + def __init__( + self, + model, + loading_package=False, + auxiliary=None, + auxmultname=None, + print_input=None, + print_flows=None, + save_flows=None, + observations=None, + mover=None, + export_array_netcdf=None, + maxbound=None, + bhead=3e30, + cond=3e30, + aux=None, + filename=None, + pname=None, + **kwargs, + ): + """Initialize ModflowGwfghbg.""" + super().__init__( + parent=model, + package_type="ghbg", + filename=filename, + pname=pname, + loading_package=loading_package, + **kwargs, + ) + + self.auxiliary = self.build_mfdata("auxiliary", auxiliary) + self.auxmultname = self.build_mfdata("auxmultname", auxmultname) + 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._obs_filerecord = self.build_mfdata("obs_filerecord", None) + self._obs_package = self.build_child_package( + "obs", observations, "continuous", self._obs_filerecord + ) + self.mover = self.build_mfdata("mover", mover) + self.export_array_netcdf = self.build_mfdata( + "export_array_netcdf", export_array_netcdf + ) + self.maxbound = self.build_mfdata("maxbound", maxbound) + self.bhead = self.build_mfdata("bhead", bhead) + self.cond = self.build_mfdata("cond", cond) + self.aux = self.build_mfdata("aux", aux) + + self._init_complete = True diff --git a/flopy/mf6/modflow/mfgwfgnc.py b/flopy/mf6/modflow/mfgwfgnc.py index 475faab821..75784c5e60 100644 --- a/flopy/mf6/modflow/mfgwfgnc.py +++ b/flopy/mf6/modflow/mfgwfgnc.py @@ -174,6 +174,121 @@ class ModflowGwfgnc(MFPackage): "reader urword", ], ] + spec = { + "advanced": False, + "dimensions": { + "numalphaj": { + "block": "dimensions", + "description": "is the number of contributing factors.", + "longname": "number of contributing factors", + "name": "numalphaj", + "optional": False, + "reader": "urword", + "type": "integer", + }, + "numgnc": { + "block": "dimensions", + "description": "is the number of gnc entries.", + "longname": "number of ghost node corrections", + "name": "numgnc", + "optional": False, + "reader": "urword", + "type": "integer", + }, + }, + "gncdata": { + "gncdata": { + "block": "gncdata", + "item": { + "block": "gncdata", + "fields": { + "alphasj": { + "block": "gncdata", + "description": "is the contributing factors for each contributing node in CELLIDSJ. Note that if the number of actual contributing cells is less than NUMALPHAJ for any ghost node, then dummy CELLIDS should be inserted with an associated contributing factor of zero. The sum of ALPHASJ should be less than one. This is because one minus the sum of ALPHASJ is equal to the alpha term (alpha n in equation 4-61 of the GWF Model report) that is multiplied by the head in cell n.", + "longname": "GNC contributing factors", + "name": "alphasj", + "reader": "urword", + "shape": "(numalphaj)", + "type": "double precision", + }, + "cellidm": { + "block": "gncdata", + "description": "is the cellid of the connecting cell, $m$, to which flow occurs from the ghost node. For a structured grid that uses the DIS input file, CELLIDM is the layer, row, and column numbers of the cell. For a grid that uses the DISV input file, CELLIDM is the layer number and CELL2D number for the two cells. If the model uses the unstructured discretization (DISU) input file, then CELLIDM is the node number for the cell.", + "longname": "GNC cellid n", + "name": "cellidm", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "cellidn": { + "block": "gncdata", + "description": "is the cellid of the cell, $n$, in which the ghost node is located. For a structured grid that uses the DIS input file, CELLIDN is the layer, row, and column numbers of the cell. For a grid that uses the DISV input file, CELLIDN is the layer number and CELL2D number for the two cells. If the model uses the unstructured discretization (DISU) input file, then CELLIDN is the node number for the cell.", + "longname": "GNC cellid n", + "name": "cellidn", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "cellidsj": { + "block": "gncdata", + "description": "is the array of CELLIDS for the contributing j cells, which contribute to the interpolated head value at the ghost node. This item contains one CELLID for each of the contributing cells of the ghost node. Note that if the number of actual contributing cells needed by the user is less than NUMALPHAJ for any ghost node, then a dummy CELLID of zero(s) should be inserted with an associated contributing factor of zero. For a structured grid that uses the DIS input file, CELLID is the layer, row, and column numbers of the cell. For a grid that uses the DISV input file, CELLID is the layer number and cell2d number for the two cells. If the model uses the unstructured discretization (DISU) input file, then CELLID is the node number for the cell.", + "longname": "GNC contributing cells", + "name": "cellidsj", + "numeric_index": "true", + "reader": "urword", + "shape": "(numalphaj)", + "type": "integer", + }, + }, + "name": "gncdata", + "reader": "urword", + "type": "record", + }, + "name": "gncdata", + "reader": "urword", + "shape": "(maxbound)", + "type": "recarray", + } + }, + "multi": False, + "name": "gwf-gnc", + "options": { + "explicit": { + "block": "options", + "description": "keyword to indicate that the ghost node correction is applied in an explicit manner on the right-hand side of the matrix. the explicit approach will likely require additional outer iterations. if the keyword is not specified, then the correction will be applied in an implicit manner on the left-hand side. the implicit approach will likely converge better, but may require additional memory. if the explicit keyword is not specified, then the bicgstab linear acceleration option should be specified within the linear block of the sparse matrix solver.", + "longname": "use explicit gnc formulation", + "name": "explicit", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of gnc 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.", + "longname": "print simulated flows to listing file", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of gnc information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + "ref": { + "abbr": "gnc", + "key": "gnc_filerecord", + "param": "gncdata", + "parent": "parent_model_or_package", + "val": "gncdata", + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwfgwe.py b/flopy/mf6/modflow/mfgwfgwe.py index 6a693fda4e..91064c3e10 100644 --- a/flopy/mf6/modflow/mfgwfgwe.py +++ b/flopy/mf6/modflow/mfgwfgwe.py @@ -40,6 +40,7 @@ class ModflowGwfgwe(MFPackage): _package_type = "gwfgwe" dfn_file_name = "exg-gwfgwe.dfn" dfn = [["header"]] + spec = {"advanced": False, "multi": False, "name": "exg-gwfgwe"} def __init__( self, diff --git a/flopy/mf6/modflow/mfgwfgwf.py b/flopy/mf6/modflow/mfgwfgwf.py index 48422b4b24..6615b252dd 100644 --- a/flopy/mf6/modflow/mfgwfgwf.py +++ b/flopy/mf6/modflow/mfgwfgwf.py @@ -462,6 +462,303 @@ class ModflowGwfgwf(MFPackage): "optional true", ], ] + spec = { + "advanced": False, + "dimensions": { + "nexg": { + "block": "dimensions", + "description": "keyword and integer value specifying the number of gwf-gwf exchanges.", + "longname": "number of exchanges", + "name": "nexg", + "optional": False, + "reader": "urword", + "type": "integer", + } + }, + "exchangedata": { + "exchangedata": { + "block": "exchangedata", + "item": { + "block": "exchangedata", + "fields": { + "aux": { + "block": "exchangedata", + "description": "represents the values of the auxiliary variables for each GWFGWF Exchange. The values of auxiliary variables must be present for each exchange. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block.", + "longname": "auxiliary variables", + "mf6internal": "auxvar", + "name": "aux", + "optional": "true", + "reader": "urword", + "shape": "(naux)", + "type": "double precision", + }, + "boundname": { + "block": "exchangedata", + "description": "name of the GWF Exchange cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", + "longname": "exchange boundname", + "name": "boundname", + "optional": "true", + "reader": "urword", + "type": "string", + }, + "cellidm1": { + "block": "exchangedata", + "description": "is the cellid of the cell in model 1 as specified in the simulation name file. For a structured grid that uses the DIS input file, CELLIDM1 is the layer, row, and column numbers of the cell. For a grid that uses the DISV input file, CELLIDM1 is the layer number and CELL2D number for the two cells. If the model uses the unstructured discretization (DISU) input file, then CELLIDM1 is the node number for the cell.", + "longname": "cellid of first cell", + "name": "cellidm1", + "numeric_index": "true", + "optional": "false", + "reader": "urword", + "type": "integer", + }, + "cellidm2": { + "block": "exchangedata", + "description": "is the cellid of the cell in model 2 as specified in the simulation name file. For a structured grid that uses the DIS input file, CELLIDM2 is the layer, row, and column numbers of the cell. For a grid that uses the DISV input file, CELLIDM2 is the layer number and CELL2D number for the two cells. If the model uses the unstructured discretization (DISU) input file, then CELLIDM2 is the node number for the cell.", + "longname": "cellid of second cell", + "name": "cellidm2", + "numeric_index": "true", + "optional": "false", + "reader": "urword", + "type": "integer", + }, + "cl1": { + "block": "exchangedata", + "description": "is the distance between the center of cell 1 and the its shared face with cell 2.", + "longname": "connection distance", + "name": "cl1", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + "cl2": { + "block": "exchangedata", + "description": "is the distance between the center of cell 2 and the its shared face with cell 1.", + "longname": "connection distance", + "name": "cl2", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + "hwva": { + "block": "exchangedata", + "description": "is the horizontal width of the flow connection between cell 1 and cell 2 if IHC $>$ 0, or it is the area perpendicular to flow of the vertical connection between cell 1 and cell 2 if IHC = 0.", + "longname": "horizontal cell width or area for vertical flow", + "name": "hwva", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + "ihc": { + "block": "exchangedata", + "description": "is an integer flag indicating the direction between node n and all of its m connections. If IHC = 0 then the connection is vertical. If IHC = 1 then the connection is horizontal. If IHC = 2 then the connection is horizontal for a vertically staggered grid.", + "longname": "integer flag for connection type", + "name": "ihc", + "optional": "false", + "reader": "urword", + "type": "integer", + }, + }, + "longname": "exchange data", + "name": "exchangedata", + "optional": False, + "reader": "urword", + "type": "record", + }, + "longname": "exchange data", + "name": "exchangedata", + "optional": False, + "reader": "urword", + "shape": "(nexg)", + "type": "recarray", + } + }, + "fkeys": { + "gnc_filerecord": { + "abbr": "gnc", + "key": "gnc_filerecord", + "param": "gncdata", + "parent": "parent_model_or_package", + "val": "gncdata", + }, + "mvr_filerecord": { + "abbr": "mvr", + "key": "mvr_filerecord", + "param": "perioddata", + "parent": "parent_model_or_package", + "val": "perioddata", + }, + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + }, + "multi": True, + "name": "exg-gwfgwf", + "options": { + "auxiliary": { + "block": "options", + "description": "an array of auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided. most auxiliary variables will not be used by the gwf-gwf exchange, but they will be available for use by other parts of the program. if an auxiliary variable with the name 'angldegx' is found, then this information will be used as the angle (provided in degrees) between the connection face normal and the x axis, where a value of zero indicates that a normal vector points directly along the positive x axis. the connection face normal is a normal vector on the cell face shared between the cell in model 1 and the cell in model 2 pointing away from the model 1 cell. additional information on 'angldegx' and when it is required is provided in the description of the disu package. if an auxiliary variable with the name 'cdist' is found, then this information will be used in the calculation of specific discharge within model cells connected by the exchange. for a horizontal connection, cdist should be specified as the horizontal distance between the cell centers, and should not include the vertical component. for vertical connections, cdist should be specified as the difference in elevation between the two cell centers. both angldegx and cdist are required if specific discharge is calculated for either of the groundwater models.", + "longname": "keyword to specify aux variables", + "name": "auxiliary", + "optional": True, + "reader": "urword", + "shape": "(naux)", + "type": "string", + }, + "boundnames": { + "block": "options", + "description": "keyword to indicate that boundary names may be provided with the list of gwf exchange cells.", + "name": "boundnames", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "cell_averaging": { + "block": "options", + "description": "is a keyword and text keyword to indicate the method that will be used for calculating the conductance for horizontal cell connections. the text value for cell_averaging can be 'harmonic', 'logarithmic', or 'amt-lmk', which means 'arithmetic-mean thickness and logarithmic-mean hydraulic conductivity'. if the user does not specify a value for cell_averaging, then the harmonic-mean method will be used.", + "longname": "conductance weighting option", + "name": "cell_averaging", + "optional": True, + "reader": "urword", + "type": "string", + "valid": "harmonic logarithmic amt-lmk", + }, + "cvoptions": { + "block": "options", + "description": "none", + "fields": { + "dewatered": { + "block": "options", + "description": "If the DEWATERED keyword is specified, then the vertical conductance is calculated using only the saturated thickness and properties of the overlying cell if the head in the underlying cell is below its top.", + "longname": "keyword to activate DEWATERED option", + "name": "dewatered", + "optional": "true", + "reader": "urword", + "type": "keyword", + }, + "variablecv": { + "block": "options", + "description": "keyword to indicate that the vertical conductance will be calculated using the saturated thickness and properties of the overlying cell and the thickness and properties of the underlying cell. If the DEWATERED keyword is also specified, then the vertical conductance is calculated using only the saturated thickness and properties of the overlying cell if the head in the underlying cell is below its top. If these keywords are not specified, then the default condition is to calculate the vertical conductance at the start of the simulation using the initial head and the cell properties. The vertical conductance remains constant for the entire simulation.", + "longname": "keyword to activate VARIABLECV option", + "name": "variablecv", + "reader": "urword", + "type": "keyword", + }, + }, + "longname": "vertical conductance options", + "name": "cvoptions", + "optional": True, + "reader": "urword", + "type": "record", + }, + "dev_interfacemodel_on": { + "block": "options", + "description": "activates the interface model mechanism for calculating the coefficients at (and possibly near) the exchange. this keyword should only be used for development purposes.", + "longname": "activate interface model on exchange", + "mf6internal": "dev_ifmod_on", + "name": "dev_interfacemodel_on", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "gncdata": { + "block": "options", + "description": "Contains data for the gnc package. Data can be passed as a dictionary to the gnc package with variable names as keys and package data as values. Data for the gncdata variable is also acceptable. See gnc package documentation for more information.", + "name": "gncdata", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "gnc", + "key": "gnc_filerecord", + "param": "gncdata", + "parent": "parent_model_or_package", + "val": "gncdata", + }, + "type": "record gnc6 filein gnc6_filename", + }, + "newton": { + "block": "options", + "description": "keyword that activates the newton-raphson formulation for groundwater flow between connected, convertible groundwater cells. cells will not dry when this option is used.", + "longname": "keyword to activate newton-raphson", + "name": "newton", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "perioddata": { + "block": "options", + "description": "Contains data for the mvr package. Data can be passed as a dictionary to the mvr package with variable names as keys and package data as values. Data for the perioddata variable is also acceptable. See mvr package documentation for more information.", + "name": "perioddata", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "mvr", + "key": "mvr_filerecord", + "param": "perioddata", + "parent": "parent_model_or_package", + "val": "perioddata", + }, + "type": "record mvr6 filein mvr6_filename", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of exchange flow rates will be printed to the listing file for every stress period in which 'save budget' is specified in output control.", + "longname": "keyword to print gwfgwf flows to list file", + "mf6internal": "iprflow", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of exchange entries will be echoed to the listing file immediately after it is read.", + "longname": "keyword to print input to list file", + "mf6internal": "iprpak", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that cell-by-cell flow terms will be written to the budget file for each model provided that the output control for the models are set up with the 'budget save file' option.", + "longname": "keyword to save gwfgwf flows", + "mf6internal": "ipakcb", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "xt3d": { + "block": "options", + "description": "keyword that activates the xt3d formulation between the cells connected with this gwf-gwf exchange.", + "longname": "keyword to activate xt3d", + "name": "xt3d", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwfgwt.py b/flopy/mf6/modflow/mfgwfgwt.py index bfa03d1029..aac15508f1 100644 --- a/flopy/mf6/modflow/mfgwfgwt.py +++ b/flopy/mf6/modflow/mfgwfgwt.py @@ -40,6 +40,7 @@ class ModflowGwfgwt(MFPackage): _package_type = "gwfgwt" dfn_file_name = "exg-gwfgwt.dfn" dfn = [["header"]] + spec = {"advanced": False, "multi": False, "name": "exg-gwfgwt"} def __init__( self, diff --git a/flopy/mf6/modflow/mfgwfhfb.py b/flopy/mf6/modflow/mfgwfhfb.py index eb6158f8fc..9598fb5057 100644 --- a/flopy/mf6/modflow/mfgwfhfb.py +++ b/flopy/mf6/modflow/mfgwfhfb.py @@ -20,12 +20,12 @@ class ModflowGwfhfb(MFPackage): 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 horizontal flow barriers will be written - to the listing file immediately after it is read. + keyword to indicate that the list of hydraulic flow barriers will be written to + the listing file immediately after it is read. maxhfb : integer - integer value specifying the maximum number of horizontal flow barriers that + integer value specifying the maximum number of hydraulic flow barriers that will be entered in this input file. the value of maxhfb is used to allocate - memory for the horizontal flow barriers. + memory for the hydraulic flow barriers. stress_period_data : [(cellid1, cellid2, hydchr)] * cellid1 : [integer] identifier for the first cell. For a structured grid that uses the DIS input @@ -35,14 +35,14 @@ class ModflowGwfhfb(MFPackage): 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 adjacent or the - program will terminate with an error. + the same. For all grid types, cells must be horizontally or vertically + adjacent. * cellid2 : [integer] identifier for the second cell. See CELLID1 for description of how to specify. * hydchr : double precision - is the hydraulic characteristic of the horizontal-flow barrier. The hydraulic + is the hydraulic characteristic of the hydraulic-flow barrier. The hydraulic characteristic is the barrier hydraulic conductivity divided by the width of - the horizontal-flow barrier. If the hydraulic characteristic is negative, then + the hydraulic-flow barrier. If the hydraulic characteristic is negative, then the absolute value of HYDCHR acts as a multiplier to the conductance between the two model cells specified as containing the barrier. For example, if the value for HYDCHR was specified as -1.5, the conductance calculated for the two @@ -129,6 +129,80 @@ class ModflowGwfhfb(MFPackage): "reader urword", ], ] + spec = { + "advanced": False, + "dimensions": { + "maxhfb": { + "block": "dimensions", + "description": "integer value specifying the maximum number of hydraulic flow barriers that will be entered in this input file. the value of maxhfb is used to allocate memory for the hydraulic flow barriers.", + "longname": "maximum number of barriers", + "mf6internal": "maxbound", + "name": "maxhfb", + "optional": False, + "reader": "urword", + "type": "integer", + } + }, + "multi": False, + "name": "gwf-hfb", + "options": { + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of hydraulic flow barriers will be written to the listing file immediately after it is read.", + "longname": "model print input to listing file", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + } + }, + "period": { + "stress_period_data": { + "block": "period", + "item": { + "block": "period", + "fields": { + "cellid1": { + "block": "period", + "description": "identifier for the first cell. For a structured grid that uses the DIS input 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.", + "longname": "first cell adjacent to barrier", + "name": "cellid1", + "reader": "urword", + "shape": "(ncelldim)", + "type": "integer", + }, + "cellid2": { + "block": "period", + "description": "identifier for the second cell. See CELLID1 for description of how to specify.", + "longname": "second cell adjacent to barrier", + "name": "cellid2", + "reader": "urword", + "shape": "(ncelldim)", + "type": "integer", + }, + "hydchr": { + "block": "period", + "description": "is the hydraulic characteristic of the hydraulic-flow barrier. The hydraulic characteristic is the barrier hydraulic conductivity divided by the width of the hydraulic-flow barrier. If the hydraulic characteristic is negative, then the absolute value of HYDCHR acts as a multiplier to the conductance between the two model cells specified as containing the barrier. For example, if the value for HYDCHR was specified as -1.5, the conductance calculated for the two cells would be multiplied by 1.5.", + "longname": "barrier hydraulic characteristic", + "name": "hydchr", + "reader": "urword", + "type": "double precision", + }, + }, + "mf6internal": "spd", + "name": "stress_period_data", + "reader": "urword", + "type": "record", + }, + "mf6internal": "spd", + "name": "stress_period_data", + "reader": "urword", + "shape": "(maxhfb)", + "type": "recarray", + }, + "transient_block": True, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwfic.py b/flopy/mf6/modflow/mfgwfic.py index 478b6d095a..8dbb4c2fff 100644 --- a/flopy/mf6/modflow/mfgwfic.py +++ b/flopy/mf6/modflow/mfgwfic.py @@ -23,8 +23,11 @@ class ModflowGwfic(MFPackage): keyword that specifies input griddata arrays should be written to layered ascii output files. export_array_netcdf : keyword - keyword that specifies input griddata arrays should be written to the model - output netcdf file. + keyword that specifies input gridded arrays should be written to the model + output netcdf file with attributes that support using the generated file as a + 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. strt : [double precision] is the initial (starting) head---that is, head at the beginning of the gwf model simulation. strt must be specified for all simulations, including @@ -78,6 +81,48 @@ class ModflowGwfic(MFPackage): "default 1.0", ], ] + spec = { + "advanced": False, + "griddata": { + "strt": { + "block": "griddata", + "default": 1.0, + "description": "is the initial (starting) head---that is, head at the beginning of the gwf model simulation. strt must be specified for all simulations, including steady-state simulations. one value is read for every model cell. for simulations in which the first stress period is steady state, the values used for strt generally do not affect the simulation (exceptions may occur if cells go dry and (or) rewet). the execution time, however, will be less if strt includes hydraulic heads that are close to the steady-state solution. a head value lower than the cell bottom can be provided if a cell should start as dry.", + "layered": True, + "longname": "starting head", + "name": "strt", + "netcdf": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + } + }, + "multi": False, + "name": "gwf-ic", + "options": { + "export_array_ascii": { + "block": "options", + "description": "keyword that specifies input griddata arrays should be written to layered ascii output files.", + "longname": "export array variables to layered ascii files.", + "mf6internal": "export_ascii", + "name": "export_array_ascii", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "export_array_netcdf": { + "block": "options", + "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", + "extended": True, + "longname": "export array variables to netcdf output files.", + "mf6internal": "export_nc", + "name": "export_array_netcdf", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwflak.py b/flopy/mf6/modflow/mfgwflak.py index 57761fad00..6559e97014 100644 --- a/flopy/mf6/modflow/mfgwflak.py +++ b/flopy/mf6/modflow/mfgwflak.py @@ -106,8 +106,8 @@ class ModflowGwflak(MFPackage): seconds to model time units. time_conversion should be set to 1.0, 60.0, 3,600.0, 86,400.0, and 31,557,600.0 when using time units (time_units) of seconds, minutes, hours, days, or years in the simulation, respectively. - convtime does not need to be specified if no lake outlets are specified or - time_units are seconds. + time_conversion does not need to be specified if no lake outlets are specified + or time_units are seconds. length_conversion : double precision real value that is used to convert outlet user-specified manning's roughness coefficients or gravitational acceleration used to calculate outlet flows from @@ -1208,6 +1208,737 @@ class ModflowGwflak(MFPackage): "time_series true", ], ] + spec = { + "advanced": True, + "connectiondata": { + "connectiondata": { + "block": "connectiondata", + "item": { + "block": "connectiondata", + "fields": { + "bedleak": { + "block": "connectiondata", + "description": "real value or character string that defines the bed leakance for the lake-GWF connection. BEDLEAK must be greater than or equal to zero, equal to the DNODATA value (3.0E+30), or specified to be NONE. If DNODATA or NONE is specified for BEDLEAK, the lake-GWF connection conductance is solely a function of aquifer properties in the connected GWF cell and lakebed sediments are assumed to be absent. Warning messages will be issued if NONE is specified. Eventually the ability to specify NONE will be deprecated and cause MODFLOW 6 to terminate with an error.", + "longname": "bed leakance", + "name": "bedleak", + "reader": "urword", + "type": "string", + }, + "belev": { + "block": "connectiondata", + "description": "real value that defines the bottom elevation for a HORIZONTAL lake-GWF connection. Any value can be specified if CLAKTYPE is VERTICAL, EMBEDDEDH, or EMBEDDEDV. If CLAKTYPE is HORIZONTAL and BELEV is not equal to TELEV, BELEV must be greater than or equal to the bottom of the GWF cell CELLID. If BELEV is equal to TELEV, BELEV is reset to the bottom of the GWF cell CELLID.", + "longname": "bottom elevation", + "name": "belev", + "reader": "urword", + "type": "double precision", + }, + "cellid": { + "block": "connectiondata", + "description": "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 layer, row, and column. For a grid that uses the DISV input file, CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file, CELLID is the node number for the cell.", + "longname": "cell identifier", + "name": "cellid", + "reader": "urword", + "shape": "(ncelldim)", + "type": "integer", + }, + "claktype": { + "block": "connectiondata", + "description": "character string that defines the lake-GWF connection type for the lake connection. Possible lake-GWF connection type strings include: VERTICAL--character keyword to indicate the lake-GWF connection is vertical and connection conductance calculations use the hydraulic conductivity corresponding to the $K_{33}$ tensor component defined for CELLID in the NPF package. HORIZONTAL--character keyword to indicate the lake-GWF connection is horizontal and connection conductance calculations use the hydraulic conductivity corresponding to the $K_{11}$ tensor component defined for CELLID in the NPF package. EMBEDDEDH--character keyword to indicate the lake-GWF connection is embedded in a single cell and connection conductance calculations use the hydraulic conductivity corresponding to the $K_{11}$ tensor component defined for CELLID in the NPF package. EMBEDDEDV--character keyword to indicate the lake-GWF connection is embedded in a single cell and connection conductance calculations use the hydraulic conductivity corresponding to the $K_{33}$ tensor component defined for CELLID in the NPF package. Embedded lakes can only be connected to a single cell (NLAKECONN = 1) and there must be a lake table associated with each embedded lake.", + "longname": "lake connection type", + "name": "claktype", + "reader": "urword", + "type": "string", + }, + "connlen": { + "block": "connectiondata", + "description": "real value that defines the distance between the connected GWF CELLID node and the lake for a HORIZONTAL, EMBEDDEDH, or EMBEDDEDV lake-GWF connection. CONLENN must be greater than zero for a HORIZONTAL, EMBEDDEDH, or EMBEDDEDV lake-GWF connection. Any value can be specified if CLAKTYPE is VERTICAL.", + "longname": "connection length", + "name": "connlen", + "reader": "urword", + "type": "double precision", + }, + "connwidth": { + "block": "connectiondata", + "description": "real value that defines the connection face width for a HORIZONTAL lake-GWF connection. CONNWIDTH must be greater than zero for a HORIZONTAL lake-GWF connection. Any value can be specified if CLAKTYPE is VERTICAL, EMBEDDEDH, or EMBEDDEDV.", + "longname": "connection width", + "name": "connwidth", + "reader": "urword", + "type": "double precision", + }, + "iconn": { + "block": "connectiondata", + "description": "integer value that defines the GWF connection number for this lake connection entry. ICONN must be greater than zero and less than or equal to NLAKECONN for lake IFNO.", + "longname": "connection number for this entry", + "name": "iconn", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "ifno": { + "block": "tables", + "description": "integer value that defines the feature (lake) number associated with the specified TABLES data on the line. IFNO must be greater than zero and less than or equal to NLAKES. The program will terminate with an error if table information for a lake is specified more than once or the number of specified tables is less than NTABLES.", + "longname": "lake number for this entry", + "name": "ifno", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "telev": { + "block": "connectiondata", + "description": "real value that defines the top elevation for a HORIZONTAL lake-GWF connection. Any value can be specified if CLAKTYPE is VERTICAL, EMBEDDEDH, or EMBEDDEDV. If CLAKTYPE is HORIZONTAL and TELEV is not equal to BELEV, TELEV must be less than or equal to the top of the GWF cell CELLID. If TELEV is equal to BELEV, TELEV is reset to the top of the GWF cell CELLID.", + "longname": "top elevation", + "name": "telev", + "reader": "urword", + "type": "double precision", + }, + }, + "name": "connectiondata", + "reader": "urword", + "type": "record", + }, + "name": "connectiondata", + "reader": "urword", + "shape": "(sum(nlakeconn))", + "type": "recarray", + } + }, + "dimensions": { + "nlakes": { + "block": "dimensions", + "description": "value specifying the number of lakes that will be simulated for all stress periods.", + "longname": "number of lakes", + "name": "nlakes", + "optional": False, + "reader": "urword", + "type": "integer", + }, + "noutlets": { + "block": "dimensions", + "description": "value specifying the number of outlets that will be simulated for all stress periods. if noutlets is not specified, a default value of zero is used.", + "longname": "number of outlets", + "name": "noutlets", + "optional": False, + "reader": "urword", + "type": "integer", + }, + "ntables": { + "block": "dimensions", + "description": "value specifying the number of lakes tables that will be used to define the lake stage, volume relation, and surface area. if ntables is not specified, a default value of zero is used.", + "longname": "number of tables", + "name": "ntables", + "optional": False, + "reader": "urword", + "type": "integer", + }, + }, + "fkeys": { + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "ts_filerecord": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + }, + "multi": True, + "name": "gwf-lak", + "options": { + "auxiliary": { + "block": "options", + "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", + "longname": "keyword to specify aux variables", + "name": "auxiliary", + "optional": True, + "reader": "urword", + "shape": "(naux)", + "type": "string", + }, + "boundnames": { + "block": "options", + "description": "keyword to indicate that boundary names may be provided with the list of lake cells.", + "name": "boundnames", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "budget_filerecord": { + "block": "options", + "fields": { + "budgetfile": { + "block": "options", + "description": "name of the binary output file to write budget information.", + "longname": "file keyword", + "name": "budgetfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "budget_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "budgetcsv_filerecord": { + "block": "options", + "fields": { + "budgetcsvfile": { + "block": "options", + "description": "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.", + "longname": "file keyword", + "name": "budgetcsvfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "budgetcsv_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "length_conversion": { + "block": "options", + "description": "real value that is used to convert outlet user-specified manning's roughness coefficients or gravitational acceleration used to calculate outlet flows from meters to model length units. length_conversion should be set to 3.28081, 1.0, and 100.0 when using length units (length_units) of feet, meters, or centimeters in the simulation, respectively. length_conversion does not need to be specified if no lake outlets are specified or length_units are meters.", + "longname": "length conversion factor", + "name": "length_conversion", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "maximum_iterations": { + "block": "options", + "description": "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.", + "longname": "lak newton-raphson iterations", + "name": "maximum_iterations", + "optional": True, + "reader": "urword", + "type": "integer", + }, + "maximum_stage_change": { + "block": "options", + "description": "real value that defines the lake stage closure tolerance. by default, maximum_stage_change is equal to $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.", + "longname": "stage closure tolerance", + "name": "maximum_stage_change", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "mover": { + "block": "options", + "description": "keyword to indicate that this instance of the lak package can be used with the water mover (mvr) package. when the mover option is specified, additional memory is allocated within the package to store the available, provided, and received water.", + "name": "mover", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "package_convergence_filerecord": { + "block": "options", + "fields": { + "package_convergence_filename": { + "block": "options", + "description": "name of the comma spaced values output file to write package convergence information.", + "longname": "file keyword", + "name": "package_convergence_filename", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "package_convergence_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "print_flows": { + "block": "options", + "description": "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.", + "longname": "print calculated flows to listing file", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of lake information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_stage": { + "block": "options", + "description": "keyword to indicate that the list of lake {#2} will be printed to the listing file for every stress period in which 'head print' is specified in output control. if there is no output control option and print_{#3} is specified, then {#2} are printed for the last time step of each stress period.", + "longname": "print calculated stages to listing file", + "name": "print_stage", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that lake flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save lake flows to budget file", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "stage_filerecord": { + "block": "options", + "fields": { + "stagefile": { + "block": "options", + "description": "name of the binary output file to write stage information.", + "longname": "file keyword", + "name": "stagefile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "stage_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "surfdep": { + "block": "options", + "description": "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.", + "longname": "surface depression depth", + "name": "surfdep", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "time_conversion": { + "block": "options", + "description": "real value that is used to convert user-specified manning's roughness coefficients or gravitational acceleration used to calculate outlet flows from seconds to model time units. time_conversion should be set to 1.0, 60.0, 3,600.0, 86,400.0, and 31,557,600.0 when using time units (time_units) of seconds, minutes, hours, days, or years in the simulation, respectively. time_conversion does not need to be specified if no lake outlets are specified or time_units are seconds.", + "longname": "time conversion factor", + "name": "time_conversion", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "timeseries": { + "block": "options", + "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", + "name": "timeseries", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + "type": "record ts6 filein ts6_filename", + }, + }, + "outlets": { + "outlets": { + "block": "outlets", + "item": { + "block": "outlets", + "fields": { + "couttype": { + "block": "outlets", + "description": "character string that defines the outlet type for the outlet OUTLETNO. Possible COUTTYPE strings include: SPECIFIED--character keyword to indicate the outlet is defined as a specified flow. MANNING--character keyword to indicate the outlet is defined using Manning's equation. WEIR--character keyword to indicate the outlet is defined using a sharp weir equation.", + "longname": "outlet type", + "name": "couttype", + "reader": "urword", + "type": "string", + }, + "invert": { + "block": "period", + "description": "real or character value that defines the invert elevation for the lake outlet. A specified INVERT value is only used for active lakes if COUTTYPE for lake outlet OUTLETNO is not SPECIFIED. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "invert elevation", + "name": "invert", + "reader": "urword", + "time_series": "true", + "type": "string", + }, + "lakein": { + "block": "outlets", + "description": "integer value that defines the lake number that outlet is connected to. LAKEIN must be greater than zero and less than or equal to NLAKES.", + "longname": "lake number for upstream lake", + "name": "lakein", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "lakeout": { + "block": "outlets", + "description": "integer value that defines the lake number that outlet discharge from lake outlet OUTLETNO is routed to. LAKEOUT must be greater than or equal to zero and less than or equal to NLAKES. If LAKEOUT is zero, outlet discharge from lake outlet OUTLETNO is discharged to an external boundary.", + "longname": "lake number for downstream lake", + "name": "lakeout", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "outletno": { + "block": "outlets", + "description": "integer value that defines the outlet number associated with the specified OUTLETS data on the line. OUTLETNO must be greater than zero and less than or equal to NOUTLETS. Outlet information must be specified for every outlet or the program will terminate with an error. The program will also terminate with an error if information for a outlet is specified more than once.", + "longname": "outlet number for this entry", + "name": "outletno", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "rough": { + "block": "period", + "description": "real value that defines the roughness coefficient for the lake outlet. Any value can be specified if COUTTYPE is not MANNING. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "roughness coefficient", + "name": "rough", + "reader": "urword", + "time_series": "true", + "type": "string", + }, + "slope": { + "block": "period", + "description": "real or character value that defines the bed slope for the lake outlet. A specified SLOPE value is only used for active lakes if COUTTYPE for lake outlet OUTLETNO is MANNING. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "bed slope", + "name": "slope", + "reader": "urword", + "time_series": "true", + "type": "string", + }, + "width": { + "block": "period", + "description": "real or character value that defines the width of the lake outlet. A specified WIDTH value is only used for active lakes if COUTTYPE for lake outlet OUTLETNO is not SPECIFIED. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "outlet width", + "name": "width", + "reader": "urword", + "time_series": "true", + "type": "string", + }, + }, + "name": "outlets", + "reader": "urword", + "type": "record", + }, + "name": "outlets", + "reader": "urword", + "shape": "(noutlets)", + "type": "recarray", + } + }, + "packagedata": { + "packagedata": { + "block": "packagedata", + "item": { + "block": "packagedata", + "fields": { + "aux": { + "block": "packagedata", + "description": "represents the values of the auxiliary variables for each lake. The values of auxiliary variables must be present for each lake. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "auxiliary variables", + "name": "aux", + "optional": "true", + "reader": "urword", + "shape": "(naux)", + "time_series": "true", + "type": "double precision", + }, + "boundname": { + "block": "packagedata", + "description": "name of the lake cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", + "longname": "well name", + "name": "boundname", + "optional": "true", + "reader": "urword", + "type": "string", + }, + "ifno": { + "block": "tables", + "description": "integer value that defines the feature (lake) number associated with the specified TABLES data on the line. IFNO must be greater than zero and less than or equal to NLAKES. The program will terminate with an error if table information for a lake is specified more than once or the number of specified tables is less than NTABLES.", + "longname": "lake number for this entry", + "name": "ifno", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "nlakeconn": { + "block": "packagedata", + "description": "integer value that defines the number of GWF cells connected to this (IFNO) lake. There can only be one vertical lake connection to each GWF cell. NLAKECONN must be greater than zero.", + "longname": "number of lake connections", + "name": "nlakeconn", + "reader": "urword", + "type": "integer", + }, + "strt": { + "block": "packagedata", + "description": "real value that defines the starting stage for the lake.", + "longname": "starting lake stage", + "name": "strt", + "reader": "urword", + "type": "double precision", + }, + }, + "name": "packagedata", + "reader": "urword", + "type": "record", + }, + "name": "packagedata", + "reader": "urword", + "shape": "(maxbound)", + "type": "recarray", + } + }, + "period": { + "perioddata": { + "block": "period", + "item": { + "block": "period", + "fields": { + "laksetting": { + "block": "period", + "choices": { + "auxiliaryrecord": { + "block": "period", + "fields": { + "auxiliary": { + "block": "period", + "description": "keyword for specifying auxiliary variable.", + "name": "auxiliary", + "reader": "urword", + "type": "keyword", + }, + "auxname": { + "block": "period", + "description": "name for the auxiliary variable to be assigned AUXVAL. AUXNAME must match one of the auxiliary variable names defined in the OPTIONS block. If AUXNAME does not match one of the auxiliary variable names defined in the OPTIONS block the data are ignored.", + "name": "auxname", + "reader": "urword", + "type": "string", + }, + "auxval": { + "block": "period", + "description": "value for the auxiliary variable. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "auxiliary variable value", + "name": "auxval", + "reader": "urword", + "time_series": "true", + "type": "double precision", + }, + }, + "name": "auxiliaryrecord", + "reader": "urword", + "type": "record", + }, + "evaporation": { + "block": "period", + "description": "real or character value that defines the maximum evaporation rate $(lt^{-1})$ for the lake. value must be greater than or equal to zero. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "evaporation rate", + "name": "evaporation", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "inflow": { + "block": "period", + "description": "real or character value that defines the volumetric inflow rate $(l^3 t^{-1})$ for the lake. value must be greater than or equal to zero. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value. by default, inflow rates are zero for each lake.", + "longname": "inflow rate", + "name": "inflow", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "invert": { + "block": "period", + "description": "real or character value that defines the invert elevation for the lake outlet. a specified invert value is only used for active lakes if couttype for lake outlet outletno is not specified. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "invert elevation", + "name": "invert", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "rainfall": { + "block": "period", + "description": "real or character value that defines the rainfall rate $(lt^{-1})$ for the lake. value must be greater than or equal to zero. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "rainfall rate", + "name": "rainfall", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "rate": { + "block": "period", + "description": "real or character value that defines the extraction rate for the lake outflow. a positive value indicates inflow and a negative value indicates outflow from the lake. rate only applies to outlets associated with active lakes (status is active). a specified rate is only applied if couttype for the outletno is specified. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value. by default, the rate for each specified lake outlet is zero.", + "longname": "extraction rate", + "name": "rate", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "rough": { + "block": "period", + "description": "real value that defines the roughness coefficient for the lake outlet. any value can be specified if couttype is not manning. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "roughness coefficient", + "name": "rough", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "runoff": { + "block": "period", + "description": "real or character value that defines the runoff rate $(l^3 t^{-1})$ for the lake. value must be greater than or equal to zero. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "runoff rate", + "name": "runoff", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "slope": { + "block": "period", + "description": "real or character value that defines the bed slope for the lake outlet. a specified slope value is only used for active lakes if couttype for lake outlet outletno is manning. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "bed slope", + "name": "slope", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "stage": { + "block": "period", + "description": "real or character value that defines the stage for the lake. the specified stage is only applied if the lake is a constant stage lake. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "lake stage", + "name": "stage", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "status": { + "block": "period", + "description": "keyword option to define lake status. status can be active, inactive, or constant. by default, status is active.", + "longname": "lake status", + "name": "status", + "reader": "urword", + "type": "string", + }, + "width": { + "block": "period", + "description": "real or character value that defines the width of the lake outlet. a specified width value is only used for active lakes if couttype for lake outlet outletno is not specified. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "outlet width", + "name": "width", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "withdrawal": { + "block": "period", + "description": "real or character value that defines the maximum withdrawal rate $(l^3 t^{-1})$ for the lake. value must be greater than or equal to zero. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "maximum withdrawal rate", + "name": "withdrawal", + "reader": "urword", + "time_series": True, + "type": "string", + }, + }, + "description": "line of information that is parsed into a keyword and values. keyword values that can be used to start the laksetting string include both keywords for lake settings and keywords for outlet settings. keywords for lake settings include: status, stage, rainfall, evaporation, runoff, inflow, withdrawal, and auxiliary. keywords for outlet settings include rate, invert, width, slope, and rough.", + "name": "laksetting", + "reader": "urword", + "type": "keystring", + }, + "number": { + "block": "period", + "description": "integer value that defines the lake or outlet number associated with the specified period data on the line. number must be greater than zero and less than or equal to nlakes for a lake number and less than or equal to noutlets for an outlet number.", + "longname": "lake or outlet number for this entry", + "name": "number", + "numeric_index": True, + "reader": "urword", + "type": "integer", + }, + }, + "name": "perioddata", + "reader": "urword", + "type": "record", + }, + "name": "perioddata", + "reader": "urword", + "type": "recarray", + }, + "transient_block": True, + }, + "tables": { + "tables": { + "block": "tables", + "item": { + "block": "tables", + "fields": { + "filein": { + "block": "tables", + "description": "keyword to specify that an input filename is expected next.", + "longname": "file keyword", + "name": "filein", + "optional": "false", + "reader": "urword", + "type": "keyword", + }, + "ifno": { + "block": "tables", + "description": "integer value that defines the feature (lake) number associated with the specified TABLES data on the line. IFNO must be greater than zero and less than or equal to NLAKES. The program will terminate with an error if table information for a lake is specified more than once or the number of specified tables is less than NTABLES.", + "longname": "lake number for this entry", + "name": "ifno", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "tab6": { + "block": "tables", + "description": "keyword to specify that record corresponds to a table file.", + "longname": "head keyword", + "name": "tab6", + "optional": "false", + "reader": "urword", + "type": "keyword", + }, + "tab6_filename": { + "block": "tables", + "description": "character string that defines the path and filename for the file containing lake table data for the lake connection. The TAB6_FILENAME file includes the number of entries in the file and the relation between stage, volume, and surface area for each entry in the file. Lake table files for EMBEDDEDH and EMBEDDEDV lake-GWF connections also include lake-GWF exchange area data for each entry in the file. Instructions for creating the TAB6_FILENAME input file are provided in Lake Table Input File section.", + "longname": "table file name", + "name": "tab6_filename", + "optional": "false", + "reader": "urword", + "type": "string", + }, + }, + "name": "tables", + "reader": "urword", + "type": "record", + }, + "name": "tables", + "reader": "urword", + "shape": "(ntables)", + "type": "recarray", + } + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwfmaw.py b/flopy/mf6/modflow/mfgwfmaw.py index 09cea44c34..cc79efce59 100644 --- a/flopy/mf6/modflow/mfgwfmaw.py +++ b/flopy/mf6/modflow/mfgwfmaw.py @@ -1066,6 +1066,615 @@ class ModflowGwfmaw(MFPackage): "time_series true", ], ] + spec = { + "advanced": True, + "connectiondata": { + "connectiondata": { + "block": "connectiondata", + "item": { + "block": "connectiondata", + "fields": { + "cellid": { + "block": "connectiondata", + "description": "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 layer, row, and column. For a grid that uses the DISV input file, CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file, CELLID is the node number for the cell. One or more screened intervals can be connected to the same CELLID if CONDEQN for a well is MEAN. The program will terminate with an error if MAW wells using SPECIFIED, THIEM, SKIN, or CUMULATIVE conductance equations have more than one connection to the same CELLID.", + "longname": "cell identifier", + "name": "cellid", + "reader": "urword", + "shape": "(ncelldim)", + "type": "integer", + }, + "hk_skin": { + "block": "connectiondata", + "description": "value that defines the skin (filter pack) hydraulic conductivity (if CONDEQN for the multi-aquifer well is SKIN, CUMULATIVE, or MEAN) or conductance (if CONDEQN for the multi-aquifer well is SPECIFIED) for each GWF node connected to the multi-aquifer well (NGWFNODES). If CONDEQN is SPECIFIED, HK_SKIN must be greater than or equal to zero. HK_SKIN can be any value if CONDEQN is THIEM. Otherwise, HK_SKIN must be greater than zero. If CONDEQN is SKIN, the contrast between the cell transmissivity (the product of geometric mean horizontal hydraulic conductivity and the cell thickness) and the well transmissivity (the product of HK_SKIN and the screen thicknesses) must be greater than one in node CELLID or the program will terminate with an error condition; if an error condition occurs, it is suggested that the HK_SKIN be reduced to a value less than K11 and K22 in node CELLID or the THIEM or MEAN conductance equations be used for these multi-aquifer wells.", + "longname": "skin data", + "name": "hk_skin", + "reader": "urword", + "type": "double precision", + }, + "icon": { + "block": "connectiondata", + "description": "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.", + "longname": "connection number", + "name": "icon", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "ifno": { + "block": "period", + "description": "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.", + "longname": "well number for this entry", + "name": "ifno", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "radius_skin": { + "block": "connectiondata", + "description": "real value that defines the skin radius (filter pack radius) for the multi-aquifer well. RADIUS_SKIN can be any value if CONDEQN is SPECIFIED or THIEM. If 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.", + "longname": "skin radius", + "name": "radius_skin", + "reader": "urword", + "type": "double precision", + }, + "scrn_bot": { + "block": "connectiondata", + "description": "value that defines the bottom elevation of the screen for the multi-aquifer well connection. If CONDEQN is SPECIFIED, THIEM, SKIN, or CUMULATIVE, SCRN_BOT can be any value and is set to the bottom of the cell. If CONDEQN is MEAN, SCRN_BOT is set to the multi-aquifer well connection cell bottom if the specified value is less than the cell bottom. The program will terminate with an error if the screen bottom is greater than the screen top.", + "longname": "screen bottom", + "name": "scrn_bot", + "reader": "urword", + "type": "double precision", + }, + "scrn_top": { + "block": "connectiondata", + "description": "value that defines the top elevation of the screen for the multi-aquifer well connection. If CONDEQN is SPECIFIED, THIEM, SKIN, or CUMULATIVE, SCRN_TOP can be any value and is set to the top of the cell. If CONDEQN is MEAN, SCRN_TOP is set to the multi-aquifer well connection cell top if the specified value is greater than the cell top. The program will terminate with an error if the screen top is less than the screen bottom.", + "longname": "screen top", + "name": "scrn_top", + "reader": "urword", + "type": "double precision", + }, + }, + "name": "connectiondata", + "reader": "urword", + "type": "record", + }, + "name": "connectiondata", + "reader": "urword", + "type": "recarray", + } + }, + "dimensions": { + "nmawwells": { + "block": "dimensions", + "description": "integer value specifying the number of multi-aquifer wells that will be simulated for all stress periods.", + "longname": "number of maw wells", + "name": "nmawwells", + "optional": False, + "reader": "urword", + "type": "integer", + } + }, + "fkeys": { + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "ts_filerecord": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + }, + "multi": True, + "name": "gwf-maw", + "options": { + "auxiliary": { + "block": "options", + "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", + "longname": "keyword to specify aux variables", + "name": "auxiliary", + "optional": True, + "reader": "urword", + "shape": "(naux)", + "type": "string", + }, + "boundnames": { + "block": "options", + "description": "keyword to indicate that boundary names may be provided with the list of multi-aquifer well cells.", + "name": "boundnames", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "budget_filerecord": { + "block": "options", + "fields": { + "budgetfile": { + "block": "options", + "description": "name of the binary output file to write budget information.", + "longname": "file keyword", + "name": "budgetfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "budget_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "budgetcsv_filerecord": { + "block": "options", + "fields": { + "budgetcsvfile": { + "block": "options", + "description": "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.", + "longname": "file keyword", + "name": "budgetcsvfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "budgetcsv_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "flow_correction": { + "block": "options", + "description": "keyword that activates flow corrections in cases where the head in a multi-aquifer well is below the bottom of the screen for a connection or the head in a convertible cell connected to a multi-aquifer well is below the cell bottom. 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.", + "longname": "activate flow correction", + "name": "flow_correction", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "flowing_wells": { + "block": "options", + "description": "keyword that activates the flowing wells option for the multi-aquifer well package.", + "longname": "activate flowing wells", + "name": "flowing_wells", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "head_filerecord": { + "block": "options", + "fields": { + "headfile": { + "block": "options", + "description": "name of the binary output file to write head information.", + "longname": "file keyword", + "name": "headfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "head_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "mfrcsv_filerecord": { + "block": "options", + "fields": { + "mfrcsvfile": { + "block": "options", + "description": "name of the comma-separated value (CSV) output file to write information about multi-aquifer well extraction or injection rates that have been reduced by the program. Entries are only written if the extraction or injection rates are reduced.", + "longname": "file keyword", + "name": "mfrcsvfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "mfrcsv_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "mover": { + "block": "options", + "description": "keyword to indicate that this instance of the maw package can be used with the water mover (mvr) package. when the mover option is specified, additional memory is allocated within the package to store the available, provided, and received water.", + "name": "mover", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "no_well_storage": { + "block": "options", + "description": "keyword that deactivates inclusion of well storage contributions to the multi-aquifer well package continuity equation.", + "longname": "deactivate well storage", + "name": "no_well_storage", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of multi-aquifer well 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.", + "longname": "print calculated flows to listing file", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_head": { + "block": "options", + "description": "keyword to indicate that the list of multi-aquifer well {#2} will be printed to the listing file for every stress period in which 'head print' is specified in output control. if there is no output control option and print_{#3} is specified, then {#2} are printed for the last time step of each stress period.", + "longname": "print calculated heads to listing file", + "name": "print_head", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of multi-aquifer well information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that multi-aquifer well flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save well flows to budget file", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "shutdown_kappa": { + "block": "options", + "description": "value that defines the weight applied to discharge rate for wells that limit the water level in a discharging well (defined using the head_limit keyword in the stress period data). shutdown_kappa is used to control discharge rate oscillations when the flow rate from the aquifer is less than the specified flow rate from the aquifer to the well. values range between 0.0 and 1.0, and larger values increase the weight applied to the well discharge rate. the head_limit option has been included to facilitate backward compatibility with previous versions of modflow but use of the rate_scaling option instead of the head_limit option is recommended. by default, shutdown_kappa is 0.0001.", + "longname": "shutdown kappa", + "name": "shutdown_kappa", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "shutdown_theta": { + "block": "options", + "description": "value that defines the weight applied to discharge rate for wells that limit the water level in a discharging well (defined using the head_limit keyword in the stress period data). shutdown_theta is used to control discharge rate oscillations when the flow rate from the aquifer is less than the specified flow rate from the aquifer to the well. values range between 0.0 and 1.0, and larger values increase the weight (decrease under-relaxation) applied to the well discharge rate. the head_limit option has been included to facilitate backward compatibility with previous versions of modflow but use of the rate_scaling option instead of the head_limit option is recommended. by default, shutdown_theta is 0.7.", + "longname": "shutdown theta", + "name": "shutdown_theta", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "timeseries": { + "block": "options", + "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", + "name": "timeseries", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + "type": "record ts6 filein ts6_filename", + }, + }, + "packagedata": { + "packagedata": { + "block": "packagedata", + "item": { + "block": "packagedata", + "fields": { + "aux": { + "block": "packagedata", + "description": "represents the values of the auxiliary variables for each multi-aquifer well. The values of auxiliary variables must be present for each multi-aquifer well. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "auxiliary variables", + "name": "aux", + "optional": "true", + "reader": "urword", + "shape": "(naux)", + "time_series": "true", + "type": "double precision", + }, + "bottom": { + "block": "packagedata", + "description": "bottom elevation of the multi-aquifer well. If CONDEQN is SPECIFIED, THIEM, SKIN, or CUMULATIVE, BOTTOM is set to the cell bottom in the lowermost GWF cell connection in cases where the specified well bottom is above the bottom of this GWF cell. If CONDEQN is MEAN, BOTTOM is set to the lowermost GWF cell connection screen bottom in cases where the specified well bottom is above this value. The bottom elevation defines the lowest well head that will be simulated when the NEWTON UNDER_RELAXATION option is specified in the GWF model name file. The bottom elevation is also used to calculate volumetric storage in the well.", + "longname": "well bottom", + "name": "bottom", + "reader": "urword", + "type": "double precision", + }, + "boundname": { + "block": "packagedata", + "description": "name of the multi-aquifer well cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", + "longname": "well name", + "name": "boundname", + "optional": "true", + "reader": "urword", + "type": "string", + }, + "condeqn": { + "block": "packagedata", + "description": "character string that defines the conductance equation that is used to calculate the saturated conductance for the multi-aquifer well. Possible multi-aquifer well CONDEQN strings include: SPECIFIED--character keyword to indicate the multi-aquifer well saturated conductance will be specified. THIEM--character keyword to indicate the multi-aquifer well saturated conductance will be calculated using the Thiem equation, which considers the cell top and bottom, aquifer hydraulic conductivity, and effective cell and well radius. SKIN--character keyword to indicate that the multi-aquifer well saturated conductance will be calculated using the cell top and bottom, aquifer and screen hydraulic conductivity, and well and skin radius. CUMULATIVE--character keyword to indicate that the multi-aquifer well saturated conductance will be calculated using a combination of the Thiem and SKIN equations. MEAN--character keyword to indicate the multi-aquifer well saturated conductance will be calculated using the aquifer and screen top and bottom, aquifer and screen hydraulic conductivity, and well and skin radius. The CUMULATIVE conductance equation is identical to the SKIN LOSSTYPE in the Multi-Node Well (MNW2) package for MODFLOW-2005. The program will terminate with an error condition if CONDEQN is SKIN or CUMULATIVE and the calculated saturated conductance is less than zero; if an error condition occurs, it is suggested that the THIEM or MEAN conductance equations be used for these multi-aquifer wells.", + "longname": "conductance equation", + "name": "condeqn", + "reader": "urword", + "type": "string", + }, + "ifno": { + "block": "period", + "description": "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.", + "longname": "well number for this entry", + "name": "ifno", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "ngwfnodes": { + "block": "packagedata", + "description": "integer value that defines the number of GWF nodes connected to this (IFNO) multi-aquifer well. NGWFNODES must be greater than zero.", + "longname": "number of connected GWF cells", + "name": "ngwfnodes", + "reader": "urword", + "type": "integer", + }, + "radius": { + "block": "packagedata", + "description": "radius for the multi-aquifer well. The program will terminate with an error if the radius is less than or equal to zero.", + "longname": "well radius", + "name": "radius", + "reader": "urword", + "type": "double precision", + }, + "strt": { + "block": "packagedata", + "description": "starting head for the multi-aquifer well. The program will terminate with an error if the starting head is less than the specified well bottom.", + "longname": "starting head", + "name": "strt", + "reader": "urword", + "type": "double precision", + }, + }, + "name": "packagedata", + "reader": "urword", + "type": "record", + }, + "name": "packagedata", + "reader": "urword", + "shape": "(nmawwells)", + "type": "recarray", + } + }, + "period": { + "perioddata": { + "block": "period", + "item": { + "block": "period", + "fields": { + "ifno": { + "block": "period", + "description": "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.", + "longname": "well number for this entry", + "name": "ifno", + "numeric_index": True, + "reader": "urword", + "type": "integer", + }, + "mawsetting": { + "block": "period", + "choices": { + "auxiliaryrecord": { + "block": "period", + "fields": { + "auxiliary": { + "block": "period", + "description": "keyword for specifying auxiliary variable.", + "name": "auxiliary", + "reader": "urword", + "type": "keyword", + }, + "auxname": { + "block": "period", + "description": "name for the auxiliary variable to be assigned AUXVAL. AUXNAME must match one of the auxiliary variable names defined in the OPTIONS block. If AUXNAME does not match one of the auxiliary variable names defined in the OPTIONS block the data are ignored.", + "name": "auxname", + "reader": "urword", + "type": "string", + }, + "auxval": { + "block": "period", + "description": "value for the auxiliary variable. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "auxiliary variable value", + "name": "auxval", + "reader": "urword", + "time_series": "true", + "type": "double precision", + }, + }, + "name": "auxiliaryrecord", + "reader": "urword", + "type": "record", + }, + "flowing_wellrecord": { + "block": "period", + "fields": { + "flowing_well": { + "block": "period", + "description": "keyword to indicate the well is a flowing well. The FLOWING_WELL option can be used to simulate flowing wells when the simulated well head exceeds the specified drainage elevation.", + "longname": "well is a flowing well", + "name": "flowing_well", + "reader": "urword", + "type": "keyword", + }, + "fwcond": { + "block": "period", + "description": "conductance used to calculate the discharge of a free flowing well. Flow occurs when the head in the well is above the well top elevation (FWELEV).", + "longname": "well flowing well conductance", + "name": "fwcond", + "reader": "urword", + "type": "double precision", + }, + "fwelev": { + "block": "period", + "description": "elevation used to determine whether or not the well is flowing.", + "longname": "flowing well elevation", + "name": "fwelev", + "reader": "urword", + "type": "double precision", + }, + "fwrlen": { + "block": "period", + "description": "length used to reduce the conductance of the flowing well. When the head in the well drops below the well top plus the reduction length, then the conductance is reduced. This reduction length can be used to improve the stability of simulations with flowing wells so that there is not an abrupt change in flowing well rates.", + "longname": "flowing well reduction length", + "name": "fwrlen", + "reader": "urword", + "type": "double precision", + }, + }, + "name": "flowing_wellrecord", + "reader": "urword", + "type": "record", + }, + "head_limit": { + "block": "period", + "description": "is the limiting water level (head) in the well, which is the minimum of the well rate or the well inflow rate from the aquifer. head_limit can be applied to extraction wells (rate $<$ 0) or injection wells (rate $>$ 0). head_limit can be deactivated by specifying the text string `off'. the head_limit option is based on the head_limit functionality available in the mnw2~citep{konikow2009} package for modflow-2005. the head_limit option has been included to facilitate backward compatibility with previous versions of modflow but use of the rate_scaling option instead of the head_limit option is recommended. by default, head_limit is `off'.", + "longname": "head limit", + "name": "head_limit", + "reader": "urword", + "type": "string", + }, + "rate": { + "block": "period", + "description": "is the volumetric pumping rate for the multi-aquifer well. a positive value indicates recharge and a negative value indicates discharge (pumping). rate only applies to active (status is active) multi-aquifer wells. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value. by default, the rate for each multi-aquifer well is zero.", + "longname": "well pumping rate", + "name": "rate", + "reader": "urword", + "time_series": True, + "type": "double precision", + }, + "rate_scalingrecord": { + "block": "period", + "fields": { + "pump_elevation": { + "block": "period", + "description": "is the elevation of the multi-aquifer well pump (PUMP_ELEVATION). PUMP_ELEVATION should not be less than the bottom elevation (BOTTOM) of the multi-aquifer well.", + "longname": "pump elevation", + "name": "pump_elevation", + "reader": "urword", + "type": "double precision", + }, + "rate_scaling": { + "block": "period", + "description": "activate rate scaling. If RATE_SCALING is specified, both PUMP_ELEVATION and SCALING_LENGTH must be specified. RATE_SCALING cannot be used with HEAD_LIMIT. RATE_SCALING can be used for extraction or injection wells. For extraction wells, the extraction rate will start to decrease once the head in the well lowers to a level equal to the pump elevation plus the scaling length. If the head in the well drops below the pump elevation, then the extraction rate is calculated to be zero. For an injection well, the injection rate will begin to decrease once the head in the well rises above the specified pump elevation. If the head in the well rises above the pump elevation plus the scaling length, then the injection rate will be set to zero.", + "longname": "rate scaling", + "name": "rate_scaling", + "reader": "urword", + "type": "keyword", + }, + "scaling_length": { + "block": "period", + "description": "height above the pump elevation (SCALING_LENGTH). If the simulated well head is below this elevation (pump elevation plus the scaling length), then the pumping rate is reduced.", + "name": "scaling_length", + "reader": "urword", + "type": "double precision", + }, + }, + "name": "rate_scalingrecord", + "reader": "urword", + "type": "record", + }, + "shutoffrecord": { + "block": "period", + "fields": { + "maxrate": { + "block": "period", + "description": "is the maximum rate that a well must exceed to reactivate a well during a stress period. The well will reactivate during a timestep if the well was shutdown during the previous time step and the flow rate to the well from the aquifer exceeds maxrate. Reactivation of the well cannot occur until the next time step if a well is shutdown to reduce oscillations. maxrate must be greater than MINRATE.", + "longname": "maximum shutoff rate", + "name": "maxrate", + "reader": "urword", + "type": "double precision", + }, + "minrate": { + "block": "period", + "description": "is the minimum rate that a well must exceed to shutoff a well during a stress period. The well will shut down during a time step if the flow rate to the well from the aquifer is less than MINRATE. If a well is shut down during a time step, reactivation of the well cannot occur until the next time step to reduce oscillations. MINRATE must be less than maxrate.", + "longname": "minimum shutoff rate", + "name": "minrate", + "reader": "urword", + "type": "double precision", + }, + "shut_off": { + "block": "period", + "description": "keyword for activating well shut off capability. Subsequent values define the minimum and maximum pumping rate that a well must exceed to shutoff or reactivate a well, respectively, during a stress period. SHUT_OFF is only applied to injection wells (RATE$<0$) and if HEAD_LIMIT is specified (not set to `OFF'). If HEAD_LIMIT is specified, SHUT_OFF can be deactivated by specifying a minimum value equal to zero. The SHUT_OFF option is based on the SHUT_OFF functionality available in the MNW2~citep{konikow2009} package for MODFLOW-2005. The SHUT_OFF option has been included to facilitate backward compatibility with previous versions of MODFLOW but use of the RATE_SCALING option instead of the SHUT_OFF option is recommended. By default, SHUT_OFF is not used.", + "longname": "shut off well", + "name": "shut_off", + "reader": "urword", + "type": "keyword", + }, + }, + "name": "shutoffrecord", + "reader": "urword", + "type": "record", + }, + "status": { + "block": "period", + "description": "keyword option to define well status. status can be active, inactive, or constant. by default, status is active.", + "longname": "well status", + "name": "status", + "reader": "urword", + "type": "string", + }, + "well_head": { + "block": "period", + "description": "is the head in the multi-aquifer well. well_head is only applied to constant head (status is constant) and inactive (status is inactive) multi-aquifer wells. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value. the program will terminate with an error if well_head is less than the bottom of the well.", + "longname": "well head", + "name": "well_head", + "reader": "urword", + "time_series": True, + "type": "double precision", + }, + }, + "description": "line of information that is parsed into a keyword and values. keyword values that can be used to start the mawsetting string include: status, flowing_well, rate, well_head, head_limit, shut_off, rate_scaling, and auxiliary.", + "name": "mawsetting", + "reader": "urword", + "type": "keystring", + }, + }, + "name": "perioddata", + "reader": "urword", + "type": "record", + }, + "name": "perioddata", + "reader": "urword", + "type": "recarray", + }, + "transient_block": True, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwfmvr.py b/flopy/mf6/modflow/mfgwfmvr.py index 9955dfdc15..eb823fd4ef 100644 --- a/flopy/mf6/modflow/mfgwfmvr.py +++ b/flopy/mf6/modflow/mfgwfmvr.py @@ -353,6 +353,222 @@ class ModflowGwfmvr(MFPackage): "reader urword", ], ] + spec = { + "advanced": False, + "dimensions": { + "maxmvr": { + "block": "dimensions", + "description": "integer value specifying the maximum number of water mover entries that will specified for any stress period.", + "longname": "maximum number of movers", + "name": "maxmvr", + "optional": False, + "reader": "urword", + "type": "integer", + }, + "maxpackages": { + "block": "dimensions", + "description": "integer value specifying the number of unique packages that are included in this water mover input file.", + "longname": "number of packages to be used with the mover", + "name": "maxpackages", + "optional": False, + "reader": "urword", + "type": "integer", + }, + }, + "multi": False, + "name": "gwf-mvr", + "options": { + "budget_filerecord": { + "block": "options", + "fields": { + "budgetfile": { + "block": "options", + "description": "name of the output file to write budget information.", + "longname": "file keyword", + "name": "budgetfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "budget_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "budgetcsv_filerecord": { + "block": "options", + "fields": { + "budgetcsvfile": { + "block": "options", + "description": "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.", + "longname": "file keyword", + "name": "budgetcsvfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "budgetcsv_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "modelnames": { + "block": "options", + "description": "keyword to indicate that all package names will be preceded by the model name for the package. model names are required when the mover package is used with a gwf-gwf exchange. the modelname keyword should not be used for a mover package that is for a single gwf model.", + "longname": "precede all package names with model names", + "name": "modelnames", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of mvr 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.", + "longname": "print calculated flows to listing file", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of mvr information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + "packages": { + "packages": { + "block": "packages", + "item": { + "block": "packages", + "fields": { + "mname": { + "block": "packages", + "description": "name of model containing the package. Model names are assigned by the user in the simulation name file.", + "name": "mname", + "optional": "true", + "reader": "urword", + "type": "string", + }, + "pname": { + "block": "packages", + "description": "is the name of a package that may be included in a subsequent stress period block. The package name is assigned in the name file for the GWF Model. Package names are optionally provided in the name file. If they are not provided by the user, then packages are assigned a default value, which is the package acronym followed by a hyphen and the package number. For example, the first Drain Package is named DRN-1. The second Drain Package is named DRN-2, and so forth.", + "name": "pname", + "optional": "false", + "reader": "urword", + "type": "string", + }, + }, + "name": "packages", + "optional": False, + "reader": "urword", + "type": "record", + }, + "name": "packages", + "optional": False, + "reader": "urword", + "shape": "(npackages)", + "type": "recarray", + } + }, + "period": { + "perioddata": { + "block": "period", + "item": { + "block": "period", + "fields": { + "id1": { + "block": "period", + "description": "is the identifier for the provider. For the standard boundary packages, the provider identifier is the number of the boundary as it is listed in the package input file. (Note that the order of these boundaries may change by stress period, which must be accounted for in the Mover Package.) So the first well has an identifier of one. The second is two, and so forth. For the advanced packages, the identifier is the reach number (SFR Package), well number (MAW Package), or UZF cell number. For the Lake Package, ID1 is the lake outlet number. Thus, outflows from a single lake can be routed to different streams, for example.", + "longname": "provider reach", + "name": "id1", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "id2": { + "block": "period", + "description": "is the identifier for the receiver. The receiver identifier is the reach number (SFR Package), Lake number (LAK Package), well number (MAW Package), or UZF cell number.", + "longname": "receiver reach", + "name": "id2", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "mname1": { + "block": "period", + "description": "name of model containing the package, PNAME1.", + "name": "mname1", + "optional": "true", + "reader": "urword", + "type": "string", + }, + "mname2": { + "block": "period", + "description": "name of model containing the package, PNAME2.", + "name": "mname2", + "optional": "true", + "reader": "urword", + "type": "string", + }, + "mvrtype": { + "block": "period", + "description": "is the character string signifying the method for determining how much water will be moved. Supported values are 'FACTOR' 'EXCESS' 'THRESHOLD' and 'UPTO'. These four options determine how the receiver flow rate, $Q_R$, is calculated. These options mirror the options defined for the cprior variable in the SFR package, with the term 'FACTOR' being functionally equivalent to the 'FRACTION' option for cprior.", + "longname": "mover type", + "name": "mvrtype", + "reader": "urword", + "type": "string", + }, + "pname1": { + "block": "period", + "description": "is the package name for the provider. The package PNAME1 must be designated to provide water through the MVR Package by specifying the keyword 'MOVER' in its OPTIONS block.", + "longname": "provider package name", + "name": "pname1", + "reader": "urword", + "type": "string", + }, + "pname2": { + "block": "period", + "description": "is the package name for the receiver. The package PNAME2 must be designated to receive water from the MVR Package by specifying the keyword 'MOVER' in its OPTIONS block.", + "longname": "receiver package name", + "name": "pname2", + "reader": "urword", + "type": "string", + }, + "value": { + "block": "period", + "description": "is the value to be used in the equation for calculating the amount of water to move. For the 'FACTOR' option, VALUE is the $alpha$ factor. For the remaining options, VALUE is the specified flow rate, $Q_S$.", + "longname": "mover value", + "name": "value", + "reader": "urword", + "type": "double precision", + }, + }, + "name": "perioddata", + "reader": "urword", + "type": "record", + }, + "name": "perioddata", + "reader": "urword", + "shape": "(maxbound)", + "type": "recarray", + }, + "transient_block": True, + }, + "ref": { + "abbr": "mvr", + "key": "mvr_filerecord", + "param": "perioddata", + "parent": "parent_model_or_package", + "val": "perioddata", + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwfnam.py b/flopy/mf6/modflow/mfgwfnam.py index d82373b7aa..f34ff2ee73 100644 --- a/flopy/mf6/modflow/mfgwfnam.py +++ b/flopy/mf6/modflow/mfgwfnam.py @@ -308,6 +308,185 @@ class ModflowGwfnam(MFPackage): "optional true", ], ] + spec = { + "advanced": False, + "multi": False, + "name": "gwf-nam", + "options": { + "list": { + "block": "options", + "description": "is name of the listing file to create for this gwf model. if not specified, then the name of the list file will be the basename of the gwf model name file and the '.lst' extension. for example, if the gwf name file is called 'my.model.nam' then the list file will be called 'my.model.lst'.", + "longname": "name of listing file", + "name": "list", + "optional": True, + "reader": "urword", + "type": "string", + }, + "nc_filerecord": { + "block": "options", + "description": "netcdf filerecord", + "fields": { + "netcdf_filename": { + "block": "options", + "description": "defines a NetCDF input file.", + "extended": "true", + "longname": "netcdf input filename", + "mf6internal": "netcdf_fname", + "name": "netcdf_filename", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "nc_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "nc_mesh2d_filerecord": { + "block": "options", + "description": "netcdf layered mesh fileout record.", + "fields": { + "ncmesh2dfile": { + "block": "options", + "description": "name of the NetCDF ugrid layered mesh output file.", + "extended": "true", + "longname": "file keyword", + "name": "ncmesh2dfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "ncmesh2drec", + "name": "nc_mesh2d_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "nc_structured_filerecord": { + "block": "options", + "description": "netcdf structured fileout record.", + "fields": { + "ncstructfile": { + "block": "options", + "description": "name of the NetCDF structured output file.", + "extended": "true", + "longname": "file keyword", + "name": "ncstructfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "ncstructrec", + "name": "nc_structured_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "newtonoptions": { + "block": "options", + "description": "none", + "fields": { + "newton": { + "block": "options", + "description": "keyword that activates the Newton-Raphson formulation for groundwater flow between connected, convertible groundwater cells and stress packages that support calculation of Newton-Raphson terms for groundwater exchanges. Cells will not dry when this option is used. By default, the Newton-Raphson formulation is not applied.", + "longname": "keyword to activate Newton-Raphson formulation", + "name": "newton", + "reader": "urword", + "type": "keyword", + }, + "under_relaxation": { + "block": "options", + "description": "keyword that indicates whether the groundwater head in a cell will be under-relaxed when water levels fall below the bottom of the model below any given cell. By default, Newton-Raphson UNDER_RELAXATION is not applied.", + "longname": "keyword to activate Newton-Raphson UNDER_RELAXATION option", + "name": "under_relaxation", + "optional": "true", + "reader": "urword", + "type": "keyword", + }, + }, + "longname": "newton keyword and options", + "name": "newtonoptions", + "optional": True, + "reader": "urword", + "type": "record", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of all model package 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.", + "longname": "print calculated flows to listing file", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of all model stress package information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that all model package flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save flows for all packages to budget file", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + "packages": { + "packages": { + "block": "packages", + "item": { + "block": "packages", + "fields": { + "fname": { + "block": "packages", + "description": "is the name of the file containing the package input. The path to the file should be included if the file is not located in the folder where the program was run.", + "longname": "file name", + "name": "fname", + "reader": "urword", + "type": "string", + }, + "ftype": { + "block": "packages", + "description": "is the file type, which must be one of the following character values shown in table~ref{table:ftype-gwf}. Ftype may be entered in any combination of uppercase and lowercase.", + "longname": "package type", + "name": "ftype", + "reader": "urword", + "type": "string", + }, + "pname": { + "block": "packages", + "description": "is the user-defined name for the package. PNAME is restricted to 16 characters. No spaces are allowed in PNAME. PNAME character values are read and stored by the program for stress packages only. These names may be useful for labeling purposes when multiple stress packages of the same type are located within a single GWF Model. If PNAME is specified for a stress package, then PNAME will be used in the flow budget table in the listing file; it will also be used for the text entry in the cell-by-cell budget file. PNAME is case insensitive and is stored in all upper case letters.", + "longname": "user name for package", + "name": "pname", + "optional": "true", + "reader": "urword", + "type": "string", + }, + }, + "longname": "package list", + "name": "packages", + "optional": False, + "reader": "urword", + "type": "record", + }, + "longname": "package list", + "name": "packages", + "optional": False, + "reader": "urword", + "type": "recarray", + } + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwfnpf.py b/flopy/mf6/modflow/mfgwfnpf.py index f31bcdb47d..f959cbbabb 100644 --- a/flopy/mf6/modflow/mfgwfnpf.py +++ b/flopy/mf6/modflow/mfgwfnpf.py @@ -39,7 +39,10 @@ class ModflowGwfnpf(MFPackage): signifies that the conductance will be calculated using arithmetic-mean thickness and harmonic-mean hydraulic conductivity. if the user does not specify a value for alternative_cell_averaging, then the harmonic-mean method - will be used. this option cannot be used if the xt3d option is invoked. + will be used. this option cannot be used if the xt3d option is invoked. the + amt-hmk alternative_cell_averaging option, in combination with the + dry_cell_saturation option, can be used to calculate the same horizontal + conductance as modflow-usg when upstream weighting is used (laycon=4). thickstrt : keyword indicates that cells having a negative icelltype are confined, and their cell thickness for conductance calculations will be computed as strt-bot rather than @@ -101,6 +104,16 @@ class ModflowGwfnpf(MFPackage): added to the right-hand side. If the RHS keyword is excluded, then the XT3D terms will be put into the coefficient matrix. + highest_cell_saturation : keyword + keyword indicating that the maximum cell bottom will be used to calculate the + saturation used to calculate the horizontal conductance between cells. this + option is intended to prevent flow from leaving a dry cell and is based on + cite{painter2008robust}. this option is only applied when the newton-raphson + formulation is used, a warning will be issued if this option is specified and + the newton-raphson formulation is not specified in the gwf name file. this + option, in combination with the amt-hmk alternative_cell_averaging option, can + be used to calculate the same horizontal conductance as modflow-usg when + upstream weighting is used (laycon=4). save_specific_discharge : keyword keyword to indicate that x, y, and z components of specific discharge will be calculated at cell centers and written to the budget file, which is specified @@ -133,8 +146,11 @@ class ModflowGwfnpf(MFPackage): keyword that specifies input griddata arrays should be written to layered ascii output files. export_array_netcdf : keyword - keyword that specifies input griddata arrays should be written to the model - output netcdf file. + keyword that specifies input gridded arrays should be written to the model + output netcdf file with attributes that support using the generated file as a + 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. dev_no_newton : keyword turn off newton for unconfined cells dev_omega : double precision @@ -375,6 +391,14 @@ class ModflowGwfnpf(MFPackage): "optional true", "mf6internal ixt3drhs", ], + [ + "block options", + "name highest_cell_saturation", + "type keyword", + "reader urword", + "optional true", + "mf6internal ihighcellsat", + ], [ "block options", "name save_specific_discharge", @@ -573,6 +597,383 @@ class ModflowGwfnpf(MFPackage): "optional true", ], ] + spec = { + "advanced": False, + "fkeys": { + "tvk_filerecord": { + "abbr": "tvk", + "key": "tvk_filerecord", + "param": "tvk_perioddata", + "parent": "parent_package", + "val": "perioddata", + } + }, + "griddata": { + "angle1": { + "block": "griddata", + "description": "is a rotation angle of the hydraulic conductivity tensor in degrees. the angle represents the first of three sequential rotations of the hydraulic conductivity ellipsoid. with the k11, k22, and k33 axes of the ellipsoid initially aligned with the x, y, and z coordinate axes, respectively, angle1 rotates the ellipsoid about its k33 axis (within the x - y plane). a positive value represents counter-clockwise rotation when viewed from any point on the positive k33 axis, looking toward the center of the ellipsoid. a value of zero indicates that the k11 axis lies within the x - z plane. if angle1 is not specified, default values of zero are assigned to angle1, angle2, and angle3, in which case the k11, k22, and k33 axes are aligned with the x, y, and z axes, respectively.", + "layered": True, + "longname": "first anisotropy rotation angle (degrees)", + "name": "angle1", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "angle2": { + "block": "griddata", + "description": "is a rotation angle of the hydraulic conductivity tensor in degrees. the angle represents the second of three sequential rotations of the hydraulic conductivity ellipsoid. following the rotation by angle1 described above, angle2 rotates the ellipsoid about its k22 axis (out of the x - y plane). an array can be specified for angle2 only if angle1 is also specified. a positive value of angle2 represents clockwise rotation when viewed from any point on the positive k22 axis, looking toward the center of the ellipsoid. a value of zero indicates that the k11 axis lies within the x - y plane. if angle2 is not specified, default values of zero are assigned to angle2 and angle3; connections that are not user-designated as vertical are assumed to be strictly horizontal (that is, to have no z component to their orientation); and connection lengths are based on horizontal distances.", + "layered": True, + "longname": "second anisotropy rotation angle (degrees)", + "name": "angle2", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "angle3": { + "block": "griddata", + "description": "is a rotation angle of the hydraulic conductivity tensor in degrees. the angle represents the third of three sequential rotations of the hydraulic conductivity ellipsoid. following the rotations by angle1 and angle2 described above, angle3 rotates the ellipsoid about its k11 axis. an array can be specified for angle3 only if angle1 and angle2 are also specified. an array must be specified for angle3 if angle2 is specified. a positive value of angle3 represents clockwise rotation when viewed from any point on the positive k11 axis, looking toward the center of the ellipsoid. a value of zero indicates that the k22 axis lies within the x - y plane.", + "layered": True, + "longname": "third anisotropy rotation angle (degrees)", + "name": "angle3", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "icelltype": { + "block": "griddata", + "default": 0, + "description": "flag for each cell that specifies how saturated thickness is treated. 0 means saturated thickness is held constant; $>$0 means saturated thickness varies with computed head when head is below the cell top; $<$0 means saturated thickness varies with computed head unless the thickstrt option is in effect. when thickstrt is in effect, a negative value for icelltype indicates that the saturated thickness value used in conductance calculations in the npf package will be computed as strt-bot and held constant. if the thickstrt option is not in effect, then negative values provided by the user for icelltype are automatically reassigned by the program to a value of one.", + "layered": True, + "longname": "confined or convertible indicator", + "name": "icelltype", + "netcdf": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "integer", + }, + "k": { + "block": "griddata", + "default": 1.0, + "description": "is the hydraulic conductivity. for the common case in which the user would like to specify the horizontal hydraulic conductivity and the vertical hydraulic conductivity, then k should be assigned as the horizontal hydraulic conductivity, k33 should be assigned as the vertical hydraulic conductivity, and k22 and the three rotation angles should not be specified. when more sophisticated anisotropy is required, then k corresponds to the k11 hydraulic conductivity axis. all included cells (idomain $>$ 0) must have a k value greater than zero.", + "layered": True, + "longname": "hydraulic conductivity (l/t)", + "name": "k", + "netcdf": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "k22": { + "block": "griddata", + "description": "is the hydraulic conductivity of the second ellipsoid axis (or the ratio of k22/k if the k22overk option is specified); for an unrotated case this is the hydraulic conductivity in the y direction. if k22 is not included in the griddata block, then k22 is set equal to k. for a regular modflow grid (dis package is used) in which no rotation angles are specified, k22 is the hydraulic conductivity along columns in the y direction. for an unstructured disu grid, the user must assign principal x and y axes and provide the angle for each cell face relative to the assigned x direction. all included cells (idomain $>$ 0) must have a k22 value greater than zero.", + "layered": True, + "longname": "hydraulic conductivity of second ellipsoid axis", + "name": "k22", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "k33": { + "block": "griddata", + "description": "is the hydraulic conductivity of the third ellipsoid axis (or the ratio of k33/k if the k33overk option is specified); for an unrotated case, this is the vertical hydraulic conductivity. when anisotropy is applied, k33 corresponds to the k33 tensor component. all included cells (idomain $>$ 0) must have a k33 value greater than zero.", + "layered": True, + "longname": "hydraulic conductivity of third ellipsoid axis (l/t)", + "name": "k33", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "wetdry": { + "block": "griddata", + "description": "is a combination of the wetting threshold and a flag to indicate which neighboring cells can cause a cell to become wet. if wetdry $<$ 0, only a cell below a dry cell can cause the cell to become wet. if wetdry $>$ 0, the cell below a dry cell and horizontally adjacent cells can cause a cell to become wet. if wetdry is 0, the cell cannot be wetted. the absolute value of wetdry is the wetting threshold. when the sum of bot and the absolute value of wetdry at a dry cell is equaled or exceeded by the head at an adjacent cell, the cell is wetted. wetdry must be specified if 'rewet' is specified in the options block. if 'rewet' is not specified in the options block, then wetdry can be entered, and memory will be allocated for it, even though it is not used.", + "layered": True, + "longname": "wetdry threshold and factor", + "name": "wetdry", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + }, + "multi": False, + "name": "gwf-npf", + "options": { + "alternative_cell_averaging": { + "block": "options", + "description": "is a text keyword to indicate that an alternative method will be used for calculating the conductance for horizontal cell connections. the text value for alternative_cell_averaging can be 'logarithmic', 'amt-lmk', or 'amt-hmk'. 'amt-lmk' signifies that the conductance will be calculated using arithmetic-mean thickness and logarithmic-mean hydraulic conductivity. 'amt-hmk' signifies that the conductance will be calculated using arithmetic-mean thickness and harmonic-mean hydraulic conductivity. if the user does not specify a value for alternative_cell_averaging, then the harmonic-mean method will be used. this option cannot be used if the xt3d option is invoked. the amt-hmk alternative_cell_averaging option, in combination with the dry_cell_saturation option, can be used to calculate the same horizontal conductance as modflow-usg when upstream weighting is used (laycon=4).", + "longname": "conductance weighting option", + "mf6internal": "cellavg", + "name": "alternative_cell_averaging", + "optional": True, + "reader": "urword", + "type": "string", + "valid": "logarithmic amt-lmk amt-hmk", + }, + "cvoptions": { + "block": "options", + "description": "none", + "fields": { + "dewatered": { + "block": "options", + "description": "If the DEWATERED keyword is specified, then the vertical conductance is calculated using only the saturated thickness and properties of the overlying cell if the head in the underlying cell is below its top.", + "longname": "keyword to activate DEWATERED option", + "mf6internal": "idewatcv", + "name": "dewatered", + "optional": "true", + "reader": "urword", + "type": "keyword", + }, + "variablecv": { + "block": "options", + "description": "keyword to indicate that the vertical conductance will be calculated using the saturated thickness and properties of the overlying cell and the thickness and properties of the underlying cell. If the DEWATERED keyword is also specified, then the vertical conductance is calculated using only the saturated thickness and properties of the overlying cell if the head in the underlying cell is below its top. If these keywords are not specified, then the default condition is to calculate the vertical conductance at the start of the simulation using the initial head and the cell properties. The vertical conductance remains constant for the entire simulation.", + "longname": "keyword to activate VARIABLECV option", + "mf6internal": "ivarcv", + "name": "variablecv", + "reader": "urword", + "type": "keyword", + }, + }, + "longname": "vertical conductance options", + "name": "cvoptions", + "optional": True, + "reader": "urword", + "type": "record", + }, + "dev_no_newton": { + "block": "options", + "description": "turn off newton for unconfined cells", + "longname": "turn off newton for unconfined cells", + "mf6internal": "inewton", + "name": "dev_no_newton", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "dev_omega": { + "block": "options", + "description": "set saturation omega value", + "longname": "set saturation omega value", + "mf6internal": "satomega", + "name": "dev_omega", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "export_array_ascii": { + "block": "options", + "description": "keyword that specifies input griddata arrays should be written to layered ascii output files.", + "longname": "export array variables to layered ascii files.", + "mf6internal": "export_ascii", + "name": "export_array_ascii", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "export_array_netcdf": { + "block": "options", + "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", + "extended": True, + "longname": "export array variables to netcdf output files.", + "mf6internal": "export_nc", + "name": "export_array_netcdf", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "highest_cell_saturation": { + "block": "options", + "description": "keyword indicating that the maximum cell bottom will be used to calculate the saturation used to calculate the horizontal conductance between cells. this option is intended to prevent flow from leaving a dry cell and is based on~cite{painter2008robust}. this option is only applied when the newton-raphson formulation is used, a warning will be issued if this option is specified and the newton-raphson formulation is not specified in the gwf name file. this option, in combination with the amt-hmk alternative_cell_averaging option, can be used to calculate the same horizontal conductance as modflow-usg when upstream weighting is used (laycon=4).", + "longname": "keyword to activate highest_cell_saturation option", + "mf6internal": "ihighcellsat", + "name": "highest_cell_saturation", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "k22overk": { + "block": "options", + "description": "keyword to indicate that specified k22 is a ratio of k22 divided by k. if this option is specified, then the k22 array entered in the npf package will be multiplied by k after being read.", + "longname": "keyword to indicate that specified k22 is a ratio", + "mf6internal": "ik22overk", + "name": "k22overk", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "k33overk": { + "block": "options", + "description": "keyword to indicate that specified k33 is a ratio of k33 divided by k. if this option is specified, then the k33 array entered in the npf package will be multiplied by k after being read.", + "longname": "keyword to indicate that specified k33 is a ratio", + "mf6internal": "ik33overk", + "name": "k33overk", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "perched": { + "block": "options", + "description": "keyword to indicate that when a cell is overlying a dewatered convertible cell, the head difference used in darcy's law is equal to the head in the overlying cell minus the bottom elevation of the overlying cell. if not specified, then the default is to use the head difference between the two cells.", + "longname": "keyword to activate perched option", + "mf6internal": "iperched", + "name": "perched", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "perioddata": { + "block": "options", + "description": "Contains data for the tvk package. Data can be passed as a dictionary to the tvk package with variable names as keys and package data as values. Data for the perioddata variable is also acceptable. See tvk package documentation for more information.", + "name": "perioddata", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "tvk", + "key": "tvk_filerecord", + "param": "tvk_perioddata", + "parent": "parent_package", + "val": "perioddata", + }, + "type": "record tvk6 filein tvk6_filename", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that calculated flows between cells 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. this option can produce extremely large list files because all cell-by-cell flows are printed. it should only be used with the npf package for models that have a small number of cells.", + "longname": "keyword to print npf flows to listing file", + "mf6internal": "iprflow", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "rewet_record": { + "block": "options", + "fields": { + "ihdwet": { + "block": "options", + "description": "is a keyword and integer flag that determines which equation is used to define the initial head at cells that become wet. If IHDWET is 0, h = BOT + WETFCT (hm - BOT). If IHDWET is not 0, h = BOT + WETFCT (THRESH).", + "longname": "flag to determine wetting equation", + "name": "ihdwet", + "optional": "false", + "reader": "urword", + "type": "integer", + }, + "iwetit": { + "block": "options", + "description": "is a keyword and iteration interval for attempting to wet cells. Wetting is attempted every IWETIT iteration. This applies to outer iterations and not inner iterations. If IWETIT is specified as zero or less, then the value is changed to 1.", + "longname": "interval to use for rewetting", + "name": "iwetit", + "optional": "false", + "reader": "urword", + "type": "integer", + }, + "rewet": { + "block": "options", + "description": "activates model rewetting. Rewetting is off by default.", + "longname": "keyword to activate rewetting", + "mf6internal": "irewet", + "name": "rewet", + "optional": "false", + "reader": "urword", + "type": "keyword", + }, + "wetfct": { + "block": "options", + "description": "is a keyword and factor that is included in the calculation of the head that is initially established at a cell when that cell is converted from dry to wet.", + "longname": "wetting factor to use for rewetting", + "name": "wetfct", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + }, + "name": "rewet_record", + "optional": True, + "reader": "urword", + "type": "record", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that budget flow terms will be written to the file specified with 'budget save file' in output control.", + "longname": "keyword to save npf flows", + "mf6internal": "ipakcb", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_saturation": { + "block": "options", + "description": "keyword to indicate that cell saturation will be written to the budget file, which is specified with 'budget save file' in output control. saturation will be saved to the budget file as an auxiliary variable saved with the data-sat text label. saturation is a cell variable that ranges from zero to one and can be used by post processing programs to determine how much of a cell volume is saturated. if icelltype is 0, then saturation is always one.", + "longname": "keyword to save saturation", + "mf6internal": "isavsat", + "name": "save_saturation", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_specific_discharge": { + "block": "options", + "description": "keyword to indicate that x, y, and z components of specific discharge will be calculated at cell centers and written to the budget file, which is specified with 'budget save file' in output control. if this option is activated, then additional information may be required in the discretization packages and the gwf exchange package (if gwf models are coupled). specifically, angldegx must be specified in the connectiondata block of the disu package; angldegx must also be specified for the gwf exchange as an auxiliary variable.", + "longname": "keyword to save specific discharge", + "mf6internal": "isavspdis", + "name": "save_specific_discharge", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "thickstrt": { + "block": "options", + "description": "indicates that cells having a negative icelltype are confined, and their cell thickness for conductance calculations will be computed as strt-bot rather than top-bot. this option should be used with caution as it only affects conductance calculations in the npf package.", + "longname": "keyword to activate thickstrt option", + "mf6internal": "ithickstrt", + "name": "thickstrt", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "xt3doptions": { + "block": "options", + "description": "none", + "fields": { + "rhs": { + "block": "options", + "description": "If the RHS keyword is also included, then the XT3D additional terms will be added to the right-hand side. If the RHS keyword is excluded, then the XT3D terms will be put into the coefficient matrix.", + "longname": "keyword to XT3D on right hand side", + "mf6internal": "ixt3drhs", + "name": "rhs", + "optional": "true", + "reader": "urword", + "type": "keyword", + }, + "xt3d": { + "block": "options", + "description": "keyword indicating that the XT3D formulation will be used. If the RHS keyword is also included, then the XT3D additional terms will be added to the right-hand side. If the RHS keyword is excluded, then the XT3D terms will be put into the coefficient matrix. Use of XT3D will substantially increase the computational effort, but will result in improved accuracy for anisotropic conductivity fields and for unstructured grids in which the CVFD requirement is violated. XT3D requires additional information about the shapes of grid cells. If XT3D is active and the DISU Package is used, then the user will need to provide in the DISU Package the angldegx array in the CONNECTIONDATA block and the VERTICES and CELL2D blocks.", + "longname": "keyword to activate XT3D", + "mf6internal": "ixt3d", + "name": "xt3d", + "reader": "urword", + "type": "keyword", + }, + }, + "longname": "keyword to activate xt3d", + "name": "xt3doptions", + "optional": True, + "reader": "urword", + "type": "record", + }, + }, + } def __init__( self, @@ -586,6 +987,7 @@ def __init__( perched=None, rewet_record=None, xt3doptions=None, + highest_cell_saturation=None, save_specific_discharge=None, save_saturation=None, k22overk=None, @@ -627,6 +1029,9 @@ def __init__( self.perched = self.build_mfdata("perched", perched) self.rewet_record = self.build_mfdata("rewet_record", rewet_record) self.xt3doptions = self.build_mfdata("xt3doptions", xt3doptions) + self.highest_cell_saturation = self.build_mfdata( + "highest_cell_saturation", highest_cell_saturation + ) self.save_specific_discharge = self.build_mfdata( "save_specific_discharge", save_specific_discharge ) diff --git a/flopy/mf6/modflow/mfgwfoc.py b/flopy/mf6/modflow/mfgwfoc.py index 654904c43f..b3bad05ce1 100644 --- a/flopy/mf6/modflow/mfgwfoc.py +++ b/flopy/mf6/modflow/mfgwfoc.py @@ -92,6 +92,7 @@ class ModflowGwfoc(MFPackage): "reader urword", "tagged true", "optional true", + "mf6internal budfilerec", ], [ "block options", @@ -132,6 +133,7 @@ class ModflowGwfoc(MFPackage): "reader urword", "tagged true", "optional true", + "mf6internal budcsvfilerec", ], [ "block options", @@ -162,6 +164,7 @@ class ModflowGwfoc(MFPackage): "reader urword", "tagged true", "optional true", + "mf6internal headfilerec", ], [ "block options", @@ -191,6 +194,7 @@ class ModflowGwfoc(MFPackage): "shape", "reader urword", "optional true", + "mf6internal headprintrec", ], [ "block options", @@ -364,6 +368,169 @@ class ModflowGwfoc(MFPackage): "reader urword", ], ] + spec = { + "advanced": False, + "multi": False, + "name": "gwf-oc", + "options": { + "budget_filerecord": { + "block": "options", + "fields": { + "budgetfile": { + "block": "options", + "description": "name of the output file to write budget information.", + "longname": "file keyword", + "name": "budgetfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "budfilerec", + "name": "budget_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "budgetcsv_filerecord": { + "block": "options", + "fields": { + "budgetcsvfile": { + "block": "options", + "description": "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.", + "longname": "file keyword", + "name": "budgetcsvfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "budcsvfilerec", + "name": "budgetcsv_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "head_filerecord": { + "block": "options", + "fields": { + "headfile": { + "block": "options", + "description": "name of the output file to write head information.", + "longname": "file keyword", + "name": "headfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "headfilerec", + "name": "head_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "headprintrecord": { + "block": "options", + "fields": { + "head": { + "block": "options", + "description": "keyword to specify that record corresponds to head.", + "longname": "head keyword", + "name": "head", + "optional": "false", + "reader": "urword", + "type": "keyword", + }, + "print_format": { + "block": "options", + "description": "keyword to specify format for printing to the listing file.", + "longname": "keyword to indicate that a print format follows", + "name": "print_format", + "optional": "false", + "reader": "urword", + "type": "keyword", + }, + }, + "mf6internal": "headprintrec", + "name": "headprintrecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + }, + "period": { + "printrecord": { + "block": "period", + "fields": { + "ocsetting": { + "block": "period", + "description": "specifies the steps for which the data will be saved.", + "name": "ocsetting", + "reader": "urword", + "type": "keystring all first last frequency steps", + }, + "print": { + "block": "period", + "description": "keyword to indicate that information will be printed this stress period.", + "longname": "keyword to save", + "name": "print", + "optional": "false", + "reader": "urword", + "type": "keyword", + }, + "rtype": { + "block": "period", + "description": "type of information to save or print. Can be BUDGET or HEAD.", + "longname": "record type", + "name": "rtype", + "optional": "false", + "reader": "urword", + "type": "string", + }, + }, + "name": "printrecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "saverecord": { + "block": "period", + "fields": { + "ocsetting": { + "block": "period", + "description": "specifies the steps for which the data will be saved.", + "name": "ocsetting", + "reader": "urword", + "type": "keystring all first last frequency steps", + }, + "rtype": { + "block": "period", + "description": "type of information to save or print. Can be BUDGET or HEAD.", + "longname": "record type", + "name": "rtype", + "optional": "false", + "reader": "urword", + "type": "string", + }, + "save": { + "block": "period", + "description": "keyword to indicate that information will be saved this stress period.", + "longname": "keyword to save", + "name": "save", + "optional": "false", + "reader": "urword", + "type": "keyword", + }, + }, + "name": "saverecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "transient_block": True, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwfprt.py b/flopy/mf6/modflow/mfgwfprt.py index 93fabbf262..1800d478ef 100644 --- a/flopy/mf6/modflow/mfgwfprt.py +++ b/flopy/mf6/modflow/mfgwfprt.py @@ -40,6 +40,7 @@ class ModflowGwfprt(MFPackage): _package_type = "gwfprt" dfn_file_name = "exg-gwfprt.dfn" dfn = [["header"]] + spec = {"advanced": False, "multi": False, "name": "exg-gwfprt"} def __init__( self, diff --git a/flopy/mf6/modflow/mfgwfrch.py b/flopy/mf6/modflow/mfgwfrch.py index ec537d48fe..a334103270 100644 --- a/flopy/mf6/modflow/mfgwfrch.py +++ b/flopy/mf6/modflow/mfgwfrch.py @@ -61,8 +61,8 @@ class ModflowGwfrch(MFPackage): the observations variable is also acceptable. See obs package documentation for more information. maxbound : integer - integer value specifying the maximum number of recharge cells cells that will - be specified for use during any stress period. + integer value specifying the maximum number of recharge cells that will be + specified for use during any stress period. stress_period_data : [(cellid, recharge, aux, boundname)] * cellid : [integer] is the cell identifier, and depends on the type of grid that is used for the @@ -309,6 +309,197 @@ class ModflowGwfrch(MFPackage): "optional true", ], ] + spec = { + "advanced": False, + "dimensions": { + "maxbound": { + "block": "dimensions", + "description": "integer value specifying the maximum number of recharge cells that will be specified for use during any stress period.", + "longname": "maximum number of recharge cells", + "name": "maxbound", + "optional": False, + "reader": "urword", + "type": "integer", + } + }, + "fkeys": { + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "ts_filerecord": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + }, + "multi": True, + "name": "gwf-rch", + "options": { + "auxiliary": { + "block": "options", + "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", + "longname": "keyword to specify aux variables", + "name": "auxiliary", + "optional": True, + "reader": "urword", + "shape": "(naux)", + "type": "string", + }, + "auxmultname": { + "block": "options", + "description": "name of auxiliary variable to be used as multiplier of recharge.", + "longname": "name of auxiliary variable for multiplier", + "name": "auxmultname", + "optional": True, + "reader": "urword", + "type": "string", + }, + "boundnames": { + "block": "options", + "description": "keyword to indicate that boundary names may be provided with the list of recharge cells.", + "name": "boundnames", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "fixed_cell": { + "block": "options", + "description": "indicates that recharge will not be reassigned to a cell underlying the cell specified in the list if the specified cell is inactive.", + "longname": "if cell is dry do not apply recharge to underlying cell", + "name": "fixed_cell", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of recharge 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.", + "longname": "print recharge rates to listing file", + "mf6internal": "iprflow", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of recharge information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "mf6internal": "iprpak", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that recharge flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save recharge to budget file", + "mf6internal": "ipakcb", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "timeseries": { + "block": "options", + "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", + "name": "timeseries", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + "type": "record ts6 filein ts6_filename", + }, + }, + "period": { + "stress_period_data": { + "block": "period", + "item": { + "block": "period", + "fields": { + "aux": { + "block": "period", + "description": "represents the values of the auxiliary variables for each recharge. The values of auxiliary variables must be present for each recharge. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "auxiliary variables", + "mf6internal": "auxvar", + "name": "aux", + "optional": "true", + "reader": "urword", + "shape": "(naux)", + "time_series": "true", + "type": "double precision", + }, + "boundname": { + "block": "period", + "description": "name of the recharge cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", + "longname": "recharge name", + "name": "boundname", + "optional": "true", + "reader": "urword", + "type": "string", + }, + "cellid": { + "block": "period", + "description": "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 layer, row, and column. For a grid that uses the DISV input file, CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file, CELLID is the node number for the cell.", + "longname": "cell identifier", + "name": "cellid", + "reader": "urword", + "shape": "(ncelldim)", + "type": "integer", + }, + "recharge": { + "block": "period", + "description": "is the recharge flux rate ($LT^{-1}$). This rate is multiplied inside the program by the surface area of the cell to calculate the volumetric recharge rate. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "recharge rate", + "name": "recharge", + "reader": "urword", + "time_series": "true", + "type": "double precision", + }, + }, + "mf6internal": "spd", + "name": "stress_period_data", + "reader": "urword", + "type": "record", + }, + "mf6internal": "spd", + "name": "stress_period_data", + "reader": "urword", + "shape": "(maxbound)", + "type": "recarray", + }, + "transient_block": True, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwfrcha.py b/flopy/mf6/modflow/mfgwfrcha.py index 7ee952df2b..9f1e117ff2 100644 --- a/flopy/mf6/modflow/mfgwfrcha.py +++ b/flopy/mf6/modflow/mfgwfrcha.py @@ -65,8 +65,11 @@ class ModflowGwfrcha(MFPackage): the observations variable is also acceptable. See obs package documentation for more information. export_array_netcdf : keyword - keyword that specifies input griddata arrays should be written to the model - output netcdf file. + keyword that specifies input gridded arrays should be written to the model + output netcdf file with attributes that support using the generated file as a + 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. irch : [integer] irch is the layer number that defines the layer in each vertical column where recharge is applied. if irch is omitted, recharge by default is applied to @@ -270,6 +273,7 @@ class ModflowGwfrcha(MFPackage): "reader readarray", "numeric_index true", "optional true", + "netcdf true", ], [ "block period", @@ -278,6 +282,7 @@ class ModflowGwfrcha(MFPackage): "shape (ncol*nrow; ncpl)", "reader readarray", "time_series true", + "netcdf true", "default 1.e-3", ], [ @@ -288,9 +293,182 @@ class ModflowGwfrcha(MFPackage): "reader readarray", "time_series true", "optional true", + "netcdf true", "mf6internal auxvar", ], ] + spec = { + "advanced": False, + "fkeys": { + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "tas_filerecord": { + "abbr": "tas", + "key": "tas_filerecord", + "param": "tas_array", + "parent": "parent_package", + "val": "timearrayseries", + }, + }, + "multi": True, + "name": "gwf-rcha", + "options": { + "auxiliary": { + "block": "options", + "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", + "longname": "keyword to specify aux variables", + "name": "auxiliary", + "optional": True, + "reader": "urword", + "shape": "(naux)", + "type": "string", + }, + "auxmultname": { + "block": "options", + "description": "name of auxiliary variable to be used as multiplier of recharge.", + "longname": "name of auxiliary variable for multiplier", + "name": "auxmultname", + "optional": True, + "reader": "urword", + "type": "string", + }, + "export_array_netcdf": { + "block": "options", + "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", + "extended": True, + "longname": "export array variables to netcdf output files.", + "mf6internal": "export_nc", + "name": "export_array_netcdf", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "fixed_cell": { + "block": "options", + "description": "indicates that recharge will not be reassigned to a cell underlying the cell specified in the list if the specified cell is inactive.", + "longname": "if cell is dry do not apply recharge to underlying cell", + "name": "fixed_cell", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of recharge 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.", + "longname": "print recharge rates to listing file", + "mf6internal": "iprflow", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of recharge information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "mf6internal": "iprpak", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "readasarrays": { + "block": "options", + "default": True, + "description": "indicates that array-based input will be used for the recharge package. this keyword must be specified to use array-based input. when readasarrays is specified, values must be provided for every cell within a model layer, 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.", + "longname": "use array-based input", + "name": "readasarrays", + "optional": False, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that recharge flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save chd flows to budget file", + "mf6internal": "ipakcb", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "timearrayseries": { + "block": "options", + "description": "Contains data for the tas package. Data can be passed as a dictionary to the tas package with variable names as keys and package data as values. Data for the timearrayseries variable is also acceptable. See tas package documentation for more information.", + "name": "timearrayseries", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "tas", + "key": "tas_filerecord", + "param": "tas_array", + "parent": "parent_package", + "val": "timearrayseries", + }, + "type": "record tas6 filein tas6_filename", + }, + }, + "period": { + "aux": { + "block": "period", + "description": "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.", + "longname": "recharge auxiliary variable iaux", + "mf6internal": "auxvar", + "name": "aux", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(ncol*nrow; ncpl)", + "time_series": True, + "type": "double precision", + }, + "irch": { + "block": "period", + "description": "irch is the layer number that defines the layer in each vertical column where recharge is applied. if irch is omitted, recharge by default is applied to cells in layer 1. irch can only be used if readasarrays is specified in the options block. if irch is specified, it must be specified as the first variable in the period block or modflow will terminate with an error.", + "longname": "layer number for recharge", + "name": "irch", + "netcdf": True, + "numeric_index": True, + "optional": True, + "reader": "readarray", + "shape": "(ncol*nrow; ncpl)", + "type": "integer", + }, + "recharge": { + "block": "period", + "default": 0.001, + "description": "is the recharge flux rate ($lt^{-1}$). this rate is multiplied inside the program by the surface area of the cell to calculate the volumetric recharge rate. the recharge array may be defined by a time-array series (see the 'using time-array series in a package' section).", + "longname": "recharge rate", + "name": "recharge", + "netcdf": True, + "reader": "readarray", + "shape": "(ncol*nrow; ncpl)", + "time_series": True, + "type": "double precision", + }, + "transient_block": True, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwfriv.py b/flopy/mf6/modflow/mfgwfriv.py index 9e50f99988..7a71977307 100644 --- a/flopy/mf6/modflow/mfgwfriv.py +++ b/flopy/mf6/modflow/mfgwfriv.py @@ -339,6 +339,214 @@ class ModflowGwfriv(MFPackage): "optional true", ], ] + spec = { + "advanced": False, + "dimensions": { + "maxbound": { + "block": "dimensions", + "description": "integer value specifying the maximum number of rivers cells that will be specified for use during any stress period.", + "longname": "maximum number of rivers", + "name": "maxbound", + "optional": False, + "reader": "urword", + "type": "integer", + } + }, + "fkeys": { + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "ts_filerecord": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + }, + "multi": True, + "name": "gwf-riv", + "options": { + "auxiliary": { + "block": "options", + "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", + "longname": "keyword to specify aux variables", + "name": "auxiliary", + "optional": True, + "reader": "urword", + "shape": "(naux)", + "type": "string", + }, + "auxmultname": { + "block": "options", + "description": "name of auxiliary variable to be used as multiplier of riverbed conductance.", + "longname": "name of auxiliary variable for multiplier", + "name": "auxmultname", + "optional": True, + "reader": "urword", + "type": "string", + }, + "boundnames": { + "block": "options", + "description": "keyword to indicate that boundary names may be provided with the list of river cells.", + "name": "boundnames", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "mover": { + "block": "options", + "description": "keyword to indicate that this instance of the river package can be used with the water mover (mvr) package. when the mover option is specified, additional memory is allocated within the package to store the available, provided, and received water.", + "name": "mover", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of river 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.", + "longname": "print calculated flows to listing file", + "mf6internal": "iprflow", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of river information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "mf6internal": "iprpak", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that river flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save chd flows to budget file", + "mf6internal": "ipakcb", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "timeseries": { + "block": "options", + "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", + "name": "timeseries", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + "type": "record ts6 filein ts6_filename", + }, + }, + "period": { + "stress_period_data": { + "block": "period", + "item": { + "block": "period", + "fields": { + "aux": { + "block": "period", + "description": "represents the values of the auxiliary variables for each river. The values of auxiliary variables must be present for each river. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "auxiliary variables", + "mf6internal": "auxvar", + "name": "aux", + "optional": "true", + "reader": "urword", + "shape": "(naux)", + "time_series": "true", + "type": "double precision", + }, + "boundname": { + "block": "period", + "description": "name of the river cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", + "longname": "drain name", + "name": "boundname", + "optional": "true", + "reader": "urword", + "type": "string", + }, + "cellid": { + "block": "period", + "description": "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 layer, row, and column. For a grid that uses the DISV input file, CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file, CELLID is the node number for the cell.", + "longname": "cell identifier", + "name": "cellid", + "reader": "urword", + "shape": "(ncelldim)", + "type": "integer", + }, + "cond": { + "block": "period", + "description": "is the riverbed hydraulic conductance. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "river conductance", + "name": "cond", + "reader": "urword", + "time_series": "true", + "type": "double precision", + }, + "rbot": { + "block": "period", + "description": "is the elevation of the bottom of the riverbed. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "river bottom elevation", + "name": "rbot", + "reader": "urword", + "time_series": "true", + "type": "double precision", + }, + "stage": { + "block": "period", + "description": "is the head in the river. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "river stage", + "name": "stage", + "reader": "urword", + "time_series": "true", + "type": "double precision", + }, + }, + "mf6internal": "spd", + "name": "stress_period_data", + "reader": "urword", + "type": "record", + }, + "mf6internal": "spd", + "name": "stress_period_data", + "reader": "urword", + "shape": "(maxbound)", + "type": "recarray", + }, + "transient_block": True, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwfrivg.py b/flopy/mf6/modflow/mfgwfrivg.py new file mode 100644 index 0000000000..650d4687f6 --- /dev/null +++ b/flopy/mf6/modflow/mfgwfrivg.py @@ -0,0 +1,494 @@ +# 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 ModflowGwfrivg(MFPackage): + """ + ModflowGwfrivg defines a RIVG package. + + Parameters + ---------- + model + Model that this package is a part of. Package is automatically + added to model when it is initialized. + loading_package : bool, default False + Do not set this parameter. It is intended for debugging and internal + processing purposes only. + auxiliary : [string] + defines an array of one or more auxiliary variable names. there is no limit on + the number of auxiliary variables that can be provided on this line; however, + lists of information provided in subsequent blocks must have a column of data + for each auxiliary variable name defined here. the number of auxiliary + variables detected on this line determines the value for naux. comments cannot + be provided anywhere on this line as they will be interpreted as auxiliary + variable names. auxiliary variables may not be used by the package, but they + will be available for use by other parts of the program. the program will + terminate with an error if auxiliary variables are specified on more than one + line in the options block. + auxmultname : string + name of auxiliary variable to be used as multiplier of riverbed conductance. + print_input : keyword + keyword to indicate that the list of river information will be written to the + listing file immediately after it is read. + print_flows : keyword + keyword to indicate that the list of river 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 river flow terms will be written to the file specified + with 'budget fileout' in output control. + observations : record obs6 filein obs6_filename + Contains data for the obs package. Data can be passed as a dictionary to the + obs package with variable names as keys and package data as values. Data for + the observations variable is also acceptable. See obs package documentation for + more information. + mover : keyword + keyword to indicate that this instance of the river package can be used with + the water mover (mvr) package. when the mover option is specified, additional + memory is allocated within the package to store the available, provided, and + received water. + export_array_netcdf : keyword + keyword that specifies input gridded arrays should be written to the model + output netcdf file with attributes that support using the generated file as a + 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. + maxbound : integer + integer value specifying the maximum number of rivers cells that will be + specified for use during any stress period. + stage : [double precision] + is the head in the river. + cond : [double precision] + is the riverbed hydraulic conductance. + rbot : [double precision] + is the elevation of the bottom of the riverbed. + 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. + + 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`. + + """ + + auxiliary = ArrayTemplateGenerator(("gwf6", "rivg", "options", "auxiliary")) + obs_filerecord = ListTemplateGenerator( + ("gwf6", "rivg", "options", "obs_filerecord") + ) + stage = ArrayTemplateGenerator(("gwf6", "rivg", "period", "stage")) + cond = ArrayTemplateGenerator(("gwf6", "rivg", "period", "cond")) + rbot = ArrayTemplateGenerator(("gwf6", "rivg", "period", "rbot")) + aux = ArrayTemplateGenerator(("gwf6", "rivg", "period", "aux")) + package_abbr = "gwfrivg" + _package_type = "rivg" + dfn_file_name = "gwf-rivg.dfn" + dfn = [ + ["header", "multi-package", "package-type stress-package"], + [ + "block options", + "name readarraygrid", + "type keyword", + "reader urword", + "optional false", + "developmode true", + "default True", + ], + [ + "block options", + "name auxiliary", + "type string", + "shape (naux)", + "reader urword", + "optional true", + ], + [ + "block options", + "name auxmultname", + "type string", + "shape", + "reader urword", + "optional true", + ], + [ + "block options", + "name print_input", + "type keyword", + "reader urword", + "optional true", + "mf6internal iprpak", + ], + [ + "block options", + "name print_flows", + "type keyword", + "reader urword", + "optional true", + "mf6internal iprflow", + ], + [ + "block options", + "name save_flows", + "type keyword", + "reader urword", + "optional true", + "mf6internal ipakcb", + ], + [ + "block options", + "name obs_filerecord", + "type record obs6 filein obs6_filename", + "shape", + "reader urword", + "tagged true", + "optional true", + "construct_package obs", + "construct_data observations", + "parameter_name continuous", + ], + [ + "block options", + "name obs6", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name filein", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name obs6_filename", + "type string", + "preserve_case true", + "in_record true", + "tagged false", + "reader urword", + "optional false", + ], + [ + "block options", + "name mover", + "type keyword", + "tagged true", + "reader urword", + "optional true", + ], + [ + "block options", + "name export_array_netcdf", + "type keyword", + "reader urword", + "optional true", + "mf6internal export_nc", + "extended true", + ], + [ + "block dimensions", + "name maxbound", + "type integer", + "reader urword", + "optional true", + ], + [ + "block period", + "name iper", + "type integer", + "block_variable True", + "in_record true", + "tagged false", + "shape", + "valid", + "reader urword", + "optional false", + ], + [ + "block period", + "name stage", + "type double precision", + "shape (nodes)", + "reader readarray", + "layered true", + "netcdf true", + "default 3.e30", + ], + [ + "block period", + "name cond", + "type double precision", + "shape (nodes)", + "reader readarray", + "layered true", + "netcdf true", + "default 3.e30", + ], + [ + "block period", + "name rbot", + "type double precision", + "shape (nodes)", + "reader readarray", + "layered true", + "netcdf true", + "default 3.e30", + ], + [ + "block period", + "name aux", + "type double precision", + "shape (nodes)", + "reader readarray", + "layered true", + "netcdf true", + "optional true", + "mf6internal auxvar", + ], + ] + spec = { + "advanced": False, + "dimensions": { + "maxbound": { + "block": "dimensions", + "description": "integer value specifying the maximum number of rivers cells that will be specified for use during any stress period.", + "longname": "maximum number of river cells in any stress period", + "name": "maxbound", + "optional": True, + "reader": "urword", + "type": "integer", + } + }, + "fkeys": { + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + } + }, + "multi": True, + "name": "gwf-rivg", + "options": { + "auxiliary": { + "block": "options", + "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", + "longname": "keyword to specify aux variables", + "name": "auxiliary", + "optional": True, + "reader": "urword", + "shape": "(naux)", + "type": "string", + }, + "auxmultname": { + "block": "options", + "description": "name of auxiliary variable to be used as multiplier of riverbed conductance.", + "longname": "name of auxiliary variable for multiplier", + "name": "auxmultname", + "optional": True, + "reader": "urword", + "type": "string", + }, + "export_array_netcdf": { + "block": "options", + "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", + "extended": True, + "longname": "export array variables to netcdf output files.", + "mf6internal": "export_nc", + "name": "export_array_netcdf", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "mover": { + "block": "options", + "description": "keyword to indicate that this instance of the river package can be used with the water mover (mvr) package. when the mover option is specified, additional memory is allocated within the package to store the available, provided, and received water.", + "name": "mover", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of river 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.", + "longname": "print calculated flows to listing file", + "mf6internal": "iprflow", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of river information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "mf6internal": "iprpak", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "readarraygrid": { + "block": "options", + "default": True, + "description": "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).", + "developmode": True, + "longname": "use array-based grid input", + "name": "readarraygrid", + "optional": False, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that river flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save riv flows to budget file", + "mf6internal": "ipakcb", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + "period": { + "aux": { + "block": "period", + "description": "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.", + "layered": True, + "longname": "river auxiliary variable iaux", + "mf6internal": "auxvar", + "name": "aux", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "cond": { + "block": "period", + "default": 3e30, + "description": "is the riverbed hydraulic conductance.", + "layered": True, + "longname": "river conductnace", + "name": "cond", + "netcdf": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "rbot": { + "block": "period", + "default": 3e30, + "description": "is the elevation of the bottom of the riverbed.", + "layered": True, + "longname": "river bottom elevation", + "name": "rbot", + "netcdf": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "stage": { + "block": "period", + "default": 3e30, + "description": "is the head in the river.", + "layered": True, + "longname": "river stage", + "name": "stage", + "netcdf": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "transient_block": True, + }, + } + + def __init__( + self, + model, + loading_package=False, + auxiliary=None, + auxmultname=None, + print_input=None, + print_flows=None, + save_flows=None, + observations=None, + mover=None, + export_array_netcdf=None, + maxbound=None, + stage=3e30, + cond=3e30, + rbot=3e30, + aux=None, + filename=None, + pname=None, + **kwargs, + ): + """Initialize ModflowGwfrivg.""" + super().__init__( + parent=model, + package_type="rivg", + filename=filename, + pname=pname, + loading_package=loading_package, + **kwargs, + ) + + self.auxiliary = self.build_mfdata("auxiliary", auxiliary) + self.auxmultname = self.build_mfdata("auxmultname", auxmultname) + 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._obs_filerecord = self.build_mfdata("obs_filerecord", None) + self._obs_package = self.build_child_package( + "obs", observations, "continuous", self._obs_filerecord + ) + self.mover = self.build_mfdata("mover", mover) + self.export_array_netcdf = self.build_mfdata( + "export_array_netcdf", export_array_netcdf + ) + self.maxbound = self.build_mfdata("maxbound", maxbound) + self.stage = self.build_mfdata("stage", stage) + self.cond = self.build_mfdata("cond", cond) + self.rbot = self.build_mfdata("rbot", rbot) + self.aux = self.build_mfdata("aux", aux) + + self._init_complete = True diff --git a/flopy/mf6/modflow/mfgwfsfr.py b/flopy/mf6/modflow/mfgwfsfr.py index 0f3e2d1138..17310215bd 100644 --- a/flopy/mf6/modflow/mfgwfsfr.py +++ b/flopy/mf6/modflow/mfgwfsfr.py @@ -1313,6 +1313,821 @@ class ModflowGwfsfr(MFPackage): "time_series true", ], ] + spec = { + "advanced": True, + "connectiondata": { + "connectiondata": { + "block": "connectiondata", + "item": { + "block": "connectiondata", + "fields": { + "ic": { + "block": "connectiondata", + "description": "integer value that defines the reach number of the reach connected to the current reach and whether it is connected to the upstream or downstream end of the reach. Negative IC numbers indicate connected reaches are connected to the downstream end of the current reach. Positive IC numbers indicate connected reaches are connected to the upstream end of the current reach. The absolute value of IC must be greater than zero and less than or equal to NREACHES. IC should not be specified when NCON is zero but must be specified otherwise.", + "longname": "connected reach numbers", + "name": "ic", + "numeric_index": "true", + "optional": "true", + "reader": "urword", + "shape": "(ncon(ifno))", + "support_negative_index": "true", + "type": "integer", + }, + "ifno": { + "block": "period", + "description": "integer value that defines the feature (reach) number associated with the specified PERIOD data on the line. IFNO must be greater than zero and less than or equal to NREACHES.", + "longname": "reach number for this entry", + "name": "ifno", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + }, + "name": "connectiondata", + "reader": "urword", + "type": "record", + }, + "name": "connectiondata", + "reader": "urword", + "shape": "(maxbound)", + "type": "recarray", + } + }, + "crosssections": { + "crosssections": { + "block": "crosssections", + "item": { + "block": "crosssections", + "fields": { + "filein": { + "block": "period", + "description": "keyword to specify that an input filename is expected next.", + "longname": "file keyword", + "name": "filein", + "optional": "false", + "reader": "urword", + "type": "keyword", + }, + "ifno": { + "block": "period", + "description": "integer value that defines the feature (reach) number associated with the specified PERIOD data on the line. IFNO must be greater than zero and less than or equal to NREACHES.", + "longname": "reach number for this entry", + "name": "ifno", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "tab6": { + "block": "period", + "description": "keyword to specify that record corresponds to a cross-section table file.", + "longname": "head keyword", + "name": "tab6", + "optional": "false", + "reader": "urword", + "type": "keyword", + }, + "tab6_filename": { + "block": "period", + "description": "character string that defines the path and filename for the file containing cross-section table data for the reach. The TAB6_FILENAME file includes the number of entries in the file and the station elevation data in terms of the fractional width and the reach depth. Instructions for creating the TAB6_FILENAME input file are provided in SFR Reach Cross-Section Table Input File section.", + "longname": "table file name", + "name": "tab6_filename", + "optional": "false", + "reader": "urword", + "type": "string", + }, + }, + "name": "crosssections", + "optional": False, + "reader": "urword", + "type": "record", + }, + "name": "crosssections", + "optional": False, + "reader": "urword", + "type": "recarray", + } + }, + "dimensions": { + "nreaches": { + "block": "dimensions", + "description": "integer value specifying the number of stream reaches. there must be nreaches entries in the packagedata block.", + "longname": "maximum number reaches", + "name": "nreaches", + "optional": False, + "reader": "urword", + "type": "integer", + } + }, + "diversions": { + "diversions": { + "block": "diversions", + "item": { + "block": "diversions", + "fields": { + "cprior": { + "block": "diversions", + "description": "character string value that defines the the prioritization system for the diversion, such as when insufficient water is available to meet all diversion stipulations, and is used in conjunction with the value of FLOW value specified in the STRESS_PERIOD_DATA section. Available diversion options include: (1) CPRIOR = `FRACTION', then the amount of the diversion is computed as a fraction of the streamflow leaving reach IFNO ($Q_{DS}$); in this case, 0.0 $le$ DIVFLOW $le$ 1.0. (2) CPRIOR = `EXCESS', a diversion is made only if $Q_{DS}$ for reach IFNO exceeds the value of DIVFLOW. If this occurs, then the quantity of water diverted is the excess flow ($Q_{DS} -$ DIVFLOW) and $Q_{DS}$ from reach IFNO is set equal to DIVFLOW. This represents a flood-control type of diversion, as described by Danskin and Hanson (2002). (3) CPRIOR = `THRESHOLD', then if $Q_{DS}$ in reach IFNO is less than the specified diversion flow DIVFLOW, no water is diverted from reach IFNO. If $Q_{DS}$ in reach IFNO is greater than or equal to DIVFLOW, DIVFLOW is diverted and $Q_{DS}$ is set to the remainder ($Q_{DS} -$ DIVFLOW)). This approach assumes that once flow in the stream is sufficiently low, diversions from the stream cease, and is the `priority' algorithm that originally was programmed into the STR1 Package (Prudic, 1989). (4) CPRIOR = `UPTO' -- if $Q_{DS}$ in reach IFNO is greater than or equal to the specified diversion flow DIVFLOW, $Q_{DS}$ is reduced by DIVFLOW. If $Q_{DS}$ in reach IFNO is less than DIVFLOW, DIVFLOW is set to $Q_{DS}$ and there will be no flow available for reaches connected to downstream end of reach IFNO.", + "longname": "iprior code", + "name": "cprior", + "reader": "urword", + "type": "string", + }, + "iconr": { + "block": "diversions", + "description": "integer value that defines the downstream reach that will receive the diverted water. IDV must be greater than zero and less than or equal to NREACHES. Furthermore, reach ICONR must be a downstream connection for reach IFNO.", + "longname": "downstream reach number for diversion", + "name": "iconr", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "idv": { + "block": "period", + "description": "an integer value specifying which diversion of reach IFNO that DIVFLOW is being specified for. Must be less or equal to ndv for the current reach (IFNO).", + "longname": "diversion number", + "name": "idv", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "ifno": { + "block": "period", + "description": "integer value that defines the feature (reach) number associated with the specified PERIOD data on the line. IFNO must be greater than zero and less than or equal to NREACHES.", + "longname": "reach number for this entry", + "name": "ifno", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + }, + "name": "diversions", + "reader": "urword", + "type": "record", + }, + "name": "diversions", + "reader": "urword", + "shape": "(maxbound)", + "type": "recarray", + } + }, + "fkeys": { + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "ts_filerecord": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + }, + "initialstages": { + "initialstages": { + "block": "initialstages", + "item": { + "block": "initialstages", + "fields": { + "ifno": { + "block": "period", + "description": "integer value that defines the feature (reach) number associated with the specified PERIOD data on the line. IFNO must be greater than zero and less than or equal to NREACHES.", + "longname": "reach number for this entry", + "name": "ifno", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "initialstage": { + "block": "initialstages", + "description": "real value that defines the initial stage for the reach. The program will terminate with an error if INITIALSTAGE is less than the RTP value for reach IFNO defined in the PACKAGEDATA block. INITIALSTAGE data are used only if STORAGE is specified in the Options block and the first stress period is transient or for reaches defined to use the SIMPLE STATUS in the Period block.", + "longname": "initial reach stage", + "name": "initialstage", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + }, + "name": "initialstages", + "optional": False, + "reader": "urword", + "type": "record", + }, + "name": "initialstages", + "optional": False, + "reader": "urword", + "shape": "(maxbound)", + "type": "recarray", + } + }, + "multi": True, + "name": "gwf-sfr", + "options": { + "auxiliary": { + "block": "options", + "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", + "longname": "keyword to specify aux variables", + "name": "auxiliary", + "optional": True, + "reader": "urword", + "shape": "(naux)", + "type": "string", + }, + "boundnames": { + "block": "options", + "description": "keyword to indicate that boundary names may be provided with the list of stream reach cells.", + "name": "boundnames", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "budget_filerecord": { + "block": "options", + "fields": { + "budgetfile": { + "block": "options", + "description": "name of the binary output file to write budget information.", + "longname": "file keyword", + "name": "budgetfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "budget_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "budgetcsv_filerecord": { + "block": "options", + "fields": { + "budgetcsvfile": { + "block": "options", + "description": "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.", + "longname": "file keyword", + "name": "budgetcsvfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "budgetcsv_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "dev_storage_weight": { + "block": "options", + "description": "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.", + "longname": "reach storage time weighting", + "name": "dev_storage_weight", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "length_conversion": { + "block": "options", + "description": "real value that is used to convert user-specified manning's roughness coefficients from meters to model length units. length_conversion should be set to 3.28081, 1.0, and 100.0 when using length units (length_units) of feet, meters, or centimeters in the simulation, respectively. length_conversion does not need to be specified if length_units are meters.", + "longname": "length conversion factor", + "name": "length_conversion", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "maximum_depth_change": { + "block": "options", + "description": "real value that defines the depth closure tolerance. by default, maximum_depth_change is equal to $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 reach is too small or too large, respectively.", + "longname": "depth closure tolerance", + "name": "maximum_depth_change", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "maximum_iterations": { + "block": "options", + "description": "integer value that defines the maximum number of streamflow routing newton-raphson iterations allowed for a reach. by default, maximum_iterations is equal to 100. maximum_iterations would only need to be increased from the default value if one or more reach in a simulation has a large water budget error.", + "longname": "sfr newton-raphson iterations", + "name": "maximum_iterations", + "optional": True, + "reader": "urword", + "type": "integer", + }, + "maximum_picard_iterations": { + "block": "options", + "description": "integer value that defines the maximum number of streamflow routing picard iterations allowed when solving for reach stages and flows as part of the gwf formulate step. picard iterations are used to minimize differences in sfr package results between subsequent gwf picard (non-linear) iterations as a result of non-optimal reach numbering. if reaches are numbered in order, from upstream to downstream, maximum_picard_iterations can be set to 1 to reduce model run time. by default, maximum_picard_iterations is equal to 100.", + "longname": "sfr picard iterations", + "name": "maximum_picard_iterations", + "optional": True, + "reader": "urword", + "type": "integer", + }, + "mover": { + "block": "options", + "description": "keyword to indicate that this instance of the sfr package can be used with the water mover (mvr) package. when the mover option is specified, additional memory is allocated within the package to store the available, provided, and received water.", + "name": "mover", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "package_convergence_filerecord": { + "block": "options", + "fields": { + "package_convergence_filename": { + "block": "options", + "description": "name of the comma spaced values output file to write package convergence information.", + "longname": "file keyword", + "name": "package_convergence_filename", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "package_convergence_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of stream reach 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.", + "longname": "print calculated flows to listing file", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of stream reach information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_stage": { + "block": "options", + "description": "keyword to indicate that the list of stream reach {#2} will be printed to the listing file for every stress period in which 'head print' is specified in output control. if there is no output control option and print_{#3} is specified, then {#2} are printed for the last time step of each stress period.", + "longname": "print calculated stages to listing file", + "name": "print_stage", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that stream reach flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save stream reach flows to budget file", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "stage_filerecord": { + "block": "options", + "fields": { + "stagefile": { + "block": "options", + "description": "name of the binary output file to write stage information.", + "longname": "file keyword", + "name": "stagefile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "stage_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "storage": { + "block": "options", + "description": "keyword that activates storage contributions to the stream-flow routing package continuity equation.", + "longname": "activate reach storage", + "name": "storage", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "time_conversion": { + "block": "options", + "description": "real value that is used to convert user-specified manning's roughness coefficients from seconds to model time units. time_conversion should be set to 1.0, 60.0, 3,600.0, 86,400.0, and 31,557,600.0 when using time units (time_units) of seconds, minutes, hours, days, or years in the simulation, respectively. time_conversion does not need to be specified if time_units are seconds.", + "longname": "time conversion factor", + "name": "time_conversion", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "timeseries": { + "block": "options", + "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", + "name": "timeseries", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + "type": "record ts6 filein ts6_filename", + }, + "unit_conversion": { + "block": "options", + "deprecated": "6.4.2", + "description": "real value that is used to convert user-specified manning's roughness coefficients from seconds per meters$^{1/3}$ to model length and time units. a constant of 1.486 is used for flow units of cubic feet per second, and a constant of 1.0 is used for units of cubic meters per second. the constant must be multiplied by 86,400 when using time units of days in the simulation.", + "longname": "conversion factor", + "name": "unit_conversion", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + }, + "packagedata": { + "packagedata": { + "block": "packagedata", + "item": { + "block": "packagedata", + "fields": { + "aux": { + "block": "packagedata", + "description": "represents the values of the auxiliary variables for each stream reach. The values of auxiliary variables must be present for each stream reach. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "auxiliary variables", + "name": "aux", + "optional": "true", + "reader": "urword", + "shape": "(naux)", + "time_series": "true", + "type": "double precision", + }, + "boundname": { + "block": "packagedata", + "description": "name of the stream reach cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", + "longname": "well name", + "name": "boundname", + "optional": "true", + "reader": "urword", + "type": "string", + }, + "cellid": { + "block": "packagedata", + "description": "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 layer, row, and column. For a grid that uses the DISV input file, CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file, CELLID is the node number for the cell. For reaches that are not connected to an underlying GWF cell, a zero should be specified for each grid dimension. For example, for a DIS grid a CELLID of 0 0 0 should be specified. Reach-aquifer flow is not calculated for unconnected reaches. The keyword NONE can be still be specified to identify unconnected reaches for backward compatibility with previous versions of MODFLOW 6 but eventually NONE will be deprecated and will cause MODFLOW 6 to terminate with an error.", + "longname": "cell identifier", + "name": "cellid", + "reader": "urword", + "shape": "(ncelldim)", + "type": "integer", + }, + "ifno": { + "block": "period", + "description": "integer value that defines the feature (reach) number associated with the specified PERIOD data on the line. IFNO must be greater than zero and less than or equal to NREACHES.", + "longname": "reach number for this entry", + "name": "ifno", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "man": { + "block": "packagedata", + "description": "real or character value that defines the Manning's roughness coefficient for the reach. MAN must be greater than zero. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "Manning's roughness coefficient", + "name": "man", + "reader": "urword", + "time_series": "true", + "type": "string", + }, + "ncon": { + "block": "packagedata", + "description": "integer value that defines the number of reaches connected to the reach. If a value of zero is specified for NCON an entry for IFNO is still required in the subsequent CONNECTIONDATA block.", + "longname": "number of connected reaches", + "name": "ncon", + "reader": "urword", + "type": "integer", + }, + "ndv": { + "block": "packagedata", + "description": "integer value that defines the number of downstream diversions for the reach.", + "longname": "number of downstream reaches", + "name": "ndv", + "reader": "urword", + "type": "integer", + }, + "rbth": { + "block": "packagedata", + "description": "real value that defines the thickness of the reach streambed. RBTH can be any value if the reach is not connected to an underlying GWF cell. Otherwise, RBTH must be greater than zero.", + "longname": "streambed thickness", + "name": "rbth", + "reader": "urword", + "type": "double precision", + }, + "rgrd": { + "block": "packagedata", + "description": "real value that defines the stream gradient (slope) across the reach. RGRD must be greater than zero.", + "longname": "stream gradient", + "name": "rgrd", + "reader": "urword", + "type": "double precision", + }, + "rhk": { + "block": "packagedata", + "description": "real or character value that defines the hydraulic conductivity of the reach streambed. RHK can be any positive value if the reach is not connected to an underlying GWF cell. Otherwise, RHK must be greater than zero. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "reach bed hydraulic conductivity", + "name": "rhk", + "reader": "urword", + "time_series": "true", + "type": "double precision", + }, + "rlen": { + "block": "packagedata", + "description": "real value that defines the reach length. RLEN must be greater than zero.", + "longname": "reach length", + "name": "rlen", + "reader": "urword", + "type": "double precision", + }, + "rtp": { + "block": "packagedata", + "description": "real value that defines the top elevation of the streambed of a reach.", + "longname": "reach streambed top elevation", + "name": "rtp", + "reader": "urword", + "type": "double precision", + }, + "rwid": { + "block": "packagedata", + "description": "real value that defines the reach width. RWID must be greater than zero.", + "longname": "reach width", + "name": "rwid", + "reader": "urword", + "type": "double precision", + }, + "ustrf": { + "block": "packagedata", + "description": "real value that defines the fraction of upstream flow from each upstream reach that is applied as upstream inflow to the reach. The sum of all USTRF values for all reaches connected to the same upstream reach must be equal to one and USTRF must be greater than or equal to zero. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "fraction of upstream flow", + "name": "ustrf", + "reader": "urword", + "time_series": "true", + "type": "double precision", + }, + }, + "name": "packagedata", + "reader": "urword", + "type": "record", + }, + "name": "packagedata", + "reader": "urword", + "shape": "(maxbound)", + "type": "recarray", + } + }, + "period": { + "perioddata": { + "block": "period", + "item": { + "block": "period", + "fields": { + "ifno": { + "block": "period", + "description": "integer value that defines the feature (reach) number associated with the specified period data on the line. ifno must be greater than zero and less than or equal to nreaches.", + "longname": "reach number for this entry", + "name": "ifno", + "numeric_index": True, + "reader": "urword", + "type": "integer", + }, + "sfrsetting": { + "block": "period", + "choices": { + "auxiliaryrecord": { + "block": "period", + "fields": { + "auxiliary": { + "block": "period", + "description": "keyword for specifying auxiliary variable.", + "name": "auxiliary", + "reader": "urword", + "type": "keyword", + }, + "auxname": { + "block": "period", + "description": "name for the auxiliary variable to be assigned AUXVAL. AUXNAME must match one of the auxiliary variable names defined in the OPTIONS block. If AUXNAME does not match one of the auxiliary variable names defined in the OPTIONS block the data are ignored.", + "name": "auxname", + "reader": "urword", + "type": "string", + }, + "auxval": { + "block": "period", + "description": "value for the auxiliary variable. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "auxiliary variable value", + "name": "auxval", + "reader": "urword", + "time_series": "true", + "type": "double precision", + }, + }, + "name": "auxiliaryrecord", + "reader": "urword", + "type": "record", + }, + "bedk": { + "block": "period", + "description": "real or character value that defines the hydraulic conductivity of the reach streambed. bedk can be any positive value if the reach is not connected to an underlying gwf cell. otherwise, bedk must be greater than zero. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "reach bed hydraulic conductivity", + "name": "bedk", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "cross_sectionrecord": { + "block": "period", + "fields": { + "cross_section": { + "block": "period", + "description": "keyword to specify that record corresponds to a reach cross-section.", + "longname": "cross_section keyword", + "name": "cross_section", + "optional": "false", + "reader": "urword", + "type": "keyword", + }, + "filein": { + "block": "period", + "description": "keyword to specify that an input filename is expected next.", + "longname": "file keyword", + "name": "filein", + "optional": "false", + "reader": "urword", + "type": "keyword", + }, + "tab6": { + "block": "period", + "description": "keyword to specify that record corresponds to a cross-section table file.", + "longname": "head keyword", + "name": "tab6", + "optional": "false", + "reader": "urword", + "type": "keyword", + }, + "tab6_filename": { + "block": "period", + "description": "character string that defines the path and filename for the file containing cross-section table data for the reach. The TAB6_FILENAME file includes the number of entries in the file and the station elevation data in terms of the fractional width and the reach depth. Instructions for creating the TAB6_FILENAME input file are provided in SFR Reach Cross-Section Table Input File section.", + "longname": "table file name", + "name": "tab6_filename", + "optional": "false", + "reader": "urword", + "type": "string", + }, + }, + "name": "cross_sectionrecord", + "reader": "urword", + "type": "record", + }, + "diversionrecord": { + "block": "period", + "fields": { + "diversion": { + "block": "period", + "description": "keyword to indicate diversion record.", + "longname": "diversion keyword", + "name": "diversion", + "reader": "urword", + "type": "keyword", + }, + "divflow": { + "block": "period", + "description": "real or character value that defines the volumetric diversion (DIVFLOW) rate for the streamflow routing reach. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "volumetric diversion flow rate", + "name": "divflow", + "reader": "urword", + "time_series": "true", + "type": "double precision", + }, + "idv": { + "block": "period", + "description": "an integer value specifying which diversion of reach IFNO that DIVFLOW is being specified for. Must be less or equal to ndv for the current reach (IFNO).", + "longname": "diversion number", + "name": "idv", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + }, + "name": "diversionrecord", + "reader": "urword", + "type": "record", + }, + "evaporation": { + "block": "period", + "description": "real or character value that defines the volumetric rate per unit area of water subtracted by evaporation from the streamflow routing reach. a positive evaporation rate should be provided. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value. if the volumetric evaporation rate for a reach exceeds the sources of water to the reach (upstream and specified inflows, rainfall, and runoff but excluding groundwater leakage into the reach) the volumetric evaporation rate is limited to the sources of water to the reach. by default, evaporation rates are zero for each reach.", + "longname": "evaporation rate", + "name": "evaporation", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "inflow": { + "block": "period", + "description": "real or character value that defines the volumetric inflow rate for the streamflow routing reach. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value. by default, inflow rates are zero for each reach.", + "longname": "inflow rate", + "name": "inflow", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "manning": { + "block": "period", + "description": "real or character value that defines the manning's roughness coefficient for the reach. manning must be greater than zero. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "reach manning's roughness coefficient", + "name": "manning", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "rainfall": { + "block": "period", + "description": "real or character value that defines the volumetric rate per unit area of water added by precipitation directly on the streamflow routing reach. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value. by default, rainfall rates are zero for each reach.", + "longname": "rainfall rate", + "name": "rainfall", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "runoff": { + "block": "period", + "description": "real or character value that defines the volumetric rate of diffuse overland runoff that enters the streamflow routing reach. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value. if the volumetric runoff rate for a reach is negative and exceeds inflows to the reach (upstream and specified inflows, and rainfall but excluding groundwater leakage into the reach) the volumetric runoff rate is limited to inflows to the reach and the volumetric evaporation rate for the reach is set to zero. by default, runoff rates are zero for each reach.", + "longname": "runoff rate", + "name": "runoff", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "stage": { + "block": "period", + "description": "real or character value that defines the stage for the reach. the specified stage is only applied if the reach uses the simple routing option. if stage is not specified for reaches that use the simple routing option, the specified stage is set to the top of the reach. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "reach stage", + "name": "stage", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "status": { + "block": "period", + "description": "keyword option to define stream reach status. status can be active, inactive, or simple. the simple status option simulates streamflow using a user-specified stage for a reach or a stage set to the top of the reach (depth = 0). in cases where the simulated leakage calculated using the specified stage exceeds the sum of inflows to the reach, the stage is set to the top of the reach and leakage is set equal to the sum of inflows. upstream fractions should be changed using the upstream_fraction sfrsetting if the status for one or more reaches is changed to active or inactive. for example, if one of two downstream connections for a reach is inactivated, the upstream fraction for the active and inactive downstream reach should be changed to 1.0 and 0.0, respectively, to ensure that the active reach receives all of the downstream outflow from the upstream reach. by default, status is active.", + "longname": "reach status", + "name": "status", + "reader": "urword", + "type": "string", + }, + "upstream_fraction": { + "block": "period", + "description": "real value that defines the fraction of upstream flow (ustrf) from each upstream reach that is applied as upstream inflow to the reach. the sum of all ustrf values for all reaches connected to the same upstream reach must be equal to one.", + "longname": "fraction of upstream flow", + "name": "upstream_fraction", + "reader": "urword", + "type": "double precision", + }, + }, + "description": "line of information that is parsed into a keyword and values. keyword values that can be used to start the sfrsetting string include: status, bedk, manning, stage, inflow, rainfall, evaporation, runoff, diversion, upstream_fraction, and auxiliary.", + "name": "sfrsetting", + "reader": "urword", + "type": "keystring", + }, + }, + "name": "perioddata", + "reader": "urword", + "type": "record", + }, + "name": "perioddata", + "reader": "urword", + "type": "recarray", + }, + "transient_block": True, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwfsto.py b/flopy/mf6/modflow/mfgwfsto.py index 9143acd7af..50776228dd 100644 --- a/flopy/mf6/modflow/mfgwfsto.py +++ b/flopy/mf6/modflow/mfgwfsto.py @@ -41,8 +41,11 @@ class ModflowGwfsto(MFPackage): keyword that specifies input grid arrays, which already support the layered keyword, should be written to layered ascii output files. export_array_netcdf : keyword - keyword that specifies input griddata arrays should be written to the model - output netcdf file. + keyword that specifies input gridded arrays should be written to the model + output netcdf file with attributes that support using the generated file as a + 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. dev_original_specific_storage : keyword flag indicating the original storage specific storage formulation should be used @@ -256,6 +259,170 @@ class ModflowGwfsto(MFPackage): "optional true", ], ] + spec = { + "advanced": False, + "fkeys": { + "tvs_filerecord": { + "abbr": "tvs", + "key": "tvs_filerecord", + "param": "tvs_perioddata", + "parent": "parent_package", + "val": "perioddata", + } + }, + "griddata": { + "iconvert": { + "block": "griddata", + "default": 0, + "description": "is a flag for each cell that specifies whether or not a cell is convertible for the storage calculation. 0 indicates confined storage is used. $>$0 indicates confined storage is used when head is above cell top and a mixed formulation of unconfined and confined storage is used when head is below cell top.", + "layered": True, + "longname": "convertible indicator", + "name": "iconvert", + "netcdf": True, + "optional": False, + "reader": "readarray", + "shape": "(nodes)", + "type": "integer", + }, + "ss": { + "block": "griddata", + "default": 1e-05, + "description": "is specific storage (or the storage coefficient if storagecoefficient is specified as an option). specific storage values must be greater than or equal to 0. if the csub package is included in the gwf model, specific storage must be zero for every cell.", + "layered": True, + "longname": "specific storage", + "name": "ss", + "netcdf": True, + "optional": False, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "sy": { + "block": "griddata", + "default": 0.15, + "description": "is specific yield. specific yield values must be greater than or equal to 0. specific yield does not have to be specified if there are no convertible cells (iconvert=0 in every cell).", + "layered": True, + "longname": "specific yield", + "name": "sy", + "netcdf": True, + "optional": False, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + }, + "multi": False, + "name": "gwf-sto", + "options": { + "dev_oldstorageformulation": { + "block": "options", + "description": "development option flag for old storage formulation", + "longname": "development option flag for old storage formulation", + "mf6internal": "iconf_ss", + "name": "dev_oldstorageformulation", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "dev_original_specific_storage": { + "block": "options", + "description": "flag indicating the original storage specific storage formulation should be used", + "longname": "development option for original specific storage", + "mf6internal": "iorig_ss", + "name": "dev_original_specific_storage", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "export_array_ascii": { + "block": "options", + "description": "keyword that specifies input grid arrays, which already support the layered keyword, should be written to layered ascii output files.", + "longname": "export array variables to layered ascii files.", + "mf6internal": "export_ascii", + "name": "export_array_ascii", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "export_array_netcdf": { + "block": "options", + "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", + "extended": True, + "longname": "export array variables to netcdf output files.", + "mf6internal": "export_nc", + "name": "export_array_netcdf", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "perioddata": { + "block": "options", + "description": "Contains data for the tvs package. Data can be passed as a dictionary to the tvs package with variable names as keys and package data as values. Data for the perioddata variable is also acceptable. See tvs package documentation for more information.", + "name": "perioddata", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "tvs", + "key": "tvs_filerecord", + "param": "tvs_perioddata", + "parent": "parent_package", + "val": "perioddata", + }, + "type": "record tvs6 filein tvs6_filename", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that cell-by-cell flow terms will be written to the file specified with 'budget save file' in output control.", + "longname": "keyword to save npf flows", + "mf6internal": "ipakcb", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "ss_confined_only": { + "block": "options", + "description": "keyword to indicate that compressible storage is only calculated for a convertible cell (iconvert>0) when the cell is under confined conditions (head greater than or equal to the top of the cell). this option has no effect on cells that are marked as being always confined (iconvert=0). this option is identical to the approach used to calculate storage changes under confined conditions in modflow-2005.", + "longname": "keyword to indicate specific storage only applied under confined conditions", + "name": "ss_confined_only", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "storagecoefficient": { + "block": "options", + "description": "keyword to indicate that the ss array is read as storage coefficient rather than specific storage.", + "longname": "keyword to indicate ss is read as storage coefficient", + "mf6internal": "istor_coef", + "name": "storagecoefficient", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + "period": { + "steady-state": { + "block": "period", + "description": "keyword to indicate that stress period iper is steady-state. steady-state conditions will apply until the transient keyword is specified in a subsequent begin period block. if the csub package is included in the gwf model, only the first and last stress period can be steady-state.", + "longname": "steady state indicator", + "mf6internal": "steady_state", + "name": "steady-state", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "transient": { + "block": "period", + "description": "keyword to indicate that stress period iper is transient. transient conditions will apply until the steady-state keyword is specified in a subsequent begin period block.", + "longname": "transient indicator", + "name": "transient", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "transient_block": True, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwfuzf.py b/flopy/mf6/modflow/mfgwfuzf.py index a867e687f9..82c409208d 100644 --- a/flopy/mf6/modflow/mfgwfuzf.py +++ b/flopy/mf6/modflow/mfgwfuzf.py @@ -818,6 +818,489 @@ class ModflowGwfuzf(MFPackage): "optional true", ], ] + spec = { + "advanced": True, + "dimensions": { + "ntrailwaves": { + "block": "dimensions", + "default": 7, + "description": "is the number of trailing waves. a recommended value of 7 can be used for ntrailwaves. this value can be increased to lower mass balance error in the unsaturated zone.", + "longname": "number of trailing waves", + "name": "ntrailwaves", + "optional": False, + "reader": "urword", + "type": "integer", + }, + "nuzfcells": { + "block": "dimensions", + "description": "is the number of uzf cells. more than one uzf cell can be assigned to a gwf cell; however, only one gwf cell can be assigned to a single uzf cell. if more than one uzf cell is assigned to a gwf cell, then an auxiliary variable should be used to reduce the surface area of the uzf cell with the auxmultname option.", + "longname": "number of uzf cells", + "name": "nuzfcells", + "optional": False, + "reader": "urword", + "type": "integer", + }, + "nwavesets": { + "block": "dimensions", + "default": 40, + "description": "is the number of wave sets. a recommended value of 40 can be used for nwavesets. this value can be increased if more waves are required to resolve variations in water content within the unsaturated zone.", + "longname": "number of wave sets", + "name": "nwavesets", + "optional": False, + "reader": "urword", + "type": "integer", + }, + }, + "fkeys": { + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "ts_filerecord": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + }, + "multi": True, + "name": "gwf-uzf", + "options": { + "auxiliary": { + "block": "options", + "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", + "longname": "keyword to specify aux variables", + "name": "auxiliary", + "optional": True, + "reader": "urword", + "shape": "(naux)", + "type": "string", + }, + "auxmultname": { + "block": "options", + "description": "name of auxiliary variable to be used as multiplier of gwf cell area used by uzf cell.", + "longname": "name of auxiliary variable for multiplier", + "name": "auxmultname", + "optional": True, + "reader": "urword", + "type": "string", + }, + "boundnames": { + "block": "options", + "description": "keyword to indicate that boundary names may be provided with the list of uzf cells.", + "name": "boundnames", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "budget_filerecord": { + "block": "options", + "fields": { + "budgetfile": { + "block": "options", + "description": "name of the binary output file to write budget information.", + "longname": "file keyword", + "name": "budgetfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "budget_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "budgetcsv_filerecord": { + "block": "options", + "fields": { + "budgetcsvfile": { + "block": "options", + "description": "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.", + "longname": "file keyword", + "name": "budgetcsvfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "budgetcsv_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "linear_gwet": { + "block": "options", + "description": "keyword specifying that groundwater et will be simulated using the original et formulation of modflow-2005.", + "longname": "use linear evapotranspiration", + "name": "linear_gwet", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "mover": { + "block": "options", + "description": "keyword to indicate that this instance of the uzf package can be used with the water mover (mvr) package. when the mover option is specified, additional memory is allocated within the package to store the available, provided, and received water.", + "name": "mover", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "package_convergence_filerecord": { + "block": "options", + "fields": { + "package_convergence_filename": { + "block": "options", + "description": "name of the comma spaced values output file to write package convergence information.", + "longname": "file keyword", + "name": "package_convergence_filename", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "package_convergence_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of uzf flow rates will be printed to the listing file for every stress period time step in which 'budget print' is specified in output control. if there is no output control option and 'print_flows' is specified, then flow rates are printed for the last time step of each stress period.", + "longname": "print calculated flows to listing file", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of uzf information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that uzf flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save well flows to budget file", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "simulate_et": { + "block": "options", + "description": "keyword specifying that et in the unsaturated (uzf) and saturated zones (gwf) will be simulated. et can be simulated in the uzf cell and not the gwf cell by omitting keywords linear_gwet and square_gwet.", + "name": "simulate_et", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "simulate_gwseep": { + "block": "options", + "deprecated": "6.5.0", + "description": "keyword specifying that groundwater discharge (gwseep) to land surface will be simulated. groundwater discharge is nonzero when groundwater head is greater than land surface. this option is no longer recommended; a better approach is to use the drain package with discharge scaling as a way to handle seepage to land surface. the drain package with discharge scaling is described in chapter 3 of the supplemental technical information.", + "longname": "activate seepage", + "name": "simulate_gwseep", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "square_gwet": { + "block": "options", + "description": "keyword specifying that groundwater et will be simulated by assuming a constant et rate for groundwater levels between land surface (top) and land surface minus the et extinction depth (top-extdp). groundwater et is smoothly reduced from the pet rate to zero over a nominal interval at top-extdp.", + "longname": "use square evapotranspiration", + "name": "square_gwet", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "timeseries": { + "block": "options", + "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", + "name": "timeseries", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + "type": "record ts6 filein ts6_filename", + }, + "unsat_etae": { + "block": "options", + "description": "keyword specifying that et in the unsaturated zone will be simulated using a capillary pressure based formulation. capillary pressure is calculated using the brooks-corey retention function.", + "longname": "use root potential", + "name": "unsat_etae", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "unsat_etwc": { + "block": "options", + "description": "keyword specifying that et in the unsaturated zone will be simulated as a function of the specified pet rate while the water content (theta) is greater than the et extinction water content (extwc).", + "longname": "use pet for theta greater than extwc", + "name": "unsat_etwc", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "wc_filerecord": { + "block": "options", + "fields": { + "wcfile": { + "block": "options", + "description": "name of the binary output file to write water content information.", + "longname": "file keyword", + "name": "wcfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "wc_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + }, + "packagedata": { + "packagedata": { + "block": "packagedata", + "item": { + "block": "packagedata", + "fields": { + "boundname": { + "block": "packagedata", + "description": "name of the UZF cell cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", + "longname": "well name", + "name": "boundname", + "optional": "true", + "reader": "urword", + "type": "string", + }, + "cellid": { + "block": "packagedata", + "description": "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 layer, row, and column. For a grid that uses the DISV input file, CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file, CELLID is the node number for the cell.", + "longname": "cell identifier", + "name": "cellid", + "reader": "urword", + "shape": "(ncelldim)", + "type": "integer", + }, + "eps": { + "block": "packagedata", + "description": "is the exponent used in the Brooks-Corey function. The Brooks-Corey function is used by UZF to calculated hydraulic conductivity under partially saturated conditions as a function of water content and the user-specified saturated hydraulic conductivity.", + "longname": "Brooks-Corey exponent", + "name": "eps", + "reader": "urword", + "type": "double precision", + }, + "ifno": { + "block": "period", + "description": "integer value that defines the feature (UZF object) number associated with the specified PERIOD data on the line.", + "longname": "UZF id number", + "name": "ifno", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "ivertcon": { + "block": "packagedata", + "description": "integer value set to specify underlying UZF cell that receives water flowing to bottom of cell. If unsaturated zone flow reaches the water table before the cell bottom, then water is added to the GWF cell instead of flowing to the underlying UZF cell. A value of 0 indicates the UZF cell is not connected to an underlying UZF cell.", + "longname": "vertical connection flag", + "name": "ivertcon", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "landflag": { + "block": "packagedata", + "description": "integer value set to one for land surface cells indicating that boundary conditions can be applied and data can be specified in the PERIOD block. A value of 0 specifies a non-land surface cell.", + "longname": "land flag", + "name": "landflag", + "reader": "urword", + "type": "integer", + }, + "surfdep": { + "block": "packagedata", + "description": "is the surface depression depth of the UZF cell.", + "longname": "surface depression depth", + "name": "surfdep", + "reader": "urword", + "type": "double precision", + }, + "thti": { + "block": "packagedata", + "description": "is the initial water content of the UZF cell. The value must be greater than or equal to the residual water content and less than or equal to the saturated water content.", + "longname": "initial water content", + "name": "thti", + "reader": "urword", + "type": "double precision", + }, + "thtr": { + "block": "packagedata", + "description": "is the residual (irreducible) water content of the UZF cell. This residual water is not available to plants and will not drain into underlying aquifer cells.", + "longname": "residual water content", + "name": "thtr", + "reader": "urword", + "type": "double precision", + }, + "thts": { + "block": "packagedata", + "description": "is the saturated water content of the UZF cell. The values for saturated and residual water content should be set in a manner that is consistent with the specific yield value specified in the Storage Package. The saturated water content must be greater than the residual content.", + "longname": "saturated water content", + "name": "thts", + "reader": "urword", + "type": "double precision", + }, + "vks": { + "block": "packagedata", + "description": "is the saturated vertical hydraulic conductivity of the UZF cell. This value is used with the Brooks-Corey function and the simulated water content to calculate the partially saturated hydraulic conductivity.", + "longname": "vertical saturated hydraulic conductivity", + "name": "vks", + "reader": "urword", + "type": "double precision", + }, + }, + "name": "packagedata", + "reader": "urword", + "type": "record", + }, + "name": "packagedata", + "reader": "urword", + "shape": "(nuzfcells)", + "type": "recarray", + } + }, + "period": { + "perioddata": { + "block": "period", + "item": { + "block": "period", + "fields": { + "aux": { + "block": "period", + "description": "represents the values of the auxiliary variables for each UZF. The values of auxiliary variables must be present for each UZF. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "auxiliary variables", + "name": "aux", + "optional": "true", + "reader": "urword", + "shape": "(naux)", + "time_series": "true", + "type": "double precision", + }, + "extdp": { + "block": "period", + "description": "real or character value that defines the evapotranspiration extinction depth of the UZF cell. If IVERTCON is greater than zero and EXTDP extends below the GWF cell bottom then remaining potential evapotranspiration is applied to the underlying UZF and GWF cells. EXTDP is always specified, but is only used if SIMULATE_ET is specified in the OPTIONS block. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "extinction depth", + "name": "extdp", + "reader": "urword", + "time_series": "true", + "type": "string", + }, + "extwc": { + "block": "period", + "description": "real or character value that defines the evapotranspiration extinction water content of the UZF cell. EXTWC is always specified, but is only used if SIMULATE_ET and UNSAT_ETWC are specified in the OPTIONS block. The evapotranspiration rate from the unsaturated zone will be set to zero when the calculated water content is at or less than this value. The value for EXTWC cannot be less than the residual water content, and if it is specified as being less than the residual water content it is set to the residual water content. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "extinction water content", + "name": "extwc", + "reader": "urword", + "time_series": "true", + "type": "string", + }, + "finf": { + "block": "period", + "description": "real or character value that defines the applied infiltration rate of the UZF cell ($LT^{-1}$). If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "infiltration rate", + "name": "finf", + "reader": "urword", + "time_series": "true", + "type": "string", + }, + "ha": { + "block": "period", + "description": "real or character value that defines the air entry potential (head) of the UZF cell. HA is always specified, but is only used if SIMULATE_ET and UNSAT_ETAE are specified in the OPTIONS block. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "air entry potential", + "name": "ha", + "reader": "urword", + "time_series": "true", + "type": "string", + }, + "hroot": { + "block": "period", + "description": "real or character value that defines the root potential (head) of the UZF cell. HROOT is always specified, but is only used if SIMULATE_ET and UNSAT_ETAE are specified in the OPTIONS block. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "root potential", + "name": "hroot", + "reader": "urword", + "time_series": "true", + "type": "string", + }, + "ifno": { + "block": "period", + "description": "integer value that defines the feature (UZF object) number associated with the specified PERIOD data on the line.", + "longname": "UZF id number", + "name": "ifno", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "pet": { + "block": "period", + "description": "real or character value that defines the potential evapotranspiration rate of the UZF cell and specified GWF cell. Evapotranspiration is first removed from the unsaturated zone and any remaining potential evapotranspiration is applied to the saturated zone. If IVERTCON is greater than zero then residual potential evapotranspiration not satisfied in the UZF cell is applied to the underlying UZF and GWF cells. PET is always specified, but is only used if SIMULATE_ET is specified in the OPTIONS block. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "potential ET rate", + "name": "pet", + "reader": "urword", + "time_series": "true", + "type": "string", + }, + "rootact": { + "block": "period", + "description": "real or character value that defines the root activity function of the UZF cell. ROOTACT is the length of roots in a given volume of soil divided by that volume. Values range from 0 to about 3 $cm^{-2}$, depending on the plant community and its stage of development. ROOTACT is always specified, but is only used if SIMULATE_ET and UNSAT_ETAE are specified in the OPTIONS block. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "root activity function", + "name": "rootact", + "reader": "urword", + "time_series": "true", + "type": "string", + }, + }, + "name": "perioddata", + "reader": "urword", + "type": "record", + }, + "name": "perioddata", + "reader": "urword", + "type": "recarray", + }, + "transient_block": True, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwfvsc.py b/flopy/mf6/modflow/mfgwfvsc.py index 6e6444ef50..a501d09db0 100644 --- a/flopy/mf6/modflow/mfgwfvsc.py +++ b/flopy/mf6/modflow/mfgwfvsc.py @@ -266,6 +266,162 @@ class ModflowGwfvsc(MFPackage): "reader urword", ], ] + spec = { + "advanced": False, + "dimensions": { + "nviscspecies": { + "block": "dimensions", + "description": "number of species used in the viscosity equation of state. if either concentrations or temperature (or both) are used to update viscosity then nviscspecies needs to be at least one.", + "longname": "number of species used in viscosity equation of state", + "name": "nviscspecies", + "optional": False, + "reader": "urword", + "type": "integer", + } + }, + "multi": False, + "name": "gwf-vsc", + "options": { + "temperature_species_name": { + "block": "options", + "description": "string used to identify the auxspeciesname in packagedata that corresponds to the temperature species. there can be only one occurrence of this temperature species name in the packagedata block or the program will terminate with an error. this value has no effect if viscosity does not depend on temperature.", + "longname": "auxspeciesname that corresponds to temperature", + "mf6internal": "temp_specname", + "name": "temperature_species_name", + "optional": True, + "reader": "urword", + "type": "string", + }, + "thermal_a2": { + "block": "options", + "default": 10.0, + "description": "is an empirical parameter specified by the user for calculating viscosity using a nonlinear formulation. if a2 is not specified, a default value of 10.0 is assigned (voss, 1984).", + "longname": "coefficient used in nonlinear viscosity function", + "name": "thermal_a2", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "thermal_a3": { + "block": "options", + "default": 248.37, + "description": "is an empirical parameter specified by the user for calculating viscosity using a nonlinear formulation. if a3 is not specified, a default value of 248.37 is assigned (voss, 1984).", + "longname": "coefficient used in nonlinear viscosity function", + "name": "thermal_a3", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "thermal_a4": { + "block": "options", + "default": 133.15, + "description": "is an empirical parameter specified by the user for calculating viscosity using a nonlinear formulation. if a4 is not specified, a default value of 133.15 is assigned (voss, 1984).", + "longname": "coefficient used in nonlinear viscosity function", + "name": "thermal_a4", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "thermal_formulation": { + "block": "options", + "description": "may be used for specifying which viscosity formulation to use for the temperature species. can be either linear or nonlinear. the linear viscosity formulation is the default.", + "longname": "keyword to specify viscosity formulation for the temperature species", + "mf6internal": "thermal_form", + "name": "thermal_formulation", + "optional": True, + "reader": "urword", + "type": "string", + "valid": "linear nonlinear", + }, + "viscosity_filerecord": { + "block": "options", + "fields": { + "viscosityfile": { + "block": "options", + "description": "name of the binary output file to write viscosity information. The viscosity file has the same format as the head file. Viscosity values will be written to the viscosity file whenever heads are written to the binary head file. The settings for controlling head output are contained in the Output Control option.", + "longname": "file keyword", + "name": "viscosityfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "viscosity_fr", + "name": "viscosity_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "viscref": { + "block": "options", + "default": 1.0, + "description": "fluid reference viscosity used in the equation of state. this value is set to 1.0 if not specified as an option.", + "longname": "reference viscosity", + "name": "viscref", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + }, + "packagedata": { + "packagedata": { + "block": "packagedata", + "item": { + "block": "packagedata", + "fields": { + "auxspeciesname": { + "block": "packagedata", + "description": "name of an auxiliary variable in a GWF stress package that will be used for this species to calculate the viscosity values. If a viscosity value is needed by the Viscosity Package then it will use the temperature or concentration values associated with this AUXSPECIESNAME in the viscosity equation of state. For advanced stress packages (LAK, SFR, MAW, and UZF) that have an associated advanced transport package (LKT, SFT, MWT, and UZT), the FLOW_PACKAGE_AUXILIARY_NAME option in the advanced transport package can be used to transfer simulated temperature or concentration(s) into the flow package auxiliary variable. In this manner, the Viscosity Package can calculate viscosity values for lakes, streams, multi-aquifer wells, and unsaturated zone flow cells using simulated concentrations.", + "longname": "auxspeciesname", + "name": "auxspeciesname", + "reader": "urword", + "type": "string", + }, + "cviscref": { + "block": "packagedata", + "description": "real value that defines the reference temperature or reference concentration value used for this species in the viscosity equation of state. If AUXSPECIESNAME entered on a line corresponds to TEMPERATURE_SPECIES_NAME (in the OPTIONS block), then CVISCREF refers to a reference temperature, otherwise it refers to a reference concentration.", + "longname": "reference temperature value or reference concentration value", + "name": "cviscref", + "reader": "urword", + "type": "double precision", + }, + "dviscdc": { + "block": "packagedata", + "description": "real value that defines the slope of the line defining the linear relationship between viscosity and temperature or between viscosity and concentration, depending on the type of species entered on each line. If the value of AUXSPECIESNAME entered on a line corresponds to TEMPERATURE_SPECIES_NAME (in the OPTIONS block), this value will be used when VISCOSITY_FUNC is equal to LINEAR (the default) in the OPTIONS block. When VISCOSITY_FUNC is set to NONLINEAR, a value for DVISCDC must be specified though it is not used.", + "longname": "slope of the line that defines the linear relationship between viscosity and temperature or between viscosity and concentration, depending on the type of species entered on each line.", + "name": "dviscdc", + "reader": "urword", + "type": "double precision", + }, + "iviscspec": { + "block": "packagedata", + "description": "integer value that defines the species number associated with the specified PACKAGEDATA data entered on each line. IVISCSPECIES must be greater than zero and less than or equal to NVISCSPECIES. Information must be specified for each of the NVISCSPECIES species or the program will terminate with an error. The program will also terminate with an error if information for a species is specified more than once.", + "longname": "species number for this entry", + "name": "iviscspec", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "modelname": { + "block": "packagedata", + "description": "name of a GWT or GWE model used to simulate a species that will be used in the viscosity equation of state. This name will have no effect if the simulation does not include a GWT or GWE model that corresponds to this GWF model.", + "longname": "modelname", + "name": "modelname", + "reader": "urword", + "type": "string", + }, + }, + "name": "packagedata", + "reader": "urword", + "type": "record", + }, + "name": "packagedata", + "reader": "urword", + "shape": "(nviscspecies)", + "type": "recarray", + } + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwfwel.py b/flopy/mf6/modflow/mfgwfwel.py index 6b557e0f17..951e118396 100644 --- a/flopy/mf6/modflow/mfgwfwel.py +++ b/flopy/mf6/modflow/mfgwfwel.py @@ -65,6 +65,13 @@ class ModflowGwfwel(MFPackage): well extraction rates that have been reduced by the program. Entries are only written if the extraction rates are reduced. + flow_reduction_length : keyword + keyword that indicates the auto_flow_reduce value is a length instead of a + fraction of the cell thickness. a warning will be issued if the + flow_reduction_length option is specified but the auto_flow_reduce option is + 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. 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 @@ -230,6 +237,14 @@ class ModflowGwfwel(MFPackage): "tagged false", "optional false", ], + [ + "block options", + "name flow_reduction_length", + "type keyword", + "reader urword", + "optional true", + "mf6internal iflowredlen", + ], [ "block options", "name ts_filerecord", @@ -381,6 +396,235 @@ class ModflowGwfwel(MFPackage): "optional true", ], ] + spec = { + "advanced": False, + "dimensions": { + "maxbound": { + "block": "dimensions", + "description": "integer value specifying the maximum number of wells cells that will be specified for use during any stress period.", + "longname": "maximum number of wells", + "name": "maxbound", + "optional": False, + "reader": "urword", + "type": "integer", + } + }, + "fkeys": { + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "ts_filerecord": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + }, + "multi": True, + "name": "gwf-wel", + "options": { + "afrcsv_filerecord": { + "block": "options", + "fields": { + "afrcsvfile": { + "block": "options", + "description": "name of the comma-separated value (CSV) output file to write information about well extraction rates that have been reduced by the program. Entries are only written if the extraction rates are reduced.", + "longname": "file keyword", + "name": "afrcsvfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "afrcsv_rec", + "name": "afrcsv_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "auto_flow_reduce": { + "block": "options", + "description": "keyword and real value that defines the fraction of the cell thickness used as an interval for smoothly adjusting negative pumping rates to 0 in cells with head values less than or equal to the bottom of the cell. negative pumping 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).", + "longname": "cell fractional thickness for reduced pumping", + "mf6internal": "flowred", + "name": "auto_flow_reduce", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "auxiliary": { + "block": "options", + "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", + "longname": "keyword to specify aux variables", + "name": "auxiliary", + "optional": True, + "reader": "urword", + "shape": "(naux)", + "type": "string", + }, + "auxmultname": { + "block": "options", + "description": "name of auxiliary variable to be used as multiplier of well flow rate.", + "longname": "name of auxiliary variable for multiplier", + "name": "auxmultname", + "optional": True, + "reader": "urword", + "type": "string", + }, + "boundnames": { + "block": "options", + "description": "keyword to indicate that boundary names may be provided with the list of well cells.", + "name": "boundnames", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "flow_reduction_length": { + "block": "options", + "description": "keyword that indicates the auto_flow_reduce value is a length instead of a fraction of the cell thickness. a warning will be issued if the flow_reduction_length option is specified but the auto_flow_reduce option is 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.", + "longname": "flow reduction length keyword", + "mf6internal": "iflowredlen", + "name": "flow_reduction_length", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "mover": { + "block": "options", + "description": "keyword to indicate that this instance of the well package can be used with the water mover (mvr) package. when the mover option is specified, additional memory is allocated within the package to store the available, provided, and received water.", + "name": "mover", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of well 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.", + "longname": "print calculated flows to listing file", + "mf6internal": "iprflow", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of well information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "mf6internal": "iprpak", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that well flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save well flows to budget file", + "mf6internal": "ipakcb", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "timeseries": { + "block": "options", + "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", + "name": "timeseries", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + "type": "record ts6 filein ts6_filename", + }, + }, + "period": { + "stress_period_data": { + "block": "period", + "item": { + "block": "period", + "fields": { + "aux": { + "block": "period", + "description": "represents the values of the auxiliary variables for each well. The values of auxiliary variables must be present for each well. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "auxiliary variables", + "mf6internal": "auxvar", + "name": "aux", + "optional": "true", + "reader": "urword", + "shape": "(naux)", + "time_series": "true", + "type": "double precision", + }, + "boundname": { + "block": "period", + "description": "name of the well cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", + "longname": "well name", + "name": "boundname", + "optional": "true", + "reader": "urword", + "type": "string", + }, + "cellid": { + "block": "period", + "description": "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 layer, row, and column. For a grid that uses the DISV input file, CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file, CELLID is the node number for the cell.", + "longname": "cell identifier", + "name": "cellid", + "reader": "urword", + "shape": "(ncelldim)", + "type": "integer", + }, + "q": { + "block": "period", + "description": "is the volumetric well rate. A positive value indicates recharge (injection) and a negative value indicates discharge (extraction). If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "well rate", + "name": "q", + "reader": "urword", + "time_series": "true", + "type": "double precision", + }, + }, + "mf6internal": "spd", + "name": "stress_period_data", + "reader": "urword", + "type": "record", + }, + "mf6internal": "spd", + "name": "stress_period_data", + "reader": "urword", + "shape": "(maxbound)", + "type": "recarray", + }, + "transient_block": True, + }, + } def __init__( self, @@ -394,6 +638,7 @@ def __init__( save_flows=None, auto_flow_reduce=None, afrcsv_filerecord=None, + flow_reduction_length=None, timeseries=None, observations=None, mover=None, @@ -423,6 +668,9 @@ def __init__( self.afrcsv_filerecord = self.build_mfdata( "afrcsv_filerecord", afrcsv_filerecord ) + self.flow_reduction_length = self.build_mfdata( + "flow_reduction_length", flow_reduction_length + ) 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 new file mode 100644 index 0000000000..d90a891c05 --- /dev/null +++ b/flopy/mf6/modflow/mfgwfwelg.py @@ -0,0 +1,576 @@ +# 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 ModflowGwfwelg(MFPackage): + """ + ModflowGwfwelg defines a WELG package. + + Parameters + ---------- + model + Model that this package is a part of. Package is automatically + added to model when it is initialized. + loading_package : bool, default False + Do not set this parameter. It is intended for debugging and internal + processing purposes only. + auxiliary : [string] + defines an array of one or more auxiliary variable names. there is no limit on + the number of auxiliary variables that can be provided on this line; however, + lists of information provided in subsequent blocks must have a column of data + for each auxiliary variable name defined here. the number of auxiliary + variables detected on this line determines the value for naux. comments cannot + be provided anywhere on this line as they will be interpreted as auxiliary + variable names. auxiliary variables may not be used by the package, but they + will be available for use by other parts of the program. the program will + terminate with an error if auxiliary variables are specified on more than one + line in the options block. + auxmultname : string + name of auxiliary variable to be used as multiplier of well flow rate. + print_input : keyword + keyword to indicate that the list of well information will be written to the + listing file immediately after it is read. + print_flows : keyword + keyword to indicate that the list of well 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 well flow terms will be written to the file specified + with 'budget fileout' in output control. + auto_flow_reduce : double precision + keyword and real value that defines the fraction of the cell thickness used as + an interval for smoothly adjusting negative pumping rates to 0 in cells with + head values less than or equal to the bottom of the cell. negative pumping + 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). + afrcsv_filerecord : (afrcsvfile) + * afrcsvfile : string + name of the comma-separated value (CSV) output file to write information about + well extraction rates that have been reduced by the program. Entries are only + written if the extraction rates are reduced. + + flow_reduction_length : keyword + keyword that indicates the auto_flow_reduce value is a length instead of a + fraction of the cell thickness. a warning will be issued if the + flow_reduction_length option is specified but the auto_flow_reduce option is + 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. + observations : record obs6 filein obs6_filename + Contains data for the obs package. Data can be passed as a dictionary to the + obs package with variable names as keys and package data as values. Data for + the observations variable is also acceptable. See obs package documentation for + more information. + mover : keyword + keyword to indicate that this instance of the well package can be used with the + water mover (mvr) package. when the mover option is specified, additional + memory is allocated within the package to store the available, provided, and + received water. + export_array_netcdf : keyword + keyword that specifies input gridded arrays should be written to the model + output netcdf file with attributes that support using the generated file as a + 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. + maxbound : integer + integer value specifying the maximum number of wells cells that will be + specified for use during any stress period. + q : [double precision] + is the volumetric well rate. a positive value indicates recharge (injection) + and a negative value indicates discharge (extraction). + 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. + + 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`. + + """ + + auxiliary = ArrayTemplateGenerator(("gwf6", "welg", "options", "auxiliary")) + afrcsv_filerecord = ListTemplateGenerator( + ("gwf6", "welg", "options", "afrcsv_filerecord") + ) + obs_filerecord = ListTemplateGenerator( + ("gwf6", "welg", "options", "obs_filerecord") + ) + q = ArrayTemplateGenerator(("gwf6", "welg", "period", "q")) + aux = ArrayTemplateGenerator(("gwf6", "welg", "period", "aux")) + package_abbr = "gwfwelg" + _package_type = "welg" + dfn_file_name = "gwf-welg.dfn" + dfn = [ + ["header", "multi-package", "package-type stress-package"], + [ + "block options", + "name readarraygrid", + "type keyword", + "reader urword", + "optional false", + "developmode true", + "default true", + ], + [ + "block options", + "name auxiliary", + "type string", + "shape (naux)", + "reader urword", + "optional true", + ], + [ + "block options", + "name auxmultname", + "type string", + "shape", + "reader urword", + "optional true", + ], + [ + "block options", + "name print_input", + "type keyword", + "reader urword", + "optional true", + "mf6internal iprpak", + ], + [ + "block options", + "name print_flows", + "type keyword", + "reader urword", + "optional true", + "mf6internal iprflow", + ], + [ + "block options", + "name save_flows", + "type keyword", + "reader urword", + "optional true", + "mf6internal ipakcb", + ], + [ + "block options", + "name auto_flow_reduce", + "type double precision", + "reader urword", + "optional true", + "mf6internal flowred", + ], + [ + "block options", + "name afrcsv_filerecord", + "type record auto_flow_reduce_csv fileout afrcsvfile", + "shape", + "reader urword", + "tagged true", + "optional true", + "mf6internal afrcsv_rec", + ], + [ + "block options", + "name auto_flow_reduce_csv", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + "mf6internal afrcsv", + ], + [ + "block options", + "name fileout", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name afrcsvfile", + "type string", + "preserve_case true", + "shape", + "in_record true", + "reader urword", + "tagged false", + "optional false", + ], + [ + "block options", + "name flow_reduction_length", + "type keyword", + "reader urword", + "optional true", + "mf6internal iflowredlen", + ], + [ + "block options", + "name obs_filerecord", + "type record obs6 filein obs6_filename", + "shape", + "reader urword", + "tagged true", + "optional true", + "construct_package obs", + "construct_data observations", + "parameter_name continuous", + ], + [ + "block options", + "name filein", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name obs6", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name obs6_filename", + "type string", + "preserve_case true", + "in_record true", + "tagged false", + "reader urword", + "optional false", + ], + [ + "block options", + "name mover", + "type keyword", + "tagged true", + "reader urword", + "optional true", + ], + [ + "block options", + "name export_array_netcdf", + "type keyword", + "reader urword", + "optional true", + "mf6internal export_nc", + "extended true", + ], + [ + "block dimensions", + "name maxbound", + "type integer", + "reader urword", + "optional true", + ], + [ + "block period", + "name iper", + "type integer", + "block_variable true", + "in_record true", + "tagged false", + "shape", + "valid", + "reader urword", + "optional false", + ], + [ + "block period", + "name q", + "type double precision", + "shape (nodes)", + "reader readarray", + "layered true", + "netcdf true", + "default 3.e30", + ], + [ + "block period", + "name aux", + "type double precision", + "shape (nodes)", + "reader readarray", + "layered true", + "netcdf true", + "optional true", + "mf6internal auxvar", + ], + ] + spec = { + "advanced": False, + "dimensions": { + "maxbound": { + "block": "dimensions", + "description": "integer value specifying the maximum number of wells cells that will be specified for use during any stress period.", + "longname": "maximum number of wells in any stress period", + "name": "maxbound", + "optional": True, + "reader": "urword", + "type": "integer", + } + }, + "fkeys": { + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + } + }, + "multi": True, + "name": "gwf-welg", + "options": { + "afrcsv_filerecord": { + "block": "options", + "fields": { + "afrcsvfile": { + "block": "options", + "description": "name of the comma-separated value (CSV) output file to write information about well extraction rates that have been reduced by the program. Entries are only written if the extraction rates are reduced.", + "longname": "file keyword", + "name": "afrcsvfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "afrcsv_rec", + "name": "afrcsv_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "auto_flow_reduce": { + "block": "options", + "description": "keyword and real value that defines the fraction of the cell thickness used as an interval for smoothly adjusting negative pumping rates to 0 in cells with head values less than or equal to the bottom of the cell. negative pumping 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).", + "longname": "cell fractional thickness for reduced pumping", + "mf6internal": "flowred", + "name": "auto_flow_reduce", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "auxiliary": { + "block": "options", + "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", + "longname": "keyword to specify aux variables", + "name": "auxiliary", + "optional": True, + "reader": "urword", + "shape": "(naux)", + "type": "string", + }, + "auxmultname": { + "block": "options", + "description": "name of auxiliary variable to be used as multiplier of well flow rate.", + "longname": "name of auxiliary variable for multiplier", + "name": "auxmultname", + "optional": True, + "reader": "urword", + "type": "string", + }, + "export_array_netcdf": { + "block": "options", + "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", + "extended": True, + "longname": "export array variables to netcdf output files.", + "mf6internal": "export_nc", + "name": "export_array_netcdf", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "flow_reduction_length": { + "block": "options", + "description": "keyword that indicates the auto_flow_reduce value is a length instead of a fraction of the cell thickness. a warning will be issued if the flow_reduction_length option is specified but the auto_flow_reduce option is 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.", + "longname": "flow reduction length keyword", + "mf6internal": "iflowredlen", + "name": "flow_reduction_length", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "mover": { + "block": "options", + "description": "keyword to indicate that this instance of the well package can be used with the water mover (mvr) package. when the mover option is specified, additional memory is allocated within the package to store the available, provided, and received water.", + "name": "mover", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of well 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.", + "longname": "print calculated flows to listing file", + "mf6internal": "iprflow", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of well information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "mf6internal": "iprpak", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "readarraygrid": { + "block": "options", + "default": True, + "description": "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).", + "developmode": True, + "longname": "use array-based grid input", + "name": "readarraygrid", + "optional": False, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that well flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save well flows to budget file", + "mf6internal": "ipakcb", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + "period": { + "aux": { + "block": "period", + "description": "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.", + "layered": True, + "longname": "well auxiliary variable iaux", + "mf6internal": "auxvar", + "name": "aux", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "q": { + "block": "period", + "default": 3e30, + "description": "is the volumetric well rate. a positive value indicates recharge (injection) and a negative value indicates discharge (extraction).", + "layered": True, + "longname": "well rate", + "name": "q", + "netcdf": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "transient_block": True, + }, + } + + def __init__( + self, + model, + loading_package=False, + auxiliary=None, + auxmultname=None, + print_input=None, + print_flows=None, + save_flows=None, + auto_flow_reduce=None, + afrcsv_filerecord=None, + flow_reduction_length=None, + observations=None, + mover=None, + export_array_netcdf=None, + maxbound=None, + q=3e30, + aux=None, + filename=None, + pname=None, + **kwargs, + ): + """Initialize ModflowGwfwelg.""" + super().__init__( + parent=model, + package_type="welg", + filename=filename, + pname=pname, + loading_package=loading_package, + **kwargs, + ) + + self.auxiliary = self.build_mfdata("auxiliary", auxiliary) + self.auxmultname = self.build_mfdata("auxmultname", auxmultname) + 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.auto_flow_reduce = self.build_mfdata("auto_flow_reduce", auto_flow_reduce) + self.afrcsv_filerecord = self.build_mfdata( + "afrcsv_filerecord", afrcsv_filerecord + ) + self.flow_reduction_length = self.build_mfdata( + "flow_reduction_length", flow_reduction_length + ) + self._obs_filerecord = self.build_mfdata("obs_filerecord", None) + self._obs_package = self.build_child_package( + "obs", observations, "continuous", self._obs_filerecord + ) + self.mover = self.build_mfdata("mover", mover) + self.export_array_netcdf = self.build_mfdata( + "export_array_netcdf", export_array_netcdf + ) + self.maxbound = self.build_mfdata("maxbound", maxbound) + self.q = self.build_mfdata("q", q) + self.aux = self.build_mfdata("aux", aux) + + self._init_complete = True diff --git a/flopy/mf6/modflow/mfgwt.py b/flopy/mf6/modflow/mfgwt.py index 5faee07daf..ffea8ab81d 100644 --- a/flopy/mf6/modflow/mfgwt.py +++ b/flopy/mf6/modflow/mfgwt.py @@ -42,6 +42,9 @@ class ModflowGwt(MFModel): save_flows : keyword keyword to indicate that all model package flow terms will be written to the file specified with 'budget fileout' in output control. + dependent_variable_scaling : keyword + flag to scale x and rhs to avoid very large positive or negative dependent + variable values nc_mesh2d_filerecord : record netcdf layered mesh fileout record. nc_structured_filerecord : record @@ -87,6 +90,7 @@ def __init__( print_input=None, print_flows=None, save_flows=None, + dependent_variable_scaling=None, nc_mesh2d_filerecord=None, nc_structured_filerecord=None, nc_filerecord=None, @@ -112,6 +116,8 @@ def __init__( self.print_flows = self.name_file.print_flows self.name_file.save_flows.set_data(save_flows) self.save_flows = self.name_file.save_flows + self.name_file.dependent_variable_scaling.set_data(dependent_variable_scaling) + self.dependent_variable_scaling = self.name_file.dependent_variable_scaling self.name_file.nc_mesh2d_filerecord.set_data(nc_mesh2d_filerecord) self.nc_mesh2d_filerecord = self.name_file.nc_mesh2d_filerecord self.name_file.nc_structured_filerecord.set_data(nc_structured_filerecord) diff --git a/flopy/mf6/modflow/mfgwtadv.py b/flopy/mf6/modflow/mfgwtadv.py index 52ef78ec35..a2a2288a3d 100644 --- a/flopy/mf6/modflow/mfgwtadv.py +++ b/flopy/mf6/modflow/mfgwtadv.py @@ -20,8 +20,8 @@ class ModflowGwtadv(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 @@ -53,7 +53,7 @@ class ModflowGwtadv(MFPackage): "block options", "name scheme", "type string", - "valid central upstream tvd", + "valid central upstream tvd utvd", "reader urword", "optional true", ], @@ -65,6 +65,32 @@ class ModflowGwtadv(MFPackage): "optional true", ], ] + spec = { + "advanced": False, + "multi": False, + "name": "gwt-adv", + "options": { + "ats_percel": { + "block": "options", + "description": "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 active, a time step calculation will be made for each cell based on flow through the cell and cell properties. the largest time step will be calculated such that the advective fractional cell distance (ats_percel) is not exceeded for any active cell in the grid. this time-step constraint will be submitted to the ats package, perhaps with constraints submitted by other packages, in the calculation of the time step. ats_percel must be greater than zero. if a value of zero is specified for ats_percel the program will automatically reset it to an internal no data value to indicate that time steps should not be subject to this constraint.", + "longname": "fractional cell distance used for time step calculation", + "name": "ats_percel", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "scheme": { + "block": "options", + "description": "scheme used to solve the advection term. can be upstream, central, tvd or utvd. if not specified, upstream weighting is the default weighting scheme.", + "longname": "advective scheme", + "name": "scheme", + "optional": True, + "reader": "urword", + "type": "string", + "valid": "central upstream tvd utvd", + }, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwtapi.py b/flopy/mf6/modflow/mfgwtapi.py index 20e37f2529..d7d6bc320d 100644 --- a/flopy/mf6/modflow/mfgwtapi.py +++ b/flopy/mf6/modflow/mfgwtapi.py @@ -153,6 +153,94 @@ class ModflowGwtapi(MFPackage): "optional false", ], ] + spec = { + "advanced": False, + "dimensions": { + "maxbound": { + "block": "dimensions", + "description": "integer value specifying the maximum number of api boundary cells that will be specified for use during any stress period.", + "longname": "maximum number of user-defined api boundaries", + "name": "maxbound", + "optional": False, + "reader": "urword", + "type": "integer", + } + }, + "fkeys": { + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + } + }, + "multi": True, + "name": "gwt-api", + "options": { + "boundnames": { + "block": "options", + "description": "keyword to indicate that boundary names may be provided with the list of api boundary cells.", + "name": "boundnames", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "mover": { + "block": "options", + "description": "keyword to indicate that this instance of the api boundary package can be used with the water mover (mvr) package. when the mover option is specified, additional memory is allocated within the package to store the available, provided, and received water.", + "name": "mover", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of api boundary 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.", + "longname": "print calculated flows to listing file", + "mf6internal": "iprflow", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of api boundary information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "mf6internal": "iprpak", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that api boundary flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save api flows to budget file", + "mf6internal": "ipakcb", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwtcnc.py b/flopy/mf6/modflow/mfgwtcnc.py index 05d9516b5f..2a8c080e21 100644 --- a/flopy/mf6/modflow/mfgwtcnc.py +++ b/flopy/mf6/modflow/mfgwtcnc.py @@ -298,6 +298,189 @@ class ModflowGwtcnc(MFPackage): "optional true", ], ] + spec = { + "advanced": False, + "dimensions": { + "maxbound": { + "block": "dimensions", + "description": "integer value specifying the maximum number of constant concentrations cells that will be specified for use during any stress period.", + "longname": "maximum number of constant concentrations", + "name": "maxbound", + "optional": False, + "reader": "urword", + "type": "integer", + } + }, + "fkeys": { + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "ts_filerecord": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + }, + "multi": True, + "name": "gwt-cnc", + "options": { + "auxiliary": { + "block": "options", + "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", + "longname": "keyword to specify aux variables", + "name": "auxiliary", + "optional": True, + "reader": "urword", + "shape": "(naux)", + "type": "string", + }, + "auxmultname": { + "block": "options", + "description": "name of auxiliary variable to be used as multiplier of concentration value.", + "longname": "name of auxiliary variable for multiplier", + "name": "auxmultname", + "optional": True, + "reader": "urword", + "type": "string", + }, + "boundnames": { + "block": "options", + "description": "keyword to indicate that boundary names may be provided with the list of constant concentration cells.", + "name": "boundnames", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of constant concentration 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.", + "longname": "print calculated flows to listing file", + "mf6internal": "ipakcb", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of constant concentration information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "mf6internal": "iprflow", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that constant concentration flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save constant concentration flows to budget file", + "mf6internal": "iprpak", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "timeseries": { + "block": "options", + "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", + "name": "timeseries", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + "type": "record ts6 filein ts6_filename", + }, + }, + "period": { + "stress_period_data": { + "block": "period", + "item": { + "block": "period", + "fields": { + "aux": { + "block": "period", + "description": "represents the values of the auxiliary variables for each constant concentration. The values of auxiliary variables must be present for each constant concentration. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "auxiliary variables", + "mf6internal": "auxvar", + "name": "aux", + "optional": "true", + "reader": "urword", + "shape": "(naux)", + "time_series": "true", + "type": "double precision", + }, + "boundname": { + "block": "period", + "description": "name of the constant concentration cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", + "longname": "constant concentration name", + "name": "boundname", + "optional": "true", + "reader": "urword", + "type": "string", + }, + "cellid": { + "block": "period", + "description": "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 layer, row, and column. For a grid that uses the DISV input file, CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file, CELLID is the node number for the cell.", + "longname": "cell identifier", + "name": "cellid", + "reader": "urword", + "shape": "(ncelldim)", + "type": "integer", + }, + "conc": { + "block": "period", + "description": "is the constant concentration value. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "constant concentration value", + "mf6internal": "tspvar", + "name": "conc", + "reader": "urword", + "time_series": "true", + "type": "double precision", + }, + }, + "mf6internal": "spd", + "name": "stress_period_data", + "reader": "urword", + "type": "record", + }, + "mf6internal": "spd", + "name": "stress_period_data", + "reader": "urword", + "shape": "(maxbound)", + "type": "recarray", + }, + "transient_block": True, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwtdis.py b/flopy/mf6/modflow/mfgwtdis.py index 6c08fc0ea8..f824ca1f5a 100644 --- a/flopy/mf6/modflow/mfgwtdis.py +++ b/flopy/mf6/modflow/mfgwtdis.py @@ -49,8 +49,11 @@ class ModflowGwtdis(MFPackage): keyword that specifies input griddata arrays should be written to layered ascii output files. export_array_netcdf : keyword - keyword that specifies input griddata arrays should be written to the model - output netcdf file. + keyword that specifies input gridded arrays should be written to the model + output netcdf file with attributes that support using the generated file as a + 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. 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 @@ -199,7 +202,7 @@ class ModflowGwtdis(MFPackage): "preserve_case true", "reader urword", "optional true", - "prerelease true", + "developmode true", ], [ "block options", @@ -314,6 +317,223 @@ class ModflowGwtdis(MFPackage): "optional true", ], ] + spec = { + "advanced": False, + "dimensions": { + "ncol": { + "block": "dimensions", + "default": 2, + "description": "is the number of columns in the model grid.", + "longname": "number of columns", + "name": "ncol", + "optional": False, + "reader": "urword", + "type": "integer", + }, + "nlay": { + "block": "dimensions", + "default": 1, + "description": "is the number of layers in the model grid.", + "longname": "number of layers", + "name": "nlay", + "optional": False, + "reader": "urword", + "type": "integer", + }, + "nrow": { + "block": "dimensions", + "default": 2, + "description": "is the number of rows in the model grid.", + "longname": "number of rows", + "name": "nrow", + "optional": False, + "reader": "urword", + "type": "integer", + }, + }, + "fkeys": { + "ncf_filerecord": { + "abbr": "ncf", + "key": "ncf_filerecord", + "param": "packagedata", + "parent": "parent_package", + "val": "packagedata", + } + }, + "griddata": { + "botm": { + "block": "griddata", + "default": 0.0, + "description": "is the bottom elevation for each cell.", + "layered": True, + "longname": "cell bottom elevation", + "name": "botm", + "netcdf": True, + "reader": "readarray", + "shape": "(ncol, nrow, nlay)", + "type": "double precision", + }, + "delc": { + "block": "griddata", + "default": 1.0, + "description": "is the row spacing in the column direction.", + "longname": "spacing along a column", + "name": "delc", + "netcdf": True, + "reader": "readarray", + "shape": "(nrow)", + "type": "double precision", + }, + "delr": { + "block": "griddata", + "default": 1.0, + "description": "is the column spacing in the row direction.", + "longname": "spacing along a row", + "name": "delr", + "netcdf": True, + "reader": "readarray", + "shape": "(ncol)", + "type": "double precision", + }, + "idomain": { + "block": "griddata", + "description": "is an optional array that characterizes the existence status of a cell. if the idomain array is not specified, then all model cells exist within the solution. if the idomain value for a cell is 0, the cell does not exist in the simulation. input and output values will be read and written for the cell, but internal to the program, the cell is excluded from the solution. if the idomain value for a cell is 1, the cell exists in the simulation. if the idomain value for a cell is -1, the cell does not exist in the simulation. furthermore, the first existing cell above will be connected to the first existing cell below. this type of cell is referred to as a 'vertical pass through' cell.", + "layered": True, + "longname": "idomain existence array", + "name": "idomain", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(ncol, nrow, nlay)", + "type": "integer", + }, + "top": { + "block": "griddata", + "default": 1.0, + "description": "is the top elevation for each cell in the top model layer.", + "longname": "cell top elevation", + "name": "top", + "netcdf": True, + "reader": "readarray", + "shape": "(ncol, nrow)", + "type": "double precision", + }, + }, + "multi": False, + "name": "gwt-dis", + "options": { + "angrot": { + "block": "options", + "description": "counter-clockwise rotation angle (in degrees) of the lower-left corner of the model grid. if not specified, then a default value of 0.0 is assigned. the value for angrot does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", + "longname": "rotation angle", + "name": "angrot", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "crs": { + "block": "options", + "description": "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.", + "developmode": True, + "longname": "crs user input string", + "name": "crs", + "optional": True, + "reader": "urword", + "shape": "lenbigline", + "type": "string", + }, + "export_array_ascii": { + "block": "options", + "description": "keyword that specifies input griddata arrays should be written to layered ascii output files.", + "longname": "export array variables to layered ascii files.", + "mf6internal": "export_ascii", + "name": "export_array_ascii", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "export_array_netcdf": { + "block": "options", + "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", + "extended": True, + "longname": "export array variables to netcdf output files.", + "mf6internal": "export_nc", + "name": "export_array_netcdf", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "grb_filerecord": { + "block": "options", + "fields": { + "grb6_filename": { + "block": "options", + "description": "defines a binary grid output file. If this option is not provided, the output file will have the same name as the discretization input file, plus extension '.grb'.", + "longname": "file name of GRB information", + "name": "grb6_filename", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "grb_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "length_units": { + "block": "options", + "description": "is the length units used for this model. values can be 'feet', 'meters', or 'centimeters'. if not specified, the default is 'unknown'.", + "longname": "model length units", + "name": "length_units", + "optional": True, + "reader": "urword", + "type": "string", + }, + "nogrb": { + "block": "options", + "description": "keyword to deactivate writing of the binary grid file.", + "longname": "do not write binary grid file", + "name": "nogrb", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "packagedata": { + "block": "options", + "description": "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 the packagedata variable is also acceptable. See ncf package documentation for more information.", + "name": "packagedata", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "ncf", + "key": "ncf_filerecord", + "param": "packagedata", + "parent": "parent_package", + "val": "packagedata", + }, + "type": "record ncf6 filein ncf6_filename", + }, + "xorigin": { + "block": "options", + "description": "x-position of the lower-left corner of the model grid. a default value of zero is assigned if not specified. the value for xorigin does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", + "longname": "x-position of the model grid origin", + "name": "xorigin", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "yorigin": { + "block": "options", + "description": "y-position of the lower-left corner of the model grid. if not specified, then a default value equal to zero is used. the value for yorigin does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", + "longname": "y-position of the model grid origin", + "name": "yorigin", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwtdisu.py b/flopy/mf6/modflow/mfgwtdisu.py index 6299c7e28c..b40e3a02bc 100644 --- a/flopy/mf6/modflow/mfgwtdisu.py +++ b/flopy/mf6/modflow/mfgwtdisu.py @@ -290,7 +290,7 @@ class ModflowGwtdisu(MFPackage): "preserve_case true", "reader urword", "optional true", - "prerelease true", + "developmode true", ], [ "block dimensions", @@ -485,6 +485,358 @@ class ModflowGwtdisu(MFPackage): "numeric_index true", ], ] + spec = { + "advanced": False, + "cell2d": { + "cell2d": { + "block": "cell2d", + "item": { + "block": "cell2d", + "fields": { + "icell2d": { + "block": "cell2d", + "description": "is the cell2d number. Records in the CELL2D block must be listed in consecutive order from 1 to NODES.", + "longname": "cell2d number", + "name": "icell2d", + "numeric_index": "true", + "optional": "false", + "reader": "urword", + "type": "integer", + }, + "icvert": { + "block": "cell2d", + "description": "is an array of integer values containing vertex numbers (in the VERTICES block) used to define the cell. Vertices must be listed in clockwise order.", + "longname": "array of vertex numbers", + "name": "icvert", + "numeric_index": "true", + "optional": "false", + "reader": "urword", + "shape": "(ncvert)", + "type": "integer", + }, + "ncvert": { + "block": "cell2d", + "description": "is the number of vertices required to define the cell. There may be a different number of vertices for each cell.", + "longname": "number of cell vertices", + "name": "ncvert", + "optional": "false", + "reader": "urword", + "type": "integer", + }, + "xc": { + "block": "cell2d", + "description": "is the x-coordinate for the cell center.", + "longname": "x-coordinate for cell center", + "name": "xc", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + "yc": { + "block": "cell2d", + "description": "is the y-coordinate for the cell center.", + "longname": "y-coordinate for cell center", + "name": "yc", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + }, + "longname": "cell2d data", + "name": "cell2d", + "optional": True, + "reader": "urword", + "type": "record", + }, + "longname": "cell2d data", + "name": "cell2d", + "optional": True, + "reader": "urword", + "shape": "(nodes)", + "type": "recarray", + } + }, + "connectiondata": { + "angldegx": { + "block": "connectiondata", + "description": "is the angle (in degrees) between the horizontal x-axis and the outward normal to the face between a cell and its connecting cells. the angle varies between zero and 360.0 degrees, where zero degrees points in the positive x-axis direction, and 90 degrees points in the positive y-axis direction. angldegx is only needed if horizontal anisotropy is specified in the npf package, if the xt3d option is used in the npf package, or if the save_specific_discharge option is specified in the npf package. angldegx does not need to be specified if these conditions are not met. angldegx is of size nja; values specified for vertical connections and for the diagonal position are not used. note that angldegx is read in degrees, which is different from modflow-usg, which reads a similar variable (anglex) in radians.", + "jagged_array": "iac", + "longname": "angle of face normal to connection", + "name": "angldegx", + "optional": True, + "reader": "readarray", + "shape": "(nja)", + "type": "double precision", + }, + "cl12": { + "block": "connectiondata", + "description": "is the array containing connection lengths between the center of cell n and the shared face with each adjacent m cell.", + "jagged_array": "iac", + "longname": "connection lengths", + "name": "cl12", + "reader": "readarray", + "shape": "(nja)", + "type": "double precision", + }, + "hwva": { + "block": "connectiondata", + "description": "is a symmetric array of size nja. for horizontal connections, entries in hwva are the horizontal width perpendicular to flow. for vertical connections, entries in hwva are the vertical area for flow. thus, values in the hwva array contain dimensions of both length and area. entries in the hwva array have a one-to-one correspondence with the connections specified in the ja array. likewise, there is a one-to-one correspondence between entries in the hwva array and entries in the ihc array, which specifies the connection type (horizontal or vertical). entries in the hwva array must be symmetric; the program will terminate with an error if the value for hwva for an n to m connection does not equal the value for hwva for the corresponding n to m connection.", + "jagged_array": "iac", + "longname": "connection lengths", + "name": "hwva", + "reader": "readarray", + "shape": "(nja)", + "type": "double precision", + }, + "iac": { + "block": "connectiondata", + "description": "is the number of connections (plus 1) for each cell. the sum of all the entries in iac must be equal to nja.", + "longname": "number of cell connections", + "name": "iac", + "reader": "readarray", + "shape": "(nodes)", + "type": "integer", + }, + "ihc": { + "block": "connectiondata", + "description": "is an index array indicating the direction between node n and all of its m connections. if ihc = 0 then cell n and cell m are connected in the vertical direction. cell n overlies cell m if the cell number for n is less than m; cell m overlies cell n if the cell number for m is less than n. if ihc = 1 then cell n and cell m are connected in the horizontal direction. if ihc = 2 then cell n and cell m are connected in the horizontal direction, and the connection is vertically staggered. a vertically staggered connection is one in which a cell is horizontally connected to more than one cell in a horizontal connection.", + "jagged_array": "iac", + "longname": "connection type", + "name": "ihc", + "reader": "readarray", + "shape": "(nja)", + "type": "integer", + }, + "ja": { + "block": "connectiondata", + "description": "is a list of cell number (n) followed by its connecting cell numbers (m) for each of the m cells connected to cell n. the number of values to provide for cell n is iac(n). this list is sequentially provided for the first to the last cell. the first value in the list must be cell n itself, and the remaining cells must be listed in an increasing order (sorted from lowest number to highest). note that the cell and its connections are only supplied for the gwt cells and their connections to the other gwt cells. also note that the ja list input may be divided such that every node and its connectivity list can be on a separate line for ease in readability of the file. to further ease readability of the file, the node number of the cell whose connectivity is subsequently listed, may be expressed as a negative number, the sign of which is subsequently converted to positive by the code.", + "jagged_array": "iac", + "longname": "grid connectivity", + "name": "ja", + "numeric_index": True, + "reader": "readarray", + "shape": "(nja)", + "type": "integer", + }, + }, + "dimensions": { + "nja": { + "block": "dimensions", + "description": "is the sum of the number of connections and nodes. when calculating the total number of connections, the connection between cell n and cell m is considered to be different from the connection between cell m and cell n. thus, nja is equal to the total number of connections, including n to m and m to n, and the total number of cells.", + "longname": "number of columns", + "name": "nja", + "optional": False, + "reader": "urword", + "type": "integer", + }, + "nodes": { + "block": "dimensions", + "description": "is the number of cells in the model grid.", + "longname": "number of layers", + "name": "nodes", + "optional": False, + "reader": "urword", + "type": "integer", + }, + "nvert": { + "block": "dimensions", + "description": "is the total number of (x, y) vertex pairs used to define the plan-view shape of each cell in the model grid. if nvert is not specified or is specified as zero, then the vertices and cell2d blocks below are not read. nvert and the accompanying vertices and cell2d blocks should be specified for most simulations. if the xt3d or save_specific_discharge options are specified in the npf package, then this information is required.", + "longname": "number of vertices", + "name": "nvert", + "optional": True, + "reader": "urword", + "type": "integer", + }, + }, + "griddata": { + "area": { + "block": "griddata", + "description": "is the cell surface area (in plan view).", + "longname": "cell surface area", + "name": "area", + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "bot": { + "block": "griddata", + "description": "is the bottom elevation for each cell.", + "longname": "cell bottom elevation", + "name": "bot", + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "idomain": { + "block": "griddata", + "description": "is an optional array that characterizes the existence status of a cell. if the idomain array is not specified, then all model cells exist within the solution. if the idomain value for a cell is 0, the cell does not exist in the simulation. input and output values will be read and written for the cell, but internal to the program, the cell is excluded from the solution. if the idomain value for a cell is 1 or greater, the cell exists in the simulation. idomain values of -1 cannot be specified for the disu package.", + "layered": False, + "longname": "idomain existence array", + "name": "idomain", + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "integer", + }, + "top": { + "block": "griddata", + "description": "is the top elevation for each cell in the model grid.", + "longname": "cell top elevation", + "name": "top", + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + }, + "multi": False, + "name": "gwt-disu", + "options": { + "angrot": { + "block": "options", + "description": "counter-clockwise rotation angle (in degrees) of the model grid coordinate system relative to a real-world coordinate system. if not specified, then a default value of 0.0 is assigned. the value for angrot does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", + "longname": "rotation angle", + "name": "angrot", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "crs": { + "block": "options", + "description": "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.", + "developmode": True, + "longname": "crs user input string", + "name": "crs", + "optional": True, + "reader": "urword", + "shape": "lenbigline", + "type": "string", + }, + "export_array_ascii": { + "block": "options", + "description": "keyword that specifies input griddata arrays should be written to layered ascii output files.", + "longname": "export array variables to layered ascii files.", + "mf6internal": "export_ascii", + "name": "export_array_ascii", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "grb_filerecord": { + "block": "options", + "fields": { + "grb6_filename": { + "block": "options", + "description": "defines a binary grid output file. If this option is not provided, the output file will have the same name as the discretization input file, plus extension '.grb'.", + "longname": "file name of GRB information", + "name": "grb6_filename", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "grb_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "length_units": { + "block": "options", + "description": "is the length units used for this model. values can be 'feet', 'meters', or 'centimeters'. if not specified, the default is 'unknown'.", + "longname": "model length units", + "name": "length_units", + "optional": True, + "reader": "urword", + "type": "string", + }, + "nogrb": { + "block": "options", + "description": "keyword to deactivate writing of the binary grid file.", + "longname": "do not write binary grid file", + "name": "nogrb", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "vertical_offset_tolerance": { + "block": "options", + "default": 0.0, + "description": "checks are performed to ensure that the top of a cell is not higher than the bottom of an overlying cell. this option can be used to specify the tolerance that is used for checking. if top of a cell is above the bottom of an overlying cell by a value less than this tolerance, then the program will not terminate with an error. the default value is zero. this option should generally not be used.", + "longname": "vertical length dimension for top and bottom checking", + "mf6internal": "voffsettol", + "name": "vertical_offset_tolerance", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "xorigin": { + "block": "options", + "description": "x-position of the origin used for model grid vertices. this value should be provided in a real-world coordinate system. a default value of zero is assigned if not specified. the value for xorigin does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", + "longname": "x-position origin of the model grid coordinate system", + "name": "xorigin", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "yorigin": { + "block": "options", + "description": "y-position of the origin used for model grid vertices. this value should be provided in a real-world coordinate system. if not specified, then a default value equal to zero is used. the value for yorigin does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", + "longname": "y-position origin of the model grid coordinate system", + "name": "yorigin", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + }, + "vertices": { + "vertices": { + "block": "vertices", + "item": { + "block": "vertices", + "fields": { + "iv": { + "block": "vertices", + "description": "is the vertex number. Records in the VERTICES block must be listed in consecutive order from 1 to NVERT.", + "longname": "vertex number", + "name": "iv", + "numeric_index": "true", + "optional": "false", + "reader": "urword", + "type": "integer", + }, + "xv": { + "block": "vertices", + "description": "is the x-coordinate for the vertex.", + "longname": "x-coordinate for vertex", + "name": "xv", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + "yv": { + "block": "vertices", + "description": "is the y-coordinate for the vertex.", + "longname": "y-coordinate for vertex", + "name": "yv", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + }, + "longname": "vertices data", + "name": "vertices", + "optional": True, + "reader": "urword", + "type": "record", + }, + "longname": "vertices data", + "name": "vertices", + "optional": True, + "reader": "urword", + "shape": "(nvert)", + "type": "recarray", + } + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwtdisv.py b/flopy/mf6/modflow/mfgwtdisv.py index 62bb4e3943..70e4cb2696 100644 --- a/flopy/mf6/modflow/mfgwtdisv.py +++ b/flopy/mf6/modflow/mfgwtdisv.py @@ -52,8 +52,11 @@ class ModflowGwtdisv(MFPackage): keyword that specifies input griddata arrays should be written to layered ascii output files. export_array_netcdf : keyword - keyword that specifies input griddata arrays should be written to the model - output netcdf file. + keyword that specifies input gridded arrays should be written to the model + output netcdf file with attributes that support using the generated file as a + 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. 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 @@ -229,7 +232,7 @@ class ModflowGwtdisv(MFPackage): "preserve_case true", "reader urword", "optional true", - "prerelease true", + "developmode true", ], [ "block options", @@ -413,6 +416,314 @@ class ModflowGwtdisv(MFPackage): "numeric_index true", ], ] + spec = { + "advanced": False, + "cell2d": { + "cell2d": { + "block": "cell2d", + "item": { + "block": "cell2d", + "fields": { + "icell2d": { + "block": "cell2d", + "description": "is the CELL2D number. Records in the CELL2D block must be listed in consecutive order from the first to the last.", + "longname": "cell2d number", + "name": "icell2d", + "numeric_index": "true", + "optional": "false", + "reader": "urword", + "type": "integer", + }, + "icvert": { + "block": "cell2d", + "description": "is an array of integer values containing vertex numbers (in the VERTICES block) used to define the cell. Vertices must be listed in clockwise order. Cells that are connected must share vertices.", + "longname": "array of vertex numbers", + "name": "icvert", + "numeric_index": "true", + "optional": "false", + "reader": "urword", + "shape": "(ncvert)", + "type": "integer", + }, + "ncvert": { + "block": "cell2d", + "description": "is the number of vertices required to define the cell. There may be a different number of vertices for each cell.", + "longname": "number of cell vertices", + "name": "ncvert", + "optional": "false", + "reader": "urword", + "type": "integer", + }, + "xc": { + "block": "cell2d", + "description": "is the x-coordinate for the cell center.", + "longname": "x-coordinate for cell center", + "name": "xc", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + "yc": { + "block": "cell2d", + "description": "is the y-coordinate for the cell center.", + "longname": "y-coordinate for cell center", + "name": "yc", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + }, + "longname": "cell2d data", + "name": "cell2d", + "optional": False, + "reader": "urword", + "type": "record", + }, + "longname": "cell2d data", + "name": "cell2d", + "optional": False, + "reader": "urword", + "shape": "(ncpl)", + "type": "recarray", + } + }, + "dimensions": { + "ncpl": { + "block": "dimensions", + "description": "is the number of cells per layer. this is a constant value for the grid and it applies to all layers.", + "longname": "number of cells per layer", + "name": "ncpl", + "optional": False, + "reader": "urword", + "type": "integer", + }, + "nlay": { + "block": "dimensions", + "description": "is the number of layers in the model grid.", + "longname": "number of layers", + "name": "nlay", + "optional": False, + "reader": "urword", + "type": "integer", + }, + "nvert": { + "block": "dimensions", + "description": "is the total number of (x, y) vertex pairs used to characterize the horizontal configuration of the model grid.", + "longname": "number of columns", + "name": "nvert", + "optional": False, + "reader": "urword", + "type": "integer", + }, + }, + "fkeys": { + "ncf_filerecord": { + "abbr": "ncf", + "key": "ncf_filerecord", + "param": "packagedata", + "parent": "parent_package", + "val": "packagedata", + } + }, + "griddata": { + "botm": { + "block": "griddata", + "description": "is the bottom elevation for each cell.", + "layered": True, + "longname": "model bottom elevation", + "name": "botm", + "netcdf": True, + "reader": "readarray", + "shape": "(ncpl, nlay)", + "type": "double precision", + }, + "idomain": { + "block": "griddata", + "description": "is an optional array that characterizes the existence status of a cell. if the idomain array is not specified, then all model cells exist within the solution. if the idomain value for a cell is 0, the cell does not exist in the simulation. input and output values will be read and written for the cell, but internal to the program, the cell is excluded from the solution. if the idomain value for a cell is 1, the cell exists in the simulation. if the idomain value for a cell is -1, the cell does not exist in the simulation. furthermore, the first existing cell above will be connected to the first existing cell below. this type of cell is referred to as a 'vertical pass through' cell.", + "layered": True, + "longname": "idomain existence array", + "name": "idomain", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(ncpl, nlay)", + "type": "integer", + }, + "top": { + "block": "griddata", + "description": "is the top elevation for each cell in the top model layer.", + "longname": "model top elevation", + "name": "top", + "netcdf": True, + "reader": "readarray", + "shape": "(ncpl)", + "type": "double precision", + }, + }, + "multi": False, + "name": "gwt-disv", + "options": { + "angrot": { + "block": "options", + "description": "counter-clockwise rotation angle (in degrees) of the model grid coordinate system relative to a real-world coordinate system. if not specified, then a default value of 0.0 is assigned. the value for angrot does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", + "longname": "rotation angle", + "name": "angrot", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "crs": { + "block": "options", + "description": "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.", + "developmode": True, + "longname": "crs user input string", + "name": "crs", + "optional": True, + "reader": "urword", + "shape": "lenbigline", + "type": "string", + }, + "export_array_ascii": { + "block": "options", + "description": "keyword that specifies input griddata arrays should be written to layered ascii output files.", + "longname": "export array variables to layered ascii files.", + "mf6internal": "export_ascii", + "name": "export_array_ascii", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "export_array_netcdf": { + "block": "options", + "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", + "extended": True, + "longname": "export array variables to netcdf output files.", + "mf6internal": "export_nc", + "name": "export_array_netcdf", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "grb_filerecord": { + "block": "options", + "fields": { + "grb6_filename": { + "block": "options", + "description": "defines a binary grid output file. If this option is not provided, the output file will have the same name as the discretization input file, plus extension '.grb'.", + "longname": "file name of GRB information", + "name": "grb6_filename", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "grb_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "length_units": { + "block": "options", + "description": "is the length units used for this model. values can be 'feet', 'meters', or 'centimeters'. if not specified, the default is 'unknown'.", + "longname": "model length units", + "name": "length_units", + "optional": True, + "reader": "urword", + "type": "string", + }, + "nogrb": { + "block": "options", + "description": "keyword to deactivate writing of the binary grid file.", + "longname": "do not write binary grid file", + "name": "nogrb", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "packagedata": { + "block": "options", + "description": "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 the packagedata variable is also acceptable. See ncf package documentation for more information.", + "name": "packagedata", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "ncf", + "key": "ncf_filerecord", + "param": "packagedata", + "parent": "parent_package", + "val": "packagedata", + }, + "type": "record ncf6 filein ncf6_filename", + }, + "xorigin": { + "block": "options", + "description": "x-position of the origin used for model grid vertices. this value should be provided in a real-world coordinate system. a default value of zero is assigned if not specified. the value for xorigin does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", + "longname": "x-position origin of the model grid coordinate system", + "name": "xorigin", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "yorigin": { + "block": "options", + "description": "y-position of the origin used for model grid vertices. this value should be provided in a real-world coordinate system. if not specified, then a default value equal to zero is used. the value for yorigin does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", + "longname": "y-position origin of the model grid coordinate system", + "name": "yorigin", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + }, + "vertices": { + "vertices": { + "block": "vertices", + "item": { + "block": "vertices", + "fields": { + "iv": { + "block": "vertices", + "description": "is the vertex number. Records in the VERTICES block must be listed in consecutive order from 1 to NVERT.", + "longname": "vertex number", + "name": "iv", + "numeric_index": "true", + "optional": "false", + "reader": "urword", + "type": "integer", + }, + "xv": { + "block": "vertices", + "description": "is the x-coordinate for the vertex.", + "longname": "x-coordinate for vertex", + "name": "xv", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + "yv": { + "block": "vertices", + "description": "is the y-coordinate for the vertex.", + "longname": "y-coordinate for vertex", + "name": "yv", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + }, + "longname": "vertices data", + "name": "vertices", + "optional": False, + "reader": "urword", + "type": "record", + }, + "longname": "vertices data", + "name": "vertices", + "optional": False, + "reader": "urword", + "shape": "(nvert)", + "type": "recarray", + } + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwtdsp.py b/flopy/mf6/modflow/mfgwtdsp.py index 7a223c10ac..8989eaba29 100644 --- a/flopy/mf6/modflow/mfgwtdsp.py +++ b/flopy/mf6/modflow/mfgwtdsp.py @@ -33,8 +33,11 @@ class ModflowGwtdsp(MFPackage): keyword that specifies input griddata arrays should be written to layered ascii output files. export_array_netcdf : keyword - keyword that specifies input griddata arrays should be written to the model - output netcdf file. + keyword that specifies input gridded arrays should be written to the model + output netcdf file with attributes that support using the generated file as a + 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. diffc : [double precision] effective molecular diffusion coefficient. alh : [double precision] @@ -184,6 +187,126 @@ class ModflowGwtdsp(MFPackage): "optional true", ], ] + spec = { + "advanced": False, + "griddata": { + "alh": { + "block": "griddata", + "description": "longitudinal dispersivity in horizontal direction. if flow is strictly horizontal, then this is the longitudinal dispersivity that will be used. if flow is not strictly horizontal or strictly vertical, then the longitudinal dispersivity is a function of both alh and alv. if mechanical dispersion is represented (by specifying any dispersivity values) then this array is required.", + "layered": True, + "longname": "longitudinal dispersivity in horizontal direction", + "name": "alh", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "alv": { + "block": "griddata", + "description": "longitudinal dispersivity in vertical direction. if flow is strictly vertical, then this is the longitudinal dispsersivity value that will be used. if flow is not strictly horizontal or strictly vertical, then the longitudinal dispersivity is a function of both alh and alv. if this value is not specified and mechanical dispersion is represented, then this array is set equal to alh.", + "layered": True, + "longname": "longitudinal dispersivity in vertical direction", + "name": "alv", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "ath1": { + "block": "griddata", + "description": "transverse dispersivity in horizontal direction. this is the transverse dispersivity value for the second ellipsoid axis. if flow is strictly horizontal and directed in the x direction (along a row for a regular grid), then this value controls spreading in the y direction. if mechanical dispersion is represented (by specifying any dispersivity values) then this array is required.", + "layered": True, + "longname": "transverse dispersivity in horizontal direction", + "name": "ath1", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "ath2": { + "block": "griddata", + "description": "transverse dispersivity in horizontal direction. this is the transverse dispersivity value for the third ellipsoid axis. if flow is strictly horizontal and directed in the x direction (along a row for a regular grid), then this value controls spreading in the z direction. if this value is not specified and mechanical dispersion is represented, then this array is set equal to ath1.", + "layered": True, + "longname": "transverse dispersivity in horizontal direction", + "name": "ath2", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "atv": { + "block": "griddata", + "description": "transverse dispersivity when flow is in vertical direction. if flow is strictly vertical and directed in the z direction, then this value controls spreading in the x and y directions. if this value is not specified and mechanical dispersion is represented, then this array is set equal to ath2.", + "layered": True, + "longname": "transverse dispersivity when flow is in vertical direction", + "name": "atv", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "diffc": { + "block": "griddata", + "description": "effective molecular diffusion coefficient.", + "layered": True, + "longname": "effective molecular diffusion coefficient", + "name": "diffc", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + }, + "multi": False, + "name": "gwt-dsp", + "options": { + "export_array_ascii": { + "block": "options", + "description": "keyword that specifies input griddata arrays should be written to layered ascii output files.", + "longname": "export array variables to layered ascii files.", + "mf6internal": "export_ascii", + "name": "export_array_ascii", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "export_array_netcdf": { + "block": "options", + "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", + "extended": True, + "longname": "export array variables to netcdf output files.", + "mf6internal": "export_nc", + "name": "export_array_netcdf", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "xt3d_off": { + "block": "options", + "description": "deactivate the xt3d method and use the faster and less accurate approximation. this option may provide a fast and accurate solution under some circumstances, such as when flow aligns with the model grid, there is no mechanical dispersion, or when the longitudinal and transverse dispersivities are equal. this option may also be used to assess the computational demand of the xt3d approach by noting the run time differences with and without this option on.", + "longname": "deactivate xt3d", + "name": "xt3d_off", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "xt3d_rhs": { + "block": "options", + "description": "add xt3d terms to right-hand side, when possible. this option uses less memory, but may require more iterations.", + "longname": "xt3d on right-hand side", + "name": "xt3d_rhs", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwtfmi.py b/flopy/mf6/modflow/mfgwtfmi.py index 15e4130f53..6caecf9386 100644 --- a/flopy/mf6/modflow/mfgwtfmi.py +++ b/flopy/mf6/modflow/mfgwtfmi.py @@ -111,6 +111,77 @@ class ModflowGwtfmi(MFPackage): "reader urword", ], ] + spec = { + "advanced": False, + "multi": False, + "name": "gwt-fmi", + "options": { + "flow_imbalance_correction": { + "block": "options", + "description": "correct for an imbalance in flows by assuming that any residual flow error comes in or leaves at the concentration of the cell. when this option is activated, the gwt model budget written to the listing file will contain two additional entries: flow-error and flow-correction. these two entries will be equal but opposite in sign. the flow-correction term is a mass flow that is added to offset the error caused by an imprecise flow balance. if these terms are not relatively small, the flow model should be rerun with stricter convergence tolerances.", + "longname": "correct for flow imbalance", + "mf6internal": "imbalancecorrect", + "name": "flow_imbalance_correction", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that fmi flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save calculated flow imbalance correction to budget file", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + "packagedata": { + "packagedata": { + "block": "packagedata", + "item": { + "block": "packagedata", + "fields": { + "filein": { + "block": "packagedata", + "description": "keyword to specify that an input filename is expected next.", + "longname": "file keyword", + "name": "filein", + "optional": "false", + "reader": "urword", + "type": "keyword", + }, + "flowtype": { + "block": "packagedata", + "description": "is the word GWFBUDGET, GWFHEAD, GWFMOVER or the name of an advanced GWF stress package. If GWFBUDGET is specified, then the corresponding file must be a budget file. If GWFHEAD is specified, the file must be a head file. If GWFGRID is specified, the file must be a binary grid file. If an advanced GWF stress package name appears then the corresponding file must be the budget file saved by a LAK, SFR, MAW or UZF Package.", + "longname": "flow type", + "name": "flowtype", + "reader": "urword", + "type": "string", + }, + "fname": { + "block": "packagedata", + "description": "is the name of the file containing flows. The path to the file should be included if the file is not located in the folder where the program was run.", + "longname": "file name", + "name": "fname", + "reader": "urword", + "type": "string", + }, + }, + "longname": "flowtype list", + "name": "packagedata", + "optional": True, + "reader": "urword", + "type": "record", + }, + "longname": "flowtype list", + "name": "packagedata", + "optional": True, + "reader": "urword", + "type": "recarray", + } + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwtgwt.py b/flopy/mf6/modflow/mfgwtgwt.py index 8bb1b36e4e..6390c3749d 100644 --- a/flopy/mf6/modflow/mfgwtgwt.py +++ b/flopy/mf6/modflow/mfgwtgwt.py @@ -399,6 +399,271 @@ class ModflowGwtgwt(MFPackage): "optional true", ], ] + spec = { + "advanced": False, + "dimensions": { + "nexg": { + "block": "dimensions", + "description": "keyword and integer value specifying the number of gwt-gwt exchanges.", + "longname": "number of exchanges", + "name": "nexg", + "optional": False, + "reader": "urword", + "type": "integer", + } + }, + "exchangedata": { + "exchangedata": { + "block": "exchangedata", + "item": { + "block": "exchangedata", + "fields": { + "aux": { + "block": "exchangedata", + "description": "represents the values of the auxiliary variables for each GWTGWT Exchange. The values of auxiliary variables must be present for each exchange. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block.", + "longname": "auxiliary variables", + "mf6internal": "auxvar", + "name": "aux", + "optional": "true", + "reader": "urword", + "shape": "(naux)", + "type": "double precision", + }, + "boundname": { + "block": "exchangedata", + "description": "name of the GWT Exchange cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", + "longname": "exchange boundname", + "name": "boundname", + "optional": "true", + "reader": "urword", + "type": "string", + }, + "cellidm1": { + "block": "exchangedata", + "description": "is the cellid of the cell in model 1 as specified in the simulation name file. For a structured grid that uses the DIS input file, CELLIDM1 is the layer, row, and column numbers of the cell. For a grid that uses the DISV input file, CELLIDM1 is the layer number and CELL2D number for the two cells. If the model uses the unstructured discretization (DISU) input file, then CELLIDM1 is the node number for the cell.", + "longname": "cellid of first cell", + "name": "cellidm1", + "numeric_index": "true", + "optional": "false", + "reader": "urword", + "type": "integer", + }, + "cellidm2": { + "block": "exchangedata", + "description": "is the cellid of the cell in model 2 as specified in the simulation name file. For a structured grid that uses the DIS input file, CELLIDM2 is the layer, row, and column numbers of the cell. For a grid that uses the DISV input file, CELLIDM2 is the layer number and CELL2D number for the two cells. If the model uses the unstructured discretization (DISU) input file, then CELLIDM2 is the node number for the cell.", + "longname": "cellid of second cell", + "name": "cellidm2", + "numeric_index": "true", + "optional": "false", + "reader": "urword", + "type": "integer", + }, + "cl1": { + "block": "exchangedata", + "description": "is the distance between the center of cell 1 and the its shared face with cell 2.", + "longname": "connection distance", + "name": "cl1", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + "cl2": { + "block": "exchangedata", + "description": "is the distance between the center of cell 2 and the its shared face with cell 1.", + "longname": "connection distance", + "name": "cl2", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + "hwva": { + "block": "exchangedata", + "description": "is the horizontal width of the flow connection between cell 1 and cell 2 if IHC $>$ 0, or it is the area perpendicular to flow of the vertical connection between cell 1 and cell 2 if IHC = 0.", + "longname": "horizontal cell width or area for vertical flow", + "name": "hwva", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + "ihc": { + "block": "exchangedata", + "description": "is an integer flag indicating the direction between node n and all of its m connections. If IHC = 0 then the connection is vertical. If IHC = 1 then the connection is horizontal. If IHC = 2 then the connection is horizontal for a vertically staggered grid.", + "longname": "integer flag for connection type", + "name": "ihc", + "optional": "false", + "reader": "urword", + "type": "integer", + }, + }, + "longname": "exchange data", + "name": "exchangedata", + "optional": False, + "reader": "urword", + "type": "record", + }, + "longname": "exchange data", + "name": "exchangedata", + "optional": False, + "reader": "urword", + "shape": "(nexg)", + "type": "recarray", + } + }, + "fkeys": { + "mvt_filerecord": { + "abbr": "mvt", + "key": "mvt_filerecord", + "param": "perioddata", + "parent": "parent_model_or_package", + "val": "perioddata", + }, + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + }, + "multi": True, + "name": "exg-gwtgwt", + "options": { + "adv_scheme": { + "block": "options", + "description": "scheme used to solve the advection term. can be upstream, central, or tvd. if not specified, upstream weighting is the default weighting scheme.", + "longname": "advective scheme", + "name": "adv_scheme", + "optional": True, + "reader": "urword", + "type": "string", + "valid": "upstream central tvd", + }, + "auxiliary": { + "block": "options", + "description": "an array of auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided. most auxiliary variables will not be used by the gwt-gwt exchange, but they will be available for use by other parts of the program. if an auxiliary variable with the name 'angldegx' is found, then this information will be used as the angle (provided in degrees) between the connection face normal and the x axis, where a value of zero indicates that a normal vector points directly along the positive x axis. the connection face normal is a normal vector on the cell face shared between the cell in model 1 and the cell in model 2 pointing away from the model 1 cell. additional information on 'angldegx' is provided in the description of the disu package. angldegx must be specified if dispersion is simulated in the connected gwt models.", + "longname": "keyword to specify aux variables", + "name": "auxiliary", + "optional": True, + "reader": "urword", + "shape": "(naux)", + "type": "string", + }, + "boundnames": { + "block": "options", + "description": "keyword to indicate that boundary names may be provided with the list of gwt exchange cells.", + "name": "boundnames", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "dev_interfacemodel_on": { + "block": "options", + "description": "activates the interface model mechanism for calculating the coefficients at (and possibly near) the exchange. this keyword should only be used for development purposes.", + "longname": "activate interface model on exchange", + "mf6internal": "dev_ifmod_on", + "name": "dev_interfacemodel_on", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "dsp_xt3d_off": { + "block": "options", + "description": "deactivate the xt3d method for the dispersive flux and use the faster and less accurate approximation for this exchange.", + "longname": "deactivate xt3d", + "name": "dsp_xt3d_off", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "dsp_xt3d_rhs": { + "block": "options", + "description": "add xt3d dispersion terms to right-hand side, when possible, for this exchange.", + "longname": "xt3d on right-hand side", + "name": "dsp_xt3d_rhs", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "gwfmodelname1": { + "block": "options", + "description": "keyword to specify name of first corresponding gwf model. in the simulation name file, the gwt6-gwt6 entry contains names for gwt models (exgmnamea and exgmnameb). the gwt model with the name exgmnamea must correspond to the gwf model with the name gwfmodelname1.", + "longname": "keyword to specify name of first corresponding gwf model", + "name": "gwfmodelname1", + "optional": False, + "reader": "urword", + "type": "string", + }, + "gwfmodelname2": { + "block": "options", + "description": "keyword to specify name of second corresponding gwf model. in the simulation name file, the gwt6-gwt6 entry contains names for gwt models (exgmnamea and exgmnameb). the gwt model with the name exgmnameb must correspond to the gwf model with the name gwfmodelname2.", + "longname": "keyword to specify name of second corresponding gwf model", + "name": "gwfmodelname2", + "optional": False, + "reader": "urword", + "type": "string", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "perioddata": { + "block": "options", + "description": "Contains data for the mvt package. Data can be passed as a dictionary to the mvt package with variable names as keys and package data as values. Data for the perioddata variable is also acceptable. See mvt package documentation for more information.", + "name": "perioddata", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "mvt", + "key": "mvt_filerecord", + "param": "perioddata", + "parent": "parent_model_or_package", + "val": "perioddata", + }, + "type": "record mvt6 filein mvt6_filename", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of exchange flow rates will be printed to the listing file for every stress period in which 'save budget' is specified in output control.", + "longname": "keyword to print gwfgwf flows to list file", + "mf6internal": "iprflow", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of exchange entries will be echoed to the listing file immediately after it is read.", + "longname": "keyword to print input to list file", + "mf6internal": "iprpak", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that cell-by-cell flow terms will be written to the budget file for each model provided that the output control for the models are set up with the 'budget save file' option.", + "longname": "keyword to save gwfgwf flows", + "mf6internal": "ipakcb", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwtic.py b/flopy/mf6/modflow/mfgwtic.py index fe3c10a899..3f22ce063b 100644 --- a/flopy/mf6/modflow/mfgwtic.py +++ b/flopy/mf6/modflow/mfgwtic.py @@ -23,8 +23,11 @@ class ModflowGwtic(MFPackage): keyword that specifies input griddata arrays should be written to layered ascii output files. export_array_netcdf : keyword - keyword that specifies input griddata arrays should be written to the model - output netcdf file. + keyword that specifies input gridded arrays should be written to the model + output netcdf file with attributes that support using the generated file as a + 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. strt : [double precision] is the initial (starting) concentration---that is, concentration at the beginning of the gwt model simulation. strt must be specified for all gwt @@ -73,6 +76,48 @@ class ModflowGwtic(MFPackage): "default 0.0", ], ] + spec = { + "advanced": False, + "griddata": { + "strt": { + "block": "griddata", + "default": 0.0, + "description": "is the initial (starting) concentration---that is, concentration at the beginning of the gwt model simulation. strt must be specified for all gwt model simulations. one value is read for every model cell.", + "layered": True, + "longname": "starting concentration", + "name": "strt", + "netcdf": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + } + }, + "multi": False, + "name": "gwt-ic", + "options": { + "export_array_ascii": { + "block": "options", + "description": "keyword that specifies input griddata arrays should be written to layered ascii output files.", + "longname": "export array variables to layered ascii files.", + "mf6internal": "export_ascii", + "name": "export_array_ascii", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "export_array_netcdf": { + "block": "options", + "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", + "extended": True, + "longname": "export array variables to netcdf output files.", + "mf6internal": "export_nc", + "name": "export_array_netcdf", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwtist.py b/flopy/mf6/modflow/mfgwtist.py index 814cb0477e..475b004a04 100644 --- a/flopy/mf6/modflow/mfgwtist.py +++ b/flopy/mf6/modflow/mfgwtist.py @@ -64,8 +64,11 @@ class ModflowGwtist(MFPackage): keyword that specifies input griddata arrays should be written to layered ascii output files. export_array_netcdf : keyword - keyword that specifies input griddata arrays should be written to the model - output netcdf file. + keyword that specifies input gridded arrays should be written to the model + output netcdf file with attributes that support using the generated file as a + 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. porosity : [double precision] porosity of the immobile domain specified as the immobile domain pore volume per immobile domain volume. @@ -486,6 +489,264 @@ class ModflowGwtist(MFPackage): "optional true", ], ] + spec = { + "advanced": False, + "griddata": { + "bulk_density": { + "block": "griddata", + "description": "is the bulk density of this immobile domain in mass per length cubed. bulk density is defined as the immobile domain solid mass per volume of the immobile domain. bulk_density is not required unless the sorption keyword is specified in the options block. if the sorption keyword is not specified in the options block, bulk_density will have no effect on simulation results.", + "layered": True, + "longname": "bulk density", + "name": "bulk_density", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "cim": { + "block": "griddata", + "description": "initial concentration of the immobile domain in mass per length cubed. if cim is not specified, then it is assumed to be zero.", + "layered": True, + "longname": "initial concentration of the immobile domain", + "name": "cim", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "decay": { + "block": "griddata", + "description": "is the rate coefficient for first or zero-order decay for the aqueous phase of the immobile domain. a negative value indicates solute production. the dimensions of decay for first-order decay is one over time. the dimensions of decay for zero-order decay is mass per length cubed per time. decay will have no effect on simulation results unless either first- or zero-order decay is specified in the options block.", + "layered": True, + "longname": "first rate coefficient", + "name": "decay", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "decay_sorbed": { + "block": "griddata", + "description": "is the rate coefficient for first or zero-order decay for the sorbed phase of the immobile domain. a negative value indicates solute production. the dimensions of decay_sorbed for first-order decay is one over time. the dimensions of decay_sorbed for zero-order decay is mass of solute per mass of aquifer per time. if decay_sorbed is not specified and both decay and sorption are active, then the program will terminate with an error. decay_sorbed will have no effect on simulation results unless the sorption keyword and either first- or zero-order decay are specified in the options block.", + "layered": True, + "longname": "second rate coefficient", + "name": "decay_sorbed", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "distcoef": { + "block": "griddata", + "description": "is the distribution coefficient for the equilibrium-controlled linear sorption isotherm in dimensions of length cubed per mass. distcoef is not required unless the sorption keyword is specified in the options block. if the sorption keyword is not specified in the options block, distcoef will have no effect on simulation results.", + "layered": True, + "longname": "distribution coefficient", + "name": "distcoef", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "porosity": { + "block": "griddata", + "description": "porosity of the immobile domain specified as the immobile domain pore volume per immobile domain volume.", + "layered": True, + "longname": "porosity of the immobile domain", + "name": "porosity", + "netcdf": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "sp2": { + "block": "griddata", + "description": "is the exponent for the freundlich isotherm and the sorption capacity for the langmuir isotherm. sp2 is not required unless the sorption keyword is specified in the options block and sorption is specified as freundlich or langmuir. if the sorption keyword is not specified in the options block, or if sorption is specified as linear, sp2 will have no effect on simulation results.", + "layered": True, + "longname": "second sorption parameter", + "name": "sp2", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "volfrac": { + "block": "griddata", + "description": "fraction of the cell volume that consists of this immobile domain. the sum of all immobile domain volume fractions must be less than one.", + "layered": True, + "longname": "volume fraction of this immobile domain", + "name": "volfrac", + "netcdf": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "zetaim": { + "block": "griddata", + "description": "mass transfer rate coefficient between the mobile and immobile domains, in dimensions of per time.", + "layered": True, + "longname": "mass transfer rate coefficient between the mobile and immobile domains", + "name": "zetaim", + "netcdf": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + }, + "multi": True, + "name": "gwt-ist", + "options": { + "budget_filerecord": { + "block": "options", + "fields": { + "budgetfile": { + "block": "options", + "description": "name of the binary output file to write budget information.", + "longname": "file keyword", + "name": "budgetfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "budfilerec", + "name": "budget_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "budgetcsv_filerecord": { + "block": "options", + "fields": { + "budgetcsvfile": { + "block": "options", + "description": "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.", + "longname": "file keyword", + "name": "budgetcsvfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "budcsvfilerec", + "name": "budgetcsv_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "cim_filerecord": { + "block": "options", + "fields": {}, + "mf6internal": "cimfilerec", + "name": "cim_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "cimprintrecord": { + "block": "options", + "fields": { + "print_format": { + "block": "options", + "description": "keyword to specify format for printing to the listing file.", + "longname": "keyword to indicate that a print format follows", + "name": "print_format", + "optional": "false", + "reader": "urword", + "type": "keyword", + } + }, + "name": "cimprintrecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "export_array_ascii": { + "block": "options", + "description": "keyword that specifies input griddata arrays should be written to layered ascii output files.", + "longname": "export array variables to layered ascii files.", + "mf6internal": "export_ascii", + "name": "export_array_ascii", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "export_array_netcdf": { + "block": "options", + "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", + "extended": True, + "longname": "export array variables to netcdf output files.", + "mf6internal": "export_nc", + "name": "export_array_netcdf", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "first_order_decay": { + "block": "options", + "description": "is a text keyword to indicate that first-order decay will occur. use of this keyword requires that decay and decay_sorbed (if sorption is active) are specified in the griddata block.", + "longname": "activate first-order decay", + "mf6internal": "order1_decay", + "name": "first_order_decay", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that ist flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save calculated flows to budget file", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "sorbate_filerecord": { + "block": "options", + "fields": { + "sorbatefile": { + "block": "options", + "description": "name of the output file to write immobile sorbate concentration information. Immobile sorbate concentrations will be written whenever aqueous immobile concentrations are saved, as determined by settings in the Output Control option.", + "longname": "file keyword", + "name": "sorbatefile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "sorbatefilerec", + "name": "sorbate_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "sorption": { + "block": "options", + "description": "is a text keyword to indicate that sorption will be activated. valid sorption options include linear, freundlich, and langmuir. use of this keyword requires that bulk_density and distcoef are specified in the griddata block. if sorption is specified as freundlich or langmuir then sp2 is also required in the griddata block. the sorption option must be consistent with the sorption option specified in the mst package or the program will terminate with an error.", + "longname": "activate sorption", + "name": "sorption", + "optional": True, + "reader": "urword", + "type": "string", + "valid": "linear freundlich langmuir", + }, + "zero_order_decay": { + "block": "options", + "description": "is a text keyword to indicate that zero-order decay will occur. use of this keyword requires that decay and decay_sorbed (if sorption is active) are specified in the griddata block.", + "longname": "activate zero-order decay", + "mf6internal": "order0_decay", + "name": "zero_order_decay", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwtlkt.py b/flopy/mf6/modflow/mfgwtlkt.py index 475fa75257..fa1d8cf3e5 100644 --- a/flopy/mf6/modflow/mfgwtlkt.py +++ b/flopy/mf6/modflow/mfgwtlkt.py @@ -618,6 +618,360 @@ class ModflowGwtlkt(MFPackage): "time_series true", ], ] + spec = { + "advanced": False, + "fkeys": { + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "ts_filerecord": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + }, + "multi": True, + "name": "gwt-lkt", + "options": { + "auxiliary": { + "block": "options", + "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", + "longname": "keyword to specify aux variables", + "name": "auxiliary", + "optional": True, + "reader": "urword", + "shape": "(naux)", + "type": "string", + }, + "boundnames": { + "block": "options", + "description": "keyword to indicate that boundary names may be provided with the list of lake cells.", + "name": "boundnames", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "budget_filerecord": { + "block": "options", + "fields": { + "budgetfile": { + "block": "options", + "description": "name of the binary output file to write budget information.", + "longname": "file keyword", + "name": "budgetfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "budget_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "budgetcsv_filerecord": { + "block": "options", + "fields": { + "budgetcsvfile": { + "block": "options", + "description": "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.", + "longname": "file keyword", + "name": "budgetcsvfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "budgetcsv_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "concentration_filerecord": { + "block": "options", + "fields": { + "concfile": { + "block": "options", + "description": "name of the binary output file to write concentration information.", + "longname": "file keyword", + "name": "concfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "concentration_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "flow_package_auxiliary_name": { + "block": "options", + "description": "keyword to specify the name of an auxiliary variable in the corresponding flow package. if specified, then the simulated concentrations from this advanced transport package will be copied into the auxiliary variable specified with this name. note that the flow package must have an auxiliary variable with this name or the program will terminate with an error. if the flows for this advanced transport package are read from a file, then this option will have no effect.", + "longname": "keyword to specify name of concentration auxiliary variable in flow package", + "name": "flow_package_auxiliary_name", + "optional": True, + "reader": "urword", + "type": "string", + }, + "flow_package_name": { + "block": "options", + "description": "keyword to specify the name of the corresponding flow package. if not specified, then the corresponding flow package must have the same name as this advanced transport package (the name associated with this package in the gwt name file).", + "longname": "keyword to specify name of corresponding flow package", + "name": "flow_package_name", + "optional": True, + "reader": "urword", + "type": "string", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "print_concentration": { + "block": "options", + "description": "keyword to indicate that the list of lake {#2} will be printed to the listing file for every stress period in which 'concentration print' is specified in output control. if there is no output control option and print_{#3} is specified, then {#2} are printed for the last time step of each stress period.", + "longname": "print calculated stages to listing file", + "name": "print_concentration", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_flows": { + "block": "options", + "description": "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.", + "longname": "print calculated flows to listing file", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of lake information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that lake flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save lake flows to budget file", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "timeseries": { + "block": "options", + "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", + "name": "timeseries", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + "type": "record ts6 filein ts6_filename", + }, + }, + "packagedata": { + "packagedata": { + "block": "packagedata", + "item": { + "block": "packagedata", + "fields": { + "aux": { + "block": "packagedata", + "description": "represents the values of the auxiliary variables for each lake. The values of auxiliary variables must be present for each lake. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "auxiliary variables", + "name": "aux", + "optional": "true", + "reader": "urword", + "shape": "(naux)", + "time_series": "true", + "type": "double precision", + }, + "boundname": { + "block": "packagedata", + "description": "name of the lake cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", + "longname": "lake name", + "name": "boundname", + "optional": "true", + "reader": "urword", + "type": "string", + }, + "ifno": { + "block": "period", + "description": "integer value that defines the feature (lake) number associated with the specified PERIOD data on the line. IFNO must be greater than zero and less than or equal to NLAKES.", + "longname": "lake number for this entry", + "name": "ifno", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "strt": { + "block": "packagedata", + "description": "real value that defines the starting concentration for the lake.", + "longname": "starting lake concentration", + "name": "strt", + "reader": "urword", + "type": "double precision", + }, + }, + "name": "packagedata", + "reader": "urword", + "type": "record", + }, + "name": "packagedata", + "reader": "urword", + "shape": "(maxbound)", + "type": "recarray", + } + }, + "period": { + "lakeperioddata": { + "block": "period", + "item": { + "block": "period", + "fields": { + "ifno": { + "block": "period", + "description": "integer value that defines the feature (lake) number associated with the specified period data on the line. ifno must be greater than zero and less than or equal to nlakes.", + "longname": "lake number for this entry", + "name": "ifno", + "numeric_index": True, + "reader": "urword", + "type": "integer", + }, + "laksetting": { + "block": "period", + "choices": { + "auxiliaryrecord": { + "block": "period", + "fields": { + "auxiliary": { + "block": "period", + "description": "keyword for specifying auxiliary variable.", + "name": "auxiliary", + "reader": "urword", + "type": "keyword", + }, + "auxname": { + "block": "period", + "description": "name for the auxiliary variable to be assigned AUXVAL. AUXNAME must match one of the auxiliary variable names defined in the OPTIONS block. If AUXNAME does not match one of the auxiliary variable names defined in the OPTIONS block the data are ignored.", + "name": "auxname", + "reader": "urword", + "type": "string", + }, + "auxval": { + "block": "period", + "description": "value for the auxiliary variable. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "auxiliary variable value", + "name": "auxval", + "reader": "urword", + "time_series": "true", + "type": "double precision", + }, + }, + "name": "auxiliaryrecord", + "reader": "urword", + "type": "record", + }, + "concentration": { + "block": "period", + "description": "real or character value that defines the concentration for the lake. the specified concentration is only applied if the lake is a constant concentration lake. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "lake concentration", + "name": "concentration", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "evaporation": { + "block": "period", + "description": "real or character value that defines the concentration of evaporated water $(ml^{-3})$ for the lake. if this concentration value is larger than the simulated concentration in the lake, then the evaporated water will be removed at the same concentration as the lake. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "evaporation concentration", + "name": "evaporation", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "ext-inflow": { + "block": "period", + "description": "real or character value that defines the concentration of external inflow $(ml^{-3})$ for the lake. value must be greater than or equal to zero. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "ext-inflow concentration", + "name": "ext-inflow", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "rainfall": { + "block": "period", + "description": "real or character value that defines the rainfall solute concentration $(ml^{-3})$ for the lake. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "rainfall concentration", + "name": "rainfall", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "runoff": { + "block": "period", + "description": "real or character value that defines the concentration of runoff $(ml^{-3})$ for the lake. value must be greater than or equal to zero. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "runoff concentration", + "name": "runoff", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "status": { + "block": "period", + "description": "keyword option to define lake status. status can be active, inactive, or constant. by default, status is active, which means that concentration will be calculated for the lake. if a lake is inactive, then there will be no solute mass fluxes into or out of the lake and the inactive value will be written for the lake concentration. if a lake is constant, then the concentration for the lake will be fixed at the user specified value.", + "longname": "lake concentration status", + "name": "status", + "reader": "urword", + "type": "string", + }, + }, + "description": "line of information that is parsed into a keyword and values. keyword values that can be used to start the laksetting string include: status, concentration, rainfall, evaporation, runoff, ext-inflow, and auxiliary. these settings are used to assign the concentration of associated with the corresponding flow terms. concentrations cannot be specified for all flow terms. for example, the lake package supports a 'withdrawal' flow term. if this withdrawal term is active, then water will be withdrawn from the lake at the calculated concentration of the lake.", + "name": "laksetting", + "reader": "urword", + "type": "keystring", + }, + }, + "name": "lakeperioddata", + "reader": "urword", + "type": "record", + }, + "name": "lakeperioddata", + "reader": "urword", + "type": "recarray", + }, + "transient_block": True, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwtmst.py b/flopy/mf6/modflow/mfgwtmst.py index dd128f0951..930b99c87f 100644 --- a/flopy/mf6/modflow/mfgwtmst.py +++ b/flopy/mf6/modflow/mfgwtmst.py @@ -46,8 +46,11 @@ class ModflowGwtmst(MFPackage): keyword that specifies input griddata arrays should be written to layered ascii output files. export_array_netcdf : keyword - keyword that specifies input griddata arrays should be written to the model - output netcdf file. + keyword that specifies input gridded arrays should be written to the model + output netcdf file with attributes that support using the generated file as a + 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. porosity : [double precision] is the mobile domain porosity, defined as the mobile domain pore volume per mobile domain volume. additional information on porosity within the context of @@ -259,6 +262,165 @@ class ModflowGwtmst(MFPackage): "optional true", ], ] + spec = { + "advanced": False, + "griddata": { + "bulk_density": { + "block": "griddata", + "description": "is the bulk density of the aquifer in mass per length cubed. bulk_density is not required unless the sorption keyword is specified. bulk density is defined as the mobile domain solid mass per mobile domain volume. additional information on bulk density is included in the modflow 6 supplemental technical information document.", + "layered": True, + "longname": "bulk density", + "name": "bulk_density", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "decay": { + "block": "griddata", + "description": "is the rate coefficient for first or zero-order decay for the aqueous phase of the mobile domain. a negative value indicates solute production. the dimensions of decay for first-order decay is one over time. the dimensions of decay for zero-order decay is mass per length cubed per time. decay will have no effect on simulation results unless either first- or zero-order decay is specified in the options block.", + "layered": True, + "longname": "aqueous phase decay rate coefficient", + "name": "decay", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "decay_sorbed": { + "block": "griddata", + "description": "is the rate coefficient for first or zero-order decay for the sorbed phase of the mobile domain. a negative value indicates solute production. the dimensions of decay_sorbed for first-order decay is one over time. the dimensions of decay_sorbed for zero-order decay is mass of solute per mass of aquifer per time. if decay_sorbed is not specified and both decay and sorption are active, then the program will terminate with an error. decay_sorbed will have no effect on simulation results unless the sorption keyword and either first- or zero-order decay are specified in the options block.", + "layered": True, + "longname": "sorbed phase decay rate coefficient", + "name": "decay_sorbed", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "distcoef": { + "block": "griddata", + "description": "is the distribution coefficient for the equilibrium-controlled linear sorption isotherm in dimensions of length cubed per mass. if the freunchlich isotherm is specified, then discoef is the freundlich constant. if the langmuir isotherm is specified, then distcoef is the langmuir constant. distcoef is not required unless the sorption keyword is specified.", + "layered": True, + "longname": "distribution coefficient", + "name": "distcoef", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "porosity": { + "block": "griddata", + "description": "is the mobile domain porosity, defined as the mobile domain pore volume per mobile domain volume. additional information on porosity within the context of mobile and immobile domain transport simulations is included in the modflow 6 supplemental technical information document.", + "layered": True, + "longname": "porosity", + "name": "porosity", + "netcdf": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "sp2": { + "block": "griddata", + "description": "is the exponent for the freundlich isotherm and the sorption capacity for the langmuir isotherm. sp2 is not required unless the sorption keyword is specified in the options block. if the sorption keyword is not specified in the options block, sp2 will have no effect on simulation results.", + "layered": True, + "longname": "second sorption parameter", + "name": "sp2", + "netcdf": True, + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + }, + "multi": False, + "name": "gwt-mst", + "options": { + "export_array_ascii": { + "block": "options", + "description": "keyword that specifies input griddata arrays should be written to layered ascii output files.", + "longname": "export array variables to layered ascii files.", + "mf6internal": "export_ascii", + "name": "export_array_ascii", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "export_array_netcdf": { + "block": "options", + "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", + "extended": True, + "longname": "export array variables to netcdf output files.", + "mf6internal": "export_nc", + "name": "export_array_netcdf", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "first_order_decay": { + "block": "options", + "description": "is a text keyword to indicate that first-order decay will occur. use of this keyword requires that decay and decay_sorbed (if sorption is active) are specified in the griddata block.", + "longname": "activate first-order decay", + "mf6internal": "order1_decay", + "name": "first_order_decay", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that mst flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save calculated flows to budget file", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "sorbate_filerecord": { + "block": "options", + "fields": { + "sorbatefile": { + "block": "options", + "description": "name of the output file to write sorbate concentration information. Sorbate concentrations will be written whenever aqueous concentrations are saved, as determined by settings in the Output Control option.", + "longname": "file keyword", + "name": "sorbatefile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "sorbate_rec", + "name": "sorbate_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "sorption": { + "block": "options", + "description": "is a text keyword to indicate that sorption will be activated. valid sorption options include linear, freundlich, and langmuir. use of this keyword requires that bulk_density and distcoef are specified in the griddata block. if sorption is specified as freundlich or langmuir then sp2 is also required in the griddata block.", + "longname": "activate sorption", + "name": "sorption", + "optional": True, + "reader": "urword", + "type": "string", + "valid": "linear freundlich langmuir", + }, + "zero_order_decay": { + "block": "options", + "description": "is a text keyword to indicate that zero-order decay will occur. use of this keyword requires that decay and decay_sorbed (if sorption is active) are specified in the griddata block.", + "longname": "activate zero-order decay", + "mf6internal": "order0_decay", + "name": "zero_order_decay", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwtmvt.py b/flopy/mf6/modflow/mfgwtmvt.py index 06568bdb41..7f4aea83a2 100644 --- a/flopy/mf6/modflow/mfgwtmvt.py +++ b/flopy/mf6/modflow/mfgwtmvt.py @@ -154,6 +154,83 @@ class ModflowGwtmvt(MFPackage): "optional false", ], ] + spec = { + "advanced": False, + "multi": False, + "name": "gwt-mvt", + "options": { + "budget_filerecord": { + "block": "options", + "fields": { + "budgetfile": { + "block": "options", + "description": "name of the binary output file to write budget information.", + "longname": "file keyword", + "name": "budgetfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "budget_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "budgetcsv_filerecord": { + "block": "options", + "fields": { + "budgetcsvfile": { + "block": "options", + "description": "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.", + "longname": "file keyword", + "name": "budgetcsvfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "budgetcsv_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "print_flows": { + "block": "options", + "description": "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.", + "longname": "print calculated flows to listing file", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of mover information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that lake flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save lake flows to budget file", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + "ref": { + "abbr": "mvt", + "key": "mvt_filerecord", + "param": "perioddata", + "parent": "parent_model_or_package", + "val": "perioddata", + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwtmwt.py b/flopy/mf6/modflow/mfgwtmwt.py index 5451783a30..2de297abc3 100644 --- a/flopy/mf6/modflow/mfgwtmwt.py +++ b/flopy/mf6/modflow/mfgwtmwt.py @@ -568,6 +568,333 @@ class ModflowGwtmwt(MFPackage): "time_series true", ], ] + spec = { + "advanced": False, + "fkeys": { + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "ts_filerecord": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + }, + "multi": True, + "name": "gwt-mwt", + "options": { + "auxiliary": { + "block": "options", + "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", + "longname": "keyword to specify aux variables", + "name": "auxiliary", + "optional": True, + "reader": "urword", + "shape": "(naux)", + "type": "string", + }, + "boundnames": { + "block": "options", + "description": "keyword to indicate that boundary names may be provided with the list of well cells.", + "name": "boundnames", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "budget_filerecord": { + "block": "options", + "fields": { + "budgetfile": { + "block": "options", + "description": "name of the binary output file to write budget information.", + "longname": "file keyword", + "name": "budgetfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "budget_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "budgetcsv_filerecord": { + "block": "options", + "fields": { + "budgetcsvfile": { + "block": "options", + "description": "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.", + "longname": "file keyword", + "name": "budgetcsvfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "budgetcsv_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "concentration_filerecord": { + "block": "options", + "fields": { + "concfile": { + "block": "options", + "description": "name of the binary output file to write concentration information.", + "longname": "file keyword", + "name": "concfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "concentration_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "flow_package_auxiliary_name": { + "block": "options", + "description": "keyword to specify the name of an auxiliary variable in the corresponding flow package. if specified, then the simulated concentrations from this advanced transport package will be copied into the auxiliary variable specified with this name. note that the flow package must have an auxiliary variable with this name or the program will terminate with an error. if the flows for this advanced transport package are read from a file, then this option will have no effect.", + "longname": "keyword to specify name of concentration auxiliary variable in flow package", + "name": "flow_package_auxiliary_name", + "optional": True, + "reader": "urword", + "type": "string", + }, + "flow_package_name": { + "block": "options", + "description": "keyword to specify the name of the corresponding flow package. if not specified, then the corresponding flow package must have the same name as this advanced transport package (the name associated with this package in the gwt name file).", + "longname": "keyword to specify name of corresponding flow package", + "name": "flow_package_name", + "optional": True, + "reader": "urword", + "type": "string", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "print_concentration": { + "block": "options", + "description": "keyword to indicate that the list of well {#2} will be printed to the listing file for every stress period in which 'concentration print' is specified in output control. if there is no output control option and print_{#3} is specified, then {#2} are printed for the last time step of each stress period.", + "longname": "print calculated concentrations to listing file", + "name": "print_concentration", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of well 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.", + "longname": "print calculated flows to listing file", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of well information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that well flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save well flows to budget file", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "timeseries": { + "block": "options", + "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", + "name": "timeseries", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + "type": "record ts6 filein ts6_filename", + }, + }, + "packagedata": { + "packagedata": { + "block": "packagedata", + "item": { + "block": "packagedata", + "fields": { + "aux": { + "block": "packagedata", + "description": "represents the values of the auxiliary variables for each well. The values of auxiliary variables must be present for each well. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "auxiliary variables", + "name": "aux", + "optional": "true", + "reader": "urword", + "shape": "(naux)", + "time_series": "true", + "type": "double precision", + }, + "boundname": { + "block": "packagedata", + "description": "name of the well cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", + "longname": "well name", + "name": "boundname", + "optional": "true", + "reader": "urword", + "type": "string", + }, + "ifno": { + "block": "period", + "description": "integer value that defines the feature (well) number associated with the specified PERIOD data on the line. IFNO must be greater than zero and less than or equal to NMAWWELLS.", + "longname": "well number for this entry", + "name": "ifno", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "strt": { + "block": "packagedata", + "description": "real value that defines the starting concentration for the well.", + "longname": "starting well concentration", + "name": "strt", + "reader": "urword", + "type": "double precision", + }, + }, + "name": "packagedata", + "reader": "urword", + "type": "record", + }, + "name": "packagedata", + "reader": "urword", + "shape": "(maxbound)", + "type": "recarray", + } + }, + "period": { + "mwtperioddata": { + "block": "period", + "item": { + "block": "period", + "fields": { + "ifno": { + "block": "period", + "description": "integer value that defines the feature (well) number associated with the specified period data on the line. ifno must be greater than zero and less than or equal to nmawwells.", + "longname": "well number for this entry", + "name": "ifno", + "numeric_index": True, + "reader": "urword", + "type": "integer", + }, + "mwtsetting": { + "block": "period", + "choices": { + "auxiliaryrecord": { + "block": "period", + "fields": { + "auxiliary": { + "block": "period", + "description": "keyword for specifying auxiliary variable.", + "name": "auxiliary", + "reader": "urword", + "type": "keyword", + }, + "auxname": { + "block": "period", + "description": "name for the auxiliary variable to be assigned AUXVAL. AUXNAME must match one of the auxiliary variable names defined in the OPTIONS block. If AUXNAME does not match one of the auxiliary variable names defined in the OPTIONS block the data are ignored.", + "name": "auxname", + "reader": "urword", + "type": "string", + }, + "auxval": { + "block": "period", + "description": "value for the auxiliary variable. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "auxiliary variable value", + "name": "auxval", + "reader": "urword", + "time_series": "true", + "type": "double precision", + }, + }, + "name": "auxiliaryrecord", + "reader": "urword", + "type": "record", + }, + "concentration": { + "block": "period", + "description": "real or character value that defines the concentration for the well. the specified concentration is only applied if the well is a constant concentration well. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "well concentration", + "name": "concentration", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "rate": { + "block": "period", + "description": "real or character value that defines the injection solute concentration $(ml^{-3})$ for the well. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "well injection concentration", + "name": "rate", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "status": { + "block": "period", + "description": "keyword option to define well status. status can be active, inactive, or constant. by default, status is active, which means that concentration will be calculated for the well. if a well is inactive, then there will be no solute mass fluxes into or out of the well and the inactive value will be written for the well concentration. if a well is constant, then the concentration for the well will be fixed at the user specified value.", + "longname": "well concentration status", + "name": "status", + "reader": "urword", + "type": "string", + }, + }, + "description": "line of information that is parsed into a keyword and values. keyword values that can be used to start the mwtsetting string include: status, concentration, rate, and auxiliary. these settings are used to assign the concentration associated with the corresponding flow terms. concentrations cannot be specified for all flow terms. for example, the multi-aquifer well package supports a 'withdrawal' flow term. if this withdrawal term is active, then water will be withdrawn from the well at the calculated concentration of the well.", + "name": "mwtsetting", + "reader": "urword", + "type": "keystring", + }, + }, + "name": "mwtperioddata", + "reader": "urword", + "type": "record", + }, + "name": "mwtperioddata", + "reader": "urword", + "type": "recarray", + }, + "transient_block": True, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwtnam.py b/flopy/mf6/modflow/mfgwtnam.py index e904e92259..8977184891 100644 --- a/flopy/mf6/modflow/mfgwtnam.py +++ b/flopy/mf6/modflow/mfgwtnam.py @@ -36,6 +36,9 @@ class ModflowGwtnam(MFPackage): save_flows : keyword keyword to indicate that all model package flow terms will be written to the file specified with 'budget fileout' in output control. + dependent_variable_scaling : keyword + flag to scale x and rhs to avoid very large positive or negative dependent + variable values nc_mesh2d_filerecord : (ncmesh2dfile) netcdf layered mesh fileout record. * ncmesh2dfile : string @@ -129,7 +132,6 @@ class ModflowGwtnam(MFPackage): "reader urword", "optional true", "mf6internal idv_scale", - "prerelease true", ], [ "block options", @@ -281,6 +283,167 @@ class ModflowGwtnam(MFPackage): "optional true", ], ] + spec = { + "advanced": False, + "multi": False, + "name": "gwt-nam", + "options": { + "dependent_variable_scaling": { + "block": "options", + "description": "flag to scale x and rhs to avoid very large positive or negative dependent variable values", + "longname": "flag to scale x and rhs", + "mf6internal": "idv_scale", + "name": "dependent_variable_scaling", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "list": { + "block": "options", + "description": "is name of the listing file to create for this gwt model. if not specified, then the name of the list file will be the basename of the gwt model name file and the '.lst' extension. for example, if the gwt name file is called 'my.model.nam' then the list file will be called 'my.model.lst'.", + "longname": "name of listing file", + "name": "list", + "optional": True, + "reader": "urword", + "type": "string", + }, + "nc_filerecord": { + "block": "options", + "description": "netcdf filerecord", + "fields": { + "netcdf_filename": { + "block": "options", + "description": "defines a NetCDF input file.", + "extended": "true", + "longname": "netcdf input filename", + "mf6internal": "netcdf_fname", + "name": "netcdf_filename", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "nc_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "nc_mesh2d_filerecord": { + "block": "options", + "description": "netcdf layered mesh fileout record.", + "fields": { + "ncmesh2dfile": { + "block": "options", + "description": "name of the NetCDF ugrid layered mesh output file.", + "extended": "true", + "longname": "file keyword", + "name": "ncmesh2dfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "ncmesh2drec", + "name": "nc_mesh2d_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "nc_structured_filerecord": { + "block": "options", + "description": "netcdf structured fileout record.", + "fields": { + "ncstructfile": { + "block": "options", + "description": "name of the NetCDF structured output file.", + "extended": "true", + "longname": "file keyword", + "name": "ncstructfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "ncstructrec", + "name": "nc_structured_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of all model package 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.", + "longname": "print calculated flows to listing file", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of all model stress package information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that all model package flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save flows for all packages to budget file", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + "packages": { + "packages": { + "block": "packages", + "item": { + "block": "packages", + "fields": { + "fname": { + "block": "packages", + "description": "is the name of the file containing the package input. The path to the file should be included if the file is not located in the folder where the program was run.", + "longname": "file name", + "name": "fname", + "reader": "urword", + "type": "string", + }, + "ftype": { + "block": "packages", + "description": "is the file type, which must be one of the following character values shown in table~ref{table:ftype-gwt}. Ftype may be entered in any combination of uppercase and lowercase.", + "longname": "package type", + "name": "ftype", + "reader": "urword", + "type": "string", + }, + "pname": { + "block": "packages", + "description": "is the user-defined name for the package. PNAME is restricted to 16 characters. No spaces are allowed in PNAME. PNAME character values are read and stored by the program for stress packages only. These names may be useful for labeling purposes when multiple stress packages of the same type are located within a single GWT Model. If PNAME is specified for a stress package, then PNAME will be used in the flow budget table in the listing file; it will also be used for the text entry in the cell-by-cell budget file. PNAME is case insensitive and is stored in all upper case letters.", + "longname": "user name for package", + "name": "pname", + "optional": "true", + "reader": "urword", + "type": "string", + }, + }, + "longname": "package list", + "name": "packages", + "optional": False, + "reader": "urword", + "type": "record", + }, + "longname": "package list", + "name": "packages", + "optional": False, + "reader": "urword", + "type": "recarray", + } + }, + } def __init__( self, @@ -290,6 +453,7 @@ def __init__( print_input=None, print_flows=None, save_flows=None, + dependent_variable_scaling=None, nc_mesh2d_filerecord=None, nc_structured_filerecord=None, nc_filerecord=None, @@ -312,6 +476,9 @@ def __init__( 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.dependent_variable_scaling = self.build_mfdata( + "dependent_variable_scaling", dependent_variable_scaling + ) self.nc_mesh2d_filerecord = self.build_mfdata( "nc_mesh2d_filerecord", nc_mesh2d_filerecord ) diff --git a/flopy/mf6/modflow/mfgwtoc.py b/flopy/mf6/modflow/mfgwtoc.py index 2fdcba64a6..0742dae6f3 100644 --- a/flopy/mf6/modflow/mfgwtoc.py +++ b/flopy/mf6/modflow/mfgwtoc.py @@ -92,6 +92,7 @@ class ModflowGwtoc(MFPackage): "reader urword", "tagged true", "optional true", + "mf6internal budfilerec", ], [ "block options", @@ -132,6 +133,7 @@ class ModflowGwtoc(MFPackage): "reader urword", "tagged true", "optional true", + "mf6internal budcsvfilerec", ], [ "block options", @@ -162,6 +164,7 @@ class ModflowGwtoc(MFPackage): "reader urword", "tagged true", "optional true", + "mf6internal concfilerec", ], [ "block options", @@ -183,6 +186,7 @@ class ModflowGwtoc(MFPackage): "reader urword", "tagged false", "optional false", + "mf6internal concfile", ], [ "block options", @@ -191,6 +195,7 @@ class ModflowGwtoc(MFPackage): "shape", "reader urword", "optional true", + "mf6internal concprintrec", ], [ "block options", @@ -364,6 +369,170 @@ class ModflowGwtoc(MFPackage): "reader urword", ], ] + spec = { + "advanced": False, + "multi": False, + "name": "gwt-oc", + "options": { + "budget_filerecord": { + "block": "options", + "fields": { + "budgetfile": { + "block": "options", + "description": "name of the output file to write budget information.", + "longname": "file keyword", + "name": "budgetfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "budfilerec", + "name": "budget_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "budgetcsv_filerecord": { + "block": "options", + "fields": { + "budgetcsvfile": { + "block": "options", + "description": "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.", + "longname": "file keyword", + "name": "budgetcsvfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "budcsvfilerec", + "name": "budgetcsv_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "concentration_filerecord": { + "block": "options", + "fields": { + "concentrationfile": { + "block": "options", + "description": "name of the output file to write conc information.", + "longname": "file keyword", + "mf6internal": "concfile", + "name": "concentrationfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "concfilerec", + "name": "concentration_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "concentrationprintrecord": { + "block": "options", + "fields": { + "concentration": { + "block": "options", + "description": "keyword to specify that record corresponds to concentration.", + "longname": "concentration keyword", + "name": "concentration", + "optional": "false", + "reader": "urword", + "type": "keyword", + }, + "print_format": { + "block": "options", + "description": "keyword to specify format for printing to the listing file.", + "longname": "keyword to indicate that a print format follows", + "name": "print_format", + "optional": "false", + "reader": "urword", + "type": "keyword", + }, + }, + "mf6internal": "concprintrec", + "name": "concentrationprintrecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + }, + "period": { + "printrecord": { + "block": "period", + "fields": { + "ocsetting": { + "block": "period", + "description": "specifies the steps for which the data will be saved.", + "name": "ocsetting", + "reader": "urword", + "type": "keystring all first last frequency steps", + }, + "print": { + "block": "period", + "description": "keyword to indicate that information will be printed this stress period.", + "longname": "keyword to save", + "name": "print", + "optional": "false", + "reader": "urword", + "type": "keyword", + }, + "rtype": { + "block": "period", + "description": "type of information to save or print. Can be BUDGET or CONCENTRATION.", + "longname": "record type", + "name": "rtype", + "optional": "false", + "reader": "urword", + "type": "string", + }, + }, + "name": "printrecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "saverecord": { + "block": "period", + "fields": { + "ocsetting": { + "block": "period", + "description": "specifies the steps for which the data will be saved.", + "name": "ocsetting", + "reader": "urword", + "type": "keystring all first last frequency steps", + }, + "rtype": { + "block": "period", + "description": "type of information to save or print. Can be BUDGET or CONCENTRATION.", + "longname": "record type", + "name": "rtype", + "optional": "false", + "reader": "urword", + "type": "string", + }, + "save": { + "block": "period", + "description": "keyword to indicate that information will be saved this stress period.", + "longname": "keyword to save", + "name": "save", + "optional": "false", + "reader": "urword", + "type": "keyword", + }, + }, + "name": "saverecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "transient_block": True, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwtsft.py b/flopy/mf6/modflow/mfgwtsft.py index c8c79f053b..0585dd730d 100644 --- a/flopy/mf6/modflow/mfgwtsft.py +++ b/flopy/mf6/modflow/mfgwtsft.py @@ -620,6 +620,360 @@ class ModflowGwtsft(MFPackage): "time_series true", ], ] + spec = { + "advanced": False, + "fkeys": { + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "ts_filerecord": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + }, + "multi": True, + "name": "gwt-sft", + "options": { + "auxiliary": { + "block": "options", + "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", + "longname": "keyword to specify aux variables", + "name": "auxiliary", + "optional": True, + "reader": "urword", + "shape": "(naux)", + "type": "string", + }, + "boundnames": { + "block": "options", + "description": "keyword to indicate that boundary names may be provided with the list of reach cells.", + "name": "boundnames", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "budget_filerecord": { + "block": "options", + "fields": { + "budgetfile": { + "block": "options", + "description": "name of the binary output file to write budget information.", + "longname": "file keyword", + "name": "budgetfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "budget_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "budgetcsv_filerecord": { + "block": "options", + "fields": { + "budgetcsvfile": { + "block": "options", + "description": "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.", + "longname": "file keyword", + "name": "budgetcsvfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "budgetcsv_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "concentration_filerecord": { + "block": "options", + "fields": { + "concfile": { + "block": "options", + "description": "name of the binary output file to write concentration information.", + "longname": "file keyword", + "name": "concfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "concentration_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "flow_package_auxiliary_name": { + "block": "options", + "description": "keyword to specify the name of an auxiliary variable in the corresponding flow package. if specified, then the simulated concentrations from this advanced transport package will be copied into the auxiliary variable specified with this name. note that the flow package must have an auxiliary variable with this name or the program will terminate with an error. if the flows for this advanced transport package are read from a file, then this option will have no effect.", + "longname": "keyword to specify name of concentration auxiliary variable in flow package", + "name": "flow_package_auxiliary_name", + "optional": True, + "reader": "urword", + "type": "string", + }, + "flow_package_name": { + "block": "options", + "description": "keyword to specify the name of the corresponding flow package. if not specified, then the corresponding flow package must have the same name as this advanced transport package (the name associated with this package in the gwt name file).", + "longname": "keyword to specify name of corresponding flow package", + "name": "flow_package_name", + "optional": True, + "reader": "urword", + "type": "string", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "print_concentration": { + "block": "options", + "description": "keyword to indicate that the list of reach {#2} will be printed to the listing file for every stress period in which 'concentration print' is specified in output control. if there is no output control option and print_{#3} is specified, then {#2} are printed for the last time step of each stress period.", + "longname": "print calculated concentrations to listing file", + "name": "print_concentration", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of reach 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.", + "longname": "print calculated flows to listing file", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of reach information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that reach flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save reach flows to budget file", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "timeseries": { + "block": "options", + "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", + "name": "timeseries", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + "type": "record ts6 filein ts6_filename", + }, + }, + "packagedata": { + "packagedata": { + "block": "packagedata", + "item": { + "block": "packagedata", + "fields": { + "aux": { + "block": "packagedata", + "description": "represents the values of the auxiliary variables for each reach. The values of auxiliary variables must be present for each reach. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "auxiliary variables", + "name": "aux", + "optional": "true", + "reader": "urword", + "shape": "(naux)", + "time_series": "true", + "type": "double precision", + }, + "boundname": { + "block": "packagedata", + "description": "name of the reach cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", + "longname": "well name", + "name": "boundname", + "optional": "true", + "reader": "urword", + "type": "string", + }, + "ifno": { + "block": "period", + "description": "integer value that defines the feature (reach) number associated with the specified PERIOD data on the line. IFNO must be greater than zero and less than or equal to NREACHES.", + "longname": "reach number for this entry", + "name": "ifno", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "strt": { + "block": "packagedata", + "description": "real value that defines the starting concentration for the reach.", + "longname": "starting reach concentration", + "name": "strt", + "reader": "urword", + "type": "double precision", + }, + }, + "name": "packagedata", + "reader": "urword", + "type": "record", + }, + "name": "packagedata", + "reader": "urword", + "shape": "(maxbound)", + "type": "recarray", + } + }, + "period": { + "reachperioddata": { + "block": "period", + "item": { + "block": "period", + "fields": { + "ifno": { + "block": "period", + "description": "integer value that defines the feature (reach) number associated with the specified period data on the line. ifno must be greater than zero and less than or equal to nreaches.", + "longname": "reach number for this entry", + "name": "ifno", + "numeric_index": True, + "reader": "urword", + "type": "integer", + }, + "reachsetting": { + "block": "period", + "choices": { + "auxiliaryrecord": { + "block": "period", + "fields": { + "auxiliary": { + "block": "period", + "description": "keyword for specifying auxiliary variable.", + "name": "auxiliary", + "reader": "urword", + "type": "keyword", + }, + "auxname": { + "block": "period", + "description": "name for the auxiliary variable to be assigned AUXVAL. AUXNAME must match one of the auxiliary variable names defined in the OPTIONS block. If AUXNAME does not match one of the auxiliary variable names defined in the OPTIONS block the data are ignored.", + "name": "auxname", + "reader": "urword", + "type": "string", + }, + "auxval": { + "block": "period", + "description": "value for the auxiliary variable. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "auxiliary variable value", + "name": "auxval", + "reader": "urword", + "time_series": "true", + "type": "double precision", + }, + }, + "name": "auxiliaryrecord", + "reader": "urword", + "type": "record", + }, + "concentration": { + "block": "period", + "description": "real or character value that defines the concentration for the reach. the specified concentration is only applied if the reach is a constant concentration reach. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "reach concentration", + "name": "concentration", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "evaporation": { + "block": "period", + "description": "real or character value that defines the concentration of evaporated water $(ml^{-3})$ for the reach. if this concentration value is larger than the simulated concentration in the reach, then the evaporated water will be removed at the same concentration as the reach. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "evaporation concentration", + "name": "evaporation", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "inflow": { + "block": "period", + "description": "real or character value that defines the concentration of inflow $(ml^{-3})$ for the reach. value must be greater than or equal to zero. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "inflow concentration", + "name": "inflow", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "rainfall": { + "block": "period", + "description": "real or character value that defines the rainfall solute concentration $(ml^{-3})$ for the reach. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "rainfall concentration", + "name": "rainfall", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "runoff": { + "block": "period", + "description": "real or character value that defines the concentration of runoff $(ml^{-3})$ for the reach. value must be greater than or equal to zero. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "runoff concentration", + "name": "runoff", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "status": { + "block": "period", + "description": "keyword option to define reach status. status can be active, inactive, or constant. by default, status is active, which means that concentration will be calculated for the reach. if a reach is inactive, then there will be no solute mass fluxes into or out of the reach and the inactive value will be written for the reach concentration. if a reach is constant, then the concentration for the reach will be fixed at the user specified value.", + "longname": "reach concentration status", + "name": "status", + "reader": "urword", + "type": "string", + }, + }, + "description": "line of information that is parsed into a keyword and values. keyword values that can be used to start the reachsetting string include: status, concentration, rainfall, evaporation, runoff, and auxiliary. these settings are used to assign the concentration of associated with the corresponding flow terms. concentrations cannot be specified for all flow terms. for example, the streamflow package supports a 'diversion' flow term. diversion water will be routed using the calculated concentration of the reach.", + "name": "reachsetting", + "reader": "urword", + "type": "keystring", + }, + }, + "name": "reachperioddata", + "reader": "urword", + "type": "record", + }, + "name": "reachperioddata", + "reader": "urword", + "type": "recarray", + }, + "transient_block": True, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwtsrc.py b/flopy/mf6/modflow/mfgwtsrc.py index f0d99fbd49..4b2189eac6 100644 --- a/flopy/mf6/modflow/mfgwtsrc.py +++ b/flopy/mf6/modflow/mfgwtsrc.py @@ -57,6 +57,20 @@ class ModflowGwtsrc(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. + highest_saturated : keyword + apply mass source loading rate to specified cellid or highest underlying cell + with a cell saturation greater than zero. the highest_saturated option has an + additional complication for certain types of grids specified using the disu + package. when the disu package is used, a cell may have more than one cell + underlying it. if the overlying cell were to become inactive, there is no + straightforward method for determining how to apportion the mass source loading + rate to the underlying cells. in this case, the approach described by + cite{modflowusg} is used. the mass source loading rate is assigned to the first + active cell encountered (determined by searching through the underlying cell + numbers from the lowest number to the highest number). in this manner, the + total mass source loading rate is conserved; however, the spatial distribution + of the applied mass source loading rate may not be maintained as layers become + dry or wet during a simulation. maxbound : integer integer value specifying the maximum number of sources cells that will be specified for use during any stress period. @@ -235,7 +249,6 @@ class ModflowGwtsrc(MFPackage): "type keyword", "reader urword", "optional true", - "prerelease true", "mf6internal highest_sat", ], [ @@ -307,6 +320,198 @@ class ModflowGwtsrc(MFPackage): "optional true", ], ] + spec = { + "advanced": False, + "dimensions": { + "maxbound": { + "block": "dimensions", + "description": "integer value specifying the maximum number of sources cells that will be specified for use during any stress period.", + "longname": "maximum number of sources", + "name": "maxbound", + "optional": False, + "reader": "urword", + "type": "integer", + } + }, + "fkeys": { + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "ts_filerecord": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + }, + "multi": True, + "name": "gwt-src", + "options": { + "auxiliary": { + "block": "options", + "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", + "longname": "keyword to specify aux variables", + "name": "auxiliary", + "optional": True, + "reader": "urword", + "shape": "(naux)", + "type": "string", + }, + "auxmultname": { + "block": "options", + "description": "name of auxiliary variable to be used as multiplier of mass loading rate.", + "longname": "name of auxiliary variable for multiplier", + "name": "auxmultname", + "optional": True, + "reader": "urword", + "type": "string", + }, + "boundnames": { + "block": "options", + "description": "keyword to indicate that boundary names may be provided with the list of mass source cells.", + "name": "boundnames", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "highest_saturated": { + "block": "options", + "description": "apply mass source loading rate to specified cellid or highest underlying cell with a cell saturation greater than zero. the highest_saturated option has an additional complication for certain types of grids specified using the disu package. when the disu package is used, a cell may have more than one cell underlying it. if the overlying cell were to become inactive, there is no straightforward method for determining how to apportion the mass source loading rate to the underlying cells. in this case, the approach described by cite{modflowusg} is used. the mass source loading rate is assigned to the first active cell encountered (determined by searching through the underlying cell numbers from the lowest number to the highest number). in this manner, the total mass source loading rate is conserved; however, the spatial distribution of the applied mass source loading rate may not be maintained as layers become dry or wet during a simulation.", + "longname": "apply source to highest saturated cell", + "mf6internal": "highest_sat", + "name": "highest_saturated", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of mass source 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.", + "longname": "print calculated flows to listing file", + "mf6internal": "iprflow", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of mass source information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "mf6internal": "iprpak", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that mass source flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save well flows to budget file", + "mf6internal": "ipakcb", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "timeseries": { + "block": "options", + "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", + "name": "timeseries", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + "type": "record ts6 filein ts6_filename", + }, + }, + "period": { + "stress_period_data": { + "block": "period", + "item": { + "block": "period", + "fields": { + "aux": { + "block": "period", + "description": "represents the values of the auxiliary variables for each mass source. The values of auxiliary variables must be present for each mass source. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "auxiliary variables", + "mf6internal": "auxvar", + "name": "aux", + "optional": "true", + "reader": "urword", + "shape": "(naux)", + "time_series": "true", + "type": "double precision", + }, + "boundname": { + "block": "period", + "description": "name of the mass source cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", + "longname": "well name", + "name": "boundname", + "optional": "true", + "reader": "urword", + "type": "string", + }, + "cellid": { + "block": "period", + "description": "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 layer, row, and column. For a grid that uses the DISV input file, CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file, CELLID is the node number for the cell.", + "longname": "cell identifier", + "name": "cellid", + "reader": "urword", + "shape": "(ncelldim)", + "type": "integer", + }, + "smassrate": { + "block": "period", + "description": "is the mass source loading rate. A positive value indicates addition of solute mass and a negative value indicates removal of solute mass. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "mass source loading rate", + "name": "smassrate", + "reader": "urword", + "time_series": "true", + "type": "double precision", + }, + }, + "mf6internal": "spd", + "name": "stress_period_data", + "reader": "urword", + "type": "record", + }, + "mf6internal": "spd", + "name": "stress_period_data", + "reader": "urword", + "shape": "(maxbound)", + "type": "recarray", + }, + "transient_block": True, + }, + } def __init__( self, @@ -320,6 +525,7 @@ def __init__( save_flows=None, timeseries=None, observations=None, + highest_saturated=None, maxbound=None, stress_period_data=None, filename=None, @@ -350,6 +556,9 @@ def __init__( self._obs_package = self.build_child_package( "obs", observations, "continuous", self._obs_filerecord ) + self.highest_saturated = self.build_mfdata( + "highest_saturated", highest_saturated + ) self.maxbound = self.build_mfdata("maxbound", maxbound) self.stress_period_data = self.build_mfdata( "stress_period_data", stress_period_data diff --git a/flopy/mf6/modflow/mfgwtssm.py b/flopy/mf6/modflow/mfgwtssm.py index 2b31981bd7..f34757054a 100644 --- a/flopy/mf6/modflow/mfgwtssm.py +++ b/flopy/mf6/modflow/mfgwtssm.py @@ -202,6 +202,139 @@ class ModflowGwtssm(MFPackage): "optional true", ], ] + spec = { + "advanced": False, + "fileinput": { + "fileinput": { + "block": "fileinput", + "item": { + "block": "fileinput", + "fields": { + "filein": { + "block": "fileinput", + "description": "keyword to specify that an input filename is expected next.", + "longname": "file keyword", + "name": "filein", + "optional": "false", + "reader": "urword", + "type": "keyword", + }, + "mixed": { + "block": "fileinput", + "description": "keyword to specify that these stress package boundaries will have the mixed condition. The MIXED condition is described in the SOURCES block for AUXMIXED. The MIXED condition allows for water to be withdrawn at a concentration that is less than the cell concentration. It is intended primarily for representing evapotranspiration.", + "longname": "mixed keyword", + "name": "mixed", + "optional": "true", + "reader": "urword", + "type": "keyword", + }, + "pname": { + "block": "fileinput", + "description": "name of the flow package for which an SPC6 input file contains a source concentration. If this flow package is represented using an advanced transport package (SFT, LKT, MWT, or UZT), then the advanced transport package will override SSM terms specified here.", + "longname": "package name", + "name": "pname", + "reader": "urword", + "type": "string", + }, + "spc6": { + "block": "fileinput", + "description": "keyword to specify that record corresponds to a source sink mixing input file.", + "longname": "head keyword", + "name": "spc6", + "optional": "false", + "reader": "urword", + "type": "keyword", + }, + "spc6_filename": { + "block": "fileinput", + "description": "character string that defines the path and filename for the file containing source and sink input data for the flow package. The SPC6_FILENAME file is a flexible input file that allows concentrations to be specified by stress period and with time series. Instructions for creating the SPC6_FILENAME input file are provided in the next section on file input for boundary concentrations.", + "longname": "spc file name", + "name": "spc6_filename", + "optional": "false", + "reader": "urword", + "type": "string", + }, + }, + "name": "fileinput", + "optional": True, + "reader": "urword", + "type": "record", + }, + "name": "fileinput", + "optional": True, + "reader": "urword", + "type": "recarray", + } + }, + "multi": False, + "name": "gwt-ssm", + "options": { + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of ssm 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.", + "longname": "print calculated flows to listing file", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that ssm flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save calculated flows to budget file", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + "sources": { + "sources": { + "block": "sources", + "item": { + "block": "sources", + "fields": { + "auxname": { + "block": "sources", + "description": "name of the auxiliary variable in the package PNAME. This auxiliary variable must exist and be specified by the user in that package. The values in this auxiliary variable will be used to set the concentration associated with the flows for that boundary package.", + "longname": "auxiliary variable name", + "name": "auxname", + "optional": "false", + "reader": "urword", + "type": "string", + }, + "pname": { + "block": "fileinput", + "description": "name of the flow package for which an SPC6 input file contains a source concentration. If this flow package is represented using an advanced transport package (SFT, LKT, MWT, or UZT), then the advanced transport package will override SSM terms specified here.", + "longname": "package name", + "name": "pname", + "reader": "urword", + "type": "string", + }, + "srctype": { + "block": "sources", + "description": "keyword indicating how concentration will be assigned for sources and sinks. Keyword must be specified as either AUX or AUXMIXED. For both options the user must provide an auxiliary variable in the corresponding flow package. The auxiliary variable must have the same name as the AUXNAME value that follows. If the AUX keyword is specified, then the auxiliary variable specified by the user will be assigned as the concentration value for groundwater sources (flows with a positive sign). For negative flow rates (sinks), groundwater will be withdrawn from the cell at the simulated concentration of the cell. The AUXMIXED option provides an alternative method for how to determine the concentration of sinks. If the cell concentration is larger than the user-specified auxiliary concentration, then the concentration of groundwater withdrawn from the cell will be assigned as the user-specified concentration. Alternatively, if the user-specified auxiliary concentration is larger than the cell concentration, then groundwater will be withdrawn at the cell concentration. Thus, the AUXMIXED option is designed to work with the Evapotranspiration (EVT) and Recharge (RCH) Packages where water may be withdrawn at a concentration that is less than the cell concentration.", + "longname": "source type", + "name": "srctype", + "optional": "false", + "reader": "urword", + "type": "string", + }, + }, + "longname": "package list", + "name": "sources", + "optional": False, + "reader": "urword", + "type": "record", + }, + "longname": "package list", + "name": "sources", + "optional": False, + "reader": "urword", + "type": "recarray", + } + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfgwtuzt.py b/flopy/mf6/modflow/mfgwtuzt.py index ad8ed01e18..a6dfcb4d54 100644 --- a/flopy/mf6/modflow/mfgwtuzt.py +++ b/flopy/mf6/modflow/mfgwtuzt.py @@ -588,6 +588,342 @@ class ModflowGwtuzt(MFPackage): "time_series true", ], ] + spec = { + "advanced": False, + "fkeys": { + "obs_filerecord": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "ts_filerecord": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + }, + "multi": True, + "name": "gwt-uzt", + "options": { + "auxiliary": { + "block": "options", + "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", + "longname": "keyword to specify aux variables", + "name": "auxiliary", + "optional": True, + "reader": "urword", + "shape": "(naux)", + "type": "string", + }, + "boundnames": { + "block": "options", + "description": "keyword to indicate that boundary names may be provided with the list of unsaturated zone flow cells.", + "name": "boundnames", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "budget_filerecord": { + "block": "options", + "fields": { + "budgetfile": { + "block": "options", + "description": "name of the binary output file to write budget information.", + "longname": "file keyword", + "name": "budgetfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "budget_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "budgetcsv_filerecord": { + "block": "options", + "fields": { + "budgetcsvfile": { + "block": "options", + "description": "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.", + "longname": "file keyword", + "name": "budgetcsvfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "budgetcsv_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "concentration_filerecord": { + "block": "options", + "fields": { + "concfile": { + "block": "options", + "description": "name of the binary output file to write concentration information.", + "longname": "file keyword", + "name": "concfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "concentration_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "flow_package_auxiliary_name": { + "block": "options", + "description": "keyword to specify the name of an auxiliary variable in the corresponding flow package. if specified, then the simulated concentrations from this advanced transport package will be copied into the auxiliary variable specified with this name. note that the flow package must have an auxiliary variable with this name or the program will terminate with an error. if the flows for this advanced transport package are read from a file, then this option will have no effect.", + "longname": "keyword to specify name of concentration auxiliary variable in flow package", + "name": "flow_package_auxiliary_name", + "optional": True, + "reader": "urword", + "type": "string", + }, + "flow_package_name": { + "block": "options", + "description": "keyword to specify the name of the corresponding flow package. if not specified, then the corresponding flow package must have the same name as this advanced transport package (the name associated with this package in the gwt name file).", + "longname": "keyword to specify name of corresponding flow package", + "name": "flow_package_name", + "optional": True, + "reader": "urword", + "type": "string", + }, + "observations": { + "block": "options", + "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", + "name": "observations", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "obs", + "key": "obs_filerecord", + "param": "continuous", + "parent": "parent_model_or_package", + "val": "observations", + }, + "type": "record obs6 filein obs6_filename", + }, + "print_concentration": { + "block": "options", + "description": "keyword to indicate that the list of uzf cell {#2} will be printed to the listing file for every stress period in which 'concentration print' is specified in output control. if there is no output control option and print_{#3} is specified, then {#2} are printed for the last time step of each stress period.", + "longname": "print calculated concentrations to listing file", + "name": "print_concentration", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of unsaturated zone 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.", + "longname": "print calculated flows to listing file", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of unsaturated zone flow information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that unsaturated zone flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save uzt cell flows to budget file", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "timeseries": { + "block": "options", + "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", + "name": "timeseries", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "ts", + "description": "xxx", + "key": "ts_filerecord", + "param": "timeseries", + "parent": "parent_package", + "val": "timeseries", + }, + "type": "record ts6 filein ts6_filename", + }, + }, + "packagedata": { + "packagedata": { + "block": "packagedata", + "item": { + "block": "packagedata", + "fields": { + "aux": { + "block": "packagedata", + "description": "represents the values of the auxiliary variables for each unsaturated zone flow. The values of auxiliary variables must be present for each unsaturated zone flow. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "auxiliary variables", + "name": "aux", + "optional": "true", + "reader": "urword", + "shape": "(naux)", + "time_series": "true", + "type": "double precision", + }, + "boundname": { + "block": "packagedata", + "description": "name of the unsaturated zone flow cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", + "longname": "UZF cell name", + "name": "boundname", + "optional": "true", + "reader": "urword", + "type": "string", + }, + "ifno": { + "block": "period", + "description": "integer value that defines the feature (UZF object) number associated with the specified PERIOD data on the line. IFNO must be greater than zero and less than or equal to NUZFCELLS.", + "longname": "unsaturated zone flow cell number for this entry", + "name": "ifno", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "strt": { + "block": "packagedata", + "description": "real value that defines the starting concentration for the unsaturated zone flow cell.", + "longname": "starting UZF cell concentration", + "name": "strt", + "reader": "urword", + "type": "double precision", + }, + }, + "name": "packagedata", + "reader": "urword", + "type": "record", + }, + "name": "packagedata", + "reader": "urword", + "shape": "(maxbound)", + "type": "recarray", + } + }, + "period": { + "transient_block": True, + "uztperioddata": { + "block": "period", + "item": { + "block": "period", + "fields": { + "ifno": { + "block": "period", + "description": "integer value that defines the feature (uzf object) number associated with the specified period data on the line. ifno must be greater than zero and less than or equal to nuzfcells.", + "longname": "unsaturated zone flow cell number for this entry", + "name": "ifno", + "numeric_index": True, + "reader": "urword", + "type": "integer", + }, + "uztsetting": { + "block": "period", + "choices": { + "auxiliaryrecord": { + "block": "period", + "fields": { + "auxiliary": { + "block": "period", + "description": "keyword for specifying auxiliary variable.", + "name": "auxiliary", + "reader": "urword", + "type": "keyword", + }, + "auxname": { + "block": "period", + "description": "name for the auxiliary variable to be assigned AUXVAL. AUXNAME must match one of the auxiliary variable names defined in the OPTIONS block. If AUXNAME does not match one of the auxiliary variable names defined in the OPTIONS block the data are ignored.", + "name": "auxname", + "reader": "urword", + "type": "string", + }, + "auxval": { + "block": "period", + "description": "value for the auxiliary variable. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "auxiliary variable value", + "name": "auxval", + "reader": "urword", + "time_series": "true", + "type": "double precision", + }, + }, + "name": "auxiliaryrecord", + "reader": "urword", + "type": "record", + }, + "concentration": { + "block": "period", + "description": "real or character value that defines the concentration for the unsaturated zone flow cell. the specified concentration is only applied if the unsaturated zone flow cell is a constant concentration cell. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "unsaturated zone flow cell concentration", + "name": "concentration", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "infiltration": { + "block": "period", + "description": "real or character value that defines the infiltration solute concentration $(ml^{-3})$ for the uzf cell. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "infiltration concentration", + "name": "infiltration", + "reader": "urword", + "time_series": True, + "type": "string", + }, + "status": { + "block": "period", + "description": "keyword option to define uzf cell status. status can be active, inactive, or constant. by default, status is active, which means that concentration will be calculated for the uzf cell. if a uzf cell is inactive, then there will be no solute mass fluxes into or out of the uzf cell and the inactive value will be written for the uzf cell concentration. if a uzf cell is constant, then the concentration for the uzf cell will be fixed at the user specified value.", + "longname": "unsaturated zone flow cell concentration status", + "name": "status", + "reader": "urword", + "type": "string", + }, + "uzet": { + "block": "period", + "description": "real or character value that defines the concentration of unsaturated zone evapotranspiration water $(ml^{-3})$ for the uzf cell. if this concentration value is larger than the simulated concentration in the uzf cell, then the unsaturated zone et water will be removed at the same concentration as the uzf cell. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", + "longname": "unsaturated zone et concentration", + "name": "uzet", + "reader": "urword", + "time_series": True, + "type": "string", + }, + }, + "description": "line of information that is parsed into a keyword and values. keyword values that can be used to start the uztsetting string include: status, concentration, infiltration, uzet, and auxiliary. these settings are used to assign the concentration of associated with the corresponding flow terms. concentrations cannot be specified for all flow terms.", + "name": "uztsetting", + "reader": "urword", + "type": "keystring", + }, + }, + "name": "uztperioddata", + "reader": "urword", + "type": "record", + }, + "name": "uztperioddata", + "reader": "urword", + "type": "recarray", + }, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfims.py b/flopy/mf6/modflow/mfims.py index 8590d03cdd..982018e1fe 100644 --- a/flopy/mf6/modflow/mfims.py +++ b/flopy/mf6/modflow/mfims.py @@ -691,6 +691,367 @@ class ModflowIms(MFPackage): "optional true", ], ] + spec = { + "advanced": False, + "linear": { + "inner_dvclose": { + "block": "linear", + "description": "real value defining the dependent-variable (for example, head) change criterion for convergence of the inner (linear) iterations, in units of the dependent-variable (for example, length for head). when the maximum absolute value of the dependent-variable change at all nodes during an iteration is less than or equal to inner_dvclose, the matrix solver assumes convergence. commonly, inner_dvclose is set equal to or an order of magnitude less than the outer_dvclose value specified for the nonlinear block. the keyword, inner_hclose can be still be specified instead of inner_dvclose for backward compatibility with previous versions of modflow 6 but eventually inner_hclose will be deprecated and specification of inner_hclose will cause modflow 6 to terminate with an error.", + "longname": "dependent-variable change tolerance", + "name": "inner_dvclose", + "optional": False, + "reader": "urword", + "type": "double precision", + }, + "inner_hclose": { + "block": "linear", + "deprecated": "6.1.1", + "description": "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.", + "longname": "head change tolerance", + "name": "inner_hclose", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "inner_maximum": { + "block": "linear", + "description": "integer value defining the maximum number of inner (linear) iterations. the 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.", + "longname": "maximum number of inner iterations", + "name": "inner_maximum", + "optional": False, + "reader": "urword", + "type": "integer", + }, + "linear_acceleration": { + "block": "linear", + "description": "a keyword that defines the linear acceleration method used by the default ims linear solvers. cg - preconditioned conjugate gradient method. bicgstab - preconditioned bi-conjugate gradient stabilized method.", + "longname": "linear acceleration method", + "name": "linear_acceleration", + "optional": False, + "reader": "urword", + "type": "string", + }, + "number_orthogonalizations": { + "block": "linear", + "description": "optional integer value defining the interval used to explicitly recalculate the residual of the flow equation using the solver coefficient matrix, the latest dependent-variable (for example, head) estimates, and the right hand side. for problems that benefit from explicit recalculation of the residual, a number between 4 and 10 is appropriate. by default, number_orthogonalizations is zero.", + "longname": "drop tolerance used to drop preconditioner terms", + "name": "number_orthogonalizations", + "optional": True, + "reader": "urword", + "type": "integer", + }, + "preconditioner_drop_tolerance": { + "block": "linear", + "description": "optional real value that defines the drop tolerance used to drop preconditioner terms based on the magnitude of matrix entries in the ilut and milut preconditioners. a value of $10^{-4}$ works well for most problems. by default, preconditioner_drop_tolerance is zero and the zero-fill incomplete lu factorization preconditioners (ilu(0) and milu(0)) are used.", + "longname": "drop tolerance used to drop preconditioner terms", + "name": "preconditioner_drop_tolerance", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "preconditioner_levels": { + "block": "linear", + "description": "optional integer value defining the level of fill for ilu decomposition used in the ilut and milut preconditioners. higher levels of fill provide more robustness but also require more memory. for optimal performance, it is suggested that a large level of fill be applied (7 or 8) with use of a drop tolerance. specification of a preconditioner_levels value greater than zero results in use of the ilut preconditioner. by default, preconditioner_levels is zero and the zero-fill incomplete lu factorization preconditioners (ilu(0) and milu(0)) are used.", + "longname": "level of fill for ilu decomposition", + "name": "preconditioner_levels", + "optional": True, + "reader": "urword", + "type": "integer", + }, + "rcloserecord": { + "block": "linear", + "fields": { + "inner_rclose": { + "block": "linear", + "description": "real value that defines the flow residual tolerance for convergence of the IMS linear solver and specific flow residual criteria used. This value represents the maximum allowable residual at any single node. Value is in units of length cubed per time, and must be consistent with mf length and time units. Usually a value of $1.0 times 10^{-1}$ is sufficient for the flow-residual criteria when meters and seconds are the defined mf length and time.", + "longname": "flow residual tolerance", + "name": "inner_rclose", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + "rclose_option": { + "block": "linear", + "description": "an optional keyword that defines the specific flow residual criterion used. STRICT--an optional keyword that is used to specify that INNER_RCLOSE represents a infinity-Norm (absolute convergence criteria) and that the dependent-variable (for example, head) and flow convergence criteria must be met on the first inner iteration (this criteria is equivalent to the criteria used by the MODFLOW-2005 PCG package~citep{hill1990preconditioned}). L2NORM_RCLOSE--an optional keyword that is used to specify that INNER_RCLOSE represents a L-2 Norm closure criteria instead of a infinity-Norm (absolute convergence criteria). When L2NORM_RCLOSE is specified, a reasonable initial INNER_RCLOSE value is 0.1 times the number of active cells when meters and seconds are the defined mf length and time. RELATIVE_RCLOSE--an optional keyword that is used to specify that INNER_RCLOSE represents a relative L-2 Norm reduction closure criteria instead of a infinity-Norm (absolute convergence criteria). When RELATIVE_RCLOSE is specified, a reasonable initial INNER_RCLOSE value is $1.0 times 10^{-4}$ and convergence is achieved for a given inner (linear) iteration when $Delta h le$ INNER_DVCLOSE and the current L-2 Norm is $le$ the product of the RELATIVE_RCLOSE and the initial L-2 Norm for the current inner (linear) iteration. If RCLOSE_OPTION is not specified, an absolute residual (infinity-norm) criterion is used.", + "longname": "flow residual tolerance", + "name": "rclose_option", + "optional": "true", + "reader": "urword", + "type": "string", + }, + }, + "longname": "rclose record", + "name": "rcloserecord", + "optional": False, + "reader": "urword", + "type": "record", + }, + "relaxation_factor": { + "block": "linear", + "description": "optional real value that defines the relaxation factor used by the incomplete lu factorization preconditioners (milu(0) and milut). relaxation_factor is unitless and should be greater than or equal to 0.0 and less than or equal to 1.0. relaxation_factor values of about 1.0 are commonly used, and experience suggests that convergence can be optimized in some cases with relax values of 0.97. a relaxation_factor value of 0.0 will result in either ilu(0) or ilut preconditioning (depending on the value specified for preconditioner_levels and/or preconditioner_drop_tolerance). by default, relaxation_factor is zero.", + "longname": "relaxation factor used by ilu factorization", + "name": "relaxation_factor", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "reordering_method": { + "block": "linear", + "description": "an optional keyword that defines the matrix reordering approach used. by default, matrix reordering is not applied. none - original ordering. rcm - reverse cuthill mckee ordering. md - minimum degree ordering.", + "longname": "matrix reordering approach", + "name": "reordering_method", + "optional": True, + "reader": "urword", + "type": "string", + }, + "scaling_method": { + "block": "linear", + "description": "an optional keyword that defines the matrix scaling approach used. by default, matrix scaling is not applied. none - no matrix scaling applied. diagonal - symmetric matrix scaling using the polcg preconditioner scaling method in hill (1992). l2norm - symmetric matrix scaling using the l2 norm.", + "longname": "matrix scaling approach", + "name": "scaling_method", + "optional": True, + "reader": "urword", + "type": "string", + }, + }, + "multi": False, + "name": "sln-ims", + "nonlinear": { + "backtracking_number": { + "block": "nonlinear", + "description": "integer value defining the maximum number of backtracking iterations allowed for residual reduction computations. if backtracking_number = 0 then the backtracking iterations are omitted. the value usually ranges from 2 to 20; a value of 10 works well for most problems.", + "longname": "maximum number of backtracking iterations", + "name": "backtracking_number", + "optional": True, + "reader": "urword", + "type": "integer", + }, + "backtracking_reduction_factor": { + "block": "nonlinear", + "description": "real value defining the reduction in step size used for residual reduction computations. the value of backtracking_reduction_factor is between zero and one. the value usually ranges from 0.1 to 0.3; a value of 0.2 works well for most problems. backtracking_reduction_factor only needs to be specified if backtracking_number is greater than zero.", + "longname": "reduction in step size used for residual reduction computations", + "name": "backtracking_reduction_factor", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "backtracking_residual_limit": { + "block": "nonlinear", + "description": "real value defining the limit to which the residual is reduced with backtracking. if the residual is smaller than backtracking_residual_limit, then further backtracking is not performed. a value of 100 is suitable for large problems and residual reduction to smaller values may only slow down computations. backtracking_residual_limit only needs to be specified if backtracking_number is greater than zero.", + "longname": "limit to which the residual is reduced with backtracking", + "name": "backtracking_residual_limit", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "backtracking_tolerance": { + "block": "nonlinear", + "description": "real value defining the tolerance for residual change that is allowed for residual reduction computations. backtracking_tolerance should not be less than one to avoid getting stuck in local minima. a large value serves to check for extreme residual increases, while a low value serves to control step size more severely. the value usually ranges from 1.0 to 10$^6$; a value of 10$^4$ works well for most problems but lower values like 1.1 may be required for harder problems. backtracking_tolerance only needs to be specified if backtracking_number is greater than zero.", + "longname": "tolerance for residual change that is allowed for residual reduction", + "name": "backtracking_tolerance", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "outer_dvclose": { + "block": "nonlinear", + "description": "real value defining the dependent-variable (for example, head) change criterion for convergence of the outer (nonlinear) iterations, in units of the dependent-variable (for example, length for head). when the maximum absolute value of the dependent-variable change at all nodes during an iteration is less than or equal to outer_dvclose, iteration stops. commonly, outer_dvclose equals 0.01. the keyword, outer_hclose can be still be specified instead of outer_dvclose 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.", + "longname": "dependent-variable change criterion", + "name": "outer_dvclose", + "optional": False, + "reader": "urword", + "type": "double precision", + }, + "outer_hclose": { + "block": "nonlinear", + "deprecated": "6.1.1", + "description": "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.", + "longname": "head change criterion", + "name": "outer_hclose", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "outer_maximum": { + "block": "nonlinear", + "description": "integer value defining the maximum number of outer (nonlinear) iterations -- that is, calls to the solution routine. for a linear problem outer_maximum should be 1.", + "longname": "outer maximum iterations", + "name": "outer_maximum", + "optional": False, + "reader": "urword", + "type": "integer", + }, + "outer_rclosebnd": { + "block": "nonlinear", + "deprecated": "6.1.1", + "description": "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.", + "longname": "boundary package flow residual tolerance", + "name": "outer_rclosebnd", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "under_relaxation": { + "block": "nonlinear", + "description": "is an optional keyword that defines the nonlinear under-relaxation schemes used. under-relaxation is also known as dampening, and is used to reduce the size of the calculated dependent variable before proceeding to the next outer iteration. under-relaxation can be an effective tool for highly nonlinear models when there are large and often counteracting changes in the calculated dependent variable between successive outer iterations. by default under-relaxation is not used. none - under-relaxation is not used (default). simple - simple under-relaxation scheme with a fixed relaxation factor (under_relaxation_gamma) is used. cooley - cooley under-relaxation scheme is used. dbd - delta-bar-delta under-relaxation is used. note that the under-relaxation schemes are often used in conjunction with problems that use the newton-raphson formulation, however, experience has indicated that they also work well for non-newton problems, such as those with the wet/dry options of modflow 6.", + "longname": "under relaxation scheme", + "name": "under_relaxation", + "optional": True, + "reader": "urword", + "type": "string", + }, + "under_relaxation_gamma": { + "block": "nonlinear", + "description": "real value defining either the relaxation factor for the simple scheme or the history or memory term factor of the cooley and delta-bar-delta algorithms. for the simple scheme, a value of one indicates that there is no under-relaxation and the full head change is applied. this value can be gradually reduced from one as a way to improve convergence; for well behaved problems, using a value less than one can increase the number of outer iterations required for convergence and needlessly increase run times. under_relaxation_gamma must be greater than zero for the simple scheme or the program will terminate with an error. for the cooley and delta-bar-delta schemes, under_relaxation_gamma is a memory term that can range between zero and one. when under_relaxation_gamma is zero, only the most recent history (previous iteration value) is maintained. as under_relaxation_gamma is increased, past history of iteration changes has greater influence on the memory term. the memory term is maintained as an exponential average of past changes. retaining some past history can overcome granular behavior in the calculated function surface and therefore helps to overcome cyclic patterns of non-convergence. the value usually ranges from 0.1 to 0.3; a value of 0.2 works well for most problems. under_relaxation_gamma only needs to be specified if under_relaxation is not none.", + "longname": "relaxation factor for simple or the history or memory term factor for the cooley and delta-bar-delta algorithms", + "name": "under_relaxation_gamma", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "under_relaxation_kappa": { + "block": "nonlinear", + "description": "real value defining the increment for the learning rate (under-relaxation term) of the delta-bar-delta algorithm. the value of under_relaxation_kappa is between zero and one. if the change in the dependent-variable (for example, head) is of the same sign to that of the previous iteration, the under-relaxation term is increased by an increment of under_relaxation_kappa. the value usually ranges from 0.03 to 0.3; a value of 0.1 works well for most problems. under_relaxation_kappa only needs to be specified if under_relaxation is dbd.", + "longname": "under relaxation increment for the learning rate", + "name": "under_relaxation_kappa", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "under_relaxation_momentum": { + "block": "nonlinear", + "description": "real value defining the fraction of past history changes that is added as a momentum term to the step change for a nonlinear iteration. the value of under_relaxation_momentum is between zero and one. a large momentum term should only be used when small learning rates are expected. small amounts of the momentum term help convergence. the value usually ranges from 0.0001 to 0.1; a value of 0.001 works well for most problems. under_relaxation_momentum only needs to be specified if under_relaxation is dbd.", + "longname": "fraction of past history changes that is added as a momentum term", + "name": "under_relaxation_momentum", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "under_relaxation_theta": { + "block": "nonlinear", + "description": "real value defining the reduction factor for the learning rate (under-relaxation term) of the delta-bar-delta algorithm. the value of under_relaxation_theta is between zero and one. if the change in the dependent-variable (for example, head) is of opposite sign to that of the previous iteration, the under-relaxation term is reduced by a factor of under_relaxation_theta. the value usually ranges from 0.3 to 0.9; a value of 0.7 works well for most problems. under_relaxation_theta only needs to be specified if under_relaxation is dbd.", + "longname": "under relaxation reduction factor", + "name": "under_relaxation_theta", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + }, + "options": { + "ats_outer_maximum_fraction": { + "block": "options", + "description": "real value defining the fraction of the maximum allowable outer iterations used with the adaptive time step (ats) capability if it is active. if this value is set to zero by the user, then this solution will have no effect on ats behavior. this value must be greater than or equal to zero and less than or equal to 0.5 or the program will terminate with an error. if it is not specified by the user, then it is assigned a default value of one third. when the number of outer iterations for this solution is less than the product of this value and the maximum allowable outer iterations, then ats will increase the time step length by a factor of dtadj in the ats input file. when the number of outer iterations for this solution is greater than the maximum 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.", + "longname": "fraction of outer maximum used with ats", + "name": "ats_outer_maximum_fraction", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "complexity": { + "block": "options", + "description": "is an optional keyword that defines default non-linear and linear solver parameters. simple - indicates that default solver input values will be defined that work well for nearly linear models. this would be used for models that do not include nonlinear stress packages and models that are either confined or consist of a single unconfined layer that is thick enough to contain the water table within a single layer. moderate - indicates that default solver input values will be defined that work well for moderately nonlinear models. this would be used for models that include nonlinear stress packages and models that consist of one or more unconfined layers. the moderate option should be used when the simple option does not result in successful convergence. complex - indicates that default solver input values will be defined that work well for highly nonlinear models. this would be used for models that include nonlinear stress packages and models that consist of one or more unconfined layers representing complex geology and surface-water/groundwater interaction. the complex option should be used when the moderate option does not result in successful convergence. non-linear and 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.", + "longname": "print option", + "name": "complexity", + "optional": True, + "reader": "urword", + "type": "string", + }, + "csv_inner_output_filerecord": { + "block": "options", + "fields": { + "inner_csvfile": { + "block": "options", + "description": "name of the ascii comma separated values output file to write solver convergence information. Comma separated values output includes maximum dependent-variable (for example, 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.", + "longname": "file keyword", + "name": "inner_csvfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "csv_inner_output_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "csv_outer_output_filerecord": { + "block": "options", + "fields": { + "outer_csvfile": { + "block": "options", + "description": "name of the ascii comma separated values output file to write maximum dependent-variable (for example, head) change convergence information at the end of each outer iteration for each time step.", + "longname": "file keyword", + "name": "outer_csvfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "csv_outer_output_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "csv_output_filerecord": { + "block": "options", + "deprecated": "6.1.1", + "fields": { + "csvfile": { + "block": "options", + "deprecated": "6.1.1", + "description": "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.", + "longname": "file keyword", + "name": "csvfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "csv_output_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "no_ptcrecord": { + "block": "options", + "fields": { + "no_ptc": { + "block": "options", + "description": "is a flag that is used to disable pseudo-transient continuation (PTC). Option only applies to steady-state stress periods for models using the Newton-Raphson formulation. For many problems, PTC can significantly improve convergence behavior for steady-state simulations, and for this reason it is active by default. In some cases, however, PTC can worsen the convergence behavior, especially when the initial conditions are similar to the solution. When the initial conditions are similar to, or exactly the same as, the solution and convergence is slow, then the NO_PTC FIRST option should be used to deactivate PTC for the first stress period. The NO_PTC ALL option should also be used in order to compare convergence behavior with other MODFLOW versions, as PTC is only available in MODFLOW 6.", + "longname": "no pseudo-transient continuation", + "name": "no_ptc", + "optional": "false", + "reader": "urword", + "type": "keyword", + }, + "no_ptc_option": { + "block": "options", + "description": "is an optional keyword that is used to define options for disabling pseudo-transient continuation (PTC). FIRST is an optional keyword to disable PTC for the first stress period, if steady-state and one or more model is using the Newton-Raphson formulation. ALL is an optional keyword to disable PTC for all steady-state stress periods for models using the Newton-Raphson formulation. If NO_PTC_OPTION is not specified, the NO_PTC ALL option is used.", + "longname": "no pseudo-transient continuation option", + "name": "no_ptc_option", + "optional": "true", + "reader": "urword", + "type": "string", + }, + }, + "longname": "no_ptc record", + "name": "no_ptcrecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "print_option": { + "block": "options", + "description": "is a flag that controls printing of convergence information from the solver. none means print nothing. summary means print only the total number of iterations and nonlinear residual reduction summaries. all means print linear matrix solver convergence information to the solution listing file and model specific linear matrix solver convergence information to each model listing file in addition to summary information. none is default if print_option is not specified.", + "longname": "print option", + "name": "print_option", + "optional": True, + "reader": "urword", + "type": "string", + }, + }, + "sln": {"abbr": "ims", "pattern": "*"}, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfmvr.py b/flopy/mf6/modflow/mfmvr.py index adb12a30c9..95d06d4f5e 100644 --- a/flopy/mf6/modflow/mfmvr.py +++ b/flopy/mf6/modflow/mfmvr.py @@ -343,6 +343,202 @@ class ModflowMvr(MFPackage): "reader urword", ], ] + spec = { + "advanced": False, + "dimensions": { + "maxmvr": { + "block": "dimensions", + "description": "integer value specifying the maximum number of water mover entries that will specified for any stress period.", + "longname": "maximum number of movers", + "name": "maxmvr", + "optional": False, + "reader": "urword", + "type": "integer", + }, + "maxpackages": { + "block": "dimensions", + "description": "integer value specifying the number of unique packages that are included in this water mover input file.", + "longname": "number of packages to be used with the mover", + "name": "maxpackages", + "optional": False, + "reader": "urword", + "type": "integer", + }, + }, + "multi": False, + "name": "gwf-mvr", + "options": { + "budget_filerecord": { + "block": "options", + "fields": {}, + "name": "budget_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "budgetcsv_filerecord": { + "block": "options", + "fields": {}, + "name": "budgetcsv_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "modelnames": { + "block": "options", + "description": "keyword to indicate that all package names will be preceded by the model name for the package. model names are required when the mover package is used with a gwf-gwf exchange. the modelname keyword should not be used for a mover package that is for a single gwf model.", + "longname": "precede all package names with model names", + "name": "modelnames", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of mvr 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.", + "longname": "print calculated flows to listing file", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of mvr information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + "packages": { + "packages": { + "block": "packages", + "item": { + "block": "packages", + "fields": { + "mname": { + "block": "packages", + "description": "name of model containing the package. Model names are assigned by the user in the simulation name file.", + "name": "mname", + "optional": "true", + "reader": "urword", + "type": "string", + }, + "pname": { + "block": "packages", + "description": "is the name of a package that may be included in a subsequent stress period block. The package name is assigned in the name file for the GWF Model. Package names are optionally provided in the name file. If they are not provided by the user, then packages are assigned a default value, which is the package acronym followed by a hyphen and the package number. For example, the first Drain Package is named DRN-1. The second Drain Package is named DRN-2, and so forth.", + "name": "pname", + "optional": "false", + "reader": "urword", + "type": "string", + }, + }, + "name": "packages", + "optional": False, + "reader": "urword", + "type": "record", + }, + "name": "packages", + "optional": False, + "reader": "urword", + "shape": "(npackages)", + "type": "recarray", + } + }, + "period": { + "perioddata": { + "block": "period", + "item": { + "block": "period", + "fields": { + "id1": { + "block": "period", + "description": "is the identifier for the provider. For the standard boundary packages, the provider identifier is the number of the boundary as it is listed in the package input file. (Note that the order of these boundaries may change by stress period, which must be accounted for in the Mover Package.) So the first well has an identifier of one. The second is two, and so forth. For the advanced packages, the identifier is the reach number (SFR Package), well number (MAW Package), or UZF cell number. For the Lake Package, ID1 is the lake outlet number. Thus, outflows from a single lake can be routed to different streams, for example.", + "longname": "provider reach", + "name": "id1", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "id2": { + "block": "period", + "description": "is the identifier for the receiver. The receiver identifier is the reach number (SFR Package), Lake number (LAK Package), well number (MAW Package), or UZF cell number.", + "longname": "receiver reach", + "name": "id2", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "mname1": { + "block": "period", + "description": "name of model containing the package, PNAME1.", + "name": "mname1", + "optional": "true", + "reader": "urword", + "type": "string", + }, + "mname2": { + "block": "period", + "description": "name of model containing the package, PNAME2.", + "name": "mname2", + "optional": "true", + "reader": "urword", + "type": "string", + }, + "mvrtype": { + "block": "period", + "description": "is the character string signifying the method for determining how much water will be moved. Supported values are 'FACTOR' 'EXCESS' 'THRESHOLD' and 'UPTO'. These four options determine how the receiver flow rate, $Q_R$, is calculated. These options mirror the options defined for the cprior variable in the SFR package, with the term 'FACTOR' being functionally equivalent to the 'FRACTION' option for cprior.", + "longname": "mover type", + "name": "mvrtype", + "reader": "urword", + "type": "string", + }, + "pname1": { + "block": "period", + "description": "is the package name for the provider. The package PNAME1 must be designated to provide water through the MVR Package by specifying the keyword 'MOVER' in its OPTIONS block.", + "longname": "provider package name", + "name": "pname1", + "reader": "urword", + "type": "string", + }, + "pname2": { + "block": "period", + "description": "is the package name for the receiver. The package PNAME2 must be designated to receive water from the MVR Package by specifying the keyword 'MOVER' in its OPTIONS block.", + "longname": "receiver package name", + "name": "pname2", + "reader": "urword", + "type": "string", + }, + "value": { + "block": "period", + "description": "is the value to be used in the equation for calculating the amount of water to move. For the 'FACTOR' option, VALUE is the $alpha$ factor. For the remaining options, VALUE is the specified flow rate, $Q_S$.", + "longname": "mover value", + "name": "value", + "reader": "urword", + "type": "double precision", + }, + }, + "name": "perioddata", + "reader": "urword", + "type": "record", + }, + "name": "perioddata", + "reader": "urword", + "shape": "(maxbound)", + "type": "recarray", + }, + "transient_block": True, + }, + "ref": { + "abbr": "mvr", + "key": "mvr_filerecord", + "param": "perioddata", + "parent": "parent_model_or_package", + "val": "perioddata", + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfmvt.py b/flopy/mf6/modflow/mfmvt.py index d3ba6395cf..b0e55c1fd3 100644 --- a/flopy/mf6/modflow/mfmvt.py +++ b/flopy/mf6/modflow/mfmvt.py @@ -144,6 +144,63 @@ class ModflowMvt(MFPackage): "optional false", ], ] + spec = { + "advanced": False, + "multi": False, + "name": "gwt-mvt", + "options": { + "budget_filerecord": { + "block": "options", + "fields": {}, + "name": "budget_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "budgetcsv_filerecord": { + "block": "options", + "fields": {}, + "name": "budgetcsv_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "print_flows": { + "block": "options", + "description": "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.", + "longname": "print calculated flows to listing file", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of mover information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that lake flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save lake flows to budget file", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + "ref": { + "abbr": "mvt", + "key": "mvt_filerecord", + "param": "perioddata", + "parent": "parent_model_or_package", + "val": "perioddata", + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfnam.py b/flopy/mf6/modflow/mfnam.py index 3cad43c6fc..6c148ff305 100644 --- a/flopy/mf6/modflow/mfnam.py +++ b/flopy/mf6/modflow/mfnam.py @@ -326,6 +326,254 @@ class ModflowNam(MFPackage): "reader urword", ], ] + spec = { + "advanced": False, + "exchanges": { + "exchanges": { + "block": "exchanges", + "description": "is the list of exchange types, exchange files, and model names.", + "item": { + "block": "exchanges", + "description": "is the record of exchange types, exchange files, and model names.", + "fields": { + "exgfile": { + "block": "exchanges", + "description": "is the input file for the exchange.", + "longname": "input file for exchange", + "name": "exgfile", + "reader": "urword", + "type": "string", + }, + "exgmnamea": { + "block": "exchanges", + "description": "is the name of the first model that is part of this exchange.", + "longname": "name of model A", + "name": "exgmnamea", + "reader": "urword", + "type": "string", + }, + "exgmnameb": { + "block": "exchanges", + "description": "is the name of the second model that is part of this exchange.", + "longname": "name of model B", + "name": "exgmnameb", + "reader": "urword", + "type": "string", + }, + "exgtype": { + "block": "exchanges", + "description": "is the exchange type.", + "longname": "exchange type", + "name": "exgtype", + "reader": "urword", + "type": "string", + }, + }, + "longname": "list of exchanges", + "name": "exchanges", + "reader": "urword", + "type": "record", + }, + "longname": "list of exchanges", + "name": "exchanges", + "reader": "urword", + "type": "recarray", + } + }, + "fkeys": { + "hpc_filerecord": { + "abbr": "hpc", + "key": "hpc_filerecord", + "param": "hpc_data", + "parent": "parent_package", + "val": "hpc_data", + } + }, + "models": { + "models": { + "block": "models", + "description": "is the list of model types, model name files, and model names.", + "item": { + "block": "models", + "description": "is the record of model types, model name files, and model names.", + "fields": { + "mfname": { + "block": "models", + "description": "is the file name of the model name file.", + "longname": "file name for model name file", + "name": "mfname", + "reader": "urword", + "type": "string", + }, + "mname": { + "block": "models", + "description": "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.", + "longname": "name of model", + "name": "mname", + "reader": "urword", + "type": "string", + }, + "mtype": { + "block": "models", + "description": "is the type of model to add to simulation.", + "longname": "model type", + "name": "mtype", + "reader": "urword", + "type": "string", + }, + }, + "longname": "list of models", + "name": "models", + "reader": "urword", + "type": "record", + }, + "longname": "list of models", + "name": "models", + "reader": "urword", + "type": "recarray", + } + }, + "multi": False, + "name": "sim-nam", + "options": { + "continue": { + "block": "options", + "description": "keyword flag to indicate that the simulation should continue even if one or more solutions do not converge.", + "longname": "continue if not converged", + "name": "continue", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "hpc_data": { + "block": "options", + "description": "Contains data for the hpc package. Data can be passed as a dictionary to the hpc package with variable names as keys and package data as values. Data for the hpc_data variable is also acceptable. See hpc package documentation for more information.", + "name": "hpc_data", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "hpc", + "key": "hpc_filerecord", + "param": "hpc_data", + "parent": "parent_package", + "val": "hpc_data", + }, + "type": "record hpc6 filein hpc6_filename", + }, + "maxerrors": { + "block": "options", + "description": "maximum number of errors that will be stored and printed.", + "longname": "maximum number of errors", + "name": "maxerrors", + "optional": True, + "reader": "urword", + "type": "integer", + }, + "memory_print_option": { + "block": "options", + "description": "is a flag that controls printing of detailed memory manager usage to the end of the simulation list file. none means do not print detailed information. summary means print only the total memory for each simulation component. all means print information for each variable stored in the memory manager. none is default if memory_print_option is not specified.", + "longname": "memory print option", + "mf6internal": "prmem", + "name": "memory_print_option", + "optional": True, + "reader": "urword", + "type": "string", + }, + "nocheck": { + "block": "options", + "description": "keyword flag to indicate that the model input check routines should not be called prior to each time step. checks are performed by default.", + "longname": "turn off checking", + "name": "nocheck", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to activate printing of simulation input summaries to the simulation list file (mfsim.lst). with this keyword, input summaries will be written for those packages that support newer input data model routines. not all packages are supported yet by the newer input data model routines.", + "longname": "print input to listing file", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "profile_option": { + "block": "options", + "description": "is a flag that controls performance profiling and reporting. none disables profiling. summary means to measure and print a coarse performance profile. detail means collect and print information with the highest resolution available. none is default if profile_option is not specified.", + "longname": "profiling option", + "mf6internal": "prprof", + "name": "profile_option", + "optional": True, + "reader": "urword", + "type": "string", + }, + }, + "solutiongroup": { + "mxiter": { + "block": "solutiongroup", + "description": "is the maximum number of outer iterations for this solution group. the default value is 1. if there is only one solution in the solution group, then mxiter must be 1.", + "longname": "maximum solution group iterations", + "name": "mxiter", + "optional": True, + "reader": "urword", + "type": "integer", + }, + "solutiongroup": { + "block": "solutiongroup", + "description": "is the list of solution types and models in the solution.", + "item": { + "block": "solutiongroup", + "description": "is the record of solution types and models in the solution.", + "fields": { + "slnfname": { + "block": "solutiongroup", + "description": "name of file containing solution input.", + "longname": "file name for solution input", + "name": "slnfname", + "reader": "urword", + "type": "string", + }, + "slnmnames": { + "block": "solutiongroup", + "description": "is the array of model names to add to this solution. The number of model names is determined by the number of model names the user provides on this line.", + "longname": "array of model names in this solution", + "name": "slnmnames", + "reader": "urword", + "shape": "(any1d)", + "type": "string", + }, + "slntype": { + "block": "solutiongroup", + "description": "is the type of solution. The Integrated Model Solution (IMS6) and Explicit Model Solution (EMS6) are the only supported options in this version.", + "longname": "type of solution", + "name": "slntype", + "reader": "urword", + "type": "string", + "valid": "ims6 ems6", + }, + }, + "longname": "solution type and models in the solution", + "name": "solutiongroup", + "reader": "urword", + "type": "record", + }, + "longname": "solution type and models in the solution", + "name": "solutiongroup", + "reader": "urword", + "type": "recarray", + }, + }, + "timing": { + "tdis6": { + "block": "timing", + "description": "is the name of the temporal discretization (tdis) input file.", + "longname": "name of tdis input file", + "name": "tdis6", + "reader": "urword", + "type": "string", + } + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfprtdis.py b/flopy/mf6/modflow/mfprtdis.py index dbb915c81e..800005c907 100644 --- a/flopy/mf6/modflow/mfprtdis.py +++ b/flopy/mf6/modflow/mfprtdis.py @@ -49,8 +49,11 @@ class ModflowPrtdis(MFPackage): keyword that specifies input griddata arrays should be written to layered ascii output files. export_array_netcdf : keyword - keyword that specifies input griddata arrays should be written to the model - output netcdf file. + keyword that specifies input gridded arrays should be written to the model + output netcdf file with attributes that support using the generated file as a + 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. 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 @@ -198,7 +201,7 @@ class ModflowPrtdis(MFPackage): "preserve_case true", "reader urword", "optional true", - "prerelease true", + "developmode true", ], [ "block options", @@ -306,6 +309,217 @@ class ModflowPrtdis(MFPackage): "optional true", ], ] + spec = { + "advanced": False, + "dimensions": { + "ncol": { + "block": "dimensions", + "default": 2, + "description": "is the number of columns in the model grid.", + "longname": "number of columns", + "name": "ncol", + "optional": False, + "reader": "urword", + "type": "integer", + }, + "nlay": { + "block": "dimensions", + "default": 1, + "description": "is the number of layers in the model grid.", + "longname": "number of layers", + "name": "nlay", + "optional": False, + "reader": "urword", + "type": "integer", + }, + "nrow": { + "block": "dimensions", + "default": 2, + "description": "is the number of rows in the model grid.", + "longname": "number of rows", + "name": "nrow", + "optional": False, + "reader": "urword", + "type": "integer", + }, + }, + "fkeys": { + "ncf_filerecord": { + "abbr": "ncf", + "key": "ncf_filerecord", + "param": "packagedata", + "parent": "parent_package", + "val": "packagedata", + } + }, + "griddata": { + "botm": { + "block": "griddata", + "default": 0.0, + "description": "is the bottom elevation for each cell.", + "layered": True, + "longname": "cell bottom elevation", + "name": "botm", + "reader": "readarray", + "shape": "(ncol, nrow, nlay)", + "type": "double precision", + }, + "delc": { + "block": "griddata", + "default": 1.0, + "description": "is the row spacing in the column direction.", + "longname": "spacing along a column", + "name": "delc", + "reader": "readarray", + "shape": "(nrow)", + "type": "double precision", + }, + "delr": { + "block": "griddata", + "default": 1.0, + "description": "is the column spacing in the row direction.", + "longname": "spacing along a row", + "name": "delr", + "reader": "readarray", + "shape": "(ncol)", + "type": "double precision", + }, + "idomain": { + "block": "griddata", + "description": "is an optional array that characterizes the existence status of a cell. if the idomain array is not specified, then all model cells exist within the solution. if the idomain value for a cell is 0, the cell does not exist in the simulation. input and output values will be read and written for the cell, but internal to the program, the cell is excluded from the solution. if the idomain value for a cell is 1, the cell exists in the simulation. if the idomain value for a cell is -1, the cell does not exist in the simulation. furthermore, the first existing cell above will be connected to the first existing cell below. this type of cell is referred to as a 'vertical pass through' cell.", + "layered": True, + "longname": "idomain existence array", + "name": "idomain", + "optional": True, + "reader": "readarray", + "shape": "(ncol, nrow, nlay)", + "type": "integer", + }, + "top": { + "block": "griddata", + "default": 1.0, + "description": "is the top elevation for each cell in the top model layer.", + "longname": "cell top elevation", + "name": "top", + "reader": "readarray", + "shape": "(ncol, nrow)", + "type": "double precision", + }, + }, + "multi": False, + "name": "prt-dis", + "options": { + "angrot": { + "block": "options", + "description": "counter-clockwise rotation angle (in degrees) of the lower-left corner of the model grid. if not specified, then a default value of 0.0 is assigned. the value for angrot does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", + "longname": "rotation angle", + "name": "angrot", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "crs": { + "block": "options", + "description": "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.", + "developmode": True, + "longname": "crs user input string", + "name": "crs", + "optional": True, + "reader": "urword", + "shape": "lenbigline", + "type": "string", + }, + "export_array_ascii": { + "block": "options", + "description": "keyword that specifies input griddata arrays should be written to layered ascii output files.", + "longname": "export array variables to layered ascii files.", + "mf6internal": "export_ascii", + "name": "export_array_ascii", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "export_array_netcdf": { + "block": "options", + "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", + "longname": "export array variables to netcdf output files.", + "mf6internal": "export_nc", + "name": "export_array_netcdf", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "grb_filerecord": { + "block": "options", + "fields": { + "grb6_filename": { + "block": "options", + "description": "defines a binary grid output file. If this option is not provided, the output file will have the same name as the discretization input file, plus extension '.grb'.", + "longname": "file name of GRB information", + "name": "grb6_filename", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "grb_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "length_units": { + "block": "options", + "description": "is the length units used for this model. values can be 'feet', 'meters', or 'centimeters'. if not specified, the default is 'unknown'.", + "longname": "model length units", + "name": "length_units", + "optional": True, + "reader": "urword", + "type": "string", + }, + "nogrb": { + "block": "options", + "description": "keyword to deactivate writing of the binary grid file.", + "longname": "do not write binary grid file", + "name": "nogrb", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "packagedata": { + "block": "options", + "description": "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 the packagedata variable is also acceptable. See ncf package documentation for more information.", + "name": "packagedata", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "ncf", + "key": "ncf_filerecord", + "param": "packagedata", + "parent": "parent_package", + "val": "packagedata", + }, + "type": "record ncf6 filein ncf6_filename", + }, + "xorigin": { + "block": "options", + "description": "x-position of the lower-left corner of the model grid. a default value of zero is assigned if not specified. the value for xorigin does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", + "longname": "x-position of the model grid origin", + "name": "xorigin", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "yorigin": { + "block": "options", + "description": "y-position of the lower-left corner of the model grid. if not specified, then a default value equal to zero is used. the value for yorigin does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", + "longname": "y-position of the model grid origin", + "name": "yorigin", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfprtdisv.py b/flopy/mf6/modflow/mfprtdisv.py index c9dfeee9bf..b8d69ebdf3 100644 --- a/flopy/mf6/modflow/mfprtdisv.py +++ b/flopy/mf6/modflow/mfprtdisv.py @@ -50,8 +50,11 @@ class ModflowPrtdisv(MFPackage): keyword that specifies input griddata arrays should be written to layered ascii output files. export_array_netcdf : keyword - keyword that specifies input griddata arrays should be written to the model - output netcdf file. + keyword that specifies input gridded arrays should be written to the model + output netcdf file with attributes that support using the generated file as a + 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. 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 @@ -226,7 +229,7 @@ class ModflowPrtdisv(MFPackage): "preserve_case true", "reader urword", "optional true", - "prerelease true", + "developmode true", ], [ "block options", @@ -405,6 +408,310 @@ class ModflowPrtdisv(MFPackage): "numeric_index true", ], ] + spec = { + "advanced": False, + "cell2d": { + "cell2d": { + "block": "cell2d", + "item": { + "block": "cell2d", + "fields": { + "icell2d": { + "block": "cell2d", + "description": "is the CELL2D number. Records in the CELL2D block must be listed in consecutive order from the first to the last.", + "longname": "cell2d number", + "name": "icell2d", + "numeric_index": "true", + "optional": "false", + "reader": "urword", + "type": "integer", + }, + "icvert": { + "block": "cell2d", + "description": "is an array of integer values containing vertex numbers (in the VERTICES block) used to define the cell. Vertices must be listed in clockwise order. Cells that are connected must share vertices.", + "longname": "array of vertex numbers", + "name": "icvert", + "numeric_index": "true", + "optional": "false", + "reader": "urword", + "shape": "(ncvert)", + "type": "integer", + }, + "ncvert": { + "block": "cell2d", + "description": "is the number of vertices required to define the cell. There may be a different number of vertices for each cell.", + "longname": "number of cell vertices", + "name": "ncvert", + "optional": "false", + "reader": "urword", + "type": "integer", + }, + "xc": { + "block": "cell2d", + "description": "is the x-coordinate for the cell center.", + "longname": "x-coordinate for cell center", + "name": "xc", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + "yc": { + "block": "cell2d", + "description": "is the y-coordinate for the cell center.", + "longname": "y-coordinate for cell center", + "name": "yc", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + }, + "longname": "cell2d data", + "name": "cell2d", + "optional": False, + "reader": "urword", + "type": "record", + }, + "longname": "cell2d data", + "name": "cell2d", + "optional": False, + "reader": "urword", + "shape": "(ncpl)", + "type": "recarray", + } + }, + "dimensions": { + "ncpl": { + "block": "dimensions", + "description": "is the number of cells per layer. this is a constant value for the grid and it applies to all layers.", + "longname": "number of cells per layer", + "name": "ncpl", + "optional": False, + "reader": "urword", + "type": "integer", + }, + "nlay": { + "block": "dimensions", + "description": "is the number of layers in the model grid.", + "longname": "number of layers", + "name": "nlay", + "optional": False, + "reader": "urword", + "type": "integer", + }, + "nvert": { + "block": "dimensions", + "description": "is the total number of (x, y) vertex pairs used to characterize the horizontal configuration of the model grid.", + "longname": "number of columns", + "name": "nvert", + "optional": False, + "reader": "urword", + "type": "integer", + }, + }, + "fkeys": { + "ncf_filerecord": { + "abbr": "ncf", + "key": "ncf_filerecord", + "param": "packagedata", + "parent": "parent_package", + "val": "packagedata", + } + }, + "griddata": { + "botm": { + "block": "griddata", + "description": "is the bottom elevation for each cell.", + "layered": True, + "longname": "model bottom elevation", + "name": "botm", + "reader": "readarray", + "shape": "(ncpl, nlay)", + "type": "double precision", + }, + "idomain": { + "block": "griddata", + "description": "is an optional array that characterizes the existence status of a cell. if the idomain array is not specified, then all model cells exist within the solution. if the idomain value for a cell is 0, the cell does not exist in the simulation. input and output values will be read and written for the cell, but internal to the program, the cell is excluded from the solution. if the idomain value for a cell is 1, the cell exists in the simulation. if the idomain value for a cell is -1, the cell does not exist in the simulation. furthermore, the first existing cell above will be connected to the first existing cell below. this type of cell is referred to as a 'vertical pass through' cell.", + "layered": True, + "longname": "idomain existence array", + "name": "idomain", + "optional": True, + "reader": "readarray", + "shape": "(ncpl, nlay)", + "type": "integer", + }, + "top": { + "block": "griddata", + "description": "is the top elevation for each cell in the top model layer.", + "longname": "model top elevation", + "name": "top", + "reader": "readarray", + "shape": "(ncpl)", + "type": "double precision", + }, + }, + "multi": False, + "name": "prt-disv", + "options": { + "angrot": { + "block": "options", + "description": "counter-clockwise rotation angle (in degrees) of the model grid coordinate system relative to a real-world coordinate system. if not specified, then a default value of 0.0 is assigned. the value for angrot does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", + "longname": "rotation angle", + "name": "angrot", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "crs": { + "block": "options", + "description": "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.", + "developmode": True, + "longname": "crs user input string", + "name": "crs", + "optional": True, + "reader": "urword", + "shape": "lenbigline", + "type": "string", + }, + "export_array_ascii": { + "block": "options", + "description": "keyword that specifies input griddata arrays should be written to layered ascii output files.", + "longname": "export array variables to layered ascii files.", + "mf6internal": "export_ascii", + "name": "export_array_ascii", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "export_array_netcdf": { + "block": "options", + "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", + "longname": "export array variables to netcdf output files.", + "mf6internal": "export_nc", + "name": "export_array_netcdf", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "grb_filerecord": { + "block": "options", + "fields": { + "grb6_filename": { + "block": "options", + "description": "defines a binary grid output file.", + "longname": "file name of GRB information", + "name": "grb6_filename", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "grb_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "length_units": { + "block": "options", + "description": "is the length units used for this model. values can be 'feet', 'meters', or 'centimeters'. if not specified, the default is 'unknown'.", + "longname": "model length units", + "name": "length_units", + "optional": True, + "reader": "urword", + "type": "string", + }, + "nogrb": { + "block": "options", + "description": "keyword to deactivate writing of the binary grid file.", + "longname": "do not write binary grid file", + "name": "nogrb", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "packagedata": { + "block": "options", + "description": "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 the packagedata variable is also acceptable. See ncf package documentation for more information.", + "name": "packagedata", + "optional": True, + "reader": "urword", + "ref": { + "abbr": "ncf", + "key": "ncf_filerecord", + "param": "packagedata", + "parent": "parent_package", + "val": "packagedata", + }, + "type": "record ncf6 filein ncf6_filename", + }, + "xorigin": { + "block": "options", + "description": "x-position of the origin used for model grid vertices. this value should be provided in a real-world coordinate system. a default value of zero is assigned if not specified. the value for xorigin does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", + "longname": "x-position origin of the model grid coordinate system", + "name": "xorigin", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "yorigin": { + "block": "options", + "description": "y-position of the origin used for model grid vertices. this value should be provided in a real-world coordinate system. if not specified, then a default value equal to zero is used. the value for yorigin does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", + "longname": "y-position origin of the model grid coordinate system", + "name": "yorigin", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + }, + "vertices": { + "vertices": { + "block": "vertices", + "item": { + "block": "vertices", + "fields": { + "iv": { + "block": "vertices", + "description": "is the vertex number. Records in the VERTICES block must be listed in consecutive order from 1 to NVERT.", + "longname": "vertex number", + "name": "iv", + "numeric_index": "true", + "optional": "false", + "reader": "urword", + "type": "integer", + }, + "xv": { + "block": "vertices", + "description": "is the x-coordinate for the vertex.", + "longname": "x-coordinate for vertex", + "name": "xv", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + "yv": { + "block": "vertices", + "description": "is the y-coordinate for the vertex.", + "longname": "y-coordinate for vertex", + "name": "yv", + "optional": "false", + "reader": "urword", + "type": "double precision", + }, + }, + "longname": "vertices data", + "name": "vertices", + "optional": False, + "reader": "urword", + "type": "record", + }, + "longname": "vertices data", + "name": "vertices", + "optional": False, + "reader": "urword", + "shape": "(nvert)", + "type": "recarray", + } + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfprtfmi.py b/flopy/mf6/modflow/mfprtfmi.py index 00b457f4e6..2582641587 100644 --- a/flopy/mf6/modflow/mfprtfmi.py +++ b/flopy/mf6/modflow/mfprtfmi.py @@ -92,6 +92,67 @@ class ModflowPrtfmi(MFPackage): "reader urword", ], ] + spec = { + "advanced": False, + "multi": False, + "name": "prt-fmi", + "options": { + "save_flows": { + "block": "options", + "description": "keyword to indicate that fmi flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save cell-by-cell flows to budget file", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + } + }, + "packagedata": { + "packagedata": { + "block": "packagedata", + "item": { + "block": "packagedata", + "fields": { + "filein": { + "block": "packagedata", + "description": "keyword to specify that an input filename is expected next.", + "longname": "file keyword", + "name": "filein", + "optional": "false", + "reader": "urword", + "type": "keyword", + }, + "flowtype": { + "block": "packagedata", + "description": "is the word GWFBUDGET, GWFHEAD, or GWFGRID. If GWFBUDGET is specified, then the corresponding file must be a budget file. If GWFHEAD is specified, the file must be a head file. If GWFGRID is specified, the file must be a binary grid file.", + "longname": "flow type", + "name": "flowtype", + "reader": "urword", + "type": "string", + }, + "fname": { + "block": "packagedata", + "description": "is the name of the file containing flows. The path to the file should be included if the file is not located in the folder where the program was run.", + "longname": "file name", + "name": "fname", + "reader": "urword", + "type": "string", + }, + }, + "longname": "flowtype list", + "name": "packagedata", + "optional": True, + "reader": "urword", + "type": "record", + }, + "longname": "flowtype list", + "name": "packagedata", + "optional": True, + "reader": "urword", + "type": "recarray", + } + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfprtmip.py b/flopy/mf6/modflow/mfprtmip.py index 8d78cee768..a814310ee7 100644 --- a/flopy/mf6/modflow/mfprtmip.py +++ b/flopy/mf6/modflow/mfprtmip.py @@ -97,6 +97,57 @@ class ModflowPrtmip(MFPackage): "optional true", ], ] + spec = { + "advanced": False, + "griddata": { + "izone": { + "block": "griddata", + "description": "is an integer zone number assigned to each cell. izone may be positive, negative, or zero. the current cell's zone number is recorded with each particle track datum. if a prp package's istopzone option is set to any value other than zero, particles released by that prp package terminate if they enter a cell whose izone value matches istopzone. if istopzone is not specified or is set to zero in a prp package, izone has no effect on the termination of particles released by that prp package. each prp package may configure a single istopzone value.", + "layered": True, + "longname": "zone number", + "name": "izone", + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "integer", + }, + "porosity": { + "block": "griddata", + "description": "is the aquifer porosity.", + "layered": True, + "longname": "porosity", + "name": "porosity", + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + "retfactor": { + "block": "griddata", + "description": "is a real value by which velocity is divided within a given cell. retfactor can be used to account for solute retardation, i.e., the apparent effect of linear sorption on the velocity of particles that track solute advection. retfactor may be assigned any real value. a retfactor value greater than 1 represents particle retardation (slowing), and a value of 1 represents no retardation. the effect of specifying a retfactor value for each cell is the same as the effect of directly multiplying the porosity in each cell by the proposed retfactor value for each cell. retfactor allows conceptual isolation of effects such as retardation from the effect of porosity. the default value is 1.", + "layered": True, + "longname": "retardation factor", + "name": "retfactor", + "optional": True, + "reader": "readarray", + "shape": "(nodes)", + "type": "double precision", + }, + }, + "multi": False, + "name": "prt-mip", + "options": { + "export_array_ascii": { + "block": "options", + "description": "keyword that specifies input griddata arrays should be written to layered ascii output files.", + "longname": "export array variables to layered ascii files.", + "mf6internal": "export_ascii", + "name": "export_array_ascii", + "optional": True, + "reader": "urword", + "type": "keyword", + } + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfprtnam.py b/flopy/mf6/modflow/mfprtnam.py index 50bedc4c04..76d16a90a8 100644 --- a/flopy/mf6/modflow/mfprtnam.py +++ b/flopy/mf6/modflow/mfprtnam.py @@ -127,6 +127,94 @@ class ModflowPrtnam(MFPackage): "optional true", ], ] + spec = { + "advanced": False, + "multi": False, + "name": "prt-nam", + "options": { + "list": { + "block": "options", + "description": "is name of the listing file to create for this prt model. if not specified, then the name of the list file will be the basename of the prt model name file and the '.lst' extension. for example, if the prt name file is called 'my.model.nam' then the list file will be called 'my.model.lst'.", + "longname": "name of listing file", + "name": "list", + "optional": True, + "reader": "urword", + "type": "string", + }, + "print_flows": { + "block": "options", + "description": "keyword to indicate that the list of all model package 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.", + "longname": "print calculated flows to listing file", + "name": "print_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of all model stress package information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "save_flows": { + "block": "options", + "description": "keyword to indicate that all model package flow terms will be written to the file specified with 'budget fileout' in output control.", + "longname": "save flows for all packages to budget file", + "name": "save_flows", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + }, + "packages": { + "packages": { + "block": "packages", + "item": { + "block": "packages", + "fields": { + "fname": { + "block": "packages", + "description": "is the name of the file containing the package input. The path to the file should be included if the file is not located in the folder where the program was run.", + "longname": "file name", + "name": "fname", + "reader": "urword", + "type": "string", + }, + "ftype": { + "block": "packages", + "description": "is the file type, which must be one of the following character values shown in table~ref{table:ftype-prt}. Ftype may be entered in any combination of uppercase and lowercase.", + "longname": "package type", + "name": "ftype", + "reader": "urword", + "type": "string", + }, + "pname": { + "block": "packages", + "description": "is the user-defined name for the package. PNAME is restricted to 16 characters. No spaces are allowed in PNAME. PNAME character values are read and stored by the program for stress packages only. These names may be useful for labeling purposes when multiple stress packages of the same type are located within a single PRT Model. If PNAME is specified for a stress package, then PNAME will be used in the flow budget table in the listing file; it will also be used for the text entry in the cell-by-cell budget file. PNAME is case insensitive and is stored in all upper case letters.", + "longname": "user name for package", + "name": "pname", + "optional": "true", + "reader": "urword", + "type": "string", + }, + }, + "longname": "package list", + "name": "packages", + "optional": False, + "reader": "urword", + "type": "record", + }, + "longname": "package list", + "name": "packages", + "optional": False, + "reader": "urword", + "type": "recarray", + } + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfprtoc.py b/flopy/mf6/modflow/mfprtoc.py index bd8c09ce7c..65bbb7a023 100644 --- a/flopy/mf6/modflow/mfprtoc.py +++ b/flopy/mf6/modflow/mfprtoc.py @@ -144,6 +144,7 @@ class ModflowPrtoc(MFPackage): "reader urword", "tagged true", "optional true", + "mf6internal budfilerec", ], [ "block options", @@ -184,6 +185,7 @@ class ModflowPrtoc(MFPackage): "reader urword", "tagged true", "optional true", + "mf6internal budcsvfilerec", ], [ "block options", @@ -214,6 +216,7 @@ class ModflowPrtoc(MFPackage): "reader urword", "tagged true", "optional true", + "mf6internal trackfilerec", ], [ "block options", @@ -244,6 +247,7 @@ class ModflowPrtoc(MFPackage): "reader urword", "tagged true", "optional true", + "mf6internal trackcsvfilerec", ], [ "block options", @@ -286,6 +290,7 @@ class ModflowPrtoc(MFPackage): "type keyword", "reader urword", "optional true", + "mf6internal track_subf_exit", ], [ "block options", @@ -330,6 +335,7 @@ class ModflowPrtoc(MFPackage): "reader urword", "tagged true", "optional true", + "mf6internal ttimesrec", "removed 6.6.0", ], [ @@ -361,6 +367,7 @@ class ModflowPrtoc(MFPackage): "reader urword", "tagged true", "optional true", + "mf6internal ttimesfilerec", "removed 6.6.0", ], [ @@ -391,13 +398,14 @@ class ModflowPrtoc(MFPackage): "type keyword", "reader urword", "optional true", + "mf6internal dev_dump_evtrace", ], [ "block dimensions", "name ntracktimes", "type integer", "reader urword", - "optional false", + "optional true", ], [ "block tracktimes", @@ -405,6 +413,7 @@ class ModflowPrtoc(MFPackage): "type recarray time", "shape (ntracktimes)", "reader urword", + "optional true", ], [ "block tracktimes", @@ -414,6 +423,7 @@ class ModflowPrtoc(MFPackage): "tagged false", "in_record true", "reader urword", + "optional false", ], [ "block period", @@ -527,6 +537,333 @@ class ModflowPrtoc(MFPackage): "reader urword", ], ] + spec = { + "advanced": False, + "dimensions": { + "ntracktimes": { + "block": "dimensions", + "description": "is the number of user-specified particle tracking times in the tracktimes block.", + "longname": "number of particle tracking times", + "name": "ntracktimes", + "optional": True, + "reader": "urword", + "type": "integer", + } + }, + "multi": False, + "name": "prt-oc", + "options": { + "budget_filerecord": { + "block": "options", + "fields": { + "budgetfile": { + "block": "options", + "description": "name of the output file to write budget information.", + "longname": "file keyword", + "name": "budgetfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "budfilerec", + "name": "budget_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "budgetcsv_filerecord": { + "block": "options", + "fields": { + "budgetcsvfile": { + "block": "options", + "description": "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.", + "longname": "file keyword", + "name": "budgetcsvfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "budcsvfilerec", + "name": "budgetcsv_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "dev_dump_event_trace": { + "block": "options", + "description": "print a verbose particle tracking event trace to standard output", + "longname": "print particle tracking events", + "mf6internal": "dev_dump_evtrace", + "name": "dev_dump_event_trace", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "track_dropped": { + "block": "options", + "description": "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.", + "longname": "track drops to water table", + "name": "track_dropped", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "track_exit": { + "block": "options", + "description": "keyword to indicate that particle tracking output is to be written when a particle exits a grid feature (e.g. model, cell)", + "longname": "track domain exits", + "name": "track_exit", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "track_filerecord": { + "block": "options", + "fields": { + "trackfile": { + "block": "options", + "description": "name of the binary output file to write tracking information.", + "longname": "file keyword", + "name": "trackfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "trackfilerec", + "name": "track_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "track_release": { + "block": "options", + "description": "keyword to indicate that particle tracking output is to be written when a particle is released", + "longname": "track release", + "name": "track_release", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "track_subfeature_exit": { + "block": "options", + "description": "keyword to indicate that particle tracking output is to be written when a particle exits a sub-grid-scale feature. such features are considered implementation details of the tracking algorithm employed for particular grid types, and reporting for exit events from such features is disabled by default.", + "longname": "track cell exits", + "mf6internal": "track_subf_exit", + "name": "track_subfeature_exit", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "track_terminate": { + "block": "options", + "description": "keyword to indicate that particle tracking output is to be written when a particle terminates for any reason", + "longname": "track termination", + "name": "track_terminate", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "track_timesfilerecord": { + "block": "options", + "fields": { + "timesfile": { + "block": "options", + "description": "name of the tracking times file", + "longname": "file keyword", + "name": "timesfile", + "optional": "false", + "reader": "urword", + "removed": "6.6.0", + "type": "string", + } + }, + "mf6internal": "ttimesfilerec", + "name": "track_timesfilerecord", + "optional": True, + "reader": "urword", + "removed": "6.6.0", + "type": "record", + }, + "track_timesrecord": { + "block": "options", + "fields": { + "times": { + "block": "options", + "description": "times to track, relative to the beginning of the simulation.", + "longname": "tracking times", + "name": "times", + "reader": "urword", + "removed": "6.6.0", + "repeating": "true", + "shape": "(any1d)", + "type": "double precision", + }, + "track_times": { + "block": "options", + "description": "keyword indicating tracking times will follow", + "name": "track_times", + "reader": "urword", + "removed": "6.6.0", + "type": "keyword", + }, + }, + "mf6internal": "ttimesrec", + "name": "track_timesrecord", + "optional": True, + "reader": "urword", + "removed": "6.6.0", + "type": "record", + }, + "track_timestep": { + "block": "options", + "description": "keyword to indicate that particle tracking output is to be written at the end of each time step", + "longname": "track timestep ends", + "name": "track_timestep", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "track_usertime": { + "block": "options", + "description": "keyword to indicate that particle tracking output is to be written at user-specified times, provided as double precision values in the tracktimes block.", + "longname": "track user-specified times", + "name": "track_usertime", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "track_weaksink": { + "block": "options", + "description": "keyword to indicate that particle tracking output is to be written when a particle exits a weak sink (a cell which removes some but not all inflow from adjacent cells)", + "longname": "track weaksink exits", + "name": "track_weaksink", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "trackcsv_filerecord": { + "block": "options", + "fields": { + "trackcsvfile": { + "block": "options", + "description": "name of the comma-separated value (CSV) file to write tracking information.", + "longname": "file keyword", + "name": "trackcsvfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "trackcsvfilerec", + "name": "trackcsv_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + }, + "period": { + "printrecord": { + "block": "period", + "fields": { + "ocsetting": { + "block": "period", + "description": "specifies the steps for which the data will be saved.", + "name": "ocsetting", + "reader": "urword", + "type": "keystring all first last frequency steps", + }, + "print": { + "block": "period", + "description": "keyword to indicate that information will be printed this stress period.", + "longname": "keyword to save", + "name": "print", + "optional": "false", + "reader": "urword", + "type": "keyword", + }, + "rtype": { + "block": "period", + "description": "type of information to save or print. Can only be BUDGET.", + "longname": "record type", + "name": "rtype", + "optional": "false", + "reader": "urword", + "type": "string", + }, + }, + "name": "printrecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "saverecord": { + "block": "period", + "fields": { + "ocsetting": { + "block": "period", + "description": "specifies the steps for which the data will be saved.", + "name": "ocsetting", + "reader": "urword", + "type": "keystring all first last frequency steps", + }, + "rtype": { + "block": "period", + "description": "type of information to save or print. Can only be BUDGET.", + "longname": "record type", + "name": "rtype", + "optional": "false", + "reader": "urword", + "type": "string", + }, + "save": { + "block": "period", + "description": "keyword to indicate that information will be saved this stress period.", + "longname": "keyword to save", + "name": "save", + "optional": "false", + "reader": "urword", + "type": "keyword", + }, + }, + "name": "saverecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "transient_block": True, + }, + "tracktimes": { + "tracktimes": { + "block": "tracktimes", + "item": { + "block": "tracktimes", + "fields": { + "time": { + "block": "tracktimes", + "description": "real value that defines the tracking time with respect to the simulation start time.", + "longname": "release time", + "name": "time", + "optional": "false", + "reader": "urword", + "type": "double precision", + } + }, + "name": "tracktimes", + "optional": True, + "reader": "urword", + "type": "record", + }, + "name": "tracktimes", + "optional": True, + "reader": "urword", + "shape": "(ntracktimes)", + "type": "recarray", + } + }, + } def __init__( self, diff --git a/flopy/mf6/modflow/mfprtprp.py b/flopy/mf6/modflow/mfprtprp.py index 0eb872a560..2554b11c2d 100644 --- a/flopy/mf6/modflow/mfprtprp.py +++ b/flopy/mf6/modflow/mfprtprp.py @@ -31,15 +31,19 @@ class ModflowPrtprp(MFPackage): is brent's method. exit_solve_tolerance : double precision the convergence tolerance for iterative solution of particle exit location and - time in the generalized pollock's method. a value of 0.00001 works well for - many problems, but the value that strikes the best balance between accuracy and - runtime is problem-dependent. + time in the generalized pollock's method. the variable being solved for varies + from 0 to 1. a tolerance of 0.00001 works well for many problems, but the + value that strikes the best balance between accuracy and runtime is problem- + dependent. local_z : keyword indicates that 'zrpt' defines the local z coordinate of the release point - within the cell, with value of 0 at the bottom and 1 at the top of the cell. - if the cell is partially saturated at release time, the top of the cell is - considered to be the water table elevation (the head in the cell) rather than - the top defined by the user. + within the cell, with value of 0 at the bottom and 1 at the effective top of + the cell. if the cell is convertible and partially saturated at release time, + the effective top of the cell is considered to be the water table elevation + (the head in the cell) rather than the top defined by the user, and is + constrained to be no higher than the geometric top of the cell and no lower + than the cell bottom. if the cell is confined, the effective top is the + geometric top. extend_tracking : keyword indicates that particles should be tracked beyond the end of the simulation's final time step (using that time step's flows) until particles terminate or @@ -91,6 +95,9 @@ class ModflowPrtprp(MFPackage): that happens to be inactive at release time, the particle is to be moved to the topmost active cell below it, if any. by default, a particle is not released into the simulation if its release point's cell is inactive at release time. + 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 @@ -124,6 +131,10 @@ class ModflowPrtprp(MFPackage): releasesetting selections. if none of these are provided, a single release time is configured at the beginning of the first time step of the simulation's first stress period. + coordinate_check_method : string + approach for verifying that release point coordinates are in the cell with the + specified id. possible values are none and eager. by default, release point + coordinates are checked at release time, i.e. eager. dev_cycle_detection_window : integer integer value defining the size of the window (number of consecutive exit events) used for cycle detection. defaults to 0, disabling cycle detection. @@ -505,7 +516,6 @@ class ModflowPrtprp(MFPackage): "valid none eager", "reader urword", "optional true", - "prerelease true", "mf6internal ichkmeth", "default eager", ], @@ -693,6 +703,448 @@ class ModflowPrtprp(MFPackage): "removed 6.6.0", ], ] + spec = { + "advanced": False, + "dimensions": { + "nreleasepts": { + "block": "dimensions", + "description": "is the number of particle release points.", + "longname": "number of particle release points", + "name": "nreleasepts", + "optional": False, + "reader": "urword", + "type": "integer", + }, + "nreleasetimes": { + "block": "dimensions", + "description": "is the number of particle release times specified in the releasetimes block. this is not necessarily the total number of release times; release times are the union of release_time_frequency, releasetimes block, and period block releasesetting selections.", + "longname": "number of particle release times", + "name": "nreleasetimes", + "optional": False, + "reader": "urword", + "type": "integer", + }, + }, + "multi": True, + "name": "prt-prp", + "options": { + "boundnames": { + "block": "options", + "description": "keyword to indicate that boundary names may be provided with the list of particle release points.", + "name": "boundnames", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "coordinate_check_method": { + "block": "options", + "default": "eager", + "description": "approach for verifying that release point coordinates are in the cell with the specified id. possible values are none and eager. by default, release point coordinates are checked at release time, i.e. eager.", + "longname": "coordinate checking method", + "mf6internal": "ichkmeth", + "name": "coordinate_check_method", + "optional": True, + "reader": "urword", + "type": "string", + "valid": "none eager", + }, + "dev_cycle_detection_window": { + "block": "options", + "description": "integer value defining the size of the window (number of consecutive exit events) used for cycle detection. defaults to 0, disabling cycle detection. with detection enabled, particle pathlines with duplicate cell exit events (i.e., exiting the same cell through the same face twice) will cause the program to terminate with an error. a larger window size provides more robust cycle detection at the cost of more runtime operations per cell exit.", + "longname": "cycle detection window size", + "mf6internal": "icycwin", + "name": "dev_cycle_detection_window", + "optional": True, + "reader": "urword", + "type": "integer", + }, + "dev_exit_solve_method": { + "block": "options", + "description": "the method for iterative solution of particle exit location and time in the generalized pollock's method. 0 default, 1 brent, 2 chandrupatla. the default is brent's method.", + "longname": "exit solve method", + "mf6internal": "iexmeth", + "name": "dev_exit_solve_method", + "optional": True, + "reader": "urword", + "type": "integer", + }, + "dev_forceternary": { + "block": "options", + "description": "force use of the ternary tracking method regardless of cell type in disv grids.", + "longname": "force ternary tracking method", + "mf6internal": "frctrn", + "name": "dev_forceternary", + "optional": False, + "reader": "urword", + "type": "keyword", + }, + "drape": { + "block": "options", + "description": "is a text keyword to indicate that if a particle's release point is in a cell that happens to be inactive at release time, the particle is to be moved to the topmost active cell below it, if any. by default, a particle is not released into the simulation if its release point's cell is inactive at release time. 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.", + "longname": "drape", + "name": "drape", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "dry_tracking_method": { + "block": "options", + "description": "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 'stay'. the default is 'drop', which passes particles vertically and instantaneously to the water table. 'stop' causes particles to terminate. 'stay' causes particles to remain stationary but active.", + "longname": "what to do in dry-but-active cells", + "mf6internal": "idrymeth", + "name": "dry_tracking_method", + "optional": True, + "reader": "urword", + "type": "string", + "valid": "drop stop stay", + }, + "exit_solve_tolerance": { + "block": "options", + "default": 1e-05, + "description": "the convergence tolerance for iterative solution of particle exit location and time in the generalized pollock's method. the variable being solved for varies from 0 to 1. a tolerance of 0.00001 works well for many problems, but the value that strikes the best balance between accuracy and runtime is problem-dependent.", + "longname": "exit solve tolerance", + "mf6internal": "extol", + "name": "exit_solve_tolerance", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "extend_tracking": { + "block": "options", + "description": "indicates that particles should be tracked beyond the end of the simulation's final time step (using that time step's flows) until particles terminate or reach a specified stop time. by default, particles are terminated at the end of the simulation's final time step.", + "longname": "whether to extend tracking beyond the end of the simulation", + "mf6internal": "extend", + "name": "extend_tracking", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "istopzone": { + "block": "options", + "description": "integer value defining the stop zone number. if cells have been assigned izone values in the griddata block, a particle terminates if it enters a cell whose izone value matches istopzone. an istopzone value of zero indicates that there is no stop zone. the default value is zero.", + "longname": "stop zone number", + "name": "istopzone", + "optional": True, + "reader": "urword", + "type": "integer", + }, + "local_z": { + "block": "options", + "description": "indicates that 'zrpt' defines the local z coordinate of the release point within the cell, with value of 0 at the bottom and 1 at the effective top of the cell. if the cell is convertible and partially saturated at release time, the effective top of the cell is considered to be the water table elevation (the head in the cell) rather than the top defined by the user, and is constrained to be no higher than the geometric top of the cell and no lower than the cell bottom. if the cell is confined, the effective top is the geometric top.", + "longname": "whether to use local z coordinates", + "mf6internal": "localz", + "name": "local_z", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "print_input": { + "block": "options", + "description": "keyword to indicate that the list of all model stress package information will be written to the listing file immediately after it is read.", + "longname": "print input to listing file", + "mf6internal": "iprpak", + "name": "print_input", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "release_time_frequency": { + "block": "options", + "description": "real number indicating the time frequency at which to release particles. this option can be used to schedule releases at a regular interval for the duration of the simulation, starting at the simulation start time. the release schedule is the union of this option, the releasetimes block, and period block releasesetting selections. if none of these are provided, a single release time is configured at the beginning of the first time step of the simulation's first stress period.", + "longname": "release time frequency", + "mf6internal": "rtfreq", + "name": "release_time_frequency", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "release_time_tolerance": { + "block": "options", + "description": "real number indicating the tolerance within which to consider consecutive release times coincident. coincident release times will be merged into a single release time. the default is $epsilon times 10^{11}$, where $epsilon$ is machine precision.", + "longname": "release time coincidence tolerance", + "mf6internal": "rttol", + "name": "release_time_tolerance", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "release_timesfilerecord": { + "block": "options", + "fields": { + "timesfile": { + "block": "options", + "description": "name of the release times file. RELEASE_TIMES and RELEASE_TIMESFILE are mutually exclusive.", + "longname": "file keyword", + "name": "timesfile", + "optional": "false", + "reader": "urword", + "removed": "6.6.0", + "type": "string", + } + }, + "mf6internal": "release_timesfr", + "name": "release_timesfilerecord", + "optional": True, + "reader": "urword", + "removed": "6.6.0", + "type": "record", + }, + "release_timesrecord": { + "block": "options", + "fields": { + "release_times": { + "block": "options", + "description": "keyword indicating release times will follow", + "name": "release_times", + "reader": "urword", + "removed": "6.6.0", + "type": "keyword", + }, + "times": { + "block": "options", + "description": "times to release, relative to the beginning of the simulation. RELEASE_TIMES and RELEASE_TIMESFILE are mutually exclusive.", + "longname": "release times", + "name": "times", + "reader": "urword", + "removed": "6.6.0", + "repeating": "true", + "shape": "(any1d)", + "type": "double precision", + }, + }, + "mf6internal": "releasetr", + "name": "release_timesrecord", + "optional": True, + "reader": "urword", + "removed": "6.6.0", + "type": "record", + }, + "stop_at_weak_sink": { + "block": "options", + "description": "is a text keyword to indicate that a particle is to terminate when it enters a cell that is a weak sink. by default, particles are allowed to pass though cells that are weak sinks.", + "longname": "stop at weak sink", + "mf6internal": "istopweaksink", + "name": "stop_at_weak_sink", + "optional": True, + "reader": "urword", + "type": "keyword", + }, + "stoptime": { + "block": "options", + "description": "real value defining the maximum simulation time to which particles in the package can be tracked. particles that have not terminated earlier due to another termination condition will terminate when simulation time stoptime is reached. if the last stress period in the simulation consists of more than one time step, particles will not be tracked past the ending time of the last stress period, regardless of stoptime. if the extend_tracking option is enabled and the last stress period in the simulation is steady-state, the simulation ending time will not limit the time to which particles can be tracked, but stoptime and stoptraveltime will continue to apply. if stoptime and stoptraveltime are both provided, particles will be stopped if either is reached.", + "longname": "stop time", + "name": "stoptime", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "stoptraveltime": { + "block": "options", + "description": "real value defining the maximum travel time over which particles in the model can be tracked. particles that have not terminated earlier due to another termination condition will terminate when their travel time reaches stoptraveltime. if the last stress period in the simulation consists of more than one time step, particles will not be tracked past the ending time of the last stress period, regardless of stoptraveltime. if the extend_tracking option is enabled and the last stress period in the simulation is steady-state, the simulation ending time will not limit the time to which particles can be tracked, but stoptime and stoptraveltime will continue to apply. if stoptime and stoptraveltime are both provided, particles will be stopped if either is reached.", + "longname": "stop travel time", + "name": "stoptraveltime", + "optional": True, + "reader": "urword", + "type": "double precision", + }, + "track_filerecord": { + "block": "options", + "fields": { + "trackfile": { + "block": "options", + "description": "name of the binary output file to write tracking information.", + "longname": "file keyword", + "name": "trackfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "name": "track_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + "trackcsv_filerecord": { + "block": "options", + "fields": { + "trackcsvfile": { + "block": "options", + "description": "name of the comma-separated value (CSV) file to write tracking information.", + "longname": "file keyword", + "name": "trackcsvfile", + "optional": "false", + "reader": "urword", + "type": "string", + } + }, + "mf6internal": "trackcsvfr", + "name": "trackcsv_filerecord", + "optional": True, + "reader": "urword", + "type": "record", + }, + }, + "packagedata": { + "packagedata": { + "block": "packagedata", + "item": { + "block": "packagedata", + "fields": { + "boundname": { + "block": "packagedata", + "description": "name of the particle release point. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", + "longname": "release point name", + "name": "boundname", + "optional": "true", + "reader": "urword", + "type": "string", + }, + "cellid": { + "block": "packagedata", + "description": "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 layer, row, and column. For a grid that uses the DISV input file, CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file, CELLID is the node number for the cell.", + "longname": "cell identifier", + "name": "cellid", + "reader": "urword", + "shape": "(ncelldim)", + "type": "integer", + }, + "irptno": { + "block": "packagedata", + "description": "integer value that defines the PRP release point number associated with the specified PACKAGEDATA data on the line. IRPTNO must be greater than zero and less than or equal to NRELEASEPTS. The program will terminate with an error if information for a PRP release point number is specified more than once.", + "longname": "PRP id number for release point", + "name": "irptno", + "numeric_index": "true", + "reader": "urword", + "type": "integer", + }, + "xrpt": { + "block": "packagedata", + "description": "real value that defines the x coordinate of the release point in model coordinates. The (x, y, z) location specified for the release point must lie within the cell that is identified by the specified cellid.", + "longname": "x coordinate of release point", + "name": "xrpt", + "reader": "urword", + "type": "double precision", + }, + "yrpt": { + "block": "packagedata", + "description": "real value that defines the y coordinate of the release point in model coordinates. The (x, y, z) location specified for the release point must lie within the cell that is identified by the specified cellid.", + "longname": "y coordinate of release point", + "name": "yrpt", + "reader": "urword", + "type": "double precision", + }, + "zrpt": { + "block": "packagedata", + "description": "real value that defines the z coordinate of the release point in model coordinates or, if the LOCAL_Z option is active, in local cell coordinates. The (x, y, z) location specified for the release point must lie within the cell that is identified by the specified cellid.", + "longname": "z coordinate of release point", + "name": "zrpt", + "reader": "urword", + "type": "double precision", + }, + }, + "name": "packagedata", + "reader": "urword", + "type": "record", + }, + "name": "packagedata", + "reader": "urword", + "shape": "(nreleasepts)", + "type": "recarray", + } + }, + "period": { + "perioddata": { + "block": "period", + "item": { + "block": "period", + "choices": { + "all": { + "block": "period", + "description": "keyword to indicate release at the start of all time steps in the period.", + "name": "all", + "reader": "urword", + "type": "keyword", + }, + "first": { + "block": "period", + "description": "keyword to indicate release at the start of the first time step in the period. this keyword may be used in conjunction with other releasesetting options.", + "name": "first", + "reader": "urword", + "type": "keyword", + }, + "fraction": { + "block": "period", + "description": "release particles after the specified fraction of the time step has elapsed. if fraction is not set, particles are released at the start of the specified time step(s). fraction must be a single value when used with all, first, or frequency. when used with steps, fraction may be a single value or an array of the same length as steps. if a single fraction value is provided with steps, the fraction applies to all steps. note: the fraction option has been removed. for fine control over release timing, specify times explicitly using the releasetimes block.", + "name": "fraction", + "optional": True, + "reader": "urword", + "removed": "6.6.0", + "shape": "( Date: Fri, 6 Feb 2026 18:07:23 -0500 Subject: [PATCH 2/3] no spec property --- flopy/mf6/modflow/__init__.py | 34 +- flopy/mf6/modflow/mfems.py | 19 +- flopy/mf6/modflow/mfgnc.py | 226 +--- flopy/mf6/modflow/mfgwe.py | 1 + flopy/mf6/modflow/mfgweadv.py | 57 +- flopy/mf6/modflow/mfgwecnd.py | 287 +---- flopy/mf6/modflow/mfgwectp.py | 426 +------ flopy/mf6/modflow/mfgwedis.py | 495 +------- flopy/mf6/modflow/mfgwedisu.py | 732 +---------- flopy/mf6/modflow/mfgwedisv.py | 659 +--------- flopy/mf6/modflow/mfgweesl.py | 424 +------ flopy/mf6/modflow/mfgweest.py | 275 +---- flopy/mf6/modflow/mfgwefmi.py | 142 +-- flopy/mf6/modflow/mfgwegwe.py | 577 +-------- flopy/mf6/modflow/mfgweic.py | 93 +- flopy/mf6/modflow/mfgwelke.py | 886 +------------- flopy/mf6/modflow/mfgwemve.py | 205 +--- flopy/mf6/modflow/mfgwemwe.py | 829 +------------ flopy/mf6/modflow/mfgwenam.py | 395 +----- flopy/mf6/modflow/mfgweoc.py | 500 +------- flopy/mf6/modflow/mfgwesfe.py | 888 +------------- flopy/mf6/modflow/mfgwessm.py | 260 +--- flopy/mf6/modflow/mfgweuze.py | 814 +------------ flopy/mf6/modflow/mfgwf.py | 1 + flopy/mf6/modflow/mfgwfapi.py | 209 +--- flopy/mf6/modflow/mfgwfbuy.py | 286 +---- flopy/mf6/modflow/mfgwfchd.py | 444 +------ flopy/mf6/modflow/mfgwfchdg.py | 351 +----- flopy/mf6/modflow/mfgwfcsub.py | 1497 +---------------------- flopy/mf6/modflow/mfgwfdis.py | 495 +------- flopy/mf6/modflow/mfgwfdisu.py | 732 +---------- flopy/mf6/modflow/mfgwfdisv.py | 659 +--------- flopy/mf6/modflow/mfgwfdrn.py | 502 +------- flopy/mf6/modflow/mfgwfdrng.py | 418 +------ flopy/mf6/modflow/mfgwfevt.py | 586 +-------- flopy/mf6/modflow/mfgwfevta.py | 465 +------ flopy/mf6/modflow/mfgwfghb.py | 461 +------ flopy/mf6/modflow/mfgwfghbg.py | 377 +----- flopy/mf6/modflow/mfgwfgnc.py | 226 +--- flopy/mf6/modflow/mfgwfgwe.py | 14 +- flopy/mf6/modflow/mfgwfgwf.py | 653 +--------- flopy/mf6/modflow/mfgwfgwt.py | 14 +- flopy/mf6/modflow/mfgwfhfb.py | 160 +-- flopy/mf6/modflow/mfgwfic.py | 93 +- flopy/mf6/modflow/mfgwflak.py | 1632 +------------------------ flopy/mf6/modflow/mfgwfmaw.py | 1387 +-------------------- flopy/mf6/modflow/mfgwfmvr.py | 493 +------- flopy/mf6/modflow/mfgwfnam.py | 427 +------ flopy/mf6/modflow/mfgwfnpf.py | 811 +------------ flopy/mf6/modflow/mfgwfoc.py | 494 +------- flopy/mf6/modflow/mfgwfprt.py | 14 +- flopy/mf6/modflow/mfgwfrch.py | 443 +------ flopy/mf6/modflow/mfgwfrcha.py | 419 +------ flopy/mf6/modflow/mfgwfriv.py | 480 +------- flopy/mf6/modflow/mfgwfrivg.py | 405 +------ flopy/mf6/modflow/mfgwfsfr.py | 1808 +--------------------------- flopy/mf6/modflow/mfgwfsto.py | 389 +----- flopy/mf6/modflow/mfgwfuzf.py | 1128 +---------------- flopy/mf6/modflow/mfgwfvsc.py | 350 +----- flopy/mf6/modflow/mfgwfwel.py | 553 +-------- flopy/mf6/modflow/mfgwfwelg.py | 460 +------ flopy/mf6/modflow/mfgwt.py | 1 + flopy/mf6/modflow/mfgwtadv.py | 57 +- flopy/mf6/modflow/mfgwtapi.py | 209 +--- flopy/mf6/modflow/mfgwtcnc.py | 426 +------ flopy/mf6/modflow/mfgwtdis.py | 495 +------- flopy/mf6/modflow/mfgwtdisu.py | 732 +---------- flopy/mf6/modflow/mfgwtdisv.py | 659 +--------- flopy/mf6/modflow/mfgwtdsp.py | 261 +--- flopy/mf6/modflow/mfgwtfmi.py | 142 +-- flopy/mf6/modflow/mfgwtgwt.py | 577 +-------- flopy/mf6/modflow/mfgwtic.py | 93 +- flopy/mf6/modflow/mfgwtist.py | 694 +---------- flopy/mf6/modflow/mfgwtlkt.py | 852 +------------ flopy/mf6/modflow/mfgwtmst.py | 369 +----- flopy/mf6/modflow/mfgwtmvt.py | 205 +--- flopy/mf6/modflow/mfgwtmwt.py | 795 +----------- flopy/mf6/modflow/mfgwtnam.py | 395 +----- flopy/mf6/modflow/mfgwtoc.py | 500 +------- flopy/mf6/modflow/mfgwtsft.py | 854 +------------ flopy/mf6/modflow/mfgwtsrc.py | 446 +------ flopy/mf6/modflow/mfgwtssm.py | 260 +--- flopy/mf6/modflow/mfgwtuzt.py | 814 +------------ flopy/mf6/modflow/mfims.py | 825 +------------ flopy/mf6/modflow/mfmvr.py | 471 +------- flopy/mf6/modflow/mfmvt.py | 183 +-- flopy/mf6/modflow/mfnam.py | 512 +------- flopy/mf6/modflow/mfprt.py | 1 + flopy/mf6/modflow/mfprtdis.py | 481 +------- flopy/mf6/modflow/mfprtdisv.py | 649 +--------- flopy/mf6/modflow/mfprtfmi.py | 120 +- flopy/mf6/modflow/mfprtmip.py | 113 +- flopy/mf6/modflow/mfprtnam.py | 167 +-- flopy/mf6/modflow/mfprtoc.py | 821 +------------ flopy/mf6/modflow/mfprtprp.py | 1002 +-------------- flopy/mf6/modflow/mfpts.py | 335 +----- flopy/mf6/modflow/mfsimulation.py | 4 +- flopy/mf6/modflow/mftdis.py | 238 +--- flopy/mf6/modflow/mfutlats.py | 190 +-- flopy/mf6/modflow/mfutlhpc.py | 127 +- flopy/mf6/modflow/mfutllaktab.py | 153 +-- flopy/mf6/modflow/mfutlncf.py | 263 +--- flopy/mf6/modflow/mfutlobs.py | 208 +--- flopy/mf6/modflow/mfutlsfrtab.py | 136 +-- flopy/mf6/modflow/mfutlspc.py | 248 +--- flopy/mf6/modflow/mfutlspca.py | 191 +-- flopy/mf6/modflow/mfutltas.py | 255 +--- flopy/mf6/modflow/mfutlts.py | 402 +------ flopy/mf6/modflow/mfutltvk.py | 256 +--- flopy/mf6/modflow/mfutltvs.py | 257 +--- flopy/mf6/utils/codegen/filters.py | 6 +- 111 files changed, 2391 insertions(+), 45619 deletions(-) diff --git a/flopy/mf6/modflow/__init__.py b/flopy/mf6/modflow/__init__.py index c009179e2d..29502a06f4 100644 --- a/flopy/mf6/modflow/__init__.py +++ b/flopy/mf6/modflow/__init__.py @@ -1,7 +1,10 @@ # autogenerated file, do not modify -from .mfems import ModflowEms -from .mfgnc import ModflowGnc -from .mfgwe import ModflowGwe +from .mfgwegwe import ModflowGwegwe +from .mfgwfgwe import ModflowGwfgwe +from .mfgwfgwf import ModflowGwfgwf +from .mfgwfgwt import ModflowGwfgwt +from .mfgwfprt import ModflowGwfprt +from .mfgwtgwt import ModflowGwtgwt from .mfgweadv import ModflowGweadv from .mfgwecnd import ModflowGwecnd from .mfgwectp import ModflowGwectp @@ -11,17 +14,16 @@ from .mfgweesl import ModflowGweesl from .mfgweest import ModflowGweest from .mfgwefmi import ModflowGwefmi -from .mfgwegwe import ModflowGwegwe from .mfgweic import ModflowGweic from .mfgwelke import ModflowGwelke from .mfgwemve import ModflowGwemve from .mfgwemwe import ModflowGwemwe from .mfgwenam import ModflowGwenam +from .mfgwe import ModflowGwe from .mfgweoc import ModflowGweoc from .mfgwesfe import ModflowGwesfe from .mfgwessm import ModflowGwessm from .mfgweuze import ModflowGweuze -from .mfgwf import ModflowGwf from .mfgwfapi import ModflowGwfapi from .mfgwfbuy import ModflowGwfbuy from .mfgwfchd import ModflowGwfchd @@ -37,18 +39,17 @@ from .mfgwfghb import ModflowGwfghb from .mfgwfghbg import ModflowGwfghbg from .mfgwfgnc import ModflowGwfgnc -from .mfgwfgwe import ModflowGwfgwe -from .mfgwfgwf import ModflowGwfgwf -from .mfgwfgwt import ModflowGwfgwt +from .mfgnc import ModflowGnc from .mfgwfhfb import ModflowGwfhfb from .mfgwfic import ModflowGwfic from .mfgwflak import ModflowGwflak from .mfgwfmaw import ModflowGwfmaw from .mfgwfmvr import ModflowGwfmvr +from .mfmvr import ModflowMvr from .mfgwfnam import ModflowGwfnam +from .mfgwf import ModflowGwf from .mfgwfnpf import ModflowGwfnpf from .mfgwfoc import ModflowGwfoc -from .mfgwfprt import ModflowGwfprt from .mfgwfrch import ModflowGwfrch from .mfgwfrcha import ModflowGwfrcha from .mfgwfriv import ModflowGwfriv @@ -59,7 +60,6 @@ from .mfgwfvsc import ModflowGwfvsc from .mfgwfwel import ModflowGwfwel from .mfgwfwelg import ModflowGwfwelg -from .mfgwt import ModflowGwt from .mfgwtadv import ModflowGwtadv from .mfgwtapi import ModflowGwtapi from .mfgwtcnc import ModflowGwtcnc @@ -68,34 +68,34 @@ from .mfgwtdisv import ModflowGwtdisv from .mfgwtdsp import ModflowGwtdsp from .mfgwtfmi import ModflowGwtfmi -from .mfgwtgwt import ModflowGwtgwt from .mfgwtic import ModflowGwtic from .mfgwtist import ModflowGwtist from .mfgwtlkt import ModflowGwtlkt from .mfgwtmst import ModflowGwtmst from .mfgwtmvt import ModflowGwtmvt +from .mfmvt import ModflowMvt from .mfgwtmwt import ModflowGwtmwt from .mfgwtnam import ModflowGwtnam +from .mfgwt import ModflowGwt from .mfgwtoc import ModflowGwtoc from .mfgwtsft import ModflowGwtsft from .mfgwtsrc import ModflowGwtsrc from .mfgwtssm import ModflowGwtssm from .mfgwtuzt import ModflowGwtuzt -from .mfims import ModflowIms -from .mfmvr import ModflowMvr -from .mfmvt import ModflowMvt -from .mfnam import ModflowNam -from .mfprt import ModflowPrt from .mfprtdis import ModflowPrtdis from .mfprtdisv import ModflowPrtdisv from .mfprtfmi import ModflowPrtfmi from .mfprtmip import ModflowPrtmip from .mfprtnam import ModflowPrtnam +from .mfprt import ModflowPrt from .mfprtoc import ModflowPrtoc from .mfprtprp import ModflowPrtprp -from .mfpts import ModflowPts +from .mfnam import ModflowNam from .mfsimulation import MFSimulation from .mftdis import ModflowTdis +from .mfems import ModflowEms +from .mfims import ModflowIms +from .mfpts import ModflowPts from .mfutlats import ModflowUtlats from .mfutlhpc import ModflowUtlhpc from .mfutllaktab import ModflowUtllaktab diff --git a/flopy/mf6/modflow/mfems.py b/flopy/mf6/modflow/mfems.py index 0b65bedcb0..f0462bf905 100644 --- a/flopy/mf6/modflow/mfems.py +++ b/flopy/mf6/modflow/mfems.py @@ -19,7 +19,7 @@ class ModflowEms(MFPackage): loading_package : bool, default False Do not set this parameter. It is intended for debugging and internal processing purposes only. - + filename : str or PathLike, optional Name or path of file where this package is stored. pname : str, optional @@ -29,21 +29,16 @@ class ModflowEms(MFPackage): """ - package_abbr = "ems" - _package_type = "ems" - dfn_file_name = "sln-ems.dfn" - dfn = [["header", ["solution_package", "*"]]] - spec = { - "advanced": False, - "multi": False, - "name": "sln-ems", - "sln": {"abbr": "ems", "pattern": "*"}, - } + package_abbr = 'ems' + _package_type = 'ems' + dfn_file_name = 'sln-ems.dfn' + dfn = [['header', ['solution_package', '*']]] def __init__( self, simulation, loading_package=False, + filename=None, pname=None, **kwargs, @@ -58,4 +53,6 @@ def __init__( **kwargs, ) + self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgnc.py b/flopy/mf6/modflow/mfgnc.py index b7f1ade612..af148105dd 100644 --- a/flopy/mf6/modflow/mfgnc.py +++ b/flopy/mf6/modflow/mfgnc.py @@ -85,210 +85,11 @@ class ModflowGnc(MFPackage): """ - gncdata = ListTemplateGenerator(("gnc", "gncdata", "gncdata")) - package_abbr = "gnc" - _package_type = "gnc" - dfn_file_name = "gwf-gnc.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 explicit", - "type keyword", - "tagged true", - "reader urword", - "optional true", - ], - [ - "block dimensions", - "name numgnc", - "type integer", - "reader urword", - "optional false", - ], - [ - "block dimensions", - "name numalphaj", - "type integer", - "reader urword", - "optional false", - ], - [ - "block gncdata", - "name gncdata", - "type recarray cellidn cellidm cellidsj alphasj", - "shape (maxbound)", - "reader urword", - ], - [ - "block gncdata", - "name cellidn", - "type integer", - "shape", - "tagged false", - "in_record true", - "reader urword", - "numeric_index true", - ], - [ - "block gncdata", - "name cellidm", - "type integer", - "shape", - "tagged false", - "in_record true", - "reader urword", - "numeric_index true", - ], - [ - "block gncdata", - "name cellidsj", - "type integer", - "shape (numalphaj)", - "tagged false", - "in_record true", - "reader urword", - "numeric_index true", - ], - [ - "block gncdata", - "name alphasj", - "type double precision", - "shape (numalphaj)", - "tagged false", - "in_record true", - "reader urword", - ], - ] - spec = { - "advanced": False, - "dimensions": { - "numalphaj": { - "block": "dimensions", - "description": "is the number of contributing factors.", - "longname": "number of contributing factors", - "name": "numalphaj", - "optional": False, - "reader": "urword", - "type": "integer", - }, - "numgnc": { - "block": "dimensions", - "description": "is the number of gnc entries.", - "longname": "number of ghost node corrections", - "name": "numgnc", - "optional": False, - "reader": "urword", - "type": "integer", - }, - }, - "gncdata": { - "gncdata": { - "block": "gncdata", - "item": { - "block": "gncdata", - "fields": { - "alphasj": { - "block": "gncdata", - "description": "is the contributing factors for each contributing node in CELLIDSJ. Note that if the number of actual contributing cells is less than NUMALPHAJ for any ghost node, then dummy CELLIDS should be inserted with an associated contributing factor of zero. The sum of ALPHASJ should be less than one. This is because one minus the sum of ALPHASJ is equal to the alpha term (alpha n in equation 4-61 of the GWF Model report) that is multiplied by the head in cell n.", - "longname": "GNC contributing factors", - "name": "alphasj", - "reader": "urword", - "shape": "(numalphaj)", - "type": "double precision", - }, - "cellidm": { - "block": "gncdata", - "description": "is the cellid of the connecting cell, $m$, to which flow occurs from the ghost node. For a structured grid that uses the DIS input file, CELLIDM is the layer, row, and column numbers of the cell. For a grid that uses the DISV input file, CELLIDM is the layer number and CELL2D number for the two cells. If the model uses the unstructured discretization (DISU) input file, then CELLIDM is the node number for the cell.", - "longname": "GNC cellid n", - "name": "cellidm", - "numeric_index": "true", - "reader": "urword", - "type": "integer", - }, - "cellidn": { - "block": "gncdata", - "description": "is the cellid of the cell, $n$, in which the ghost node is located. For a structured grid that uses the DIS input file, CELLIDN is the layer, row, and column numbers of the cell. For a grid that uses the DISV input file, CELLIDN is the layer number and CELL2D number for the two cells. If the model uses the unstructured discretization (DISU) input file, then CELLIDN is the node number for the cell.", - "longname": "GNC cellid n", - "name": "cellidn", - "numeric_index": "true", - "reader": "urword", - "type": "integer", - }, - "cellidsj": { - "block": "gncdata", - "description": "is the array of CELLIDS for the contributing j cells, which contribute to the interpolated head value at the ghost node. This item contains one CELLID for each of the contributing cells of the ghost node. Note that if the number of actual contributing cells needed by the user is less than NUMALPHAJ for any ghost node, then a dummy CELLID of zero(s) should be inserted with an associated contributing factor of zero. For a structured grid that uses the DIS input file, CELLID is the layer, row, and column numbers of the cell. For a grid that uses the DISV input file, CELLID is the layer number and cell2d number for the two cells. If the model uses the unstructured discretization (DISU) input file, then CELLID is the node number for the cell.", - "longname": "GNC contributing cells", - "name": "cellidsj", - "numeric_index": "true", - "reader": "urword", - "shape": "(numalphaj)", - "type": "integer", - }, - }, - "name": "gncdata", - "reader": "urword", - "type": "record", - }, - "name": "gncdata", - "reader": "urword", - "shape": "(maxbound)", - "type": "recarray", - } - }, - "multi": False, - "name": "gwf-gnc", - "options": { - "explicit": { - "block": "options", - "description": "keyword to indicate that the ghost node correction is applied in an explicit manner on the right-hand side of the matrix. the explicit approach will likely require additional outer iterations. if the keyword is not specified, then the correction will be applied in an implicit manner on the left-hand side. the implicit approach will likely converge better, but may require additional memory. if the explicit keyword is not specified, then the bicgstab linear acceleration option should be specified within the linear block of the sparse matrix solver.", - "longname": "use explicit gnc formulation", - "name": "explicit", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "print_flows": { - "block": "options", - "description": "keyword to indicate that the list of gnc 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.", - "longname": "print simulated flows to listing file", - "name": "print_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "print_input": { - "block": "options", - "description": "keyword to indicate that the list of gnc information will be written to the listing file immediately after it is read.", - "longname": "print input to listing file", - "name": "print_input", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - }, - "ref": { - "abbr": "gnc", - "key": "gnc_filerecord", - "param": "gncdata", - "parent": "parent_model_or_package", - "val": "gncdata", - }, - } + gncdata = ListTemplateGenerator(('gnc', 'gncdata', 'gncdata')) + package_abbr = 'gnc' + _package_type = 'gnc' + dfn_file_name = 'gwf-gnc.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 explicit', 'type keyword', 'tagged true', 'reader urword', 'optional true'], ['block dimensions', 'name numgnc', 'type integer', 'reader urword', 'optional false'], ['block dimensions', 'name numalphaj', 'type integer', 'reader urword', 'optional false'], ['block gncdata', 'name gncdata', 'type recarray cellidn cellidm cellidsj alphasj', 'shape (maxbound)', 'reader urword'], ['block gncdata', 'name cellidn', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block gncdata', 'name cellidm', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block gncdata', 'name cellidsj', 'type integer', 'shape (numalphaj)', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block gncdata', 'name alphasj', 'type double precision', 'shape (numalphaj)', 'tagged false', 'in_record true', 'reader urword']] def __init__( self, @@ -300,6 +101,7 @@ def __init__( numgnc=None, numalphaj=None, gncdata=None, + filename=None, pname=None, **kwargs, @@ -314,21 +116,19 @@ def __init__( **kwargs, ) - self.print_input = self.build_mfdata("print_input", print_input) - self.print_flows = self.build_mfdata("print_flows", print_flows) - self.explicit = self.build_mfdata("explicit", explicit) - self.numgnc = self.build_mfdata("numgnc", numgnc) - self.numalphaj = self.build_mfdata("numalphaj", numalphaj) - self.gncdata = self.build_mfdata("gncdata", gncdata) + self.print_input = self.build_mfdata('print_input', print_input) + self.print_flows = self.build_mfdata('print_flows', print_flows) + self.explicit = self.build_mfdata('explicit', explicit) + self.numgnc = self.build_mfdata('numgnc', numgnc) + self.numalphaj = self.build_mfdata('numalphaj', numalphaj) + self.gncdata = self.build_mfdata('gncdata', gncdata) self._init_complete = True - class GncPackages(MFChildPackages): """ GncPackages is a container class for the ModflowGnc class. """ - package_abbr = "gncpackages" def initialize( @@ -339,6 +139,7 @@ def initialize( numgnc=None, numalphaj=None, gncdata=None, + filename=None, pname=None, ): @@ -370,6 +171,7 @@ def append_package( numgnc=None, numalphaj=None, gncdata=None, + filename=None, pname=None, ): diff --git a/flopy/mf6/modflow/mfgwe.py b/flopy/mf6/modflow/mfgwe.py index f024d9e61d..d7a2520769 100644 --- a/flopy/mf6/modflow/mfgwe.py +++ b/flopy/mf6/modflow/mfgwe.py @@ -94,6 +94,7 @@ def __init__( nc_mesh2d_filerecord=None, nc_structured_filerecord=None, nc_filerecord=None, + **kwargs, ): """Initialize ModflowGwe.""" diff --git a/flopy/mf6/modflow/mfgweadv.py b/flopy/mf6/modflow/mfgweadv.py index d375483fcd..b4c9976388 100644 --- a/flopy/mf6/modflow/mfgweadv.py +++ b/flopy/mf6/modflow/mfgweadv.py @@ -44,53 +44,10 @@ class ModflowGweadv(MFPackage): """ - package_abbr = "gweadv" - _package_type = "adv" - dfn_file_name = "gwe-adv.dfn" - dfn = [ - ["header"], - [ - "block options", - "name scheme", - "type string", - "valid central upstream tvd", - "reader urword", - "optional true", - ], - [ - "block options", - "name ats_percel", - "type double precision", - "reader urword", - "optional true", - ], - ] - spec = { - "advanced": False, - "multi": False, - "name": "gwe-adv", - "options": { - "ats_percel": { - "block": "options", - "description": "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 active, a time step calculation will be made for each cell based on flow through the cell and cell properties. the largest time step will be calculated such that the advective fractional cell distance (ats_percel) is not exceeded for any active cell in the grid. this time-step constraint will be submitted to the ats package, perhaps with constraints submitted by other packages, in the calculation of the time step. ats_percel must be greater than zero. if a value of zero is specified for ats_percel the program will automatically reset it to an internal no data value to indicate that time steps should not be subject to this constraint.", - "longname": "fractional cell distance used for time step calculation", - "name": "ats_percel", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - "scheme": { - "block": "options", - "description": "scheme used to solve the advection term. can be upstream, central, or tvd. if not specified, upstream weighting is the default weighting scheme.", - "longname": "advective scheme", - "name": "scheme", - "optional": True, - "reader": "urword", - "type": "string", - "valid": "central upstream tvd", - }, - }, - } + package_abbr = 'gweadv' + _package_type = 'adv' + dfn_file_name = 'gwe-adv.dfn' + dfn = [['header'], ['block options', 'name scheme', 'type string', 'valid central upstream tvd', 'reader urword', 'optional true'], ['block options', 'name ats_percel', 'type double precision', 'reader urword', 'optional true']] def __init__( self, @@ -98,6 +55,7 @@ def __init__( loading_package=False, scheme=None, ats_percel=None, + filename=None, pname=None, **kwargs, @@ -112,7 +70,8 @@ def __init__( **kwargs, ) - self.scheme = self.build_mfdata("scheme", scheme) - self.ats_percel = self.build_mfdata("ats_percel", ats_percel) + self.scheme = self.build_mfdata('scheme', scheme) + self.ats_percel = self.build_mfdata('ats_percel', ats_percel) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwecnd.py b/flopy/mf6/modflow/mfgwecnd.py index 87e1b63be4..7232d53165 100644 --- a/flopy/mf6/modflow/mfgwecnd.py +++ b/flopy/mf6/modflow/mfgwecnd.py @@ -88,254 +88,17 @@ class ModflowGwecnd(MFPackage): """ - alh = ArrayTemplateGenerator(("gwe6", "cnd", "griddata", "alh")) - alv = ArrayTemplateGenerator(("gwe6", "cnd", "griddata", "alv")) - ath1 = ArrayTemplateGenerator(("gwe6", "cnd", "griddata", "ath1")) - ath2 = ArrayTemplateGenerator(("gwe6", "cnd", "griddata", "ath2")) - atv = ArrayTemplateGenerator(("gwe6", "cnd", "griddata", "atv")) - ktw = ArrayTemplateGenerator(("gwe6", "cnd", "griddata", "ktw")) - kts = ArrayTemplateGenerator(("gwe6", "cnd", "griddata", "kts")) - package_abbr = "gwecnd" - _package_type = "cnd" - dfn_file_name = "gwe-cnd.dfn" - dfn = [ - ["header"], - [ - "block options", - "name xt3d_off", - "type keyword", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name xt3d_rhs", - "type keyword", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name export_array_ascii", - "type keyword", - "reader urword", - "optional true", - "mf6internal export_ascii", - ], - [ - "block options", - "name export_array_netcdf", - "type keyword", - "reader urword", - "optional true", - "mf6internal export_nc", - "extended true", - ], - [ - "block griddata", - "name alh", - "type double precision", - "shape (nodes)", - "reader readarray", - "layered true", - "netcdf true", - "optional true", - ], - [ - "block griddata", - "name alv", - "type double precision", - "shape (nodes)", - "reader readarray", - "layered true", - "netcdf true", - "optional true", - ], - [ - "block griddata", - "name ath1", - "type double precision", - "shape (nodes)", - "reader readarray", - "layered true", - "netcdf true", - "optional true", - ], - [ - "block griddata", - "name ath2", - "type double precision", - "shape (nodes)", - "reader readarray", - "layered true", - "netcdf true", - "optional true", - ], - [ - "block griddata", - "name atv", - "type double precision", - "shape (nodes)", - "reader readarray", - "layered true", - "netcdf true", - "optional true", - ], - [ - "block griddata", - "name ktw", - "type double precision", - "shape (nodes)", - "reader readarray", - "layered true", - "netcdf true", - "optional true", - ], - [ - "block griddata", - "name kts", - "type double precision", - "shape (nodes)", - "reader readarray", - "layered true", - "netcdf true", - "optional true", - ], - ] - spec = { - "advanced": False, - "griddata": { - "alh": { - "block": "griddata", - "description": "longitudinal dispersivity in horizontal direction. if flow is strictly horizontal, then this is the longitudinal dispersivity that will be used. if flow is not strictly horizontal or strictly vertical, then the longitudinal dispersivity is a function of both alh and alv. if mechanical dispersion is represented (by specifying any dispersivity values) then this array is required.", - "layered": True, - "longname": "longitudinal dispersivity in horizontal direction", - "name": "alh", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "alv": { - "block": "griddata", - "description": "longitudinal dispersivity in vertical direction. if flow is strictly vertical, then this is the longitudinal dispsersivity value that will be used. if flow is not strictly horizontal or strictly vertical, then the longitudinal dispersivity is a function of both alh and alv. if this value is not specified and mechanical dispersion is represented, then this array is set equal to alh.", - "layered": True, - "longname": "longitudinal dispersivity in vertical direction", - "name": "alv", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "ath1": { - "block": "griddata", - "description": "transverse dispersivity in horizontal direction. this is the transverse dispersivity value for the second ellipsoid axis. if flow is strictly horizontal and directed in the x direction (along a row for a regular grid), then this value controls spreading in the y direction. if mechanical dispersion is represented (by specifying any dispersivity values) then this array is required.", - "layered": True, - "longname": "transverse dispersivity in horizontal direction", - "name": "ath1", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "ath2": { - "block": "griddata", - "description": "transverse dispersivity in horizontal direction. this is the transverse dispersivity value for the third ellipsoid axis. if flow is strictly horizontal and directed in the x direction (along a row for a regular grid), then this value controls spreading in the z direction. if this value is not specified and mechanical dispersion is represented, then this array is set equal to ath1.", - "layered": True, - "longname": "transverse dispersivity in horizontal direction", - "name": "ath2", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "atv": { - "block": "griddata", - "description": "transverse dispersivity when flow is in vertical direction. if flow is strictly vertical and directed in the z direction, then this value controls spreading in the x and y directions. if this value is not specified and mechanical dispersion is represented, then this array is set equal to ath2.", - "layered": True, - "longname": "transverse dispersivity when flow is in vertical direction", - "name": "atv", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "kts": { - "block": "griddata", - "description": "thermal conductivity of the solid aquifer material", - "layered": True, - "longname": "thermal conductivity of the aquifer material", - "name": "kts", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "ktw": { - "block": "griddata", - "description": "thermal conductivity of the simulated fluid. note that the cnd package does not account for the tortuosity of the flow paths when solving for the conductive spread of heat. if tortuosity plays an important role in the thermal conductivity calculation, its effect should be reflected in the value specified for ktw.", - "layered": True, - "longname": "thermal conductivity of the simulated fluid", - "name": "ktw", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - }, - "multi": False, - "name": "gwe-cnd", - "options": { - "export_array_ascii": { - "block": "options", - "description": "keyword that specifies input griddata arrays should be written to layered ascii output files.", - "longname": "export array variables to layered ascii files.", - "mf6internal": "export_ascii", - "name": "export_array_ascii", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "export_array_netcdf": { - "block": "options", - "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", - "extended": True, - "longname": "export array variables to netcdf output files.", - "mf6internal": "export_nc", - "name": "export_array_netcdf", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "xt3d_off": { - "block": "options", - "description": "deactivate the xt3d method and use the faster and less accurate approximation. this option may provide a fast and accurate solution under some circumstances, such as when flow aligns with the model grid, there is no mechanical dispersion, or when the longitudinal and transverse dispersivities are equal. this option may also be used to assess the computational demand of the xt3d approach by noting the run time differences with and without this option on.", - "longname": "deactivate xt3d", - "name": "xt3d_off", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "xt3d_rhs": { - "block": "options", - "description": "add xt3d terms to right-hand side, when possible. this option uses less memory, but may require more iterations.", - "longname": "xt3d on right-hand side", - "name": "xt3d_rhs", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - }, - } + alh = ArrayTemplateGenerator(('gwe6', 'cnd', 'griddata', 'alh')) + alv = ArrayTemplateGenerator(('gwe6', 'cnd', 'griddata', 'alv')) + ath1 = ArrayTemplateGenerator(('gwe6', 'cnd', 'griddata', 'ath1')) + ath2 = ArrayTemplateGenerator(('gwe6', 'cnd', 'griddata', 'ath2')) + atv = ArrayTemplateGenerator(('gwe6', 'cnd', 'griddata', 'atv')) + ktw = ArrayTemplateGenerator(('gwe6', 'cnd', 'griddata', 'ktw')) + kts = ArrayTemplateGenerator(('gwe6', 'cnd', 'griddata', 'kts')) + package_abbr = 'gwecnd' + _package_type = 'cnd' + dfn_file_name = 'gwe-cnd.dfn' + dfn = [['header'], ['block options', 'name xt3d_off', 'type keyword', 'shape', 'reader urword', 'optional true'], ['block options', 'name xt3d_rhs', 'type keyword', 'shape', 'reader urword', 'optional true'], ['block options', 'name export_array_ascii', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_ascii'], ['block options', 'name export_array_netcdf', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_nc', 'extended true'], ['block griddata', 'name alh', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true', 'optional true'], ['block griddata', 'name alv', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true', 'optional true'], ['block griddata', 'name ath1', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true', 'optional true'], ['block griddata', 'name ath2', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true', 'optional true'], ['block griddata', 'name atv', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true', 'optional true'], ['block griddata', 'name ktw', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true', 'optional true'], ['block griddata', 'name kts', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true', 'optional true']] def __init__( self, @@ -352,6 +115,7 @@ def __init__( atv=None, ktw=None, kts=None, + filename=None, pname=None, **kwargs, @@ -366,20 +130,17 @@ def __init__( **kwargs, ) - self.xt3d_off = self.build_mfdata("xt3d_off", xt3d_off) - self.xt3d_rhs = self.build_mfdata("xt3d_rhs", xt3d_rhs) - self.export_array_ascii = self.build_mfdata( - "export_array_ascii", export_array_ascii - ) - self.export_array_netcdf = self.build_mfdata( - "export_array_netcdf", export_array_netcdf - ) - self.alh = self.build_mfdata("alh", alh) - self.alv = self.build_mfdata("alv", alv) - self.ath1 = self.build_mfdata("ath1", ath1) - self.ath2 = self.build_mfdata("ath2", ath2) - self.atv = self.build_mfdata("atv", atv) - self.ktw = self.build_mfdata("ktw", ktw) - self.kts = self.build_mfdata("kts", kts) + self.xt3d_off = self.build_mfdata('xt3d_off', xt3d_off) + self.xt3d_rhs = self.build_mfdata('xt3d_rhs', xt3d_rhs) + self.export_array_ascii = self.build_mfdata('export_array_ascii', export_array_ascii) + self.export_array_netcdf = self.build_mfdata('export_array_netcdf', export_array_netcdf) + self.alh = self.build_mfdata('alh', alh) + self.alv = self.build_mfdata('alv', alv) + self.ath1 = self.build_mfdata('ath1', ath1) + self.ath2 = self.build_mfdata('ath2', ath2) + self.atv = self.build_mfdata('atv', atv) + self.ktw = self.build_mfdata('ktw', ktw) + self.kts = self.build_mfdata('kts', kts) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwectp.py b/flopy/mf6/modflow/mfgwectp.py index b987e8a5fc..9704b51987 100644 --- a/flopy/mf6/modflow/mfgwectp.py +++ b/flopy/mf6/modflow/mfgwectp.py @@ -95,392 +95,14 @@ class ModflowGwectp(MFPackage): """ - auxiliary = ArrayTemplateGenerator(("gwe6", "ctp", "options", "auxiliary")) - ts_filerecord = ListTemplateGenerator(("gwe6", "ctp", "options", "ts_filerecord")) - obs_filerecord = ListTemplateGenerator(("gwe6", "ctp", "options", "obs_filerecord")) - stress_period_data = ListTemplateGenerator( - ("gwe6", "ctp", "period", "stress_period_data") - ) - package_abbr = "gwectp" - _package_type = "ctp" - dfn_file_name = "gwe-ctp.dfn" - dfn = [ - ["header", "multi-package"], - [ - "block options", - "name auxiliary", - "type string", - "shape (naux)", - "reader urword", - "optional true", - ], - [ - "block options", - "name auxmultname", - "type string", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name boundnames", - "type keyword", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name print_input", - "type keyword", - "reader urword", - "optional true", - "mf6internal iprflow", - ], - [ - "block options", - "name print_flows", - "type keyword", - "reader urword", - "optional true", - "mf6internal ipakcb", - ], - [ - "block options", - "name save_flows", - "type keyword", - "reader urword", - "optional true", - "mf6internal iprpak", - ], - [ - "block options", - "name ts_filerecord", - "type record ts6 filein ts6_filename", - "shape", - "reader urword", - "tagged true", - "optional true", - "construct_package ts", - "construct_data timeseries", - "parameter_name timeseries", - ], - [ - "block options", - "name ts6", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name filein", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name ts6_filename", - "type string", - "preserve_case true", - "in_record true", - "reader urword", - "optional false", - "tagged false", - ], - [ - "block options", - "name obs_filerecord", - "type record obs6 filein obs6_filename", - "shape", - "reader urword", - "tagged true", - "optional true", - "construct_package obs", - "construct_data observations", - "parameter_name continuous", - ], - [ - "block options", - "name obs6", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name obs6_filename", - "type string", - "preserve_case true", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block dimensions", - "name maxbound", - "type integer", - "reader urword", - "optional false", - ], - [ - "block period", - "name iper", - "type integer", - "block_variable true", - "in_record true", - "tagged false", - "shape", - "valid", - "reader urword", - "optional false", - ], - [ - "block period", - "name stress_period_data", - "type recarray cellid temp aux boundname", - "shape (maxbound)", - "reader urword", - "mf6internal spd", - ], - [ - "block period", - "name cellid", - "type integer", - "shape (ncelldim)", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block period", - "name temp", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - "time_series true", - "mf6internal tspvar", - ], - [ - "block period", - "name aux", - "type double precision", - "in_record true", - "tagged false", - "shape (naux)", - "reader urword", - "optional true", - "time_series true", - "mf6internal auxvar", - ], - [ - "block period", - "name boundname", - "type string", - "shape", - "tagged false", - "in_record true", - "reader urword", - "optional true", - ], - ] - spec = { - "advanced": False, - "dimensions": { - "maxbound": { - "block": "dimensions", - "description": "integer value specifying the maximum number of constant temperature cells that will be specified for use during any stress period.", - "longname": "maximum number of constant temperatures", - "name": "maxbound", - "optional": False, - "reader": "urword", - "type": "integer", - } - }, - "fkeys": { - "obs_filerecord": { - "abbr": "obs", - "key": "obs_filerecord", - "param": "continuous", - "parent": "parent_model_or_package", - "val": "observations", - }, - "ts_filerecord": { - "abbr": "ts", - "description": "xxx", - "key": "ts_filerecord", - "param": "timeseries", - "parent": "parent_package", - "val": "timeseries", - }, - }, - "multi": True, - "name": "gwe-ctp", - "options": { - "auxiliary": { - "block": "options", - "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", - "longname": "keyword to specify aux variables", - "name": "auxiliary", - "optional": True, - "reader": "urword", - "shape": "(naux)", - "type": "string", - }, - "auxmultname": { - "block": "options", - "description": "name of auxiliary variable to be used as multiplier of temperature value.", - "longname": "name of auxiliary variable for multiplier", - "name": "auxmultname", - "optional": True, - "reader": "urword", - "type": "string", - }, - "boundnames": { - "block": "options", - "description": "keyword to indicate that boundary names may be provided with the list of constant temperature cells.", - "name": "boundnames", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "observations": { - "block": "options", - "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", - "name": "observations", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "obs", - "key": "obs_filerecord", - "param": "continuous", - "parent": "parent_model_or_package", - "val": "observations", - }, - "type": "record obs6 filein obs6_filename", - }, - "print_flows": { - "block": "options", - "description": "keyword to indicate that the list of constant temperature 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.", - "longname": "print calculated flows to listing file", - "mf6internal": "ipakcb", - "name": "print_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "print_input": { - "block": "options", - "description": "keyword to indicate that the list of constant temperature information will be written to the listing file immediately after it is read.", - "longname": "print input to listing file", - "mf6internal": "iprflow", - "name": "print_input", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "save_flows": { - "block": "options", - "description": "keyword to indicate that constant temperature flow terms will be written to the file specified with 'budget fileout' in output control.", - "longname": "save constant temperature flows to budget file", - "mf6internal": "iprpak", - "name": "save_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "timeseries": { - "block": "options", - "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", - "name": "timeseries", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "ts", - "description": "xxx", - "key": "ts_filerecord", - "param": "timeseries", - "parent": "parent_package", - "val": "timeseries", - }, - "type": "record ts6 filein ts6_filename", - }, - }, - "period": { - "stress_period_data": { - "block": "period", - "item": { - "block": "period", - "fields": { - "aux": { - "block": "period", - "description": "represents the values of the auxiliary variables for each constant temperature. The values of auxiliary variables must be present for each constant temperature. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "auxiliary variables", - "mf6internal": "auxvar", - "name": "aux", - "optional": "true", - "reader": "urword", - "shape": "(naux)", - "time_series": "true", - "type": "double precision", - }, - "boundname": { - "block": "period", - "description": "name of the constant temperature cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", - "longname": "constant temperature name", - "name": "boundname", - "optional": "true", - "reader": "urword", - "type": "string", - }, - "cellid": { - "block": "period", - "description": "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 layer, row, and column. For a grid that uses the DISV input file, CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file, CELLID is the node number for the cell.", - "longname": "cell identifier", - "name": "cellid", - "reader": "urword", - "shape": "(ncelldim)", - "type": "integer", - }, - "temp": { - "block": "period", - "description": "is the constant temperature value. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "constant temperature value", - "mf6internal": "tspvar", - "name": "temp", - "reader": "urword", - "time_series": "true", - "type": "double precision", - }, - }, - "mf6internal": "spd", - "name": "stress_period_data", - "reader": "urword", - "type": "record", - }, - "mf6internal": "spd", - "name": "stress_period_data", - "reader": "urword", - "shape": "(maxbound)", - "type": "recarray", - }, - "transient_block": True, - }, - } + auxiliary = ArrayTemplateGenerator(('gwe6', 'ctp', 'options', 'auxiliary')) + ts_filerecord = ListTemplateGenerator(('gwe6', 'ctp', 'options', 'ts_filerecord')) + obs_filerecord = ListTemplateGenerator(('gwe6', 'ctp', 'options', 'obs_filerecord')) + stress_period_data = ListTemplateGenerator(('gwe6', 'ctp', 'period', 'stress_period_data')) + package_abbr = 'gwectp' + _package_type = 'ctp' + dfn_file_name = 'gwe-ctp.dfn' + dfn = [['header', 'multi-package'], ['block options', 'name auxiliary', 'type string', 'shape (naux)', 'reader urword', 'optional true'], ['block options', 'name auxmultname', 'type string', 'shape', 'reader urword', 'optional true'], ['block options', 'name boundnames', 'type keyword', 'shape', 'reader urword', 'optional true'], ['block options', 'name print_input', 'type keyword', 'reader urword', 'optional true', 'mf6internal iprflow'], ['block options', 'name print_flows', 'type keyword', 'reader urword', 'optional true', 'mf6internal ipakcb'], ['block options', 'name save_flows', 'type keyword', 'reader urword', 'optional true', 'mf6internal iprpak'], ['block options', 'name ts_filerecord', 'type record ts6 filein ts6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package ts', 'construct_data timeseries', 'parameter_name timeseries'], ['block options', 'name ts6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name filein', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name ts6_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false'], ['block options', 'name obs_filerecord', 'type record obs6 filein obs6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package obs', 'construct_data observations', 'parameter_name continuous'], ['block options', 'name obs6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name obs6_filename', 'type string', 'preserve_case true', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block dimensions', 'name maxbound', 'type integer', 'reader urword', 'optional false'], ['block period', 'name iper', 'type integer', 'block_variable true', 'in_record true', 'tagged false', 'shape', 'valid', 'reader urword', 'optional false'], ['block period', 'name stress_period_data', 'type recarray cellid temp aux boundname', 'shape (maxbound)', 'reader urword', 'mf6internal spd'], ['block period', 'name cellid', 'type integer', 'shape (ncelldim)', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name temp', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword', 'time_series true', 'mf6internal tspvar'], ['block period', 'name aux', 'type double precision', 'in_record true', 'tagged false', 'shape (naux)', 'reader urword', 'optional true', 'time_series true', 'mf6internal auxvar'], ['block period', 'name boundname', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword', 'optional true']] def __init__( self, @@ -496,6 +118,7 @@ def __init__( observations=None, maxbound=None, stress_period_data=None, + filename=None, pname=None, **kwargs, @@ -510,23 +133,18 @@ def __init__( **kwargs, ) - self.auxiliary = self.build_mfdata("auxiliary", auxiliary) - self.auxmultname = self.build_mfdata("auxmultname", auxmultname) - self.boundnames = self.build_mfdata("boundnames", boundnames) - self.print_input = self.build_mfdata("print_input", print_input) - self.print_flows = self.build_mfdata("print_flows", print_flows) - self.save_flows = self.build_mfdata("save_flows", save_flows) - self._ts_filerecord = self.build_mfdata("ts_filerecord", None) - self._ts_package = self.build_child_package( - "ts", timeseries, "timeseries", self._ts_filerecord - ) - self._obs_filerecord = self.build_mfdata("obs_filerecord", None) - self._obs_package = self.build_child_package( - "obs", observations, "continuous", self._obs_filerecord - ) - self.maxbound = self.build_mfdata("maxbound", maxbound) - self.stress_period_data = self.build_mfdata( - "stress_period_data", stress_period_data - ) + self.auxiliary = self.build_mfdata('auxiliary', auxiliary) + self.auxmultname = self.build_mfdata('auxmultname', auxmultname) + self.boundnames = self.build_mfdata('boundnames', boundnames) + self.print_input = self.build_mfdata('print_input', print_input) + self.print_flows = self.build_mfdata('print_flows', print_flows) + self.save_flows = self.build_mfdata('save_flows', save_flows) + self._ts_filerecord = self.build_mfdata('ts_filerecord', None) + self._ts_package = self.build_child_package('ts', timeseries, 'timeseries', self._ts_filerecord) + self._obs_filerecord = self.build_mfdata('obs_filerecord', None) + self._obs_package = self.build_child_package('obs', observations, 'continuous', self._obs_filerecord) + self.maxbound = self.build_mfdata('maxbound', maxbound) + self.stress_period_data = self.build_mfdata('stress_period_data', stress_period_data) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwedis.py b/flopy/mf6/modflow/mfgwedis.py index 586c11e908..40a507ae07 100644 --- a/flopy/mf6/modflow/mfgwedis.py +++ b/flopy/mf6/modflow/mfgwedis.py @@ -94,446 +94,17 @@ class ModflowGwedis(MFPackage): """ - grb_filerecord = ListTemplateGenerator(("gwe6", "dis", "options", "grb_filerecord")) - ncf_filerecord = ListTemplateGenerator(("gwe6", "dis", "options", "ncf_filerecord")) - delr = ArrayTemplateGenerator(("gwe6", "dis", "griddata", "delr")) - delc = ArrayTemplateGenerator(("gwe6", "dis", "griddata", "delc")) - top = ArrayTemplateGenerator(("gwe6", "dis", "griddata", "top")) - botm = ArrayTemplateGenerator(("gwe6", "dis", "griddata", "botm")) - idomain = ArrayTemplateGenerator(("gwe6", "dis", "griddata", "idomain")) - package_abbr = "gwedis" - _package_type = "dis" - dfn_file_name = "gwe-dis.dfn" - dfn = [ - ["header"], - [ - "block options", - "name length_units", - "type string", - "reader urword", - "optional true", - ], - [ - "block options", - "name nogrb", - "type keyword", - "reader urword", - "optional true", - ], - [ - "block options", - "name grb_filerecord", - "type record grb6 fileout grb6_filename", - "reader urword", - "tagged true", - "optional true", - ], - [ - "block options", - "name grb6", - "type keyword", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name fileout", - "type keyword", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name grb6_filename", - "type string", - "preserve_case true", - "in_record true", - "reader urword", - "optional false", - "tagged false", - ], - [ - "block options", - "name xorigin", - "type double precision", - "reader urword", - "optional true", - ], - [ - "block options", - "name yorigin", - "type double precision", - "reader urword", - "optional true", - ], - [ - "block options", - "name angrot", - "type double precision", - "reader urword", - "optional true", - ], - [ - "block options", - "name export_array_ascii", - "type keyword", - "reader urword", - "optional true", - "mf6internal export_ascii", - ], - [ - "block options", - "name export_array_netcdf", - "type keyword", - "reader urword", - "optional true", - "mf6internal export_nc", - "extended true", - ], - [ - "block options", - "name crs", - "type string", - "shape lenbigline", - "preserve_case true", - "reader urword", - "optional true", - "developmode true", - ], - [ - "block options", - "name ncf_filerecord", - "type record ncf6 filein ncf6_filename", - "reader urword", - "tagged true", - "optional true", - "construct_package ncf", - "construct_data packagedata", - "parameter_name packagedata", - ], - [ - "block options", - "name ncf6", - "type keyword", - "in_record true", - "reader urword", - "tagged true", - "optional false", - "extended true", - ], - [ - "block options", - "name filein", - "type keyword", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name ncf6_filename", - "type string", - "preserve_case true", - "in_record true", - "reader urword", - "optional false", - "tagged false", - "extended true", - ], - [ - "block dimensions", - "name nlay", - "type integer", - "reader urword", - "optional false", - "default 1", - ], - [ - "block dimensions", - "name nrow", - "type integer", - "reader urword", - "optional false", - "default 2", - ], - [ - "block dimensions", - "name ncol", - "type integer", - "reader urword", - "optional false", - "default 2", - ], - [ - "block griddata", - "name delr", - "type double precision", - "shape (ncol)", - "reader readarray", - "netcdf true", - "default 1.0", - ], - [ - "block griddata", - "name delc", - "type double precision", - "shape (nrow)", - "reader readarray", - "netcdf true", - "default 1.0", - ], - [ - "block griddata", - "name top", - "type double precision", - "shape (ncol, nrow)", - "reader readarray", - "netcdf true", - "default 1.0", - ], - [ - "block griddata", - "name botm", - "type double precision", - "shape (ncol, nrow, nlay)", - "reader readarray", - "layered true", - "netcdf true", - "default 0.", - ], - [ - "block griddata", - "name idomain", - "type integer", - "shape (ncol, nrow, nlay)", - "reader readarray", - "layered true", - "netcdf true", - "optional true", - ], - ] - spec = { - "advanced": False, - "dimensions": { - "ncol": { - "block": "dimensions", - "default": 2, - "description": "is the number of columns in the model grid.", - "longname": "number of columns", - "name": "ncol", - "optional": False, - "reader": "urword", - "type": "integer", - }, - "nlay": { - "block": "dimensions", - "default": 1, - "description": "is the number of layers in the model grid.", - "longname": "number of layers", - "name": "nlay", - "optional": False, - "reader": "urword", - "type": "integer", - }, - "nrow": { - "block": "dimensions", - "default": 2, - "description": "is the number of rows in the model grid.", - "longname": "number of rows", - "name": "nrow", - "optional": False, - "reader": "urword", - "type": "integer", - }, - }, - "fkeys": { - "ncf_filerecord": { - "abbr": "ncf", - "key": "ncf_filerecord", - "param": "packagedata", - "parent": "parent_package", - "val": "packagedata", - } - }, - "griddata": { - "botm": { - "block": "griddata", - "default": 0.0, - "description": "is the bottom elevation for each cell.", - "layered": True, - "longname": "cell bottom elevation", - "name": "botm", - "netcdf": True, - "reader": "readarray", - "shape": "(ncol, nrow, nlay)", - "type": "double precision", - }, - "delc": { - "block": "griddata", - "default": 1.0, - "description": "is the row spacing in the column direction.", - "longname": "spacing along a column", - "name": "delc", - "netcdf": True, - "reader": "readarray", - "shape": "(nrow)", - "type": "double precision", - }, - "delr": { - "block": "griddata", - "default": 1.0, - "description": "is the column spacing in the row direction.", - "longname": "spacing along a row", - "name": "delr", - "netcdf": True, - "reader": "readarray", - "shape": "(ncol)", - "type": "double precision", - }, - "idomain": { - "block": "griddata", - "description": "is an optional array that characterizes the existence status of a cell. if the idomain array is not specified, then all model cells exist within the solution. if the idomain value for a cell is 0, the cell does not exist in the simulation. input and output values will be read and written for the cell, but internal to the program, the cell is excluded from the solution. if the idomain value for a cell is 1, the cell exists in the simulation. if the idomain value for a cell is -1, the cell does not exist in the simulation. furthermore, the first existing cell above will be connected to the first existing cell below. this type of cell is referred to as a 'vertical pass through' cell.", - "layered": True, - "longname": "idomain existence array", - "name": "idomain", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(ncol, nrow, nlay)", - "type": "integer", - }, - "top": { - "block": "griddata", - "default": 1.0, - "description": "is the top elevation for each cell in the top model layer.", - "longname": "cell top elevation", - "name": "top", - "netcdf": True, - "reader": "readarray", - "shape": "(ncol, nrow)", - "type": "double precision", - }, - }, - "multi": False, - "name": "gwe-dis", - "options": { - "angrot": { - "block": "options", - "description": "counter-clockwise rotation angle (in degrees) of the lower-left corner of the model grid. if not specified, then a default value of 0.0 is assigned. the value for angrot does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", - "longname": "rotation angle", - "name": "angrot", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - "crs": { - "block": "options", - "description": "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.", - "developmode": True, - "longname": "crs user input string", - "name": "crs", - "optional": True, - "reader": "urword", - "shape": "lenbigline", - "type": "string", - }, - "export_array_ascii": { - "block": "options", - "description": "keyword that specifies input griddata arrays should be written to layered ascii output files.", - "longname": "export array variables to layered ascii files.", - "mf6internal": "export_ascii", - "name": "export_array_ascii", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "export_array_netcdf": { - "block": "options", - "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", - "extended": True, - "longname": "export array variables to netcdf output files.", - "mf6internal": "export_nc", - "name": "export_array_netcdf", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "grb_filerecord": { - "block": "options", - "fields": { - "grb6_filename": { - "block": "options", - "description": "defines a binary grid output file. If this option is not provided, the output file will have the same name as the discretization input file, plus extension '.grb'.", - "longname": "file name of GRB information", - "name": "grb6_filename", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "grb_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "length_units": { - "block": "options", - "description": "is the length units used for this model. values can be 'feet', 'meters', or 'centimeters'. if not specified, the default is 'unknown'.", - "longname": "model length units", - "name": "length_units", - "optional": True, - "reader": "urword", - "type": "string", - }, - "nogrb": { - "block": "options", - "description": "keyword to deactivate writing of the binary grid file.", - "longname": "do not write binary grid file", - "name": "nogrb", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "packagedata": { - "block": "options", - "description": "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 the packagedata variable is also acceptable. See ncf package documentation for more information.", - "name": "packagedata", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "ncf", - "key": "ncf_filerecord", - "param": "packagedata", - "parent": "parent_package", - "val": "packagedata", - }, - "type": "record ncf6 filein ncf6_filename", - }, - "xorigin": { - "block": "options", - "description": "x-position of the lower-left corner of the model grid. a default value of zero is assigned if not specified. the value for xorigin does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", - "longname": "x-position of the model grid origin", - "name": "xorigin", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - "yorigin": { - "block": "options", - "description": "y-position of the lower-left corner of the model grid. if not specified, then a default value equal to zero is used. the value for yorigin does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", - "longname": "y-position of the model grid origin", - "name": "yorigin", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - }, - } + grb_filerecord = ListTemplateGenerator(('gwe6', 'dis', 'options', 'grb_filerecord')) + ncf_filerecord = ListTemplateGenerator(('gwe6', 'dis', 'options', 'ncf_filerecord')) + delr = ArrayTemplateGenerator(('gwe6', 'dis', 'griddata', 'delr')) + delc = ArrayTemplateGenerator(('gwe6', 'dis', 'griddata', 'delc')) + top = ArrayTemplateGenerator(('gwe6', 'dis', 'griddata', 'top')) + botm = ArrayTemplateGenerator(('gwe6', 'dis', 'griddata', 'botm')) + idomain = ArrayTemplateGenerator(('gwe6', 'dis', 'griddata', 'idomain')) + package_abbr = 'gwedis' + _package_type = 'dis' + dfn_file_name = 'gwe-dis.dfn' + dfn = [['header'], ['block options', 'name length_units', 'type string', 'reader urword', 'optional true'], ['block options', 'name nogrb', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name grb_filerecord', 'type record grb6 fileout grb6_filename', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name grb6', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name fileout', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name grb6_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false'], ['block options', 'name xorigin', 'type double precision', 'reader urword', 'optional true'], ['block options', 'name yorigin', 'type double precision', 'reader urword', 'optional true'], ['block options', 'name angrot', 'type double precision', 'reader urword', 'optional true'], ['block options', 'name export_array_ascii', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_ascii'], ['block options', 'name export_array_netcdf', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_nc', 'extended true'], ['block options', 'name crs', 'type string', 'shape lenbigline', 'preserve_case true', 'reader urword', 'optional true', 'developmode true'], ['block options', 'name ncf_filerecord', 'type record ncf6 filein ncf6_filename', 'reader urword', 'tagged true', 'optional true', 'construct_package ncf', 'construct_data packagedata', 'parameter_name packagedata'], ['block options', 'name ncf6', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false', 'extended true'], ['block options', 'name filein', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name ncf6_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false', 'extended true'], ['block dimensions', 'name nlay', 'type integer', 'reader urword', 'optional false', 'default 1'], ['block dimensions', 'name nrow', 'type integer', 'reader urword', 'optional false', 'default 2'], ['block dimensions', 'name ncol', 'type integer', 'reader urword', 'optional false', 'default 2'], ['block griddata', 'name delr', 'type double precision', 'shape (ncol)', 'reader readarray', 'netcdf true', 'default 1.0'], ['block griddata', 'name delc', 'type double precision', 'shape (nrow)', 'reader readarray', 'netcdf true', 'default 1.0'], ['block griddata', 'name top', 'type double precision', 'shape (ncol, nrow)', 'reader readarray', 'netcdf true', 'default 1.0'], ['block griddata', 'name botm', 'type double precision', 'shape (ncol, nrow, nlay)', 'reader readarray', 'layered true', 'netcdf true', 'default 0.'], ['block griddata', 'name idomain', 'type integer', 'shape (ncol, nrow, nlay)', 'reader readarray', 'layered true', 'netcdf true', 'optional true']] def __init__( self, @@ -556,6 +127,7 @@ def __init__( top=1.0, botm=0.0, idomain=None, + filename=None, pname=None, **kwargs, @@ -570,29 +142,24 @@ def __init__( **kwargs, ) - self.length_units = self.build_mfdata("length_units", length_units) - self.nogrb = self.build_mfdata("nogrb", nogrb) - self.grb_filerecord = self.build_mfdata("grb_filerecord", grb_filerecord) - self.xorigin = self.build_mfdata("xorigin", xorigin) - self.yorigin = self.build_mfdata("yorigin", yorigin) - self.angrot = self.build_mfdata("angrot", angrot) - self.export_array_ascii = self.build_mfdata( - "export_array_ascii", export_array_ascii - ) - self.export_array_netcdf = self.build_mfdata( - "export_array_netcdf", export_array_netcdf - ) - self._ncf_filerecord = self.build_mfdata("ncf_filerecord", None) - self._ncf_package = self.build_child_package( - "ncf", packagedata, "packagedata", self._ncf_filerecord - ) - self.nlay = self.build_mfdata("nlay", nlay) - self.nrow = self.build_mfdata("nrow", nrow) - self.ncol = self.build_mfdata("ncol", ncol) - self.delr = self.build_mfdata("delr", delr) - self.delc = self.build_mfdata("delc", delc) - self.top = self.build_mfdata("top", top) - self.botm = self.build_mfdata("botm", botm) - self.idomain = self.build_mfdata("idomain", idomain) + self.length_units = self.build_mfdata('length_units', length_units) + self.nogrb = self.build_mfdata('nogrb', nogrb) + self.grb_filerecord = self.build_mfdata('grb_filerecord', grb_filerecord) + self.xorigin = self.build_mfdata('xorigin', xorigin) + self.yorigin = self.build_mfdata('yorigin', yorigin) + self.angrot = self.build_mfdata('angrot', angrot) + self.export_array_ascii = self.build_mfdata('export_array_ascii', export_array_ascii) + self.export_array_netcdf = self.build_mfdata('export_array_netcdf', export_array_netcdf) + self._ncf_filerecord = self.build_mfdata('ncf_filerecord', None) + self._ncf_package = self.build_child_package('ncf', packagedata, 'packagedata', self._ncf_filerecord) + self.nlay = self.build_mfdata('nlay', nlay) + self.nrow = self.build_mfdata('nrow', nrow) + self.ncol = self.build_mfdata('ncol', ncol) + self.delr = self.build_mfdata('delr', delr) + self.delc = self.build_mfdata('delc', delc) + self.top = self.build_mfdata('top', top) + self.botm = self.build_mfdata('botm', botm) + self.idomain = self.build_mfdata('idomain', idomain) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwedisu.py b/flopy/mf6/modflow/mfgwedisu.py index 4bb3666f46..3d823bd4f0 100644 --- a/flopy/mf6/modflow/mfgwedisu.py +++ b/flopy/mf6/modflow/mfgwedisu.py @@ -174,669 +174,23 @@ class ModflowGwedisu(MFPackage): """ - grb_filerecord = ListTemplateGenerator( - ("gwe6", "disu", "options", "grb_filerecord") - ) - top = ArrayTemplateGenerator(("gwe6", "disu", "griddata", "top")) - bot = ArrayTemplateGenerator(("gwe6", "disu", "griddata", "bot")) - area = ArrayTemplateGenerator(("gwe6", "disu", "griddata", "area")) - idomain = ArrayTemplateGenerator(("gwe6", "disu", "griddata", "idomain")) - iac = ArrayTemplateGenerator(("gwe6", "disu", "connectiondata", "iac")) - ja = ArrayTemplateGenerator(("gwe6", "disu", "connectiondata", "ja")) - ihc = ArrayTemplateGenerator(("gwe6", "disu", "connectiondata", "ihc")) - cl12 = ArrayTemplateGenerator(("gwe6", "disu", "connectiondata", "cl12")) - hwva = ArrayTemplateGenerator(("gwe6", "disu", "connectiondata", "hwva")) - angldegx = ArrayTemplateGenerator(("gwe6", "disu", "connectiondata", "angldegx")) - vertices = ListTemplateGenerator(("gwe6", "disu", "vertices", "vertices")) - cell2d = ListTemplateGenerator(("gwe6", "disu", "cell2d", "cell2d")) - package_abbr = "gwedisu" - _package_type = "disu" - dfn_file_name = "gwe-disu.dfn" - dfn = [ - ["header"], - [ - "block options", - "name length_units", - "type string", - "reader urword", - "optional true", - ], - [ - "block options", - "name nogrb", - "type keyword", - "reader urword", - "optional true", - ], - [ - "block options", - "name grb_filerecord", - "type record grb6 fileout grb6_filename", - "reader urword", - "tagged true", - "optional true", - ], - [ - "block options", - "name grb6", - "type keyword", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name fileout", - "type keyword", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name grb6_filename", - "type string", - "preserve_case true", - "in_record true", - "reader urword", - "optional false", - "tagged false", - ], - [ - "block options", - "name xorigin", - "type double precision", - "reader urword", - "optional true", - ], - [ - "block options", - "name yorigin", - "type double precision", - "reader urword", - "optional true", - ], - [ - "block options", - "name angrot", - "type double precision", - "reader urword", - "optional true", - ], - [ - "block options", - "name vertical_offset_tolerance", - "type double precision", - "reader urword", - "optional true", - "default 0.0", - "mf6internal voffsettol", - ], - [ - "block options", - "name export_array_ascii", - "type keyword", - "reader urword", - "optional true", - "mf6internal export_ascii", - ], - [ - "block options", - "name crs", - "type string", - "shape lenbigline", - "preserve_case true", - "reader urword", - "optional true", - "developmode true", - ], - [ - "block dimensions", - "name nodes", - "type integer", - "reader urword", - "optional false", - ], - [ - "block dimensions", - "name nja", - "type integer", - "reader urword", - "optional false", - ], - [ - "block dimensions", - "name nvert", - "type integer", - "reader urword", - "optional true", - ], - [ - "block griddata", - "name top", - "type double precision", - "shape (nodes)", - "reader readarray", - ], - [ - "block griddata", - "name bot", - "type double precision", - "shape (nodes)", - "reader readarray", - ], - [ - "block griddata", - "name area", - "type double precision", - "shape (nodes)", - "reader readarray", - ], - [ - "block griddata", - "name idomain", - "type integer", - "shape (nodes)", - "reader readarray", - "layered false", - "optional true", - ], - [ - "block connectiondata", - "name iac", - "type integer", - "shape (nodes)", - "reader readarray", - ], - [ - "block connectiondata", - "name ja", - "type integer", - "shape (nja)", - "reader readarray", - "numeric_index true", - "jagged_array iac", - ], - [ - "block connectiondata", - "name ihc", - "type integer", - "shape (nja)", - "reader readarray", - "jagged_array iac", - ], - [ - "block connectiondata", - "name cl12", - "type double precision", - "shape (nja)", - "reader readarray", - "jagged_array iac", - ], - [ - "block connectiondata", - "name hwva", - "type double precision", - "shape (nja)", - "reader readarray", - "jagged_array iac", - ], - [ - "block connectiondata", - "name angldegx", - "type double precision", - "optional true", - "shape (nja)", - "reader readarray", - "jagged_array iac", - ], - [ - "block vertices", - "name vertices", - "type recarray iv xv yv", - "shape (nvert)", - "reader urword", - "optional false", - ], - [ - "block vertices", - "name iv", - "type integer", - "in_record true", - "tagged false", - "reader urword", - "optional false", - "numeric_index true", - ], - [ - "block vertices", - "name xv", - "type double precision", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block vertices", - "name yv", - "type double precision", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block cell2d", - "name cell2d", - "type recarray icell2d xc yc ncvert icvert", - "shape (nodes)", - "reader urword", - "optional false", - ], - [ - "block cell2d", - "name icell2d", - "type integer", - "in_record true", - "tagged false", - "reader urword", - "optional false", - "numeric_index true", - ], - [ - "block cell2d", - "name xc", - "type double precision", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block cell2d", - "name yc", - "type double precision", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block cell2d", - "name ncvert", - "type integer", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block cell2d", - "name icvert", - "type integer", - "shape (ncvert)", - "in_record true", - "tagged false", - "reader urword", - "optional false", - "numeric_index true", - ], - ] - spec = { - "advanced": False, - "cell2d": { - "cell2d": { - "block": "cell2d", - "item": { - "block": "cell2d", - "fields": { - "icell2d": { - "block": "cell2d", - "description": "is the cell2d number. Records in the CELL2D block must be listed in consecutive order from 1 to NODES.", - "longname": "cell2d number", - "name": "icell2d", - "numeric_index": "true", - "optional": "false", - "reader": "urword", - "type": "integer", - }, - "icvert": { - "block": "cell2d", - "description": "is an array of integer values containing vertex numbers (in the VERTICES block) used to define the cell. Vertices must be listed in clockwise order.", - "longname": "array of vertex numbers", - "name": "icvert", - "numeric_index": "true", - "optional": "false", - "reader": "urword", - "shape": "(ncvert)", - "type": "integer", - }, - "ncvert": { - "block": "cell2d", - "description": "is the number of vertices required to define the cell. There may be a different number of vertices for each cell.", - "longname": "number of cell vertices", - "name": "ncvert", - "optional": "false", - "reader": "urword", - "type": "integer", - }, - "xc": { - "block": "cell2d", - "description": "is the x-coordinate for the cell center.", - "longname": "x-coordinate for cell center", - "name": "xc", - "optional": "false", - "reader": "urword", - "type": "double precision", - }, - "yc": { - "block": "cell2d", - "description": "is the y-coordinate for the cell center.", - "longname": "y-coordinate for cell center", - "name": "yc", - "optional": "false", - "reader": "urword", - "type": "double precision", - }, - }, - "longname": "cell2d data", - "name": "cell2d", - "optional": False, - "reader": "urword", - "type": "record", - }, - "longname": "cell2d data", - "name": "cell2d", - "optional": False, - "reader": "urword", - "shape": "(nodes)", - "type": "recarray", - } - }, - "connectiondata": { - "angldegx": { - "block": "connectiondata", - "description": "is the angle (in degrees) between the horizontal x-axis and the outward normal to the face between a cell and its connecting cells. the angle varies between zero and 360.0 degrees, where zero degrees points in the positive x-axis direction, and 90 degrees points in the positive y-axis direction. angldegx is only needed if horizontal anisotropy is specified in the npf package, if the xt3d option is used in the npf package, or if the save_specific_discharge option is specified in the npf package. angldegx does not need to be specified if these conditions are not met. angldegx is of size nja; values specified for vertical connections and for the diagonal position are not used. note that angldegx is read in degrees, which is different from modflow-usg, which reads a similar variable (anglex) in radians.", - "jagged_array": "iac", - "longname": "angle of face normal to connection", - "name": "angldegx", - "optional": True, - "reader": "readarray", - "shape": "(nja)", - "type": "double precision", - }, - "cl12": { - "block": "connectiondata", - "description": "is the array containing connection lengths between the center of cell n and the shared face with each adjacent m cell.", - "jagged_array": "iac", - "longname": "connection lengths", - "name": "cl12", - "reader": "readarray", - "shape": "(nja)", - "type": "double precision", - }, - "hwva": { - "block": "connectiondata", - "description": "is a symmetric array of size nja. for horizontal connections, entries in hwva are the horizontal width perpendicular to flow. for vertical connections, entries in hwva are the vertical area for flow. thus, values in the hwva array contain dimensions of both length and area. entries in the hwva array have a one-to-one correspondence with the connections specified in the ja array. likewise, there is a one-to-one correspondence between entries in the hwva array and entries in the ihc array, which specifies the connection type (horizontal or vertical). entries in the hwva array must be symmetric; the program will terminate with an error if the value for hwva for an n to m connection does not equal the value for hwva for the corresponding n to m connection.", - "jagged_array": "iac", - "longname": "connection lengths", - "name": "hwva", - "reader": "readarray", - "shape": "(nja)", - "type": "double precision", - }, - "iac": { - "block": "connectiondata", - "description": "is the number of connections (plus 1) for each cell. the sum of all the entries in iac must be equal to nja.", - "longname": "number of cell connections", - "name": "iac", - "reader": "readarray", - "shape": "(nodes)", - "type": "integer", - }, - "ihc": { - "block": "connectiondata", - "description": "is an index array indicating the direction between node n and all of its m connections. if ihc = 0 then cell n and cell m are connected in the vertical direction. cell n overlies cell m if the cell number for n is less than m; cell m overlies cell n if the cell number for m is less than n. if ihc = 1 then cell n and cell m are connected in the horizontal direction. if ihc = 2 then cell n and cell m are connected in the horizontal direction, and the connection is vertically staggered. a vertically staggered connection is one in which a cell is horizontally connected to more than one cell in a horizontal connection.", - "jagged_array": "iac", - "longname": "connection type", - "name": "ihc", - "reader": "readarray", - "shape": "(nja)", - "type": "integer", - }, - "ja": { - "block": "connectiondata", - "description": "is a list of cell number (n) followed by its connecting cell numbers (m) for each of the m cells connected to cell n. the number of values to provide for cell n is iac(n). this list is sequentially provided for the first to the last cell. the first value in the list must be cell n itself, and the remaining cells must be listed in an increasing order (sorted from lowest number to highest). note that the cell and its connections are only supplied for the gwe cells and their connections to the other gwe cells. also note that the ja list input may be divided such that every node and its connectivity list can be on a separate line for ease in readability of the file. to further ease readability of the file, the node number of the cell whose connectivity is subsequently listed, may be expressed as a negative number, the sign of which is subsequently converted to positive by the code.", - "jagged_array": "iac", - "longname": "grid connectivity", - "name": "ja", - "numeric_index": True, - "reader": "readarray", - "shape": "(nja)", - "type": "integer", - }, - }, - "dimensions": { - "nja": { - "block": "dimensions", - "description": "is the sum of the number of connections and nodes. when calculating the total number of connections, the connection between cell n and cell m is considered to be different from the connection between cell m and cell n. thus, nja is equal to the total number of connections, including n to m and m to n, and the total number of cells.", - "longname": "number of columns", - "name": "nja", - "optional": False, - "reader": "urword", - "type": "integer", - }, - "nodes": { - "block": "dimensions", - "description": "is the number of cells in the model grid.", - "longname": "number of layers", - "name": "nodes", - "optional": False, - "reader": "urword", - "type": "integer", - }, - "nvert": { - "block": "dimensions", - "description": "is the total number of (x, y) vertex pairs used to define the plan-view shape of each cell in the model grid. if nvert is not specified or is specified as zero, then the vertices and cell2d blocks below are not read. nvert and the accompanying vertices and cell2d blocks should be specified for most simulations. if the xt3d or save_specific_discharge options are specified in the npf package, then this information is required.", - "longname": "number of vertices", - "name": "nvert", - "optional": True, - "reader": "urword", - "type": "integer", - }, - }, - "griddata": { - "area": { - "block": "griddata", - "description": "is the cell surface area (in plan view).", - "longname": "cell surface area", - "name": "area", - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "bot": { - "block": "griddata", - "description": "is the bottom elevation for each cell.", - "longname": "cell bottom elevation", - "name": "bot", - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "idomain": { - "block": "griddata", - "description": "is an optional array that characterizes the existence status of a cell. if the idomain array is not specified, then all model cells exist within the solution. if the idomain value for a cell is 0, the cell does not exist in the simulation. input and output values will be read and written for the cell, but internal to the program, the cell is excluded from the solution. if the idomain value for a cell is 1 or greater, the cell exists in the simulation. idomain values of -1 cannot be specified for the disu package.", - "layered": False, - "longname": "idomain existence array", - "name": "idomain", - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "integer", - }, - "top": { - "block": "griddata", - "description": "is the top elevation for each cell in the model grid.", - "longname": "cell top elevation", - "name": "top", - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - }, - "multi": False, - "name": "gwe-disu", - "options": { - "angrot": { - "block": "options", - "description": "counter-clockwise rotation angle (in degrees) of the model grid coordinate system relative to a real-world coordinate system. if not specified, then a default value of 0.0 is assigned. the value for angrot does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", - "longname": "rotation angle", - "name": "angrot", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - "crs": { - "block": "options", - "description": "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.", - "developmode": True, - "longname": "crs user input string", - "name": "crs", - "optional": True, - "reader": "urword", - "shape": "lenbigline", - "type": "string", - }, - "export_array_ascii": { - "block": "options", - "description": "keyword that specifies input griddata arrays should be written to layered ascii output files.", - "longname": "export array variables to layered ascii files.", - "mf6internal": "export_ascii", - "name": "export_array_ascii", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "grb_filerecord": { - "block": "options", - "fields": { - "grb6_filename": { - "block": "options", - "description": "defines a binary grid output file. If this option is not provided, the output file will have the same name as the discretization input file, plus extension '.grb'.", - "longname": "file name of GRB information", - "name": "grb6_filename", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "grb_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "length_units": { - "block": "options", - "description": "is the length units used for this model. values can be 'feet', 'meters', or 'centimeters'. if not specified, the default is 'unknown'.", - "longname": "model length units", - "name": "length_units", - "optional": True, - "reader": "urword", - "type": "string", - }, - "nogrb": { - "block": "options", - "description": "keyword to deactivate writing of the binary grid file.", - "longname": "do not write binary grid file", - "name": "nogrb", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "vertical_offset_tolerance": { - "block": "options", - "default": 0.0, - "description": "checks are performed to ensure that the top of a cell is not higher than the bottom of an overlying cell. this option can be used to specify the tolerance that is used for checking. if top of a cell is above the bottom of an overlying cell by a value less than this tolerance, then the program will not terminate with an error. the default value is zero. this option should generally not be used.", - "longname": "vertical length dimension for top and bottom checking", - "mf6internal": "voffsettol", - "name": "vertical_offset_tolerance", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - "xorigin": { - "block": "options", - "description": "x-position of the origin used for model grid vertices. this value should be provided in a real-world coordinate system. a default value of zero is assigned if not specified. the value for xorigin does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", - "longname": "x-position origin of the model grid coordinate system", - "name": "xorigin", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - "yorigin": { - "block": "options", - "description": "y-position of the origin used for model grid vertices. this value should be provided in a real-world coordinate system. if not specified, then a default value equal to zero is used. the value for yorigin does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", - "longname": "y-position origin of the model grid coordinate system", - "name": "yorigin", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - }, - "vertices": { - "vertices": { - "block": "vertices", - "item": { - "block": "vertices", - "fields": { - "iv": { - "block": "vertices", - "description": "is the vertex number. Records in the VERTICES block must be listed in consecutive order from 1 to NVERT.", - "longname": "vertex number", - "name": "iv", - "numeric_index": "true", - "optional": "false", - "reader": "urword", - "type": "integer", - }, - "xv": { - "block": "vertices", - "description": "is the x-coordinate for the vertex.", - "longname": "x-coordinate for vertex", - "name": "xv", - "optional": "false", - "reader": "urword", - "type": "double precision", - }, - "yv": { - "block": "vertices", - "description": "is the y-coordinate for the vertex.", - "longname": "y-coordinate for vertex", - "name": "yv", - "optional": "false", - "reader": "urword", - "type": "double precision", - }, - }, - "longname": "vertices data", - "name": "vertices", - "optional": False, - "reader": "urword", - "type": "record", - }, - "longname": "vertices data", - "name": "vertices", - "optional": False, - "reader": "urword", - "shape": "(nvert)", - "type": "recarray", - } - }, - } + grb_filerecord = ListTemplateGenerator(('gwe6', 'disu', 'options', 'grb_filerecord')) + top = ArrayTemplateGenerator(('gwe6', 'disu', 'griddata', 'top')) + bot = ArrayTemplateGenerator(('gwe6', 'disu', 'griddata', 'bot')) + area = ArrayTemplateGenerator(('gwe6', 'disu', 'griddata', 'area')) + idomain = ArrayTemplateGenerator(('gwe6', 'disu', 'griddata', 'idomain')) + iac = ArrayTemplateGenerator(('gwe6', 'disu', 'connectiondata', 'iac')) + ja = ArrayTemplateGenerator(('gwe6', 'disu', 'connectiondata', 'ja')) + ihc = ArrayTemplateGenerator(('gwe6', 'disu', 'connectiondata', 'ihc')) + cl12 = ArrayTemplateGenerator(('gwe6', 'disu', 'connectiondata', 'cl12')) + hwva = ArrayTemplateGenerator(('gwe6', 'disu', 'connectiondata', 'hwva')) + angldegx = ArrayTemplateGenerator(('gwe6', 'disu', 'connectiondata', 'angldegx')) + vertices = ListTemplateGenerator(('gwe6', 'disu', 'vertices', 'vertices')) + cell2d = ListTemplateGenerator(('gwe6', 'disu', 'cell2d', 'cell2d')) + package_abbr = 'gwedisu' + _package_type = 'disu' + dfn_file_name = 'gwe-disu.dfn' + dfn = [['header'], ['block options', 'name length_units', 'type string', 'reader urword', 'optional true'], ['block options', 'name nogrb', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name grb_filerecord', 'type record grb6 fileout grb6_filename', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name grb6', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name fileout', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name grb6_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false'], ['block options', 'name xorigin', 'type double precision', 'reader urword', 'optional true'], ['block options', 'name yorigin', 'type double precision', 'reader urword', 'optional true'], ['block options', 'name angrot', 'type double precision', 'reader urword', 'optional true'], ['block options', 'name vertical_offset_tolerance', 'type double precision', 'reader urword', 'optional true', 'default 0.0', 'mf6internal voffsettol'], ['block options', 'name export_array_ascii', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_ascii'], ['block options', 'name crs', 'type string', 'shape lenbigline', 'preserve_case true', 'reader urword', 'optional true', 'developmode true'], ['block dimensions', 'name nodes', 'type integer', 'reader urword', 'optional false'], ['block dimensions', 'name nja', 'type integer', 'reader urword', 'optional false'], ['block dimensions', 'name nvert', 'type integer', 'reader urword', 'optional true'], ['block griddata', 'name top', 'type double precision', 'shape (nodes)', 'reader readarray'], ['block griddata', 'name bot', 'type double precision', 'shape (nodes)', 'reader readarray'], ['block griddata', 'name area', 'type double precision', 'shape (nodes)', 'reader readarray'], ['block griddata', 'name idomain', 'type integer', 'shape (nodes)', 'reader readarray', 'layered false', 'optional true'], ['block connectiondata', 'name iac', 'type integer', 'shape (nodes)', 'reader readarray'], ['block connectiondata', 'name ja', 'type integer', 'shape (nja)', 'reader readarray', 'numeric_index true', 'jagged_array iac'], ['block connectiondata', 'name ihc', 'type integer', 'shape (nja)', 'reader readarray', 'jagged_array iac'], ['block connectiondata', 'name cl12', 'type double precision', 'shape (nja)', 'reader readarray', 'jagged_array iac'], ['block connectiondata', 'name hwva', 'type double precision', 'shape (nja)', 'reader readarray', 'jagged_array iac'], ['block connectiondata', 'name angldegx', 'type double precision', 'optional true', 'shape (nja)', 'reader readarray', 'jagged_array iac'], ['block vertices', 'name vertices', 'type recarray iv xv yv', 'shape (nvert)', 'reader urword', 'optional false'], ['block vertices', 'name iv', 'type integer', 'in_record true', 'tagged false', 'reader urword', 'optional false', 'numeric_index true'], ['block vertices', 'name xv', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block vertices', 'name yv', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block cell2d', 'name cell2d', 'type recarray icell2d xc yc ncvert icvert', 'shape (nodes)', 'reader urword', 'optional false'], ['block cell2d', 'name icell2d', 'type integer', 'in_record true', 'tagged false', 'reader urword', 'optional false', 'numeric_index true'], ['block cell2d', 'name xc', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block cell2d', 'name yc', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block cell2d', 'name ncvert', 'type integer', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block cell2d', 'name icvert', 'type integer', 'shape (ncvert)', 'in_record true', 'tagged false', 'reader urword', 'optional false', 'numeric_index true']] def __init__( self, @@ -865,6 +219,7 @@ def __init__( angldegx=None, vertices=None, cell2d=None, + filename=None, pname=None, **kwargs, @@ -879,32 +234,29 @@ def __init__( **kwargs, ) - self.length_units = self.build_mfdata("length_units", length_units) - self.nogrb = self.build_mfdata("nogrb", nogrb) - self.grb_filerecord = self.build_mfdata("grb_filerecord", grb_filerecord) - self.xorigin = self.build_mfdata("xorigin", xorigin) - self.yorigin = self.build_mfdata("yorigin", yorigin) - self.angrot = self.build_mfdata("angrot", angrot) - self.vertical_offset_tolerance = self.build_mfdata( - "vertical_offset_tolerance", vertical_offset_tolerance - ) - self.export_array_ascii = self.build_mfdata( - "export_array_ascii", export_array_ascii - ) - self.nodes = self.build_mfdata("nodes", nodes) - self.nja = self.build_mfdata("nja", nja) - self.nvert = self.build_mfdata("nvert", nvert) - self.top = self.build_mfdata("top", top) - self.bot = self.build_mfdata("bot", bot) - self.area = self.build_mfdata("area", area) - self.idomain = self.build_mfdata("idomain", idomain) - self.iac = self.build_mfdata("iac", iac) - self.ja = self.build_mfdata("ja", ja) - self.ihc = self.build_mfdata("ihc", ihc) - self.cl12 = self.build_mfdata("cl12", cl12) - self.hwva = self.build_mfdata("hwva", hwva) - self.angldegx = self.build_mfdata("angldegx", angldegx) - self.vertices = self.build_mfdata("vertices", vertices) - self.cell2d = self.build_mfdata("cell2d", cell2d) + self.length_units = self.build_mfdata('length_units', length_units) + self.nogrb = self.build_mfdata('nogrb', nogrb) + self.grb_filerecord = self.build_mfdata('grb_filerecord', grb_filerecord) + self.xorigin = self.build_mfdata('xorigin', xorigin) + self.yorigin = self.build_mfdata('yorigin', yorigin) + self.angrot = self.build_mfdata('angrot', angrot) + self.vertical_offset_tolerance = self.build_mfdata('vertical_offset_tolerance', vertical_offset_tolerance) + self.export_array_ascii = self.build_mfdata('export_array_ascii', export_array_ascii) + self.nodes = self.build_mfdata('nodes', nodes) + self.nja = self.build_mfdata('nja', nja) + self.nvert = self.build_mfdata('nvert', nvert) + self.top = self.build_mfdata('top', top) + self.bot = self.build_mfdata('bot', bot) + self.area = self.build_mfdata('area', area) + self.idomain = self.build_mfdata('idomain', idomain) + self.iac = self.build_mfdata('iac', iac) + self.ja = self.build_mfdata('ja', ja) + self.ihc = self.build_mfdata('ihc', ihc) + self.cl12 = self.build_mfdata('cl12', cl12) + self.hwva = self.build_mfdata('hwva', hwva) + self.angldegx = self.build_mfdata('angldegx', angldegx) + self.vertices = self.build_mfdata('vertices', vertices) + self.cell2d = self.build_mfdata('cell2d', cell2d) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwedisv.py b/flopy/mf6/modflow/mfgwedisv.py index 674d1a3756..bc25d77998 100644 --- a/flopy/mf6/modflow/mfgwedisv.py +++ b/flopy/mf6/modflow/mfgwedisv.py @@ -120,610 +120,17 @@ class ModflowGwedisv(MFPackage): """ - grb_filerecord = ListTemplateGenerator( - ("gwe6", "disv", "options", "grb_filerecord") - ) - ncf_filerecord = ListTemplateGenerator( - ("gwe6", "disv", "options", "ncf_filerecord") - ) - top = ArrayTemplateGenerator(("gwe6", "disv", "griddata", "top")) - botm = ArrayTemplateGenerator(("gwe6", "disv", "griddata", "botm")) - idomain = ArrayTemplateGenerator(("gwe6", "disv", "griddata", "idomain")) - vertices = ListTemplateGenerator(("gwe6", "disv", "vertices", "vertices")) - cell2d = ListTemplateGenerator(("gwe6", "disv", "cell2d", "cell2d")) - package_abbr = "gwedisv" - _package_type = "disv" - dfn_file_name = "gwe-disv.dfn" - dfn = [ - ["header"], - [ - "block options", - "name length_units", - "type string", - "reader urword", - "optional true", - ], - [ - "block options", - "name nogrb", - "type keyword", - "reader urword", - "optional true", - ], - [ - "block options", - "name grb_filerecord", - "type record grb6 fileout grb6_filename", - "reader urword", - "tagged true", - "optional true", - ], - [ - "block options", - "name grb6", - "type keyword", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name fileout", - "type keyword", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name grb6_filename", - "type string", - "preserve_case true", - "in_record true", - "reader urword", - "optional false", - "tagged false", - ], - [ - "block options", - "name xorigin", - "type double precision", - "reader urword", - "optional true", - ], - [ - "block options", - "name yorigin", - "type double precision", - "reader urword", - "optional true", - ], - [ - "block options", - "name angrot", - "type double precision", - "reader urword", - "optional true", - ], - [ - "block options", - "name export_array_ascii", - "type keyword", - "reader urword", - "optional true", - "mf6internal export_ascii", - ], - [ - "block options", - "name export_array_netcdf", - "type keyword", - "reader urword", - "optional true", - "mf6internal export_nc", - "extended true", - ], - [ - "block options", - "name crs", - "type string", - "shape lenbigline", - "preserve_case true", - "reader urword", - "optional true", - "developmode true", - ], - [ - "block options", - "name ncf_filerecord", - "type record ncf6 filein ncf6_filename", - "reader urword", - "tagged true", - "optional true", - "construct_package ncf", - "construct_data packagedata", - "parameter_name packagedata", - ], - [ - "block options", - "name ncf6", - "type keyword", - "in_record true", - "reader urword", - "tagged true", - "optional false", - "extended true", - ], - [ - "block options", - "name filein", - "type keyword", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name ncf6_filename", - "type string", - "preserve_case true", - "in_record true", - "reader urword", - "optional false", - "tagged false", - "extended true", - ], - [ - "block dimensions", - "name nlay", - "type integer", - "reader urword", - "optional false", - ], - [ - "block dimensions", - "name ncpl", - "type integer", - "reader urword", - "optional false", - ], - [ - "block dimensions", - "name nvert", - "type integer", - "reader urword", - "optional false", - ], - [ - "block griddata", - "name top", - "type double precision", - "shape (ncpl)", - "reader readarray", - "netcdf true", - ], - [ - "block griddata", - "name botm", - "type double precision", - "shape (ncpl, nlay)", - "reader readarray", - "layered true", - "netcdf true", - ], - [ - "block griddata", - "name idomain", - "type integer", - "shape (ncpl, nlay)", - "reader readarray", - "layered true", - "netcdf true", - "optional true", - ], - [ - "block vertices", - "name vertices", - "type recarray iv xv yv", - "shape (nvert)", - "reader urword", - "optional false", - ], - [ - "block vertices", - "name iv", - "type integer", - "in_record true", - "tagged false", - "reader urword", - "optional false", - "numeric_index true", - ], - [ - "block vertices", - "name xv", - "type double precision", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block vertices", - "name yv", - "type double precision", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block cell2d", - "name cell2d", - "type recarray icell2d xc yc ncvert icvert", - "shape (ncpl)", - "reader urword", - "optional false", - ], - [ - "block cell2d", - "name icell2d", - "type integer", - "in_record true", - "tagged false", - "reader urword", - "optional false", - "numeric_index true", - ], - [ - "block cell2d", - "name xc", - "type double precision", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block cell2d", - "name yc", - "type double precision", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block cell2d", - "name ncvert", - "type integer", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block cell2d", - "name icvert", - "type integer", - "shape (ncvert)", - "in_record true", - "tagged false", - "reader urword", - "optional false", - "numeric_index true", - ], - ] - spec = { - "advanced": False, - "cell2d": { - "cell2d": { - "block": "cell2d", - "item": { - "block": "cell2d", - "fields": { - "icell2d": { - "block": "cell2d", - "description": "is the CELL2D number. Records in the CELL2D block must be listed in consecutive order from the first to the last.", - "longname": "cell2d number", - "name": "icell2d", - "numeric_index": "true", - "optional": "false", - "reader": "urword", - "type": "integer", - }, - "icvert": { - "block": "cell2d", - "description": "is an array of integer values containing vertex numbers (in the VERTICES block) used to define the cell. Vertices must be listed in clockwise order. Cells that are connected must share vertices.", - "longname": "array of vertex numbers", - "name": "icvert", - "numeric_index": "true", - "optional": "false", - "reader": "urword", - "shape": "(ncvert)", - "type": "integer", - }, - "ncvert": { - "block": "cell2d", - "description": "is the number of vertices required to define the cell. There may be a different number of vertices for each cell.", - "longname": "number of cell vertices", - "name": "ncvert", - "optional": "false", - "reader": "urword", - "type": "integer", - }, - "xc": { - "block": "cell2d", - "description": "is the x-coordinate for the cell center.", - "longname": "x-coordinate for cell center", - "name": "xc", - "optional": "false", - "reader": "urword", - "type": "double precision", - }, - "yc": { - "block": "cell2d", - "description": "is the y-coordinate for the cell center.", - "longname": "y-coordinate for cell center", - "name": "yc", - "optional": "false", - "reader": "urword", - "type": "double precision", - }, - }, - "longname": "cell2d data", - "name": "cell2d", - "optional": False, - "reader": "urword", - "type": "record", - }, - "longname": "cell2d data", - "name": "cell2d", - "optional": False, - "reader": "urword", - "shape": "(ncpl)", - "type": "recarray", - } - }, - "dimensions": { - "ncpl": { - "block": "dimensions", - "description": "is the number of cells per layer. this is a constant value for the grid and it applies to all layers.", - "longname": "number of cells per layer", - "name": "ncpl", - "optional": False, - "reader": "urword", - "type": "integer", - }, - "nlay": { - "block": "dimensions", - "description": "is the number of layers in the model grid.", - "longname": "number of layers", - "name": "nlay", - "optional": False, - "reader": "urword", - "type": "integer", - }, - "nvert": { - "block": "dimensions", - "description": "is the total number of (x, y) vertex pairs used to characterize the horizontal configuration of the model grid.", - "longname": "number of columns", - "name": "nvert", - "optional": False, - "reader": "urword", - "type": "integer", - }, - }, - "fkeys": { - "ncf_filerecord": { - "abbr": "ncf", - "key": "ncf_filerecord", - "param": "packagedata", - "parent": "parent_package", - "val": "packagedata", - } - }, - "griddata": { - "botm": { - "block": "griddata", - "description": "is the bottom elevation for each cell.", - "layered": True, - "longname": "model bottom elevation", - "name": "botm", - "netcdf": True, - "reader": "readarray", - "shape": "(ncpl, nlay)", - "type": "double precision", - }, - "idomain": { - "block": "griddata", - "description": "is an optional array that characterizes the existence status of a cell. if the idomain array is not specified, then all model cells exist within the solution. if the idomain value for a cell is 0, the cell does not exist in the simulation. input and output values will be read and written for the cell, but internal to the program, the cell is excluded from the solution. if the idomain value for a cell is 1, the cell exists in the simulation. if the idomain value for a cell is -1, the cell does not exist in the simulation. furthermore, the first existing cell above will be connected to the first existing cell below. this type of cell is referred to as a 'vertical pass through' cell.", - "layered": True, - "longname": "idomain existence array", - "name": "idomain", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(ncpl, nlay)", - "type": "integer", - }, - "top": { - "block": "griddata", - "description": "is the top elevation for each cell in the top model layer.", - "longname": "model top elevation", - "name": "top", - "netcdf": True, - "reader": "readarray", - "shape": "(ncpl)", - "type": "double precision", - }, - }, - "multi": False, - "name": "gwe-disv", - "options": { - "angrot": { - "block": "options", - "description": "counter-clockwise rotation angle (in degrees) of the model grid coordinate system relative to a real-world coordinate system. if not specified, then a default value of 0.0 is assigned. the value for angrot does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", - "longname": "rotation angle", - "name": "angrot", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - "crs": { - "block": "options", - "description": "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.", - "developmode": True, - "longname": "crs user input string", - "name": "crs", - "optional": True, - "reader": "urword", - "shape": "lenbigline", - "type": "string", - }, - "export_array_ascii": { - "block": "options", - "description": "keyword that specifies input griddata arrays should be written to layered ascii output files.", - "longname": "export array variables to layered ascii files.", - "mf6internal": "export_ascii", - "name": "export_array_ascii", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "export_array_netcdf": { - "block": "options", - "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", - "extended": True, - "longname": "export array variables to netcdf output files.", - "mf6internal": "export_nc", - "name": "export_array_netcdf", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "grb_filerecord": { - "block": "options", - "fields": { - "grb6_filename": { - "block": "options", - "description": "defines a binary grid output file. If this option is not provided, the output file will have the same name as the discretization input file, plus extension '.grb'.", - "longname": "file name of GRB information", - "name": "grb6_filename", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "grb_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "length_units": { - "block": "options", - "description": "is the length units used for this model. values can be 'feet', 'meters', or 'centimeters'. if not specified, the default is 'unknown'.", - "longname": "model length units", - "name": "length_units", - "optional": True, - "reader": "urword", - "type": "string", - }, - "nogrb": { - "block": "options", - "description": "keyword to deactivate writing of the binary grid file.", - "longname": "do not write binary grid file", - "name": "nogrb", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "packagedata": { - "block": "options", - "description": "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 the packagedata variable is also acceptable. See ncf package documentation for more information.", - "name": "packagedata", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "ncf", - "key": "ncf_filerecord", - "param": "packagedata", - "parent": "parent_package", - "val": "packagedata", - }, - "type": "record ncf6 filein ncf6_filename", - }, - "xorigin": { - "block": "options", - "description": "x-position of the origin used for model grid vertices. this value should be provided in a real-world coordinate system. a default value of zero is assigned if not specified. the value for xorigin does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", - "longname": "x-position origin of the model grid coordinate system", - "name": "xorigin", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - "yorigin": { - "block": "options", - "description": "y-position of the origin used for model grid vertices. this value should be provided in a real-world coordinate system. if not specified, then a default value equal to zero is used. the value for yorigin does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", - "longname": "y-position origin of the model grid coordinate system", - "name": "yorigin", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - }, - "vertices": { - "vertices": { - "block": "vertices", - "item": { - "block": "vertices", - "fields": { - "iv": { - "block": "vertices", - "description": "is the vertex number. Records in the VERTICES block must be listed in consecutive order from 1 to NVERT.", - "longname": "vertex number", - "name": "iv", - "numeric_index": "true", - "optional": "false", - "reader": "urword", - "type": "integer", - }, - "xv": { - "block": "vertices", - "description": "is the x-coordinate for the vertex.", - "longname": "x-coordinate for vertex", - "name": "xv", - "optional": "false", - "reader": "urword", - "type": "double precision", - }, - "yv": { - "block": "vertices", - "description": "is the y-coordinate for the vertex.", - "longname": "y-coordinate for vertex", - "name": "yv", - "optional": "false", - "reader": "urword", - "type": "double precision", - }, - }, - "longname": "vertices data", - "name": "vertices", - "optional": False, - "reader": "urword", - "type": "record", - }, - "longname": "vertices data", - "name": "vertices", - "optional": False, - "reader": "urword", - "shape": "(nvert)", - "type": "recarray", - } - }, - } + grb_filerecord = ListTemplateGenerator(('gwe6', 'disv', 'options', 'grb_filerecord')) + ncf_filerecord = ListTemplateGenerator(('gwe6', 'disv', 'options', 'ncf_filerecord')) + top = ArrayTemplateGenerator(('gwe6', 'disv', 'griddata', 'top')) + botm = ArrayTemplateGenerator(('gwe6', 'disv', 'griddata', 'botm')) + idomain = ArrayTemplateGenerator(('gwe6', 'disv', 'griddata', 'idomain')) + vertices = ListTemplateGenerator(('gwe6', 'disv', 'vertices', 'vertices')) + cell2d = ListTemplateGenerator(('gwe6', 'disv', 'cell2d', 'cell2d')) + package_abbr = 'gwedisv' + _package_type = 'disv' + dfn_file_name = 'gwe-disv.dfn' + dfn = [['header'], ['block options', 'name length_units', 'type string', 'reader urword', 'optional true'], ['block options', 'name nogrb', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name grb_filerecord', 'type record grb6 fileout grb6_filename', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name grb6', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name fileout', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name grb6_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false'], ['block options', 'name xorigin', 'type double precision', 'reader urword', 'optional true'], ['block options', 'name yorigin', 'type double precision', 'reader urword', 'optional true'], ['block options', 'name angrot', 'type double precision', 'reader urword', 'optional true'], ['block options', 'name export_array_ascii', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_ascii'], ['block options', 'name export_array_netcdf', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_nc', 'extended true'], ['block options', 'name crs', 'type string', 'shape lenbigline', 'preserve_case true', 'reader urword', 'optional true', 'developmode true'], ['block options', 'name ncf_filerecord', 'type record ncf6 filein ncf6_filename', 'reader urword', 'tagged true', 'optional true', 'construct_package ncf', 'construct_data packagedata', 'parameter_name packagedata'], ['block options', 'name ncf6', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false', 'extended true'], ['block options', 'name filein', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name ncf6_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false', 'extended true'], ['block dimensions', 'name nlay', 'type integer', 'reader urword', 'optional false'], ['block dimensions', 'name ncpl', 'type integer', 'reader urword', 'optional false'], ['block dimensions', 'name nvert', 'type integer', 'reader urword', 'optional false'], ['block griddata', 'name top', 'type double precision', 'shape (ncpl)', 'reader readarray', 'netcdf true'], ['block griddata', 'name botm', 'type double precision', 'shape (ncpl, nlay)', 'reader readarray', 'layered true', 'netcdf true'], ['block griddata', 'name idomain', 'type integer', 'shape (ncpl, nlay)', 'reader readarray', 'layered true', 'netcdf true', 'optional true'], ['block vertices', 'name vertices', 'type recarray iv xv yv', 'shape (nvert)', 'reader urword', 'optional false'], ['block vertices', 'name iv', 'type integer', 'in_record true', 'tagged false', 'reader urword', 'optional false', 'numeric_index true'], ['block vertices', 'name xv', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block vertices', 'name yv', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block cell2d', 'name cell2d', 'type recarray icell2d xc yc ncvert icvert', 'shape (ncpl)', 'reader urword', 'optional false'], ['block cell2d', 'name icell2d', 'type integer', 'in_record true', 'tagged false', 'reader urword', 'optional false', 'numeric_index true'], ['block cell2d', 'name xc', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block cell2d', 'name yc', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block cell2d', 'name ncvert', 'type integer', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block cell2d', 'name icvert', 'type integer', 'shape (ncvert)', 'in_record true', 'tagged false', 'reader urword', 'optional false', 'numeric_index true']] def __init__( self, @@ -746,6 +153,7 @@ def __init__( idomain=None, vertices=None, cell2d=None, + filename=None, pname=None, **kwargs, @@ -760,29 +168,24 @@ def __init__( **kwargs, ) - self.length_units = self.build_mfdata("length_units", length_units) - self.nogrb = self.build_mfdata("nogrb", nogrb) - self.grb_filerecord = self.build_mfdata("grb_filerecord", grb_filerecord) - self.xorigin = self.build_mfdata("xorigin", xorigin) - self.yorigin = self.build_mfdata("yorigin", yorigin) - self.angrot = self.build_mfdata("angrot", angrot) - self.export_array_ascii = self.build_mfdata( - "export_array_ascii", export_array_ascii - ) - self.export_array_netcdf = self.build_mfdata( - "export_array_netcdf", export_array_netcdf - ) - self._ncf_filerecord = self.build_mfdata("ncf_filerecord", None) - self._ncf_package = self.build_child_package( - "ncf", packagedata, "packagedata", self._ncf_filerecord - ) - self.nlay = self.build_mfdata("nlay", nlay) - self.ncpl = self.build_mfdata("ncpl", ncpl) - self.nvert = self.build_mfdata("nvert", nvert) - self.top = self.build_mfdata("top", top) - self.botm = self.build_mfdata("botm", botm) - self.idomain = self.build_mfdata("idomain", idomain) - self.vertices = self.build_mfdata("vertices", vertices) - self.cell2d = self.build_mfdata("cell2d", cell2d) + self.length_units = self.build_mfdata('length_units', length_units) + self.nogrb = self.build_mfdata('nogrb', nogrb) + self.grb_filerecord = self.build_mfdata('grb_filerecord', grb_filerecord) + self.xorigin = self.build_mfdata('xorigin', xorigin) + self.yorigin = self.build_mfdata('yorigin', yorigin) + self.angrot = self.build_mfdata('angrot', angrot) + self.export_array_ascii = self.build_mfdata('export_array_ascii', export_array_ascii) + self.export_array_netcdf = self.build_mfdata('export_array_netcdf', export_array_netcdf) + self._ncf_filerecord = self.build_mfdata('ncf_filerecord', None) + self._ncf_package = self.build_child_package('ncf', packagedata, 'packagedata', self._ncf_filerecord) + self.nlay = self.build_mfdata('nlay', nlay) + self.ncpl = self.build_mfdata('ncpl', ncpl) + self.nvert = self.build_mfdata('nvert', nvert) + self.top = self.build_mfdata('top', top) + self.botm = self.build_mfdata('botm', botm) + self.idomain = self.build_mfdata('idomain', idomain) + self.vertices = self.build_mfdata('vertices', vertices) + self.cell2d = self.build_mfdata('cell2d', cell2d) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgweesl.py b/flopy/mf6/modflow/mfgweesl.py index 89aa2c715b..256326506c 100644 --- a/flopy/mf6/modflow/mfgweesl.py +++ b/flopy/mf6/modflow/mfgweesl.py @@ -96,390 +96,14 @@ class ModflowGweesl(MFPackage): """ - auxiliary = ArrayTemplateGenerator(("gwe6", "esl", "options", "auxiliary")) - ts_filerecord = ListTemplateGenerator(("gwe6", "esl", "options", "ts_filerecord")) - obs_filerecord = ListTemplateGenerator(("gwe6", "esl", "options", "obs_filerecord")) - stress_period_data = ListTemplateGenerator( - ("gwe6", "esl", "period", "stress_period_data") - ) - package_abbr = "gweesl" - _package_type = "esl" - dfn_file_name = "gwe-esl.dfn" - dfn = [ - ["header", "multi-package"], - [ - "block options", - "name auxiliary", - "type string", - "shape (naux)", - "reader urword", - "optional true", - ], - [ - "block options", - "name auxmultname", - "type string", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name boundnames", - "type keyword", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name print_input", - "type keyword", - "reader urword", - "optional true", - "mf6internal iprpak", - ], - [ - "block options", - "name print_flows", - "type keyword", - "reader urword", - "optional true", - "mf6internal iprflow", - ], - [ - "block options", - "name save_flows", - "type keyword", - "reader urword", - "optional true", - "mf6internal ipakcb", - ], - [ - "block options", - "name ts_filerecord", - "type record ts6 filein ts6_filename", - "shape", - "reader urword", - "tagged true", - "optional true", - "construct_package ts", - "construct_data timeseries", - "parameter_name timeseries", - ], - [ - "block options", - "name ts6", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name filein", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name ts6_filename", - "type string", - "preserve_case true", - "in_record true", - "reader urword", - "optional false", - "tagged false", - ], - [ - "block options", - "name obs_filerecord", - "type record obs6 filein obs6_filename", - "shape", - "reader urword", - "tagged true", - "optional true", - "construct_package obs", - "construct_data observations", - "parameter_name continuous", - ], - [ - "block options", - "name obs6", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name obs6_filename", - "type string", - "preserve_case true", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block dimensions", - "name maxbound", - "type integer", - "reader urword", - "optional false", - ], - [ - "block period", - "name iper", - "type integer", - "block_variable true", - "in_record true", - "tagged false", - "shape", - "valid", - "reader urword", - "optional false", - ], - [ - "block period", - "name stress_period_data", - "type recarray cellid senerrate aux boundname", - "shape (maxbound)", - "reader urword", - "mf6internal spd", - ], - [ - "block period", - "name cellid", - "type integer", - "shape (ncelldim)", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block period", - "name senerrate", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - "time_series true", - ], - [ - "block period", - "name aux", - "type double precision", - "in_record true", - "tagged false", - "shape (naux)", - "reader urword", - "optional true", - "time_series true", - "mf6internal auxvar", - ], - [ - "block period", - "name boundname", - "type string", - "shape", - "tagged false", - "in_record true", - "reader urword", - "optional true", - ], - ] - spec = { - "advanced": False, - "dimensions": { - "maxbound": { - "block": "dimensions", - "description": "integer value specifying the maximum number of source cells that will be specified for use during any stress period.", - "longname": "maximum number of sources", - "name": "maxbound", - "optional": False, - "reader": "urword", - "type": "integer", - } - }, - "fkeys": { - "obs_filerecord": { - "abbr": "obs", - "key": "obs_filerecord", - "param": "continuous", - "parent": "parent_model_or_package", - "val": "observations", - }, - "ts_filerecord": { - "abbr": "ts", - "description": "xxx", - "key": "ts_filerecord", - "param": "timeseries", - "parent": "parent_package", - "val": "timeseries", - }, - }, - "multi": True, - "name": "gwe-esl", - "options": { - "auxiliary": { - "block": "options", - "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", - "longname": "keyword to specify aux variables", - "name": "auxiliary", - "optional": True, - "reader": "urword", - "shape": "(naux)", - "type": "string", - }, - "auxmultname": { - "block": "options", - "description": "name of auxiliary variable to be used as multiplier of energy loading rate.", - "longname": "name of auxiliary variable for multiplier", - "name": "auxmultname", - "optional": True, - "reader": "urword", - "type": "string", - }, - "boundnames": { - "block": "options", - "description": "keyword to indicate that boundary names may be provided with the list of energy source loading cells.", - "name": "boundnames", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "observations": { - "block": "options", - "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", - "name": "observations", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "obs", - "key": "obs_filerecord", - "param": "continuous", - "parent": "parent_model_or_package", - "val": "observations", - }, - "type": "record obs6 filein obs6_filename", - }, - "print_flows": { - "block": "options", - "description": "keyword to indicate that the list of energy source loading 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.", - "longname": "print calculated flows to listing file", - "mf6internal": "iprflow", - "name": "print_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "print_input": { - "block": "options", - "description": "keyword to indicate that the list of energy source loading information will be written to the listing file immediately after it is read.", - "longname": "print input to listing file", - "mf6internal": "iprpak", - "name": "print_input", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "save_flows": { - "block": "options", - "description": "keyword to indicate that energy source loading flow terms will be written to the file specified with 'budget fileout' in output control.", - "longname": "save well flows to budget file", - "mf6internal": "ipakcb", - "name": "save_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "timeseries": { - "block": "options", - "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", - "name": "timeseries", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "ts", - "description": "xxx", - "key": "ts_filerecord", - "param": "timeseries", - "parent": "parent_package", - "val": "timeseries", - }, - "type": "record ts6 filein ts6_filename", - }, - }, - "period": { - "stress_period_data": { - "block": "period", - "item": { - "block": "period", - "fields": { - "aux": { - "block": "period", - "description": "represents the values of the auxiliary variables for each energy source. The values of auxiliary variables must be present for each energy source. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "auxiliary variables", - "mf6internal": "auxvar", - "name": "aux", - "optional": "true", - "reader": "urword", - "shape": "(naux)", - "time_series": "true", - "type": "double precision", - }, - "boundname": { - "block": "period", - "description": "name of the energy source cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", - "longname": "well name", - "name": "boundname", - "optional": "true", - "reader": "urword", - "type": "string", - }, - "cellid": { - "block": "period", - "description": "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 layer, row, and column. For a grid that uses the DISV input file, CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file, CELLID is the node number for the cell.", - "longname": "cell identifier", - "name": "cellid", - "reader": "urword", - "shape": "(ncelldim)", - "type": "integer", - }, - "senerrate": { - "block": "period", - "description": "is the energy source loading rate. A positive value indicates addition of energy and a negative value indicates removal of energy. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "energy source loading rate", - "name": "senerrate", - "reader": "urword", - "time_series": "true", - "type": "double precision", - }, - }, - "mf6internal": "spd", - "name": "stress_period_data", - "reader": "urword", - "type": "record", - }, - "mf6internal": "spd", - "name": "stress_period_data", - "reader": "urword", - "shape": "(maxbound)", - "type": "recarray", - }, - "transient_block": True, - }, - } + auxiliary = ArrayTemplateGenerator(('gwe6', 'esl', 'options', 'auxiliary')) + ts_filerecord = ListTemplateGenerator(('gwe6', 'esl', 'options', 'ts_filerecord')) + obs_filerecord = ListTemplateGenerator(('gwe6', 'esl', 'options', 'obs_filerecord')) + stress_period_data = ListTemplateGenerator(('gwe6', 'esl', 'period', 'stress_period_data')) + package_abbr = 'gweesl' + _package_type = 'esl' + dfn_file_name = 'gwe-esl.dfn' + dfn = [['header', 'multi-package'], ['block options', 'name auxiliary', 'type string', 'shape (naux)', 'reader urword', 'optional true'], ['block options', 'name auxmultname', 'type string', 'shape', 'reader urword', 'optional true'], ['block options', 'name boundnames', 'type keyword', 'shape', 'reader urword', 'optional true'], ['block options', 'name print_input', 'type keyword', 'reader urword', 'optional true', 'mf6internal iprpak'], ['block options', 'name print_flows', 'type keyword', 'reader urword', 'optional true', 'mf6internal iprflow'], ['block options', 'name save_flows', 'type keyword', 'reader urword', 'optional true', 'mf6internal ipakcb'], ['block options', 'name ts_filerecord', 'type record ts6 filein ts6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package ts', 'construct_data timeseries', 'parameter_name timeseries'], ['block options', 'name ts6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name filein', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name ts6_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false'], ['block options', 'name obs_filerecord', 'type record obs6 filein obs6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package obs', 'construct_data observations', 'parameter_name continuous'], ['block options', 'name obs6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name obs6_filename', 'type string', 'preserve_case true', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block dimensions', 'name maxbound', 'type integer', 'reader urword', 'optional false'], ['block period', 'name iper', 'type integer', 'block_variable true', 'in_record true', 'tagged false', 'shape', 'valid', 'reader urword', 'optional false'], ['block period', 'name stress_period_data', 'type recarray cellid senerrate aux boundname', 'shape (maxbound)', 'reader urword', 'mf6internal spd'], ['block period', 'name cellid', 'type integer', 'shape (ncelldim)', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name senerrate', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name aux', 'type double precision', 'in_record true', 'tagged false', 'shape (naux)', 'reader urword', 'optional true', 'time_series true', 'mf6internal auxvar'], ['block period', 'name boundname', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword', 'optional true']] def __init__( self, @@ -495,6 +119,7 @@ def __init__( observations=None, maxbound=None, stress_period_data=None, + filename=None, pname=None, **kwargs, @@ -509,23 +134,18 @@ def __init__( **kwargs, ) - self.auxiliary = self.build_mfdata("auxiliary", auxiliary) - self.auxmultname = self.build_mfdata("auxmultname", auxmultname) - self.boundnames = self.build_mfdata("boundnames", boundnames) - self.print_input = self.build_mfdata("print_input", print_input) - self.print_flows = self.build_mfdata("print_flows", print_flows) - self.save_flows = self.build_mfdata("save_flows", save_flows) - self._ts_filerecord = self.build_mfdata("ts_filerecord", None) - self._ts_package = self.build_child_package( - "ts", timeseries, "timeseries", self._ts_filerecord - ) - self._obs_filerecord = self.build_mfdata("obs_filerecord", None) - self._obs_package = self.build_child_package( - "obs", observations, "continuous", self._obs_filerecord - ) - self.maxbound = self.build_mfdata("maxbound", maxbound) - self.stress_period_data = self.build_mfdata( - "stress_period_data", stress_period_data - ) + self.auxiliary = self.build_mfdata('auxiliary', auxiliary) + self.auxmultname = self.build_mfdata('auxmultname', auxmultname) + self.boundnames = self.build_mfdata('boundnames', boundnames) + self.print_input = self.build_mfdata('print_input', print_input) + self.print_flows = self.build_mfdata('print_flows', print_flows) + self.save_flows = self.build_mfdata('save_flows', save_flows) + self._ts_filerecord = self.build_mfdata('ts_filerecord', None) + self._ts_package = self.build_child_package('ts', timeseries, 'timeseries', self._ts_filerecord) + self._obs_filerecord = self.build_mfdata('obs_filerecord', None) + self._obs_package = self.build_child_package('obs', observations, 'continuous', self._obs_filerecord) + self.maxbound = self.build_mfdata('maxbound', maxbound) + self.stress_period_data = self.build_mfdata('stress_period_data', stress_period_data) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgweest.py b/flopy/mf6/modflow/mfgweest.py index 0396697d7d..a33f264e17 100644 --- a/flopy/mf6/modflow/mfgweest.py +++ b/flopy/mf6/modflow/mfgweest.py @@ -90,238 +90,15 @@ class ModflowGweest(MFPackage): """ - porosity = ArrayTemplateGenerator(("gwe6", "est", "griddata", "porosity")) - decay_water = ArrayTemplateGenerator(("gwe6", "est", "griddata", "decay_water")) - decay_solid = ArrayTemplateGenerator(("gwe6", "est", "griddata", "decay_solid")) - heat_capacity_solid = ArrayTemplateGenerator( - ("gwe6", "est", "griddata", "heat_capacity_solid") - ) - density_solid = ArrayTemplateGenerator(("gwe6", "est", "griddata", "density_solid")) - package_abbr = "gweest" - _package_type = "est" - dfn_file_name = "gwe-est.dfn" - dfn = [ - ["header"], - [ - "block options", - "name save_flows", - "type keyword", - "reader urword", - "optional true", - ], - [ - "block options", - "name zero_order_decay_water", - "type keyword", - "reader urword", - "optional true", - "mf6internal ord0_decay_water", - ], - [ - "block options", - "name zero_order_decay_solid", - "type keyword", - "reader urword", - "optional true", - "mf6internal ord0_decay_solid", - ], - [ - "block options", - "name density_water", - "type double precision", - "reader urword", - "optional true", - "default 1000.0", - "mf6internal rhow", - ], - [ - "block options", - "name heat_capacity_water", - "type double precision", - "reader urword", - "optional true", - "default 4184.0", - "mf6internal cpw", - ], - [ - "block options", - "name latent_heat_vaporization", - "type double precision", - "reader urword", - "optional true", - "default 2453500.0", - "mf6internal latheatvap", - ], - [ - "block griddata", - "name porosity", - "type double precision", - "shape (nodes)", - "reader readarray", - "layered true", - ], - [ - "block griddata", - "name decay_water", - "type double precision", - "shape (nodes)", - "reader readarray", - "layered true", - "optional true", - ], - [ - "block griddata", - "name decay_solid", - "type double precision", - "shape (nodes)", - "reader readarray", - "layered true", - "optional true", - ], - [ - "block griddata", - "name heat_capacity_solid", - "type double precision", - "shape (nodes)", - "reader readarray", - "layered true", - "mf6internal cps", - ], - [ - "block griddata", - "name density_solid", - "type double precision", - "shape (nodes)", - "reader readarray", - "layered true", - "mf6internal rhos", - ], - ] - spec = { - "advanced": False, - "griddata": { - "decay_solid": { - "block": "griddata", - "description": "is the rate coefficient for zero-order decay for the solid phase. a negative value indicates heat (energy) production. the dimensions of zero-order decay in the solid phase are energy per mass of solid per time. zero-order decay in the solid phase will have no effect on simulation results unless zero_order_decay_solid is specified in the options block.", - "layered": True, - "longname": "solid phase decay rate coefficient", - "name": "decay_solid", - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "decay_water": { - "block": "griddata", - "description": "is the rate coefficient for zero-order decay for the aqueous phase of the mobile domain. a negative value indicates heat (energy) production. the dimensions of zero-order decay in the aqueous phase are energy per length cubed (volume of water) per time. zero-order decay in the aqueous phase will have no effect on simulation results unless zero_order_decay_water is specified in the options block.", - "layered": True, - "longname": "aqueous phase decay rate coefficient", - "name": "decay_water", - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "density_solid": { - "block": "griddata", - "description": "is a user-specified value of the density of aquifer material not considering the voids. value will remain fixed for the entire simulation. for example, if working in si units, values may be entered as kilograms per cubic meter.", - "layered": True, - "longname": "density of aquifer material", - "mf6internal": "rhos", - "name": "density_solid", - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "heat_capacity_solid": { - "block": "griddata", - "description": "is the mass-based heat capacity of dry solids (aquifer material). for example, units of j/kg/c may be used (or equivalent).", - "layered": True, - "longname": "heat capacity of the aquifer material", - "mf6internal": "cps", - "name": "heat_capacity_solid", - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "porosity": { - "block": "griddata", - "description": "is the mobile domain porosity, defined as the mobile domain pore volume per mobile domain volume. the gwe model does not support the concept of an immobile domain in the context of heat transport.", - "layered": True, - "longname": "porosity", - "name": "porosity", - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - }, - "multi": False, - "name": "gwe-est", - "options": { - "density_water": { - "block": "options", - "default": 1000.0, - "description": "density of water used by calculations related to heat storage and conduction. this value is set to 1,000 kg/m3 if no overriding value is specified. a user-specified value should be provided for models that use units other than kilograms and meters or if it is necessary to use a value other than the default.", - "longname": "density of water", - "mf6internal": "rhow", - "name": "density_water", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - "heat_capacity_water": { - "block": "options", - "default": 4184.0, - "description": "heat capacity of water used by calculations related to heat storage and conduction. this value is set to 4,184 j/kg/c if no overriding value is specified. a user-specified value should be provided for models that use units other than kilograms, joules, and degrees celsius or it is necessary to use a value other than the default.", - "longname": "heat capacity of water", - "mf6internal": "cpw", - "name": "heat_capacity_water", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - "latent_heat_vaporization": { - "block": "options", - "default": 2453500.0, - "description": "latent heat of vaporization is the amount of energy that is required to convert a given quantity of liquid into a gas and is associated with evaporative cooling. while the est package does not simulate evaporation, multiple other packages in a gwe simulation may. to avoid having to specify the latent heat of vaporization in multiple packages, it is specified in a single location and accessed wherever it is needed. for example, evaporation may occur from the surface of streams or lakes and the energy consumed by the change in phase would be needed in both the sfe and lke packages. this value is set to 2,453,500 j/kg if no overriding value is specified. a user-specified value should be provided for models that use units other than joules and kilograms or if it is necessary to use a value other than the default.", - "longname": "latent heat of vaporization", - "mf6internal": "latheatvap", - "name": "latent_heat_vaporization", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - "save_flows": { - "block": "options", - "description": "keyword to indicate that est flow terms will be written to the file specified with 'budget fileout' in output control.", - "longname": "save calculated flows to budget file", - "name": "save_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "zero_order_decay_solid": { - "block": "options", - "description": "is a text keyword to indicate that zero-order decay will occur in the solid phase. that is, decay occurs in the solid and is a rate per mass (not volume) of solid only. use of this keyword requires that decay_solid is specified in the griddata block.", - "longname": "activate zero-order decay in solid phase", - "mf6internal": "ord0_decay_solid", - "name": "zero_order_decay_solid", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "zero_order_decay_water": { - "block": "options", - "description": "is a text keyword to indicate that zero-order decay will occur in the aqueous phase. that is, decay occurs in the water and is a rate per volume of water only, not per volume of aquifer (i.e., grid cell). use of this keyword requires that decay_water is specified in the griddata block.", - "longname": "activate zero-order decay in aqueous phase", - "mf6internal": "ord0_decay_water", - "name": "zero_order_decay_water", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - }, - } + porosity = ArrayTemplateGenerator(('gwe6', 'est', 'griddata', 'porosity')) + decay_water = ArrayTemplateGenerator(('gwe6', 'est', 'griddata', 'decay_water')) + decay_solid = ArrayTemplateGenerator(('gwe6', 'est', 'griddata', 'decay_solid')) + heat_capacity_solid = ArrayTemplateGenerator(('gwe6', 'est', 'griddata', 'heat_capacity_solid')) + density_solid = ArrayTemplateGenerator(('gwe6', 'est', 'griddata', 'density_solid')) + package_abbr = 'gweest' + _package_type = 'est' + dfn_file_name = 'gwe-est.dfn' + dfn = [['header'], ['block options', 'name save_flows', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name zero_order_decay_water', 'type keyword', 'reader urword', 'optional true', 'mf6internal ord0_decay_water'], ['block options', 'name zero_order_decay_solid', 'type keyword', 'reader urword', 'optional true', 'mf6internal ord0_decay_solid'], ['block options', 'name density_water', 'type double precision', 'reader urword', 'optional true', 'default 1000.0', 'mf6internal rhow'], ['block options', 'name heat_capacity_water', 'type double precision', 'reader urword', 'optional true', 'default 4184.0', 'mf6internal cpw'], ['block options', 'name latent_heat_vaporization', 'type double precision', 'reader urword', 'optional true', 'default 2453500.0', 'mf6internal latheatvap'], ['block griddata', 'name porosity', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true'], ['block griddata', 'name decay_water', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'optional true'], ['block griddata', 'name decay_solid', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'optional true'], ['block griddata', 'name heat_capacity_solid', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'mf6internal cps'], ['block griddata', 'name density_solid', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'mf6internal rhos']] def __init__( self, @@ -338,6 +115,7 @@ def __init__( decay_solid=None, heat_capacity_solid=None, density_solid=None, + filename=None, pname=None, **kwargs, @@ -352,26 +130,17 @@ def __init__( **kwargs, ) - self.save_flows = self.build_mfdata("save_flows", save_flows) - self.zero_order_decay_water = self.build_mfdata( - "zero_order_decay_water", zero_order_decay_water - ) - self.zero_order_decay_solid = self.build_mfdata( - "zero_order_decay_solid", zero_order_decay_solid - ) - self.density_water = self.build_mfdata("density_water", density_water) - self.heat_capacity_water = self.build_mfdata( - "heat_capacity_water", heat_capacity_water - ) - self.latent_heat_vaporization = self.build_mfdata( - "latent_heat_vaporization", latent_heat_vaporization - ) - self.porosity = self.build_mfdata("porosity", porosity) - self.decay_water = self.build_mfdata("decay_water", decay_water) - self.decay_solid = self.build_mfdata("decay_solid", decay_solid) - self.heat_capacity_solid = self.build_mfdata( - "heat_capacity_solid", heat_capacity_solid - ) - self.density_solid = self.build_mfdata("density_solid", density_solid) + self.save_flows = self.build_mfdata('save_flows', save_flows) + self.zero_order_decay_water = self.build_mfdata('zero_order_decay_water', zero_order_decay_water) + self.zero_order_decay_solid = self.build_mfdata('zero_order_decay_solid', zero_order_decay_solid) + self.density_water = self.build_mfdata('density_water', density_water) + self.heat_capacity_water = self.build_mfdata('heat_capacity_water', heat_capacity_water) + self.latent_heat_vaporization = self.build_mfdata('latent_heat_vaporization', latent_heat_vaporization) + self.porosity = self.build_mfdata('porosity', porosity) + self.decay_water = self.build_mfdata('decay_water', decay_water) + self.decay_solid = self.build_mfdata('decay_solid', decay_solid) + self.heat_capacity_solid = self.build_mfdata('heat_capacity_solid', heat_capacity_solid) + self.density_solid = self.build_mfdata('density_solid', density_solid) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwefmi.py b/flopy/mf6/modflow/mfgwefmi.py index 49f15ec849..ba668643ac 100644 --- a/flopy/mf6/modflow/mfgwefmi.py +++ b/flopy/mf6/modflow/mfgwefmi.py @@ -56,133 +56,11 @@ class ModflowGwefmi(MFPackage): """ - packagedata = ListTemplateGenerator(("gwe6", "fmi", "packagedata", "packagedata")) - package_abbr = "gwefmi" - _package_type = "fmi" - dfn_file_name = "gwe-fmi.dfn" - dfn = [ - ["header"], - [ - "block options", - "name save_flows", - "type keyword", - "reader urword", - "optional true", - ], - [ - "block options", - "name flow_imbalance_correction", - "type keyword", - "reader urword", - "optional true", - "mf6internal imbalancecorrect", - ], - [ - "block packagedata", - "name packagedata", - "type recarray flowtype filein fname", - "reader urword", - "optional true", - ], - [ - "block packagedata", - "name flowtype", - "in_record true", - "type string", - "tagged false", - "reader urword", - ], - [ - "block packagedata", - "name filein", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block packagedata", - "name fname", - "in_record true", - "type string", - "preserve_case true", - "tagged false", - "reader urword", - ], - ] - spec = { - "advanced": False, - "multi": False, - "name": "gwe-fmi", - "options": { - "flow_imbalance_correction": { - "block": "options", - "description": "correct for an imbalance in flows by assuming that any residual flow error comes in or leaves at the temperature of the cell. when this option is activated, the gwe model budget written to the listing file will contain two additional entries: flow-error and flow-correction. these two entries will be equal but opposite in sign. the flow-correction term is a mass flow that is added to offset the error caused by an imprecise flow balance. if these terms are not relatively small, the flow model should be rerun with stricter convergence tolerances.", - "longname": "correct for flow imbalance", - "mf6internal": "imbalancecorrect", - "name": "flow_imbalance_correction", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "save_flows": { - "block": "options", - "description": "keyword to indicate that fmi flow terms will be written to the file specified with 'budget fileout' in output control.", - "longname": "save calculated flow imbalance correction to budget file", - "name": "save_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - }, - "packagedata": { - "packagedata": { - "block": "packagedata", - "item": { - "block": "packagedata", - "fields": { - "filein": { - "block": "packagedata", - "description": "keyword to specify that an input filename is expected next.", - "longname": "file keyword", - "name": "filein", - "optional": "false", - "reader": "urword", - "type": "keyword", - }, - "flowtype": { - "block": "packagedata", - "description": "is the word GWFBUDGET, GWFHEAD, GWFGRID, GWFMOVER or the name of an advanced GWF stress package from a previous model run. If GWFBUDGET is specified, then the corresponding file must be a budget file. If GWFHEAD is specified, the file must be a head file. If GWFGRID is specified, the file must be a binary grid file. If GWFMOVER is specified, the file must be a mover file. If an advanced GWF stress package name appears then the corresponding file must be the budget file saved by a LAK, SFR, MAW or UZF Package.", - "longname": "flow type", - "name": "flowtype", - "reader": "urword", - "type": "string", - }, - "fname": { - "block": "packagedata", - "description": "is the name of the file containing flows. The path to the file should be included if the file is not located in the folder where the program was run.", - "longname": "file name", - "name": "fname", - "reader": "urword", - "type": "string", - }, - }, - "longname": "flowtype list", - "name": "packagedata", - "optional": True, - "reader": "urword", - "type": "record", - }, - "longname": "flowtype list", - "name": "packagedata", - "optional": True, - "reader": "urword", - "type": "recarray", - } - }, - } + packagedata = ListTemplateGenerator(('gwe6', 'fmi', 'packagedata', 'packagedata')) + package_abbr = 'gwefmi' + _package_type = 'fmi' + dfn_file_name = 'gwe-fmi.dfn' + dfn = [['header'], ['block options', 'name save_flows', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name flow_imbalance_correction', 'type keyword', 'reader urword', 'optional true', 'mf6internal imbalancecorrect'], ['block packagedata', 'name packagedata', 'type recarray flowtype filein fname', 'reader urword', 'optional true'], ['block packagedata', 'name flowtype', 'in_record true', 'type string', 'tagged false', 'reader urword'], ['block packagedata', 'name filein', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block packagedata', 'name fname', 'in_record true', 'type string', 'preserve_case true', 'tagged false', 'reader urword']] def __init__( self, @@ -191,6 +69,7 @@ def __init__( save_flows=None, flow_imbalance_correction=None, packagedata=None, + filename=None, pname=None, **kwargs, @@ -205,10 +84,9 @@ def __init__( **kwargs, ) - self.save_flows = self.build_mfdata("save_flows", save_flows) - self.flow_imbalance_correction = self.build_mfdata( - "flow_imbalance_correction", flow_imbalance_correction - ) - self.packagedata = self.build_mfdata("packagedata", packagedata) + self.save_flows = self.build_mfdata('save_flows', save_flows) + self.flow_imbalance_correction = self.build_mfdata('flow_imbalance_correction', flow_imbalance_correction) + self.packagedata = self.build_mfdata('packagedata', packagedata) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwegwe.py b/flopy/mf6/modflow/mfgwegwe.py index a832a49d5f..8c8be3c77d 100644 --- a/flopy/mf6/modflow/mfgwegwe.py +++ b/flopy/mf6/modflow/mfgwegwe.py @@ -7,7 +7,6 @@ from flopy.mf6.data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator from flopy.mf6.mfpackage import MFPackage - class ModflowGwegwe(MFPackage): """ ModflowGwegwe defines a GWEGWE package. @@ -139,533 +138,14 @@ class ModflowGwegwe(MFPackage): """ - auxiliary = ArrayTemplateGenerator(("gwegwe", "options", "auxiliary")) - mve_filerecord = ListTemplateGenerator(("gwegwe", "options", "mve_filerecord")) - obs_filerecord = ListTemplateGenerator(("gwegwe", "options", "obs_filerecord")) - exchangedata = ListTemplateGenerator(("gwegwe", "exchangedata", "exchangedata")) - package_abbr = "gwegwe" - _package_type = "gwegwe" - dfn_file_name = "exg-gwegwe.dfn" - dfn = [ - ["header", "multi-package"], - [ - "block options", - "name gwfmodelname1", - "type string", - "reader urword", - "optional false", - ], - [ - "block options", - "name gwfmodelname2", - "type string", - "reader urword", - "optional false", - ], - [ - "block options", - "name auxiliary", - "type string", - "shape (naux)", - "reader urword", - "optional true", - ], - [ - "block options", - "name boundnames", - "type keyword", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name print_input", - "type keyword", - "reader urword", - "optional true", - "mf6internal iprpak", - ], - [ - "block options", - "name print_flows", - "type keyword", - "reader urword", - "optional true", - "mf6internal iprflow", - ], - [ - "block options", - "name save_flows", - "type keyword", - "reader urword", - "optional true", - "mf6internal ipakcb", - ], - [ - "block options", - "name adv_scheme", - "type string", - "valid upstream central tvd", - "reader urword", - "optional true", - ], - [ - "block options", - "name cnd_xt3d_off", - "type keyword", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name cnd_xt3d_rhs", - "type keyword", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name filein", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name mve_filerecord", - "type record mve6 filein mve6_filename", - "shape", - "reader urword", - "tagged true", - "optional true", - "construct_package mve", - "construct_data perioddata", - "parameter_name perioddata", - ], - [ - "block options", - "name mve6", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name mve6_filename", - "type string", - "preserve_case true", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block options", - "name obs_filerecord", - "type record obs6 filein obs6_filename", - "shape", - "reader urword", - "tagged true", - "optional true", - "construct_package obs", - "construct_data observations", - "parameter_name continuous", - ], - [ - "block options", - "name obs6", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name obs6_filename", - "type string", - "preserve_case true", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block options", - "name dev_interfacemodel_on", - "type keyword", - "reader urword", - "optional true", - "mf6internal dev_ifmod_on", - ], - [ - "block dimensions", - "name nexg", - "type integer", - "reader urword", - "optional false", - ], - [ - "block exchangedata", - "name exchangedata", - "type recarray cellidm1 cellidm2 ihc cl1 cl2 hwva aux boundname", - "shape (nexg)", - "reader urword", - "optional false", - ], - [ - "block exchangedata", - "name cellidm1", - "type integer", - "in_record true", - "tagged false", - "reader urword", - "optional false", - "numeric_index true", - ], - [ - "block exchangedata", - "name cellidm2", - "type integer", - "in_record true", - "tagged false", - "reader urword", - "optional false", - "numeric_index true", - ], - [ - "block exchangedata", - "name ihc", - "type integer", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block exchangedata", - "name cl1", - "type double precision", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block exchangedata", - "name cl2", - "type double precision", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block exchangedata", - "name hwva", - "type double precision", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block exchangedata", - "name aux", - "type double precision", - "in_record true", - "tagged false", - "shape (naux)", - "reader urword", - "optional true", - "mf6internal auxvar", - ], - [ - "block exchangedata", - "name boundname", - "type string", - "shape", - "tagged false", - "in_record true", - "reader urword", - "optional true", - ], - ] - spec = { - "advanced": False, - "dimensions": { - "nexg": { - "block": "dimensions", - "description": "keyword and integer value specifying the number of gwe-gwe exchanges.", - "longname": "number of exchanges", - "name": "nexg", - "optional": False, - "reader": "urword", - "type": "integer", - } - }, - "exchangedata": { - "exchangedata": { - "block": "exchangedata", - "item": { - "block": "exchangedata", - "fields": { - "aux": { - "block": "exchangedata", - "description": "represents the values of the auxiliary variables for each GWEGWE Exchange. The values of auxiliary variables must be present for each exchange. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block.", - "longname": "auxiliary variables", - "mf6internal": "auxvar", - "name": "aux", - "optional": "true", - "reader": "urword", - "shape": "(naux)", - "type": "double precision", - }, - "boundname": { - "block": "exchangedata", - "description": "name of the GWE Exchange cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", - "longname": "exchange boundname", - "name": "boundname", - "optional": "true", - "reader": "urword", - "type": "string", - }, - "cellidm1": { - "block": "exchangedata", - "description": "is the cellid of the cell in model 1 as specified in the simulation name file. For a structured grid that uses the DIS input file, CELLIDM1 is the layer, row, and column numbers of the cell. For a grid that uses the DISV input file, CELLIDM1 is the layer number and CELL2D number for the two cells. If the model uses the unstructured discretization (DISU) input file, then CELLIDM1 is the node number for the cell.", - "longname": "cellid of first cell", - "name": "cellidm1", - "numeric_index": "true", - "optional": "false", - "reader": "urword", - "type": "integer", - }, - "cellidm2": { - "block": "exchangedata", - "description": "is the cellid of the cell in model 2 as specified in the simulation name file. For a structured grid that uses the DIS input file, CELLIDM2 is the layer, row, and column numbers of the cell. For a grid that uses the DISV input file, CELLIDM2 is the layer number and CELL2D number for the two cells. If the model uses the unstructured discretization (DISU) input file, then CELLIDM2 is the node number for the cell.", - "longname": "cellid of second cell", - "name": "cellidm2", - "numeric_index": "true", - "optional": "false", - "reader": "urword", - "type": "integer", - }, - "cl1": { - "block": "exchangedata", - "description": "is the distance between the center of cell 1 and the its shared face with cell 2.", - "longname": "connection distance", - "name": "cl1", - "optional": "false", - "reader": "urword", - "type": "double precision", - }, - "cl2": { - "block": "exchangedata", - "description": "is the distance between the center of cell 2 and the its shared face with cell 1.", - "longname": "connection distance", - "name": "cl2", - "optional": "false", - "reader": "urword", - "type": "double precision", - }, - "hwva": { - "block": "exchangedata", - "description": "is the horizontal width of the flow connection between cell 1 and cell 2 if IHC $>$ 0, or it is the area perpendicular to flow of the vertical connection between cell 1 and cell 2 if IHC = 0.", - "longname": "horizontal cell width or area for vertical flow", - "name": "hwva", - "optional": "false", - "reader": "urword", - "type": "double precision", - }, - "ihc": { - "block": "exchangedata", - "description": "is an integer flag indicating the direction between node n and all of its m connections. If IHC = 0 then the connection is vertical. If IHC = 1 then the connection is horizontal. If IHC = 2 then the connection is horizontal for a vertically staggered grid.", - "longname": "integer flag for connection type", - "name": "ihc", - "optional": "false", - "reader": "urword", - "type": "integer", - }, - }, - "longname": "exchange data", - "name": "exchangedata", - "optional": False, - "reader": "urword", - "type": "record", - }, - "longname": "exchange data", - "name": "exchangedata", - "optional": False, - "reader": "urword", - "shape": "(nexg)", - "type": "recarray", - } - }, - "fkeys": { - "mve_filerecord": { - "abbr": "mve", - "key": "mve_filerecord", - "param": "perioddata", - "parent": "parent_model_or_package", - "val": "perioddata", - }, - "obs_filerecord": { - "abbr": "obs", - "key": "obs_filerecord", - "param": "continuous", - "parent": "parent_model_or_package", - "val": "observations", - }, - }, - "multi": True, - "name": "exg-gwegwe", - "options": { - "adv_scheme": { - "block": "options", - "description": "scheme used to solve the advection term. can be upstream, central, or tvd. if not specified, upstream weighting is the default weighting scheme.", - "longname": "advective scheme", - "name": "adv_scheme", - "optional": True, - "reader": "urword", - "type": "string", - "valid": "upstream central tvd", - }, - "auxiliary": { - "block": "options", - "description": "an array of auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided. most auxiliary variables will not be used by the gwe-gwe exchange, but they will be available for use by other parts of the program. if an auxiliary variable with the name 'angldegx' is found, then this information will be used as the angle (provided in degrees) between the connection face normal and the x axis, where a value of zero indicates that a normal vector points directly along the positive x axis. the connection face normal is a normal vector on the cell face shared between the cell in model 1 and the cell in model 2 pointing away from the model 1 cell. additional information on 'angldegx' is provided in the description of the disu package. if an auxiliary variable with the name 'cdist' is found, then this information will be used as the straight-line connection distance, including the vertical component, between the two cell centers. both angldegx and cdist are required if specific discharge is calculated for either of the groundwater models.", - "longname": "keyword to specify aux variables", - "name": "auxiliary", - "optional": True, - "reader": "urword", - "shape": "(naux)", - "type": "string", - }, - "boundnames": { - "block": "options", - "description": "keyword to indicate that boundary names may be provided with the list of gwe exchange cells.", - "name": "boundnames", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "cnd_xt3d_off": { - "block": "options", - "description": "deactivate the xt3d method for the dispersive flux and use the faster and less accurate approximation for this exchange.", - "longname": "deactivate xt3d", - "name": "cnd_xt3d_off", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "cnd_xt3d_rhs": { - "block": "options", - "description": "add xt3d dispersion terms to right-hand side, when possible, for this exchange.", - "longname": "xt3d on right-hand side", - "name": "cnd_xt3d_rhs", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "dev_interfacemodel_on": { - "block": "options", - "description": "activates the interface model mechanism for calculating the coefficients at (and possibly near) the exchange. this keyword should only be used for development purposes.", - "longname": "activate interface model on exchange", - "mf6internal": "dev_ifmod_on", - "name": "dev_interfacemodel_on", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "gwfmodelname1": { - "block": "options", - "description": "keyword to specify name of first corresponding gwf model. in the simulation name file, the gwe6-gwe6 entry contains names for gwe models (exgmnamea and exgmnameb). the gwe model with the name exgmnamea must correspond to the gwf model with the name gwfmodelname1.", - "longname": "keyword to specify name of first corresponding gwf model", - "name": "gwfmodelname1", - "optional": False, - "reader": "urword", - "type": "string", - }, - "gwfmodelname2": { - "block": "options", - "description": "keyword to specify name of second corresponding gwf model. in the simulation name file, the gwe6-gwe6 entry contains names for gwe models (exgmnamea and exgmnameb). the gwe model with the name exgmnameb must correspond to the gwf model with the name gwfmodelname2.", - "longname": "keyword to specify name of second corresponding gwf model", - "name": "gwfmodelname2", - "optional": False, - "reader": "urword", - "type": "string", - }, - "observations": { - "block": "options", - "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", - "name": "observations", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "obs", - "key": "obs_filerecord", - "param": "continuous", - "parent": "parent_model_or_package", - "val": "observations", - }, - "type": "record obs6 filein obs6_filename", - }, - "perioddata": { - "block": "options", - "description": "Contains data for the mve package. Data can be passed as a dictionary to the mve package with variable names as keys and package data as values. Data for the perioddata variable is also acceptable. See mve package documentation for more information.", - "name": "perioddata", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "mve", - "key": "mve_filerecord", - "param": "perioddata", - "parent": "parent_model_or_package", - "val": "perioddata", - }, - "type": "record mve6 filein mve6_filename", - }, - "print_flows": { - "block": "options", - "description": "keyword to indicate that the list of exchange flow rates will be printed to the listing file for every stress period in which 'save budget' is specified in output control.", - "longname": "keyword to print gwfgwf flows to list file", - "mf6internal": "iprflow", - "name": "print_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "print_input": { - "block": "options", - "description": "keyword to indicate that the list of exchange entries will be echoed to the listing file immediately after it is read.", - "longname": "keyword to print input to list file", - "mf6internal": "iprpak", - "name": "print_input", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "save_flows": { - "block": "options", - "description": "keyword to indicate that cell-by-cell flow terms will be written to the budget file for each model provided that the output control for the models are set up with the 'budget save file' option.", - "longname": "keyword to save gwfgwf flows", - "mf6internal": "ipakcb", - "name": "save_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - }, - } + auxiliary = ArrayTemplateGenerator(('gwegwe', 'options', 'auxiliary')) + mve_filerecord = ListTemplateGenerator(('gwegwe', 'options', 'mve_filerecord')) + obs_filerecord = ListTemplateGenerator(('gwegwe', 'options', 'obs_filerecord')) + exchangedata = ListTemplateGenerator(('gwegwe', 'exchangedata', 'exchangedata')) + package_abbr = 'gwegwe' + _package_type = 'gwegwe' + dfn_file_name = 'exg-gwegwe.dfn' + dfn = [['header', 'multi-package'], ['block options', 'name gwfmodelname1', 'type string', 'reader urword', 'optional false'], ['block options', 'name gwfmodelname2', 'type string', 'reader urword', 'optional false'], ['block options', 'name auxiliary', 'type string', 'shape (naux)', 'reader urword', 'optional true'], ['block options', 'name boundnames', 'type keyword', 'shape', 'reader urword', 'optional true'], ['block options', 'name print_input', 'type keyword', 'reader urword', 'optional true', 'mf6internal iprpak'], ['block options', 'name print_flows', 'type keyword', 'reader urword', 'optional true', 'mf6internal iprflow'], ['block options', 'name save_flows', 'type keyword', 'reader urword', 'optional true', 'mf6internal ipakcb'], ['block options', 'name adv_scheme', 'type string', 'valid upstream central tvd', 'reader urword', 'optional true'], ['block options', 'name cnd_xt3d_off', 'type keyword', 'shape', 'reader urword', 'optional true'], ['block options', 'name cnd_xt3d_rhs', 'type keyword', 'shape', 'reader urword', 'optional true'], ['block options', 'name filein', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name mve_filerecord', 'type record mve6 filein mve6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package mve', 'construct_data perioddata', 'parameter_name perioddata'], ['block options', 'name mve6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name mve6_filename', 'type string', 'preserve_case true', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block options', 'name obs_filerecord', 'type record obs6 filein obs6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package obs', 'construct_data observations', 'parameter_name continuous'], ['block options', 'name obs6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name obs6_filename', 'type string', 'preserve_case true', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block options', 'name dev_interfacemodel_on', 'type keyword', 'reader urword', 'optional true', 'mf6internal dev_ifmod_on'], ['block dimensions', 'name nexg', 'type integer', 'reader urword', 'optional false'], ['block exchangedata', 'name exchangedata', 'type recarray cellidm1 cellidm2 ihc cl1 cl2 hwva aux boundname', 'shape (nexg)', 'reader urword', 'optional false'], ['block exchangedata', 'name cellidm1', 'type integer', 'in_record true', 'tagged false', 'reader urword', 'optional false', 'numeric_index true'], ['block exchangedata', 'name cellidm2', 'type integer', 'in_record true', 'tagged false', 'reader urword', 'optional false', 'numeric_index true'], ['block exchangedata', 'name ihc', 'type integer', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block exchangedata', 'name cl1', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block exchangedata', 'name cl2', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block exchangedata', 'name hwva', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block exchangedata', 'name aux', 'type double precision', 'in_record true', 'tagged false', 'shape (naux)', 'reader urword', 'optional true', 'mf6internal auxvar'], ['block exchangedata', 'name boundname', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword', 'optional true']] def __init__( self, @@ -689,6 +169,7 @@ def __init__( dev_interfacemodel_on=None, nexg=None, exchangedata=None, + filename=None, pname=None, **kwargs, @@ -708,28 +189,22 @@ def __init__( self.exgmnameb = exgmnameb simulation.register_exchange_file(self) - self.gwfmodelname1 = self.build_mfdata("gwfmodelname1", gwfmodelname1) - self.gwfmodelname2 = self.build_mfdata("gwfmodelname2", gwfmodelname2) - self.auxiliary = self.build_mfdata("auxiliary", auxiliary) - self.boundnames = self.build_mfdata("boundnames", boundnames) - self.print_input = self.build_mfdata("print_input", print_input) - self.print_flows = self.build_mfdata("print_flows", print_flows) - self.save_flows = self.build_mfdata("save_flows", save_flows) - self.adv_scheme = self.build_mfdata("adv_scheme", adv_scheme) - self.cnd_xt3d_off = self.build_mfdata("cnd_xt3d_off", cnd_xt3d_off) - self.cnd_xt3d_rhs = self.build_mfdata("cnd_xt3d_rhs", cnd_xt3d_rhs) - self._mve_filerecord = self.build_mfdata("mve_filerecord", None) - self._mve_package = self.build_child_package( - "mve", perioddata, "perioddata", self._mve_filerecord - ) - self._obs_filerecord = self.build_mfdata("obs_filerecord", None) - self._obs_package = self.build_child_package( - "obs", observations, "continuous", self._obs_filerecord - ) - self.dev_interfacemodel_on = self.build_mfdata( - "dev_interfacemodel_on", dev_interfacemodel_on - ) - self.nexg = self.build_mfdata("nexg", nexg) - self.exchangedata = self.build_mfdata("exchangedata", exchangedata) + self.gwfmodelname1 = self.build_mfdata('gwfmodelname1', gwfmodelname1) + self.gwfmodelname2 = self.build_mfdata('gwfmodelname2', gwfmodelname2) + self.auxiliary = self.build_mfdata('auxiliary', auxiliary) + self.boundnames = self.build_mfdata('boundnames', boundnames) + self.print_input = self.build_mfdata('print_input', print_input) + self.print_flows = self.build_mfdata('print_flows', print_flows) + self.save_flows = self.build_mfdata('save_flows', save_flows) + self.adv_scheme = self.build_mfdata('adv_scheme', adv_scheme) + self.cnd_xt3d_off = self.build_mfdata('cnd_xt3d_off', cnd_xt3d_off) + self.cnd_xt3d_rhs = self.build_mfdata('cnd_xt3d_rhs', cnd_xt3d_rhs) + self._mve_filerecord = self.build_mfdata('mve_filerecord', None) + self._mve_package = self.build_child_package('mve', perioddata, 'perioddata', self._mve_filerecord) + self._obs_filerecord = self.build_mfdata('obs_filerecord', None) + self._obs_package = self.build_child_package('obs', observations, 'continuous', self._obs_filerecord) + self.dev_interfacemodel_on = self.build_mfdata('dev_interfacemodel_on', dev_interfacemodel_on) + self.nexg = self.build_mfdata('nexg', nexg) + self.exchangedata = self.build_mfdata('exchangedata', exchangedata) self._init_complete = True diff --git a/flopy/mf6/modflow/mfgweic.py b/flopy/mf6/modflow/mfgweic.py index 9736c67708..b0f8393971 100644 --- a/flopy/mf6/modflow/mfgweic.py +++ b/flopy/mf6/modflow/mfgweic.py @@ -42,82 +42,11 @@ class ModflowGweic(MFPackage): """ - strt = ArrayTemplateGenerator(("gwe6", "ic", "griddata", "strt")) - package_abbr = "gweic" - _package_type = "ic" - dfn_file_name = "gwe-ic.dfn" - dfn = [ - ["header"], - [ - "block options", - "name export_array_ascii", - "type keyword", - "reader urword", - "optional true", - "mf6internal export_ascii", - ], - [ - "block options", - "name export_array_netcdf", - "type keyword", - "reader urword", - "optional true", - "mf6internal export_nc", - "extended true", - ], - [ - "block griddata", - "name strt", - "type double precision", - "shape (nodes)", - "reader readarray", - "layered true", - "netcdf true", - "default 0.0", - ], - ] - spec = { - "advanced": False, - "griddata": { - "strt": { - "block": "griddata", - "default": 0.0, - "description": "is the initial (starting) temperature---that is, the temperature at the beginning of the gwe model simulation. strt must be specified for all gwe model simulations. one value is read for every model cell.", - "layered": True, - "longname": "starting temperature", - "name": "strt", - "netcdf": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - } - }, - "multi": False, - "name": "gwe-ic", - "options": { - "export_array_ascii": { - "block": "options", - "description": "keyword that specifies input griddata arrays should be written to layered ascii output files.", - "longname": "export array variables to layered ascii files.", - "mf6internal": "export_ascii", - "name": "export_array_ascii", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "export_array_netcdf": { - "block": "options", - "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", - "extended": True, - "longname": "export array variables to netcdf output files.", - "mf6internal": "export_nc", - "name": "export_array_netcdf", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - }, - } + strt = ArrayTemplateGenerator(('gwe6', 'ic', 'griddata', 'strt')) + package_abbr = 'gweic' + _package_type = 'ic' + dfn_file_name = 'gwe-ic.dfn' + dfn = [['header'], ['block options', 'name export_array_ascii', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_ascii'], ['block options', 'name export_array_netcdf', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_nc', 'extended true'], ['block griddata', 'name strt', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true', 'default 0.0']] def __init__( self, @@ -126,6 +55,7 @@ def __init__( export_array_ascii=None, export_array_netcdf=None, strt=0.0, + filename=None, pname=None, **kwargs, @@ -140,12 +70,9 @@ def __init__( **kwargs, ) - self.export_array_ascii = self.build_mfdata( - "export_array_ascii", export_array_ascii - ) - self.export_array_netcdf = self.build_mfdata( - "export_array_netcdf", export_array_netcdf - ) - self.strt = self.build_mfdata("strt", strt) + self.export_array_ascii = self.build_mfdata('export_array_ascii', export_array_ascii) + self.export_array_netcdf = self.build_mfdata('export_array_netcdf', export_array_netcdf) + self.strt = self.build_mfdata('strt', strt) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwelke.py b/flopy/mf6/modflow/mfgwelke.py index db3b63fb0c..e9d10cf7d1 100644 --- a/flopy/mf6/modflow/mfgwelke.py +++ b/flopy/mf6/modflow/mfgwelke.py @@ -187,828 +187,18 @@ class ModflowGwelke(MFPackage): """ - auxiliary = ArrayTemplateGenerator(("gwe6", "lke", "options", "auxiliary")) - temperature_filerecord = ListTemplateGenerator( - ("gwe6", "lke", "options", "temperature_filerecord") - ) - budget_filerecord = ListTemplateGenerator( - ("gwe6", "lke", "options", "budget_filerecord") - ) - budgetcsv_filerecord = ListTemplateGenerator( - ("gwe6", "lke", "options", "budgetcsv_filerecord") - ) - ts_filerecord = ListTemplateGenerator(("gwe6", "lke", "options", "ts_filerecord")) - obs_filerecord = ListTemplateGenerator(("gwe6", "lke", "options", "obs_filerecord")) - packagedata = ListTemplateGenerator(("gwe6", "lke", "packagedata", "packagedata")) - lakeperioddata = ListTemplateGenerator(("gwe6", "lke", "period", "lakeperioddata")) - package_abbr = "gwelke" - _package_type = "lke" - dfn_file_name = "gwe-lke.dfn" - dfn = [ - ["header", "multi-package"], - [ - "block options", - "name flow_package_name", - "type string", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name auxiliary", - "type string", - "shape (naux)", - "reader urword", - "optional true", - ], - [ - "block options", - "name flow_package_auxiliary_name", - "type string", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name boundnames", - "type keyword", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name print_input", - "type keyword", - "reader urword", - "optional true", - ], - [ - "block options", - "name print_temperature", - "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 temperature_filerecord", - "type record temperature fileout tempfile", - "shape", - "reader urword", - "tagged true", - "optional true", - ], - [ - "block options", - "name temperature", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name tempfile", - "type string", - "preserve_case true", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - ], - [ - "block options", - "name budget_filerecord", - "type record budget fileout budgetfile", - "shape", - "reader urword", - "tagged true", - "optional true", - ], - [ - "block options", - "name budget", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name fileout", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name budgetfile", - "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", - ], - [ - "block options", - "name ts_filerecord", - "type record ts6 filein ts6_filename", - "shape", - "reader urword", - "tagged true", - "optional true", - "construct_package ts", - "construct_data timeseries", - "parameter_name timeseries", - ], - [ - "block options", - "name ts6", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name filein", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name ts6_filename", - "type string", - "preserve_case true", - "in_record true", - "reader urword", - "optional false", - "tagged false", - ], - [ - "block options", - "name obs_filerecord", - "type record obs6 filein obs6_filename", - "shape", - "reader urword", - "tagged true", - "optional true", - "construct_package obs", - "construct_data observations", - "parameter_name continuous", - ], - [ - "block options", - "name obs6", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name obs6_filename", - "type string", - "preserve_case true", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block packagedata", - "name packagedata", - "type recarray lakeno strt ktf rbthcnd aux boundname", - "shape (maxbound)", - "reader urword", - ], - [ - "block packagedata", - "name lakeno", - "type integer", - "shape", - "tagged false", - "in_record true", - "reader urword", - "numeric_index true", - ], - [ - "block packagedata", - "name strt", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block packagedata", - "name ktf", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block packagedata", - "name rbthcnd", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block packagedata", - "name aux", - "type double precision", - "in_record true", - "tagged false", - "shape (naux)", - "reader urword", - "time_series true", - "optional true", - ], - [ - "block packagedata", - "name boundname", - "type string", - "shape", - "tagged false", - "in_record true", - "reader urword", - "optional true", - ], - [ - "block period", - "name iper", - "type integer", - "block_variable true", - "in_record true", - "tagged false", - "shape", - "valid", - "reader urword", - "optional false", - ], - [ - "block period", - "name lakeperioddata", - "type recarray lakeno laksetting", - "shape", - "reader urword", - ], - [ - "block period", - "name lakeno", - "type integer", - "shape", - "tagged false", - "in_record true", - "reader urword", - "numeric_index true", - ], - [ - "block period", - "name laksetting", - "type keystring status temperature rainfall evaporation runoff ext-inflow auxiliaryrecord", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block period", - "name status", - "type string", - "shape", - "tagged true", - "in_record true", - "reader urword", - ], - [ - "block period", - "name temperature", - "type string", - "shape", - "tagged true", - "in_record true", - "time_series true", - "reader urword", - ], - [ - "block period", - "name rainfall", - "type string", - "shape", - "tagged true", - "in_record true", - "reader urword", - "time_series true", - ], - [ - "block period", - "name evaporation", - "type string", - "shape", - "tagged true", - "in_record true", - "reader urword", - "time_series true", - ], - [ - "block period", - "name runoff", - "type string", - "shape", - "tagged true", - "in_record true", - "reader urword", - "time_series true", - ], - [ - "block period", - "name ext-inflow", - "type string", - "shape", - "tagged true", - "in_record true", - "reader urword", - "time_series true", - ], - [ - "block period", - "name auxiliaryrecord", - "type record auxiliary auxname auxval", - "shape", - "tagged", - "in_record true", - "reader urword", - ], - [ - "block period", - "name auxiliary", - "type keyword", - "shape", - "in_record true", - "reader urword", - ], - [ - "block period", - "name auxname", - "type string", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block period", - "name auxval", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - "time_series true", - ], - ] - spec = { - "advanced": False, - "fkeys": { - "obs_filerecord": { - "abbr": "obs", - "key": "obs_filerecord", - "param": "continuous", - "parent": "parent_model_or_package", - "val": "observations", - }, - "ts_filerecord": { - "abbr": "ts", - "description": "xxx", - "key": "ts_filerecord", - "param": "timeseries", - "parent": "parent_package", - "val": "timeseries", - }, - }, - "multi": True, - "name": "gwe-lke", - "options": { - "auxiliary": { - "block": "options", - "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", - "longname": "keyword to specify aux variables", - "name": "auxiliary", - "optional": True, - "reader": "urword", - "shape": "(naux)", - "type": "string", - }, - "boundnames": { - "block": "options", - "description": "keyword to indicate that boundary names may be provided with the list of lake cells.", - "name": "boundnames", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "budget_filerecord": { - "block": "options", - "fields": { - "budgetfile": { - "block": "options", - "description": "name of the binary output file to write budget information.", - "longname": "file keyword", - "name": "budgetfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "budget_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "budgetcsv_filerecord": { - "block": "options", - "fields": { - "budgetcsvfile": { - "block": "options", - "description": "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.", - "longname": "file keyword", - "name": "budgetcsvfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "budgetcsv_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "flow_package_auxiliary_name": { - "block": "options", - "description": "keyword to specify the name of an auxiliary variable in the corresponding flow package. if specified, then the simulated temperatures from this advanced transport package will be copied into the auxiliary variable specified with this name. note that the flow package must have an auxiliary variable with this name or the program will terminate with an error. if the flows for this advanced transport package are read from a file, then this option will have no effect.", - "longname": "keyword to specify name of temperature auxiliary variable in flow package", - "name": "flow_package_auxiliary_name", - "optional": True, - "reader": "urword", - "type": "string", - }, - "flow_package_name": { - "block": "options", - "description": "keyword to specify the name of the corresponding flow package. if not specified, then the corresponding flow package must have the same name as this advanced transport package (the name associated with this package in the gwe name file).", - "longname": "keyword to specify name of corresponding flow package", - "name": "flow_package_name", - "optional": True, - "reader": "urword", - "type": "string", - }, - "observations": { - "block": "options", - "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", - "name": "observations", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "obs", - "key": "obs_filerecord", - "param": "continuous", - "parent": "parent_model_or_package", - "val": "observations", - }, - "type": "record obs6 filein obs6_filename", - }, - "print_flows": { - "block": "options", - "description": "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.", - "longname": "print calculated flows to listing file", - "name": "print_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "print_input": { - "block": "options", - "description": "keyword to indicate that the list of lake information will be written to the listing file immediately after it is read.", - "longname": "print input to listing file", - "name": "print_input", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "print_temperature": { - "block": "options", - "description": "keyword to indicate that the list of lake {#2} will be printed to the listing file for every stress period in which 'temperature print' is specified in output control. if there is no output control option and print_{#3} is specified, then {#2} are printed for the last time step of each stress period.", - "longname": "print calculated temperatures to listing file", - "name": "print_temperature", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "save_flows": { - "block": "options", - "description": "keyword to indicate that lake flow terms will be written to the file specified with 'budget fileout' in output control.", - "longname": "save lake flows to budget file", - "name": "save_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "temperature_filerecord": { - "block": "options", - "fields": { - "tempfile": { - "block": "options", - "description": "name of the binary output file to write temperature information.", - "longname": "file keyword", - "name": "tempfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "temperature_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "timeseries": { - "block": "options", - "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", - "name": "timeseries", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "ts", - "description": "xxx", - "key": "ts_filerecord", - "param": "timeseries", - "parent": "parent_package", - "val": "timeseries", - }, - "type": "record ts6 filein ts6_filename", - }, - }, - "packagedata": { - "packagedata": { - "block": "packagedata", - "item": { - "block": "packagedata", - "fields": { - "aux": { - "block": "packagedata", - "description": "represents the values of the auxiliary variables for each lake. The values of auxiliary variables must be present for each lake. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "auxiliary variables", - "name": "aux", - "optional": "true", - "reader": "urword", - "shape": "(naux)", - "time_series": "true", - "type": "double precision", - }, - "boundname": { - "block": "packagedata", - "description": "name of the lake cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", - "longname": "lake name", - "name": "boundname", - "optional": "true", - "reader": "urword", - "type": "string", - }, - "ktf": { - "block": "packagedata", - "description": "is the thermal conductivity of the material between the aquifer cell and the lake. The thickness of the material is defined by the variable RBTHCND.", - "longname": "boundary thermal conductivity", - "name": "ktf", - "reader": "urword", - "type": "double precision", - }, - "lakeno": { - "block": "period", - "description": "integer value that defines the lake number associated with the specified PERIOD data on the line. LAKENO must be greater than zero and less than or equal to NLAKES.", - "longname": "lake number for this entry", - "name": "lakeno", - "numeric_index": "true", - "reader": "urword", - "type": "integer", - }, - "rbthcnd": { - "block": "packagedata", - "description": "real value that defines the thickness of the lakebed material through which conduction occurs. Must be greater than 0.", - "longname": "streambed thickness", - "name": "rbthcnd", - "reader": "urword", - "type": "double precision", - }, - "strt": { - "block": "packagedata", - "description": "real value that defines the starting temperature for the lake.", - "longname": "starting lake temperature", - "name": "strt", - "reader": "urword", - "type": "double precision", - }, - }, - "name": "packagedata", - "reader": "urword", - "type": "record", - }, - "name": "packagedata", - "reader": "urword", - "shape": "(maxbound)", - "type": "recarray", - } - }, - "period": { - "lakeperioddata": { - "block": "period", - "item": { - "block": "period", - "fields": { - "lakeno": { - "block": "period", - "description": "integer value that defines the lake number associated with the specified period data on the line. lakeno must be greater than zero and less than or equal to nlakes.", - "longname": "lake number for this entry", - "name": "lakeno", - "numeric_index": True, - "reader": "urword", - "type": "integer", - }, - "laksetting": { - "block": "period", - "choices": { - "auxiliaryrecord": { - "block": "period", - "fields": { - "auxiliary": { - "block": "period", - "description": "keyword for specifying auxiliary variable.", - "name": "auxiliary", - "reader": "urword", - "type": "keyword", - }, - "auxname": { - "block": "period", - "description": "name for the auxiliary variable to be assigned AUXVAL. AUXNAME must match one of the auxiliary variable names defined in the OPTIONS block. If AUXNAME does not match one of the auxiliary variable names defined in the OPTIONS block the data are ignored.", - "name": "auxname", - "reader": "urword", - "type": "string", - }, - "auxval": { - "block": "period", - "description": "value for the auxiliary variable. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "auxiliary variable value", - "name": "auxval", - "reader": "urword", - "time_series": "true", - "type": "double precision", - }, - }, - "name": "auxiliaryrecord", - "reader": "urword", - "type": "record", - }, - "evaporation": { - "block": "period", - "description": "use of the evaporation keyword is allowed in the lke package; however, the specified value is not currently used in lke calculations. instead, the latent heat of evaporation is multiplied by the simulated evaporation rate for determining the thermal energy lost from a stream reach.", - "longname": "evaporation temperature", - "name": "evaporation", - "reader": "urword", - "time_series": True, - "type": "string", - }, - "ext-inflow": { - "block": "period", - "description": "real or character value that defines the temperature of external inflow for the lake. users are free to use whatever temperature scale they want, which might include negative temperatures. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "ext-inflow temperature", - "name": "ext-inflow", - "reader": "urword", - "time_series": True, - "type": "string", - }, - "rainfall": { - "block": "period", - "description": "real or character value that defines the rainfall temperature for the lake. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "rainfall temperature", - "name": "rainfall", - "reader": "urword", - "time_series": True, - "type": "string", - }, - "runoff": { - "block": "period", - "description": "real or character value that defines the temperature of runoff for the lake. users are free to use whatever temperature scale they want, which might include negative temperatures. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "runoff temperature", - "name": "runoff", - "reader": "urword", - "time_series": True, - "type": "string", - }, - "status": { - "block": "period", - "description": "keyword option to define lake status. status can be active, inactive, or constant. by default, status is active, which means that temperature will be calculated for the lake. if a lake is inactive, then there will be no energy fluxes into or out of the lake and the inactive value will be written for the lake temperature. if a lake is constant, then the temperature for the lake will be fixed at the user specified value.", - "longname": "lake temperature status", - "name": "status", - "reader": "urword", - "type": "string", - }, - "temperature": { - "block": "period", - "description": "real or character value that defines the temperature for the lake. the specified temperature is only applied if the lake is a constant temperature lake. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "lake temperature", - "name": "temperature", - "reader": "urword", - "time_series": True, - "type": "string", - }, - }, - "description": "line of information that is parsed into a keyword and values. keyword values that can be used to start the laksetting string include: status, temperature, rainfall, evaporation, runoff, and auxiliary. these settings are used to assign the temperature associated with the corresponding flow terms. temperatures cannot be specified for all flow terms. for example, the lake package supports a 'withdrawal' flow term. if this withdrawal term is active, then water will be withdrawn from the lake at the calculated temperature of the lake.", - "name": "laksetting", - "reader": "urword", - "type": "keystring", - }, - }, - "name": "lakeperioddata", - "reader": "urword", - "type": "record", - }, - "name": "lakeperioddata", - "reader": "urword", - "type": "recarray", - }, - "transient_block": True, - }, - } + auxiliary = ArrayTemplateGenerator(('gwe6', 'lke', 'options', 'auxiliary')) + temperature_filerecord = ListTemplateGenerator(('gwe6', 'lke', 'options', 'temperature_filerecord')) + budget_filerecord = ListTemplateGenerator(('gwe6', 'lke', 'options', 'budget_filerecord')) + budgetcsv_filerecord = ListTemplateGenerator(('gwe6', 'lke', 'options', 'budgetcsv_filerecord')) + ts_filerecord = ListTemplateGenerator(('gwe6', 'lke', 'options', 'ts_filerecord')) + obs_filerecord = ListTemplateGenerator(('gwe6', 'lke', 'options', 'obs_filerecord')) + packagedata = ListTemplateGenerator(('gwe6', 'lke', 'packagedata', 'packagedata')) + lakeperioddata = ListTemplateGenerator(('gwe6', 'lke', 'period', 'lakeperioddata')) + package_abbr = 'gwelke' + _package_type = 'lke' + dfn_file_name = 'gwe-lke.dfn' + dfn = [['header', 'multi-package'], ['block options', 'name flow_package_name', 'type string', 'shape', 'reader urword', 'optional true'], ['block options', 'name auxiliary', 'type string', 'shape (naux)', 'reader urword', 'optional true'], ['block options', 'name flow_package_auxiliary_name', 'type string', 'shape', 'reader urword', 'optional true'], ['block options', 'name boundnames', 'type keyword', 'shape', 'reader urword', 'optional true'], ['block options', 'name print_input', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name print_temperature', '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 temperature_filerecord', 'type record temperature fileout tempfile', 'shape', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name temperature', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name tempfile', 'type string', 'preserve_case true', 'shape', 'in_record true', 'reader urword', 'tagged false', 'optional false'], ['block options', 'name budget_filerecord', 'type record budget fileout budgetfile', 'shape', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name budget', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name fileout', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name budgetfile', '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'], ['block options', 'name ts_filerecord', 'type record ts6 filein ts6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package ts', 'construct_data timeseries', 'parameter_name timeseries'], ['block options', 'name ts6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name filein', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name ts6_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false'], ['block options', 'name obs_filerecord', 'type record obs6 filein obs6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package obs', 'construct_data observations', 'parameter_name continuous'], ['block options', 'name obs6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name obs6_filename', 'type string', 'preserve_case true', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block packagedata', 'name packagedata', 'type recarray lakeno strt ktf rbthcnd aux boundname', 'shape (maxbound)', 'reader urword'], ['block packagedata', 'name lakeno', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block packagedata', 'name strt', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block packagedata', 'name ktf', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block packagedata', 'name rbthcnd', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block packagedata', 'name aux', 'type double precision', 'in_record true', 'tagged false', 'shape (naux)', 'reader urword', 'time_series true', 'optional true'], ['block packagedata', 'name boundname', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword', 'optional true'], ['block period', 'name iper', 'type integer', 'block_variable true', 'in_record true', 'tagged false', 'shape', 'valid', 'reader urword', 'optional false'], ['block period', 'name lakeperioddata', 'type recarray lakeno laksetting', 'shape', 'reader urword'], ['block period', 'name lakeno', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block period', 'name laksetting', 'type keystring status temperature rainfall evaporation runoff ext-inflow auxiliaryrecord', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name status', 'type string', 'shape', 'tagged true', 'in_record true', 'reader urword'], ['block period', 'name temperature', 'type string', 'shape', 'tagged true', 'in_record true', 'time_series true', 'reader urword'], ['block period', 'name rainfall', 'type string', 'shape', 'tagged true', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name evaporation', 'type string', 'shape', 'tagged true', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name runoff', 'type string', 'shape', 'tagged true', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name ext-inflow', 'type string', 'shape', 'tagged true', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name auxiliaryrecord', 'type record auxiliary auxname auxval', 'shape', 'tagged', 'in_record true', 'reader urword'], ['block period', 'name auxiliary', 'type keyword', 'shape', 'in_record true', 'reader urword'], ['block period', 'name auxname', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name auxval', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword', 'time_series true']] def __init__( self, @@ -1029,6 +219,7 @@ def __init__( observations=None, packagedata=None, lakeperioddata=None, + filename=None, pname=None, **kwargs, @@ -1043,38 +234,23 @@ def __init__( **kwargs, ) - self.flow_package_name = self.build_mfdata( - "flow_package_name", flow_package_name - ) - self.auxiliary = self.build_mfdata("auxiliary", auxiliary) - self.flow_package_auxiliary_name = self.build_mfdata( - "flow_package_auxiliary_name", flow_package_auxiliary_name - ) - self.boundnames = self.build_mfdata("boundnames", boundnames) - self.print_input = self.build_mfdata("print_input", print_input) - self.print_temperature = self.build_mfdata( - "print_temperature", print_temperature - ) - self.print_flows = self.build_mfdata("print_flows", print_flows) - self.save_flows = self.build_mfdata("save_flows", save_flows) - self.temperature_filerecord = self.build_mfdata( - "temperature_filerecord", temperature_filerecord - ) - self.budget_filerecord = self.build_mfdata( - "budget_filerecord", budget_filerecord - ) - self.budgetcsv_filerecord = self.build_mfdata( - "budgetcsv_filerecord", budgetcsv_filerecord - ) - self._ts_filerecord = self.build_mfdata("ts_filerecord", None) - self._ts_package = self.build_child_package( - "ts", timeseries, "timeseries", self._ts_filerecord - ) - self._obs_filerecord = self.build_mfdata("obs_filerecord", None) - self._obs_package = self.build_child_package( - "obs", observations, "continuous", self._obs_filerecord - ) - self.packagedata = self.build_mfdata("packagedata", packagedata) - self.lakeperioddata = self.build_mfdata("lakeperioddata", lakeperioddata) + self.flow_package_name = self.build_mfdata('flow_package_name', flow_package_name) + self.auxiliary = self.build_mfdata('auxiliary', auxiliary) + self.flow_package_auxiliary_name = self.build_mfdata('flow_package_auxiliary_name', flow_package_auxiliary_name) + self.boundnames = self.build_mfdata('boundnames', boundnames) + self.print_input = self.build_mfdata('print_input', print_input) + self.print_temperature = self.build_mfdata('print_temperature', print_temperature) + self.print_flows = self.build_mfdata('print_flows', print_flows) + self.save_flows = self.build_mfdata('save_flows', save_flows) + self.temperature_filerecord = self.build_mfdata('temperature_filerecord', temperature_filerecord) + self.budget_filerecord = self.build_mfdata('budget_filerecord', budget_filerecord) + self.budgetcsv_filerecord = self.build_mfdata('budgetcsv_filerecord', budgetcsv_filerecord) + self._ts_filerecord = self.build_mfdata('ts_filerecord', None) + self._ts_package = self.build_child_package('ts', timeseries, 'timeseries', self._ts_filerecord) + self._obs_filerecord = self.build_mfdata('obs_filerecord', None) + self._obs_package = self.build_child_package('obs', observations, 'continuous', self._obs_filerecord) + self.packagedata = self.build_mfdata('packagedata', packagedata) + self.lakeperioddata = self.build_mfdata('lakeperioddata', lakeperioddata) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwemve.py b/flopy/mf6/modflow/mfgwemve.py index d563e525cd..966270535a 100644 --- a/flopy/mf6/modflow/mfgwemve.py +++ b/flopy/mf6/modflow/mfgwemve.py @@ -51,186 +51,12 @@ class ModflowGwemve(MFPackage): """ - budget_filerecord = ListTemplateGenerator( - ("gwe6", "mve", "options", "budget_filerecord") - ) - budgetcsv_filerecord = ListTemplateGenerator( - ("gwe6", "mve", "options", "budgetcsv_filerecord") - ) - package_abbr = "gwemve" - _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", - ], - ] - spec = { - "advanced": False, - "multi": False, - "name": "gwe-mve", - "options": { - "budget_filerecord": { - "block": "options", - "fields": { - "budgetfile": { - "block": "options", - "description": "name of the binary output file to write budget information.", - "longname": "file keyword", - "name": "budgetfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "budget_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "budgetcsv_filerecord": { - "block": "options", - "fields": { - "budgetcsvfile": { - "block": "options", - "description": "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.", - "longname": "file keyword", - "name": "budgetcsvfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "budgetcsv_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "print_flows": { - "block": "options", - "description": "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.", - "longname": "print calculated flows to listing file", - "name": "print_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "print_input": { - "block": "options", - "description": "keyword to indicate that the list of mover information will be written to the listing file immediately after it is read.", - "longname": "print input to listing file", - "name": "print_input", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "save_flows": { - "block": "options", - "description": "keyword to indicate that lake flow terms will be written to the file specified with 'budget fileout' in output control.", - "longname": "save lake flows to budget file", - "name": "save_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - }, - "ref": { - "abbr": "mve", - "key": "mve_filerecord", - "param": "perioddata", - "parent": "parent_model_or_package", - "val": "perioddata", - }, - } + budget_filerecord = ListTemplateGenerator(('gwe6', 'mve', 'options', 'budget_filerecord')) + budgetcsv_filerecord = ListTemplateGenerator(('gwe6', 'mve', 'options', 'budgetcsv_filerecord')) + package_abbr = 'gwemve' + _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, @@ -241,6 +67,7 @@ def __init__( save_flows=None, budget_filerecord=None, budgetcsv_filerecord=None, + filename=None, pname=None, **kwargs, @@ -255,24 +82,18 @@ def __init__( **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.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 GwemvePackages(MFChildPackages): """ GwemvePackages is a container class for the ModflowGwemve class. """ - package_abbr = "gwemvepackages" def initialize( @@ -282,6 +103,7 @@ def initialize( save_flows=None, budget_filerecord=None, budgetcsv_filerecord=None, + filename=None, pname=None, ): @@ -311,6 +133,7 @@ def append_package( save_flows=None, budget_filerecord=None, budgetcsv_filerecord=None, + filename=None, pname=None, ): diff --git a/flopy/mf6/modflow/mfgwemwe.py b/flopy/mf6/modflow/mfgwemwe.py index 0ecfb1acd9..a386f5bbde 100644 --- a/flopy/mf6/modflow/mfgwemwe.py +++ b/flopy/mf6/modflow/mfgwemwe.py @@ -171,771 +171,18 @@ class ModflowGwemwe(MFPackage): """ - auxiliary = ArrayTemplateGenerator(("gwe6", "mwe", "options", "auxiliary")) - temperature_filerecord = ListTemplateGenerator( - ("gwe6", "mwe", "options", "temperature_filerecord") - ) - budget_filerecord = ListTemplateGenerator( - ("gwe6", "mwe", "options", "budget_filerecord") - ) - budgetcsv_filerecord = ListTemplateGenerator( - ("gwe6", "mwe", "options", "budgetcsv_filerecord") - ) - ts_filerecord = ListTemplateGenerator(("gwe6", "mwe", "options", "ts_filerecord")) - obs_filerecord = ListTemplateGenerator(("gwe6", "mwe", "options", "obs_filerecord")) - packagedata = ListTemplateGenerator(("gwe6", "mwe", "packagedata", "packagedata")) - mweperioddata = ListTemplateGenerator(("gwe6", "mwe", "period", "mweperioddata")) - package_abbr = "gwemwe" - _package_type = "mwe" - dfn_file_name = "gwe-mwe.dfn" - dfn = [ - ["header", "multi-package"], - [ - "block options", - "name flow_package_name", - "type string", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name auxiliary", - "type string", - "shape (naux)", - "reader urword", - "optional true", - ], - [ - "block options", - "name flow_package_auxiliary_name", - "type string", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name boundnames", - "type keyword", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name print_input", - "type keyword", - "reader urword", - "optional true", - ], - [ - "block options", - "name print_temperature", - "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 temperature_filerecord", - "type record temperature fileout tempfile", - "shape", - "reader urword", - "tagged true", - "optional true", - ], - [ - "block options", - "name temperature", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name tempfile", - "type string", - "preserve_case true", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - ], - [ - "block options", - "name budget_filerecord", - "type record budget fileout budgetfile", - "shape", - "reader urword", - "tagged true", - "optional true", - ], - [ - "block options", - "name budget", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name fileout", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name budgetfile", - "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", - ], - [ - "block options", - "name ts_filerecord", - "type record ts6 filein ts6_filename", - "shape", - "reader urword", - "tagged true", - "optional true", - "construct_package ts", - "construct_data timeseries", - "parameter_name timeseries", - ], - [ - "block options", - "name ts6", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name filein", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name ts6_filename", - "type string", - "preserve_case true", - "in_record true", - "reader urword", - "optional false", - "tagged false", - ], - [ - "block options", - "name obs_filerecord", - "type record obs6 filein obs6_filename", - "shape", - "reader urword", - "tagged true", - "optional true", - "construct_package obs", - "construct_data observations", - "parameter_name continuous", - ], - [ - "block options", - "name obs6", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name obs6_filename", - "type string", - "preserve_case true", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block packagedata", - "name packagedata", - "type recarray mawno strt ktf fthk aux boundname", - "shape (maxbound)", - "reader urword", - ], - [ - "block packagedata", - "name mawno", - "type integer", - "shape", - "tagged false", - "in_record true", - "reader urword", - "numeric_index true", - ], - [ - "block packagedata", - "name strt", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block packagedata", - "name ktf", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block packagedata", - "name fthk", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block packagedata", - "name aux", - "type double precision", - "in_record true", - "tagged false", - "shape (naux)", - "reader urword", - "time_series true", - "optional true", - ], - [ - "block packagedata", - "name boundname", - "type string", - "shape", - "tagged false", - "in_record true", - "reader urword", - "optional true", - ], - [ - "block period", - "name iper", - "type integer", - "block_variable true", - "in_record true", - "tagged false", - "shape", - "valid", - "reader urword", - "optional false", - ], - [ - "block period", - "name mweperioddata", - "type recarray mawno mwesetting", - "shape", - "reader urword", - ], - [ - "block period", - "name mawno", - "type integer", - "shape", - "tagged false", - "in_record true", - "reader urword", - "numeric_index true", - ], - [ - "block period", - "name mwesetting", - "type keystring status temperature rate auxiliaryrecord", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block period", - "name status", - "type string", - "shape", - "tagged true", - "in_record true", - "reader urword", - ], - [ - "block period", - "name temperature", - "type string", - "shape", - "tagged true", - "in_record true", - "time_series true", - "reader urword", - ], - [ - "block period", - "name rate", - "type string", - "shape", - "tagged true", - "in_record true", - "reader urword", - "time_series true", - ], - [ - "block period", - "name auxiliaryrecord", - "type record auxiliary auxname auxval", - "shape", - "tagged", - "in_record true", - "reader urword", - ], - [ - "block period", - "name auxiliary", - "type keyword", - "shape", - "in_record true", - "reader urword", - ], - [ - "block period", - "name auxname", - "type string", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block period", - "name auxval", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - "time_series true", - ], - ] - spec = { - "advanced": False, - "fkeys": { - "obs_filerecord": { - "abbr": "obs", - "key": "obs_filerecord", - "param": "continuous", - "parent": "parent_model_or_package", - "val": "observations", - }, - "ts_filerecord": { - "abbr": "ts", - "description": "xxx", - "key": "ts_filerecord", - "param": "timeseries", - "parent": "parent_package", - "val": "timeseries", - }, - }, - "multi": True, - "name": "gwe-mwe", - "options": { - "auxiliary": { - "block": "options", - "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", - "longname": "keyword to specify aux variables", - "name": "auxiliary", - "optional": True, - "reader": "urword", - "shape": "(naux)", - "type": "string", - }, - "boundnames": { - "block": "options", - "description": "keyword to indicate that boundary names may be provided with the list of well cells.", - "name": "boundnames", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "budget_filerecord": { - "block": "options", - "fields": { - "budgetfile": { - "block": "options", - "description": "name of the binary output file to write budget information.", - "longname": "file keyword", - "name": "budgetfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "budget_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "budgetcsv_filerecord": { - "block": "options", - "fields": { - "budgetcsvfile": { - "block": "options", - "description": "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.", - "longname": "file keyword", - "name": "budgetcsvfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "budgetcsv_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "flow_package_auxiliary_name": { - "block": "options", - "description": "keyword to specify the name of an auxiliary variable in the corresponding flow package. if specified, then the simulated temperatures from this advanced transport package will be copied into the auxiliary variable specified with this name. note that the flow package must have an auxiliary variable with this name or the program will terminate with an error. if the flows for this advanced transport package are read from a file, then this option will have no effect.", - "longname": "keyword to specify name of temperature auxiliary variable in flow package", - "name": "flow_package_auxiliary_name", - "optional": True, - "reader": "urword", - "type": "string", - }, - "flow_package_name": { - "block": "options", - "description": "keyword to specify the name of the corresponding flow package. if not specified, then the corresponding flow package must have the same name as this advanced transport package (the name associated with this package in the gwe name file).", - "longname": "keyword to specify name of corresponding flow package", - "name": "flow_package_name", - "optional": True, - "reader": "urword", - "type": "string", - }, - "observations": { - "block": "options", - "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", - "name": "observations", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "obs", - "key": "obs_filerecord", - "param": "continuous", - "parent": "parent_model_or_package", - "val": "observations", - }, - "type": "record obs6 filein obs6_filename", - }, - "print_flows": { - "block": "options", - "description": "keyword to indicate that the list of well 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.", - "longname": "print calculated flows to listing file", - "name": "print_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "print_input": { - "block": "options", - "description": "keyword to indicate that the list of well information will be written to the listing file immediately after it is read.", - "longname": "print input to listing file", - "name": "print_input", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "print_temperature": { - "block": "options", - "description": "keyword to indicate that the list of well {#2} will be printed to the listing file for every stress period in which 'temperature print' is specified in output control. if there is no output control option and print_{#3} is specified, then {#2} are printed for the last time step of each stress period.", - "longname": "print calculated temperatures to listing file", - "name": "print_temperature", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "save_flows": { - "block": "options", - "description": "keyword to indicate that well flow terms will be written to the file specified with 'budget fileout' in output control.", - "longname": "save well flows to budget file", - "name": "save_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "temperature_filerecord": { - "block": "options", - "fields": { - "tempfile": { - "block": "options", - "description": "name of the binary output file to write temperature information.", - "longname": "file keyword", - "name": "tempfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "temperature_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "timeseries": { - "block": "options", - "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", - "name": "timeseries", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "ts", - "description": "xxx", - "key": "ts_filerecord", - "param": "timeseries", - "parent": "parent_package", - "val": "timeseries", - }, - "type": "record ts6 filein ts6_filename", - }, - }, - "packagedata": { - "packagedata": { - "block": "packagedata", - "item": { - "block": "packagedata", - "fields": { - "aux": { - "block": "packagedata", - "description": "represents the values of the auxiliary variables for each well. The values of auxiliary variables must be present for each well. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "auxiliary variables", - "name": "aux", - "optional": "true", - "reader": "urword", - "shape": "(naux)", - "time_series": "true", - "type": "double precision", - }, - "boundname": { - "block": "packagedata", - "description": "name of the well cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", - "longname": "well name", - "name": "boundname", - "optional": "true", - "reader": "urword", - "type": "string", - }, - "fthk": { - "block": "packagedata", - "description": "real value that defines the thickness of the material through which conduction occurs. Must be greater than 0.", - "longname": "thickness of the well feature", - "name": "fthk", - "reader": "urword", - "type": "double precision", - }, - "ktf": { - "block": "packagedata", - "description": "is the thermal conductivity of the material between the aquifer cell and the feature. The thickness of the material is defined by the variable FTHK.", - "longname": "thermal conductivity of the feature", - "name": "ktf", - "reader": "urword", - "type": "double precision", - }, - "mawno": { - "block": "period", - "description": "integer value that defines the well number associated with the specified PERIOD data on the line. MAWNO must be greater than zero and less than or equal to NMAWWELLS.", - "longname": "well number for this entry", - "name": "mawno", - "numeric_index": "true", - "reader": "urword", - "type": "integer", - }, - "strt": { - "block": "packagedata", - "description": "real value that defines the starting temperature for the well.", - "longname": "starting well temperature", - "name": "strt", - "reader": "urword", - "type": "double precision", - }, - }, - "name": "packagedata", - "reader": "urword", - "type": "record", - }, - "name": "packagedata", - "reader": "urword", - "shape": "(maxbound)", - "type": "recarray", - } - }, - "period": { - "mweperioddata": { - "block": "period", - "item": { - "block": "period", - "fields": { - "mawno": { - "block": "period", - "description": "integer value that defines the well number associated with the specified period data on the line. mawno must be greater than zero and less than or equal to nmawwells.", - "longname": "well number for this entry", - "name": "mawno", - "numeric_index": True, - "reader": "urword", - "type": "integer", - }, - "mwesetting": { - "block": "period", - "choices": { - "auxiliaryrecord": { - "block": "period", - "fields": { - "auxiliary": { - "block": "period", - "description": "keyword for specifying auxiliary variable.", - "name": "auxiliary", - "reader": "urword", - "type": "keyword", - }, - "auxname": { - "block": "period", - "description": "name for the auxiliary variable to be assigned AUXVAL. AUXNAME must match one of the auxiliary variable names defined in the OPTIONS block. If AUXNAME does not match one of the auxiliary variable names defined in the OPTIONS block the data are ignored.", - "name": "auxname", - "reader": "urword", - "type": "string", - }, - "auxval": { - "block": "period", - "description": "value for the auxiliary variable. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "auxiliary variable value", - "name": "auxval", - "reader": "urword", - "time_series": "true", - "type": "double precision", - }, - }, - "name": "auxiliaryrecord", - "reader": "urword", - "type": "record", - }, - "rate": { - "block": "period", - "description": "real or character value that defines the injection temperature $(e.g.,:^{circ}c:or:^{circ}f)$ for the well. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "well injection temperature", - "name": "rate", - "reader": "urword", - "time_series": True, - "type": "string", - }, - "status": { - "block": "period", - "description": "keyword option to define well status. status can be active, inactive, or constant. by default, status is active, which means that temperature will be calculated for the well. if a well is inactive, then there will be no solute mass fluxes into or out of the well and the inactive value will be written for the well temperature. if a well is constant, then the temperature for the well will be fixed at the user specified value.", - "longname": "well temperature status", - "name": "status", - "reader": "urword", - "type": "string", - }, - "temperature": { - "block": "period", - "description": "real or character value that defines the temperature for the well. the specified temperature is only applied if the well is a constant temperature well. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "well temperature", - "name": "temperature", - "reader": "urword", - "time_series": True, - "type": "string", - }, - }, - "description": "line of information that is parsed into a keyword and values. keyword values that can be used to start the mwesetting string include: status, temperature, rainfall, evaporation, runoff, and auxiliary. these settings are used to assign the temperature of associated with the corresponding flow terms. temperatures cannot be specified for all flow terms. for example, the multi-aquifer well package supports a 'withdrawal' flow term. if this withdrawal term is active, then water will be withdrawn from the well at the calculated temperature of the well.", - "name": "mwesetting", - "reader": "urword", - "type": "keystring", - }, - }, - "name": "mweperioddata", - "reader": "urword", - "type": "record", - }, - "name": "mweperioddata", - "reader": "urword", - "type": "recarray", - }, - "transient_block": True, - }, - } + auxiliary = ArrayTemplateGenerator(('gwe6', 'mwe', 'options', 'auxiliary')) + temperature_filerecord = ListTemplateGenerator(('gwe6', 'mwe', 'options', 'temperature_filerecord')) + budget_filerecord = ListTemplateGenerator(('gwe6', 'mwe', 'options', 'budget_filerecord')) + budgetcsv_filerecord = ListTemplateGenerator(('gwe6', 'mwe', 'options', 'budgetcsv_filerecord')) + ts_filerecord = ListTemplateGenerator(('gwe6', 'mwe', 'options', 'ts_filerecord')) + obs_filerecord = ListTemplateGenerator(('gwe6', 'mwe', 'options', 'obs_filerecord')) + packagedata = ListTemplateGenerator(('gwe6', 'mwe', 'packagedata', 'packagedata')) + mweperioddata = ListTemplateGenerator(('gwe6', 'mwe', 'period', 'mweperioddata')) + package_abbr = 'gwemwe' + _package_type = 'mwe' + dfn_file_name = 'gwe-mwe.dfn' + dfn = [['header', 'multi-package'], ['block options', 'name flow_package_name', 'type string', 'shape', 'reader urword', 'optional true'], ['block options', 'name auxiliary', 'type string', 'shape (naux)', 'reader urword', 'optional true'], ['block options', 'name flow_package_auxiliary_name', 'type string', 'shape', 'reader urword', 'optional true'], ['block options', 'name boundnames', 'type keyword', 'shape', 'reader urword', 'optional true'], ['block options', 'name print_input', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name print_temperature', '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 temperature_filerecord', 'type record temperature fileout tempfile', 'shape', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name temperature', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name tempfile', 'type string', 'preserve_case true', 'shape', 'in_record true', 'reader urword', 'tagged false', 'optional false'], ['block options', 'name budget_filerecord', 'type record budget fileout budgetfile', 'shape', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name budget', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name fileout', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name budgetfile', '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'], ['block options', 'name ts_filerecord', 'type record ts6 filein ts6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package ts', 'construct_data timeseries', 'parameter_name timeseries'], ['block options', 'name ts6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name filein', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name ts6_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false'], ['block options', 'name obs_filerecord', 'type record obs6 filein obs6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package obs', 'construct_data observations', 'parameter_name continuous'], ['block options', 'name obs6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name obs6_filename', 'type string', 'preserve_case true', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block packagedata', 'name packagedata', 'type recarray mawno strt ktf fthk aux boundname', 'shape (maxbound)', 'reader urword'], ['block packagedata', 'name mawno', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block packagedata', 'name strt', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block packagedata', 'name ktf', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block packagedata', 'name fthk', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block packagedata', 'name aux', 'type double precision', 'in_record true', 'tagged false', 'shape (naux)', 'reader urword', 'time_series true', 'optional true'], ['block packagedata', 'name boundname', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword', 'optional true'], ['block period', 'name iper', 'type integer', 'block_variable true', 'in_record true', 'tagged false', 'shape', 'valid', 'reader urword', 'optional false'], ['block period', 'name mweperioddata', 'type recarray mawno mwesetting', 'shape', 'reader urword'], ['block period', 'name mawno', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block period', 'name mwesetting', 'type keystring status temperature rate auxiliaryrecord', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name status', 'type string', 'shape', 'tagged true', 'in_record true', 'reader urword'], ['block period', 'name temperature', 'type string', 'shape', 'tagged true', 'in_record true', 'time_series true', 'reader urword'], ['block period', 'name rate', 'type string', 'shape', 'tagged true', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name auxiliaryrecord', 'type record auxiliary auxname auxval', 'shape', 'tagged', 'in_record true', 'reader urword'], ['block period', 'name auxiliary', 'type keyword', 'shape', 'in_record true', 'reader urword'], ['block period', 'name auxname', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name auxval', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword', 'time_series true']] def __init__( self, @@ -956,6 +203,7 @@ def __init__( observations=None, packagedata=None, mweperioddata=None, + filename=None, pname=None, **kwargs, @@ -970,38 +218,23 @@ def __init__( **kwargs, ) - self.flow_package_name = self.build_mfdata( - "flow_package_name", flow_package_name - ) - self.auxiliary = self.build_mfdata("auxiliary", auxiliary) - self.flow_package_auxiliary_name = self.build_mfdata( - "flow_package_auxiliary_name", flow_package_auxiliary_name - ) - self.boundnames = self.build_mfdata("boundnames", boundnames) - self.print_input = self.build_mfdata("print_input", print_input) - self.print_temperature = self.build_mfdata( - "print_temperature", print_temperature - ) - self.print_flows = self.build_mfdata("print_flows", print_flows) - self.save_flows = self.build_mfdata("save_flows", save_flows) - self.temperature_filerecord = self.build_mfdata( - "temperature_filerecord", temperature_filerecord - ) - self.budget_filerecord = self.build_mfdata( - "budget_filerecord", budget_filerecord - ) - self.budgetcsv_filerecord = self.build_mfdata( - "budgetcsv_filerecord", budgetcsv_filerecord - ) - self._ts_filerecord = self.build_mfdata("ts_filerecord", None) - self._ts_package = self.build_child_package( - "ts", timeseries, "timeseries", self._ts_filerecord - ) - self._obs_filerecord = self.build_mfdata("obs_filerecord", None) - self._obs_package = self.build_child_package( - "obs", observations, "continuous", self._obs_filerecord - ) - self.packagedata = self.build_mfdata("packagedata", packagedata) - self.mweperioddata = self.build_mfdata("mweperioddata", mweperioddata) + self.flow_package_name = self.build_mfdata('flow_package_name', flow_package_name) + self.auxiliary = self.build_mfdata('auxiliary', auxiliary) + self.flow_package_auxiliary_name = self.build_mfdata('flow_package_auxiliary_name', flow_package_auxiliary_name) + self.boundnames = self.build_mfdata('boundnames', boundnames) + self.print_input = self.build_mfdata('print_input', print_input) + self.print_temperature = self.build_mfdata('print_temperature', print_temperature) + self.print_flows = self.build_mfdata('print_flows', print_flows) + self.save_flows = self.build_mfdata('save_flows', save_flows) + self.temperature_filerecord = self.build_mfdata('temperature_filerecord', temperature_filerecord) + self.budget_filerecord = self.build_mfdata('budget_filerecord', budget_filerecord) + self.budgetcsv_filerecord = self.build_mfdata('budgetcsv_filerecord', budgetcsv_filerecord) + self._ts_filerecord = self.build_mfdata('ts_filerecord', None) + self._ts_package = self.build_child_package('ts', timeseries, 'timeseries', self._ts_filerecord) + self._obs_filerecord = self.build_mfdata('obs_filerecord', None) + self._obs_package = self.build_child_package('obs', observations, 'continuous', self._obs_filerecord) + self.packagedata = self.build_mfdata('packagedata', packagedata) + self.mweperioddata = self.build_mfdata('mweperioddata', mweperioddata) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwenam.py b/flopy/mf6/modflow/mfgwenam.py index 898fb7fb42..fee3608c72 100644 --- a/flopy/mf6/modflow/mfgwenam.py +++ b/flopy/mf6/modflow/mfgwenam.py @@ -83,367 +83,14 @@ class ModflowGwenam(MFPackage): """ - nc_mesh2d_filerecord = ListTemplateGenerator( - ("gwe6", "nam", "options", "nc_mesh2d_filerecord") - ) - nc_structured_filerecord = ListTemplateGenerator( - ("gwe6", "nam", "options", "nc_structured_filerecord") - ) - nc_filerecord = ListTemplateGenerator(("gwe6", "nam", "options", "nc_filerecord")) - packages = ListTemplateGenerator(("gwe6", "nam", "packages", "packages")) - package_abbr = "gwenam" - _package_type = "nam" - dfn_file_name = "gwe-nam.dfn" - dfn = [ - ["header"], - [ - "block options", - "name list", - "type string", - "reader urword", - "optional true", - "preserve_case true", - ], - [ - "block options", - "name print_input", - "type keyword", - "reader urword", - "optional true", - ], - [ - "block options", - "name print_flows", - "type keyword", - "reader urword", - "optional true", - ], - [ - "block options", - "name save_flows", - "type keyword", - "reader urword", - "optional true", - ], - [ - "block options", - "name dependent_variable_scaling", - "type keyword", - "reader urword", - "optional true", - "mf6internal idv_scale", - ], - [ - "block options", - "name nc_mesh2d_filerecord", - "type record netcdf_mesh2d fileout ncmesh2dfile", - "shape", - "reader urword", - "tagged true", - "optional true", - "mf6internal ncmesh2drec", - ], - [ - "block options", - "name netcdf_mesh2d", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - "extended true", - ], - [ - "block options", - "name nc_structured_filerecord", - "type record netcdf_structured fileout ncstructfile", - "shape", - "reader urword", - "tagged true", - "optional true", - "mf6internal ncstructrec", - ], - [ - "block options", - "name netcdf_structured", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - "mf6internal netcdf_struct", - "extended true", - ], - [ - "block options", - "name fileout", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name ncmesh2dfile", - "type string", - "preserve_case true", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - "extended true", - ], - [ - "block options", - "name ncstructfile", - "type string", - "preserve_case true", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - "extended true", - ], - [ - "block options", - "name nc_filerecord", - "type record netcdf filein netcdf_filename", - "reader urword", - "tagged true", - "optional true", - ], - [ - "block options", - "name netcdf", - "type keyword", - "in_record true", - "reader urword", - "tagged true", - "optional false", - "extended true", - ], - [ - "block options", - "name filein", - "type keyword", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name netcdf_filename", - "type string", - "preserve_case true", - "in_record true", - "reader urword", - "optional false", - "tagged false", - "mf6internal netcdf_fname", - "extended true", - ], - [ - "block packages", - "name packages", - "type recarray ftype fname pname", - "reader urword", - "optional false", - ], - [ - "block packages", - "name ftype", - "in_record true", - "type string", - "tagged false", - "reader urword", - ], - [ - "block packages", - "name fname", - "in_record true", - "type string", - "preserve_case true", - "tagged false", - "reader urword", - ], - [ - "block packages", - "name pname", - "in_record true", - "type string", - "tagged false", - "reader urword", - "optional true", - ], - ] - spec = { - "advanced": False, - "multi": False, - "name": "gwe-nam", - "options": { - "dependent_variable_scaling": { - "block": "options", - "description": "flag to scale x and rhs to avoid very large positive or negative dependent variable values", - "longname": "flag to scale x and rhs", - "mf6internal": "idv_scale", - "name": "dependent_variable_scaling", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "list": { - "block": "options", - "description": "is name of the listing file to create for this gwe model. if not specified, then the name of the list file will be the basename of the gwe model name file and the '.lst' extension. for example, if the gwe name file is called 'my.model.nam' then the list file will be called 'my.model.lst'.", - "longname": "name of listing file", - "name": "list", - "optional": True, - "reader": "urword", - "type": "string", - }, - "nc_filerecord": { - "block": "options", - "description": "netcdf filerecord", - "fields": { - "netcdf_filename": { - "block": "options", - "description": "defines a NetCDF input file.", - "extended": "true", - "longname": "netcdf input filename", - "mf6internal": "netcdf_fname", - "name": "netcdf_filename", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "nc_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "nc_mesh2d_filerecord": { - "block": "options", - "description": "netcdf layered mesh fileout record.", - "fields": { - "ncmesh2dfile": { - "block": "options", - "description": "name of the NetCDF ugrid layered mesh output file.", - "extended": "true", - "longname": "file keyword", - "name": "ncmesh2dfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "mf6internal": "ncmesh2drec", - "name": "nc_mesh2d_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "nc_structured_filerecord": { - "block": "options", - "description": "netcdf structured fileout record.", - "fields": { - "ncstructfile": { - "block": "options", - "description": "name of the NetCDF structured output file.", - "extended": "true", - "longname": "file keyword", - "name": "ncstructfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "mf6internal": "ncstructrec", - "name": "nc_structured_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "print_flows": { - "block": "options", - "description": "keyword to indicate that the list of all model package 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.", - "longname": "print calculated flows to listing file", - "name": "print_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "print_input": { - "block": "options", - "description": "keyword to indicate that the list of all model stress package information will be written to the listing file immediately after it is read.", - "longname": "print input to listing file", - "name": "print_input", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "save_flows": { - "block": "options", - "description": "keyword to indicate that all model package flow terms will be written to the file specified with 'budget fileout' in output control.", - "longname": "save flows for all packages to budget file", - "name": "save_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - }, - "packages": { - "packages": { - "block": "packages", - "item": { - "block": "packages", - "fields": { - "fname": { - "block": "packages", - "description": "is the name of the file containing the package input. The path to the file should be included if the file is not located in the folder where the program was run.", - "longname": "file name", - "name": "fname", - "reader": "urword", - "type": "string", - }, - "ftype": { - "block": "packages", - "description": "is the file type, which must be one of the following character values shown in table~ref{table:ftype-gwe}. Ftype may be entered in any combination of uppercase and lowercase.", - "longname": "package type", - "name": "ftype", - "reader": "urword", - "type": "string", - }, - "pname": { - "block": "packages", - "description": "is the user-defined name for the package. PNAME is restricted to 16 characters. No spaces are allowed in PNAME. PNAME character values are read and stored by the program for stress packages only. These names may be useful for labeling purposes when multiple stress packages of the same type are located within a single GWE Model. If PNAME is specified for a stress package, then PNAME will be used in the flow budget table in the listing file; it will also be used for the text entry in the cell-by-cell budget file. PNAME is case insensitive and is stored in all upper case letters.", - "longname": "user name for package", - "name": "pname", - "optional": "true", - "reader": "urword", - "type": "string", - }, - }, - "longname": "package list", - "name": "packages", - "optional": False, - "reader": "urword", - "type": "record", - }, - "longname": "package list", - "name": "packages", - "optional": False, - "reader": "urword", - "type": "recarray", - } - }, - } + nc_mesh2d_filerecord = ListTemplateGenerator(('gwe6', 'nam', 'options', 'nc_mesh2d_filerecord')) + nc_structured_filerecord = ListTemplateGenerator(('gwe6', 'nam', 'options', 'nc_structured_filerecord')) + nc_filerecord = ListTemplateGenerator(('gwe6', 'nam', 'options', 'nc_filerecord')) + packages = ListTemplateGenerator(('gwe6', 'nam', 'packages', 'packages')) + package_abbr = 'gwenam' + _package_type = 'nam' + dfn_file_name = 'gwe-nam.dfn' + dfn = [['header'], ['block options', 'name list', 'type string', 'reader urword', 'optional true', 'preserve_case true'], ['block options', 'name print_input', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name print_flows', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name save_flows', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name dependent_variable_scaling', 'type keyword', 'reader urword', 'optional true', 'mf6internal idv_scale'], ['block options', 'name nc_mesh2d_filerecord', 'type record netcdf_mesh2d fileout ncmesh2dfile', 'shape', 'reader urword', 'tagged true', 'optional true', 'mf6internal ncmesh2drec'], ['block options', 'name netcdf_mesh2d', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false', 'extended true'], ['block options', 'name nc_structured_filerecord', 'type record netcdf_structured fileout ncstructfile', 'shape', 'reader urword', 'tagged true', 'optional true', 'mf6internal ncstructrec'], ['block options', 'name netcdf_structured', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false', 'mf6internal netcdf_struct', 'extended true'], ['block options', 'name fileout', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name ncmesh2dfile', 'type string', 'preserve_case true', 'shape', 'in_record true', 'reader urword', 'tagged false', 'optional false', 'extended true'], ['block options', 'name ncstructfile', 'type string', 'preserve_case true', 'shape', 'in_record true', 'reader urword', 'tagged false', 'optional false', 'extended true'], ['block options', 'name nc_filerecord', 'type record netcdf filein netcdf_filename', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name netcdf', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false', 'extended true'], ['block options', 'name filein', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name netcdf_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false', 'mf6internal netcdf_fname', 'extended true'], ['block packages', 'name packages', 'type recarray ftype fname pname', 'reader urword', 'optional false'], ['block packages', 'name ftype', 'in_record true', 'type string', 'tagged false', 'reader urword'], ['block packages', 'name fname', 'in_record true', 'type string', 'preserve_case true', 'tagged false', 'reader urword'], ['block packages', 'name pname', 'in_record true', 'type string', 'tagged false', 'reader urword', 'optional true']] def __init__( self, @@ -458,6 +105,7 @@ def __init__( nc_structured_filerecord=None, nc_filerecord=None, packages=None, + filename=None, pname=None, **kwargs, @@ -472,20 +120,15 @@ def __init__( **kwargs, ) - self.list = self.build_mfdata("list", list) - 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.dependent_variable_scaling = self.build_mfdata( - "dependent_variable_scaling", dependent_variable_scaling - ) - self.nc_mesh2d_filerecord = self.build_mfdata( - "nc_mesh2d_filerecord", nc_mesh2d_filerecord - ) - self.nc_structured_filerecord = self.build_mfdata( - "nc_structured_filerecord", nc_structured_filerecord - ) - self.nc_filerecord = self.build_mfdata("nc_filerecord", nc_filerecord) - self.packages = self.build_mfdata("packages", packages) + self.list = self.build_mfdata('list', list) + 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.dependent_variable_scaling = self.build_mfdata('dependent_variable_scaling', dependent_variable_scaling) + self.nc_mesh2d_filerecord = self.build_mfdata('nc_mesh2d_filerecord', nc_mesh2d_filerecord) + self.nc_structured_filerecord = self.build_mfdata('nc_structured_filerecord', nc_structured_filerecord) + self.nc_filerecord = self.build_mfdata('nc_filerecord', nc_filerecord) + self.packages = self.build_mfdata('packages', packages) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgweoc.py b/flopy/mf6/modflow/mfgweoc.py index ece7c73f60..9295023c12 100644 --- a/flopy/mf6/modflow/mfgweoc.py +++ b/flopy/mf6/modflow/mfgweoc.py @@ -65,474 +65,16 @@ class ModflowGweoc(MFPackage): """ - budget_filerecord = ListTemplateGenerator( - ("gwe6", "oc", "options", "budget_filerecord") - ) - budgetcsv_filerecord = ListTemplateGenerator( - ("gwe6", "oc", "options", "budgetcsv_filerecord") - ) - temperature_filerecord = ListTemplateGenerator( - ("gwe6", "oc", "options", "temperature_filerecord") - ) - temperatureprintrecord = ListTemplateGenerator( - ("gwe6", "oc", "options", "temperatureprintrecord") - ) - saverecord = ListTemplateGenerator(("gwe6", "oc", "period", "saverecord")) - printrecord = ListTemplateGenerator(("gwe6", "oc", "period", "printrecord")) - package_abbr = "gweoc" - _package_type = "oc" - dfn_file_name = "gwe-oc.dfn" - dfn = [ - ["header"], - [ - "block options", - "name budget_filerecord", - "type record budget fileout budgetfile", - "shape", - "reader urword", - "tagged true", - "optional true", - "mf6internal budfilerec", - ], - [ - "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", - "mf6internal budcsvfilerec", - ], - [ - "block options", - "name budgetcsv", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name budgetcsvfile", - "type string", - "preserve_case true", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - ], - [ - "block options", - "name temperature_filerecord", - "type record temperature fileout temperaturefile", - "shape", - "reader urword", - "tagged true", - "optional true", - "mf6internal tempfilerec", - ], - [ - "block options", - "name temperature", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name temperaturefile", - "type string", - "preserve_case true", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - "mf6internal tempfile", - ], - [ - "block options", - "name temperatureprintrecord", - "type record temperature print_format formatrecord", - "shape", - "reader urword", - "optional true", - "mf6internal tempprintrec", - ], - [ - "block options", - "name print_format", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name formatrecord", - "type record columns width digits format", - "shape", - "in_record true", - "reader urword", - "tagged", - "optional false", - ], - [ - "block options", - "name columns", - "type integer", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional", - ], - [ - "block options", - "name width", - "type integer", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional", - ], - [ - "block options", - "name digits", - "type integer", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional", - ], - [ - "block options", - "name format", - "type string", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - ], - [ - "block period", - "name iper", - "type integer", - "block_variable true", - "in_record true", - "tagged false", - "shape", - "valid", - "reader urword", - "optional false", - ], - [ - "block period", - "name saverecord", - "type record save rtype ocsetting", - "shape", - "reader urword", - "tagged false", - "optional true", - ], - [ - "block period", - "name save", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block period", - "name printrecord", - "type record print rtype ocsetting", - "shape", - "reader urword", - "tagged false", - "optional true", - ], - [ - "block period", - "name print", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block period", - "name rtype", - "type string", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - ], - [ - "block period", - "name ocsetting", - "type keystring all first last frequency steps", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block period", - "name all", - "type keyword", - "shape", - "in_record true", - "reader urword", - ], - [ - "block period", - "name first", - "type keyword", - "shape", - "in_record true", - "reader urword", - ], - [ - "block period", - "name last", - "type keyword", - "shape", - "in_record true", - "reader urword", - ], - [ - "block period", - "name frequency", - "type integer", - "shape", - "tagged true", - "in_record true", - "reader urword", - ], - [ - "block period", - "name steps", - "type integer", - "shape ($ 0, or it is the area perpendicular to flow of the vertical connection between cell 1 and cell 2 if IHC = 0.", - "longname": "horizontal cell width or area for vertical flow", - "name": "hwva", - "optional": "false", - "reader": "urword", - "type": "double precision", - }, - "ihc": { - "block": "exchangedata", - "description": "is an integer flag indicating the direction between node n and all of its m connections. If IHC = 0 then the connection is vertical. If IHC = 1 then the connection is horizontal. If IHC = 2 then the connection is horizontal for a vertically staggered grid.", - "longname": "integer flag for connection type", - "name": "ihc", - "optional": "false", - "reader": "urword", - "type": "integer", - }, - }, - "longname": "exchange data", - "name": "exchangedata", - "optional": False, - "reader": "urword", - "type": "record", - }, - "longname": "exchange data", - "name": "exchangedata", - "optional": False, - "reader": "urword", - "shape": "(nexg)", - "type": "recarray", - } - }, - "fkeys": { - "gnc_filerecord": { - "abbr": "gnc", - "key": "gnc_filerecord", - "param": "gncdata", - "parent": "parent_model_or_package", - "val": "gncdata", - }, - "mvr_filerecord": { - "abbr": "mvr", - "key": "mvr_filerecord", - "param": "perioddata", - "parent": "parent_model_or_package", - "val": "perioddata", - }, - "obs_filerecord": { - "abbr": "obs", - "key": "obs_filerecord", - "param": "continuous", - "parent": "parent_model_or_package", - "val": "observations", - }, - }, - "multi": True, - "name": "exg-gwfgwf", - "options": { - "auxiliary": { - "block": "options", - "description": "an array of auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided. most auxiliary variables will not be used by the gwf-gwf exchange, but they will be available for use by other parts of the program. if an auxiliary variable with the name 'angldegx' is found, then this information will be used as the angle (provided in degrees) between the connection face normal and the x axis, where a value of zero indicates that a normal vector points directly along the positive x axis. the connection face normal is a normal vector on the cell face shared between the cell in model 1 and the cell in model 2 pointing away from the model 1 cell. additional information on 'angldegx' and when it is required is provided in the description of the disu package. if an auxiliary variable with the name 'cdist' is found, then this information will be used in the calculation of specific discharge within model cells connected by the exchange. for a horizontal connection, cdist should be specified as the horizontal distance between the cell centers, and should not include the vertical component. for vertical connections, cdist should be specified as the difference in elevation between the two cell centers. both angldegx and cdist are required if specific discharge is calculated for either of the groundwater models.", - "longname": "keyword to specify aux variables", - "name": "auxiliary", - "optional": True, - "reader": "urword", - "shape": "(naux)", - "type": "string", - }, - "boundnames": { - "block": "options", - "description": "keyword to indicate that boundary names may be provided with the list of gwf exchange cells.", - "name": "boundnames", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "cell_averaging": { - "block": "options", - "description": "is a keyword and text keyword to indicate the method that will be used for calculating the conductance for horizontal cell connections. the text value for cell_averaging can be 'harmonic', 'logarithmic', or 'amt-lmk', which means 'arithmetic-mean thickness and logarithmic-mean hydraulic conductivity'. if the user does not specify a value for cell_averaging, then the harmonic-mean method will be used.", - "longname": "conductance weighting option", - "name": "cell_averaging", - "optional": True, - "reader": "urword", - "type": "string", - "valid": "harmonic logarithmic amt-lmk", - }, - "cvoptions": { - "block": "options", - "description": "none", - "fields": { - "dewatered": { - "block": "options", - "description": "If the DEWATERED keyword is specified, then the vertical conductance is calculated using only the saturated thickness and properties of the overlying cell if the head in the underlying cell is below its top.", - "longname": "keyword to activate DEWATERED option", - "name": "dewatered", - "optional": "true", - "reader": "urword", - "type": "keyword", - }, - "variablecv": { - "block": "options", - "description": "keyword to indicate that the vertical conductance will be calculated using the saturated thickness and properties of the overlying cell and the thickness and properties of the underlying cell. If the DEWATERED keyword is also specified, then the vertical conductance is calculated using only the saturated thickness and properties of the overlying cell if the head in the underlying cell is below its top. If these keywords are not specified, then the default condition is to calculate the vertical conductance at the start of the simulation using the initial head and the cell properties. The vertical conductance remains constant for the entire simulation.", - "longname": "keyword to activate VARIABLECV option", - "name": "variablecv", - "reader": "urword", - "type": "keyword", - }, - }, - "longname": "vertical conductance options", - "name": "cvoptions", - "optional": True, - "reader": "urword", - "type": "record", - }, - "dev_interfacemodel_on": { - "block": "options", - "description": "activates the interface model mechanism for calculating the coefficients at (and possibly near) the exchange. this keyword should only be used for development purposes.", - "longname": "activate interface model on exchange", - "mf6internal": "dev_ifmod_on", - "name": "dev_interfacemodel_on", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "gncdata": { - "block": "options", - "description": "Contains data for the gnc package. Data can be passed as a dictionary to the gnc package with variable names as keys and package data as values. Data for the gncdata variable is also acceptable. See gnc package documentation for more information.", - "name": "gncdata", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "gnc", - "key": "gnc_filerecord", - "param": "gncdata", - "parent": "parent_model_or_package", - "val": "gncdata", - }, - "type": "record gnc6 filein gnc6_filename", - }, - "newton": { - "block": "options", - "description": "keyword that activates the newton-raphson formulation for groundwater flow between connected, convertible groundwater cells. cells will not dry when this option is used.", - "longname": "keyword to activate newton-raphson", - "name": "newton", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "observations": { - "block": "options", - "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", - "name": "observations", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "obs", - "key": "obs_filerecord", - "param": "continuous", - "parent": "parent_model_or_package", - "val": "observations", - }, - "type": "record obs6 filein obs6_filename", - }, - "perioddata": { - "block": "options", - "description": "Contains data for the mvr package. Data can be passed as a dictionary to the mvr package with variable names as keys and package data as values. Data for the perioddata variable is also acceptable. See mvr package documentation for more information.", - "name": "perioddata", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "mvr", - "key": "mvr_filerecord", - "param": "perioddata", - "parent": "parent_model_or_package", - "val": "perioddata", - }, - "type": "record mvr6 filein mvr6_filename", - }, - "print_flows": { - "block": "options", - "description": "keyword to indicate that the list of exchange flow rates will be printed to the listing file for every stress period in which 'save budget' is specified in output control.", - "longname": "keyword to print gwfgwf flows to list file", - "mf6internal": "iprflow", - "name": "print_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "print_input": { - "block": "options", - "description": "keyword to indicate that the list of exchange entries will be echoed to the listing file immediately after it is read.", - "longname": "keyword to print input to list file", - "mf6internal": "iprpak", - "name": "print_input", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "save_flows": { - "block": "options", - "description": "keyword to indicate that cell-by-cell flow terms will be written to the budget file for each model provided that the output control for the models are set up with the 'budget save file' option.", - "longname": "keyword to save gwfgwf flows", - "mf6internal": "ipakcb", - "name": "save_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "xt3d": { - "block": "options", - "description": "keyword that activates the xt3d formulation between the cells connected with this gwf-gwf exchange.", - "longname": "keyword to activate xt3d", - "name": "xt3d", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - }, - } + auxiliary = ArrayTemplateGenerator(('gwfgwf', 'options', 'auxiliary')) + gnc_filerecord = ListTemplateGenerator(('gwfgwf', 'options', 'gnc_filerecord')) + mvr_filerecord = ListTemplateGenerator(('gwfgwf', 'options', 'mvr_filerecord')) + obs_filerecord = ListTemplateGenerator(('gwfgwf', 'options', 'obs_filerecord')) + exchangedata = ListTemplateGenerator(('gwfgwf', 'exchangedata', 'exchangedata')) + package_abbr = 'gwfgwf' + _package_type = 'gwfgwf' + dfn_file_name = 'exg-gwfgwf.dfn' + dfn = [['header', 'multi-package'], ['block options', 'name auxiliary', 'type string', 'shape (naux)', 'reader urword', 'optional true'], ['block options', 'name boundnames', 'type keyword', 'shape', 'reader urword', 'optional true'], ['block options', 'name print_input', 'type keyword', 'reader urword', 'optional true', 'mf6internal iprpak'], ['block options', 'name print_flows', 'type keyword', 'reader urword', 'optional true', 'mf6internal iprflow'], ['block options', 'name save_flows', 'type keyword', 'reader urword', 'optional true', 'mf6internal ipakcb'], ['block options', 'name cell_averaging', 'type string', 'valid harmonic logarithmic amt-lmk', 'reader urword', 'optional true'], ['block options', 'name cvoptions', 'type record variablecv dewatered', 'reader urword', 'optional true'], ['block options', 'name variablecv', 'in_record true', 'type keyword', 'reader urword'], ['block options', 'name dewatered', 'in_record true', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name newton', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name xt3d', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name gnc_filerecord', 'type record gnc6 filein gnc6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package gnc', 'construct_data gncdata', 'parameter_name gncdata'], ['block options', 'name filein', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name gnc6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name gnc6_filename', 'type string', 'preserve_case true', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block options', 'name mvr_filerecord', 'type record mvr6 filein mvr6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package mvr', 'construct_data perioddata', 'parameter_name perioddata'], ['block options', 'name mvr6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name mvr6_filename', 'type string', 'preserve_case true', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block options', 'name obs_filerecord', 'type record obs6 filein obs6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package obs', 'construct_data observations', 'parameter_name continuous'], ['block options', 'name obs6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name obs6_filename', 'type string', 'preserve_case true', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block options', 'name dev_interfacemodel_on', 'type keyword', 'reader urword', 'optional true', 'mf6internal dev_ifmod_on'], ['block dimensions', 'name nexg', 'type integer', 'reader urword', 'optional false'], ['block exchangedata', 'name exchangedata', 'type recarray cellidm1 cellidm2 ihc cl1 cl2 hwva aux boundname', 'shape (nexg)', 'reader urword', 'optional false'], ['block exchangedata', 'name cellidm1', 'type integer', 'in_record true', 'tagged false', 'reader urword', 'optional false', 'numeric_index true'], ['block exchangedata', 'name cellidm2', 'type integer', 'in_record true', 'tagged false', 'reader urword', 'optional false', 'numeric_index true'], ['block exchangedata', 'name ihc', 'type integer', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block exchangedata', 'name cl1', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block exchangedata', 'name cl2', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block exchangedata', 'name hwva', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block exchangedata', 'name aux', 'type double precision', 'in_record true', 'tagged false', 'shape (naux)', 'reader urword', 'optional true', 'mf6internal auxvar'], ['block exchangedata', 'name boundname', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword', 'optional true']] def __init__( self, @@ -782,6 +192,7 @@ def __init__( dev_interfacemodel_on=None, nexg=None, exchangedata=None, + filename=None, pname=None, **kwargs, @@ -801,31 +212,23 @@ def __init__( self.exgmnameb = exgmnameb simulation.register_exchange_file(self) - self.auxiliary = self.build_mfdata("auxiliary", auxiliary) - self.boundnames = self.build_mfdata("boundnames", boundnames) - self.print_input = self.build_mfdata("print_input", print_input) - self.print_flows = self.build_mfdata("print_flows", print_flows) - self.save_flows = self.build_mfdata("save_flows", save_flows) - self.cell_averaging = self.build_mfdata("cell_averaging", cell_averaging) - self.cvoptions = self.build_mfdata("cvoptions", cvoptions) - self.newton = self.build_mfdata("newton", newton) - self.xt3d = self.build_mfdata("xt3d", xt3d) - self._gnc_filerecord = self.build_mfdata("gnc_filerecord", None) - self._gnc_package = self.build_child_package( - "gnc", gncdata, "gncdata", self._gnc_filerecord - ) - self._mvr_filerecord = self.build_mfdata("mvr_filerecord", None) - self._mvr_package = self.build_child_package( - "mvr", perioddata, "perioddata", self._mvr_filerecord - ) - self._obs_filerecord = self.build_mfdata("obs_filerecord", None) - self._obs_package = self.build_child_package( - "obs", observations, "continuous", self._obs_filerecord - ) - self.dev_interfacemodel_on = self.build_mfdata( - "dev_interfacemodel_on", dev_interfacemodel_on - ) - self.nexg = self.build_mfdata("nexg", nexg) - self.exchangedata = self.build_mfdata("exchangedata", exchangedata) + self.auxiliary = self.build_mfdata('auxiliary', auxiliary) + self.boundnames = self.build_mfdata('boundnames', boundnames) + self.print_input = self.build_mfdata('print_input', print_input) + self.print_flows = self.build_mfdata('print_flows', print_flows) + self.save_flows = self.build_mfdata('save_flows', save_flows) + self.cell_averaging = self.build_mfdata('cell_averaging', cell_averaging) + self.cvoptions = self.build_mfdata('cvoptions', cvoptions) + self.newton = self.build_mfdata('newton', newton) + self.xt3d = self.build_mfdata('xt3d', xt3d) + self._gnc_filerecord = self.build_mfdata('gnc_filerecord', None) + self._gnc_package = self.build_child_package('gnc', gncdata, 'gncdata', self._gnc_filerecord) + self._mvr_filerecord = self.build_mfdata('mvr_filerecord', None) + self._mvr_package = self.build_child_package('mvr', perioddata, 'perioddata', self._mvr_filerecord) + self._obs_filerecord = self.build_mfdata('obs_filerecord', None) + self._obs_package = self.build_child_package('obs', observations, 'continuous', self._obs_filerecord) + self.dev_interfacemodel_on = self.build_mfdata('dev_interfacemodel_on', dev_interfacemodel_on) + self.nexg = self.build_mfdata('nexg', nexg) + self.exchangedata = self.build_mfdata('exchangedata', exchangedata) self._init_complete = True diff --git a/flopy/mf6/modflow/mfgwfgwt.py b/flopy/mf6/modflow/mfgwfgwt.py index aac15508f1..b5c0d759b0 100644 --- a/flopy/mf6/modflow/mfgwfgwt.py +++ b/flopy/mf6/modflow/mfgwfgwt.py @@ -7,7 +7,6 @@ from flopy.mf6.data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator from flopy.mf6.mfpackage import MFPackage - class ModflowGwfgwt(MFPackage): """ ModflowGwfgwt defines a GWFGWT package. @@ -26,7 +25,7 @@ class ModflowGwfgwt(MFPackage): The name of the first model that is part of this exchange. exgmnameb : str, optional The name of the second model that is part of this exchange. - + filename : str or PathLike, optional Name or path of file where this package is stored. pname : str, optional @@ -36,11 +35,10 @@ class ModflowGwfgwt(MFPackage): """ - package_abbr = "gwfgwt" - _package_type = "gwfgwt" - dfn_file_name = "exg-gwfgwt.dfn" - dfn = [["header"]] - spec = {"advanced": False, "multi": False, "name": "exg-gwfgwt"} + package_abbr = 'gwfgwt' + _package_type = 'gwfgwt' + dfn_file_name = 'exg-gwfgwt.dfn' + dfn = [['header']] def __init__( self, @@ -49,6 +47,7 @@ def __init__( exgtype="GWF6-GWT6", exgmnamea=None, exgmnameb=None, + filename=None, pname=None, **kwargs, @@ -68,4 +67,5 @@ def __init__( self.exgmnameb = exgmnameb simulation.register_exchange_file(self) + self._init_complete = True diff --git a/flopy/mf6/modflow/mfgwfhfb.py b/flopy/mf6/modflow/mfgwfhfb.py index 9598fb5057..54b770501b 100644 --- a/flopy/mf6/modflow/mfgwfhfb.py +++ b/flopy/mf6/modflow/mfgwfhfb.py @@ -58,151 +58,11 @@ class ModflowGwfhfb(MFPackage): """ - stress_period_data = ListTemplateGenerator( - ("gwf6", "hfb", "period", "stress_period_data") - ) - package_abbr = "gwfhfb" - _package_type = "hfb" - dfn_file_name = "gwf-hfb.dfn" - dfn = [ - ["header"], - [ - "block options", - "name print_input", - "type keyword", - "reader urword", - "optional true", - ], - [ - "block dimensions", - "name maxhfb", - "type integer", - "reader urword", - "optional false", - "mf6internal maxbound", - ], - [ - "block period", - "name iper", - "type integer", - "block_variable true", - "in_record true", - "tagged false", - "shape", - "valid", - "reader urword", - "optional false", - ], - [ - "block period", - "name stress_period_data", - "type recarray cellid1 cellid2 hydchr", - "shape (maxhfb)", - "reader urword", - "mf6internal spd", - ], - [ - "block period", - "name cellid1", - "type integer", - "shape (ncelldim)", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block period", - "name cellid2", - "type integer", - "shape (ncelldim)", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block period", - "name hydchr", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - ] - spec = { - "advanced": False, - "dimensions": { - "maxhfb": { - "block": "dimensions", - "description": "integer value specifying the maximum number of hydraulic flow barriers that will be entered in this input file. the value of maxhfb is used to allocate memory for the hydraulic flow barriers.", - "longname": "maximum number of barriers", - "mf6internal": "maxbound", - "name": "maxhfb", - "optional": False, - "reader": "urword", - "type": "integer", - } - }, - "multi": False, - "name": "gwf-hfb", - "options": { - "print_input": { - "block": "options", - "description": "keyword to indicate that the list of hydraulic flow barriers will be written to the listing file immediately after it is read.", - "longname": "model print input to listing file", - "name": "print_input", - "optional": True, - "reader": "urword", - "type": "keyword", - } - }, - "period": { - "stress_period_data": { - "block": "period", - "item": { - "block": "period", - "fields": { - "cellid1": { - "block": "period", - "description": "identifier for the first cell. For a structured grid that uses the DIS input 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.", - "longname": "first cell adjacent to barrier", - "name": "cellid1", - "reader": "urword", - "shape": "(ncelldim)", - "type": "integer", - }, - "cellid2": { - "block": "period", - "description": "identifier for the second cell. See CELLID1 for description of how to specify.", - "longname": "second cell adjacent to barrier", - "name": "cellid2", - "reader": "urword", - "shape": "(ncelldim)", - "type": "integer", - }, - "hydchr": { - "block": "period", - "description": "is the hydraulic characteristic of the hydraulic-flow barrier. The hydraulic characteristic is the barrier hydraulic conductivity divided by the width of the hydraulic-flow barrier. If the hydraulic characteristic is negative, then the absolute value of HYDCHR acts as a multiplier to the conductance between the two model cells specified as containing the barrier. For example, if the value for HYDCHR was specified as -1.5, the conductance calculated for the two cells would be multiplied by 1.5.", - "longname": "barrier hydraulic characteristic", - "name": "hydchr", - "reader": "urword", - "type": "double precision", - }, - }, - "mf6internal": "spd", - "name": "stress_period_data", - "reader": "urword", - "type": "record", - }, - "mf6internal": "spd", - "name": "stress_period_data", - "reader": "urword", - "shape": "(maxhfb)", - "type": "recarray", - }, - "transient_block": True, - }, - } + stress_period_data = ListTemplateGenerator(('gwf6', 'hfb', 'period', 'stress_period_data')) + package_abbr = 'gwfhfb' + _package_type = 'hfb' + dfn_file_name = 'gwf-hfb.dfn' + dfn = [['header'], ['block options', 'name print_input', 'type keyword', 'reader urword', 'optional true'], ['block dimensions', 'name maxhfb', 'type integer', 'reader urword', 'optional false', 'mf6internal maxbound'], ['block period', 'name iper', 'type integer', 'block_variable true', 'in_record true', 'tagged false', 'shape', 'valid', 'reader urword', 'optional false'], ['block period', 'name stress_period_data', 'type recarray cellid1 cellid2 hydchr', 'shape (maxhfb)', 'reader urword', 'mf6internal spd'], ['block period', 'name cellid1', 'type integer', 'shape (ncelldim)', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name cellid2', 'type integer', 'shape (ncelldim)', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name hydchr', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword']] def __init__( self, @@ -211,6 +71,7 @@ def __init__( print_input=None, maxhfb=None, stress_period_data=None, + filename=None, pname=None, **kwargs, @@ -225,10 +86,9 @@ def __init__( **kwargs, ) - self.print_input = self.build_mfdata("print_input", print_input) - self.maxhfb = self.build_mfdata("maxhfb", maxhfb) - self.stress_period_data = self.build_mfdata( - "stress_period_data", stress_period_data - ) + self.print_input = self.build_mfdata('print_input', print_input) + self.maxhfb = self.build_mfdata('maxhfb', maxhfb) + self.stress_period_data = self.build_mfdata('stress_period_data', stress_period_data) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwfic.py b/flopy/mf6/modflow/mfgwfic.py index 8dbb4c2fff..29753a448b 100644 --- a/flopy/mf6/modflow/mfgwfic.py +++ b/flopy/mf6/modflow/mfgwfic.py @@ -47,82 +47,11 @@ class ModflowGwfic(MFPackage): """ - strt = ArrayTemplateGenerator(("gwf6", "ic", "griddata", "strt")) - package_abbr = "gwfic" - _package_type = "ic" - dfn_file_name = "gwf-ic.dfn" - dfn = [ - ["header"], - [ - "block options", - "name export_array_ascii", - "type keyword", - "reader urword", - "optional true", - "mf6internal export_ascii", - ], - [ - "block options", - "name export_array_netcdf", - "type keyword", - "reader urword", - "optional true", - "mf6internal export_nc", - "extended true", - ], - [ - "block griddata", - "name strt", - "type double precision", - "shape (nodes)", - "reader readarray", - "layered true", - "netcdf true", - "default 1.0", - ], - ] - spec = { - "advanced": False, - "griddata": { - "strt": { - "block": "griddata", - "default": 1.0, - "description": "is the initial (starting) head---that is, head at the beginning of the gwf model simulation. strt must be specified for all simulations, including steady-state simulations. one value is read for every model cell. for simulations in which the first stress period is steady state, the values used for strt generally do not affect the simulation (exceptions may occur if cells go dry and (or) rewet). the execution time, however, will be less if strt includes hydraulic heads that are close to the steady-state solution. a head value lower than the cell bottom can be provided if a cell should start as dry.", - "layered": True, - "longname": "starting head", - "name": "strt", - "netcdf": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - } - }, - "multi": False, - "name": "gwf-ic", - "options": { - "export_array_ascii": { - "block": "options", - "description": "keyword that specifies input griddata arrays should be written to layered ascii output files.", - "longname": "export array variables to layered ascii files.", - "mf6internal": "export_ascii", - "name": "export_array_ascii", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "export_array_netcdf": { - "block": "options", - "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", - "extended": True, - "longname": "export array variables to netcdf output files.", - "mf6internal": "export_nc", - "name": "export_array_netcdf", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - }, - } + strt = ArrayTemplateGenerator(('gwf6', 'ic', 'griddata', 'strt')) + package_abbr = 'gwfic' + _package_type = 'ic' + dfn_file_name = 'gwf-ic.dfn' + dfn = [['header'], ['block options', 'name export_array_ascii', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_ascii'], ['block options', 'name export_array_netcdf', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_nc', 'extended true'], ['block griddata', 'name strt', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true', 'default 1.0']] def __init__( self, @@ -131,6 +60,7 @@ def __init__( export_array_ascii=None, export_array_netcdf=None, strt=1.0, + filename=None, pname=None, **kwargs, @@ -145,12 +75,9 @@ def __init__( **kwargs, ) - self.export_array_ascii = self.build_mfdata( - "export_array_ascii", export_array_ascii - ) - self.export_array_netcdf = self.build_mfdata( - "export_array_netcdf", export_array_netcdf - ) - self.strt = self.build_mfdata("strt", strt) + self.export_array_ascii = self.build_mfdata('export_array_ascii', export_array_ascii) + self.export_array_netcdf = self.build_mfdata('export_array_netcdf', export_array_netcdf) + self.strt = self.build_mfdata('strt', strt) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwflak.py b/flopy/mf6/modflow/mfgwflak.py index 6559e97014..cf0bc3fcb8 100644 --- a/flopy/mf6/modflow/mfgwflak.py +++ b/flopy/mf6/modflow/mfgwflak.py @@ -397,1548 +397,22 @@ class ModflowGwflak(MFPackage): """ - auxiliary = ArrayTemplateGenerator(("gwf6", "lak", "options", "auxiliary")) - stage_filerecord = ListTemplateGenerator( - ("gwf6", "lak", "options", "stage_filerecord") - ) - budget_filerecord = ListTemplateGenerator( - ("gwf6", "lak", "options", "budget_filerecord") - ) - budgetcsv_filerecord = ListTemplateGenerator( - ("gwf6", "lak", "options", "budgetcsv_filerecord") - ) - package_convergence_filerecord = ListTemplateGenerator( - ("gwf6", "lak", "options", "package_convergence_filerecord") - ) - ts_filerecord = ListTemplateGenerator(("gwf6", "lak", "options", "ts_filerecord")) - obs_filerecord = ListTemplateGenerator(("gwf6", "lak", "options", "obs_filerecord")) - packagedata = ListTemplateGenerator(("gwf6", "lak", "packagedata", "packagedata")) - connectiondata = ListTemplateGenerator( - ("gwf6", "lak", "connectiondata", "connectiondata") - ) - tables = ListTemplateGenerator(("gwf6", "lak", "tables", "tables")) - outlets = ListTemplateGenerator(("gwf6", "lak", "outlets", "outlets")) - perioddata = ListTemplateGenerator(("gwf6", "lak", "period", "perioddata")) - package_abbr = "gwflak" - _package_type = "lak" - dfn_file_name = "gwf-lak.dfn" - dfn = [ - ["header", "multi-package", "package-type advanced-stress-package"], - [ - "block options", - "name auxiliary", - "type string", - "shape (naux)", - "reader urword", - "optional true", - ], - [ - "block options", - "name boundnames", - "type keyword", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name print_input", - "type keyword", - "reader urword", - "optional true", - ], - [ - "block options", - "name print_stage", - "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 stage_filerecord", - "type record stage fileout stagefile", - "shape", - "reader urword", - "tagged true", - "optional true", - ], - [ - "block options", - "name stage", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name stagefile", - "type string", - "preserve_case true", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - ], - [ - "block options", - "name budget_filerecord", - "type record budget fileout budgetfile", - "shape", - "reader urword", - "tagged true", - "optional true", - ], - [ - "block options", - "name budget", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name fileout", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name budgetfile", - "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", - ], - [ - "block options", - "name package_convergence_filerecord", - "type record package_convergence fileout package_convergence_filename", - "shape", - "reader urword", - "tagged true", - "optional true", - ], - [ - "block options", - "name package_convergence", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name package_convergence_filename", - "type string", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - ], - [ - "block options", - "name ts_filerecord", - "type record ts6 filein ts6_filename", - "shape", - "reader urword", - "tagged true", - "optional true", - "construct_package ts", - "construct_data timeseries", - "parameter_name timeseries", - ], - [ - "block options", - "name ts6", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name filein", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name ts6_filename", - "type string", - "preserve_case true", - "in_record true", - "reader urword", - "optional false", - "tagged false", - ], - [ - "block options", - "name obs_filerecord", - "type record obs6 filein obs6_filename", - "shape", - "reader urword", - "tagged true", - "optional true", - "construct_package obs", - "construct_data observations", - "parameter_name continuous", - ], - [ - "block options", - "name obs6", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name obs6_filename", - "type string", - "preserve_case true", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block options", - "name mover", - "type keyword", - "tagged true", - "reader urword", - "optional true", - ], - [ - "block options", - "name surfdep", - "type double precision", - "reader urword", - "optional true", - ], - [ - "block options", - "name maximum_iterations", - "type integer", - "reader urword", - "optional true", - ], - [ - "block options", - "name maximum_stage_change", - "type double precision", - "reader urword", - "optional true", - ], - [ - "block options", - "name time_conversion", - "type double precision", - "reader urword", - "optional true", - ], - [ - "block options", - "name length_conversion", - "type double precision", - "reader urword", - "optional true", - ], - [ - "block dimensions", - "name nlakes", - "type integer", - "reader urword", - "optional false", - ], - [ - "block dimensions", - "name noutlets", - "type integer", - "reader urword", - "optional false", - ], - [ - "block dimensions", - "name ntables", - "type integer", - "reader urword", - "optional false", - ], - [ - "block packagedata", - "name packagedata", - "type recarray ifno strt nlakeconn aux boundname", - "shape (maxbound)", - "reader urword", - ], - [ - "block packagedata", - "name ifno", - "type integer", - "shape", - "tagged false", - "in_record true", - "reader urword", - "numeric_index true", - ], - [ - "block packagedata", - "name strt", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block packagedata", - "name nlakeconn", - "type integer", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block packagedata", - "name aux", - "type double precision", - "in_record true", - "tagged false", - "shape (naux)", - "reader urword", - "time_series true", - "optional true", - ], - [ - "block packagedata", - "name boundname", - "type string", - "shape", - "tagged false", - "in_record true", - "reader urword", - "optional true", - ], - [ - "block connectiondata", - "name connectiondata", - "type recarray ifno iconn cellid claktype bedleak belev telev connlen connwidth", - "shape (sum(nlakeconn))", - "reader urword", - ], - [ - "block connectiondata", - "name ifno", - "type integer", - "shape", - "tagged false", - "in_record true", - "reader urword", - "numeric_index true", - ], - [ - "block connectiondata", - "name iconn", - "type integer", - "shape", - "tagged false", - "in_record true", - "reader urword", - "numeric_index true", - ], - [ - "block connectiondata", - "name cellid", - "type integer", - "shape (ncelldim)", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block connectiondata", - "name claktype", - "type string", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block connectiondata", - "name bedleak", - "type string", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block connectiondata", - "name belev", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block connectiondata", - "name telev", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block connectiondata", - "name connlen", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block connectiondata", - "name connwidth", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block tables", - "name tables", - "type recarray ifno tab6 filein tab6_filename", - "shape (ntables)", - "reader urword", - ], - [ - "block tables", - "name ifno", - "type integer", - "shape", - "tagged false", - "in_record true", - "reader urword", - "numeric_index true", - ], - [ - "block tables", - "name tab6", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block tables", - "name filein", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block tables", - "name tab6_filename", - "type string", - "preserve_case true", - "in_record true", - "reader urword", - "optional false", - "tagged false", - ], - [ - "block outlets", - "name outlets", - "type recarray outletno lakein lakeout couttype invert width rough slope", - "shape (noutlets)", - "reader urword", - ], - [ - "block outlets", - "name outletno", - "type integer", - "shape", - "tagged false", - "in_record true", - "reader urword", - "numeric_index true", - ], - [ - "block outlets", - "name lakein", - "type integer", - "shape", - "tagged false", - "in_record true", - "reader urword", - "numeric_index true", - ], - [ - "block outlets", - "name lakeout", - "type integer", - "shape", - "tagged false", - "in_record true", - "reader urword", - "numeric_index true", - ], - [ - "block outlets", - "name couttype", - "type string", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block outlets", - "name invert", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - "time_series true", - ], - [ - "block outlets", - "name width", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - "time_series true", - ], - [ - "block outlets", - "name rough", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - "time_series true", - ], - [ - "block outlets", - "name slope", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - "time_series true", - ], - [ - "block period", - "name iper", - "type integer", - "block_variable true", - "in_record true", - "tagged false", - "shape", - "valid", - "reader urword", - "optional false", - ], - [ - "block period", - "name perioddata", - "type recarray number laksetting", - "shape", - "reader urword", - ], - [ - "block period", - "name number", - "type integer", - "shape", - "tagged false", - "in_record true", - "reader urword", - "numeric_index true", - ], - [ - "block period", - "name laksetting", - "type keystring status stage rainfall evaporation runoff inflow withdrawal rate invert width slope rough auxiliaryrecord", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block period", - "name status", - "type string", - "shape", - "tagged true", - "in_record true", - "reader urword", - ], - [ - "block period", - "name stage", - "type string", - "shape", - "tagged true", - "in_record true", - "time_series true", - "reader urword", - ], - [ - "block period", - "name rainfall", - "type string", - "shape", - "tagged true", - "in_record true", - "reader urword", - "time_series true", - ], - [ - "block period", - "name evaporation", - "type string", - "shape", - "tagged true", - "in_record true", - "reader urword", - "time_series true", - ], - [ - "block period", - "name runoff", - "type string", - "shape", - "tagged true", - "in_record true", - "reader urword", - "time_series true", - ], - [ - "block period", - "name inflow", - "type string", - "shape", - "tagged true", - "in_record true", - "reader urword", - "time_series true", - ], - [ - "block period", - "name withdrawal", - "type string", - "shape", - "tagged true", - "in_record true", - "reader urword", - "time_series true", - ], - [ - "block period", - "name rate", - "type string", - "shape", - "tagged true", - "in_record true", - "reader urword", - "time_series true", - ], - [ - "block period", - "name invert", - "type string", - "shape", - "tagged true", - "in_record true", - "reader urword", - "time_series true", - ], - [ - "block period", - "name rough", - "type string", - "shape", - "tagged true", - "in_record true", - "reader urword", - "time_series true", - ], - [ - "block period", - "name width", - "type string", - "shape", - "tagged true", - "in_record true", - "reader urword", - "time_series true", - ], - [ - "block period", - "name slope", - "type string", - "shape", - "tagged true", - "in_record true", - "reader urword", - "time_series true", - ], - [ - "block period", - "name auxiliaryrecord", - "type record auxiliary auxname auxval", - "shape", - "tagged", - "in_record true", - "reader urword", - ], - [ - "block period", - "name auxiliary", - "type keyword", - "shape", - "in_record true", - "reader urword", - ], - [ - "block period", - "name auxname", - "type string", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block period", - "name auxval", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - "time_series true", - ], - ] - spec = { - "advanced": True, - "connectiondata": { - "connectiondata": { - "block": "connectiondata", - "item": { - "block": "connectiondata", - "fields": { - "bedleak": { - "block": "connectiondata", - "description": "real value or character string that defines the bed leakance for the lake-GWF connection. BEDLEAK must be greater than or equal to zero, equal to the DNODATA value (3.0E+30), or specified to be NONE. If DNODATA or NONE is specified for BEDLEAK, the lake-GWF connection conductance is solely a function of aquifer properties in the connected GWF cell and lakebed sediments are assumed to be absent. Warning messages will be issued if NONE is specified. Eventually the ability to specify NONE will be deprecated and cause MODFLOW 6 to terminate with an error.", - "longname": "bed leakance", - "name": "bedleak", - "reader": "urword", - "type": "string", - }, - "belev": { - "block": "connectiondata", - "description": "real value that defines the bottom elevation for a HORIZONTAL lake-GWF connection. Any value can be specified if CLAKTYPE is VERTICAL, EMBEDDEDH, or EMBEDDEDV. If CLAKTYPE is HORIZONTAL and BELEV is not equal to TELEV, BELEV must be greater than or equal to the bottom of the GWF cell CELLID. If BELEV is equal to TELEV, BELEV is reset to the bottom of the GWF cell CELLID.", - "longname": "bottom elevation", - "name": "belev", - "reader": "urword", - "type": "double precision", - }, - "cellid": { - "block": "connectiondata", - "description": "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 layer, row, and column. For a grid that uses the DISV input file, CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file, CELLID is the node number for the cell.", - "longname": "cell identifier", - "name": "cellid", - "reader": "urword", - "shape": "(ncelldim)", - "type": "integer", - }, - "claktype": { - "block": "connectiondata", - "description": "character string that defines the lake-GWF connection type for the lake connection. Possible lake-GWF connection type strings include: VERTICAL--character keyword to indicate the lake-GWF connection is vertical and connection conductance calculations use the hydraulic conductivity corresponding to the $K_{33}$ tensor component defined for CELLID in the NPF package. HORIZONTAL--character keyword to indicate the lake-GWF connection is horizontal and connection conductance calculations use the hydraulic conductivity corresponding to the $K_{11}$ tensor component defined for CELLID in the NPF package. EMBEDDEDH--character keyword to indicate the lake-GWF connection is embedded in a single cell and connection conductance calculations use the hydraulic conductivity corresponding to the $K_{11}$ tensor component defined for CELLID in the NPF package. EMBEDDEDV--character keyword to indicate the lake-GWF connection is embedded in a single cell and connection conductance calculations use the hydraulic conductivity corresponding to the $K_{33}$ tensor component defined for CELLID in the NPF package. Embedded lakes can only be connected to a single cell (NLAKECONN = 1) and there must be a lake table associated with each embedded lake.", - "longname": "lake connection type", - "name": "claktype", - "reader": "urword", - "type": "string", - }, - "connlen": { - "block": "connectiondata", - "description": "real value that defines the distance between the connected GWF CELLID node and the lake for a HORIZONTAL, EMBEDDEDH, or EMBEDDEDV lake-GWF connection. CONLENN must be greater than zero for a HORIZONTAL, EMBEDDEDH, or EMBEDDEDV lake-GWF connection. Any value can be specified if CLAKTYPE is VERTICAL.", - "longname": "connection length", - "name": "connlen", - "reader": "urword", - "type": "double precision", - }, - "connwidth": { - "block": "connectiondata", - "description": "real value that defines the connection face width for a HORIZONTAL lake-GWF connection. CONNWIDTH must be greater than zero for a HORIZONTAL lake-GWF connection. Any value can be specified if CLAKTYPE is VERTICAL, EMBEDDEDH, or EMBEDDEDV.", - "longname": "connection width", - "name": "connwidth", - "reader": "urword", - "type": "double precision", - }, - "iconn": { - "block": "connectiondata", - "description": "integer value that defines the GWF connection number for this lake connection entry. ICONN must be greater than zero and less than or equal to NLAKECONN for lake IFNO.", - "longname": "connection number for this entry", - "name": "iconn", - "numeric_index": "true", - "reader": "urword", - "type": "integer", - }, - "ifno": { - "block": "tables", - "description": "integer value that defines the feature (lake) number associated with the specified TABLES data on the line. IFNO must be greater than zero and less than or equal to NLAKES. The program will terminate with an error if table information for a lake is specified more than once or the number of specified tables is less than NTABLES.", - "longname": "lake number for this entry", - "name": "ifno", - "numeric_index": "true", - "reader": "urword", - "type": "integer", - }, - "telev": { - "block": "connectiondata", - "description": "real value that defines the top elevation for a HORIZONTAL lake-GWF connection. Any value can be specified if CLAKTYPE is VERTICAL, EMBEDDEDH, or EMBEDDEDV. If CLAKTYPE is HORIZONTAL and TELEV is not equal to BELEV, TELEV must be less than or equal to the top of the GWF cell CELLID. If TELEV is equal to BELEV, TELEV is reset to the top of the GWF cell CELLID.", - "longname": "top elevation", - "name": "telev", - "reader": "urword", - "type": "double precision", - }, - }, - "name": "connectiondata", - "reader": "urword", - "type": "record", - }, - "name": "connectiondata", - "reader": "urword", - "shape": "(sum(nlakeconn))", - "type": "recarray", - } - }, - "dimensions": { - "nlakes": { - "block": "dimensions", - "description": "value specifying the number of lakes that will be simulated for all stress periods.", - "longname": "number of lakes", - "name": "nlakes", - "optional": False, - "reader": "urword", - "type": "integer", - }, - "noutlets": { - "block": "dimensions", - "description": "value specifying the number of outlets that will be simulated for all stress periods. if noutlets is not specified, a default value of zero is used.", - "longname": "number of outlets", - "name": "noutlets", - "optional": False, - "reader": "urword", - "type": "integer", - }, - "ntables": { - "block": "dimensions", - "description": "value specifying the number of lakes tables that will be used to define the lake stage, volume relation, and surface area. if ntables is not specified, a default value of zero is used.", - "longname": "number of tables", - "name": "ntables", - "optional": False, - "reader": "urword", - "type": "integer", - }, - }, - "fkeys": { - "obs_filerecord": { - "abbr": "obs", - "key": "obs_filerecord", - "param": "continuous", - "parent": "parent_model_or_package", - "val": "observations", - }, - "ts_filerecord": { - "abbr": "ts", - "description": "xxx", - "key": "ts_filerecord", - "param": "timeseries", - "parent": "parent_package", - "val": "timeseries", - }, - }, - "multi": True, - "name": "gwf-lak", - "options": { - "auxiliary": { - "block": "options", - "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", - "longname": "keyword to specify aux variables", - "name": "auxiliary", - "optional": True, - "reader": "urword", - "shape": "(naux)", - "type": "string", - }, - "boundnames": { - "block": "options", - "description": "keyword to indicate that boundary names may be provided with the list of lake cells.", - "name": "boundnames", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "budget_filerecord": { - "block": "options", - "fields": { - "budgetfile": { - "block": "options", - "description": "name of the binary output file to write budget information.", - "longname": "file keyword", - "name": "budgetfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "budget_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "budgetcsv_filerecord": { - "block": "options", - "fields": { - "budgetcsvfile": { - "block": "options", - "description": "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.", - "longname": "file keyword", - "name": "budgetcsvfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "budgetcsv_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "length_conversion": { - "block": "options", - "description": "real value that is used to convert outlet user-specified manning's roughness coefficients or gravitational acceleration used to calculate outlet flows from meters to model length units. length_conversion should be set to 3.28081, 1.0, and 100.0 when using length units (length_units) of feet, meters, or centimeters in the simulation, respectively. length_conversion does not need to be specified if no lake outlets are specified or length_units are meters.", - "longname": "length conversion factor", - "name": "length_conversion", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - "maximum_iterations": { - "block": "options", - "description": "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.", - "longname": "lak newton-raphson iterations", - "name": "maximum_iterations", - "optional": True, - "reader": "urword", - "type": "integer", - }, - "maximum_stage_change": { - "block": "options", - "description": "real value that defines the lake stage closure tolerance. by default, maximum_stage_change is equal to $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.", - "longname": "stage closure tolerance", - "name": "maximum_stage_change", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - "mover": { - "block": "options", - "description": "keyword to indicate that this instance of the lak package can be used with the water mover (mvr) package. when the mover option is specified, additional memory is allocated within the package to store the available, provided, and received water.", - "name": "mover", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "observations": { - "block": "options", - "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", - "name": "observations", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "obs", - "key": "obs_filerecord", - "param": "continuous", - "parent": "parent_model_or_package", - "val": "observations", - }, - "type": "record obs6 filein obs6_filename", - }, - "package_convergence_filerecord": { - "block": "options", - "fields": { - "package_convergence_filename": { - "block": "options", - "description": "name of the comma spaced values output file to write package convergence information.", - "longname": "file keyword", - "name": "package_convergence_filename", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "package_convergence_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "print_flows": { - "block": "options", - "description": "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.", - "longname": "print calculated flows to listing file", - "name": "print_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "print_input": { - "block": "options", - "description": "keyword to indicate that the list of lake information will be written to the listing file immediately after it is read.", - "longname": "print input to listing file", - "name": "print_input", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "print_stage": { - "block": "options", - "description": "keyword to indicate that the list of lake {#2} will be printed to the listing file for every stress period in which 'head print' is specified in output control. if there is no output control option and print_{#3} is specified, then {#2} are printed for the last time step of each stress period.", - "longname": "print calculated stages to listing file", - "name": "print_stage", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "save_flows": { - "block": "options", - "description": "keyword to indicate that lake flow terms will be written to the file specified with 'budget fileout' in output control.", - "longname": "save lake flows to budget file", - "name": "save_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "stage_filerecord": { - "block": "options", - "fields": { - "stagefile": { - "block": "options", - "description": "name of the binary output file to write stage information.", - "longname": "file keyword", - "name": "stagefile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "stage_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "surfdep": { - "block": "options", - "description": "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.", - "longname": "surface depression depth", - "name": "surfdep", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - "time_conversion": { - "block": "options", - "description": "real value that is used to convert user-specified manning's roughness coefficients or gravitational acceleration used to calculate outlet flows from seconds to model time units. time_conversion should be set to 1.0, 60.0, 3,600.0, 86,400.0, and 31,557,600.0 when using time units (time_units) of seconds, minutes, hours, days, or years in the simulation, respectively. time_conversion does not need to be specified if no lake outlets are specified or time_units are seconds.", - "longname": "time conversion factor", - "name": "time_conversion", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - "timeseries": { - "block": "options", - "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", - "name": "timeseries", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "ts", - "description": "xxx", - "key": "ts_filerecord", - "param": "timeseries", - "parent": "parent_package", - "val": "timeseries", - }, - "type": "record ts6 filein ts6_filename", - }, - }, - "outlets": { - "outlets": { - "block": "outlets", - "item": { - "block": "outlets", - "fields": { - "couttype": { - "block": "outlets", - "description": "character string that defines the outlet type for the outlet OUTLETNO. Possible COUTTYPE strings include: SPECIFIED--character keyword to indicate the outlet is defined as a specified flow. MANNING--character keyword to indicate the outlet is defined using Manning's equation. WEIR--character keyword to indicate the outlet is defined using a sharp weir equation.", - "longname": "outlet type", - "name": "couttype", - "reader": "urword", - "type": "string", - }, - "invert": { - "block": "period", - "description": "real or character value that defines the invert elevation for the lake outlet. A specified INVERT value is only used for active lakes if COUTTYPE for lake outlet OUTLETNO is not SPECIFIED. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "invert elevation", - "name": "invert", - "reader": "urword", - "time_series": "true", - "type": "string", - }, - "lakein": { - "block": "outlets", - "description": "integer value that defines the lake number that outlet is connected to. LAKEIN must be greater than zero and less than or equal to NLAKES.", - "longname": "lake number for upstream lake", - "name": "lakein", - "numeric_index": "true", - "reader": "urword", - "type": "integer", - }, - "lakeout": { - "block": "outlets", - "description": "integer value that defines the lake number that outlet discharge from lake outlet OUTLETNO is routed to. LAKEOUT must be greater than or equal to zero and less than or equal to NLAKES. If LAKEOUT is zero, outlet discharge from lake outlet OUTLETNO is discharged to an external boundary.", - "longname": "lake number for downstream lake", - "name": "lakeout", - "numeric_index": "true", - "reader": "urword", - "type": "integer", - }, - "outletno": { - "block": "outlets", - "description": "integer value that defines the outlet number associated with the specified OUTLETS data on the line. OUTLETNO must be greater than zero and less than or equal to NOUTLETS. Outlet information must be specified for every outlet or the program will terminate with an error. The program will also terminate with an error if information for a outlet is specified more than once.", - "longname": "outlet number for this entry", - "name": "outletno", - "numeric_index": "true", - "reader": "urword", - "type": "integer", - }, - "rough": { - "block": "period", - "description": "real value that defines the roughness coefficient for the lake outlet. Any value can be specified if COUTTYPE is not MANNING. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "roughness coefficient", - "name": "rough", - "reader": "urword", - "time_series": "true", - "type": "string", - }, - "slope": { - "block": "period", - "description": "real or character value that defines the bed slope for the lake outlet. A specified SLOPE value is only used for active lakes if COUTTYPE for lake outlet OUTLETNO is MANNING. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "bed slope", - "name": "slope", - "reader": "urword", - "time_series": "true", - "type": "string", - }, - "width": { - "block": "period", - "description": "real or character value that defines the width of the lake outlet. A specified WIDTH value is only used for active lakes if COUTTYPE for lake outlet OUTLETNO is not SPECIFIED. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "outlet width", - "name": "width", - "reader": "urword", - "time_series": "true", - "type": "string", - }, - }, - "name": "outlets", - "reader": "urword", - "type": "record", - }, - "name": "outlets", - "reader": "urword", - "shape": "(noutlets)", - "type": "recarray", - } - }, - "packagedata": { - "packagedata": { - "block": "packagedata", - "item": { - "block": "packagedata", - "fields": { - "aux": { - "block": "packagedata", - "description": "represents the values of the auxiliary variables for each lake. The values of auxiliary variables must be present for each lake. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "auxiliary variables", - "name": "aux", - "optional": "true", - "reader": "urword", - "shape": "(naux)", - "time_series": "true", - "type": "double precision", - }, - "boundname": { - "block": "packagedata", - "description": "name of the lake cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", - "longname": "well name", - "name": "boundname", - "optional": "true", - "reader": "urword", - "type": "string", - }, - "ifno": { - "block": "tables", - "description": "integer value that defines the feature (lake) number associated with the specified TABLES data on the line. IFNO must be greater than zero and less than or equal to NLAKES. The program will terminate with an error if table information for a lake is specified more than once or the number of specified tables is less than NTABLES.", - "longname": "lake number for this entry", - "name": "ifno", - "numeric_index": "true", - "reader": "urword", - "type": "integer", - }, - "nlakeconn": { - "block": "packagedata", - "description": "integer value that defines the number of GWF cells connected to this (IFNO) lake. There can only be one vertical lake connection to each GWF cell. NLAKECONN must be greater than zero.", - "longname": "number of lake connections", - "name": "nlakeconn", - "reader": "urword", - "type": "integer", - }, - "strt": { - "block": "packagedata", - "description": "real value that defines the starting stage for the lake.", - "longname": "starting lake stage", - "name": "strt", - "reader": "urword", - "type": "double precision", - }, - }, - "name": "packagedata", - "reader": "urword", - "type": "record", - }, - "name": "packagedata", - "reader": "urword", - "shape": "(maxbound)", - "type": "recarray", - } - }, - "period": { - "perioddata": { - "block": "period", - "item": { - "block": "period", - "fields": { - "laksetting": { - "block": "period", - "choices": { - "auxiliaryrecord": { - "block": "period", - "fields": { - "auxiliary": { - "block": "period", - "description": "keyword for specifying auxiliary variable.", - "name": "auxiliary", - "reader": "urword", - "type": "keyword", - }, - "auxname": { - "block": "period", - "description": "name for the auxiliary variable to be assigned AUXVAL. AUXNAME must match one of the auxiliary variable names defined in the OPTIONS block. If AUXNAME does not match one of the auxiliary variable names defined in the OPTIONS block the data are ignored.", - "name": "auxname", - "reader": "urword", - "type": "string", - }, - "auxval": { - "block": "period", - "description": "value for the auxiliary variable. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "auxiliary variable value", - "name": "auxval", - "reader": "urword", - "time_series": "true", - "type": "double precision", - }, - }, - "name": "auxiliaryrecord", - "reader": "urword", - "type": "record", - }, - "evaporation": { - "block": "period", - "description": "real or character value that defines the maximum evaporation rate $(lt^{-1})$ for the lake. value must be greater than or equal to zero. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "evaporation rate", - "name": "evaporation", - "reader": "urword", - "time_series": True, - "type": "string", - }, - "inflow": { - "block": "period", - "description": "real or character value that defines the volumetric inflow rate $(l^3 t^{-1})$ for the lake. value must be greater than or equal to zero. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value. by default, inflow rates are zero for each lake.", - "longname": "inflow rate", - "name": "inflow", - "reader": "urword", - "time_series": True, - "type": "string", - }, - "invert": { - "block": "period", - "description": "real or character value that defines the invert elevation for the lake outlet. a specified invert value is only used for active lakes if couttype for lake outlet outletno is not specified. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "invert elevation", - "name": "invert", - "reader": "urword", - "time_series": True, - "type": "string", - }, - "rainfall": { - "block": "period", - "description": "real or character value that defines the rainfall rate $(lt^{-1})$ for the lake. value must be greater than or equal to zero. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "rainfall rate", - "name": "rainfall", - "reader": "urword", - "time_series": True, - "type": "string", - }, - "rate": { - "block": "period", - "description": "real or character value that defines the extraction rate for the lake outflow. a positive value indicates inflow and a negative value indicates outflow from the lake. rate only applies to outlets associated with active lakes (status is active). a specified rate is only applied if couttype for the outletno is specified. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value. by default, the rate for each specified lake outlet is zero.", - "longname": "extraction rate", - "name": "rate", - "reader": "urword", - "time_series": True, - "type": "string", - }, - "rough": { - "block": "period", - "description": "real value that defines the roughness coefficient for the lake outlet. any value can be specified if couttype is not manning. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "roughness coefficient", - "name": "rough", - "reader": "urword", - "time_series": True, - "type": "string", - }, - "runoff": { - "block": "period", - "description": "real or character value that defines the runoff rate $(l^3 t^{-1})$ for the lake. value must be greater than or equal to zero. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "runoff rate", - "name": "runoff", - "reader": "urword", - "time_series": True, - "type": "string", - }, - "slope": { - "block": "period", - "description": "real or character value that defines the bed slope for the lake outlet. a specified slope value is only used for active lakes if couttype for lake outlet outletno is manning. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "bed slope", - "name": "slope", - "reader": "urword", - "time_series": True, - "type": "string", - }, - "stage": { - "block": "period", - "description": "real or character value that defines the stage for the lake. the specified stage is only applied if the lake is a constant stage lake. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "lake stage", - "name": "stage", - "reader": "urword", - "time_series": True, - "type": "string", - }, - "status": { - "block": "period", - "description": "keyword option to define lake status. status can be active, inactive, or constant. by default, status is active.", - "longname": "lake status", - "name": "status", - "reader": "urword", - "type": "string", - }, - "width": { - "block": "period", - "description": "real or character value that defines the width of the lake outlet. a specified width value is only used for active lakes if couttype for lake outlet outletno is not specified. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "outlet width", - "name": "width", - "reader": "urword", - "time_series": True, - "type": "string", - }, - "withdrawal": { - "block": "period", - "description": "real or character value that defines the maximum withdrawal rate $(l^3 t^{-1})$ for the lake. value must be greater than or equal to zero. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "maximum withdrawal rate", - "name": "withdrawal", - "reader": "urword", - "time_series": True, - "type": "string", - }, - }, - "description": "line of information that is parsed into a keyword and values. keyword values that can be used to start the laksetting string include both keywords for lake settings and keywords for outlet settings. keywords for lake settings include: status, stage, rainfall, evaporation, runoff, inflow, withdrawal, and auxiliary. keywords for outlet settings include rate, invert, width, slope, and rough.", - "name": "laksetting", - "reader": "urword", - "type": "keystring", - }, - "number": { - "block": "period", - "description": "integer value that defines the lake or outlet number associated with the specified period data on the line. number must be greater than zero and less than or equal to nlakes for a lake number and less than or equal to noutlets for an outlet number.", - "longname": "lake or outlet number for this entry", - "name": "number", - "numeric_index": True, - "reader": "urword", - "type": "integer", - }, - }, - "name": "perioddata", - "reader": "urword", - "type": "record", - }, - "name": "perioddata", - "reader": "urword", - "type": "recarray", - }, - "transient_block": True, - }, - "tables": { - "tables": { - "block": "tables", - "item": { - "block": "tables", - "fields": { - "filein": { - "block": "tables", - "description": "keyword to specify that an input filename is expected next.", - "longname": "file keyword", - "name": "filein", - "optional": "false", - "reader": "urword", - "type": "keyword", - }, - "ifno": { - "block": "tables", - "description": "integer value that defines the feature (lake) number associated with the specified TABLES data on the line. IFNO must be greater than zero and less than or equal to NLAKES. The program will terminate with an error if table information for a lake is specified more than once or the number of specified tables is less than NTABLES.", - "longname": "lake number for this entry", - "name": "ifno", - "numeric_index": "true", - "reader": "urword", - "type": "integer", - }, - "tab6": { - "block": "tables", - "description": "keyword to specify that record corresponds to a table file.", - "longname": "head keyword", - "name": "tab6", - "optional": "false", - "reader": "urword", - "type": "keyword", - }, - "tab6_filename": { - "block": "tables", - "description": "character string that defines the path and filename for the file containing lake table data for the lake connection. The TAB6_FILENAME file includes the number of entries in the file and the relation between stage, volume, and surface area for each entry in the file. Lake table files for EMBEDDEDH and EMBEDDEDV lake-GWF connections also include lake-GWF exchange area data for each entry in the file. Instructions for creating the TAB6_FILENAME input file are provided in Lake Table Input File section.", - "longname": "table file name", - "name": "tab6_filename", - "optional": "false", - "reader": "urword", - "type": "string", - }, - }, - "name": "tables", - "reader": "urword", - "type": "record", - }, - "name": "tables", - "reader": "urword", - "shape": "(ntables)", - "type": "recarray", - } - }, - } + auxiliary = ArrayTemplateGenerator(('gwf6', 'lak', 'options', 'auxiliary')) + stage_filerecord = ListTemplateGenerator(('gwf6', 'lak', 'options', 'stage_filerecord')) + budget_filerecord = ListTemplateGenerator(('gwf6', 'lak', 'options', 'budget_filerecord')) + budgetcsv_filerecord = ListTemplateGenerator(('gwf6', 'lak', 'options', 'budgetcsv_filerecord')) + package_convergence_filerecord = ListTemplateGenerator(('gwf6', 'lak', 'options', 'package_convergence_filerecord')) + ts_filerecord = ListTemplateGenerator(('gwf6', 'lak', 'options', 'ts_filerecord')) + obs_filerecord = ListTemplateGenerator(('gwf6', 'lak', 'options', 'obs_filerecord')) + packagedata = ListTemplateGenerator(('gwf6', 'lak', 'packagedata', 'packagedata')) + connectiondata = ListTemplateGenerator(('gwf6', 'lak', 'connectiondata', 'connectiondata')) + tables = ListTemplateGenerator(('gwf6', 'lak', 'tables', 'tables')) + outlets = ListTemplateGenerator(('gwf6', 'lak', 'outlets', 'outlets')) + perioddata = ListTemplateGenerator(('gwf6', 'lak', 'period', 'perioddata')) + package_abbr = 'gwflak' + _package_type = 'lak' + dfn_file_name = 'gwf-lak.dfn' + dfn = [['header', 'multi-package', 'package-type advanced-stress-package'], ['block options', 'name auxiliary', 'type string', 'shape (naux)', 'reader urword', 'optional true'], ['block options', 'name boundnames', 'type keyword', 'shape', 'reader urword', 'optional true'], ['block options', 'name print_input', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name print_stage', '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 stage_filerecord', 'type record stage fileout stagefile', 'shape', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name stage', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name stagefile', 'type string', 'preserve_case true', 'shape', 'in_record true', 'reader urword', 'tagged false', 'optional false'], ['block options', 'name budget_filerecord', 'type record budget fileout budgetfile', 'shape', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name budget', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name fileout', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name budgetfile', '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'], ['block options', 'name package_convergence_filerecord', 'type record package_convergence fileout package_convergence_filename', 'shape', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name package_convergence', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name package_convergence_filename', 'type string', 'shape', 'in_record true', 'reader urword', 'tagged false', 'optional false'], ['block options', 'name ts_filerecord', 'type record ts6 filein ts6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package ts', 'construct_data timeseries', 'parameter_name timeseries'], ['block options', 'name ts6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name filein', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name ts6_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false'], ['block options', 'name obs_filerecord', 'type record obs6 filein obs6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package obs', 'construct_data observations', 'parameter_name continuous'], ['block options', 'name obs6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name obs6_filename', 'type string', 'preserve_case true', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block options', 'name mover', 'type keyword', 'tagged true', 'reader urword', 'optional true'], ['block options', 'name surfdep', 'type double precision', 'reader urword', 'optional true'], ['block options', 'name maximum_iterations', 'type integer', 'reader urword', 'optional true'], ['block options', 'name maximum_stage_change', 'type double precision', 'reader urword', 'optional true'], ['block options', 'name time_conversion', 'type double precision', 'reader urword', 'optional true'], ['block options', 'name length_conversion', 'type double precision', 'reader urword', 'optional true'], ['block dimensions', 'name nlakes', 'type integer', 'reader urword', 'optional false'], ['block dimensions', 'name noutlets', 'type integer', 'reader urword', 'optional false'], ['block dimensions', 'name ntables', 'type integer', 'reader urword', 'optional false'], ['block packagedata', 'name packagedata', 'type recarray ifno strt nlakeconn aux boundname', 'shape (maxbound)', 'reader urword'], ['block packagedata', 'name ifno', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block packagedata', 'name strt', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block packagedata', 'name nlakeconn', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block packagedata', 'name aux', 'type double precision', 'in_record true', 'tagged false', 'shape (naux)', 'reader urword', 'time_series true', 'optional true'], ['block packagedata', 'name boundname', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword', 'optional true'], ['block connectiondata', 'name connectiondata', 'type recarray ifno iconn cellid claktype bedleak belev telev connlen connwidth', 'shape (sum(nlakeconn))', 'reader urword'], ['block connectiondata', 'name ifno', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block connectiondata', 'name iconn', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block connectiondata', 'name cellid', 'type integer', 'shape (ncelldim)', 'tagged false', 'in_record true', 'reader urword'], ['block connectiondata', 'name claktype', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block connectiondata', 'name bedleak', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block connectiondata', 'name belev', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block connectiondata', 'name telev', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block connectiondata', 'name connlen', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block connectiondata', 'name connwidth', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block tables', 'name tables', 'type recarray ifno tab6 filein tab6_filename', 'shape (ntables)', 'reader urword'], ['block tables', 'name ifno', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block tables', 'name tab6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block tables', 'name filein', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block tables', 'name tab6_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false'], ['block outlets', 'name outlets', 'type recarray outletno lakein lakeout couttype invert width rough slope', 'shape (noutlets)', 'reader urword'], ['block outlets', 'name outletno', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block outlets', 'name lakein', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block outlets', 'name lakeout', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block outlets', 'name couttype', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block outlets', 'name invert', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword', 'time_series true'], ['block outlets', 'name width', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword', 'time_series true'], ['block outlets', 'name rough', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword', 'time_series true'], ['block outlets', 'name slope', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name iper', 'type integer', 'block_variable true', 'in_record true', 'tagged false', 'shape', 'valid', 'reader urword', 'optional false'], ['block period', 'name perioddata', 'type recarray number laksetting', 'shape', 'reader urword'], ['block period', 'name number', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block period', 'name laksetting', 'type keystring status stage rainfall evaporation runoff inflow withdrawal rate invert width slope rough auxiliaryrecord', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name status', 'type string', 'shape', 'tagged true', 'in_record true', 'reader urword'], ['block period', 'name stage', 'type string', 'shape', 'tagged true', 'in_record true', 'time_series true', 'reader urword'], ['block period', 'name rainfall', 'type string', 'shape', 'tagged true', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name evaporation', 'type string', 'shape', 'tagged true', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name runoff', 'type string', 'shape', 'tagged true', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name inflow', 'type string', 'shape', 'tagged true', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name withdrawal', 'type string', 'shape', 'tagged true', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name rate', 'type string', 'shape', 'tagged true', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name invert', 'type string', 'shape', 'tagged true', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name rough', 'type string', 'shape', 'tagged true', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name width', 'type string', 'shape', 'tagged true', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name slope', 'type string', 'shape', 'tagged true', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name auxiliaryrecord', 'type record auxiliary auxname auxval', 'shape', 'tagged', 'in_record true', 'reader urword'], ['block period', 'name auxiliary', 'type keyword', 'shape', 'in_record true', 'reader urword'], ['block period', 'name auxname', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name auxval', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword', 'time_series true']] def __init__( self, @@ -1970,6 +444,7 @@ def __init__( tables=None, outlets=None, perioddata=None, + filename=None, pname=None, **kwargs, @@ -1984,49 +459,34 @@ def __init__( **kwargs, ) - self.auxiliary = self.build_mfdata("auxiliary", auxiliary) - self.boundnames = self.build_mfdata("boundnames", boundnames) - self.print_input = self.build_mfdata("print_input", print_input) - self.print_stage = self.build_mfdata("print_stage", print_stage) - self.print_flows = self.build_mfdata("print_flows", print_flows) - self.save_flows = self.build_mfdata("save_flows", save_flows) - self.stage_filerecord = self.build_mfdata("stage_filerecord", stage_filerecord) - self.budget_filerecord = self.build_mfdata( - "budget_filerecord", budget_filerecord - ) - self.budgetcsv_filerecord = self.build_mfdata( - "budgetcsv_filerecord", budgetcsv_filerecord - ) - self.package_convergence_filerecord = self.build_mfdata( - "package_convergence_filerecord", package_convergence_filerecord - ) - self._ts_filerecord = self.build_mfdata("ts_filerecord", None) - self._ts_package = self.build_child_package( - "ts", timeseries, "timeseries", self._ts_filerecord - ) - self._obs_filerecord = self.build_mfdata("obs_filerecord", None) - self._obs_package = self.build_child_package( - "obs", observations, "continuous", self._obs_filerecord - ) - self.mover = self.build_mfdata("mover", mover) - self.surfdep = self.build_mfdata("surfdep", surfdep) - self.maximum_iterations = self.build_mfdata( - "maximum_iterations", maximum_iterations - ) - self.maximum_stage_change = self.build_mfdata( - "maximum_stage_change", maximum_stage_change - ) - self.time_conversion = self.build_mfdata("time_conversion", time_conversion) - self.length_conversion = self.build_mfdata( - "length_conversion", length_conversion - ) - self.nlakes = self.build_mfdata("nlakes", nlakes) - self.noutlets = self.build_mfdata("noutlets", noutlets) - self.ntables = self.build_mfdata("ntables", ntables) - self.packagedata = self.build_mfdata("packagedata", packagedata) - self.connectiondata = self.build_mfdata("connectiondata", connectiondata) - self.tables = self.build_mfdata("tables", tables) - self.outlets = self.build_mfdata("outlets", outlets) - self.perioddata = self.build_mfdata("perioddata", perioddata) + self.auxiliary = self.build_mfdata('auxiliary', auxiliary) + self.boundnames = self.build_mfdata('boundnames', boundnames) + self.print_input = self.build_mfdata('print_input', print_input) + self.print_stage = self.build_mfdata('print_stage', print_stage) + self.print_flows = self.build_mfdata('print_flows', print_flows) + self.save_flows = self.build_mfdata('save_flows', save_flows) + self.stage_filerecord = self.build_mfdata('stage_filerecord', stage_filerecord) + self.budget_filerecord = self.build_mfdata('budget_filerecord', budget_filerecord) + self.budgetcsv_filerecord = self.build_mfdata('budgetcsv_filerecord', budgetcsv_filerecord) + self.package_convergence_filerecord = self.build_mfdata('package_convergence_filerecord', package_convergence_filerecord) + self._ts_filerecord = self.build_mfdata('ts_filerecord', None) + self._ts_package = self.build_child_package('ts', timeseries, 'timeseries', self._ts_filerecord) + self._obs_filerecord = self.build_mfdata('obs_filerecord', None) + self._obs_package = self.build_child_package('obs', observations, 'continuous', self._obs_filerecord) + self.mover = self.build_mfdata('mover', mover) + self.surfdep = self.build_mfdata('surfdep', surfdep) + self.maximum_iterations = self.build_mfdata('maximum_iterations', maximum_iterations) + self.maximum_stage_change = self.build_mfdata('maximum_stage_change', maximum_stage_change) + self.time_conversion = self.build_mfdata('time_conversion', time_conversion) + self.length_conversion = self.build_mfdata('length_conversion', length_conversion) + self.nlakes = self.build_mfdata('nlakes', nlakes) + self.noutlets = self.build_mfdata('noutlets', noutlets) + self.ntables = self.build_mfdata('ntables', ntables) + self.packagedata = self.build_mfdata('packagedata', packagedata) + self.connectiondata = self.build_mfdata('connectiondata', connectiondata) + self.tables = self.build_mfdata('tables', tables) + self.outlets = self.build_mfdata('outlets', outlets) + self.perioddata = self.build_mfdata('perioddata', perioddata) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwfmaw.py b/flopy/mf6/modflow/mfgwfmaw.py index cc79efce59..58d2871541 100644 --- a/flopy/mf6/modflow/mfgwfmaw.py +++ b/flopy/mf6/modflow/mfgwfmaw.py @@ -362,1319 +362,20 @@ class ModflowGwfmaw(MFPackage): """ - auxiliary = ArrayTemplateGenerator(("gwf6", "maw", "options", "auxiliary")) - head_filerecord = ListTemplateGenerator( - ("gwf6", "maw", "options", "head_filerecord") - ) - budget_filerecord = ListTemplateGenerator( - ("gwf6", "maw", "options", "budget_filerecord") - ) - budgetcsv_filerecord = ListTemplateGenerator( - ("gwf6", "maw", "options", "budgetcsv_filerecord") - ) - mfrcsv_filerecord = ListTemplateGenerator( - ("gwf6", "maw", "options", "mfrcsv_filerecord") - ) - ts_filerecord = ListTemplateGenerator(("gwf6", "maw", "options", "ts_filerecord")) - obs_filerecord = ListTemplateGenerator(("gwf6", "maw", "options", "obs_filerecord")) - packagedata = ListTemplateGenerator(("gwf6", "maw", "packagedata", "packagedata")) - connectiondata = ListTemplateGenerator( - ("gwf6", "maw", "connectiondata", "connectiondata") - ) - perioddata = ListTemplateGenerator(("gwf6", "maw", "period", "perioddata")) - package_abbr = "gwfmaw" - _package_type = "maw" - dfn_file_name = "gwf-maw.dfn" - dfn = [ - ["header", "multi-package", "package-type advanced-stress-package"], - [ - "block options", - "name auxiliary", - "type string", - "shape (naux)", - "reader urword", - "optional true", - ], - [ - "block options", - "name boundnames", - "type keyword", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name print_input", - "type keyword", - "reader urword", - "optional true", - ], - [ - "block options", - "name print_head", - "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 head_filerecord", - "type record head fileout headfile", - "shape", - "reader urword", - "tagged true", - "optional true", - ], - [ - "block options", - "name head", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name headfile", - "type string", - "preserve_case true", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - ], - [ - "block options", - "name budget_filerecord", - "type record budget fileout budgetfile", - "shape", - "reader urword", - "tagged true", - "optional true", - ], - [ - "block options", - "name budget", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name fileout", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name budgetfile", - "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", - ], - [ - "block options", - "name no_well_storage", - "type keyword", - "reader urword", - "optional true", - ], - [ - "block options", - "name flow_correction", - "type keyword", - "reader urword", - "optional true", - ], - [ - "block options", - "name flowing_wells", - "type keyword", - "reader urword", - "optional true", - ], - [ - "block options", - "name shutdown_theta", - "type double precision", - "reader urword", - "optional true", - ], - [ - "block options", - "name shutdown_kappa", - "type double precision", - "reader urword", - "optional true", - ], - [ - "block options", - "name mfrcsv_filerecord", - "type record maw_flow_reduce_csv fileout mfrcsvfile", - "shape", - "reader urword", - "tagged true", - "optional true", - ], - [ - "block options", - "name maw_flow_reduce_csv", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name mfrcsvfile", - "type string", - "preserve_case true", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - ], - [ - "block options", - "name ts_filerecord", - "type record ts6 filein ts6_filename", - "shape", - "reader urword", - "tagged true", - "optional true", - "construct_package ts", - "construct_data timeseries", - "parameter_name timeseries", - ], - [ - "block options", - "name ts6", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name filein", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name ts6_filename", - "type string", - "preserve_case true", - "in_record true", - "reader urword", - "optional false", - "tagged false", - ], - [ - "block options", - "name obs_filerecord", - "type record obs6 filein obs6_filename", - "shape", - "reader urword", - "tagged true", - "optional true", - "construct_package obs", - "construct_data observations", - "parameter_name continuous", - ], - [ - "block options", - "name obs6", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name obs6_filename", - "type string", - "preserve_case true", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block options", - "name mover", - "type keyword", - "tagged true", - "reader urword", - "optional true", - ], - [ - "block dimensions", - "name nmawwells", - "type integer", - "reader urword", - "optional false", - ], - [ - "block packagedata", - "name packagedata", - "type recarray ifno radius bottom strt condeqn ngwfnodes aux boundname", - "shape (nmawwells)", - "reader urword", - ], - [ - "block packagedata", - "name ifno", - "type integer", - "shape", - "tagged false", - "in_record true", - "reader urword", - "numeric_index true", - ], - [ - "block packagedata", - "name radius", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block packagedata", - "name bottom", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block packagedata", - "name strt", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block packagedata", - "name condeqn", - "type string", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block packagedata", - "name ngwfnodes", - "type integer", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block packagedata", - "name aux", - "type double precision", - "in_record true", - "tagged false", - "shape (naux)", - "reader urword", - "time_series true", - "optional true", - ], - [ - "block packagedata", - "name boundname", - "type string", - "shape", - "tagged false", - "in_record true", - "reader urword", - "optional true", - ], - [ - "block connectiondata", - "name connectiondata", - "type recarray ifno icon cellid scrn_top scrn_bot hk_skin radius_skin", - "reader urword", - ], - [ - "block connectiondata", - "name ifno", - "type integer", - "shape", - "tagged false", - "in_record true", - "reader urword", - "numeric_index true", - ], - [ - "block connectiondata", - "name icon", - "type integer", - "shape", - "tagged false", - "in_record true", - "reader urword", - "numeric_index true", - ], - [ - "block connectiondata", - "name cellid", - "type integer", - "shape (ncelldim)", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block connectiondata", - "name scrn_top", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block connectiondata", - "name scrn_bot", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block connectiondata", - "name hk_skin", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block connectiondata", - "name radius_skin", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block period", - "name iper", - "type integer", - "block_variable true", - "in_record true", - "tagged false", - "shape", - "valid", - "reader urword", - "optional false", - ], - [ - "block period", - "name perioddata", - "type recarray ifno mawsetting", - "shape", - "reader urword", - ], - [ - "block period", - "name ifno", - "type integer", - "shape", - "tagged false", - "in_record true", - "reader urword", - "numeric_index true", - ], - [ - "block period", - "name mawsetting", - "type keystring status flowing_wellrecord rate well_head head_limit shutoffrecord rate_scalingrecord auxiliaryrecord", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block period", - "name status", - "type string", - "shape", - "tagged true", - "in_record true", - "reader urword", - ], - [ - "block period", - "name flowing_wellrecord", - "type record flowing_well fwelev fwcond fwrlen", - "shape", - "tagged", - "in_record true", - "reader urword", - ], - [ - "block period", - "name flowing_well", - "type keyword", - "shape", - "in_record true", - "reader urword", - ], - [ - "block period", - "name fwelev", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block period", - "name fwcond", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block period", - "name fwrlen", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block period", - "name rate", - "type double precision", - "shape", - "tagged true", - "in_record true", - "reader urword", - "time_series true", - ], - [ - "block period", - "name well_head", - "type double precision", - "shape", - "tagged true", - "in_record true", - "reader urword", - "time_series true", - ], - [ - "block period", - "name head_limit", - "type string", - "shape", - "tagged true", - "in_record true", - "reader urword", - ], - [ - "block period", - "name shutoffrecord", - "type record shut_off minrate maxrate", - "shape", - "tagged", - "in_record true", - "reader urword", - ], - [ - "block period", - "name shut_off", - "type keyword", - "shape", - "in_record true", - "reader urword", - ], - [ - "block period", - "name minrate", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block period", - "name maxrate", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block period", - "name rate_scalingrecord", - "type record rate_scaling pump_elevation scaling_length", - "shape", - "tagged", - "in_record true", - "reader urword", - ], - [ - "block period", - "name rate_scaling", - "type keyword", - "shape", - "in_record true", - "reader urword", - ], - [ - "block period", - "name pump_elevation", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block period", - "name scaling_length", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block period", - "name auxiliaryrecord", - "type record auxiliary auxname auxval", - "shape", - "tagged", - "in_record true", - "reader urword", - ], - [ - "block period", - "name auxiliary", - "type keyword", - "shape", - "in_record true", - "reader urword", - ], - [ - "block period", - "name auxname", - "type string", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block period", - "name auxval", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - "time_series true", - ], - ] - spec = { - "advanced": True, - "connectiondata": { - "connectiondata": { - "block": "connectiondata", - "item": { - "block": "connectiondata", - "fields": { - "cellid": { - "block": "connectiondata", - "description": "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 layer, row, and column. For a grid that uses the DISV input file, CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file, CELLID is the node number for the cell. One or more screened intervals can be connected to the same CELLID if CONDEQN for a well is MEAN. The program will terminate with an error if MAW wells using SPECIFIED, THIEM, SKIN, or CUMULATIVE conductance equations have more than one connection to the same CELLID.", - "longname": "cell identifier", - "name": "cellid", - "reader": "urword", - "shape": "(ncelldim)", - "type": "integer", - }, - "hk_skin": { - "block": "connectiondata", - "description": "value that defines the skin (filter pack) hydraulic conductivity (if CONDEQN for the multi-aquifer well is SKIN, CUMULATIVE, or MEAN) or conductance (if CONDEQN for the multi-aquifer well is SPECIFIED) for each GWF node connected to the multi-aquifer well (NGWFNODES). If CONDEQN is SPECIFIED, HK_SKIN must be greater than or equal to zero. HK_SKIN can be any value if CONDEQN is THIEM. Otherwise, HK_SKIN must be greater than zero. If CONDEQN is SKIN, the contrast between the cell transmissivity (the product of geometric mean horizontal hydraulic conductivity and the cell thickness) and the well transmissivity (the product of HK_SKIN and the screen thicknesses) must be greater than one in node CELLID or the program will terminate with an error condition; if an error condition occurs, it is suggested that the HK_SKIN be reduced to a value less than K11 and K22 in node CELLID or the THIEM or MEAN conductance equations be used for these multi-aquifer wells.", - "longname": "skin data", - "name": "hk_skin", - "reader": "urword", - "type": "double precision", - }, - "icon": { - "block": "connectiondata", - "description": "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.", - "longname": "connection number", - "name": "icon", - "numeric_index": "true", - "reader": "urword", - "type": "integer", - }, - "ifno": { - "block": "period", - "description": "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.", - "longname": "well number for this entry", - "name": "ifno", - "numeric_index": "true", - "reader": "urword", - "type": "integer", - }, - "radius_skin": { - "block": "connectiondata", - "description": "real value that defines the skin radius (filter pack radius) for the multi-aquifer well. RADIUS_SKIN can be any value if CONDEQN is SPECIFIED or THIEM. If 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.", - "longname": "skin radius", - "name": "radius_skin", - "reader": "urword", - "type": "double precision", - }, - "scrn_bot": { - "block": "connectiondata", - "description": "value that defines the bottom elevation of the screen for the multi-aquifer well connection. If CONDEQN is SPECIFIED, THIEM, SKIN, or CUMULATIVE, SCRN_BOT can be any value and is set to the bottom of the cell. If CONDEQN is MEAN, SCRN_BOT is set to the multi-aquifer well connection cell bottom if the specified value is less than the cell bottom. The program will terminate with an error if the screen bottom is greater than the screen top.", - "longname": "screen bottom", - "name": "scrn_bot", - "reader": "urword", - "type": "double precision", - }, - "scrn_top": { - "block": "connectiondata", - "description": "value that defines the top elevation of the screen for the multi-aquifer well connection. If CONDEQN is SPECIFIED, THIEM, SKIN, or CUMULATIVE, SCRN_TOP can be any value and is set to the top of the cell. If CONDEQN is MEAN, SCRN_TOP is set to the multi-aquifer well connection cell top if the specified value is greater than the cell top. The program will terminate with an error if the screen top is less than the screen bottom.", - "longname": "screen top", - "name": "scrn_top", - "reader": "urword", - "type": "double precision", - }, - }, - "name": "connectiondata", - "reader": "urword", - "type": "record", - }, - "name": "connectiondata", - "reader": "urword", - "type": "recarray", - } - }, - "dimensions": { - "nmawwells": { - "block": "dimensions", - "description": "integer value specifying the number of multi-aquifer wells that will be simulated for all stress periods.", - "longname": "number of maw wells", - "name": "nmawwells", - "optional": False, - "reader": "urword", - "type": "integer", - } - }, - "fkeys": { - "obs_filerecord": { - "abbr": "obs", - "key": "obs_filerecord", - "param": "continuous", - "parent": "parent_model_or_package", - "val": "observations", - }, - "ts_filerecord": { - "abbr": "ts", - "description": "xxx", - "key": "ts_filerecord", - "param": "timeseries", - "parent": "parent_package", - "val": "timeseries", - }, - }, - "multi": True, - "name": "gwf-maw", - "options": { - "auxiliary": { - "block": "options", - "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", - "longname": "keyword to specify aux variables", - "name": "auxiliary", - "optional": True, - "reader": "urword", - "shape": "(naux)", - "type": "string", - }, - "boundnames": { - "block": "options", - "description": "keyword to indicate that boundary names may be provided with the list of multi-aquifer well cells.", - "name": "boundnames", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "budget_filerecord": { - "block": "options", - "fields": { - "budgetfile": { - "block": "options", - "description": "name of the binary output file to write budget information.", - "longname": "file keyword", - "name": "budgetfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "budget_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "budgetcsv_filerecord": { - "block": "options", - "fields": { - "budgetcsvfile": { - "block": "options", - "description": "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.", - "longname": "file keyword", - "name": "budgetcsvfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "budgetcsv_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "flow_correction": { - "block": "options", - "description": "keyword that activates flow corrections in cases where the head in a multi-aquifer well is below the bottom of the screen for a connection or the head in a convertible cell connected to a multi-aquifer well is below the cell bottom. 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.", - "longname": "activate flow correction", - "name": "flow_correction", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "flowing_wells": { - "block": "options", - "description": "keyword that activates the flowing wells option for the multi-aquifer well package.", - "longname": "activate flowing wells", - "name": "flowing_wells", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "head_filerecord": { - "block": "options", - "fields": { - "headfile": { - "block": "options", - "description": "name of the binary output file to write head information.", - "longname": "file keyword", - "name": "headfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "head_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "mfrcsv_filerecord": { - "block": "options", - "fields": { - "mfrcsvfile": { - "block": "options", - "description": "name of the comma-separated value (CSV) output file to write information about multi-aquifer well extraction or injection rates that have been reduced by the program. Entries are only written if the extraction or injection rates are reduced.", - "longname": "file keyword", - "name": "mfrcsvfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "mfrcsv_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "mover": { - "block": "options", - "description": "keyword to indicate that this instance of the maw package can be used with the water mover (mvr) package. when the mover option is specified, additional memory is allocated within the package to store the available, provided, and received water.", - "name": "mover", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "no_well_storage": { - "block": "options", - "description": "keyword that deactivates inclusion of well storage contributions to the multi-aquifer well package continuity equation.", - "longname": "deactivate well storage", - "name": "no_well_storage", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "observations": { - "block": "options", - "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", - "name": "observations", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "obs", - "key": "obs_filerecord", - "param": "continuous", - "parent": "parent_model_or_package", - "val": "observations", - }, - "type": "record obs6 filein obs6_filename", - }, - "print_flows": { - "block": "options", - "description": "keyword to indicate that the list of multi-aquifer well 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.", - "longname": "print calculated flows to listing file", - "name": "print_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "print_head": { - "block": "options", - "description": "keyword to indicate that the list of multi-aquifer well {#2} will be printed to the listing file for every stress period in which 'head print' is specified in output control. if there is no output control option and print_{#3} is specified, then {#2} are printed for the last time step of each stress period.", - "longname": "print calculated heads to listing file", - "name": "print_head", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "print_input": { - "block": "options", - "description": "keyword to indicate that the list of multi-aquifer well information will be written to the listing file immediately after it is read.", - "longname": "print input to listing file", - "name": "print_input", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "save_flows": { - "block": "options", - "description": "keyword to indicate that multi-aquifer well flow terms will be written to the file specified with 'budget fileout' in output control.", - "longname": "save well flows to budget file", - "name": "save_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "shutdown_kappa": { - "block": "options", - "description": "value that defines the weight applied to discharge rate for wells that limit the water level in a discharging well (defined using the head_limit keyword in the stress period data). shutdown_kappa is used to control discharge rate oscillations when the flow rate from the aquifer is less than the specified flow rate from the aquifer to the well. values range between 0.0 and 1.0, and larger values increase the weight applied to the well discharge rate. the head_limit option has been included to facilitate backward compatibility with previous versions of modflow but use of the rate_scaling option instead of the head_limit option is recommended. by default, shutdown_kappa is 0.0001.", - "longname": "shutdown kappa", - "name": "shutdown_kappa", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - "shutdown_theta": { - "block": "options", - "description": "value that defines the weight applied to discharge rate for wells that limit the water level in a discharging well (defined using the head_limit keyword in the stress period data). shutdown_theta is used to control discharge rate oscillations when the flow rate from the aquifer is less than the specified flow rate from the aquifer to the well. values range between 0.0 and 1.0, and larger values increase the weight (decrease under-relaxation) applied to the well discharge rate. the head_limit option has been included to facilitate backward compatibility with previous versions of modflow but use of the rate_scaling option instead of the head_limit option is recommended. by default, shutdown_theta is 0.7.", - "longname": "shutdown theta", - "name": "shutdown_theta", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - "timeseries": { - "block": "options", - "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", - "name": "timeseries", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "ts", - "description": "xxx", - "key": "ts_filerecord", - "param": "timeseries", - "parent": "parent_package", - "val": "timeseries", - }, - "type": "record ts6 filein ts6_filename", - }, - }, - "packagedata": { - "packagedata": { - "block": "packagedata", - "item": { - "block": "packagedata", - "fields": { - "aux": { - "block": "packagedata", - "description": "represents the values of the auxiliary variables for each multi-aquifer well. The values of auxiliary variables must be present for each multi-aquifer well. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "auxiliary variables", - "name": "aux", - "optional": "true", - "reader": "urword", - "shape": "(naux)", - "time_series": "true", - "type": "double precision", - }, - "bottom": { - "block": "packagedata", - "description": "bottom elevation of the multi-aquifer well. If CONDEQN is SPECIFIED, THIEM, SKIN, or CUMULATIVE, BOTTOM is set to the cell bottom in the lowermost GWF cell connection in cases where the specified well bottom is above the bottom of this GWF cell. If CONDEQN is MEAN, BOTTOM is set to the lowermost GWF cell connection screen bottom in cases where the specified well bottom is above this value. The bottom elevation defines the lowest well head that will be simulated when the NEWTON UNDER_RELAXATION option is specified in the GWF model name file. The bottom elevation is also used to calculate volumetric storage in the well.", - "longname": "well bottom", - "name": "bottom", - "reader": "urword", - "type": "double precision", - }, - "boundname": { - "block": "packagedata", - "description": "name of the multi-aquifer well cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", - "longname": "well name", - "name": "boundname", - "optional": "true", - "reader": "urword", - "type": "string", - }, - "condeqn": { - "block": "packagedata", - "description": "character string that defines the conductance equation that is used to calculate the saturated conductance for the multi-aquifer well. Possible multi-aquifer well CONDEQN strings include: SPECIFIED--character keyword to indicate the multi-aquifer well saturated conductance will be specified. THIEM--character keyword to indicate the multi-aquifer well saturated conductance will be calculated using the Thiem equation, which considers the cell top and bottom, aquifer hydraulic conductivity, and effective cell and well radius. SKIN--character keyword to indicate that the multi-aquifer well saturated conductance will be calculated using the cell top and bottom, aquifer and screen hydraulic conductivity, and well and skin radius. CUMULATIVE--character keyword to indicate that the multi-aquifer well saturated conductance will be calculated using a combination of the Thiem and SKIN equations. MEAN--character keyword to indicate the multi-aquifer well saturated conductance will be calculated using the aquifer and screen top and bottom, aquifer and screen hydraulic conductivity, and well and skin radius. The CUMULATIVE conductance equation is identical to the SKIN LOSSTYPE in the Multi-Node Well (MNW2) package for MODFLOW-2005. The program will terminate with an error condition if CONDEQN is SKIN or CUMULATIVE and the calculated saturated conductance is less than zero; if an error condition occurs, it is suggested that the THIEM or MEAN conductance equations be used for these multi-aquifer wells.", - "longname": "conductance equation", - "name": "condeqn", - "reader": "urword", - "type": "string", - }, - "ifno": { - "block": "period", - "description": "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.", - "longname": "well number for this entry", - "name": "ifno", - "numeric_index": "true", - "reader": "urword", - "type": "integer", - }, - "ngwfnodes": { - "block": "packagedata", - "description": "integer value that defines the number of GWF nodes connected to this (IFNO) multi-aquifer well. NGWFNODES must be greater than zero.", - "longname": "number of connected GWF cells", - "name": "ngwfnodes", - "reader": "urword", - "type": "integer", - }, - "radius": { - "block": "packagedata", - "description": "radius for the multi-aquifer well. The program will terminate with an error if the radius is less than or equal to zero.", - "longname": "well radius", - "name": "radius", - "reader": "urword", - "type": "double precision", - }, - "strt": { - "block": "packagedata", - "description": "starting head for the multi-aquifer well. The program will terminate with an error if the starting head is less than the specified well bottom.", - "longname": "starting head", - "name": "strt", - "reader": "urword", - "type": "double precision", - }, - }, - "name": "packagedata", - "reader": "urword", - "type": "record", - }, - "name": "packagedata", - "reader": "urword", - "shape": "(nmawwells)", - "type": "recarray", - } - }, - "period": { - "perioddata": { - "block": "period", - "item": { - "block": "period", - "fields": { - "ifno": { - "block": "period", - "description": "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.", - "longname": "well number for this entry", - "name": "ifno", - "numeric_index": True, - "reader": "urword", - "type": "integer", - }, - "mawsetting": { - "block": "period", - "choices": { - "auxiliaryrecord": { - "block": "period", - "fields": { - "auxiliary": { - "block": "period", - "description": "keyword for specifying auxiliary variable.", - "name": "auxiliary", - "reader": "urword", - "type": "keyword", - }, - "auxname": { - "block": "period", - "description": "name for the auxiliary variable to be assigned AUXVAL. AUXNAME must match one of the auxiliary variable names defined in the OPTIONS block. If AUXNAME does not match one of the auxiliary variable names defined in the OPTIONS block the data are ignored.", - "name": "auxname", - "reader": "urword", - "type": "string", - }, - "auxval": { - "block": "period", - "description": "value for the auxiliary variable. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "auxiliary variable value", - "name": "auxval", - "reader": "urword", - "time_series": "true", - "type": "double precision", - }, - }, - "name": "auxiliaryrecord", - "reader": "urword", - "type": "record", - }, - "flowing_wellrecord": { - "block": "period", - "fields": { - "flowing_well": { - "block": "period", - "description": "keyword to indicate the well is a flowing well. The FLOWING_WELL option can be used to simulate flowing wells when the simulated well head exceeds the specified drainage elevation.", - "longname": "well is a flowing well", - "name": "flowing_well", - "reader": "urword", - "type": "keyword", - }, - "fwcond": { - "block": "period", - "description": "conductance used to calculate the discharge of a free flowing well. Flow occurs when the head in the well is above the well top elevation (FWELEV).", - "longname": "well flowing well conductance", - "name": "fwcond", - "reader": "urword", - "type": "double precision", - }, - "fwelev": { - "block": "period", - "description": "elevation used to determine whether or not the well is flowing.", - "longname": "flowing well elevation", - "name": "fwelev", - "reader": "urword", - "type": "double precision", - }, - "fwrlen": { - "block": "period", - "description": "length used to reduce the conductance of the flowing well. When the head in the well drops below the well top plus the reduction length, then the conductance is reduced. This reduction length can be used to improve the stability of simulations with flowing wells so that there is not an abrupt change in flowing well rates.", - "longname": "flowing well reduction length", - "name": "fwrlen", - "reader": "urword", - "type": "double precision", - }, - }, - "name": "flowing_wellrecord", - "reader": "urword", - "type": "record", - }, - "head_limit": { - "block": "period", - "description": "is the limiting water level (head) in the well, which is the minimum of the well rate or the well inflow rate from the aquifer. head_limit can be applied to extraction wells (rate $<$ 0) or injection wells (rate $>$ 0). head_limit can be deactivated by specifying the text string `off'. the head_limit option is based on the head_limit functionality available in the mnw2~citep{konikow2009} package for modflow-2005. the head_limit option has been included to facilitate backward compatibility with previous versions of modflow but use of the rate_scaling option instead of the head_limit option is recommended. by default, head_limit is `off'.", - "longname": "head limit", - "name": "head_limit", - "reader": "urword", - "type": "string", - }, - "rate": { - "block": "period", - "description": "is the volumetric pumping rate for the multi-aquifer well. a positive value indicates recharge and a negative value indicates discharge (pumping). rate only applies to active (status is active) multi-aquifer wells. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value. by default, the rate for each multi-aquifer well is zero.", - "longname": "well pumping rate", - "name": "rate", - "reader": "urword", - "time_series": True, - "type": "double precision", - }, - "rate_scalingrecord": { - "block": "period", - "fields": { - "pump_elevation": { - "block": "period", - "description": "is the elevation of the multi-aquifer well pump (PUMP_ELEVATION). PUMP_ELEVATION should not be less than the bottom elevation (BOTTOM) of the multi-aquifer well.", - "longname": "pump elevation", - "name": "pump_elevation", - "reader": "urword", - "type": "double precision", - }, - "rate_scaling": { - "block": "period", - "description": "activate rate scaling. If RATE_SCALING is specified, both PUMP_ELEVATION and SCALING_LENGTH must be specified. RATE_SCALING cannot be used with HEAD_LIMIT. RATE_SCALING can be used for extraction or injection wells. For extraction wells, the extraction rate will start to decrease once the head in the well lowers to a level equal to the pump elevation plus the scaling length. If the head in the well drops below the pump elevation, then the extraction rate is calculated to be zero. For an injection well, the injection rate will begin to decrease once the head in the well rises above the specified pump elevation. If the head in the well rises above the pump elevation plus the scaling length, then the injection rate will be set to zero.", - "longname": "rate scaling", - "name": "rate_scaling", - "reader": "urword", - "type": "keyword", - }, - "scaling_length": { - "block": "period", - "description": "height above the pump elevation (SCALING_LENGTH). If the simulated well head is below this elevation (pump elevation plus the scaling length), then the pumping rate is reduced.", - "name": "scaling_length", - "reader": "urword", - "type": "double precision", - }, - }, - "name": "rate_scalingrecord", - "reader": "urword", - "type": "record", - }, - "shutoffrecord": { - "block": "period", - "fields": { - "maxrate": { - "block": "period", - "description": "is the maximum rate that a well must exceed to reactivate a well during a stress period. The well will reactivate during a timestep if the well was shutdown during the previous time step and the flow rate to the well from the aquifer exceeds maxrate. Reactivation of the well cannot occur until the next time step if a well is shutdown to reduce oscillations. maxrate must be greater than MINRATE.", - "longname": "maximum shutoff rate", - "name": "maxrate", - "reader": "urword", - "type": "double precision", - }, - "minrate": { - "block": "period", - "description": "is the minimum rate that a well must exceed to shutoff a well during a stress period. The well will shut down during a time step if the flow rate to the well from the aquifer is less than MINRATE. If a well is shut down during a time step, reactivation of the well cannot occur until the next time step to reduce oscillations. MINRATE must be less than maxrate.", - "longname": "minimum shutoff rate", - "name": "minrate", - "reader": "urword", - "type": "double precision", - }, - "shut_off": { - "block": "period", - "description": "keyword for activating well shut off capability. Subsequent values define the minimum and maximum pumping rate that a well must exceed to shutoff or reactivate a well, respectively, during a stress period. SHUT_OFF is only applied to injection wells (RATE$<0$) and if HEAD_LIMIT is specified (not set to `OFF'). If HEAD_LIMIT is specified, SHUT_OFF can be deactivated by specifying a minimum value equal to zero. The SHUT_OFF option is based on the SHUT_OFF functionality available in the MNW2~citep{konikow2009} package for MODFLOW-2005. The SHUT_OFF option has been included to facilitate backward compatibility with previous versions of MODFLOW but use of the RATE_SCALING option instead of the SHUT_OFF option is recommended. By default, SHUT_OFF is not used.", - "longname": "shut off well", - "name": "shut_off", - "reader": "urword", - "type": "keyword", - }, - }, - "name": "shutoffrecord", - "reader": "urword", - "type": "record", - }, - "status": { - "block": "period", - "description": "keyword option to define well status. status can be active, inactive, or constant. by default, status is active.", - "longname": "well status", - "name": "status", - "reader": "urword", - "type": "string", - }, - "well_head": { - "block": "period", - "description": "is the head in the multi-aquifer well. well_head is only applied to constant head (status is constant) and inactive (status is inactive) multi-aquifer wells. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value. the program will terminate with an error if well_head is less than the bottom of the well.", - "longname": "well head", - "name": "well_head", - "reader": "urword", - "time_series": True, - "type": "double precision", - }, - }, - "description": "line of information that is parsed into a keyword and values. keyword values that can be used to start the mawsetting string include: status, flowing_well, rate, well_head, head_limit, shut_off, rate_scaling, and auxiliary.", - "name": "mawsetting", - "reader": "urword", - "type": "keystring", - }, - }, - "name": "perioddata", - "reader": "urword", - "type": "record", - }, - "name": "perioddata", - "reader": "urword", - "type": "recarray", - }, - "transient_block": True, - }, - } + auxiliary = ArrayTemplateGenerator(('gwf6', 'maw', 'options', 'auxiliary')) + head_filerecord = ListTemplateGenerator(('gwf6', 'maw', 'options', 'head_filerecord')) + budget_filerecord = ListTemplateGenerator(('gwf6', 'maw', 'options', 'budget_filerecord')) + budgetcsv_filerecord = ListTemplateGenerator(('gwf6', 'maw', 'options', 'budgetcsv_filerecord')) + mfrcsv_filerecord = ListTemplateGenerator(('gwf6', 'maw', 'options', 'mfrcsv_filerecord')) + ts_filerecord = ListTemplateGenerator(('gwf6', 'maw', 'options', 'ts_filerecord')) + obs_filerecord = ListTemplateGenerator(('gwf6', 'maw', 'options', 'obs_filerecord')) + packagedata = ListTemplateGenerator(('gwf6', 'maw', 'packagedata', 'packagedata')) + connectiondata = ListTemplateGenerator(('gwf6', 'maw', 'connectiondata', 'connectiondata')) + perioddata = ListTemplateGenerator(('gwf6', 'maw', 'period', 'perioddata')) + package_abbr = 'gwfmaw' + _package_type = 'maw' + dfn_file_name = 'gwf-maw.dfn' + dfn = [['header', 'multi-package', 'package-type advanced-stress-package'], ['block options', 'name auxiliary', 'type string', 'shape (naux)', 'reader urword', 'optional true'], ['block options', 'name boundnames', 'type keyword', 'shape', 'reader urword', 'optional true'], ['block options', 'name print_input', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name print_head', '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 head_filerecord', 'type record head fileout headfile', 'shape', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name head', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name headfile', 'type string', 'preserve_case true', 'shape', 'in_record true', 'reader urword', 'tagged false', 'optional false'], ['block options', 'name budget_filerecord', 'type record budget fileout budgetfile', 'shape', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name budget', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name fileout', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name budgetfile', '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'], ['block options', 'name no_well_storage', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name flow_correction', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name flowing_wells', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name shutdown_theta', 'type double precision', 'reader urword', 'optional true'], ['block options', 'name shutdown_kappa', 'type double precision', 'reader urword', 'optional true'], ['block options', 'name mfrcsv_filerecord', 'type record maw_flow_reduce_csv fileout mfrcsvfile', 'shape', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name maw_flow_reduce_csv', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name mfrcsvfile', 'type string', 'preserve_case true', 'shape', 'in_record true', 'reader urword', 'tagged false', 'optional false'], ['block options', 'name ts_filerecord', 'type record ts6 filein ts6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package ts', 'construct_data timeseries', 'parameter_name timeseries'], ['block options', 'name ts6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name filein', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name ts6_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false'], ['block options', 'name obs_filerecord', 'type record obs6 filein obs6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package obs', 'construct_data observations', 'parameter_name continuous'], ['block options', 'name obs6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name obs6_filename', 'type string', 'preserve_case true', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block options', 'name mover', 'type keyword', 'tagged true', 'reader urword', 'optional true'], ['block dimensions', 'name nmawwells', 'type integer', 'reader urword', 'optional false'], ['block packagedata', 'name packagedata', 'type recarray ifno radius bottom strt condeqn ngwfnodes aux boundname', 'shape (nmawwells)', 'reader urword'], ['block packagedata', 'name ifno', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block packagedata', 'name radius', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block packagedata', 'name bottom', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block packagedata', 'name strt', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block packagedata', 'name condeqn', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block packagedata', 'name ngwfnodes', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block packagedata', 'name aux', 'type double precision', 'in_record true', 'tagged false', 'shape (naux)', 'reader urword', 'time_series true', 'optional true'], ['block packagedata', 'name boundname', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword', 'optional true'], ['block connectiondata', 'name connectiondata', 'type recarray ifno icon cellid scrn_top scrn_bot hk_skin radius_skin', 'reader urword'], ['block connectiondata', 'name ifno', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block connectiondata', 'name icon', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block connectiondata', 'name cellid', 'type integer', 'shape (ncelldim)', 'tagged false', 'in_record true', 'reader urword'], ['block connectiondata', 'name scrn_top', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block connectiondata', 'name scrn_bot', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block connectiondata', 'name hk_skin', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block connectiondata', 'name radius_skin', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name iper', 'type integer', 'block_variable true', 'in_record true', 'tagged false', 'shape', 'valid', 'reader urword', 'optional false'], ['block period', 'name perioddata', 'type recarray ifno mawsetting', 'shape', 'reader urword'], ['block period', 'name ifno', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block period', 'name mawsetting', 'type keystring status flowing_wellrecord rate well_head head_limit shutoffrecord rate_scalingrecord auxiliaryrecord', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name status', 'type string', 'shape', 'tagged true', 'in_record true', 'reader urword'], ['block period', 'name flowing_wellrecord', 'type record flowing_well fwelev fwcond fwrlen', 'shape', 'tagged', 'in_record true', 'reader urword'], ['block period', 'name flowing_well', 'type keyword', 'shape', 'in_record true', 'reader urword'], ['block period', 'name fwelev', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name fwcond', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name fwrlen', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name rate', 'type double precision', 'shape', 'tagged true', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name well_head', 'type double precision', 'shape', 'tagged true', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name head_limit', 'type string', 'shape', 'tagged true', 'in_record true', 'reader urword'], ['block period', 'name shutoffrecord', 'type record shut_off minrate maxrate', 'shape', 'tagged', 'in_record true', 'reader urword'], ['block period', 'name shut_off', 'type keyword', 'shape', 'in_record true', 'reader urword'], ['block period', 'name minrate', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name maxrate', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name rate_scalingrecord', 'type record rate_scaling pump_elevation scaling_length', 'shape', 'tagged', 'in_record true', 'reader urword'], ['block period', 'name rate_scaling', 'type keyword', 'shape', 'in_record true', 'reader urword'], ['block period', 'name pump_elevation', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name scaling_length', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name auxiliaryrecord', 'type record auxiliary auxname auxval', 'shape', 'tagged', 'in_record true', 'reader urword'], ['block period', 'name auxiliary', 'type keyword', 'shape', 'in_record true', 'reader urword'], ['block period', 'name auxname', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name auxval', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword', 'time_series true']] def __init__( self, @@ -1702,6 +403,7 @@ def __init__( packagedata=None, connectiondata=None, perioddata=None, + filename=None, pname=None, **kwargs, @@ -1716,39 +418,30 @@ def __init__( **kwargs, ) - self.auxiliary = self.build_mfdata("auxiliary", auxiliary) - self.boundnames = self.build_mfdata("boundnames", boundnames) - self.print_input = self.build_mfdata("print_input", print_input) - self.print_head = self.build_mfdata("print_head", print_head) - self.print_flows = self.build_mfdata("print_flows", print_flows) - self.save_flows = self.build_mfdata("save_flows", save_flows) - self.head_filerecord = self.build_mfdata("head_filerecord", head_filerecord) - self.budget_filerecord = self.build_mfdata( - "budget_filerecord", budget_filerecord - ) - self.budgetcsv_filerecord = self.build_mfdata( - "budgetcsv_filerecord", budgetcsv_filerecord - ) - self.no_well_storage = self.build_mfdata("no_well_storage", no_well_storage) - self.flow_correction = self.build_mfdata("flow_correction", flow_correction) - 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) - self.mfrcsv_filerecord = self.build_mfdata( - "mfrcsv_filerecord", mfrcsv_filerecord - ) - self._ts_filerecord = self.build_mfdata("ts_filerecord", None) - self._ts_package = self.build_child_package( - "ts", timeseries, "timeseries", self._ts_filerecord - ) - self._obs_filerecord = self.build_mfdata("obs_filerecord", None) - self._obs_package = self.build_child_package( - "obs", observations, "continuous", self._obs_filerecord - ) - self.mover = self.build_mfdata("mover", mover) - self.nmawwells = self.build_mfdata("nmawwells", nmawwells) - self.packagedata = self.build_mfdata("packagedata", packagedata) - self.connectiondata = self.build_mfdata("connectiondata", connectiondata) - self.perioddata = self.build_mfdata("perioddata", perioddata) + self.auxiliary = self.build_mfdata('auxiliary', auxiliary) + self.boundnames = self.build_mfdata('boundnames', boundnames) + self.print_input = self.build_mfdata('print_input', print_input) + self.print_head = self.build_mfdata('print_head', print_head) + self.print_flows = self.build_mfdata('print_flows', print_flows) + self.save_flows = self.build_mfdata('save_flows', save_flows) + self.head_filerecord = self.build_mfdata('head_filerecord', head_filerecord) + self.budget_filerecord = self.build_mfdata('budget_filerecord', budget_filerecord) + self.budgetcsv_filerecord = self.build_mfdata('budgetcsv_filerecord', budgetcsv_filerecord) + self.no_well_storage = self.build_mfdata('no_well_storage', no_well_storage) + self.flow_correction = self.build_mfdata('flow_correction', flow_correction) + 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) + self.mfrcsv_filerecord = self.build_mfdata('mfrcsv_filerecord', mfrcsv_filerecord) + self._ts_filerecord = self.build_mfdata('ts_filerecord', None) + self._ts_package = self.build_child_package('ts', timeseries, 'timeseries', self._ts_filerecord) + self._obs_filerecord = self.build_mfdata('obs_filerecord', None) + self._obs_package = self.build_child_package('obs', observations, 'continuous', self._obs_filerecord) + self.mover = self.build_mfdata('mover', mover) + self.nmawwells = self.build_mfdata('nmawwells', nmawwells) + self.packagedata = self.build_mfdata('packagedata', packagedata) + self.connectiondata = self.build_mfdata('connectiondata', connectiondata) + self.perioddata = self.build_mfdata('perioddata', perioddata) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwfmvr.py b/flopy/mf6/modflow/mfgwfmvr.py index eb823fd4ef..5fd8e4e831 100644 --- a/flopy/mf6/modflow/mfgwfmvr.py +++ b/flopy/mf6/modflow/mfgwfmvr.py @@ -111,464 +111,14 @@ class ModflowGwfmvr(MFPackage): """ - budget_filerecord = ListTemplateGenerator( - ("gwf6", "mvr", "options", "budget_filerecord") - ) - budgetcsv_filerecord = ListTemplateGenerator( - ("gwf6", "mvr", "options", "budgetcsv_filerecord") - ) - packages = ListTemplateGenerator(("gwf6", "mvr", "packages", "packages")) - perioddata = ListTemplateGenerator(("gwf6", "mvr", "period", "perioddata")) - package_abbr = "gwfmvr" - _package_type = "mvr" - dfn_file_name = "gwf-mvr.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 modelnames", - "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", - ], - [ - "block dimensions", - "name maxmvr", - "type integer", - "reader urword", - "optional false", - ], - [ - "block dimensions", - "name maxpackages", - "type integer", - "reader urword", - "optional false", - ], - [ - "block packages", - "name packages", - "type recarray mname pname", - "reader urword", - "shape (npackages)", - "optional false", - ], - [ - "block packages", - "name mname", - "type string", - "reader urword", - "shape", - "tagged false", - "in_record true", - "optional true", - ], - [ - "block packages", - "name pname", - "type string", - "reader urword", - "shape", - "tagged false", - "in_record true", - "optional false", - ], - [ - "block period", - "name iper", - "type integer", - "block_variable true", - "in_record true", - "tagged false", - "shape", - "valid", - "reader urword", - "optional false", - ], - [ - "block period", - "name perioddata", - "type recarray mname1 pname1 id1 mname2 pname2 id2 mvrtype value", - "shape (maxbound)", - "reader urword", - ], - [ - "block period", - "name mname1", - "type string", - "reader urword", - "shape", - "tagged false", - "in_record true", - "optional true", - ], - [ - "block period", - "name pname1", - "type string", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block period", - "name id1", - "type integer", - "shape", - "tagged false", - "in_record true", - "reader urword", - "numeric_index true", - ], - [ - "block period", - "name mname2", - "type string", - "reader urword", - "shape", - "tagged false", - "in_record true", - "optional true", - ], - [ - "block period", - "name pname2", - "type string", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block period", - "name id2", - "type integer", - "shape", - "tagged false", - "in_record true", - "reader urword", - "numeric_index true", - ], - [ - "block period", - "name mvrtype", - "type string", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block period", - "name value", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - ] - spec = { - "advanced": False, - "dimensions": { - "maxmvr": { - "block": "dimensions", - "description": "integer value specifying the maximum number of water mover entries that will specified for any stress period.", - "longname": "maximum number of movers", - "name": "maxmvr", - "optional": False, - "reader": "urword", - "type": "integer", - }, - "maxpackages": { - "block": "dimensions", - "description": "integer value specifying the number of unique packages that are included in this water mover input file.", - "longname": "number of packages to be used with the mover", - "name": "maxpackages", - "optional": False, - "reader": "urword", - "type": "integer", - }, - }, - "multi": False, - "name": "gwf-mvr", - "options": { - "budget_filerecord": { - "block": "options", - "fields": { - "budgetfile": { - "block": "options", - "description": "name of the output file to write budget information.", - "longname": "file keyword", - "name": "budgetfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "budget_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "budgetcsv_filerecord": { - "block": "options", - "fields": { - "budgetcsvfile": { - "block": "options", - "description": "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.", - "longname": "file keyword", - "name": "budgetcsvfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "budgetcsv_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "modelnames": { - "block": "options", - "description": "keyword to indicate that all package names will be preceded by the model name for the package. model names are required when the mover package is used with a gwf-gwf exchange. the modelname keyword should not be used for a mover package that is for a single gwf model.", - "longname": "precede all package names with model names", - "name": "modelnames", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "print_flows": { - "block": "options", - "description": "keyword to indicate that the list of mvr 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.", - "longname": "print calculated flows to listing file", - "name": "print_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "print_input": { - "block": "options", - "description": "keyword to indicate that the list of mvr information will be written to the listing file immediately after it is read.", - "longname": "print input to listing file", - "name": "print_input", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - }, - "packages": { - "packages": { - "block": "packages", - "item": { - "block": "packages", - "fields": { - "mname": { - "block": "packages", - "description": "name of model containing the package. Model names are assigned by the user in the simulation name file.", - "name": "mname", - "optional": "true", - "reader": "urword", - "type": "string", - }, - "pname": { - "block": "packages", - "description": "is the name of a package that may be included in a subsequent stress period block. The package name is assigned in the name file for the GWF Model. Package names are optionally provided in the name file. If they are not provided by the user, then packages are assigned a default value, which is the package acronym followed by a hyphen and the package number. For example, the first Drain Package is named DRN-1. The second Drain Package is named DRN-2, and so forth.", - "name": "pname", - "optional": "false", - "reader": "urword", - "type": "string", - }, - }, - "name": "packages", - "optional": False, - "reader": "urword", - "type": "record", - }, - "name": "packages", - "optional": False, - "reader": "urword", - "shape": "(npackages)", - "type": "recarray", - } - }, - "period": { - "perioddata": { - "block": "period", - "item": { - "block": "period", - "fields": { - "id1": { - "block": "period", - "description": "is the identifier for the provider. For the standard boundary packages, the provider identifier is the number of the boundary as it is listed in the package input file. (Note that the order of these boundaries may change by stress period, which must be accounted for in the Mover Package.) So the first well has an identifier of one. The second is two, and so forth. For the advanced packages, the identifier is the reach number (SFR Package), well number (MAW Package), or UZF cell number. For the Lake Package, ID1 is the lake outlet number. Thus, outflows from a single lake can be routed to different streams, for example.", - "longname": "provider reach", - "name": "id1", - "numeric_index": "true", - "reader": "urword", - "type": "integer", - }, - "id2": { - "block": "period", - "description": "is the identifier for the receiver. The receiver identifier is the reach number (SFR Package), Lake number (LAK Package), well number (MAW Package), or UZF cell number.", - "longname": "receiver reach", - "name": "id2", - "numeric_index": "true", - "reader": "urword", - "type": "integer", - }, - "mname1": { - "block": "period", - "description": "name of model containing the package, PNAME1.", - "name": "mname1", - "optional": "true", - "reader": "urword", - "type": "string", - }, - "mname2": { - "block": "period", - "description": "name of model containing the package, PNAME2.", - "name": "mname2", - "optional": "true", - "reader": "urword", - "type": "string", - }, - "mvrtype": { - "block": "period", - "description": "is the character string signifying the method for determining how much water will be moved. Supported values are 'FACTOR' 'EXCESS' 'THRESHOLD' and 'UPTO'. These four options determine how the receiver flow rate, $Q_R$, is calculated. These options mirror the options defined for the cprior variable in the SFR package, with the term 'FACTOR' being functionally equivalent to the 'FRACTION' option for cprior.", - "longname": "mover type", - "name": "mvrtype", - "reader": "urword", - "type": "string", - }, - "pname1": { - "block": "period", - "description": "is the package name for the provider. The package PNAME1 must be designated to provide water through the MVR Package by specifying the keyword 'MOVER' in its OPTIONS block.", - "longname": "provider package name", - "name": "pname1", - "reader": "urword", - "type": "string", - }, - "pname2": { - "block": "period", - "description": "is the package name for the receiver. The package PNAME2 must be designated to receive water from the MVR Package by specifying the keyword 'MOVER' in its OPTIONS block.", - "longname": "receiver package name", - "name": "pname2", - "reader": "urword", - "type": "string", - }, - "value": { - "block": "period", - "description": "is the value to be used in the equation for calculating the amount of water to move. For the 'FACTOR' option, VALUE is the $alpha$ factor. For the remaining options, VALUE is the specified flow rate, $Q_S$.", - "longname": "mover value", - "name": "value", - "reader": "urword", - "type": "double precision", - }, - }, - "name": "perioddata", - "reader": "urword", - "type": "record", - }, - "name": "perioddata", - "reader": "urword", - "shape": "(maxbound)", - "type": "recarray", - }, - "transient_block": True, - }, - "ref": { - "abbr": "mvr", - "key": "mvr_filerecord", - "param": "perioddata", - "parent": "parent_model_or_package", - "val": "perioddata", - }, - } + budget_filerecord = ListTemplateGenerator(('gwf6', 'mvr', 'options', 'budget_filerecord')) + budgetcsv_filerecord = ListTemplateGenerator(('gwf6', 'mvr', 'options', 'budgetcsv_filerecord')) + packages = ListTemplateGenerator(('gwf6', 'mvr', 'packages', 'packages')) + perioddata = ListTemplateGenerator(('gwf6', 'mvr', 'period', 'perioddata')) + package_abbr = 'gwfmvr' + _package_type = 'mvr' + dfn_file_name = 'gwf-mvr.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 modelnames', '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'], ['block dimensions', 'name maxmvr', 'type integer', 'reader urword', 'optional false'], ['block dimensions', 'name maxpackages', 'type integer', 'reader urword', 'optional false'], ['block packages', 'name packages', 'type recarray mname pname', 'reader urword', 'shape (npackages)', 'optional false'], ['block packages', 'name mname', 'type string', 'reader urword', 'shape', 'tagged false', 'in_record true', 'optional true'], ['block packages', 'name pname', 'type string', 'reader urword', 'shape', 'tagged false', 'in_record true', 'optional false'], ['block period', 'name iper', 'type integer', 'block_variable true', 'in_record true', 'tagged false', 'shape', 'valid', 'reader urword', 'optional false'], ['block period', 'name perioddata', 'type recarray mname1 pname1 id1 mname2 pname2 id2 mvrtype value', 'shape (maxbound)', 'reader urword'], ['block period', 'name mname1', 'type string', 'reader urword', 'shape', 'tagged false', 'in_record true', 'optional true'], ['block period', 'name pname1', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name id1', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block period', 'name mname2', 'type string', 'reader urword', 'shape', 'tagged false', 'in_record true', 'optional true'], ['block period', 'name pname2', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name id2', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block period', 'name mvrtype', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name value', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword']] def __init__( self, @@ -583,6 +133,7 @@ def __init__( maxpackages=None, packages=None, perioddata=None, + filename=None, pname=None, **kwargs, @@ -597,28 +148,22 @@ def __init__( **kwargs, ) - self.print_input = self.build_mfdata("print_input", print_input) - self.print_flows = self.build_mfdata("print_flows", print_flows) - self.modelnames = self.build_mfdata("modelnames", modelnames) - self.budget_filerecord = self.build_mfdata( - "budget_filerecord", budget_filerecord - ) - self.budgetcsv_filerecord = self.build_mfdata( - "budgetcsv_filerecord", budgetcsv_filerecord - ) - self.maxmvr = self.build_mfdata("maxmvr", maxmvr) - self.maxpackages = self.build_mfdata("maxpackages", maxpackages) - self.packages = self.build_mfdata("packages", packages) - self.perioddata = self.build_mfdata("perioddata", perioddata) + self.print_input = self.build_mfdata('print_input', print_input) + self.print_flows = self.build_mfdata('print_flows', print_flows) + self.modelnames = self.build_mfdata('modelnames', modelnames) + self.budget_filerecord = self.build_mfdata('budget_filerecord', budget_filerecord) + self.budgetcsv_filerecord = self.build_mfdata('budgetcsv_filerecord', budgetcsv_filerecord) + self.maxmvr = self.build_mfdata('maxmvr', maxmvr) + self.maxpackages = self.build_mfdata('maxpackages', maxpackages) + self.packages = self.build_mfdata('packages', packages) + self.perioddata = self.build_mfdata('perioddata', perioddata) self._init_complete = True - class GwfmvrPackages(MFChildPackages): """ GwfmvrPackages is a container class for the ModflowGwfmvr class. """ - package_abbr = "gwfmvrpackages" def initialize( @@ -632,6 +177,7 @@ def initialize( maxpackages=None, packages=None, perioddata=None, + filename=None, pname=None, ): @@ -669,6 +215,7 @@ def append_package( maxpackages=None, packages=None, perioddata=None, + filename=None, pname=None, ): diff --git a/flopy/mf6/modflow/mfgwfnam.py b/flopy/mf6/modflow/mfgwfnam.py index f34ff2ee73..377d986bc4 100644 --- a/flopy/mf6/modflow/mfgwfnam.py +++ b/flopy/mf6/modflow/mfgwfnam.py @@ -93,400 +93,15 @@ class ModflowGwfnam(MFPackage): """ - newtonoptions = ListTemplateGenerator(("gwf6", "nam", "options", "newtonoptions")) - nc_mesh2d_filerecord = ListTemplateGenerator( - ("gwf6", "nam", "options", "nc_mesh2d_filerecord") - ) - nc_structured_filerecord = ListTemplateGenerator( - ("gwf6", "nam", "options", "nc_structured_filerecord") - ) - nc_filerecord = ListTemplateGenerator(("gwf6", "nam", "options", "nc_filerecord")) - packages = ListTemplateGenerator(("gwf6", "nam", "packages", "packages")) - package_abbr = "gwfnam" - _package_type = "nam" - dfn_file_name = "gwf-nam.dfn" - dfn = [ - ["header"], - [ - "block options", - "name list", - "type string", - "reader urword", - "optional true", - "preserve_case true", - ], - [ - "block options", - "name print_input", - "type keyword", - "reader urword", - "optional true", - ], - [ - "block options", - "name print_flows", - "type keyword", - "reader urword", - "optional true", - ], - [ - "block options", - "name save_flows", - "type keyword", - "reader urword", - "optional true", - ], - [ - "block options", - "name newtonoptions", - "type record newton under_relaxation", - "reader urword", - "optional true", - ], - [ - "block options", - "name newton", - "in_record true", - "type keyword", - "reader urword", - ], - [ - "block options", - "name under_relaxation", - "in_record true", - "type keyword", - "reader urword", - "optional true", - ], - [ - "block options", - "name nc_mesh2d_filerecord", - "type record netcdf_mesh2d fileout ncmesh2dfile", - "shape", - "reader urword", - "tagged true", - "optional true", - "mf6internal ncmesh2drec", - ], - [ - "block options", - "name netcdf_mesh2d", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - "extended true", - ], - [ - "block options", - "name nc_structured_filerecord", - "type record netcdf_structured fileout ncstructfile", - "shape", - "reader urword", - "tagged true", - "optional true", - "mf6internal ncstructrec", - ], - [ - "block options", - "name netcdf_structured", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - "mf6internal netcdf_struct", - "extended true", - ], - [ - "block options", - "name fileout", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name ncmesh2dfile", - "type string", - "preserve_case true", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - "extended true", - ], - [ - "block options", - "name ncstructfile", - "type string", - "preserve_case true", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - "extended true", - ], - [ - "block options", - "name nc_filerecord", - "type record netcdf filein netcdf_filename", - "reader urword", - "tagged true", - "optional true", - ], - [ - "block options", - "name netcdf", - "type keyword", - "in_record true", - "reader urword", - "tagged true", - "optional false", - "extended true", - ], - [ - "block options", - "name filein", - "type keyword", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name netcdf_filename", - "type string", - "preserve_case true", - "in_record true", - "reader urword", - "optional false", - "tagged false", - "mf6internal netcdf_fname", - "extended true", - ], - [ - "block packages", - "name packages", - "type recarray ftype fname pname", - "reader urword", - "optional false", - ], - [ - "block packages", - "name ftype", - "in_record true", - "type string", - "tagged false", - "reader urword", - ], - [ - "block packages", - "name fname", - "in_record true", - "type string", - "preserve_case true", - "tagged false", - "reader urword", - ], - [ - "block packages", - "name pname", - "in_record true", - "type string", - "tagged false", - "reader urword", - "optional true", - ], - ] - spec = { - "advanced": False, - "multi": False, - "name": "gwf-nam", - "options": { - "list": { - "block": "options", - "description": "is name of the listing file to create for this gwf model. if not specified, then the name of the list file will be the basename of the gwf model name file and the '.lst' extension. for example, if the gwf name file is called 'my.model.nam' then the list file will be called 'my.model.lst'.", - "longname": "name of listing file", - "name": "list", - "optional": True, - "reader": "urword", - "type": "string", - }, - "nc_filerecord": { - "block": "options", - "description": "netcdf filerecord", - "fields": { - "netcdf_filename": { - "block": "options", - "description": "defines a NetCDF input file.", - "extended": "true", - "longname": "netcdf input filename", - "mf6internal": "netcdf_fname", - "name": "netcdf_filename", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "nc_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "nc_mesh2d_filerecord": { - "block": "options", - "description": "netcdf layered mesh fileout record.", - "fields": { - "ncmesh2dfile": { - "block": "options", - "description": "name of the NetCDF ugrid layered mesh output file.", - "extended": "true", - "longname": "file keyword", - "name": "ncmesh2dfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "mf6internal": "ncmesh2drec", - "name": "nc_mesh2d_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "nc_structured_filerecord": { - "block": "options", - "description": "netcdf structured fileout record.", - "fields": { - "ncstructfile": { - "block": "options", - "description": "name of the NetCDF structured output file.", - "extended": "true", - "longname": "file keyword", - "name": "ncstructfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "mf6internal": "ncstructrec", - "name": "nc_structured_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "newtonoptions": { - "block": "options", - "description": "none", - "fields": { - "newton": { - "block": "options", - "description": "keyword that activates the Newton-Raphson formulation for groundwater flow between connected, convertible groundwater cells and stress packages that support calculation of Newton-Raphson terms for groundwater exchanges. Cells will not dry when this option is used. By default, the Newton-Raphson formulation is not applied.", - "longname": "keyword to activate Newton-Raphson formulation", - "name": "newton", - "reader": "urword", - "type": "keyword", - }, - "under_relaxation": { - "block": "options", - "description": "keyword that indicates whether the groundwater head in a cell will be under-relaxed when water levels fall below the bottom of the model below any given cell. By default, Newton-Raphson UNDER_RELAXATION is not applied.", - "longname": "keyword to activate Newton-Raphson UNDER_RELAXATION option", - "name": "under_relaxation", - "optional": "true", - "reader": "urword", - "type": "keyword", - }, - }, - "longname": "newton keyword and options", - "name": "newtonoptions", - "optional": True, - "reader": "urword", - "type": "record", - }, - "print_flows": { - "block": "options", - "description": "keyword to indicate that the list of all model package 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.", - "longname": "print calculated flows to listing file", - "name": "print_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "print_input": { - "block": "options", - "description": "keyword to indicate that the list of all model stress package information will be written to the listing file immediately after it is read.", - "longname": "print input to listing file", - "name": "print_input", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "save_flows": { - "block": "options", - "description": "keyword to indicate that all model package flow terms will be written to the file specified with 'budget fileout' in output control.", - "longname": "save flows for all packages to budget file", - "name": "save_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - }, - "packages": { - "packages": { - "block": "packages", - "item": { - "block": "packages", - "fields": { - "fname": { - "block": "packages", - "description": "is the name of the file containing the package input. The path to the file should be included if the file is not located in the folder where the program was run.", - "longname": "file name", - "name": "fname", - "reader": "urword", - "type": "string", - }, - "ftype": { - "block": "packages", - "description": "is the file type, which must be one of the following character values shown in table~ref{table:ftype-gwf}. Ftype may be entered in any combination of uppercase and lowercase.", - "longname": "package type", - "name": "ftype", - "reader": "urword", - "type": "string", - }, - "pname": { - "block": "packages", - "description": "is the user-defined name for the package. PNAME is restricted to 16 characters. No spaces are allowed in PNAME. PNAME character values are read and stored by the program for stress packages only. These names may be useful for labeling purposes when multiple stress packages of the same type are located within a single GWF Model. If PNAME is specified for a stress package, then PNAME will be used in the flow budget table in the listing file; it will also be used for the text entry in the cell-by-cell budget file. PNAME is case insensitive and is stored in all upper case letters.", - "longname": "user name for package", - "name": "pname", - "optional": "true", - "reader": "urword", - "type": "string", - }, - }, - "longname": "package list", - "name": "packages", - "optional": False, - "reader": "urword", - "type": "record", - }, - "longname": "package list", - "name": "packages", - "optional": False, - "reader": "urword", - "type": "recarray", - } - }, - } + newtonoptions = ListTemplateGenerator(('gwf6', 'nam', 'options', 'newtonoptions')) + nc_mesh2d_filerecord = ListTemplateGenerator(('gwf6', 'nam', 'options', 'nc_mesh2d_filerecord')) + nc_structured_filerecord = ListTemplateGenerator(('gwf6', 'nam', 'options', 'nc_structured_filerecord')) + nc_filerecord = ListTemplateGenerator(('gwf6', 'nam', 'options', 'nc_filerecord')) + packages = ListTemplateGenerator(('gwf6', 'nam', 'packages', 'packages')) + package_abbr = 'gwfnam' + _package_type = 'nam' + dfn_file_name = 'gwf-nam.dfn' + dfn = [['header'], ['block options', 'name list', 'type string', 'reader urword', 'optional true', 'preserve_case true'], ['block options', 'name print_input', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name print_flows', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name save_flows', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name newtonoptions', 'type record newton under_relaxation', 'reader urword', 'optional true'], ['block options', 'name newton', 'in_record true', 'type keyword', 'reader urword'], ['block options', 'name under_relaxation', 'in_record true', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name nc_mesh2d_filerecord', 'type record netcdf_mesh2d fileout ncmesh2dfile', 'shape', 'reader urword', 'tagged true', 'optional true', 'mf6internal ncmesh2drec'], ['block options', 'name netcdf_mesh2d', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false', 'extended true'], ['block options', 'name nc_structured_filerecord', 'type record netcdf_structured fileout ncstructfile', 'shape', 'reader urword', 'tagged true', 'optional true', 'mf6internal ncstructrec'], ['block options', 'name netcdf_structured', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false', 'mf6internal netcdf_struct', 'extended true'], ['block options', 'name fileout', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name ncmesh2dfile', 'type string', 'preserve_case true', 'shape', 'in_record true', 'reader urword', 'tagged false', 'optional false', 'extended true'], ['block options', 'name ncstructfile', 'type string', 'preserve_case true', 'shape', 'in_record true', 'reader urword', 'tagged false', 'optional false', 'extended true'], ['block options', 'name nc_filerecord', 'type record netcdf filein netcdf_filename', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name netcdf', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false', 'extended true'], ['block options', 'name filein', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name netcdf_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false', 'mf6internal netcdf_fname', 'extended true'], ['block packages', 'name packages', 'type recarray ftype fname pname', 'reader urword', 'optional false'], ['block packages', 'name ftype', 'in_record true', 'type string', 'tagged false', 'reader urword'], ['block packages', 'name fname', 'in_record true', 'type string', 'preserve_case true', 'tagged false', 'reader urword'], ['block packages', 'name pname', 'in_record true', 'type string', 'tagged false', 'reader urword', 'optional true']] def __init__( self, @@ -501,6 +116,7 @@ def __init__( nc_structured_filerecord=None, nc_filerecord=None, packages=None, + filename=None, pname=None, **kwargs, @@ -515,18 +131,15 @@ def __init__( **kwargs, ) - self.list = self.build_mfdata("list", list) - 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.newtonoptions = self.build_mfdata("newtonoptions", newtonoptions) - self.nc_mesh2d_filerecord = self.build_mfdata( - "nc_mesh2d_filerecord", nc_mesh2d_filerecord - ) - self.nc_structured_filerecord = self.build_mfdata( - "nc_structured_filerecord", nc_structured_filerecord - ) - self.nc_filerecord = self.build_mfdata("nc_filerecord", nc_filerecord) - self.packages = self.build_mfdata("packages", packages) + self.list = self.build_mfdata('list', list) + 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.newtonoptions = self.build_mfdata('newtonoptions', newtonoptions) + self.nc_mesh2d_filerecord = self.build_mfdata('nc_mesh2d_filerecord', nc_mesh2d_filerecord) + self.nc_structured_filerecord = self.build_mfdata('nc_structured_filerecord', nc_structured_filerecord) + self.nc_filerecord = self.build_mfdata('nc_filerecord', nc_filerecord) + self.packages = self.build_mfdata('packages', packages) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwfnpf.py b/flopy/mf6/modflow/mfgwfnpf.py index f959cbbabb..6c39c2554b 100644 --- a/flopy/mf6/modflow/mfgwfnpf.py +++ b/flopy/mf6/modflow/mfgwfnpf.py @@ -246,734 +246,21 @@ class ModflowGwfnpf(MFPackage): """ - rewet_record = ListTemplateGenerator(("gwf6", "npf", "options", "rewet_record")) - xt3doptions = ListTemplateGenerator(("gwf6", "npf", "options", "xt3doptions")) - tvk_filerecord = ListTemplateGenerator(("gwf6", "npf", "options", "tvk_filerecord")) - icelltype = ArrayTemplateGenerator(("gwf6", "npf", "griddata", "icelltype")) - k = ArrayTemplateGenerator(("gwf6", "npf", "griddata", "k")) - k22 = ArrayTemplateGenerator(("gwf6", "npf", "griddata", "k22")) - k33 = ArrayTemplateGenerator(("gwf6", "npf", "griddata", "k33")) - angle1 = ArrayTemplateGenerator(("gwf6", "npf", "griddata", "angle1")) - angle2 = ArrayTemplateGenerator(("gwf6", "npf", "griddata", "angle2")) - angle3 = ArrayTemplateGenerator(("gwf6", "npf", "griddata", "angle3")) - wetdry = ArrayTemplateGenerator(("gwf6", "npf", "griddata", "wetdry")) - package_abbr = "gwfnpf" - _package_type = "npf" - dfn_file_name = "gwf-npf.dfn" - dfn = [ - ["header"], - [ - "block options", - "name save_flows", - "type keyword", - "reader urword", - "optional true", - "mf6internal ipakcb", - ], - [ - "block options", - "name print_flows", - "type keyword", - "reader urword", - "optional true", - "mf6internal iprflow", - ], - [ - "block options", - "name alternative_cell_averaging", - "type string", - "valid logarithmic amt-lmk amt-hmk", - "reader urword", - "optional true", - "mf6internal cellavg", - ], - [ - "block options", - "name thickstrt", - "type keyword", - "reader urword", - "optional true", - "mf6internal ithickstrt", - ], - [ - "block options", - "name cvoptions", - "type record variablecv dewatered", - "reader urword", - "optional true", - ], - [ - "block options", - "name variablecv", - "in_record true", - "type keyword", - "reader urword", - "mf6internal ivarcv", - ], - [ - "block options", - "name dewatered", - "in_record true", - "type keyword", - "reader urword", - "optional true", - "mf6internal idewatcv", - ], - [ - "block options", - "name perched", - "type keyword", - "reader urword", - "optional true", - "mf6internal iperched", - ], - [ - "block options", - "name rewet_record", - "type record rewet wetfct iwetit ihdwet", - "reader urword", - "optional true", - ], - [ - "block options", - "name rewet", - "type keyword", - "in_record true", - "reader urword", - "optional false", - "mf6internal irewet", - ], - [ - "block options", - "name wetfct", - "type double precision", - "in_record true", - "reader urword", - "optional false", - ], - [ - "block options", - "name iwetit", - "type integer", - "in_record true", - "reader urword", - "optional false", - ], - [ - "block options", - "name ihdwet", - "type integer", - "in_record true", - "reader urword", - "optional false", - ], - [ - "block options", - "name xt3doptions", - "type record xt3d rhs", - "reader urword", - "optional true", - ], - [ - "block options", - "name xt3d", - "in_record true", - "type keyword", - "reader urword", - "mf6internal ixt3d", - ], - [ - "block options", - "name rhs", - "in_record true", - "type keyword", - "reader urword", - "optional true", - "mf6internal ixt3drhs", - ], - [ - "block options", - "name highest_cell_saturation", - "type keyword", - "reader urword", - "optional true", - "mf6internal ihighcellsat", - ], - [ - "block options", - "name save_specific_discharge", - "type keyword", - "reader urword", - "optional true", - "mf6internal isavspdis", - ], - [ - "block options", - "name save_saturation", - "type keyword", - "reader urword", - "optional true", - "mf6internal isavsat", - ], - [ - "block options", - "name k22overk", - "type keyword", - "reader urword", - "optional true", - "mf6internal ik22overk", - ], - [ - "block options", - "name k33overk", - "type keyword", - "reader urword", - "optional true", - "mf6internal ik33overk", - ], - [ - "block options", - "name tvk_filerecord", - "type record tvk6 filein tvk6_filename", - "shape", - "reader urword", - "tagged true", - "optional true", - "construct_package tvk", - "construct_data perioddata", - "parameter_name tvk_perioddata", - ], - [ - "block options", - "name tvk6", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name filein", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name tvk6_filename", - "type string", - "preserve_case true", - "in_record true", - "reader urword", - "optional false", - "tagged false", - ], - [ - "block options", - "name export_array_ascii", - "type keyword", - "reader urword", - "optional true", - "mf6internal export_ascii", - ], - [ - "block options", - "name export_array_netcdf", - "type keyword", - "reader urword", - "optional true", - "mf6internal export_nc", - "extended true", - ], - [ - "block options", - "name dev_no_newton", - "type keyword", - "reader urword", - "optional true", - "mf6internal inewton", - ], - [ - "block options", - "name dev_omega", - "type double precision", - "reader urword", - "optional true", - "mf6internal satomega", - ], - [ - "block griddata", - "name icelltype", - "type integer", - "shape (nodes)", - "valid", - "reader readarray", - "layered true", - "netcdf true", - "optional", - "default 0", - ], - [ - "block griddata", - "name k", - "type double precision", - "shape (nodes)", - "valid", - "reader readarray", - "layered true", - "netcdf true", - "optional", - "default 1.0", - ], - [ - "block griddata", - "name k22", - "type double precision", - "shape (nodes)", - "valid", - "reader readarray", - "layered true", - "netcdf true", - "optional true", - ], - [ - "block griddata", - "name k33", - "type double precision", - "shape (nodes)", - "valid", - "reader readarray", - "layered true", - "netcdf true", - "optional true", - ], - [ - "block griddata", - "name angle1", - "type double precision", - "shape (nodes)", - "valid", - "reader readarray", - "layered true", - "netcdf true", - "optional true", - ], - [ - "block griddata", - "name angle2", - "type double precision", - "shape (nodes)", - "valid", - "reader readarray", - "layered true", - "netcdf true", - "optional true", - ], - [ - "block griddata", - "name angle3", - "type double precision", - "shape (nodes)", - "valid", - "reader readarray", - "layered true", - "netcdf true", - "optional true", - ], - [ - "block griddata", - "name wetdry", - "type double precision", - "shape (nodes)", - "valid", - "reader readarray", - "layered true", - "netcdf true", - "optional true", - ], - ] - spec = { - "advanced": False, - "fkeys": { - "tvk_filerecord": { - "abbr": "tvk", - "key": "tvk_filerecord", - "param": "tvk_perioddata", - "parent": "parent_package", - "val": "perioddata", - } - }, - "griddata": { - "angle1": { - "block": "griddata", - "description": "is a rotation angle of the hydraulic conductivity tensor in degrees. the angle represents the first of three sequential rotations of the hydraulic conductivity ellipsoid. with the k11, k22, and k33 axes of the ellipsoid initially aligned with the x, y, and z coordinate axes, respectively, angle1 rotates the ellipsoid about its k33 axis (within the x - y plane). a positive value represents counter-clockwise rotation when viewed from any point on the positive k33 axis, looking toward the center of the ellipsoid. a value of zero indicates that the k11 axis lies within the x - z plane. if angle1 is not specified, default values of zero are assigned to angle1, angle2, and angle3, in which case the k11, k22, and k33 axes are aligned with the x, y, and z axes, respectively.", - "layered": True, - "longname": "first anisotropy rotation angle (degrees)", - "name": "angle1", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "angle2": { - "block": "griddata", - "description": "is a rotation angle of the hydraulic conductivity tensor in degrees. the angle represents the second of three sequential rotations of the hydraulic conductivity ellipsoid. following the rotation by angle1 described above, angle2 rotates the ellipsoid about its k22 axis (out of the x - y plane). an array can be specified for angle2 only if angle1 is also specified. a positive value of angle2 represents clockwise rotation when viewed from any point on the positive k22 axis, looking toward the center of the ellipsoid. a value of zero indicates that the k11 axis lies within the x - y plane. if angle2 is not specified, default values of zero are assigned to angle2 and angle3; connections that are not user-designated as vertical are assumed to be strictly horizontal (that is, to have no z component to their orientation); and connection lengths are based on horizontal distances.", - "layered": True, - "longname": "second anisotropy rotation angle (degrees)", - "name": "angle2", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "angle3": { - "block": "griddata", - "description": "is a rotation angle of the hydraulic conductivity tensor in degrees. the angle represents the third of three sequential rotations of the hydraulic conductivity ellipsoid. following the rotations by angle1 and angle2 described above, angle3 rotates the ellipsoid about its k11 axis. an array can be specified for angle3 only if angle1 and angle2 are also specified. an array must be specified for angle3 if angle2 is specified. a positive value of angle3 represents clockwise rotation when viewed from any point on the positive k11 axis, looking toward the center of the ellipsoid. a value of zero indicates that the k22 axis lies within the x - y plane.", - "layered": True, - "longname": "third anisotropy rotation angle (degrees)", - "name": "angle3", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "icelltype": { - "block": "griddata", - "default": 0, - "description": "flag for each cell that specifies how saturated thickness is treated. 0 means saturated thickness is held constant; $>$0 means saturated thickness varies with computed head when head is below the cell top; $<$0 means saturated thickness varies with computed head unless the thickstrt option is in effect. when thickstrt is in effect, a negative value for icelltype indicates that the saturated thickness value used in conductance calculations in the npf package will be computed as strt-bot and held constant. if the thickstrt option is not in effect, then negative values provided by the user for icelltype are automatically reassigned by the program to a value of one.", - "layered": True, - "longname": "confined or convertible indicator", - "name": "icelltype", - "netcdf": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "integer", - }, - "k": { - "block": "griddata", - "default": 1.0, - "description": "is the hydraulic conductivity. for the common case in which the user would like to specify the horizontal hydraulic conductivity and the vertical hydraulic conductivity, then k should be assigned as the horizontal hydraulic conductivity, k33 should be assigned as the vertical hydraulic conductivity, and k22 and the three rotation angles should not be specified. when more sophisticated anisotropy is required, then k corresponds to the k11 hydraulic conductivity axis. all included cells (idomain $>$ 0) must have a k value greater than zero.", - "layered": True, - "longname": "hydraulic conductivity (l/t)", - "name": "k", - "netcdf": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "k22": { - "block": "griddata", - "description": "is the hydraulic conductivity of the second ellipsoid axis (or the ratio of k22/k if the k22overk option is specified); for an unrotated case this is the hydraulic conductivity in the y direction. if k22 is not included in the griddata block, then k22 is set equal to k. for a regular modflow grid (dis package is used) in which no rotation angles are specified, k22 is the hydraulic conductivity along columns in the y direction. for an unstructured disu grid, the user must assign principal x and y axes and provide the angle for each cell face relative to the assigned x direction. all included cells (idomain $>$ 0) must have a k22 value greater than zero.", - "layered": True, - "longname": "hydraulic conductivity of second ellipsoid axis", - "name": "k22", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "k33": { - "block": "griddata", - "description": "is the hydraulic conductivity of the third ellipsoid axis (or the ratio of k33/k if the k33overk option is specified); for an unrotated case, this is the vertical hydraulic conductivity. when anisotropy is applied, k33 corresponds to the k33 tensor component. all included cells (idomain $>$ 0) must have a k33 value greater than zero.", - "layered": True, - "longname": "hydraulic conductivity of third ellipsoid axis (l/t)", - "name": "k33", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "wetdry": { - "block": "griddata", - "description": "is a combination of the wetting threshold and a flag to indicate which neighboring cells can cause a cell to become wet. if wetdry $<$ 0, only a cell below a dry cell can cause the cell to become wet. if wetdry $>$ 0, the cell below a dry cell and horizontally adjacent cells can cause a cell to become wet. if wetdry is 0, the cell cannot be wetted. the absolute value of wetdry is the wetting threshold. when the sum of bot and the absolute value of wetdry at a dry cell is equaled or exceeded by the head at an adjacent cell, the cell is wetted. wetdry must be specified if 'rewet' is specified in the options block. if 'rewet' is not specified in the options block, then wetdry can be entered, and memory will be allocated for it, even though it is not used.", - "layered": True, - "longname": "wetdry threshold and factor", - "name": "wetdry", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - }, - "multi": False, - "name": "gwf-npf", - "options": { - "alternative_cell_averaging": { - "block": "options", - "description": "is a text keyword to indicate that an alternative method will be used for calculating the conductance for horizontal cell connections. the text value for alternative_cell_averaging can be 'logarithmic', 'amt-lmk', or 'amt-hmk'. 'amt-lmk' signifies that the conductance will be calculated using arithmetic-mean thickness and logarithmic-mean hydraulic conductivity. 'amt-hmk' signifies that the conductance will be calculated using arithmetic-mean thickness and harmonic-mean hydraulic conductivity. if the user does not specify a value for alternative_cell_averaging, then the harmonic-mean method will be used. this option cannot be used if the xt3d option is invoked. the amt-hmk alternative_cell_averaging option, in combination with the dry_cell_saturation option, can be used to calculate the same horizontal conductance as modflow-usg when upstream weighting is used (laycon=4).", - "longname": "conductance weighting option", - "mf6internal": "cellavg", - "name": "alternative_cell_averaging", - "optional": True, - "reader": "urword", - "type": "string", - "valid": "logarithmic amt-lmk amt-hmk", - }, - "cvoptions": { - "block": "options", - "description": "none", - "fields": { - "dewatered": { - "block": "options", - "description": "If the DEWATERED keyword is specified, then the vertical conductance is calculated using only the saturated thickness and properties of the overlying cell if the head in the underlying cell is below its top.", - "longname": "keyword to activate DEWATERED option", - "mf6internal": "idewatcv", - "name": "dewatered", - "optional": "true", - "reader": "urword", - "type": "keyword", - }, - "variablecv": { - "block": "options", - "description": "keyword to indicate that the vertical conductance will be calculated using the saturated thickness and properties of the overlying cell and the thickness and properties of the underlying cell. If the DEWATERED keyword is also specified, then the vertical conductance is calculated using only the saturated thickness and properties of the overlying cell if the head in the underlying cell is below its top. If these keywords are not specified, then the default condition is to calculate the vertical conductance at the start of the simulation using the initial head and the cell properties. The vertical conductance remains constant for the entire simulation.", - "longname": "keyword to activate VARIABLECV option", - "mf6internal": "ivarcv", - "name": "variablecv", - "reader": "urword", - "type": "keyword", - }, - }, - "longname": "vertical conductance options", - "name": "cvoptions", - "optional": True, - "reader": "urword", - "type": "record", - }, - "dev_no_newton": { - "block": "options", - "description": "turn off newton for unconfined cells", - "longname": "turn off newton for unconfined cells", - "mf6internal": "inewton", - "name": "dev_no_newton", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "dev_omega": { - "block": "options", - "description": "set saturation omega value", - "longname": "set saturation omega value", - "mf6internal": "satomega", - "name": "dev_omega", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - "export_array_ascii": { - "block": "options", - "description": "keyword that specifies input griddata arrays should be written to layered ascii output files.", - "longname": "export array variables to layered ascii files.", - "mf6internal": "export_ascii", - "name": "export_array_ascii", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "export_array_netcdf": { - "block": "options", - "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", - "extended": True, - "longname": "export array variables to netcdf output files.", - "mf6internal": "export_nc", - "name": "export_array_netcdf", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "highest_cell_saturation": { - "block": "options", - "description": "keyword indicating that the maximum cell bottom will be used to calculate the saturation used to calculate the horizontal conductance between cells. this option is intended to prevent flow from leaving a dry cell and is based on~cite{painter2008robust}. this option is only applied when the newton-raphson formulation is used, a warning will be issued if this option is specified and the newton-raphson formulation is not specified in the gwf name file. this option, in combination with the amt-hmk alternative_cell_averaging option, can be used to calculate the same horizontal conductance as modflow-usg when upstream weighting is used (laycon=4).", - "longname": "keyword to activate highest_cell_saturation option", - "mf6internal": "ihighcellsat", - "name": "highest_cell_saturation", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "k22overk": { - "block": "options", - "description": "keyword to indicate that specified k22 is a ratio of k22 divided by k. if this option is specified, then the k22 array entered in the npf package will be multiplied by k after being read.", - "longname": "keyword to indicate that specified k22 is a ratio", - "mf6internal": "ik22overk", - "name": "k22overk", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "k33overk": { - "block": "options", - "description": "keyword to indicate that specified k33 is a ratio of k33 divided by k. if this option is specified, then the k33 array entered in the npf package will be multiplied by k after being read.", - "longname": "keyword to indicate that specified k33 is a ratio", - "mf6internal": "ik33overk", - "name": "k33overk", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "perched": { - "block": "options", - "description": "keyword to indicate that when a cell is overlying a dewatered convertible cell, the head difference used in darcy's law is equal to the head in the overlying cell minus the bottom elevation of the overlying cell. if not specified, then the default is to use the head difference between the two cells.", - "longname": "keyword to activate perched option", - "mf6internal": "iperched", - "name": "perched", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "perioddata": { - "block": "options", - "description": "Contains data for the tvk package. Data can be passed as a dictionary to the tvk package with variable names as keys and package data as values. Data for the perioddata variable is also acceptable. See tvk package documentation for more information.", - "name": "perioddata", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "tvk", - "key": "tvk_filerecord", - "param": "tvk_perioddata", - "parent": "parent_package", - "val": "perioddata", - }, - "type": "record tvk6 filein tvk6_filename", - }, - "print_flows": { - "block": "options", - "description": "keyword to indicate that calculated flows between cells 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. this option can produce extremely large list files because all cell-by-cell flows are printed. it should only be used with the npf package for models that have a small number of cells.", - "longname": "keyword to print npf flows to listing file", - "mf6internal": "iprflow", - "name": "print_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "rewet_record": { - "block": "options", - "fields": { - "ihdwet": { - "block": "options", - "description": "is a keyword and integer flag that determines which equation is used to define the initial head at cells that become wet. If IHDWET is 0, h = BOT + WETFCT (hm - BOT). If IHDWET is not 0, h = BOT + WETFCT (THRESH).", - "longname": "flag to determine wetting equation", - "name": "ihdwet", - "optional": "false", - "reader": "urword", - "type": "integer", - }, - "iwetit": { - "block": "options", - "description": "is a keyword and iteration interval for attempting to wet cells. Wetting is attempted every IWETIT iteration. This applies to outer iterations and not inner iterations. If IWETIT is specified as zero or less, then the value is changed to 1.", - "longname": "interval to use for rewetting", - "name": "iwetit", - "optional": "false", - "reader": "urword", - "type": "integer", - }, - "rewet": { - "block": "options", - "description": "activates model rewetting. Rewetting is off by default.", - "longname": "keyword to activate rewetting", - "mf6internal": "irewet", - "name": "rewet", - "optional": "false", - "reader": "urword", - "type": "keyword", - }, - "wetfct": { - "block": "options", - "description": "is a keyword and factor that is included in the calculation of the head that is initially established at a cell when that cell is converted from dry to wet.", - "longname": "wetting factor to use for rewetting", - "name": "wetfct", - "optional": "false", - "reader": "urword", - "type": "double precision", - }, - }, - "name": "rewet_record", - "optional": True, - "reader": "urword", - "type": "record", - }, - "save_flows": { - "block": "options", - "description": "keyword to indicate that budget flow terms will be written to the file specified with 'budget save file' in output control.", - "longname": "keyword to save npf flows", - "mf6internal": "ipakcb", - "name": "save_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "save_saturation": { - "block": "options", - "description": "keyword to indicate that cell saturation will be written to the budget file, which is specified with 'budget save file' in output control. saturation will be saved to the budget file as an auxiliary variable saved with the data-sat text label. saturation is a cell variable that ranges from zero to one and can be used by post processing programs to determine how much of a cell volume is saturated. if icelltype is 0, then saturation is always one.", - "longname": "keyword to save saturation", - "mf6internal": "isavsat", - "name": "save_saturation", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "save_specific_discharge": { - "block": "options", - "description": "keyword to indicate that x, y, and z components of specific discharge will be calculated at cell centers and written to the budget file, which is specified with 'budget save file' in output control. if this option is activated, then additional information may be required in the discretization packages and the gwf exchange package (if gwf models are coupled). specifically, angldegx must be specified in the connectiondata block of the disu package; angldegx must also be specified for the gwf exchange as an auxiliary variable.", - "longname": "keyword to save specific discharge", - "mf6internal": "isavspdis", - "name": "save_specific_discharge", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "thickstrt": { - "block": "options", - "description": "indicates that cells having a negative icelltype are confined, and their cell thickness for conductance calculations will be computed as strt-bot rather than top-bot. this option should be used with caution as it only affects conductance calculations in the npf package.", - "longname": "keyword to activate thickstrt option", - "mf6internal": "ithickstrt", - "name": "thickstrt", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "xt3doptions": { - "block": "options", - "description": "none", - "fields": { - "rhs": { - "block": "options", - "description": "If the RHS keyword is also included, then the XT3D additional terms will be added to the right-hand side. If the RHS keyword is excluded, then the XT3D terms will be put into the coefficient matrix.", - "longname": "keyword to XT3D on right hand side", - "mf6internal": "ixt3drhs", - "name": "rhs", - "optional": "true", - "reader": "urword", - "type": "keyword", - }, - "xt3d": { - "block": "options", - "description": "keyword indicating that the XT3D formulation will be used. If the RHS keyword is also included, then the XT3D additional terms will be added to the right-hand side. If the RHS keyword is excluded, then the XT3D terms will be put into the coefficient matrix. Use of XT3D will substantially increase the computational effort, but will result in improved accuracy for anisotropic conductivity fields and for unstructured grids in which the CVFD requirement is violated. XT3D requires additional information about the shapes of grid cells. If XT3D is active and the DISU Package is used, then the user will need to provide in the DISU Package the angldegx array in the CONNECTIONDATA block and the VERTICES and CELL2D blocks.", - "longname": "keyword to activate XT3D", - "mf6internal": "ixt3d", - "name": "xt3d", - "reader": "urword", - "type": "keyword", - }, - }, - "longname": "keyword to activate xt3d", - "name": "xt3doptions", - "optional": True, - "reader": "urword", - "type": "record", - }, - }, - } + rewet_record = ListTemplateGenerator(('gwf6', 'npf', 'options', 'rewet_record')) + xt3doptions = ListTemplateGenerator(('gwf6', 'npf', 'options', 'xt3doptions')) + tvk_filerecord = ListTemplateGenerator(('gwf6', 'npf', 'options', 'tvk_filerecord')) + icelltype = ArrayTemplateGenerator(('gwf6', 'npf', 'griddata', 'icelltype')) + k = ArrayTemplateGenerator(('gwf6', 'npf', 'griddata', 'k')) + k22 = ArrayTemplateGenerator(('gwf6', 'npf', 'griddata', 'k22')) + k33 = ArrayTemplateGenerator(('gwf6', 'npf', 'griddata', 'k33')) + angle1 = ArrayTemplateGenerator(('gwf6', 'npf', 'griddata', 'angle1')) + angle2 = ArrayTemplateGenerator(('gwf6', 'npf', 'griddata', 'angle2')) + angle3 = ArrayTemplateGenerator(('gwf6', 'npf', 'griddata', 'angle3')) + wetdry = ArrayTemplateGenerator(('gwf6', 'npf', 'griddata', 'wetdry')) + package_abbr = 'gwfnpf' + _package_type = 'npf' + dfn_file_name = 'gwf-npf.dfn' + dfn = [['header'], ['block options', 'name save_flows', 'type keyword', 'reader urword', 'optional true', 'mf6internal ipakcb'], ['block options', 'name print_flows', 'type keyword', 'reader urword', 'optional true', 'mf6internal iprflow'], ['block options', 'name alternative_cell_averaging', 'type string', 'valid logarithmic amt-lmk amt-hmk', 'reader urword', 'optional true', 'mf6internal cellavg'], ['block options', 'name thickstrt', 'type keyword', 'reader urword', 'optional true', 'mf6internal ithickstrt'], ['block options', 'name cvoptions', 'type record variablecv dewatered', 'reader urword', 'optional true'], ['block options', 'name variablecv', 'in_record true', 'type keyword', 'reader urword', 'mf6internal ivarcv'], ['block options', 'name dewatered', 'in_record true', 'type keyword', 'reader urword', 'optional true', 'mf6internal idewatcv'], ['block options', 'name perched', 'type keyword', 'reader urword', 'optional true', 'mf6internal iperched'], ['block options', 'name rewet_record', 'type record rewet wetfct iwetit ihdwet', 'reader urword', 'optional true'], ['block options', 'name rewet', 'type keyword', 'in_record true', 'reader urword', 'optional false', 'mf6internal irewet'], ['block options', 'name wetfct', 'type double precision', 'in_record true', 'reader urword', 'optional false'], ['block options', 'name iwetit', 'type integer', 'in_record true', 'reader urword', 'optional false'], ['block options', 'name ihdwet', 'type integer', 'in_record true', 'reader urword', 'optional false'], ['block options', 'name xt3doptions', 'type record xt3d rhs', 'reader urword', 'optional true'], ['block options', 'name xt3d', 'in_record true', 'type keyword', 'reader urword', 'mf6internal ixt3d'], ['block options', 'name rhs', 'in_record true', 'type keyword', 'reader urword', 'optional true', 'mf6internal ixt3drhs'], ['block options', 'name highest_cell_saturation', 'type keyword', 'reader urword', 'optional true', 'mf6internal ihighcellsat'], ['block options', 'name save_specific_discharge', 'type keyword', 'reader urword', 'optional true', 'mf6internal isavspdis'], ['block options', 'name save_saturation', 'type keyword', 'reader urword', 'optional true', 'mf6internal isavsat'], ['block options', 'name k22overk', 'type keyword', 'reader urword', 'optional true', 'mf6internal ik22overk'], ['block options', 'name k33overk', 'type keyword', 'reader urword', 'optional true', 'mf6internal ik33overk'], ['block options', 'name tvk_filerecord', 'type record tvk6 filein tvk6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package tvk', 'construct_data perioddata', 'parameter_name tvk_perioddata'], ['block options', 'name tvk6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name filein', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name tvk6_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false'], ['block options', 'name export_array_ascii', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_ascii'], ['block options', 'name export_array_netcdf', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_nc', 'extended true'], ['block options', 'name dev_no_newton', 'type keyword', 'reader urword', 'optional true', 'mf6internal inewton'], ['block options', 'name dev_omega', 'type double precision', 'reader urword', 'optional true', 'mf6internal satomega'], ['block griddata', 'name icelltype', 'type integer', 'shape (nodes)', 'valid', 'reader readarray', 'layered true', 'netcdf true', 'optional', 'default 0'], ['block griddata', 'name k', 'type double precision', 'shape (nodes)', 'valid', 'reader readarray', 'layered true', 'netcdf true', 'optional', 'default 1.0'], ['block griddata', 'name k22', 'type double precision', 'shape (nodes)', 'valid', 'reader readarray', 'layered true', 'netcdf true', 'optional true'], ['block griddata', 'name k33', 'type double precision', 'shape (nodes)', 'valid', 'reader readarray', 'layered true', 'netcdf true', 'optional true'], ['block griddata', 'name angle1', 'type double precision', 'shape (nodes)', 'valid', 'reader readarray', 'layered true', 'netcdf true', 'optional true'], ['block griddata', 'name angle2', 'type double precision', 'shape (nodes)', 'valid', 'reader readarray', 'layered true', 'netcdf true', 'optional true'], ['block griddata', 'name angle3', 'type double precision', 'shape (nodes)', 'valid', 'reader readarray', 'layered true', 'netcdf true', 'optional true'], ['block griddata', 'name wetdry', 'type double precision', 'shape (nodes)', 'valid', 'reader readarray', 'layered true', 'netcdf true', 'optional true']] def __init__( self, @@ -1005,6 +292,7 @@ def __init__( angle2=None, angle3=None, wetdry=None, + filename=None, pname=None, **kwargs, @@ -1019,44 +307,33 @@ def __init__( **kwargs, ) - self.save_flows = self.build_mfdata("save_flows", save_flows) - self.print_flows = self.build_mfdata("print_flows", print_flows) - self.alternative_cell_averaging = self.build_mfdata( - "alternative_cell_averaging", alternative_cell_averaging - ) - self.thickstrt = self.build_mfdata("thickstrt", thickstrt) - self.cvoptions = self.build_mfdata("cvoptions", cvoptions) - self.perched = self.build_mfdata("perched", perched) - self.rewet_record = self.build_mfdata("rewet_record", rewet_record) - self.xt3doptions = self.build_mfdata("xt3doptions", xt3doptions) - self.highest_cell_saturation = self.build_mfdata( - "highest_cell_saturation", highest_cell_saturation - ) - self.save_specific_discharge = self.build_mfdata( - "save_specific_discharge", save_specific_discharge - ) - self.save_saturation = self.build_mfdata("save_saturation", save_saturation) - self.k22overk = self.build_mfdata("k22overk", k22overk) - self.k33overk = self.build_mfdata("k33overk", k33overk) - self._tvk_filerecord = self.build_mfdata("tvk_filerecord", None) - self._tvk_package = self.build_child_package( - "tvk", perioddata, "tvk_perioddata", self._tvk_filerecord - ) - self.export_array_ascii = self.build_mfdata( - "export_array_ascii", export_array_ascii - ) - self.export_array_netcdf = self.build_mfdata( - "export_array_netcdf", export_array_netcdf - ) - self.dev_no_newton = self.build_mfdata("dev_no_newton", dev_no_newton) - self.dev_omega = self.build_mfdata("dev_omega", dev_omega) - self.icelltype = self.build_mfdata("icelltype", icelltype) - self.k = self.build_mfdata("k", k) - self.k22 = self.build_mfdata("k22", k22) - self.k33 = self.build_mfdata("k33", k33) - self.angle1 = self.build_mfdata("angle1", angle1) - self.angle2 = self.build_mfdata("angle2", angle2) - self.angle3 = self.build_mfdata("angle3", angle3) - self.wetdry = self.build_mfdata("wetdry", wetdry) + self.save_flows = self.build_mfdata('save_flows', save_flows) + self.print_flows = self.build_mfdata('print_flows', print_flows) + self.alternative_cell_averaging = self.build_mfdata('alternative_cell_averaging', alternative_cell_averaging) + self.thickstrt = self.build_mfdata('thickstrt', thickstrt) + self.cvoptions = self.build_mfdata('cvoptions', cvoptions) + self.perched = self.build_mfdata('perched', perched) + self.rewet_record = self.build_mfdata('rewet_record', rewet_record) + self.xt3doptions = self.build_mfdata('xt3doptions', xt3doptions) + self.highest_cell_saturation = self.build_mfdata('highest_cell_saturation', highest_cell_saturation) + self.save_specific_discharge = self.build_mfdata('save_specific_discharge', save_specific_discharge) + self.save_saturation = self.build_mfdata('save_saturation', save_saturation) + self.k22overk = self.build_mfdata('k22overk', k22overk) + self.k33overk = self.build_mfdata('k33overk', k33overk) + self._tvk_filerecord = self.build_mfdata('tvk_filerecord', None) + self._tvk_package = self.build_child_package('tvk', perioddata, 'tvk_perioddata', self._tvk_filerecord) + self.export_array_ascii = self.build_mfdata('export_array_ascii', export_array_ascii) + self.export_array_netcdf = self.build_mfdata('export_array_netcdf', export_array_netcdf) + self.dev_no_newton = self.build_mfdata('dev_no_newton', dev_no_newton) + self.dev_omega = self.build_mfdata('dev_omega', dev_omega) + self.icelltype = self.build_mfdata('icelltype', icelltype) + self.k = self.build_mfdata('k', k) + self.k22 = self.build_mfdata('k22', k22) + self.k33 = self.build_mfdata('k33', k33) + self.angle1 = self.build_mfdata('angle1', angle1) + self.angle2 = self.build_mfdata('angle2', angle2) + self.angle3 = self.build_mfdata('angle3', angle3) + self.wetdry = self.build_mfdata('wetdry', wetdry) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwfoc.py b/flopy/mf6/modflow/mfgwfoc.py index b3bad05ce1..4a8dff14ea 100644 --- a/flopy/mf6/modflow/mfgwfoc.py +++ b/flopy/mf6/modflow/mfgwfoc.py @@ -65,472 +65,16 @@ class ModflowGwfoc(MFPackage): """ - budget_filerecord = ListTemplateGenerator( - ("gwf6", "oc", "options", "budget_filerecord") - ) - budgetcsv_filerecord = ListTemplateGenerator( - ("gwf6", "oc", "options", "budgetcsv_filerecord") - ) - head_filerecord = ListTemplateGenerator( - ("gwf6", "oc", "options", "head_filerecord") - ) - headprintrecord = ListTemplateGenerator( - ("gwf6", "oc", "options", "headprintrecord") - ) - saverecord = ListTemplateGenerator(("gwf6", "oc", "period", "saverecord")) - printrecord = ListTemplateGenerator(("gwf6", "oc", "period", "printrecord")) - package_abbr = "gwfoc" - _package_type = "oc" - dfn_file_name = "gwf-oc.dfn" - dfn = [ - ["header"], - [ - "block options", - "name budget_filerecord", - "type record budget fileout budgetfile", - "shape", - "reader urword", - "tagged true", - "optional true", - "mf6internal budfilerec", - ], - [ - "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", - "mf6internal budcsvfilerec", - ], - [ - "block options", - "name budgetcsv", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name budgetcsvfile", - "type string", - "preserve_case true", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - ], - [ - "block options", - "name head_filerecord", - "type record head fileout headfile", - "shape", - "reader urword", - "tagged true", - "optional true", - "mf6internal headfilerec", - ], - [ - "block options", - "name head", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name headfile", - "type string", - "preserve_case true", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - ], - [ - "block options", - "name headprintrecord", - "type record head print_format formatrecord", - "shape", - "reader urword", - "optional true", - "mf6internal headprintrec", - ], - [ - "block options", - "name print_format", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name formatrecord", - "type record columns width digits format", - "shape", - "in_record true", - "reader urword", - "tagged", - "optional false", - ], - [ - "block options", - "name columns", - "type integer", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional", - ], - [ - "block options", - "name width", - "type integer", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional", - ], - [ - "block options", - "name digits", - "type integer", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional", - ], - [ - "block options", - "name format", - "type string", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - ], - [ - "block period", - "name iper", - "type integer", - "block_variable true", - "in_record true", - "tagged false", - "shape", - "valid", - "reader urword", - "optional false", - ], - [ - "block period", - "name saverecord", - "type record save rtype ocsetting", - "shape", - "reader urword", - "tagged false", - "optional true", - ], - [ - "block period", - "name save", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block period", - "name printrecord", - "type record print rtype ocsetting", - "shape", - "reader urword", - "tagged false", - "optional true", - ], - [ - "block period", - "name print", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block period", - "name rtype", - "type string", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - ], - [ - "block period", - "name ocsetting", - "type keystring all first last frequency steps", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block period", - "name all", - "type keyword", - "shape", - "in_record true", - "reader urword", - ], - [ - "block period", - "name first", - "type keyword", - "shape", - "in_record true", - "reader urword", - ], - [ - "block period", - "name last", - "type keyword", - "shape", - "in_record true", - "reader urword", - ], - [ - "block period", - "name frequency", - "type integer", - "shape", - "tagged true", - "in_record true", - "reader urword", - ], - [ - "block period", - "name steps", - "type integer", - "shape ($0 indicates confined storage is used when head is above cell top and a mixed formulation of unconfined and confined storage is used when head is below cell top.", - "layered": True, - "longname": "convertible indicator", - "name": "iconvert", - "netcdf": True, - "optional": False, - "reader": "readarray", - "shape": "(nodes)", - "type": "integer", - }, - "ss": { - "block": "griddata", - "default": 1e-05, - "description": "is specific storage (or the storage coefficient if storagecoefficient is specified as an option). specific storage values must be greater than or equal to 0. if the csub package is included in the gwf model, specific storage must be zero for every cell.", - "layered": True, - "longname": "specific storage", - "name": "ss", - "netcdf": True, - "optional": False, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "sy": { - "block": "griddata", - "default": 0.15, - "description": "is specific yield. specific yield values must be greater than or equal to 0. specific yield does not have to be specified if there are no convertible cells (iconvert=0 in every cell).", - "layered": True, - "longname": "specific yield", - "name": "sy", - "netcdf": True, - "optional": False, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - }, - "multi": False, - "name": "gwf-sto", - "options": { - "dev_oldstorageformulation": { - "block": "options", - "description": "development option flag for old storage formulation", - "longname": "development option flag for old storage formulation", - "mf6internal": "iconf_ss", - "name": "dev_oldstorageformulation", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "dev_original_specific_storage": { - "block": "options", - "description": "flag indicating the original storage specific storage formulation should be used", - "longname": "development option for original specific storage", - "mf6internal": "iorig_ss", - "name": "dev_original_specific_storage", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "export_array_ascii": { - "block": "options", - "description": "keyword that specifies input grid arrays, which already support the layered keyword, should be written to layered ascii output files.", - "longname": "export array variables to layered ascii files.", - "mf6internal": "export_ascii", - "name": "export_array_ascii", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "export_array_netcdf": { - "block": "options", - "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", - "extended": True, - "longname": "export array variables to netcdf output files.", - "mf6internal": "export_nc", - "name": "export_array_netcdf", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "perioddata": { - "block": "options", - "description": "Contains data for the tvs package. Data can be passed as a dictionary to the tvs package with variable names as keys and package data as values. Data for the perioddata variable is also acceptable. See tvs package documentation for more information.", - "name": "perioddata", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "tvs", - "key": "tvs_filerecord", - "param": "tvs_perioddata", - "parent": "parent_package", - "val": "perioddata", - }, - "type": "record tvs6 filein tvs6_filename", - }, - "save_flows": { - "block": "options", - "description": "keyword to indicate that cell-by-cell flow terms will be written to the file specified with 'budget save file' in output control.", - "longname": "keyword to save npf flows", - "mf6internal": "ipakcb", - "name": "save_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "ss_confined_only": { - "block": "options", - "description": "keyword to indicate that compressible storage is only calculated for a convertible cell (iconvert>0) when the cell is under confined conditions (head greater than or equal to the top of the cell). this option has no effect on cells that are marked as being always confined (iconvert=0). this option is identical to the approach used to calculate storage changes under confined conditions in modflow-2005.", - "longname": "keyword to indicate specific storage only applied under confined conditions", - "name": "ss_confined_only", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "storagecoefficient": { - "block": "options", - "description": "keyword to indicate that the ss array is read as storage coefficient rather than specific storage.", - "longname": "keyword to indicate ss is read as storage coefficient", - "mf6internal": "istor_coef", - "name": "storagecoefficient", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - }, - "period": { - "steady-state": { - "block": "period", - "description": "keyword to indicate that stress period iper is steady-state. steady-state conditions will apply until the transient keyword is specified in a subsequent begin period block. if the csub package is included in the gwf model, only the first and last stress period can be steady-state.", - "longname": "steady state indicator", - "mf6internal": "steady_state", - "name": "steady-state", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "transient": { - "block": "period", - "description": "keyword to indicate that stress period iper is transient. transient conditions will apply until the steady-state keyword is specified in a subsequent begin period block.", - "longname": "transient indicator", - "name": "transient", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "transient_block": True, - }, - } + tvs_filerecord = ListTemplateGenerator(('gwf6', 'sto', 'options', 'tvs_filerecord')) + iconvert = ArrayTemplateGenerator(('gwf6', 'sto', 'griddata', 'iconvert')) + ss = ArrayTemplateGenerator(('gwf6', 'sto', 'griddata', 'ss')) + sy = ArrayTemplateGenerator(('gwf6', 'sto', 'griddata', 'sy')) + package_abbr = 'gwfsto' + _package_type = 'sto' + dfn_file_name = 'gwf-sto.dfn' + dfn = [['header'], ['block options', 'name save_flows', 'type keyword', 'reader urword', 'optional true', 'mf6internal ipakcb'], ['block options', 'name storagecoefficient', 'type keyword', 'reader urword', 'optional true', 'mf6internal istor_coef'], ['block options', 'name ss_confined_only', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name tvs_filerecord', 'type record tvs6 filein tvs6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package tvs', 'construct_data perioddata', 'parameter_name tvs_perioddata'], ['block options', 'name tvs6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name filein', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name tvs6_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false'], ['block options', 'name export_array_ascii', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_ascii'], ['block options', 'name export_array_netcdf', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_nc', 'extended true'], ['block options', 'name dev_original_specific_storage', 'type keyword', 'reader urword', 'optional true', 'mf6internal iorig_ss'], ['block options', 'name dev_oldstorageformulation', 'type keyword', 'reader urword', 'optional true', 'mf6internal iconf_ss'], ['block griddata', 'name iconvert', 'type integer', 'shape (nodes)', 'valid', 'reader readarray', 'layered true', 'netcdf true', 'optional false', 'default 0'], ['block griddata', 'name ss', 'type double precision', 'shape (nodes)', 'valid', 'reader readarray', 'layered true', 'netcdf true', 'optional false', 'default 1.e-5'], ['block griddata', 'name sy', 'type double precision', 'shape (nodes)', 'valid', 'reader readarray', 'layered true', 'netcdf true', 'optional false', 'default 0.15'], ['block period', 'name iper', 'type integer', 'block_variable true', 'in_record true', 'tagged false', 'shape', 'valid', 'reader urword', 'optional false'], ['block period', 'name steady-state', 'type keyword', 'shape', 'valid', 'reader urword', 'optional true', 'mf6internal steady_state'], ['block period', 'name transient', 'type keyword', 'shape', 'valid', 'reader urword', 'optional true']] def __init__( self, @@ -441,6 +110,7 @@ def __init__( sy=0.15, steady_state=None, transient=None, + filename=None, pname=None, **kwargs, @@ -455,31 +125,20 @@ def __init__( **kwargs, ) - self.save_flows = self.build_mfdata("save_flows", save_flows) - self.storagecoefficient = self.build_mfdata( - "storagecoefficient", storagecoefficient - ) - self.ss_confined_only = self.build_mfdata("ss_confined_only", ss_confined_only) - self._tvs_filerecord = self.build_mfdata("tvs_filerecord", None) - self._tvs_package = self.build_child_package( - "tvs", perioddata, "tvs_perioddata", self._tvs_filerecord - ) - self.export_array_ascii = self.build_mfdata( - "export_array_ascii", export_array_ascii - ) - self.export_array_netcdf = self.build_mfdata( - "export_array_netcdf", export_array_netcdf - ) - self.dev_original_specific_storage = self.build_mfdata( - "dev_original_specific_storage", dev_original_specific_storage - ) - self.dev_oldstorageformulation = self.build_mfdata( - "dev_oldstorageformulation", dev_oldstorageformulation - ) - self.iconvert = self.build_mfdata("iconvert", iconvert) - self.ss = self.build_mfdata("ss", ss) - self.sy = self.build_mfdata("sy", sy) - self.steady_state = self.build_mfdata("steady-state", steady_state) - self.transient = self.build_mfdata("transient", transient) + self.save_flows = self.build_mfdata('save_flows', save_flows) + self.storagecoefficient = self.build_mfdata('storagecoefficient', storagecoefficient) + self.ss_confined_only = self.build_mfdata('ss_confined_only', ss_confined_only) + self._tvs_filerecord = self.build_mfdata('tvs_filerecord', None) + self._tvs_package = self.build_child_package('tvs', perioddata, 'tvs_perioddata', self._tvs_filerecord) + self.export_array_ascii = self.build_mfdata('export_array_ascii', export_array_ascii) + self.export_array_netcdf = self.build_mfdata('export_array_netcdf', export_array_netcdf) + self.dev_original_specific_storage = self.build_mfdata('dev_original_specific_storage', dev_original_specific_storage) + self.dev_oldstorageformulation = self.build_mfdata('dev_oldstorageformulation', dev_oldstorageformulation) + self.iconvert = self.build_mfdata('iconvert', iconvert) + self.ss = self.build_mfdata('ss', ss) + self.sy = self.build_mfdata('sy', sy) + self.steady_state = self.build_mfdata('steady-state', steady_state) + self.transient = self.build_mfdata('transient', transient) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwfuzf.py b/flopy/mf6/modflow/mfgwfuzf.py index 82c409208d..1a762a2cd0 100644 --- a/flopy/mf6/modflow/mfgwfuzf.py +++ b/flopy/mf6/modflow/mfgwfuzf.py @@ -250,1057 +250,19 @@ class ModflowGwfuzf(MFPackage): """ - auxiliary = ArrayTemplateGenerator(("gwf6", "uzf", "options", "auxiliary")) - wc_filerecord = ListTemplateGenerator(("gwf6", "uzf", "options", "wc_filerecord")) - budget_filerecord = ListTemplateGenerator( - ("gwf6", "uzf", "options", "budget_filerecord") - ) - budgetcsv_filerecord = ListTemplateGenerator( - ("gwf6", "uzf", "options", "budgetcsv_filerecord") - ) - package_convergence_filerecord = ListTemplateGenerator( - ("gwf6", "uzf", "options", "package_convergence_filerecord") - ) - ts_filerecord = ListTemplateGenerator(("gwf6", "uzf", "options", "ts_filerecord")) - obs_filerecord = ListTemplateGenerator(("gwf6", "uzf", "options", "obs_filerecord")) - packagedata = ListTemplateGenerator(("gwf6", "uzf", "packagedata", "packagedata")) - perioddata = ListTemplateGenerator(("gwf6", "uzf", "period", "perioddata")) - package_abbr = "gwfuzf" - _package_type = "uzf" - dfn_file_name = "gwf-uzf.dfn" - dfn = [ - ["header", "multi-package", "package-type advanced-stress-package"], - [ - "block options", - "name auxiliary", - "type string", - "shape (naux)", - "reader urword", - "optional true", - ], - [ - "block options", - "name auxmultname", - "type string", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name boundnames", - "type keyword", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name print_input", - "type keyword", - "reader urword", - "optional true", - ], - [ - "block options", - "name print_flows", - "type keyword", - "reader urword", - "optional true", - ], - [ - "block options", - "name save_flows", - "type keyword", - "reader urword", - "optional true", - ], - [ - "block options", - "name wc_filerecord", - "type record water_content fileout wcfile", - "shape", - "reader urword", - "tagged true", - "optional true", - ], - [ - "block options", - "name water_content", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name wcfile", - "type string", - "preserve_case true", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - ], - [ - "block options", - "name budget_filerecord", - "type record budget fileout budgetfile", - "shape", - "reader urword", - "tagged true", - "optional true", - ], - [ - "block options", - "name budget", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name fileout", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name budgetfile", - "preserve_case true", - "type string", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - ], - [ - "block options", - "name budgetcsv_filerecord", - "type record budgetcsv fileout budgetcsvfile", - "shape", - "reader urword", - "tagged true", - "optional true", - ], - [ - "block options", - "name budgetcsv", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name budgetcsvfile", - "type string", - "preserve_case true", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - ], - [ - "block options", - "name package_convergence_filerecord", - "type record package_convergence fileout package_convergence_filename", - "shape", - "reader urword", - "tagged true", - "optional true", - ], - [ - "block options", - "name package_convergence", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name package_convergence_filename", - "type string", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - ], - [ - "block options", - "name ts_filerecord", - "type record ts6 filein ts6_filename", - "shape", - "reader urword", - "tagged true", - "optional true", - "construct_package ts", - "construct_data timeseries", - "parameter_name timeseries", - ], - [ - "block options", - "name ts6", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name filein", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name ts6_filename", - "type string", - "preserve_case true", - "in_record true", - "reader urword", - "optional false", - "tagged false", - ], - [ - "block options", - "name obs_filerecord", - "type record obs6 filein obs6_filename", - "shape", - "reader urword", - "tagged true", - "optional true", - "construct_package obs", - "construct_data observations", - "parameter_name continuous", - ], - [ - "block options", - "name obs6", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name obs6_filename", - "type string", - "preserve_case true", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block options", - "name mover", - "type keyword", - "tagged true", - "reader urword", - "optional true", - ], - [ - "block options", - "name simulate_et", - "type keyword", - "tagged true", - "reader urword", - "optional true", - ], - [ - "block options", - "name linear_gwet", - "type keyword", - "tagged true", - "reader urword", - "optional true", - ], - [ - "block options", - "name square_gwet", - "type keyword", - "tagged true", - "reader urword", - "optional true", - ], - [ - "block options", - "name simulate_gwseep", - "type keyword", - "tagged true", - "reader urword", - "optional true", - "deprecated 6.5.0", - ], - [ - "block options", - "name unsat_etwc", - "type keyword", - "tagged true", - "reader urword", - "optional true", - ], - [ - "block options", - "name unsat_etae", - "type keyword", - "tagged true", - "reader urword", - "optional true", - ], - [ - "block dimensions", - "name nuzfcells", - "type integer", - "reader urword", - "optional false", - ], - [ - "block dimensions", - "name ntrailwaves", - "type integer", - "reader urword", - "optional false", - "default 7", - ], - [ - "block dimensions", - "name nwavesets", - "type integer", - "reader urword", - "optional false", - "default 40", - ], - [ - "block packagedata", - "name packagedata", - "type recarray ifno cellid landflag ivertcon surfdep vks thtr thts thti eps boundname", - "shape (nuzfcells)", - "reader urword", - ], - [ - "block packagedata", - "name ifno", - "type integer", - "shape", - "tagged false", - "in_record true", - "reader urword", - "numeric_index true", - ], - [ - "block packagedata", - "name cellid", - "type integer", - "shape (ncelldim)", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block packagedata", - "name landflag", - "type integer", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block packagedata", - "name ivertcon", - "type integer", - "shape", - "tagged false", - "in_record true", - "reader urword", - "numeric_index true", - ], - [ - "block packagedata", - "name surfdep", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block packagedata", - "name vks", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block packagedata", - "name thtr", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block packagedata", - "name thts", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block packagedata", - "name thti", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block packagedata", - "name eps", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block packagedata", - "name boundname", - "type string", - "shape", - "tagged false", - "in_record true", - "reader urword", - "optional true", - ], - [ - "block period", - "name iper", - "type integer", - "block_variable true", - "in_record true", - "tagged false", - "shape", - "valid", - "reader urword", - "optional false", - ], - [ - "block period", - "name perioddata", - "type recarray ifno finf pet extdp extwc ha hroot rootact aux", - "shape", - "reader urword", - ], - [ - "block period", - "name ifno", - "type integer", - "shape", - "tagged false", - "in_record true", - "reader urword", - "numeric_index true", - ], - [ - "block period", - "name finf", - "type string", - "shape", - "tagged false", - "in_record true", - "time_series true", - "reader urword", - ], - [ - "block period", - "name pet", - "type string", - "shape", - "tagged false", - "in_record true", - "reader urword", - "time_series true", - ], - [ - "block period", - "name extdp", - "type string", - "shape", - "tagged false", - "in_record true", - "reader urword", - "time_series true", - ], - [ - "block period", - "name extwc", - "type string", - "shape", - "tagged false", - "in_record true", - "reader urword", - "time_series true", - ], - [ - "block period", - "name ha", - "type string", - "shape", - "tagged false", - "in_record true", - "time_series true", - "reader urword", - ], - [ - "block period", - "name hroot", - "type string", - "shape", - "tagged false", - "in_record true", - "reader urword", - "time_series true", - ], - [ - "block period", - "name rootact", - "type string", - "shape", - "tagged false", - "in_record true", - "reader urword", - "time_series true", - ], - [ - "block period", - "name aux", - "type double precision", - "in_record true", - "tagged false", - "shape (naux)", - "reader urword", - "time_series true", - "optional true", - ], - ] - spec = { - "advanced": True, - "dimensions": { - "ntrailwaves": { - "block": "dimensions", - "default": 7, - "description": "is the number of trailing waves. a recommended value of 7 can be used for ntrailwaves. this value can be increased to lower mass balance error in the unsaturated zone.", - "longname": "number of trailing waves", - "name": "ntrailwaves", - "optional": False, - "reader": "urword", - "type": "integer", - }, - "nuzfcells": { - "block": "dimensions", - "description": "is the number of uzf cells. more than one uzf cell can be assigned to a gwf cell; however, only one gwf cell can be assigned to a single uzf cell. if more than one uzf cell is assigned to a gwf cell, then an auxiliary variable should be used to reduce the surface area of the uzf cell with the auxmultname option.", - "longname": "number of uzf cells", - "name": "nuzfcells", - "optional": False, - "reader": "urword", - "type": "integer", - }, - "nwavesets": { - "block": "dimensions", - "default": 40, - "description": "is the number of wave sets. a recommended value of 40 can be used for nwavesets. this value can be increased if more waves are required to resolve variations in water content within the unsaturated zone.", - "longname": "number of wave sets", - "name": "nwavesets", - "optional": False, - "reader": "urword", - "type": "integer", - }, - }, - "fkeys": { - "obs_filerecord": { - "abbr": "obs", - "key": "obs_filerecord", - "param": "continuous", - "parent": "parent_model_or_package", - "val": "observations", - }, - "ts_filerecord": { - "abbr": "ts", - "description": "xxx", - "key": "ts_filerecord", - "param": "timeseries", - "parent": "parent_package", - "val": "timeseries", - }, - }, - "multi": True, - "name": "gwf-uzf", - "options": { - "auxiliary": { - "block": "options", - "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", - "longname": "keyword to specify aux variables", - "name": "auxiliary", - "optional": True, - "reader": "urword", - "shape": "(naux)", - "type": "string", - }, - "auxmultname": { - "block": "options", - "description": "name of auxiliary variable to be used as multiplier of gwf cell area used by uzf cell.", - "longname": "name of auxiliary variable for multiplier", - "name": "auxmultname", - "optional": True, - "reader": "urword", - "type": "string", - }, - "boundnames": { - "block": "options", - "description": "keyword to indicate that boundary names may be provided with the list of uzf cells.", - "name": "boundnames", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "budget_filerecord": { - "block": "options", - "fields": { - "budgetfile": { - "block": "options", - "description": "name of the binary output file to write budget information.", - "longname": "file keyword", - "name": "budgetfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "budget_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "budgetcsv_filerecord": { - "block": "options", - "fields": { - "budgetcsvfile": { - "block": "options", - "description": "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.", - "longname": "file keyword", - "name": "budgetcsvfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "budgetcsv_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "linear_gwet": { - "block": "options", - "description": "keyword specifying that groundwater et will be simulated using the original et formulation of modflow-2005.", - "longname": "use linear evapotranspiration", - "name": "linear_gwet", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "mover": { - "block": "options", - "description": "keyword to indicate that this instance of the uzf package can be used with the water mover (mvr) package. when the mover option is specified, additional memory is allocated within the package to store the available, provided, and received water.", - "name": "mover", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "observations": { - "block": "options", - "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", - "name": "observations", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "obs", - "key": "obs_filerecord", - "param": "continuous", - "parent": "parent_model_or_package", - "val": "observations", - }, - "type": "record obs6 filein obs6_filename", - }, - "package_convergence_filerecord": { - "block": "options", - "fields": { - "package_convergence_filename": { - "block": "options", - "description": "name of the comma spaced values output file to write package convergence information.", - "longname": "file keyword", - "name": "package_convergence_filename", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "package_convergence_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "print_flows": { - "block": "options", - "description": "keyword to indicate that the list of uzf flow rates will be printed to the listing file for every stress period time step in which 'budget print' is specified in output control. if there is no output control option and 'print_flows' is specified, then flow rates are printed for the last time step of each stress period.", - "longname": "print calculated flows to listing file", - "name": "print_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "print_input": { - "block": "options", - "description": "keyword to indicate that the list of uzf information will be written to the listing file immediately after it is read.", - "longname": "print input to listing file", - "name": "print_input", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "save_flows": { - "block": "options", - "description": "keyword to indicate that uzf flow terms will be written to the file specified with 'budget fileout' in output control.", - "longname": "save well flows to budget file", - "name": "save_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "simulate_et": { - "block": "options", - "description": "keyword specifying that et in the unsaturated (uzf) and saturated zones (gwf) will be simulated. et can be simulated in the uzf cell and not the gwf cell by omitting keywords linear_gwet and square_gwet.", - "name": "simulate_et", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "simulate_gwseep": { - "block": "options", - "deprecated": "6.5.0", - "description": "keyword specifying that groundwater discharge (gwseep) to land surface will be simulated. groundwater discharge is nonzero when groundwater head is greater than land surface. this option is no longer recommended; a better approach is to use the drain package with discharge scaling as a way to handle seepage to land surface. the drain package with discharge scaling is described in chapter 3 of the supplemental technical information.", - "longname": "activate seepage", - "name": "simulate_gwseep", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "square_gwet": { - "block": "options", - "description": "keyword specifying that groundwater et will be simulated by assuming a constant et rate for groundwater levels between land surface (top) and land surface minus the et extinction depth (top-extdp). groundwater et is smoothly reduced from the pet rate to zero over a nominal interval at top-extdp.", - "longname": "use square evapotranspiration", - "name": "square_gwet", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "timeseries": { - "block": "options", - "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", - "name": "timeseries", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "ts", - "description": "xxx", - "key": "ts_filerecord", - "param": "timeseries", - "parent": "parent_package", - "val": "timeseries", - }, - "type": "record ts6 filein ts6_filename", - }, - "unsat_etae": { - "block": "options", - "description": "keyword specifying that et in the unsaturated zone will be simulated using a capillary pressure based formulation. capillary pressure is calculated using the brooks-corey retention function.", - "longname": "use root potential", - "name": "unsat_etae", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "unsat_etwc": { - "block": "options", - "description": "keyword specifying that et in the unsaturated zone will be simulated as a function of the specified pet rate while the water content (theta) is greater than the et extinction water content (extwc).", - "longname": "use pet for theta greater than extwc", - "name": "unsat_etwc", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "wc_filerecord": { - "block": "options", - "fields": { - "wcfile": { - "block": "options", - "description": "name of the binary output file to write water content information.", - "longname": "file keyword", - "name": "wcfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "wc_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - }, - "packagedata": { - "packagedata": { - "block": "packagedata", - "item": { - "block": "packagedata", - "fields": { - "boundname": { - "block": "packagedata", - "description": "name of the UZF cell cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", - "longname": "well name", - "name": "boundname", - "optional": "true", - "reader": "urword", - "type": "string", - }, - "cellid": { - "block": "packagedata", - "description": "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 layer, row, and column. For a grid that uses the DISV input file, CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file, CELLID is the node number for the cell.", - "longname": "cell identifier", - "name": "cellid", - "reader": "urword", - "shape": "(ncelldim)", - "type": "integer", - }, - "eps": { - "block": "packagedata", - "description": "is the exponent used in the Brooks-Corey function. The Brooks-Corey function is used by UZF to calculated hydraulic conductivity under partially saturated conditions as a function of water content and the user-specified saturated hydraulic conductivity.", - "longname": "Brooks-Corey exponent", - "name": "eps", - "reader": "urword", - "type": "double precision", - }, - "ifno": { - "block": "period", - "description": "integer value that defines the feature (UZF object) number associated with the specified PERIOD data on the line.", - "longname": "UZF id number", - "name": "ifno", - "numeric_index": "true", - "reader": "urword", - "type": "integer", - }, - "ivertcon": { - "block": "packagedata", - "description": "integer value set to specify underlying UZF cell that receives water flowing to bottom of cell. If unsaturated zone flow reaches the water table before the cell bottom, then water is added to the GWF cell instead of flowing to the underlying UZF cell. A value of 0 indicates the UZF cell is not connected to an underlying UZF cell.", - "longname": "vertical connection flag", - "name": "ivertcon", - "numeric_index": "true", - "reader": "urword", - "type": "integer", - }, - "landflag": { - "block": "packagedata", - "description": "integer value set to one for land surface cells indicating that boundary conditions can be applied and data can be specified in the PERIOD block. A value of 0 specifies a non-land surface cell.", - "longname": "land flag", - "name": "landflag", - "reader": "urword", - "type": "integer", - }, - "surfdep": { - "block": "packagedata", - "description": "is the surface depression depth of the UZF cell.", - "longname": "surface depression depth", - "name": "surfdep", - "reader": "urword", - "type": "double precision", - }, - "thti": { - "block": "packagedata", - "description": "is the initial water content of the UZF cell. The value must be greater than or equal to the residual water content and less than or equal to the saturated water content.", - "longname": "initial water content", - "name": "thti", - "reader": "urword", - "type": "double precision", - }, - "thtr": { - "block": "packagedata", - "description": "is the residual (irreducible) water content of the UZF cell. This residual water is not available to plants and will not drain into underlying aquifer cells.", - "longname": "residual water content", - "name": "thtr", - "reader": "urword", - "type": "double precision", - }, - "thts": { - "block": "packagedata", - "description": "is the saturated water content of the UZF cell. The values for saturated and residual water content should be set in a manner that is consistent with the specific yield value specified in the Storage Package. The saturated water content must be greater than the residual content.", - "longname": "saturated water content", - "name": "thts", - "reader": "urword", - "type": "double precision", - }, - "vks": { - "block": "packagedata", - "description": "is the saturated vertical hydraulic conductivity of the UZF cell. This value is used with the Brooks-Corey function and the simulated water content to calculate the partially saturated hydraulic conductivity.", - "longname": "vertical saturated hydraulic conductivity", - "name": "vks", - "reader": "urword", - "type": "double precision", - }, - }, - "name": "packagedata", - "reader": "urword", - "type": "record", - }, - "name": "packagedata", - "reader": "urword", - "shape": "(nuzfcells)", - "type": "recarray", - } - }, - "period": { - "perioddata": { - "block": "period", - "item": { - "block": "period", - "fields": { - "aux": { - "block": "period", - "description": "represents the values of the auxiliary variables for each UZF. The values of auxiliary variables must be present for each UZF. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "auxiliary variables", - "name": "aux", - "optional": "true", - "reader": "urword", - "shape": "(naux)", - "time_series": "true", - "type": "double precision", - }, - "extdp": { - "block": "period", - "description": "real or character value that defines the evapotranspiration extinction depth of the UZF cell. If IVERTCON is greater than zero and EXTDP extends below the GWF cell bottom then remaining potential evapotranspiration is applied to the underlying UZF and GWF cells. EXTDP is always specified, but is only used if SIMULATE_ET is specified in the OPTIONS block. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "extinction depth", - "name": "extdp", - "reader": "urword", - "time_series": "true", - "type": "string", - }, - "extwc": { - "block": "period", - "description": "real or character value that defines the evapotranspiration extinction water content of the UZF cell. EXTWC is always specified, but is only used if SIMULATE_ET and UNSAT_ETWC are specified in the OPTIONS block. The evapotranspiration rate from the unsaturated zone will be set to zero when the calculated water content is at or less than this value. The value for EXTWC cannot be less than the residual water content, and if it is specified as being less than the residual water content it is set to the residual water content. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "extinction water content", - "name": "extwc", - "reader": "urword", - "time_series": "true", - "type": "string", - }, - "finf": { - "block": "period", - "description": "real or character value that defines the applied infiltration rate of the UZF cell ($LT^{-1}$). If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "infiltration rate", - "name": "finf", - "reader": "urword", - "time_series": "true", - "type": "string", - }, - "ha": { - "block": "period", - "description": "real or character value that defines the air entry potential (head) of the UZF cell. HA is always specified, but is only used if SIMULATE_ET and UNSAT_ETAE are specified in the OPTIONS block. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "air entry potential", - "name": "ha", - "reader": "urword", - "time_series": "true", - "type": "string", - }, - "hroot": { - "block": "period", - "description": "real or character value that defines the root potential (head) of the UZF cell. HROOT is always specified, but is only used if SIMULATE_ET and UNSAT_ETAE are specified in the OPTIONS block. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "root potential", - "name": "hroot", - "reader": "urword", - "time_series": "true", - "type": "string", - }, - "ifno": { - "block": "period", - "description": "integer value that defines the feature (UZF object) number associated with the specified PERIOD data on the line.", - "longname": "UZF id number", - "name": "ifno", - "numeric_index": "true", - "reader": "urword", - "type": "integer", - }, - "pet": { - "block": "period", - "description": "real or character value that defines the potential evapotranspiration rate of the UZF cell and specified GWF cell. Evapotranspiration is first removed from the unsaturated zone and any remaining potential evapotranspiration is applied to the saturated zone. If IVERTCON is greater than zero then residual potential evapotranspiration not satisfied in the UZF cell is applied to the underlying UZF and GWF cells. PET is always specified, but is only used if SIMULATE_ET is specified in the OPTIONS block. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "potential ET rate", - "name": "pet", - "reader": "urword", - "time_series": "true", - "type": "string", - }, - "rootact": { - "block": "period", - "description": "real or character value that defines the root activity function of the UZF cell. ROOTACT is the length of roots in a given volume of soil divided by that volume. Values range from 0 to about 3 $cm^{-2}$, depending on the plant community and its stage of development. ROOTACT is always specified, but is only used if SIMULATE_ET and UNSAT_ETAE are specified in the OPTIONS block. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "root activity function", - "name": "rootact", - "reader": "urword", - "time_series": "true", - "type": "string", - }, - }, - "name": "perioddata", - "reader": "urword", - "type": "record", - }, - "name": "perioddata", - "reader": "urword", - "type": "recarray", - }, - "transient_block": True, - }, - } + auxiliary = ArrayTemplateGenerator(('gwf6', 'uzf', 'options', 'auxiliary')) + wc_filerecord = ListTemplateGenerator(('gwf6', 'uzf', 'options', 'wc_filerecord')) + budget_filerecord = ListTemplateGenerator(('gwf6', 'uzf', 'options', 'budget_filerecord')) + budgetcsv_filerecord = ListTemplateGenerator(('gwf6', 'uzf', 'options', 'budgetcsv_filerecord')) + package_convergence_filerecord = ListTemplateGenerator(('gwf6', 'uzf', 'options', 'package_convergence_filerecord')) + ts_filerecord = ListTemplateGenerator(('gwf6', 'uzf', 'options', 'ts_filerecord')) + obs_filerecord = ListTemplateGenerator(('gwf6', 'uzf', 'options', 'obs_filerecord')) + packagedata = ListTemplateGenerator(('gwf6', 'uzf', 'packagedata', 'packagedata')) + perioddata = ListTemplateGenerator(('gwf6', 'uzf', 'period', 'perioddata')) + package_abbr = 'gwfuzf' + _package_type = 'uzf' + dfn_file_name = 'gwf-uzf.dfn' + dfn = [['header', 'multi-package', 'package-type advanced-stress-package'], ['block options', 'name auxiliary', 'type string', 'shape (naux)', 'reader urword', 'optional true'], ['block options', 'name auxmultname', 'type string', 'shape', 'reader urword', 'optional true'], ['block options', 'name boundnames', 'type keyword', 'shape', 'reader urword', 'optional true'], ['block options', 'name print_input', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name print_flows', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name save_flows', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name wc_filerecord', 'type record water_content fileout wcfile', 'shape', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name water_content', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name wcfile', 'type string', 'preserve_case true', 'shape', 'in_record true', 'reader urword', 'tagged false', 'optional false'], ['block options', 'name budget_filerecord', 'type record budget fileout budgetfile', 'shape', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name budget', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name fileout', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name budgetfile', 'preserve_case true', 'type string', 'shape', 'in_record true', 'reader urword', 'tagged false', 'optional false'], ['block options', 'name budgetcsv_filerecord', 'type record budgetcsv fileout budgetcsvfile', 'shape', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name budgetcsv', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name budgetcsvfile', 'type string', 'preserve_case true', 'shape', 'in_record true', 'reader urword', 'tagged false', 'optional false'], ['block options', 'name package_convergence_filerecord', 'type record package_convergence fileout package_convergence_filename', 'shape', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name package_convergence', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name package_convergence_filename', 'type string', 'shape', 'in_record true', 'reader urword', 'tagged false', 'optional false'], ['block options', 'name ts_filerecord', 'type record ts6 filein ts6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package ts', 'construct_data timeseries', 'parameter_name timeseries'], ['block options', 'name ts6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name filein', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name ts6_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false'], ['block options', 'name obs_filerecord', 'type record obs6 filein obs6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package obs', 'construct_data observations', 'parameter_name continuous'], ['block options', 'name obs6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name obs6_filename', 'type string', 'preserve_case true', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block options', 'name mover', 'type keyword', 'tagged true', 'reader urword', 'optional true'], ['block options', 'name simulate_et', 'type keyword', 'tagged true', 'reader urword', 'optional true'], ['block options', 'name linear_gwet', 'type keyword', 'tagged true', 'reader urword', 'optional true'], ['block options', 'name square_gwet', 'type keyword', 'tagged true', 'reader urword', 'optional true'], ['block options', 'name simulate_gwseep', 'type keyword', 'tagged true', 'reader urword', 'optional true', 'deprecated 6.5.0'], ['block options', 'name unsat_etwc', 'type keyword', 'tagged true', 'reader urword', 'optional true'], ['block options', 'name unsat_etae', 'type keyword', 'tagged true', 'reader urword', 'optional true'], ['block dimensions', 'name nuzfcells', 'type integer', 'reader urword', 'optional false'], ['block dimensions', 'name ntrailwaves', 'type integer', 'reader urword', 'optional false', 'default 7'], ['block dimensions', 'name nwavesets', 'type integer', 'reader urword', 'optional false', 'default 40'], ['block packagedata', 'name packagedata', 'type recarray ifno cellid landflag ivertcon surfdep vks thtr thts thti eps boundname', 'shape (nuzfcells)', 'reader urword'], ['block packagedata', 'name ifno', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block packagedata', 'name cellid', 'type integer', 'shape (ncelldim)', 'tagged false', 'in_record true', 'reader urword'], ['block packagedata', 'name landflag', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block packagedata', 'name ivertcon', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block packagedata', 'name surfdep', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block packagedata', 'name vks', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block packagedata', 'name thtr', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block packagedata', 'name thts', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block packagedata', 'name thti', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block packagedata', 'name eps', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block packagedata', 'name boundname', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword', 'optional true'], ['block period', 'name iper', 'type integer', 'block_variable true', 'in_record true', 'tagged false', 'shape', 'valid', 'reader urword', 'optional false'], ['block period', 'name perioddata', 'type recarray ifno finf pet extdp extwc ha hroot rootact aux', 'shape', 'reader urword'], ['block period', 'name ifno', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block period', 'name finf', 'type string', 'shape', 'tagged false', 'in_record true', 'time_series true', 'reader urword'], ['block period', 'name pet', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name extdp', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name extwc', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name ha', 'type string', 'shape', 'tagged false', 'in_record true', 'time_series true', 'reader urword'], ['block period', 'name hroot', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name rootact', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name aux', 'type double precision', 'in_record true', 'tagged false', 'shape (naux)', 'reader urword', 'time_series true', 'optional true']] def __init__( self, @@ -1330,6 +292,7 @@ def __init__( nwavesets=40, packagedata=None, perioddata=None, + filename=None, pname=None, **kwargs, @@ -1344,41 +307,32 @@ def __init__( **kwargs, ) - self.auxiliary = self.build_mfdata("auxiliary", auxiliary) - self.auxmultname = self.build_mfdata("auxmultname", auxmultname) - self.boundnames = self.build_mfdata("boundnames", boundnames) - self.print_input = self.build_mfdata("print_input", print_input) - self.print_flows = self.build_mfdata("print_flows", print_flows) - self.save_flows = self.build_mfdata("save_flows", save_flows) - self.wc_filerecord = self.build_mfdata("wc_filerecord", wc_filerecord) - self.budget_filerecord = self.build_mfdata( - "budget_filerecord", budget_filerecord - ) - self.budgetcsv_filerecord = self.build_mfdata( - "budgetcsv_filerecord", budgetcsv_filerecord - ) - self.package_convergence_filerecord = self.build_mfdata( - "package_convergence_filerecord", package_convergence_filerecord - ) - self._ts_filerecord = self.build_mfdata("ts_filerecord", None) - self._ts_package = self.build_child_package( - "ts", timeseries, "timeseries", self._ts_filerecord - ) - self._obs_filerecord = self.build_mfdata("obs_filerecord", None) - self._obs_package = self.build_child_package( - "obs", observations, "continuous", self._obs_filerecord - ) - self.mover = self.build_mfdata("mover", mover) - self.simulate_et = self.build_mfdata("simulate_et", simulate_et) - self.linear_gwet = self.build_mfdata("linear_gwet", linear_gwet) - self.square_gwet = self.build_mfdata("square_gwet", square_gwet) - self.simulate_gwseep = self.build_mfdata("simulate_gwseep", simulate_gwseep) - self.unsat_etwc = self.build_mfdata("unsat_etwc", unsat_etwc) - self.unsat_etae = self.build_mfdata("unsat_etae", unsat_etae) - self.nuzfcells = self.build_mfdata("nuzfcells", nuzfcells) - self.ntrailwaves = self.build_mfdata("ntrailwaves", ntrailwaves) - self.nwavesets = self.build_mfdata("nwavesets", nwavesets) - self.packagedata = self.build_mfdata("packagedata", packagedata) - self.perioddata = self.build_mfdata("perioddata", perioddata) + self.auxiliary = self.build_mfdata('auxiliary', auxiliary) + self.auxmultname = self.build_mfdata('auxmultname', auxmultname) + self.boundnames = self.build_mfdata('boundnames', boundnames) + self.print_input = self.build_mfdata('print_input', print_input) + self.print_flows = self.build_mfdata('print_flows', print_flows) + self.save_flows = self.build_mfdata('save_flows', save_flows) + self.wc_filerecord = self.build_mfdata('wc_filerecord', wc_filerecord) + self.budget_filerecord = self.build_mfdata('budget_filerecord', budget_filerecord) + self.budgetcsv_filerecord = self.build_mfdata('budgetcsv_filerecord', budgetcsv_filerecord) + self.package_convergence_filerecord = self.build_mfdata('package_convergence_filerecord', package_convergence_filerecord) + self._ts_filerecord = self.build_mfdata('ts_filerecord', None) + self._ts_package = self.build_child_package('ts', timeseries, 'timeseries', self._ts_filerecord) + self._obs_filerecord = self.build_mfdata('obs_filerecord', None) + self._obs_package = self.build_child_package('obs', observations, 'continuous', self._obs_filerecord) + self.mover = self.build_mfdata('mover', mover) + self.simulate_et = self.build_mfdata('simulate_et', simulate_et) + self.linear_gwet = self.build_mfdata('linear_gwet', linear_gwet) + self.square_gwet = self.build_mfdata('square_gwet', square_gwet) + self.simulate_gwseep = self.build_mfdata('simulate_gwseep', simulate_gwseep) + self.unsat_etwc = self.build_mfdata('unsat_etwc', unsat_etwc) + self.unsat_etae = self.build_mfdata('unsat_etae', unsat_etae) + self.nuzfcells = self.build_mfdata('nuzfcells', nuzfcells) + self.ntrailwaves = self.build_mfdata('ntrailwaves', ntrailwaves) + self.nwavesets = self.build_mfdata('nwavesets', nwavesets) + self.packagedata = self.build_mfdata('packagedata', packagedata) + self.perioddata = self.build_mfdata('perioddata', perioddata) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwfvsc.py b/flopy/mf6/modflow/mfgwfvsc.py index a501d09db0..7482c67141 100644 --- a/flopy/mf6/modflow/mfgwfvsc.py +++ b/flopy/mf6/modflow/mfgwfvsc.py @@ -104,324 +104,12 @@ class ModflowGwfvsc(MFPackage): """ - viscosity_filerecord = ListTemplateGenerator( - ("gwf6", "vsc", "options", "viscosity_filerecord") - ) - packagedata = ListTemplateGenerator(("gwf6", "vsc", "packagedata", "packagedata")) - package_abbr = "gwfvsc" - _package_type = "vsc" - dfn_file_name = "gwf-vsc.dfn" - dfn = [ - ["header"], - [ - "block options", - "name viscref", - "type double precision", - "reader urword", - "optional true", - "default 1.0", - ], - [ - "block options", - "name temperature_species_name", - "type string", - "shape", - "reader urword", - "optional true", - "mf6internal temp_specname", - ], - [ - "block options", - "name thermal_formulation", - "type string", - "shape", - "reader urword", - "optional true", - "valid linear nonlinear", - "mf6internal thermal_form", - ], - [ - "block options", - "name thermal_a2", - "type double precision", - "reader urword", - "optional true", - "default 10.", - ], - [ - "block options", - "name thermal_a3", - "type double precision", - "reader urword", - "optional true", - "default 248.37", - ], - [ - "block options", - "name thermal_a4", - "type double precision", - "reader urword", - "optional true", - "default 133.15", - ], - [ - "block options", - "name viscosity_filerecord", - "type record viscosity fileout viscosityfile", - "shape", - "reader urword", - "tagged true", - "optional true", - "mf6internal viscosity_fr", - ], - [ - "block options", - "name viscosity", - "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 viscosityfile", - "type string", - "preserve_case true", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - ], - [ - "block dimensions", - "name nviscspecies", - "type integer", - "reader urword", - "optional false", - ], - [ - "block packagedata", - "name packagedata", - "type recarray iviscspec dviscdc cviscref modelname auxspeciesname", - "shape (nviscspecies)", - "reader urword", - ], - [ - "block packagedata", - "name iviscspec", - "type integer", - "shape", - "tagged false", - "in_record true", - "reader urword", - "numeric_index true", - ], - [ - "block packagedata", - "name dviscdc", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block packagedata", - "name cviscref", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block packagedata", - "name modelname", - "type string", - "in_record true", - "tagged false", - "shape", - "reader urword", - ], - [ - "block packagedata", - "name auxspeciesname", - "type string", - "in_record true", - "tagged false", - "shape", - "reader urword", - ], - ] - spec = { - "advanced": False, - "dimensions": { - "nviscspecies": { - "block": "dimensions", - "description": "number of species used in the viscosity equation of state. if either concentrations or temperature (or both) are used to update viscosity then nviscspecies needs to be at least one.", - "longname": "number of species used in viscosity equation of state", - "name": "nviscspecies", - "optional": False, - "reader": "urword", - "type": "integer", - } - }, - "multi": False, - "name": "gwf-vsc", - "options": { - "temperature_species_name": { - "block": "options", - "description": "string used to identify the auxspeciesname in packagedata that corresponds to the temperature species. there can be only one occurrence of this temperature species name in the packagedata block or the program will terminate with an error. this value has no effect if viscosity does not depend on temperature.", - "longname": "auxspeciesname that corresponds to temperature", - "mf6internal": "temp_specname", - "name": "temperature_species_name", - "optional": True, - "reader": "urword", - "type": "string", - }, - "thermal_a2": { - "block": "options", - "default": 10.0, - "description": "is an empirical parameter specified by the user for calculating viscosity using a nonlinear formulation. if a2 is not specified, a default value of 10.0 is assigned (voss, 1984).", - "longname": "coefficient used in nonlinear viscosity function", - "name": "thermal_a2", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - "thermal_a3": { - "block": "options", - "default": 248.37, - "description": "is an empirical parameter specified by the user for calculating viscosity using a nonlinear formulation. if a3 is not specified, a default value of 248.37 is assigned (voss, 1984).", - "longname": "coefficient used in nonlinear viscosity function", - "name": "thermal_a3", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - "thermal_a4": { - "block": "options", - "default": 133.15, - "description": "is an empirical parameter specified by the user for calculating viscosity using a nonlinear formulation. if a4 is not specified, a default value of 133.15 is assigned (voss, 1984).", - "longname": "coefficient used in nonlinear viscosity function", - "name": "thermal_a4", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - "thermal_formulation": { - "block": "options", - "description": "may be used for specifying which viscosity formulation to use for the temperature species. can be either linear or nonlinear. the linear viscosity formulation is the default.", - "longname": "keyword to specify viscosity formulation for the temperature species", - "mf6internal": "thermal_form", - "name": "thermal_formulation", - "optional": True, - "reader": "urword", - "type": "string", - "valid": "linear nonlinear", - }, - "viscosity_filerecord": { - "block": "options", - "fields": { - "viscosityfile": { - "block": "options", - "description": "name of the binary output file to write viscosity information. The viscosity file has the same format as the head file. Viscosity values will be written to the viscosity file whenever heads are written to the binary head file. The settings for controlling head output are contained in the Output Control option.", - "longname": "file keyword", - "name": "viscosityfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "mf6internal": "viscosity_fr", - "name": "viscosity_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "viscref": { - "block": "options", - "default": 1.0, - "description": "fluid reference viscosity used in the equation of state. this value is set to 1.0 if not specified as an option.", - "longname": "reference viscosity", - "name": "viscref", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - }, - "packagedata": { - "packagedata": { - "block": "packagedata", - "item": { - "block": "packagedata", - "fields": { - "auxspeciesname": { - "block": "packagedata", - "description": "name of an auxiliary variable in a GWF stress package that will be used for this species to calculate the viscosity values. If a viscosity value is needed by the Viscosity Package then it will use the temperature or concentration values associated with this AUXSPECIESNAME in the viscosity equation of state. For advanced stress packages (LAK, SFR, MAW, and UZF) that have an associated advanced transport package (LKT, SFT, MWT, and UZT), the FLOW_PACKAGE_AUXILIARY_NAME option in the advanced transport package can be used to transfer simulated temperature or concentration(s) into the flow package auxiliary variable. In this manner, the Viscosity Package can calculate viscosity values for lakes, streams, multi-aquifer wells, and unsaturated zone flow cells using simulated concentrations.", - "longname": "auxspeciesname", - "name": "auxspeciesname", - "reader": "urword", - "type": "string", - }, - "cviscref": { - "block": "packagedata", - "description": "real value that defines the reference temperature or reference concentration value used for this species in the viscosity equation of state. If AUXSPECIESNAME entered on a line corresponds to TEMPERATURE_SPECIES_NAME (in the OPTIONS block), then CVISCREF refers to a reference temperature, otherwise it refers to a reference concentration.", - "longname": "reference temperature value or reference concentration value", - "name": "cviscref", - "reader": "urword", - "type": "double precision", - }, - "dviscdc": { - "block": "packagedata", - "description": "real value that defines the slope of the line defining the linear relationship between viscosity and temperature or between viscosity and concentration, depending on the type of species entered on each line. If the value of AUXSPECIESNAME entered on a line corresponds to TEMPERATURE_SPECIES_NAME (in the OPTIONS block), this value will be used when VISCOSITY_FUNC is equal to LINEAR (the default) in the OPTIONS block. When VISCOSITY_FUNC is set to NONLINEAR, a value for DVISCDC must be specified though it is not used.", - "longname": "slope of the line that defines the linear relationship between viscosity and temperature or between viscosity and concentration, depending on the type of species entered on each line.", - "name": "dviscdc", - "reader": "urword", - "type": "double precision", - }, - "iviscspec": { - "block": "packagedata", - "description": "integer value that defines the species number associated with the specified PACKAGEDATA data entered on each line. IVISCSPECIES must be greater than zero and less than or equal to NVISCSPECIES. Information must be specified for each of the NVISCSPECIES species or the program will terminate with an error. The program will also terminate with an error if information for a species is specified more than once.", - "longname": "species number for this entry", - "name": "iviscspec", - "numeric_index": "true", - "reader": "urword", - "type": "integer", - }, - "modelname": { - "block": "packagedata", - "description": "name of a GWT or GWE model used to simulate a species that will be used in the viscosity equation of state. This name will have no effect if the simulation does not include a GWT or GWE model that corresponds to this GWF model.", - "longname": "modelname", - "name": "modelname", - "reader": "urword", - "type": "string", - }, - }, - "name": "packagedata", - "reader": "urword", - "type": "record", - }, - "name": "packagedata", - "reader": "urword", - "shape": "(nviscspecies)", - "type": "recarray", - } - }, - } + viscosity_filerecord = ListTemplateGenerator(('gwf6', 'vsc', 'options', 'viscosity_filerecord')) + packagedata = ListTemplateGenerator(('gwf6', 'vsc', 'packagedata', 'packagedata')) + package_abbr = 'gwfvsc' + _package_type = 'vsc' + dfn_file_name = 'gwf-vsc.dfn' + dfn = [['header'], ['block options', 'name viscref', 'type double precision', 'reader urword', 'optional true', 'default 1.0'], ['block options', 'name temperature_species_name', 'type string', 'shape', 'reader urword', 'optional true', 'mf6internal temp_specname'], ['block options', 'name thermal_formulation', 'type string', 'shape', 'reader urword', 'optional true', 'valid linear nonlinear', 'mf6internal thermal_form'], ['block options', 'name thermal_a2', 'type double precision', 'reader urword', 'optional true', 'default 10.'], ['block options', 'name thermal_a3', 'type double precision', 'reader urword', 'optional true', 'default 248.37'], ['block options', 'name thermal_a4', 'type double precision', 'reader urword', 'optional true', 'default 133.15'], ['block options', 'name viscosity_filerecord', 'type record viscosity fileout viscosityfile', 'shape', 'reader urword', 'tagged true', 'optional true', 'mf6internal viscosity_fr'], ['block options', 'name viscosity', '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 viscosityfile', 'type string', 'preserve_case true', 'shape', 'in_record true', 'reader urword', 'tagged false', 'optional false'], ['block dimensions', 'name nviscspecies', 'type integer', 'reader urword', 'optional false'], ['block packagedata', 'name packagedata', 'type recarray iviscspec dviscdc cviscref modelname auxspeciesname', 'shape (nviscspecies)', 'reader urword'], ['block packagedata', 'name iviscspec', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block packagedata', 'name dviscdc', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block packagedata', 'name cviscref', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block packagedata', 'name modelname', 'type string', 'in_record true', 'tagged false', 'shape', 'reader urword'], ['block packagedata', 'name auxspeciesname', 'type string', 'in_record true', 'tagged false', 'shape', 'reader urword']] def __init__( self, @@ -436,6 +124,7 @@ def __init__( viscosity_filerecord=None, nviscspecies=None, packagedata=None, + filename=None, pname=None, **kwargs, @@ -450,20 +139,15 @@ def __init__( **kwargs, ) - self.viscref = self.build_mfdata("viscref", viscref) - self.temperature_species_name = self.build_mfdata( - "temperature_species_name", temperature_species_name - ) - self.thermal_formulation = self.build_mfdata( - "thermal_formulation", thermal_formulation - ) - self.thermal_a2 = self.build_mfdata("thermal_a2", thermal_a2) - self.thermal_a3 = self.build_mfdata("thermal_a3", thermal_a3) - self.thermal_a4 = self.build_mfdata("thermal_a4", thermal_a4) - self.viscosity_filerecord = self.build_mfdata( - "viscosity_filerecord", viscosity_filerecord - ) - self.nviscspecies = self.build_mfdata("nviscspecies", nviscspecies) - self.packagedata = self.build_mfdata("packagedata", packagedata) + self.viscref = self.build_mfdata('viscref', viscref) + self.temperature_species_name = self.build_mfdata('temperature_species_name', temperature_species_name) + self.thermal_formulation = self.build_mfdata('thermal_formulation', thermal_formulation) + self.thermal_a2 = self.build_mfdata('thermal_a2', thermal_a2) + self.thermal_a3 = self.build_mfdata('thermal_a3', thermal_a3) + self.thermal_a4 = self.build_mfdata('thermal_a4', thermal_a4) + self.viscosity_filerecord = self.build_mfdata('viscosity_filerecord', viscosity_filerecord) + self.nviscspecies = self.build_mfdata('nviscspecies', nviscspecies) + self.packagedata = self.build_mfdata('packagedata', packagedata) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwfwel.py b/flopy/mf6/modflow/mfgwfwel.py index 951e118396..6d9ae7acb1 100644 --- a/flopy/mf6/modflow/mfgwfwel.py +++ b/flopy/mf6/modflow/mfgwfwel.py @@ -125,506 +125,15 @@ class ModflowGwfwel(MFPackage): """ - auxiliary = ArrayTemplateGenerator(("gwf6", "wel", "options", "auxiliary")) - afrcsv_filerecord = ListTemplateGenerator( - ("gwf6", "wel", "options", "afrcsv_filerecord") - ) - ts_filerecord = ListTemplateGenerator(("gwf6", "wel", "options", "ts_filerecord")) - obs_filerecord = ListTemplateGenerator(("gwf6", "wel", "options", "obs_filerecord")) - stress_period_data = ListTemplateGenerator( - ("gwf6", "wel", "period", "stress_period_data") - ) - package_abbr = "gwfwel" - _package_type = "wel" - dfn_file_name = "gwf-wel.dfn" - dfn = [ - ["header", "multi-package", "package-type stress-package"], - [ - "block options", - "name auxiliary", - "type string", - "shape (naux)", - "reader urword", - "optional true", - ], - [ - "block options", - "name auxmultname", - "type string", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name boundnames", - "type keyword", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name print_input", - "type keyword", - "reader urword", - "optional true", - "mf6internal iprpak", - ], - [ - "block options", - "name print_flows", - "type keyword", - "reader urword", - "optional true", - "mf6internal iprflow", - ], - [ - "block options", - "name save_flows", - "type keyword", - "reader urword", - "optional true", - "mf6internal ipakcb", - ], - [ - "block options", - "name auto_flow_reduce", - "type double precision", - "reader urword", - "optional true", - "mf6internal flowred", - ], - [ - "block options", - "name afrcsv_filerecord", - "type record auto_flow_reduce_csv fileout afrcsvfile", - "shape", - "reader urword", - "tagged true", - "optional true", - "mf6internal afrcsv_rec", - ], - [ - "block options", - "name auto_flow_reduce_csv", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - "mf6internal afrcsv", - ], - [ - "block options", - "name fileout", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name afrcsvfile", - "type string", - "preserve_case true", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - ], - [ - "block options", - "name flow_reduction_length", - "type keyword", - "reader urword", - "optional true", - "mf6internal iflowredlen", - ], - [ - "block options", - "name ts_filerecord", - "type record ts6 filein ts6_filename", - "shape", - "reader urword", - "tagged true", - "optional true", - "construct_package ts", - "construct_data timeseries", - "parameter_name timeseries", - ], - [ - "block options", - "name ts6", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name filein", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name ts6_filename", - "type string", - "preserve_case true", - "in_record true", - "reader urword", - "optional false", - "tagged false", - ], - [ - "block options", - "name obs_filerecord", - "type record obs6 filein obs6_filename", - "shape", - "reader urword", - "tagged true", - "optional true", - "construct_package obs", - "construct_data observations", - "parameter_name continuous", - ], - [ - "block options", - "name obs6", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name obs6_filename", - "type string", - "preserve_case true", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block options", - "name mover", - "type keyword", - "tagged true", - "reader urword", - "optional true", - ], - [ - "block dimensions", - "name maxbound", - "type integer", - "reader urword", - "optional false", - ], - [ - "block period", - "name iper", - "type integer", - "block_variable true", - "in_record true", - "tagged false", - "shape", - "valid", - "reader urword", - "optional false", - ], - [ - "block period", - "name stress_period_data", - "type recarray cellid q aux boundname", - "shape (maxbound)", - "reader urword", - "mf6internal spd", - ], - [ - "block period", - "name cellid", - "type integer", - "shape (ncelldim)", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block period", - "name q", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - "time_series true", - ], - [ - "block period", - "name aux", - "type double precision", - "in_record true", - "tagged false", - "shape (naux)", - "reader urword", - "optional true", - "time_series true", - "mf6internal auxvar", - ], - [ - "block period", - "name boundname", - "type string", - "shape", - "tagged false", - "in_record true", - "reader urword", - "optional true", - ], - ] - spec = { - "advanced": False, - "dimensions": { - "maxbound": { - "block": "dimensions", - "description": "integer value specifying the maximum number of wells cells that will be specified for use during any stress period.", - "longname": "maximum number of wells", - "name": "maxbound", - "optional": False, - "reader": "urword", - "type": "integer", - } - }, - "fkeys": { - "obs_filerecord": { - "abbr": "obs", - "key": "obs_filerecord", - "param": "continuous", - "parent": "parent_model_or_package", - "val": "observations", - }, - "ts_filerecord": { - "abbr": "ts", - "description": "xxx", - "key": "ts_filerecord", - "param": "timeseries", - "parent": "parent_package", - "val": "timeseries", - }, - }, - "multi": True, - "name": "gwf-wel", - "options": { - "afrcsv_filerecord": { - "block": "options", - "fields": { - "afrcsvfile": { - "block": "options", - "description": "name of the comma-separated value (CSV) output file to write information about well extraction rates that have been reduced by the program. Entries are only written if the extraction rates are reduced.", - "longname": "file keyword", - "name": "afrcsvfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "mf6internal": "afrcsv_rec", - "name": "afrcsv_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "auto_flow_reduce": { - "block": "options", - "description": "keyword and real value that defines the fraction of the cell thickness used as an interval for smoothly adjusting negative pumping rates to 0 in cells with head values less than or equal to the bottom of the cell. negative pumping 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).", - "longname": "cell fractional thickness for reduced pumping", - "mf6internal": "flowred", - "name": "auto_flow_reduce", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - "auxiliary": { - "block": "options", - "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", - "longname": "keyword to specify aux variables", - "name": "auxiliary", - "optional": True, - "reader": "urword", - "shape": "(naux)", - "type": "string", - }, - "auxmultname": { - "block": "options", - "description": "name of auxiliary variable to be used as multiplier of well flow rate.", - "longname": "name of auxiliary variable for multiplier", - "name": "auxmultname", - "optional": True, - "reader": "urword", - "type": "string", - }, - "boundnames": { - "block": "options", - "description": "keyword to indicate that boundary names may be provided with the list of well cells.", - "name": "boundnames", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "flow_reduction_length": { - "block": "options", - "description": "keyword that indicates the auto_flow_reduce value is a length instead of a fraction of the cell thickness. a warning will be issued if the flow_reduction_length option is specified but the auto_flow_reduce option is 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.", - "longname": "flow reduction length keyword", - "mf6internal": "iflowredlen", - "name": "flow_reduction_length", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "mover": { - "block": "options", - "description": "keyword to indicate that this instance of the well package can be used with the water mover (mvr) package. when the mover option is specified, additional memory is allocated within the package to store the available, provided, and received water.", - "name": "mover", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "observations": { - "block": "options", - "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", - "name": "observations", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "obs", - "key": "obs_filerecord", - "param": "continuous", - "parent": "parent_model_or_package", - "val": "observations", - }, - "type": "record obs6 filein obs6_filename", - }, - "print_flows": { - "block": "options", - "description": "keyword to indicate that the list of well 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.", - "longname": "print calculated flows to listing file", - "mf6internal": "iprflow", - "name": "print_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "print_input": { - "block": "options", - "description": "keyword to indicate that the list of well information will be written to the listing file immediately after it is read.", - "longname": "print input to listing file", - "mf6internal": "iprpak", - "name": "print_input", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "save_flows": { - "block": "options", - "description": "keyword to indicate that well flow terms will be written to the file specified with 'budget fileout' in output control.", - "longname": "save well flows to budget file", - "mf6internal": "ipakcb", - "name": "save_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "timeseries": { - "block": "options", - "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", - "name": "timeseries", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "ts", - "description": "xxx", - "key": "ts_filerecord", - "param": "timeseries", - "parent": "parent_package", - "val": "timeseries", - }, - "type": "record ts6 filein ts6_filename", - }, - }, - "period": { - "stress_period_data": { - "block": "period", - "item": { - "block": "period", - "fields": { - "aux": { - "block": "period", - "description": "represents the values of the auxiliary variables for each well. The values of auxiliary variables must be present for each well. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "auxiliary variables", - "mf6internal": "auxvar", - "name": "aux", - "optional": "true", - "reader": "urword", - "shape": "(naux)", - "time_series": "true", - "type": "double precision", - }, - "boundname": { - "block": "period", - "description": "name of the well cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", - "longname": "well name", - "name": "boundname", - "optional": "true", - "reader": "urword", - "type": "string", - }, - "cellid": { - "block": "period", - "description": "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 layer, row, and column. For a grid that uses the DISV input file, CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file, CELLID is the node number for the cell.", - "longname": "cell identifier", - "name": "cellid", - "reader": "urword", - "shape": "(ncelldim)", - "type": "integer", - }, - "q": { - "block": "period", - "description": "is the volumetric well rate. A positive value indicates recharge (injection) and a negative value indicates discharge (extraction). If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "well rate", - "name": "q", - "reader": "urword", - "time_series": "true", - "type": "double precision", - }, - }, - "mf6internal": "spd", - "name": "stress_period_data", - "reader": "urword", - "type": "record", - }, - "mf6internal": "spd", - "name": "stress_period_data", - "reader": "urword", - "shape": "(maxbound)", - "type": "recarray", - }, - "transient_block": True, - }, - } + auxiliary = ArrayTemplateGenerator(('gwf6', 'wel', 'options', 'auxiliary')) + afrcsv_filerecord = ListTemplateGenerator(('gwf6', 'wel', 'options', 'afrcsv_filerecord')) + ts_filerecord = ListTemplateGenerator(('gwf6', 'wel', 'options', 'ts_filerecord')) + obs_filerecord = ListTemplateGenerator(('gwf6', 'wel', 'options', 'obs_filerecord')) + stress_period_data = ListTemplateGenerator(('gwf6', 'wel', 'period', 'stress_period_data')) + package_abbr = 'gwfwel' + _package_type = 'wel' + dfn_file_name = 'gwf-wel.dfn' + dfn = [['header', 'multi-package', 'package-type stress-package'], ['block options', 'name auxiliary', 'type string', 'shape (naux)', 'reader urword', 'optional true'], ['block options', 'name auxmultname', 'type string', 'shape', 'reader urword', 'optional true'], ['block options', 'name boundnames', 'type keyword', 'shape', 'reader urword', 'optional true'], ['block options', 'name print_input', 'type keyword', 'reader urword', 'optional true', 'mf6internal iprpak'], ['block options', 'name print_flows', 'type keyword', 'reader urword', 'optional true', 'mf6internal iprflow'], ['block options', 'name save_flows', 'type keyword', 'reader urword', 'optional true', 'mf6internal ipakcb'], ['block options', 'name auto_flow_reduce', 'type double precision', 'reader urword', 'optional true', 'mf6internal flowred'], ['block options', 'name afrcsv_filerecord', 'type record auto_flow_reduce_csv fileout afrcsvfile', 'shape', 'reader urword', 'tagged true', 'optional true', 'mf6internal afrcsv_rec'], ['block options', 'name auto_flow_reduce_csv', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false', 'mf6internal afrcsv'], ['block options', 'name fileout', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name afrcsvfile', 'type string', 'preserve_case true', 'shape', 'in_record true', 'reader urword', 'tagged false', 'optional false'], ['block options', 'name flow_reduction_length', 'type keyword', 'reader urword', 'optional true', 'mf6internal iflowredlen'], ['block options', 'name ts_filerecord', 'type record ts6 filein ts6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package ts', 'construct_data timeseries', 'parameter_name timeseries'], ['block options', 'name ts6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name filein', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name ts6_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false'], ['block options', 'name obs_filerecord', 'type record obs6 filein obs6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package obs', 'construct_data observations', 'parameter_name continuous'], ['block options', 'name obs6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name obs6_filename', 'type string', 'preserve_case true', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block options', 'name mover', 'type keyword', 'tagged true', 'reader urword', 'optional true'], ['block dimensions', 'name maxbound', 'type integer', 'reader urword', 'optional false'], ['block period', 'name iper', 'type integer', 'block_variable true', 'in_record true', 'tagged false', 'shape', 'valid', 'reader urword', 'optional false'], ['block period', 'name stress_period_data', 'type recarray cellid q aux boundname', 'shape (maxbound)', 'reader urword', 'mf6internal spd'], ['block period', 'name cellid', 'type integer', 'shape (ncelldim)', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name q', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name aux', 'type double precision', 'in_record true', 'tagged false', 'shape (naux)', 'reader urword', 'optional true', 'time_series true', 'mf6internal auxvar'], ['block period', 'name boundname', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword', 'optional true']] def __init__( self, @@ -644,6 +153,7 @@ def __init__( mover=None, maxbound=None, stress_period_data=None, + filename=None, pname=None, **kwargs, @@ -658,31 +168,22 @@ def __init__( **kwargs, ) - self.auxiliary = self.build_mfdata("auxiliary", auxiliary) - self.auxmultname = self.build_mfdata("auxmultname", auxmultname) - self.boundnames = self.build_mfdata("boundnames", boundnames) - self.print_input = self.build_mfdata("print_input", print_input) - self.print_flows = self.build_mfdata("print_flows", print_flows) - self.save_flows = self.build_mfdata("save_flows", save_flows) - self.auto_flow_reduce = self.build_mfdata("auto_flow_reduce", auto_flow_reduce) - self.afrcsv_filerecord = self.build_mfdata( - "afrcsv_filerecord", afrcsv_filerecord - ) - self.flow_reduction_length = self.build_mfdata( - "flow_reduction_length", flow_reduction_length - ) - self._ts_filerecord = self.build_mfdata("ts_filerecord", None) - self._ts_package = self.build_child_package( - "ts", timeseries, "timeseries", self._ts_filerecord - ) - self._obs_filerecord = self.build_mfdata("obs_filerecord", None) - self._obs_package = self.build_child_package( - "obs", observations, "continuous", self._obs_filerecord - ) - self.mover = self.build_mfdata("mover", mover) - self.maxbound = self.build_mfdata("maxbound", maxbound) - self.stress_period_data = self.build_mfdata( - "stress_period_data", stress_period_data - ) + self.auxiliary = self.build_mfdata('auxiliary', auxiliary) + self.auxmultname = self.build_mfdata('auxmultname', auxmultname) + self.boundnames = self.build_mfdata('boundnames', boundnames) + self.print_input = self.build_mfdata('print_input', print_input) + self.print_flows = self.build_mfdata('print_flows', print_flows) + self.save_flows = self.build_mfdata('save_flows', save_flows) + self.auto_flow_reduce = self.build_mfdata('auto_flow_reduce', auto_flow_reduce) + self.afrcsv_filerecord = self.build_mfdata('afrcsv_filerecord', afrcsv_filerecord) + self.flow_reduction_length = self.build_mfdata('flow_reduction_length', flow_reduction_length) + self._ts_filerecord = self.build_mfdata('ts_filerecord', None) + self._ts_package = self.build_child_package('ts', timeseries, 'timeseries', self._ts_filerecord) + self._obs_filerecord = self.build_mfdata('obs_filerecord', None) + self._obs_package = self.build_child_package('obs', observations, 'continuous', self._obs_filerecord) + self.mover = self.build_mfdata('mover', mover) + self.maxbound = self.build_mfdata('maxbound', maxbound) + self.stress_period_data = self.build_mfdata('stress_period_data', stress_period_data) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwfwelg.py b/flopy/mf6/modflow/mfgwfwelg.py index d90a891c05..e2881e08db 100644 --- a/flopy/mf6/modflow/mfgwfwelg.py +++ b/flopy/mf6/modflow/mfgwfwelg.py @@ -107,415 +107,15 @@ class ModflowGwfwelg(MFPackage): """ - auxiliary = ArrayTemplateGenerator(("gwf6", "welg", "options", "auxiliary")) - afrcsv_filerecord = ListTemplateGenerator( - ("gwf6", "welg", "options", "afrcsv_filerecord") - ) - obs_filerecord = ListTemplateGenerator( - ("gwf6", "welg", "options", "obs_filerecord") - ) - q = ArrayTemplateGenerator(("gwf6", "welg", "period", "q")) - aux = ArrayTemplateGenerator(("gwf6", "welg", "period", "aux")) - package_abbr = "gwfwelg" - _package_type = "welg" - dfn_file_name = "gwf-welg.dfn" - dfn = [ - ["header", "multi-package", "package-type stress-package"], - [ - "block options", - "name readarraygrid", - "type keyword", - "reader urword", - "optional false", - "developmode true", - "default true", - ], - [ - "block options", - "name auxiliary", - "type string", - "shape (naux)", - "reader urword", - "optional true", - ], - [ - "block options", - "name auxmultname", - "type string", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name print_input", - "type keyword", - "reader urword", - "optional true", - "mf6internal iprpak", - ], - [ - "block options", - "name print_flows", - "type keyword", - "reader urword", - "optional true", - "mf6internal iprflow", - ], - [ - "block options", - "name save_flows", - "type keyword", - "reader urword", - "optional true", - "mf6internal ipakcb", - ], - [ - "block options", - "name auto_flow_reduce", - "type double precision", - "reader urword", - "optional true", - "mf6internal flowred", - ], - [ - "block options", - "name afrcsv_filerecord", - "type record auto_flow_reduce_csv fileout afrcsvfile", - "shape", - "reader urword", - "tagged true", - "optional true", - "mf6internal afrcsv_rec", - ], - [ - "block options", - "name auto_flow_reduce_csv", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - "mf6internal afrcsv", - ], - [ - "block options", - "name fileout", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name afrcsvfile", - "type string", - "preserve_case true", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - ], - [ - "block options", - "name flow_reduction_length", - "type keyword", - "reader urword", - "optional true", - "mf6internal iflowredlen", - ], - [ - "block options", - "name obs_filerecord", - "type record obs6 filein obs6_filename", - "shape", - "reader urword", - "tagged true", - "optional true", - "construct_package obs", - "construct_data observations", - "parameter_name continuous", - ], - [ - "block options", - "name filein", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name obs6", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name obs6_filename", - "type string", - "preserve_case true", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block options", - "name mover", - "type keyword", - "tagged true", - "reader urword", - "optional true", - ], - [ - "block options", - "name export_array_netcdf", - "type keyword", - "reader urword", - "optional true", - "mf6internal export_nc", - "extended true", - ], - [ - "block dimensions", - "name maxbound", - "type integer", - "reader urword", - "optional true", - ], - [ - "block period", - "name iper", - "type integer", - "block_variable true", - "in_record true", - "tagged false", - "shape", - "valid", - "reader urword", - "optional false", - ], - [ - "block period", - "name q", - "type double precision", - "shape (nodes)", - "reader readarray", - "layered true", - "netcdf true", - "default 3.e30", - ], - [ - "block period", - "name aux", - "type double precision", - "shape (nodes)", - "reader readarray", - "layered true", - "netcdf true", - "optional true", - "mf6internal auxvar", - ], - ] - spec = { - "advanced": False, - "dimensions": { - "maxbound": { - "block": "dimensions", - "description": "integer value specifying the maximum number of wells cells that will be specified for use during any stress period.", - "longname": "maximum number of wells in any stress period", - "name": "maxbound", - "optional": True, - "reader": "urword", - "type": "integer", - } - }, - "fkeys": { - "obs_filerecord": { - "abbr": "obs", - "key": "obs_filerecord", - "param": "continuous", - "parent": "parent_model_or_package", - "val": "observations", - } - }, - "multi": True, - "name": "gwf-welg", - "options": { - "afrcsv_filerecord": { - "block": "options", - "fields": { - "afrcsvfile": { - "block": "options", - "description": "name of the comma-separated value (CSV) output file to write information about well extraction rates that have been reduced by the program. Entries are only written if the extraction rates are reduced.", - "longname": "file keyword", - "name": "afrcsvfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "mf6internal": "afrcsv_rec", - "name": "afrcsv_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "auto_flow_reduce": { - "block": "options", - "description": "keyword and real value that defines the fraction of the cell thickness used as an interval for smoothly adjusting negative pumping rates to 0 in cells with head values less than or equal to the bottom of the cell. negative pumping 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).", - "longname": "cell fractional thickness for reduced pumping", - "mf6internal": "flowred", - "name": "auto_flow_reduce", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - "auxiliary": { - "block": "options", - "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", - "longname": "keyword to specify aux variables", - "name": "auxiliary", - "optional": True, - "reader": "urword", - "shape": "(naux)", - "type": "string", - }, - "auxmultname": { - "block": "options", - "description": "name of auxiliary variable to be used as multiplier of well flow rate.", - "longname": "name of auxiliary variable for multiplier", - "name": "auxmultname", - "optional": True, - "reader": "urword", - "type": "string", - }, - "export_array_netcdf": { - "block": "options", - "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", - "extended": True, - "longname": "export array variables to netcdf output files.", - "mf6internal": "export_nc", - "name": "export_array_netcdf", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "flow_reduction_length": { - "block": "options", - "description": "keyword that indicates the auto_flow_reduce value is a length instead of a fraction of the cell thickness. a warning will be issued if the flow_reduction_length option is specified but the auto_flow_reduce option is 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.", - "longname": "flow reduction length keyword", - "mf6internal": "iflowredlen", - "name": "flow_reduction_length", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "mover": { - "block": "options", - "description": "keyword to indicate that this instance of the well package can be used with the water mover (mvr) package. when the mover option is specified, additional memory is allocated within the package to store the available, provided, and received water.", - "name": "mover", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "observations": { - "block": "options", - "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", - "name": "observations", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "obs", - "key": "obs_filerecord", - "param": "continuous", - "parent": "parent_model_or_package", - "val": "observations", - }, - "type": "record obs6 filein obs6_filename", - }, - "print_flows": { - "block": "options", - "description": "keyword to indicate that the list of well 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.", - "longname": "print calculated flows to listing file", - "mf6internal": "iprflow", - "name": "print_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "print_input": { - "block": "options", - "description": "keyword to indicate that the list of well information will be written to the listing file immediately after it is read.", - "longname": "print input to listing file", - "mf6internal": "iprpak", - "name": "print_input", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "readarraygrid": { - "block": "options", - "default": True, - "description": "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).", - "developmode": True, - "longname": "use array-based grid input", - "name": "readarraygrid", - "optional": False, - "reader": "urword", - "type": "keyword", - }, - "save_flows": { - "block": "options", - "description": "keyword to indicate that well flow terms will be written to the file specified with 'budget fileout' in output control.", - "longname": "save well flows to budget file", - "mf6internal": "ipakcb", - "name": "save_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - }, - "period": { - "aux": { - "block": "period", - "description": "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.", - "layered": True, - "longname": "well auxiliary variable iaux", - "mf6internal": "auxvar", - "name": "aux", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "q": { - "block": "period", - "default": 3e30, - "description": "is the volumetric well rate. a positive value indicates recharge (injection) and a negative value indicates discharge (extraction).", - "layered": True, - "longname": "well rate", - "name": "q", - "netcdf": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "transient_block": True, - }, - } + auxiliary = ArrayTemplateGenerator(('gwf6', 'welg', 'options', 'auxiliary')) + afrcsv_filerecord = ListTemplateGenerator(('gwf6', 'welg', 'options', 'afrcsv_filerecord')) + obs_filerecord = ListTemplateGenerator(('gwf6', 'welg', 'options', 'obs_filerecord')) + q = ArrayTemplateGenerator(('gwf6', 'welg', 'period', 'q')) + aux = ArrayTemplateGenerator(('gwf6', 'welg', 'period', 'aux')) + package_abbr = 'gwfwelg' + _package_type = 'welg' + dfn_file_name = 'gwf-welg.dfn' + dfn = [['header', 'multi-package', 'package-type stress-package'], ['block options', 'name readarraygrid', 'type keyword', 'reader urword', 'optional false', 'developmode true', 'default true'], ['block options', 'name auxiliary', 'type string', 'shape (naux)', 'reader urword', 'optional true'], ['block options', 'name auxmultname', 'type string', 'shape', 'reader urword', 'optional true'], ['block options', 'name print_input', 'type keyword', 'reader urword', 'optional true', 'mf6internal iprpak'], ['block options', 'name print_flows', 'type keyword', 'reader urword', 'optional true', 'mf6internal iprflow'], ['block options', 'name save_flows', 'type keyword', 'reader urword', 'optional true', 'mf6internal ipakcb'], ['block options', 'name auto_flow_reduce', 'type double precision', 'reader urword', 'optional true', 'mf6internal flowred'], ['block options', 'name afrcsv_filerecord', 'type record auto_flow_reduce_csv fileout afrcsvfile', 'shape', 'reader urword', 'tagged true', 'optional true', 'mf6internal afrcsv_rec'], ['block options', 'name auto_flow_reduce_csv', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false', 'mf6internal afrcsv'], ['block options', 'name fileout', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name afrcsvfile', 'type string', 'preserve_case true', 'shape', 'in_record true', 'reader urword', 'tagged false', 'optional false'], ['block options', 'name flow_reduction_length', 'type keyword', 'reader urword', 'optional true', 'mf6internal iflowredlen'], ['block options', 'name obs_filerecord', 'type record obs6 filein obs6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package obs', 'construct_data observations', 'parameter_name continuous'], ['block options', 'name filein', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name obs6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name obs6_filename', 'type string', 'preserve_case true', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block options', 'name mover', 'type keyword', 'tagged true', 'reader urword', 'optional true'], ['block options', 'name export_array_netcdf', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_nc', 'extended true'], ['block dimensions', 'name maxbound', 'type integer', 'reader urword', 'optional true'], ['block period', 'name iper', 'type integer', 'block_variable true', 'in_record true', 'tagged false', 'shape', 'valid', 'reader urword', 'optional false'], ['block period', 'name q', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true', 'default 3.e30'], ['block period', 'name aux', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true', 'optional true', 'mf6internal auxvar']] def __init__( self, @@ -533,8 +133,9 @@ def __init__( mover=None, export_array_netcdf=None, maxbound=None, - q=3e30, + q=3e+30, aux=None, + filename=None, pname=None, **kwargs, @@ -549,28 +150,21 @@ def __init__( **kwargs, ) - self.auxiliary = self.build_mfdata("auxiliary", auxiliary) - self.auxmultname = self.build_mfdata("auxmultname", auxmultname) - 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.auto_flow_reduce = self.build_mfdata("auto_flow_reduce", auto_flow_reduce) - self.afrcsv_filerecord = self.build_mfdata( - "afrcsv_filerecord", afrcsv_filerecord - ) - self.flow_reduction_length = self.build_mfdata( - "flow_reduction_length", flow_reduction_length - ) - self._obs_filerecord = self.build_mfdata("obs_filerecord", None) - self._obs_package = self.build_child_package( - "obs", observations, "continuous", self._obs_filerecord - ) - self.mover = self.build_mfdata("mover", mover) - self.export_array_netcdf = self.build_mfdata( - "export_array_netcdf", export_array_netcdf - ) - self.maxbound = self.build_mfdata("maxbound", maxbound) - self.q = self.build_mfdata("q", q) - self.aux = self.build_mfdata("aux", aux) + self.auxiliary = self.build_mfdata('auxiliary', auxiliary) + self.auxmultname = self.build_mfdata('auxmultname', auxmultname) + 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.auto_flow_reduce = self.build_mfdata('auto_flow_reduce', auto_flow_reduce) + self.afrcsv_filerecord = self.build_mfdata('afrcsv_filerecord', afrcsv_filerecord) + self.flow_reduction_length = self.build_mfdata('flow_reduction_length', flow_reduction_length) + self._obs_filerecord = self.build_mfdata('obs_filerecord', None) + self._obs_package = self.build_child_package('obs', observations, 'continuous', self._obs_filerecord) + self.mover = self.build_mfdata('mover', mover) + self.export_array_netcdf = self.build_mfdata('export_array_netcdf', export_array_netcdf) + self.maxbound = self.build_mfdata('maxbound', maxbound) + self.q = self.build_mfdata('q', q) + self.aux = self.build_mfdata('aux', aux) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwt.py b/flopy/mf6/modflow/mfgwt.py index ffea8ab81d..6f757b8beb 100644 --- a/flopy/mf6/modflow/mfgwt.py +++ b/flopy/mf6/modflow/mfgwt.py @@ -94,6 +94,7 @@ def __init__( nc_mesh2d_filerecord=None, nc_structured_filerecord=None, nc_filerecord=None, + **kwargs, ): """Initialize ModflowGwt.""" diff --git a/flopy/mf6/modflow/mfgwtadv.py b/flopy/mf6/modflow/mfgwtadv.py index a2a2288a3d..cbb7121063 100644 --- a/flopy/mf6/modflow/mfgwtadv.py +++ b/flopy/mf6/modflow/mfgwtadv.py @@ -44,53 +44,10 @@ class ModflowGwtadv(MFPackage): """ - package_abbr = "gwtadv" - _package_type = "adv" - dfn_file_name = "gwt-adv.dfn" - dfn = [ - ["header"], - [ - "block options", - "name scheme", - "type string", - "valid central upstream tvd utvd", - "reader urword", - "optional true", - ], - [ - "block options", - "name ats_percel", - "type double precision", - "reader urword", - "optional true", - ], - ] - spec = { - "advanced": False, - "multi": False, - "name": "gwt-adv", - "options": { - "ats_percel": { - "block": "options", - "description": "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 active, a time step calculation will be made for each cell based on flow through the cell and cell properties. the largest time step will be calculated such that the advective fractional cell distance (ats_percel) is not exceeded for any active cell in the grid. this time-step constraint will be submitted to the ats package, perhaps with constraints submitted by other packages, in the calculation of the time step. ats_percel must be greater than zero. if a value of zero is specified for ats_percel the program will automatically reset it to an internal no data value to indicate that time steps should not be subject to this constraint.", - "longname": "fractional cell distance used for time step calculation", - "name": "ats_percel", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - "scheme": { - "block": "options", - "description": "scheme used to solve the advection term. can be upstream, central, tvd or utvd. if not specified, upstream weighting is the default weighting scheme.", - "longname": "advective scheme", - "name": "scheme", - "optional": True, - "reader": "urword", - "type": "string", - "valid": "central upstream tvd utvd", - }, - }, - } + package_abbr = 'gwtadv' + _package_type = 'adv' + dfn_file_name = 'gwt-adv.dfn' + dfn = [['header'], ['block options', 'name scheme', 'type string', 'valid central upstream tvd utvd', 'reader urword', 'optional true'], ['block options', 'name ats_percel', 'type double precision', 'reader urword', 'optional true']] def __init__( self, @@ -98,6 +55,7 @@ def __init__( loading_package=False, scheme=None, ats_percel=None, + filename=None, pname=None, **kwargs, @@ -112,7 +70,8 @@ def __init__( **kwargs, ) - self.scheme = self.build_mfdata("scheme", scheme) - self.ats_percel = self.build_mfdata("ats_percel", ats_percel) + self.scheme = self.build_mfdata('scheme', scheme) + self.ats_percel = self.build_mfdata('ats_percel', ats_percel) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwtapi.py b/flopy/mf6/modflow/mfgwtapi.py index d7d6bc320d..900e2cc173 100644 --- a/flopy/mf6/modflow/mfgwtapi.py +++ b/flopy/mf6/modflow/mfgwtapi.py @@ -57,190 +57,11 @@ class ModflowGwtapi(MFPackage): """ - obs_filerecord = ListTemplateGenerator(("gwt6", "api", "options", "obs_filerecord")) - package_abbr = "gwtapi" - _package_type = "api" - dfn_file_name = "gwt-api.dfn" - dfn = [ - ["header", "multi-package"], - [ - "block options", - "name boundnames", - "type keyword", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name print_input", - "type keyword", - "reader urword", - "optional true", - "mf6internal iprpak", - ], - [ - "block options", - "name print_flows", - "type keyword", - "reader urword", - "optional true", - "mf6internal iprflow", - ], - [ - "block options", - "name save_flows", - "type keyword", - "reader urword", - "optional true", - "mf6internal ipakcb", - ], - [ - "block options", - "name obs_filerecord", - "type record obs6 filein obs6_filename", - "shape", - "reader urword", - "tagged true", - "optional true", - "construct_package obs", - "construct_data observations", - "parameter_name continuous", - ], - [ - "block options", - "name obs6", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name filein", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name obs6_filename", - "type string", - "preserve_case true", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block options", - "name mover", - "type keyword", - "tagged true", - "reader urword", - "optional true", - ], - [ - "block dimensions", - "name maxbound", - "type integer", - "reader urword", - "optional false", - ], - ] - spec = { - "advanced": False, - "dimensions": { - "maxbound": { - "block": "dimensions", - "description": "integer value specifying the maximum number of api boundary cells that will be specified for use during any stress period.", - "longname": "maximum number of user-defined api boundaries", - "name": "maxbound", - "optional": False, - "reader": "urword", - "type": "integer", - } - }, - "fkeys": { - "obs_filerecord": { - "abbr": "obs", - "key": "obs_filerecord", - "param": "continuous", - "parent": "parent_model_or_package", - "val": "observations", - } - }, - "multi": True, - "name": "gwt-api", - "options": { - "boundnames": { - "block": "options", - "description": "keyword to indicate that boundary names may be provided with the list of api boundary cells.", - "name": "boundnames", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "mover": { - "block": "options", - "description": "keyword to indicate that this instance of the api boundary package can be used with the water mover (mvr) package. when the mover option is specified, additional memory is allocated within the package to store the available, provided, and received water.", - "name": "mover", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "observations": { - "block": "options", - "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", - "name": "observations", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "obs", - "key": "obs_filerecord", - "param": "continuous", - "parent": "parent_model_or_package", - "val": "observations", - }, - "type": "record obs6 filein obs6_filename", - }, - "print_flows": { - "block": "options", - "description": "keyword to indicate that the list of api boundary 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.", - "longname": "print calculated flows to listing file", - "mf6internal": "iprflow", - "name": "print_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "print_input": { - "block": "options", - "description": "keyword to indicate that the list of api boundary information will be written to the listing file immediately after it is read.", - "longname": "print input to listing file", - "mf6internal": "iprpak", - "name": "print_input", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "save_flows": { - "block": "options", - "description": "keyword to indicate that api boundary flow terms will be written to the file specified with 'budget fileout' in output control.", - "longname": "save api flows to budget file", - "mf6internal": "ipakcb", - "name": "save_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - }, - } + obs_filerecord = ListTemplateGenerator(('gwt6', 'api', 'options', 'obs_filerecord')) + package_abbr = 'gwtapi' + _package_type = 'api' + dfn_file_name = 'gwt-api.dfn' + dfn = [['header', 'multi-package'], ['block options', 'name boundnames', 'type keyword', 'shape', 'reader urword', 'optional true'], ['block options', 'name print_input', 'type keyword', 'reader urword', 'optional true', 'mf6internal iprpak'], ['block options', 'name print_flows', 'type keyword', 'reader urword', 'optional true', 'mf6internal iprflow'], ['block options', 'name save_flows', 'type keyword', 'reader urword', 'optional true', 'mf6internal ipakcb'], ['block options', 'name obs_filerecord', 'type record obs6 filein obs6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package obs', 'construct_data observations', 'parameter_name continuous'], ['block options', 'name obs6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name filein', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name obs6_filename', 'type string', 'preserve_case true', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block options', 'name mover', 'type keyword', 'tagged true', 'reader urword', 'optional true'], ['block dimensions', 'name maxbound', 'type integer', 'reader urword', 'optional false']] def __init__( self, @@ -253,6 +74,7 @@ def __init__( observations=None, mover=None, maxbound=None, + filename=None, pname=None, **kwargs, @@ -267,15 +89,14 @@ def __init__( **kwargs, ) - self.boundnames = self.build_mfdata("boundnames", boundnames) - self.print_input = self.build_mfdata("print_input", print_input) - self.print_flows = self.build_mfdata("print_flows", print_flows) - self.save_flows = self.build_mfdata("save_flows", save_flows) - self._obs_filerecord = self.build_mfdata("obs_filerecord", None) - self._obs_package = self.build_child_package( - "obs", observations, "continuous", self._obs_filerecord - ) - self.mover = self.build_mfdata("mover", mover) - self.maxbound = self.build_mfdata("maxbound", maxbound) + self.boundnames = self.build_mfdata('boundnames', boundnames) + self.print_input = self.build_mfdata('print_input', print_input) + self.print_flows = self.build_mfdata('print_flows', print_flows) + self.save_flows = self.build_mfdata('save_flows', save_flows) + self._obs_filerecord = self.build_mfdata('obs_filerecord', None) + self._obs_package = self.build_child_package('obs', observations, 'continuous', self._obs_filerecord) + self.mover = self.build_mfdata('mover', mover) + self.maxbound = self.build_mfdata('maxbound', maxbound) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwtcnc.py b/flopy/mf6/modflow/mfgwtcnc.py index 2a8c080e21..bf4423829c 100644 --- a/flopy/mf6/modflow/mfgwtcnc.py +++ b/flopy/mf6/modflow/mfgwtcnc.py @@ -95,392 +95,14 @@ class ModflowGwtcnc(MFPackage): """ - auxiliary = ArrayTemplateGenerator(("gwt6", "cnc", "options", "auxiliary")) - ts_filerecord = ListTemplateGenerator(("gwt6", "cnc", "options", "ts_filerecord")) - obs_filerecord = ListTemplateGenerator(("gwt6", "cnc", "options", "obs_filerecord")) - stress_period_data = ListTemplateGenerator( - ("gwt6", "cnc", "period", "stress_period_data") - ) - package_abbr = "gwtcnc" - _package_type = "cnc" - dfn_file_name = "gwt-cnc.dfn" - dfn = [ - ["header", "multi-package"], - [ - "block options", - "name auxiliary", - "type string", - "shape (naux)", - "reader urword", - "optional true", - ], - [ - "block options", - "name auxmultname", - "type string", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name boundnames", - "type keyword", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name print_input", - "type keyword", - "reader urword", - "optional true", - "mf6internal iprflow", - ], - [ - "block options", - "name print_flows", - "type keyword", - "reader urword", - "optional true", - "mf6internal ipakcb", - ], - [ - "block options", - "name save_flows", - "type keyword", - "reader urword", - "optional true", - "mf6internal iprpak", - ], - [ - "block options", - "name ts_filerecord", - "type record ts6 filein ts6_filename", - "shape", - "reader urword", - "tagged true", - "optional true", - "construct_package ts", - "construct_data timeseries", - "parameter_name timeseries", - ], - [ - "block options", - "name ts6", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name filein", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name ts6_filename", - "type string", - "preserve_case true", - "in_record true", - "reader urword", - "optional false", - "tagged false", - ], - [ - "block options", - "name obs_filerecord", - "type record obs6 filein obs6_filename", - "shape", - "reader urword", - "tagged true", - "optional true", - "construct_package obs", - "construct_data observations", - "parameter_name continuous", - ], - [ - "block options", - "name obs6", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name obs6_filename", - "type string", - "preserve_case true", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block dimensions", - "name maxbound", - "type integer", - "reader urword", - "optional false", - ], - [ - "block period", - "name iper", - "type integer", - "block_variable true", - "in_record true", - "tagged false", - "shape", - "valid", - "reader urword", - "optional false", - ], - [ - "block period", - "name stress_period_data", - "type recarray cellid conc aux boundname", - "shape (maxbound)", - "reader urword", - "mf6internal spd", - ], - [ - "block period", - "name cellid", - "type integer", - "shape (ncelldim)", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block period", - "name conc", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - "time_series true", - "mf6internal tspvar", - ], - [ - "block period", - "name aux", - "type double precision", - "in_record true", - "tagged false", - "shape (naux)", - "reader urword", - "optional true", - "time_series true", - "mf6internal auxvar", - ], - [ - "block period", - "name boundname", - "type string", - "shape", - "tagged false", - "in_record true", - "reader urword", - "optional true", - ], - ] - spec = { - "advanced": False, - "dimensions": { - "maxbound": { - "block": "dimensions", - "description": "integer value specifying the maximum number of constant concentrations cells that will be specified for use during any stress period.", - "longname": "maximum number of constant concentrations", - "name": "maxbound", - "optional": False, - "reader": "urword", - "type": "integer", - } - }, - "fkeys": { - "obs_filerecord": { - "abbr": "obs", - "key": "obs_filerecord", - "param": "continuous", - "parent": "parent_model_or_package", - "val": "observations", - }, - "ts_filerecord": { - "abbr": "ts", - "description": "xxx", - "key": "ts_filerecord", - "param": "timeseries", - "parent": "parent_package", - "val": "timeseries", - }, - }, - "multi": True, - "name": "gwt-cnc", - "options": { - "auxiliary": { - "block": "options", - "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", - "longname": "keyword to specify aux variables", - "name": "auxiliary", - "optional": True, - "reader": "urword", - "shape": "(naux)", - "type": "string", - }, - "auxmultname": { - "block": "options", - "description": "name of auxiliary variable to be used as multiplier of concentration value.", - "longname": "name of auxiliary variable for multiplier", - "name": "auxmultname", - "optional": True, - "reader": "urword", - "type": "string", - }, - "boundnames": { - "block": "options", - "description": "keyword to indicate that boundary names may be provided with the list of constant concentration cells.", - "name": "boundnames", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "observations": { - "block": "options", - "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", - "name": "observations", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "obs", - "key": "obs_filerecord", - "param": "continuous", - "parent": "parent_model_or_package", - "val": "observations", - }, - "type": "record obs6 filein obs6_filename", - }, - "print_flows": { - "block": "options", - "description": "keyword to indicate that the list of constant concentration 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.", - "longname": "print calculated flows to listing file", - "mf6internal": "ipakcb", - "name": "print_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "print_input": { - "block": "options", - "description": "keyword to indicate that the list of constant concentration information will be written to the listing file immediately after it is read.", - "longname": "print input to listing file", - "mf6internal": "iprflow", - "name": "print_input", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "save_flows": { - "block": "options", - "description": "keyword to indicate that constant concentration flow terms will be written to the file specified with 'budget fileout' in output control.", - "longname": "save constant concentration flows to budget file", - "mf6internal": "iprpak", - "name": "save_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "timeseries": { - "block": "options", - "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", - "name": "timeseries", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "ts", - "description": "xxx", - "key": "ts_filerecord", - "param": "timeseries", - "parent": "parent_package", - "val": "timeseries", - }, - "type": "record ts6 filein ts6_filename", - }, - }, - "period": { - "stress_period_data": { - "block": "period", - "item": { - "block": "period", - "fields": { - "aux": { - "block": "period", - "description": "represents the values of the auxiliary variables for each constant concentration. The values of auxiliary variables must be present for each constant concentration. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "auxiliary variables", - "mf6internal": "auxvar", - "name": "aux", - "optional": "true", - "reader": "urword", - "shape": "(naux)", - "time_series": "true", - "type": "double precision", - }, - "boundname": { - "block": "period", - "description": "name of the constant concentration cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", - "longname": "constant concentration name", - "name": "boundname", - "optional": "true", - "reader": "urword", - "type": "string", - }, - "cellid": { - "block": "period", - "description": "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 layer, row, and column. For a grid that uses the DISV input file, CELLID is the layer and CELL2D number. If the model uses the unstructured discretization (DISU) input file, CELLID is the node number for the cell.", - "longname": "cell identifier", - "name": "cellid", - "reader": "urword", - "shape": "(ncelldim)", - "type": "integer", - }, - "conc": { - "block": "period", - "description": "is the constant concentration value. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "constant concentration value", - "mf6internal": "tspvar", - "name": "conc", - "reader": "urword", - "time_series": "true", - "type": "double precision", - }, - }, - "mf6internal": "spd", - "name": "stress_period_data", - "reader": "urword", - "type": "record", - }, - "mf6internal": "spd", - "name": "stress_period_data", - "reader": "urword", - "shape": "(maxbound)", - "type": "recarray", - }, - "transient_block": True, - }, - } + auxiliary = ArrayTemplateGenerator(('gwt6', 'cnc', 'options', 'auxiliary')) + ts_filerecord = ListTemplateGenerator(('gwt6', 'cnc', 'options', 'ts_filerecord')) + obs_filerecord = ListTemplateGenerator(('gwt6', 'cnc', 'options', 'obs_filerecord')) + stress_period_data = ListTemplateGenerator(('gwt6', 'cnc', 'period', 'stress_period_data')) + package_abbr = 'gwtcnc' + _package_type = 'cnc' + dfn_file_name = 'gwt-cnc.dfn' + dfn = [['header', 'multi-package'], ['block options', 'name auxiliary', 'type string', 'shape (naux)', 'reader urword', 'optional true'], ['block options', 'name auxmultname', 'type string', 'shape', 'reader urword', 'optional true'], ['block options', 'name boundnames', 'type keyword', 'shape', 'reader urword', 'optional true'], ['block options', 'name print_input', 'type keyword', 'reader urword', 'optional true', 'mf6internal iprflow'], ['block options', 'name print_flows', 'type keyword', 'reader urword', 'optional true', 'mf6internal ipakcb'], ['block options', 'name save_flows', 'type keyword', 'reader urword', 'optional true', 'mf6internal iprpak'], ['block options', 'name ts_filerecord', 'type record ts6 filein ts6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package ts', 'construct_data timeseries', 'parameter_name timeseries'], ['block options', 'name ts6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name filein', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name ts6_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false'], ['block options', 'name obs_filerecord', 'type record obs6 filein obs6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package obs', 'construct_data observations', 'parameter_name continuous'], ['block options', 'name obs6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name obs6_filename', 'type string', 'preserve_case true', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block dimensions', 'name maxbound', 'type integer', 'reader urword', 'optional false'], ['block period', 'name iper', 'type integer', 'block_variable true', 'in_record true', 'tagged false', 'shape', 'valid', 'reader urword', 'optional false'], ['block period', 'name stress_period_data', 'type recarray cellid conc aux boundname', 'shape (maxbound)', 'reader urword', 'mf6internal spd'], ['block period', 'name cellid', 'type integer', 'shape (ncelldim)', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name conc', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword', 'time_series true', 'mf6internal tspvar'], ['block period', 'name aux', 'type double precision', 'in_record true', 'tagged false', 'shape (naux)', 'reader urword', 'optional true', 'time_series true', 'mf6internal auxvar'], ['block period', 'name boundname', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword', 'optional true']] def __init__( self, @@ -496,6 +118,7 @@ def __init__( observations=None, maxbound=None, stress_period_data=None, + filename=None, pname=None, **kwargs, @@ -510,23 +133,18 @@ def __init__( **kwargs, ) - self.auxiliary = self.build_mfdata("auxiliary", auxiliary) - self.auxmultname = self.build_mfdata("auxmultname", auxmultname) - self.boundnames = self.build_mfdata("boundnames", boundnames) - self.print_input = self.build_mfdata("print_input", print_input) - self.print_flows = self.build_mfdata("print_flows", print_flows) - self.save_flows = self.build_mfdata("save_flows", save_flows) - self._ts_filerecord = self.build_mfdata("ts_filerecord", None) - self._ts_package = self.build_child_package( - "ts", timeseries, "timeseries", self._ts_filerecord - ) - self._obs_filerecord = self.build_mfdata("obs_filerecord", None) - self._obs_package = self.build_child_package( - "obs", observations, "continuous", self._obs_filerecord - ) - self.maxbound = self.build_mfdata("maxbound", maxbound) - self.stress_period_data = self.build_mfdata( - "stress_period_data", stress_period_data - ) + self.auxiliary = self.build_mfdata('auxiliary', auxiliary) + self.auxmultname = self.build_mfdata('auxmultname', auxmultname) + self.boundnames = self.build_mfdata('boundnames', boundnames) + self.print_input = self.build_mfdata('print_input', print_input) + self.print_flows = self.build_mfdata('print_flows', print_flows) + self.save_flows = self.build_mfdata('save_flows', save_flows) + self._ts_filerecord = self.build_mfdata('ts_filerecord', None) + self._ts_package = self.build_child_package('ts', timeseries, 'timeseries', self._ts_filerecord) + self._obs_filerecord = self.build_mfdata('obs_filerecord', None) + self._obs_package = self.build_child_package('obs', observations, 'continuous', self._obs_filerecord) + self.maxbound = self.build_mfdata('maxbound', maxbound) + self.stress_period_data = self.build_mfdata('stress_period_data', stress_period_data) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwtdis.py b/flopy/mf6/modflow/mfgwtdis.py index f824ca1f5a..6e20580e0c 100644 --- a/flopy/mf6/modflow/mfgwtdis.py +++ b/flopy/mf6/modflow/mfgwtdis.py @@ -94,446 +94,17 @@ class ModflowGwtdis(MFPackage): """ - grb_filerecord = ListTemplateGenerator(("gwt6", "dis", "options", "grb_filerecord")) - ncf_filerecord = ListTemplateGenerator(("gwt6", "dis", "options", "ncf_filerecord")) - delr = ArrayTemplateGenerator(("gwt6", "dis", "griddata", "delr")) - delc = ArrayTemplateGenerator(("gwt6", "dis", "griddata", "delc")) - top = ArrayTemplateGenerator(("gwt6", "dis", "griddata", "top")) - botm = ArrayTemplateGenerator(("gwt6", "dis", "griddata", "botm")) - idomain = ArrayTemplateGenerator(("gwt6", "dis", "griddata", "idomain")) - package_abbr = "gwtdis" - _package_type = "dis" - dfn_file_name = "gwt-dis.dfn" - dfn = [ - ["header"], - [ - "block options", - "name length_units", - "type string", - "reader urword", - "optional true", - ], - [ - "block options", - "name nogrb", - "type keyword", - "reader urword", - "optional true", - ], - [ - "block options", - "name grb_filerecord", - "type record grb6 fileout grb6_filename", - "reader urword", - "tagged true", - "optional true", - ], - [ - "block options", - "name grb6", - "type keyword", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name fileout", - "type keyword", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name grb6_filename", - "type string", - "preserve_case true", - "in_record true", - "reader urword", - "optional false", - "tagged false", - ], - [ - "block options", - "name xorigin", - "type double precision", - "reader urword", - "optional true", - ], - [ - "block options", - "name yorigin", - "type double precision", - "reader urword", - "optional true", - ], - [ - "block options", - "name angrot", - "type double precision", - "reader urword", - "optional true", - ], - [ - "block options", - "name export_array_ascii", - "type keyword", - "reader urword", - "optional true", - "mf6internal export_ascii", - ], - [ - "block options", - "name export_array_netcdf", - "type keyword", - "reader urword", - "optional true", - "mf6internal export_nc", - "extended true", - ], - [ - "block options", - "name crs", - "type string", - "shape lenbigline", - "preserve_case true", - "reader urword", - "optional true", - "developmode true", - ], - [ - "block options", - "name ncf_filerecord", - "type record ncf6 filein ncf6_filename", - "reader urword", - "tagged true", - "optional true", - "construct_package ncf", - "construct_data packagedata", - "parameter_name packagedata", - ], - [ - "block options", - "name ncf6", - "type keyword", - "in_record true", - "reader urword", - "tagged true", - "optional false", - "extended true", - ], - [ - "block options", - "name filein", - "type keyword", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name ncf6_filename", - "type string", - "preserve_case true", - "in_record true", - "reader urword", - "optional false", - "tagged false", - "extended true", - ], - [ - "block dimensions", - "name nlay", - "type integer", - "reader urword", - "optional false", - "default 1", - ], - [ - "block dimensions", - "name nrow", - "type integer", - "reader urword", - "optional false", - "default 2", - ], - [ - "block dimensions", - "name ncol", - "type integer", - "reader urword", - "optional false", - "default 2", - ], - [ - "block griddata", - "name delr", - "type double precision", - "shape (ncol)", - "reader readarray", - "netcdf true", - "default 1.0", - ], - [ - "block griddata", - "name delc", - "type double precision", - "shape (nrow)", - "reader readarray", - "netcdf true", - "default 1.0", - ], - [ - "block griddata", - "name top", - "type double precision", - "shape (ncol, nrow)", - "reader readarray", - "netcdf true", - "default 1.0", - ], - [ - "block griddata", - "name botm", - "type double precision", - "shape (ncol, nrow, nlay)", - "reader readarray", - "netcdf true", - "layered true", - "default 0.", - ], - [ - "block griddata", - "name idomain", - "type integer", - "shape (ncol, nrow, nlay)", - "reader readarray", - "layered true", - "netcdf true", - "optional true", - ], - ] - spec = { - "advanced": False, - "dimensions": { - "ncol": { - "block": "dimensions", - "default": 2, - "description": "is the number of columns in the model grid.", - "longname": "number of columns", - "name": "ncol", - "optional": False, - "reader": "urword", - "type": "integer", - }, - "nlay": { - "block": "dimensions", - "default": 1, - "description": "is the number of layers in the model grid.", - "longname": "number of layers", - "name": "nlay", - "optional": False, - "reader": "urword", - "type": "integer", - }, - "nrow": { - "block": "dimensions", - "default": 2, - "description": "is the number of rows in the model grid.", - "longname": "number of rows", - "name": "nrow", - "optional": False, - "reader": "urword", - "type": "integer", - }, - }, - "fkeys": { - "ncf_filerecord": { - "abbr": "ncf", - "key": "ncf_filerecord", - "param": "packagedata", - "parent": "parent_package", - "val": "packagedata", - } - }, - "griddata": { - "botm": { - "block": "griddata", - "default": 0.0, - "description": "is the bottom elevation for each cell.", - "layered": True, - "longname": "cell bottom elevation", - "name": "botm", - "netcdf": True, - "reader": "readarray", - "shape": "(ncol, nrow, nlay)", - "type": "double precision", - }, - "delc": { - "block": "griddata", - "default": 1.0, - "description": "is the row spacing in the column direction.", - "longname": "spacing along a column", - "name": "delc", - "netcdf": True, - "reader": "readarray", - "shape": "(nrow)", - "type": "double precision", - }, - "delr": { - "block": "griddata", - "default": 1.0, - "description": "is the column spacing in the row direction.", - "longname": "spacing along a row", - "name": "delr", - "netcdf": True, - "reader": "readarray", - "shape": "(ncol)", - "type": "double precision", - }, - "idomain": { - "block": "griddata", - "description": "is an optional array that characterizes the existence status of a cell. if the idomain array is not specified, then all model cells exist within the solution. if the idomain value for a cell is 0, the cell does not exist in the simulation. input and output values will be read and written for the cell, but internal to the program, the cell is excluded from the solution. if the idomain value for a cell is 1, the cell exists in the simulation. if the idomain value for a cell is -1, the cell does not exist in the simulation. furthermore, the first existing cell above will be connected to the first existing cell below. this type of cell is referred to as a 'vertical pass through' cell.", - "layered": True, - "longname": "idomain existence array", - "name": "idomain", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(ncol, nrow, nlay)", - "type": "integer", - }, - "top": { - "block": "griddata", - "default": 1.0, - "description": "is the top elevation for each cell in the top model layer.", - "longname": "cell top elevation", - "name": "top", - "netcdf": True, - "reader": "readarray", - "shape": "(ncol, nrow)", - "type": "double precision", - }, - }, - "multi": False, - "name": "gwt-dis", - "options": { - "angrot": { - "block": "options", - "description": "counter-clockwise rotation angle (in degrees) of the lower-left corner of the model grid. if not specified, then a default value of 0.0 is assigned. the value for angrot does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", - "longname": "rotation angle", - "name": "angrot", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - "crs": { - "block": "options", - "description": "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.", - "developmode": True, - "longname": "crs user input string", - "name": "crs", - "optional": True, - "reader": "urword", - "shape": "lenbigline", - "type": "string", - }, - "export_array_ascii": { - "block": "options", - "description": "keyword that specifies input griddata arrays should be written to layered ascii output files.", - "longname": "export array variables to layered ascii files.", - "mf6internal": "export_ascii", - "name": "export_array_ascii", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "export_array_netcdf": { - "block": "options", - "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", - "extended": True, - "longname": "export array variables to netcdf output files.", - "mf6internal": "export_nc", - "name": "export_array_netcdf", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "grb_filerecord": { - "block": "options", - "fields": { - "grb6_filename": { - "block": "options", - "description": "defines a binary grid output file. If this option is not provided, the output file will have the same name as the discretization input file, plus extension '.grb'.", - "longname": "file name of GRB information", - "name": "grb6_filename", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "grb_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "length_units": { - "block": "options", - "description": "is the length units used for this model. values can be 'feet', 'meters', or 'centimeters'. if not specified, the default is 'unknown'.", - "longname": "model length units", - "name": "length_units", - "optional": True, - "reader": "urword", - "type": "string", - }, - "nogrb": { - "block": "options", - "description": "keyword to deactivate writing of the binary grid file.", - "longname": "do not write binary grid file", - "name": "nogrb", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "packagedata": { - "block": "options", - "description": "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 the packagedata variable is also acceptable. See ncf package documentation for more information.", - "name": "packagedata", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "ncf", - "key": "ncf_filerecord", - "param": "packagedata", - "parent": "parent_package", - "val": "packagedata", - }, - "type": "record ncf6 filein ncf6_filename", - }, - "xorigin": { - "block": "options", - "description": "x-position of the lower-left corner of the model grid. a default value of zero is assigned if not specified. the value for xorigin does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", - "longname": "x-position of the model grid origin", - "name": "xorigin", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - "yorigin": { - "block": "options", - "description": "y-position of the lower-left corner of the model grid. if not specified, then a default value equal to zero is used. the value for yorigin does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", - "longname": "y-position of the model grid origin", - "name": "yorigin", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - }, - } + grb_filerecord = ListTemplateGenerator(('gwt6', 'dis', 'options', 'grb_filerecord')) + ncf_filerecord = ListTemplateGenerator(('gwt6', 'dis', 'options', 'ncf_filerecord')) + delr = ArrayTemplateGenerator(('gwt6', 'dis', 'griddata', 'delr')) + delc = ArrayTemplateGenerator(('gwt6', 'dis', 'griddata', 'delc')) + top = ArrayTemplateGenerator(('gwt6', 'dis', 'griddata', 'top')) + botm = ArrayTemplateGenerator(('gwt6', 'dis', 'griddata', 'botm')) + idomain = ArrayTemplateGenerator(('gwt6', 'dis', 'griddata', 'idomain')) + package_abbr = 'gwtdis' + _package_type = 'dis' + dfn_file_name = 'gwt-dis.dfn' + dfn = [['header'], ['block options', 'name length_units', 'type string', 'reader urword', 'optional true'], ['block options', 'name nogrb', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name grb_filerecord', 'type record grb6 fileout grb6_filename', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name grb6', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name fileout', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name grb6_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false'], ['block options', 'name xorigin', 'type double precision', 'reader urword', 'optional true'], ['block options', 'name yorigin', 'type double precision', 'reader urword', 'optional true'], ['block options', 'name angrot', 'type double precision', 'reader urword', 'optional true'], ['block options', 'name export_array_ascii', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_ascii'], ['block options', 'name export_array_netcdf', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_nc', 'extended true'], ['block options', 'name crs', 'type string', 'shape lenbigline', 'preserve_case true', 'reader urword', 'optional true', 'developmode true'], ['block options', 'name ncf_filerecord', 'type record ncf6 filein ncf6_filename', 'reader urword', 'tagged true', 'optional true', 'construct_package ncf', 'construct_data packagedata', 'parameter_name packagedata'], ['block options', 'name ncf6', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false', 'extended true'], ['block options', 'name filein', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name ncf6_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false', 'extended true'], ['block dimensions', 'name nlay', 'type integer', 'reader urword', 'optional false', 'default 1'], ['block dimensions', 'name nrow', 'type integer', 'reader urword', 'optional false', 'default 2'], ['block dimensions', 'name ncol', 'type integer', 'reader urword', 'optional false', 'default 2'], ['block griddata', 'name delr', 'type double precision', 'shape (ncol)', 'reader readarray', 'netcdf true', 'default 1.0'], ['block griddata', 'name delc', 'type double precision', 'shape (nrow)', 'reader readarray', 'netcdf true', 'default 1.0'], ['block griddata', 'name top', 'type double precision', 'shape (ncol, nrow)', 'reader readarray', 'netcdf true', 'default 1.0'], ['block griddata', 'name botm', 'type double precision', 'shape (ncol, nrow, nlay)', 'reader readarray', 'netcdf true', 'layered true', 'default 0.'], ['block griddata', 'name idomain', 'type integer', 'shape (ncol, nrow, nlay)', 'reader readarray', 'layered true', 'netcdf true', 'optional true']] def __init__( self, @@ -556,6 +127,7 @@ def __init__( top=1.0, botm=0.0, idomain=None, + filename=None, pname=None, **kwargs, @@ -570,29 +142,24 @@ def __init__( **kwargs, ) - self.length_units = self.build_mfdata("length_units", length_units) - self.nogrb = self.build_mfdata("nogrb", nogrb) - self.grb_filerecord = self.build_mfdata("grb_filerecord", grb_filerecord) - self.xorigin = self.build_mfdata("xorigin", xorigin) - self.yorigin = self.build_mfdata("yorigin", yorigin) - self.angrot = self.build_mfdata("angrot", angrot) - self.export_array_ascii = self.build_mfdata( - "export_array_ascii", export_array_ascii - ) - self.export_array_netcdf = self.build_mfdata( - "export_array_netcdf", export_array_netcdf - ) - self._ncf_filerecord = self.build_mfdata("ncf_filerecord", None) - self._ncf_package = self.build_child_package( - "ncf", packagedata, "packagedata", self._ncf_filerecord - ) - self.nlay = self.build_mfdata("nlay", nlay) - self.nrow = self.build_mfdata("nrow", nrow) - self.ncol = self.build_mfdata("ncol", ncol) - self.delr = self.build_mfdata("delr", delr) - self.delc = self.build_mfdata("delc", delc) - self.top = self.build_mfdata("top", top) - self.botm = self.build_mfdata("botm", botm) - self.idomain = self.build_mfdata("idomain", idomain) + self.length_units = self.build_mfdata('length_units', length_units) + self.nogrb = self.build_mfdata('nogrb', nogrb) + self.grb_filerecord = self.build_mfdata('grb_filerecord', grb_filerecord) + self.xorigin = self.build_mfdata('xorigin', xorigin) + self.yorigin = self.build_mfdata('yorigin', yorigin) + self.angrot = self.build_mfdata('angrot', angrot) + self.export_array_ascii = self.build_mfdata('export_array_ascii', export_array_ascii) + self.export_array_netcdf = self.build_mfdata('export_array_netcdf', export_array_netcdf) + self._ncf_filerecord = self.build_mfdata('ncf_filerecord', None) + self._ncf_package = self.build_child_package('ncf', packagedata, 'packagedata', self._ncf_filerecord) + self.nlay = self.build_mfdata('nlay', nlay) + self.nrow = self.build_mfdata('nrow', nrow) + self.ncol = self.build_mfdata('ncol', ncol) + self.delr = self.build_mfdata('delr', delr) + self.delc = self.build_mfdata('delc', delc) + self.top = self.build_mfdata('top', top) + self.botm = self.build_mfdata('botm', botm) + self.idomain = self.build_mfdata('idomain', idomain) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwtdisu.py b/flopy/mf6/modflow/mfgwtdisu.py index b40e3a02bc..1d08e3d610 100644 --- a/flopy/mf6/modflow/mfgwtdisu.py +++ b/flopy/mf6/modflow/mfgwtdisu.py @@ -174,669 +174,23 @@ class ModflowGwtdisu(MFPackage): """ - grb_filerecord = ListTemplateGenerator( - ("gwt6", "disu", "options", "grb_filerecord") - ) - top = ArrayTemplateGenerator(("gwt6", "disu", "griddata", "top")) - bot = ArrayTemplateGenerator(("gwt6", "disu", "griddata", "bot")) - area = ArrayTemplateGenerator(("gwt6", "disu", "griddata", "area")) - idomain = ArrayTemplateGenerator(("gwt6", "disu", "griddata", "idomain")) - iac = ArrayTemplateGenerator(("gwt6", "disu", "connectiondata", "iac")) - ja = ArrayTemplateGenerator(("gwt6", "disu", "connectiondata", "ja")) - ihc = ArrayTemplateGenerator(("gwt6", "disu", "connectiondata", "ihc")) - cl12 = ArrayTemplateGenerator(("gwt6", "disu", "connectiondata", "cl12")) - hwva = ArrayTemplateGenerator(("gwt6", "disu", "connectiondata", "hwva")) - angldegx = ArrayTemplateGenerator(("gwt6", "disu", "connectiondata", "angldegx")) - vertices = ListTemplateGenerator(("gwt6", "disu", "vertices", "vertices")) - cell2d = ListTemplateGenerator(("gwt6", "disu", "cell2d", "cell2d")) - package_abbr = "gwtdisu" - _package_type = "disu" - dfn_file_name = "gwt-disu.dfn" - dfn = [ - ["header"], - [ - "block options", - "name length_units", - "type string", - "reader urword", - "optional true", - ], - [ - "block options", - "name nogrb", - "type keyword", - "reader urword", - "optional true", - ], - [ - "block options", - "name grb_filerecord", - "type record grb6 fileout grb6_filename", - "reader urword", - "tagged true", - "optional true", - ], - [ - "block options", - "name grb6", - "type keyword", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name fileout", - "type keyword", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name grb6_filename", - "type string", - "preserve_case true", - "in_record true", - "reader urword", - "optional false", - "tagged false", - ], - [ - "block options", - "name xorigin", - "type double precision", - "reader urword", - "optional true", - ], - [ - "block options", - "name yorigin", - "type double precision", - "reader urword", - "optional true", - ], - [ - "block options", - "name angrot", - "type double precision", - "reader urword", - "optional true", - ], - [ - "block options", - "name vertical_offset_tolerance", - "type double precision", - "reader urword", - "optional true", - "default 0.0", - "mf6internal voffsettol", - ], - [ - "block options", - "name export_array_ascii", - "type keyword", - "reader urword", - "optional true", - "mf6internal export_ascii", - ], - [ - "block options", - "name crs", - "type string", - "shape lenbigline", - "preserve_case true", - "reader urword", - "optional true", - "developmode true", - ], - [ - "block dimensions", - "name nodes", - "type integer", - "reader urword", - "optional false", - ], - [ - "block dimensions", - "name nja", - "type integer", - "reader urword", - "optional false", - ], - [ - "block dimensions", - "name nvert", - "type integer", - "reader urword", - "optional true", - ], - [ - "block griddata", - "name top", - "type double precision", - "shape (nodes)", - "reader readarray", - ], - [ - "block griddata", - "name bot", - "type double precision", - "shape (nodes)", - "reader readarray", - ], - [ - "block griddata", - "name area", - "type double precision", - "shape (nodes)", - "reader readarray", - ], - [ - "block griddata", - "name idomain", - "type integer", - "shape (nodes)", - "reader readarray", - "layered false", - "optional true", - ], - [ - "block connectiondata", - "name iac", - "type integer", - "shape (nodes)", - "reader readarray", - ], - [ - "block connectiondata", - "name ja", - "type integer", - "shape (nja)", - "reader readarray", - "numeric_index true", - "jagged_array iac", - ], - [ - "block connectiondata", - "name ihc", - "type integer", - "shape (nja)", - "reader readarray", - "jagged_array iac", - ], - [ - "block connectiondata", - "name cl12", - "type double precision", - "shape (nja)", - "reader readarray", - "jagged_array iac", - ], - [ - "block connectiondata", - "name hwva", - "type double precision", - "shape (nja)", - "reader readarray", - "jagged_array iac", - ], - [ - "block connectiondata", - "name angldegx", - "type double precision", - "optional true", - "shape (nja)", - "reader readarray", - "jagged_array iac", - ], - [ - "block vertices", - "name vertices", - "type recarray iv xv yv", - "shape (nvert)", - "reader urword", - "optional true", - ], - [ - "block vertices", - "name iv", - "type integer", - "in_record true", - "tagged false", - "reader urword", - "optional false", - "numeric_index true", - ], - [ - "block vertices", - "name xv", - "type double precision", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block vertices", - "name yv", - "type double precision", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block cell2d", - "name cell2d", - "type recarray icell2d xc yc ncvert icvert", - "shape (nodes)", - "reader urword", - "optional true", - ], - [ - "block cell2d", - "name icell2d", - "type integer", - "in_record true", - "tagged false", - "reader urword", - "optional false", - "numeric_index true", - ], - [ - "block cell2d", - "name xc", - "type double precision", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block cell2d", - "name yc", - "type double precision", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block cell2d", - "name ncvert", - "type integer", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block cell2d", - "name icvert", - "type integer", - "shape (ncvert)", - "in_record true", - "tagged false", - "reader urword", - "optional false", - "numeric_index true", - ], - ] - spec = { - "advanced": False, - "cell2d": { - "cell2d": { - "block": "cell2d", - "item": { - "block": "cell2d", - "fields": { - "icell2d": { - "block": "cell2d", - "description": "is the cell2d number. Records in the CELL2D block must be listed in consecutive order from 1 to NODES.", - "longname": "cell2d number", - "name": "icell2d", - "numeric_index": "true", - "optional": "false", - "reader": "urword", - "type": "integer", - }, - "icvert": { - "block": "cell2d", - "description": "is an array of integer values containing vertex numbers (in the VERTICES block) used to define the cell. Vertices must be listed in clockwise order.", - "longname": "array of vertex numbers", - "name": "icvert", - "numeric_index": "true", - "optional": "false", - "reader": "urword", - "shape": "(ncvert)", - "type": "integer", - }, - "ncvert": { - "block": "cell2d", - "description": "is the number of vertices required to define the cell. There may be a different number of vertices for each cell.", - "longname": "number of cell vertices", - "name": "ncvert", - "optional": "false", - "reader": "urword", - "type": "integer", - }, - "xc": { - "block": "cell2d", - "description": "is the x-coordinate for the cell center.", - "longname": "x-coordinate for cell center", - "name": "xc", - "optional": "false", - "reader": "urword", - "type": "double precision", - }, - "yc": { - "block": "cell2d", - "description": "is the y-coordinate for the cell center.", - "longname": "y-coordinate for cell center", - "name": "yc", - "optional": "false", - "reader": "urword", - "type": "double precision", - }, - }, - "longname": "cell2d data", - "name": "cell2d", - "optional": True, - "reader": "urword", - "type": "record", - }, - "longname": "cell2d data", - "name": "cell2d", - "optional": True, - "reader": "urword", - "shape": "(nodes)", - "type": "recarray", - } - }, - "connectiondata": { - "angldegx": { - "block": "connectiondata", - "description": "is the angle (in degrees) between the horizontal x-axis and the outward normal to the face between a cell and its connecting cells. the angle varies between zero and 360.0 degrees, where zero degrees points in the positive x-axis direction, and 90 degrees points in the positive y-axis direction. angldegx is only needed if horizontal anisotropy is specified in the npf package, if the xt3d option is used in the npf package, or if the save_specific_discharge option is specified in the npf package. angldegx does not need to be specified if these conditions are not met. angldegx is of size nja; values specified for vertical connections and for the diagonal position are not used. note that angldegx is read in degrees, which is different from modflow-usg, which reads a similar variable (anglex) in radians.", - "jagged_array": "iac", - "longname": "angle of face normal to connection", - "name": "angldegx", - "optional": True, - "reader": "readarray", - "shape": "(nja)", - "type": "double precision", - }, - "cl12": { - "block": "connectiondata", - "description": "is the array containing connection lengths between the center of cell n and the shared face with each adjacent m cell.", - "jagged_array": "iac", - "longname": "connection lengths", - "name": "cl12", - "reader": "readarray", - "shape": "(nja)", - "type": "double precision", - }, - "hwva": { - "block": "connectiondata", - "description": "is a symmetric array of size nja. for horizontal connections, entries in hwva are the horizontal width perpendicular to flow. for vertical connections, entries in hwva are the vertical area for flow. thus, values in the hwva array contain dimensions of both length and area. entries in the hwva array have a one-to-one correspondence with the connections specified in the ja array. likewise, there is a one-to-one correspondence between entries in the hwva array and entries in the ihc array, which specifies the connection type (horizontal or vertical). entries in the hwva array must be symmetric; the program will terminate with an error if the value for hwva for an n to m connection does not equal the value for hwva for the corresponding n to m connection.", - "jagged_array": "iac", - "longname": "connection lengths", - "name": "hwva", - "reader": "readarray", - "shape": "(nja)", - "type": "double precision", - }, - "iac": { - "block": "connectiondata", - "description": "is the number of connections (plus 1) for each cell. the sum of all the entries in iac must be equal to nja.", - "longname": "number of cell connections", - "name": "iac", - "reader": "readarray", - "shape": "(nodes)", - "type": "integer", - }, - "ihc": { - "block": "connectiondata", - "description": "is an index array indicating the direction between node n and all of its m connections. if ihc = 0 then cell n and cell m are connected in the vertical direction. cell n overlies cell m if the cell number for n is less than m; cell m overlies cell n if the cell number for m is less than n. if ihc = 1 then cell n and cell m are connected in the horizontal direction. if ihc = 2 then cell n and cell m are connected in the horizontal direction, and the connection is vertically staggered. a vertically staggered connection is one in which a cell is horizontally connected to more than one cell in a horizontal connection.", - "jagged_array": "iac", - "longname": "connection type", - "name": "ihc", - "reader": "readarray", - "shape": "(nja)", - "type": "integer", - }, - "ja": { - "block": "connectiondata", - "description": "is a list of cell number (n) followed by its connecting cell numbers (m) for each of the m cells connected to cell n. the number of values to provide for cell n is iac(n). this list is sequentially provided for the first to the last cell. the first value in the list must be cell n itself, and the remaining cells must be listed in an increasing order (sorted from lowest number to highest). note that the cell and its connections are only supplied for the gwt cells and their connections to the other gwt cells. also note that the ja list input may be divided such that every node and its connectivity list can be on a separate line for ease in readability of the file. to further ease readability of the file, the node number of the cell whose connectivity is subsequently listed, may be expressed as a negative number, the sign of which is subsequently converted to positive by the code.", - "jagged_array": "iac", - "longname": "grid connectivity", - "name": "ja", - "numeric_index": True, - "reader": "readarray", - "shape": "(nja)", - "type": "integer", - }, - }, - "dimensions": { - "nja": { - "block": "dimensions", - "description": "is the sum of the number of connections and nodes. when calculating the total number of connections, the connection between cell n and cell m is considered to be different from the connection between cell m and cell n. thus, nja is equal to the total number of connections, including n to m and m to n, and the total number of cells.", - "longname": "number of columns", - "name": "nja", - "optional": False, - "reader": "urword", - "type": "integer", - }, - "nodes": { - "block": "dimensions", - "description": "is the number of cells in the model grid.", - "longname": "number of layers", - "name": "nodes", - "optional": False, - "reader": "urword", - "type": "integer", - }, - "nvert": { - "block": "dimensions", - "description": "is the total number of (x, y) vertex pairs used to define the plan-view shape of each cell in the model grid. if nvert is not specified or is specified as zero, then the vertices and cell2d blocks below are not read. nvert and the accompanying vertices and cell2d blocks should be specified for most simulations. if the xt3d or save_specific_discharge options are specified in the npf package, then this information is required.", - "longname": "number of vertices", - "name": "nvert", - "optional": True, - "reader": "urword", - "type": "integer", - }, - }, - "griddata": { - "area": { - "block": "griddata", - "description": "is the cell surface area (in plan view).", - "longname": "cell surface area", - "name": "area", - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "bot": { - "block": "griddata", - "description": "is the bottom elevation for each cell.", - "longname": "cell bottom elevation", - "name": "bot", - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "idomain": { - "block": "griddata", - "description": "is an optional array that characterizes the existence status of a cell. if the idomain array is not specified, then all model cells exist within the solution. if the idomain value for a cell is 0, the cell does not exist in the simulation. input and output values will be read and written for the cell, but internal to the program, the cell is excluded from the solution. if the idomain value for a cell is 1 or greater, the cell exists in the simulation. idomain values of -1 cannot be specified for the disu package.", - "layered": False, - "longname": "idomain existence array", - "name": "idomain", - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "integer", - }, - "top": { - "block": "griddata", - "description": "is the top elevation for each cell in the model grid.", - "longname": "cell top elevation", - "name": "top", - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - }, - "multi": False, - "name": "gwt-disu", - "options": { - "angrot": { - "block": "options", - "description": "counter-clockwise rotation angle (in degrees) of the model grid coordinate system relative to a real-world coordinate system. if not specified, then a default value of 0.0 is assigned. the value for angrot does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", - "longname": "rotation angle", - "name": "angrot", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - "crs": { - "block": "options", - "description": "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.", - "developmode": True, - "longname": "crs user input string", - "name": "crs", - "optional": True, - "reader": "urword", - "shape": "lenbigline", - "type": "string", - }, - "export_array_ascii": { - "block": "options", - "description": "keyword that specifies input griddata arrays should be written to layered ascii output files.", - "longname": "export array variables to layered ascii files.", - "mf6internal": "export_ascii", - "name": "export_array_ascii", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "grb_filerecord": { - "block": "options", - "fields": { - "grb6_filename": { - "block": "options", - "description": "defines a binary grid output file. If this option is not provided, the output file will have the same name as the discretization input file, plus extension '.grb'.", - "longname": "file name of GRB information", - "name": "grb6_filename", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "grb_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "length_units": { - "block": "options", - "description": "is the length units used for this model. values can be 'feet', 'meters', or 'centimeters'. if not specified, the default is 'unknown'.", - "longname": "model length units", - "name": "length_units", - "optional": True, - "reader": "urword", - "type": "string", - }, - "nogrb": { - "block": "options", - "description": "keyword to deactivate writing of the binary grid file.", - "longname": "do not write binary grid file", - "name": "nogrb", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "vertical_offset_tolerance": { - "block": "options", - "default": 0.0, - "description": "checks are performed to ensure that the top of a cell is not higher than the bottom of an overlying cell. this option can be used to specify the tolerance that is used for checking. if top of a cell is above the bottom of an overlying cell by a value less than this tolerance, then the program will not terminate with an error. the default value is zero. this option should generally not be used.", - "longname": "vertical length dimension for top and bottom checking", - "mf6internal": "voffsettol", - "name": "vertical_offset_tolerance", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - "xorigin": { - "block": "options", - "description": "x-position of the origin used for model grid vertices. this value should be provided in a real-world coordinate system. a default value of zero is assigned if not specified. the value for xorigin does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", - "longname": "x-position origin of the model grid coordinate system", - "name": "xorigin", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - "yorigin": { - "block": "options", - "description": "y-position of the origin used for model grid vertices. this value should be provided in a real-world coordinate system. if not specified, then a default value equal to zero is used. the value for yorigin does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", - "longname": "y-position origin of the model grid coordinate system", - "name": "yorigin", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - }, - "vertices": { - "vertices": { - "block": "vertices", - "item": { - "block": "vertices", - "fields": { - "iv": { - "block": "vertices", - "description": "is the vertex number. Records in the VERTICES block must be listed in consecutive order from 1 to NVERT.", - "longname": "vertex number", - "name": "iv", - "numeric_index": "true", - "optional": "false", - "reader": "urword", - "type": "integer", - }, - "xv": { - "block": "vertices", - "description": "is the x-coordinate for the vertex.", - "longname": "x-coordinate for vertex", - "name": "xv", - "optional": "false", - "reader": "urword", - "type": "double precision", - }, - "yv": { - "block": "vertices", - "description": "is the y-coordinate for the vertex.", - "longname": "y-coordinate for vertex", - "name": "yv", - "optional": "false", - "reader": "urword", - "type": "double precision", - }, - }, - "longname": "vertices data", - "name": "vertices", - "optional": True, - "reader": "urword", - "type": "record", - }, - "longname": "vertices data", - "name": "vertices", - "optional": True, - "reader": "urword", - "shape": "(nvert)", - "type": "recarray", - } - }, - } + grb_filerecord = ListTemplateGenerator(('gwt6', 'disu', 'options', 'grb_filerecord')) + top = ArrayTemplateGenerator(('gwt6', 'disu', 'griddata', 'top')) + bot = ArrayTemplateGenerator(('gwt6', 'disu', 'griddata', 'bot')) + area = ArrayTemplateGenerator(('gwt6', 'disu', 'griddata', 'area')) + idomain = ArrayTemplateGenerator(('gwt6', 'disu', 'griddata', 'idomain')) + iac = ArrayTemplateGenerator(('gwt6', 'disu', 'connectiondata', 'iac')) + ja = ArrayTemplateGenerator(('gwt6', 'disu', 'connectiondata', 'ja')) + ihc = ArrayTemplateGenerator(('gwt6', 'disu', 'connectiondata', 'ihc')) + cl12 = ArrayTemplateGenerator(('gwt6', 'disu', 'connectiondata', 'cl12')) + hwva = ArrayTemplateGenerator(('gwt6', 'disu', 'connectiondata', 'hwva')) + angldegx = ArrayTemplateGenerator(('gwt6', 'disu', 'connectiondata', 'angldegx')) + vertices = ListTemplateGenerator(('gwt6', 'disu', 'vertices', 'vertices')) + cell2d = ListTemplateGenerator(('gwt6', 'disu', 'cell2d', 'cell2d')) + package_abbr = 'gwtdisu' + _package_type = 'disu' + dfn_file_name = 'gwt-disu.dfn' + dfn = [['header'], ['block options', 'name length_units', 'type string', 'reader urword', 'optional true'], ['block options', 'name nogrb', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name grb_filerecord', 'type record grb6 fileout grb6_filename', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name grb6', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name fileout', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name grb6_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false'], ['block options', 'name xorigin', 'type double precision', 'reader urword', 'optional true'], ['block options', 'name yorigin', 'type double precision', 'reader urword', 'optional true'], ['block options', 'name angrot', 'type double precision', 'reader urword', 'optional true'], ['block options', 'name vertical_offset_tolerance', 'type double precision', 'reader urword', 'optional true', 'default 0.0', 'mf6internal voffsettol'], ['block options', 'name export_array_ascii', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_ascii'], ['block options', 'name crs', 'type string', 'shape lenbigline', 'preserve_case true', 'reader urword', 'optional true', 'developmode true'], ['block dimensions', 'name nodes', 'type integer', 'reader urword', 'optional false'], ['block dimensions', 'name nja', 'type integer', 'reader urword', 'optional false'], ['block dimensions', 'name nvert', 'type integer', 'reader urword', 'optional true'], ['block griddata', 'name top', 'type double precision', 'shape (nodes)', 'reader readarray'], ['block griddata', 'name bot', 'type double precision', 'shape (nodes)', 'reader readarray'], ['block griddata', 'name area', 'type double precision', 'shape (nodes)', 'reader readarray'], ['block griddata', 'name idomain', 'type integer', 'shape (nodes)', 'reader readarray', 'layered false', 'optional true'], ['block connectiondata', 'name iac', 'type integer', 'shape (nodes)', 'reader readarray'], ['block connectiondata', 'name ja', 'type integer', 'shape (nja)', 'reader readarray', 'numeric_index true', 'jagged_array iac'], ['block connectiondata', 'name ihc', 'type integer', 'shape (nja)', 'reader readarray', 'jagged_array iac'], ['block connectiondata', 'name cl12', 'type double precision', 'shape (nja)', 'reader readarray', 'jagged_array iac'], ['block connectiondata', 'name hwva', 'type double precision', 'shape (nja)', 'reader readarray', 'jagged_array iac'], ['block connectiondata', 'name angldegx', 'type double precision', 'optional true', 'shape (nja)', 'reader readarray', 'jagged_array iac'], ['block vertices', 'name vertices', 'type recarray iv xv yv', 'shape (nvert)', 'reader urword', 'optional true'], ['block vertices', 'name iv', 'type integer', 'in_record true', 'tagged false', 'reader urword', 'optional false', 'numeric_index true'], ['block vertices', 'name xv', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block vertices', 'name yv', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block cell2d', 'name cell2d', 'type recarray icell2d xc yc ncvert icvert', 'shape (nodes)', 'reader urword', 'optional true'], ['block cell2d', 'name icell2d', 'type integer', 'in_record true', 'tagged false', 'reader urword', 'optional false', 'numeric_index true'], ['block cell2d', 'name xc', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block cell2d', 'name yc', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block cell2d', 'name ncvert', 'type integer', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block cell2d', 'name icvert', 'type integer', 'shape (ncvert)', 'in_record true', 'tagged false', 'reader urword', 'optional false', 'numeric_index true']] def __init__( self, @@ -865,6 +219,7 @@ def __init__( angldegx=None, vertices=None, cell2d=None, + filename=None, pname=None, **kwargs, @@ -879,32 +234,29 @@ def __init__( **kwargs, ) - self.length_units = self.build_mfdata("length_units", length_units) - self.nogrb = self.build_mfdata("nogrb", nogrb) - self.grb_filerecord = self.build_mfdata("grb_filerecord", grb_filerecord) - self.xorigin = self.build_mfdata("xorigin", xorigin) - self.yorigin = self.build_mfdata("yorigin", yorigin) - self.angrot = self.build_mfdata("angrot", angrot) - self.vertical_offset_tolerance = self.build_mfdata( - "vertical_offset_tolerance", vertical_offset_tolerance - ) - self.export_array_ascii = self.build_mfdata( - "export_array_ascii", export_array_ascii - ) - self.nodes = self.build_mfdata("nodes", nodes) - self.nja = self.build_mfdata("nja", nja) - self.nvert = self.build_mfdata("nvert", nvert) - self.top = self.build_mfdata("top", top) - self.bot = self.build_mfdata("bot", bot) - self.area = self.build_mfdata("area", area) - self.idomain = self.build_mfdata("idomain", idomain) - self.iac = self.build_mfdata("iac", iac) - self.ja = self.build_mfdata("ja", ja) - self.ihc = self.build_mfdata("ihc", ihc) - self.cl12 = self.build_mfdata("cl12", cl12) - self.hwva = self.build_mfdata("hwva", hwva) - self.angldegx = self.build_mfdata("angldegx", angldegx) - self.vertices = self.build_mfdata("vertices", vertices) - self.cell2d = self.build_mfdata("cell2d", cell2d) + self.length_units = self.build_mfdata('length_units', length_units) + self.nogrb = self.build_mfdata('nogrb', nogrb) + self.grb_filerecord = self.build_mfdata('grb_filerecord', grb_filerecord) + self.xorigin = self.build_mfdata('xorigin', xorigin) + self.yorigin = self.build_mfdata('yorigin', yorigin) + self.angrot = self.build_mfdata('angrot', angrot) + self.vertical_offset_tolerance = self.build_mfdata('vertical_offset_tolerance', vertical_offset_tolerance) + self.export_array_ascii = self.build_mfdata('export_array_ascii', export_array_ascii) + self.nodes = self.build_mfdata('nodes', nodes) + self.nja = self.build_mfdata('nja', nja) + self.nvert = self.build_mfdata('nvert', nvert) + self.top = self.build_mfdata('top', top) + self.bot = self.build_mfdata('bot', bot) + self.area = self.build_mfdata('area', area) + self.idomain = self.build_mfdata('idomain', idomain) + self.iac = self.build_mfdata('iac', iac) + self.ja = self.build_mfdata('ja', ja) + self.ihc = self.build_mfdata('ihc', ihc) + self.cl12 = self.build_mfdata('cl12', cl12) + self.hwva = self.build_mfdata('hwva', hwva) + self.angldegx = self.build_mfdata('angldegx', angldegx) + self.vertices = self.build_mfdata('vertices', vertices) + self.cell2d = self.build_mfdata('cell2d', cell2d) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwtdisv.py b/flopy/mf6/modflow/mfgwtdisv.py index 70e4cb2696..bd92aeb765 100644 --- a/flopy/mf6/modflow/mfgwtdisv.py +++ b/flopy/mf6/modflow/mfgwtdisv.py @@ -120,610 +120,17 @@ class ModflowGwtdisv(MFPackage): """ - grb_filerecord = ListTemplateGenerator( - ("gwt6", "disv", "options", "grb_filerecord") - ) - ncf_filerecord = ListTemplateGenerator( - ("gwt6", "disv", "options", "ncf_filerecord") - ) - top = ArrayTemplateGenerator(("gwt6", "disv", "griddata", "top")) - botm = ArrayTemplateGenerator(("gwt6", "disv", "griddata", "botm")) - idomain = ArrayTemplateGenerator(("gwt6", "disv", "griddata", "idomain")) - vertices = ListTemplateGenerator(("gwt6", "disv", "vertices", "vertices")) - cell2d = ListTemplateGenerator(("gwt6", "disv", "cell2d", "cell2d")) - package_abbr = "gwtdisv" - _package_type = "disv" - dfn_file_name = "gwt-disv.dfn" - dfn = [ - ["header"], - [ - "block options", - "name length_units", - "type string", - "reader urword", - "optional true", - ], - [ - "block options", - "name nogrb", - "type keyword", - "reader urword", - "optional true", - ], - [ - "block options", - "name grb_filerecord", - "type record grb6 fileout grb6_filename", - "reader urword", - "tagged true", - "optional true", - ], - [ - "block options", - "name grb6", - "type keyword", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name fileout", - "type keyword", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name grb6_filename", - "type string", - "preserve_case true", - "in_record true", - "reader urword", - "optional false", - "tagged false", - ], - [ - "block options", - "name xorigin", - "type double precision", - "reader urword", - "optional true", - ], - [ - "block options", - "name yorigin", - "type double precision", - "reader urword", - "optional true", - ], - [ - "block options", - "name angrot", - "type double precision", - "reader urword", - "optional true", - ], - [ - "block options", - "name export_array_ascii", - "type keyword", - "reader urword", - "optional true", - "mf6internal export_ascii", - ], - [ - "block options", - "name export_array_netcdf", - "type keyword", - "reader urword", - "optional true", - "mf6internal export_nc", - "extended true", - ], - [ - "block options", - "name crs", - "type string", - "shape lenbigline", - "preserve_case true", - "reader urword", - "optional true", - "developmode true", - ], - [ - "block options", - "name ncf_filerecord", - "type record ncf6 filein ncf6_filename", - "reader urword", - "tagged true", - "optional true", - "construct_package ncf", - "construct_data packagedata", - "parameter_name packagedata", - ], - [ - "block options", - "name ncf6", - "type keyword", - "in_record true", - "reader urword", - "tagged true", - "optional false", - "extended true", - ], - [ - "block options", - "name filein", - "type keyword", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name ncf6_filename", - "type string", - "preserve_case true", - "in_record true", - "reader urword", - "optional false", - "tagged false", - "extended true", - ], - [ - "block dimensions", - "name nlay", - "type integer", - "reader urword", - "optional false", - ], - [ - "block dimensions", - "name ncpl", - "type integer", - "reader urword", - "optional false", - ], - [ - "block dimensions", - "name nvert", - "type integer", - "reader urword", - "optional false", - ], - [ - "block griddata", - "name top", - "type double precision", - "shape (ncpl)", - "reader readarray", - "netcdf true", - ], - [ - "block griddata", - "name botm", - "type double precision", - "shape (ncpl, nlay)", - "reader readarray", - "layered true", - "netcdf true", - ], - [ - "block griddata", - "name idomain", - "type integer", - "shape (ncpl, nlay)", - "reader readarray", - "layered true", - "netcdf true", - "optional true", - ], - [ - "block vertices", - "name vertices", - "type recarray iv xv yv", - "shape (nvert)", - "reader urword", - "optional false", - ], - [ - "block vertices", - "name iv", - "type integer", - "in_record true", - "tagged false", - "reader urword", - "optional false", - "numeric_index true", - ], - [ - "block vertices", - "name xv", - "type double precision", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block vertices", - "name yv", - "type double precision", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block cell2d", - "name cell2d", - "type recarray icell2d xc yc ncvert icvert", - "shape (ncpl)", - "reader urword", - "optional false", - ], - [ - "block cell2d", - "name icell2d", - "type integer", - "in_record true", - "tagged false", - "reader urword", - "optional false", - "numeric_index true", - ], - [ - "block cell2d", - "name xc", - "type double precision", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block cell2d", - "name yc", - "type double precision", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block cell2d", - "name ncvert", - "type integer", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block cell2d", - "name icvert", - "type integer", - "shape (ncvert)", - "in_record true", - "tagged false", - "reader urword", - "optional false", - "numeric_index true", - ], - ] - spec = { - "advanced": False, - "cell2d": { - "cell2d": { - "block": "cell2d", - "item": { - "block": "cell2d", - "fields": { - "icell2d": { - "block": "cell2d", - "description": "is the CELL2D number. Records in the CELL2D block must be listed in consecutive order from the first to the last.", - "longname": "cell2d number", - "name": "icell2d", - "numeric_index": "true", - "optional": "false", - "reader": "urword", - "type": "integer", - }, - "icvert": { - "block": "cell2d", - "description": "is an array of integer values containing vertex numbers (in the VERTICES block) used to define the cell. Vertices must be listed in clockwise order. Cells that are connected must share vertices.", - "longname": "array of vertex numbers", - "name": "icvert", - "numeric_index": "true", - "optional": "false", - "reader": "urword", - "shape": "(ncvert)", - "type": "integer", - }, - "ncvert": { - "block": "cell2d", - "description": "is the number of vertices required to define the cell. There may be a different number of vertices for each cell.", - "longname": "number of cell vertices", - "name": "ncvert", - "optional": "false", - "reader": "urword", - "type": "integer", - }, - "xc": { - "block": "cell2d", - "description": "is the x-coordinate for the cell center.", - "longname": "x-coordinate for cell center", - "name": "xc", - "optional": "false", - "reader": "urword", - "type": "double precision", - }, - "yc": { - "block": "cell2d", - "description": "is the y-coordinate for the cell center.", - "longname": "y-coordinate for cell center", - "name": "yc", - "optional": "false", - "reader": "urword", - "type": "double precision", - }, - }, - "longname": "cell2d data", - "name": "cell2d", - "optional": False, - "reader": "urword", - "type": "record", - }, - "longname": "cell2d data", - "name": "cell2d", - "optional": False, - "reader": "urword", - "shape": "(ncpl)", - "type": "recarray", - } - }, - "dimensions": { - "ncpl": { - "block": "dimensions", - "description": "is the number of cells per layer. this is a constant value for the grid and it applies to all layers.", - "longname": "number of cells per layer", - "name": "ncpl", - "optional": False, - "reader": "urword", - "type": "integer", - }, - "nlay": { - "block": "dimensions", - "description": "is the number of layers in the model grid.", - "longname": "number of layers", - "name": "nlay", - "optional": False, - "reader": "urword", - "type": "integer", - }, - "nvert": { - "block": "dimensions", - "description": "is the total number of (x, y) vertex pairs used to characterize the horizontal configuration of the model grid.", - "longname": "number of columns", - "name": "nvert", - "optional": False, - "reader": "urword", - "type": "integer", - }, - }, - "fkeys": { - "ncf_filerecord": { - "abbr": "ncf", - "key": "ncf_filerecord", - "param": "packagedata", - "parent": "parent_package", - "val": "packagedata", - } - }, - "griddata": { - "botm": { - "block": "griddata", - "description": "is the bottom elevation for each cell.", - "layered": True, - "longname": "model bottom elevation", - "name": "botm", - "netcdf": True, - "reader": "readarray", - "shape": "(ncpl, nlay)", - "type": "double precision", - }, - "idomain": { - "block": "griddata", - "description": "is an optional array that characterizes the existence status of a cell. if the idomain array is not specified, then all model cells exist within the solution. if the idomain value for a cell is 0, the cell does not exist in the simulation. input and output values will be read and written for the cell, but internal to the program, the cell is excluded from the solution. if the idomain value for a cell is 1, the cell exists in the simulation. if the idomain value for a cell is -1, the cell does not exist in the simulation. furthermore, the first existing cell above will be connected to the first existing cell below. this type of cell is referred to as a 'vertical pass through' cell.", - "layered": True, - "longname": "idomain existence array", - "name": "idomain", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(ncpl, nlay)", - "type": "integer", - }, - "top": { - "block": "griddata", - "description": "is the top elevation for each cell in the top model layer.", - "longname": "model top elevation", - "name": "top", - "netcdf": True, - "reader": "readarray", - "shape": "(ncpl)", - "type": "double precision", - }, - }, - "multi": False, - "name": "gwt-disv", - "options": { - "angrot": { - "block": "options", - "description": "counter-clockwise rotation angle (in degrees) of the model grid coordinate system relative to a real-world coordinate system. if not specified, then a default value of 0.0 is assigned. the value for angrot does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", - "longname": "rotation angle", - "name": "angrot", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - "crs": { - "block": "options", - "description": "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.", - "developmode": True, - "longname": "crs user input string", - "name": "crs", - "optional": True, - "reader": "urword", - "shape": "lenbigline", - "type": "string", - }, - "export_array_ascii": { - "block": "options", - "description": "keyword that specifies input griddata arrays should be written to layered ascii output files.", - "longname": "export array variables to layered ascii files.", - "mf6internal": "export_ascii", - "name": "export_array_ascii", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "export_array_netcdf": { - "block": "options", - "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", - "extended": True, - "longname": "export array variables to netcdf output files.", - "mf6internal": "export_nc", - "name": "export_array_netcdf", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "grb_filerecord": { - "block": "options", - "fields": { - "grb6_filename": { - "block": "options", - "description": "defines a binary grid output file. If this option is not provided, the output file will have the same name as the discretization input file, plus extension '.grb'.", - "longname": "file name of GRB information", - "name": "grb6_filename", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "grb_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "length_units": { - "block": "options", - "description": "is the length units used for this model. values can be 'feet', 'meters', or 'centimeters'. if not specified, the default is 'unknown'.", - "longname": "model length units", - "name": "length_units", - "optional": True, - "reader": "urword", - "type": "string", - }, - "nogrb": { - "block": "options", - "description": "keyword to deactivate writing of the binary grid file.", - "longname": "do not write binary grid file", - "name": "nogrb", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "packagedata": { - "block": "options", - "description": "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 the packagedata variable is also acceptable. See ncf package documentation for more information.", - "name": "packagedata", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "ncf", - "key": "ncf_filerecord", - "param": "packagedata", - "parent": "parent_package", - "val": "packagedata", - }, - "type": "record ncf6 filein ncf6_filename", - }, - "xorigin": { - "block": "options", - "description": "x-position of the origin used for model grid vertices. this value should be provided in a real-world coordinate system. a default value of zero is assigned if not specified. the value for xorigin does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", - "longname": "x-position origin of the model grid coordinate system", - "name": "xorigin", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - "yorigin": { - "block": "options", - "description": "y-position of the origin used for model grid vertices. this value should be provided in a real-world coordinate system. if not specified, then a default value equal to zero is used. the value for yorigin does not affect the model simulation, but it is written to the binary grid file so that postprocessors can locate the grid in space.", - "longname": "y-position origin of the model grid coordinate system", - "name": "yorigin", - "optional": True, - "reader": "urword", - "type": "double precision", - }, - }, - "vertices": { - "vertices": { - "block": "vertices", - "item": { - "block": "vertices", - "fields": { - "iv": { - "block": "vertices", - "description": "is the vertex number. Records in the VERTICES block must be listed in consecutive order from 1 to NVERT.", - "longname": "vertex number", - "name": "iv", - "numeric_index": "true", - "optional": "false", - "reader": "urword", - "type": "integer", - }, - "xv": { - "block": "vertices", - "description": "is the x-coordinate for the vertex.", - "longname": "x-coordinate for vertex", - "name": "xv", - "optional": "false", - "reader": "urword", - "type": "double precision", - }, - "yv": { - "block": "vertices", - "description": "is the y-coordinate for the vertex.", - "longname": "y-coordinate for vertex", - "name": "yv", - "optional": "false", - "reader": "urword", - "type": "double precision", - }, - }, - "longname": "vertices data", - "name": "vertices", - "optional": False, - "reader": "urword", - "type": "record", - }, - "longname": "vertices data", - "name": "vertices", - "optional": False, - "reader": "urword", - "shape": "(nvert)", - "type": "recarray", - } - }, - } + grb_filerecord = ListTemplateGenerator(('gwt6', 'disv', 'options', 'grb_filerecord')) + ncf_filerecord = ListTemplateGenerator(('gwt6', 'disv', 'options', 'ncf_filerecord')) + top = ArrayTemplateGenerator(('gwt6', 'disv', 'griddata', 'top')) + botm = ArrayTemplateGenerator(('gwt6', 'disv', 'griddata', 'botm')) + idomain = ArrayTemplateGenerator(('gwt6', 'disv', 'griddata', 'idomain')) + vertices = ListTemplateGenerator(('gwt6', 'disv', 'vertices', 'vertices')) + cell2d = ListTemplateGenerator(('gwt6', 'disv', 'cell2d', 'cell2d')) + package_abbr = 'gwtdisv' + _package_type = 'disv' + dfn_file_name = 'gwt-disv.dfn' + dfn = [['header'], ['block options', 'name length_units', 'type string', 'reader urword', 'optional true'], ['block options', 'name nogrb', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name grb_filerecord', 'type record grb6 fileout grb6_filename', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name grb6', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name fileout', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name grb6_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false'], ['block options', 'name xorigin', 'type double precision', 'reader urword', 'optional true'], ['block options', 'name yorigin', 'type double precision', 'reader urword', 'optional true'], ['block options', 'name angrot', 'type double precision', 'reader urword', 'optional true'], ['block options', 'name export_array_ascii', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_ascii'], ['block options', 'name export_array_netcdf', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_nc', 'extended true'], ['block options', 'name crs', 'type string', 'shape lenbigline', 'preserve_case true', 'reader urword', 'optional true', 'developmode true'], ['block options', 'name ncf_filerecord', 'type record ncf6 filein ncf6_filename', 'reader urword', 'tagged true', 'optional true', 'construct_package ncf', 'construct_data packagedata', 'parameter_name packagedata'], ['block options', 'name ncf6', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false', 'extended true'], ['block options', 'name filein', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name ncf6_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false', 'extended true'], ['block dimensions', 'name nlay', 'type integer', 'reader urword', 'optional false'], ['block dimensions', 'name ncpl', 'type integer', 'reader urword', 'optional false'], ['block dimensions', 'name nvert', 'type integer', 'reader urword', 'optional false'], ['block griddata', 'name top', 'type double precision', 'shape (ncpl)', 'reader readarray', 'netcdf true'], ['block griddata', 'name botm', 'type double precision', 'shape (ncpl, nlay)', 'reader readarray', 'layered true', 'netcdf true'], ['block griddata', 'name idomain', 'type integer', 'shape (ncpl, nlay)', 'reader readarray', 'layered true', 'netcdf true', 'optional true'], ['block vertices', 'name vertices', 'type recarray iv xv yv', 'shape (nvert)', 'reader urword', 'optional false'], ['block vertices', 'name iv', 'type integer', 'in_record true', 'tagged false', 'reader urword', 'optional false', 'numeric_index true'], ['block vertices', 'name xv', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block vertices', 'name yv', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block cell2d', 'name cell2d', 'type recarray icell2d xc yc ncvert icvert', 'shape (ncpl)', 'reader urword', 'optional false'], ['block cell2d', 'name icell2d', 'type integer', 'in_record true', 'tagged false', 'reader urword', 'optional false', 'numeric_index true'], ['block cell2d', 'name xc', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block cell2d', 'name yc', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block cell2d', 'name ncvert', 'type integer', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block cell2d', 'name icvert', 'type integer', 'shape (ncvert)', 'in_record true', 'tagged false', 'reader urword', 'optional false', 'numeric_index true']] def __init__( self, @@ -746,6 +153,7 @@ def __init__( idomain=None, vertices=None, cell2d=None, + filename=None, pname=None, **kwargs, @@ -760,29 +168,24 @@ def __init__( **kwargs, ) - self.length_units = self.build_mfdata("length_units", length_units) - self.nogrb = self.build_mfdata("nogrb", nogrb) - self.grb_filerecord = self.build_mfdata("grb_filerecord", grb_filerecord) - self.xorigin = self.build_mfdata("xorigin", xorigin) - self.yorigin = self.build_mfdata("yorigin", yorigin) - self.angrot = self.build_mfdata("angrot", angrot) - self.export_array_ascii = self.build_mfdata( - "export_array_ascii", export_array_ascii - ) - self.export_array_netcdf = self.build_mfdata( - "export_array_netcdf", export_array_netcdf - ) - self._ncf_filerecord = self.build_mfdata("ncf_filerecord", None) - self._ncf_package = self.build_child_package( - "ncf", packagedata, "packagedata", self._ncf_filerecord - ) - self.nlay = self.build_mfdata("nlay", nlay) - self.ncpl = self.build_mfdata("ncpl", ncpl) - self.nvert = self.build_mfdata("nvert", nvert) - self.top = self.build_mfdata("top", top) - self.botm = self.build_mfdata("botm", botm) - self.idomain = self.build_mfdata("idomain", idomain) - self.vertices = self.build_mfdata("vertices", vertices) - self.cell2d = self.build_mfdata("cell2d", cell2d) + self.length_units = self.build_mfdata('length_units', length_units) + self.nogrb = self.build_mfdata('nogrb', nogrb) + self.grb_filerecord = self.build_mfdata('grb_filerecord', grb_filerecord) + self.xorigin = self.build_mfdata('xorigin', xorigin) + self.yorigin = self.build_mfdata('yorigin', yorigin) + self.angrot = self.build_mfdata('angrot', angrot) + self.export_array_ascii = self.build_mfdata('export_array_ascii', export_array_ascii) + self.export_array_netcdf = self.build_mfdata('export_array_netcdf', export_array_netcdf) + self._ncf_filerecord = self.build_mfdata('ncf_filerecord', None) + self._ncf_package = self.build_child_package('ncf', packagedata, 'packagedata', self._ncf_filerecord) + self.nlay = self.build_mfdata('nlay', nlay) + self.ncpl = self.build_mfdata('ncpl', ncpl) + self.nvert = self.build_mfdata('nvert', nvert) + self.top = self.build_mfdata('top', top) + self.botm = self.build_mfdata('botm', botm) + self.idomain = self.build_mfdata('idomain', idomain) + self.vertices = self.build_mfdata('vertices', vertices) + self.cell2d = self.build_mfdata('cell2d', cell2d) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwtdsp.py b/flopy/mf6/modflow/mfgwtdsp.py index 8989eaba29..7760248666 100644 --- a/flopy/mf6/modflow/mfgwtdsp.py +++ b/flopy/mf6/modflow/mfgwtdsp.py @@ -82,231 +82,16 @@ class ModflowGwtdsp(MFPackage): """ - diffc = ArrayTemplateGenerator(("gwt6", "dsp", "griddata", "diffc")) - alh = ArrayTemplateGenerator(("gwt6", "dsp", "griddata", "alh")) - alv = ArrayTemplateGenerator(("gwt6", "dsp", "griddata", "alv")) - ath1 = ArrayTemplateGenerator(("gwt6", "dsp", "griddata", "ath1")) - ath2 = ArrayTemplateGenerator(("gwt6", "dsp", "griddata", "ath2")) - atv = ArrayTemplateGenerator(("gwt6", "dsp", "griddata", "atv")) - package_abbr = "gwtdsp" - _package_type = "dsp" - dfn_file_name = "gwt-dsp.dfn" - dfn = [ - ["header"], - [ - "block options", - "name xt3d_off", - "type keyword", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name xt3d_rhs", - "type keyword", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name export_array_ascii", - "type keyword", - "reader urword", - "optional true", - "mf6internal export_ascii", - ], - [ - "block options", - "name export_array_netcdf", - "type keyword", - "reader urword", - "optional true", - "mf6internal export_nc", - "extended true", - ], - [ - "block griddata", - "name diffc", - "type double precision", - "shape (nodes)", - "reader readarray", - "layered true", - "netcdf true", - "optional true", - ], - [ - "block griddata", - "name alh", - "type double precision", - "shape (nodes)", - "reader readarray", - "layered true", - "netcdf true", - "optional true", - ], - [ - "block griddata", - "name alv", - "type double precision", - "shape (nodes)", - "reader readarray", - "layered true", - "netcdf true", - "optional true", - ], - [ - "block griddata", - "name ath1", - "type double precision", - "shape (nodes)", - "reader readarray", - "layered true", - "netcdf true", - "optional true", - ], - [ - "block griddata", - "name ath2", - "type double precision", - "shape (nodes)", - "reader readarray", - "layered true", - "netcdf true", - "optional true", - ], - [ - "block griddata", - "name atv", - "type double precision", - "shape (nodes)", - "reader readarray", - "layered true", - "netcdf true", - "optional true", - ], - ] - spec = { - "advanced": False, - "griddata": { - "alh": { - "block": "griddata", - "description": "longitudinal dispersivity in horizontal direction. if flow is strictly horizontal, then this is the longitudinal dispersivity that will be used. if flow is not strictly horizontal or strictly vertical, then the longitudinal dispersivity is a function of both alh and alv. if mechanical dispersion is represented (by specifying any dispersivity values) then this array is required.", - "layered": True, - "longname": "longitudinal dispersivity in horizontal direction", - "name": "alh", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "alv": { - "block": "griddata", - "description": "longitudinal dispersivity in vertical direction. if flow is strictly vertical, then this is the longitudinal dispsersivity value that will be used. if flow is not strictly horizontal or strictly vertical, then the longitudinal dispersivity is a function of both alh and alv. if this value is not specified and mechanical dispersion is represented, then this array is set equal to alh.", - "layered": True, - "longname": "longitudinal dispersivity in vertical direction", - "name": "alv", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "ath1": { - "block": "griddata", - "description": "transverse dispersivity in horizontal direction. this is the transverse dispersivity value for the second ellipsoid axis. if flow is strictly horizontal and directed in the x direction (along a row for a regular grid), then this value controls spreading in the y direction. if mechanical dispersion is represented (by specifying any dispersivity values) then this array is required.", - "layered": True, - "longname": "transverse dispersivity in horizontal direction", - "name": "ath1", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "ath2": { - "block": "griddata", - "description": "transverse dispersivity in horizontal direction. this is the transverse dispersivity value for the third ellipsoid axis. if flow is strictly horizontal and directed in the x direction (along a row for a regular grid), then this value controls spreading in the z direction. if this value is not specified and mechanical dispersion is represented, then this array is set equal to ath1.", - "layered": True, - "longname": "transverse dispersivity in horizontal direction", - "name": "ath2", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "atv": { - "block": "griddata", - "description": "transverse dispersivity when flow is in vertical direction. if flow is strictly vertical and directed in the z direction, then this value controls spreading in the x and y directions. if this value is not specified and mechanical dispersion is represented, then this array is set equal to ath2.", - "layered": True, - "longname": "transverse dispersivity when flow is in vertical direction", - "name": "atv", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "diffc": { - "block": "griddata", - "description": "effective molecular diffusion coefficient.", - "layered": True, - "longname": "effective molecular diffusion coefficient", - "name": "diffc", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - }, - "multi": False, - "name": "gwt-dsp", - "options": { - "export_array_ascii": { - "block": "options", - "description": "keyword that specifies input griddata arrays should be written to layered ascii output files.", - "longname": "export array variables to layered ascii files.", - "mf6internal": "export_ascii", - "name": "export_array_ascii", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "export_array_netcdf": { - "block": "options", - "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", - "extended": True, - "longname": "export array variables to netcdf output files.", - "mf6internal": "export_nc", - "name": "export_array_netcdf", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "xt3d_off": { - "block": "options", - "description": "deactivate the xt3d method and use the faster and less accurate approximation. this option may provide a fast and accurate solution under some circumstances, such as when flow aligns with the model grid, there is no mechanical dispersion, or when the longitudinal and transverse dispersivities are equal. this option may also be used to assess the computational demand of the xt3d approach by noting the run time differences with and without this option on.", - "longname": "deactivate xt3d", - "name": "xt3d_off", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "xt3d_rhs": { - "block": "options", - "description": "add xt3d terms to right-hand side, when possible. this option uses less memory, but may require more iterations.", - "longname": "xt3d on right-hand side", - "name": "xt3d_rhs", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - }, - } + diffc = ArrayTemplateGenerator(('gwt6', 'dsp', 'griddata', 'diffc')) + alh = ArrayTemplateGenerator(('gwt6', 'dsp', 'griddata', 'alh')) + alv = ArrayTemplateGenerator(('gwt6', 'dsp', 'griddata', 'alv')) + ath1 = ArrayTemplateGenerator(('gwt6', 'dsp', 'griddata', 'ath1')) + ath2 = ArrayTemplateGenerator(('gwt6', 'dsp', 'griddata', 'ath2')) + atv = ArrayTemplateGenerator(('gwt6', 'dsp', 'griddata', 'atv')) + package_abbr = 'gwtdsp' + _package_type = 'dsp' + dfn_file_name = 'gwt-dsp.dfn' + dfn = [['header'], ['block options', 'name xt3d_off', 'type keyword', 'shape', 'reader urword', 'optional true'], ['block options', 'name xt3d_rhs', 'type keyword', 'shape', 'reader urword', 'optional true'], ['block options', 'name export_array_ascii', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_ascii'], ['block options', 'name export_array_netcdf', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_nc', 'extended true'], ['block griddata', 'name diffc', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true', 'optional true'], ['block griddata', 'name alh', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true', 'optional true'], ['block griddata', 'name alv', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true', 'optional true'], ['block griddata', 'name ath1', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true', 'optional true'], ['block griddata', 'name ath2', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true', 'optional true'], ['block griddata', 'name atv', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true', 'optional true']] def __init__( self, @@ -322,6 +107,7 @@ def __init__( ath1=None, ath2=None, atv=None, + filename=None, pname=None, **kwargs, @@ -336,19 +122,16 @@ def __init__( **kwargs, ) - self.xt3d_off = self.build_mfdata("xt3d_off", xt3d_off) - self.xt3d_rhs = self.build_mfdata("xt3d_rhs", xt3d_rhs) - self.export_array_ascii = self.build_mfdata( - "export_array_ascii", export_array_ascii - ) - self.export_array_netcdf = self.build_mfdata( - "export_array_netcdf", export_array_netcdf - ) - self.diffc = self.build_mfdata("diffc", diffc) - self.alh = self.build_mfdata("alh", alh) - self.alv = self.build_mfdata("alv", alv) - self.ath1 = self.build_mfdata("ath1", ath1) - self.ath2 = self.build_mfdata("ath2", ath2) - self.atv = self.build_mfdata("atv", atv) + self.xt3d_off = self.build_mfdata('xt3d_off', xt3d_off) + self.xt3d_rhs = self.build_mfdata('xt3d_rhs', xt3d_rhs) + self.export_array_ascii = self.build_mfdata('export_array_ascii', export_array_ascii) + self.export_array_netcdf = self.build_mfdata('export_array_netcdf', export_array_netcdf) + self.diffc = self.build_mfdata('diffc', diffc) + self.alh = self.build_mfdata('alh', alh) + self.alv = self.build_mfdata('alv', alv) + self.ath1 = self.build_mfdata('ath1', ath1) + self.ath2 = self.build_mfdata('ath2', ath2) + self.atv = self.build_mfdata('atv', atv) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwtfmi.py b/flopy/mf6/modflow/mfgwtfmi.py index 6caecf9386..ede9ab1c2a 100644 --- a/flopy/mf6/modflow/mfgwtfmi.py +++ b/flopy/mf6/modflow/mfgwtfmi.py @@ -55,133 +55,11 @@ class ModflowGwtfmi(MFPackage): """ - packagedata = ListTemplateGenerator(("gwt6", "fmi", "packagedata", "packagedata")) - package_abbr = "gwtfmi" - _package_type = "fmi" - dfn_file_name = "gwt-fmi.dfn" - dfn = [ - ["header"], - [ - "block options", - "name save_flows", - "type keyword", - "reader urword", - "optional true", - ], - [ - "block options", - "name flow_imbalance_correction", - "type keyword", - "reader urword", - "optional true", - "mf6internal imbalancecorrect", - ], - [ - "block packagedata", - "name packagedata", - "type recarray flowtype filein fname", - "reader urword", - "optional true", - ], - [ - "block packagedata", - "name flowtype", - "in_record true", - "type string", - "tagged false", - "reader urword", - ], - [ - "block packagedata", - "name filein", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block packagedata", - "name fname", - "in_record true", - "type string", - "preserve_case true", - "tagged false", - "reader urword", - ], - ] - spec = { - "advanced": False, - "multi": False, - "name": "gwt-fmi", - "options": { - "flow_imbalance_correction": { - "block": "options", - "description": "correct for an imbalance in flows by assuming that any residual flow error comes in or leaves at the concentration of the cell. when this option is activated, the gwt model budget written to the listing file will contain two additional entries: flow-error and flow-correction. these two entries will be equal but opposite in sign. the flow-correction term is a mass flow that is added to offset the error caused by an imprecise flow balance. if these terms are not relatively small, the flow model should be rerun with stricter convergence tolerances.", - "longname": "correct for flow imbalance", - "mf6internal": "imbalancecorrect", - "name": "flow_imbalance_correction", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "save_flows": { - "block": "options", - "description": "keyword to indicate that fmi flow terms will be written to the file specified with 'budget fileout' in output control.", - "longname": "save calculated flow imbalance correction to budget file", - "name": "save_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - }, - "packagedata": { - "packagedata": { - "block": "packagedata", - "item": { - "block": "packagedata", - "fields": { - "filein": { - "block": "packagedata", - "description": "keyword to specify that an input filename is expected next.", - "longname": "file keyword", - "name": "filein", - "optional": "false", - "reader": "urword", - "type": "keyword", - }, - "flowtype": { - "block": "packagedata", - "description": "is the word GWFBUDGET, GWFHEAD, GWFMOVER or the name of an advanced GWF stress package. If GWFBUDGET is specified, then the corresponding file must be a budget file. If GWFHEAD is specified, the file must be a head file. If GWFGRID is specified, the file must be a binary grid file. If an advanced GWF stress package name appears then the corresponding file must be the budget file saved by a LAK, SFR, MAW or UZF Package.", - "longname": "flow type", - "name": "flowtype", - "reader": "urword", - "type": "string", - }, - "fname": { - "block": "packagedata", - "description": "is the name of the file containing flows. The path to the file should be included if the file is not located in the folder where the program was run.", - "longname": "file name", - "name": "fname", - "reader": "urword", - "type": "string", - }, - }, - "longname": "flowtype list", - "name": "packagedata", - "optional": True, - "reader": "urword", - "type": "record", - }, - "longname": "flowtype list", - "name": "packagedata", - "optional": True, - "reader": "urword", - "type": "recarray", - } - }, - } + packagedata = ListTemplateGenerator(('gwt6', 'fmi', 'packagedata', 'packagedata')) + package_abbr = 'gwtfmi' + _package_type = 'fmi' + dfn_file_name = 'gwt-fmi.dfn' + dfn = [['header'], ['block options', 'name save_flows', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name flow_imbalance_correction', 'type keyword', 'reader urword', 'optional true', 'mf6internal imbalancecorrect'], ['block packagedata', 'name packagedata', 'type recarray flowtype filein fname', 'reader urword', 'optional true'], ['block packagedata', 'name flowtype', 'in_record true', 'type string', 'tagged false', 'reader urword'], ['block packagedata', 'name filein', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block packagedata', 'name fname', 'in_record true', 'type string', 'preserve_case true', 'tagged false', 'reader urword']] def __init__( self, @@ -190,6 +68,7 @@ def __init__( save_flows=None, flow_imbalance_correction=None, packagedata=None, + filename=None, pname=None, **kwargs, @@ -204,10 +83,9 @@ def __init__( **kwargs, ) - self.save_flows = self.build_mfdata("save_flows", save_flows) - self.flow_imbalance_correction = self.build_mfdata( - "flow_imbalance_correction", flow_imbalance_correction - ) - self.packagedata = self.build_mfdata("packagedata", packagedata) + self.save_flows = self.build_mfdata('save_flows', save_flows) + self.flow_imbalance_correction = self.build_mfdata('flow_imbalance_correction', flow_imbalance_correction) + self.packagedata = self.build_mfdata('packagedata', packagedata) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwtgwt.py b/flopy/mf6/modflow/mfgwtgwt.py index 6390c3749d..bb64cb3dc8 100644 --- a/flopy/mf6/modflow/mfgwtgwt.py +++ b/flopy/mf6/modflow/mfgwtgwt.py @@ -7,7 +7,6 @@ from flopy.mf6.data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator from flopy.mf6.mfpackage import MFPackage - class ModflowGwtgwt(MFPackage): """ ModflowGwtgwt defines a GWTGWT package. @@ -137,533 +136,14 @@ class ModflowGwtgwt(MFPackage): """ - auxiliary = ArrayTemplateGenerator(("gwtgwt", "options", "auxiliary")) - mvt_filerecord = ListTemplateGenerator(("gwtgwt", "options", "mvt_filerecord")) - obs_filerecord = ListTemplateGenerator(("gwtgwt", "options", "obs_filerecord")) - exchangedata = ListTemplateGenerator(("gwtgwt", "exchangedata", "exchangedata")) - package_abbr = "gwtgwt" - _package_type = "gwtgwt" - dfn_file_name = "exg-gwtgwt.dfn" - dfn = [ - ["header", "multi-package"], - [ - "block options", - "name gwfmodelname1", - "type string", - "reader urword", - "optional false", - ], - [ - "block options", - "name gwfmodelname2", - "type string", - "reader urword", - "optional false", - ], - [ - "block options", - "name auxiliary", - "type string", - "shape (naux)", - "reader urword", - "optional true", - ], - [ - "block options", - "name boundnames", - "type keyword", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name print_input", - "type keyword", - "reader urword", - "optional true", - "mf6internal iprpak", - ], - [ - "block options", - "name print_flows", - "type keyword", - "reader urword", - "optional true", - "mf6internal iprflow", - ], - [ - "block options", - "name save_flows", - "type keyword", - "reader urword", - "optional true", - "mf6internal ipakcb", - ], - [ - "block options", - "name adv_scheme", - "type string", - "valid upstream central tvd", - "reader urword", - "optional true", - ], - [ - "block options", - "name dsp_xt3d_off", - "type keyword", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name dsp_xt3d_rhs", - "type keyword", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name filein", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name mvt_filerecord", - "type record mvt6 filein mvt6_filename", - "shape", - "reader urword", - "tagged true", - "optional true", - "construct_package mvt", - "construct_data perioddata", - "parameter_name perioddata", - ], - [ - "block options", - "name mvt6", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name mvt6_filename", - "type string", - "preserve_case true", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block options", - "name obs_filerecord", - "type record obs6 filein obs6_filename", - "shape", - "reader urword", - "tagged true", - "optional true", - "construct_package obs", - "construct_data observations", - "parameter_name continuous", - ], - [ - "block options", - "name obs6", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name obs6_filename", - "type string", - "preserve_case true", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block options", - "name dev_interfacemodel_on", - "type keyword", - "reader urword", - "optional true", - "mf6internal dev_ifmod_on", - ], - [ - "block dimensions", - "name nexg", - "type integer", - "reader urword", - "optional false", - ], - [ - "block exchangedata", - "name exchangedata", - "type recarray cellidm1 cellidm2 ihc cl1 cl2 hwva aux boundname", - "shape (nexg)", - "reader urword", - "optional false", - ], - [ - "block exchangedata", - "name cellidm1", - "type integer", - "in_record true", - "tagged false", - "reader urword", - "optional false", - "numeric_index true", - ], - [ - "block exchangedata", - "name cellidm2", - "type integer", - "in_record true", - "tagged false", - "reader urword", - "optional false", - "numeric_index true", - ], - [ - "block exchangedata", - "name ihc", - "type integer", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block exchangedata", - "name cl1", - "type double precision", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block exchangedata", - "name cl2", - "type double precision", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block exchangedata", - "name hwva", - "type double precision", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block exchangedata", - "name aux", - "type double precision", - "in_record true", - "tagged false", - "shape (naux)", - "reader urword", - "optional true", - "mf6internal auxvar", - ], - [ - "block exchangedata", - "name boundname", - "type string", - "shape", - "tagged false", - "in_record true", - "reader urword", - "optional true", - ], - ] - spec = { - "advanced": False, - "dimensions": { - "nexg": { - "block": "dimensions", - "description": "keyword and integer value specifying the number of gwt-gwt exchanges.", - "longname": "number of exchanges", - "name": "nexg", - "optional": False, - "reader": "urword", - "type": "integer", - } - }, - "exchangedata": { - "exchangedata": { - "block": "exchangedata", - "item": { - "block": "exchangedata", - "fields": { - "aux": { - "block": "exchangedata", - "description": "represents the values of the auxiliary variables for each GWTGWT Exchange. The values of auxiliary variables must be present for each exchange. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block.", - "longname": "auxiliary variables", - "mf6internal": "auxvar", - "name": "aux", - "optional": "true", - "reader": "urword", - "shape": "(naux)", - "type": "double precision", - }, - "boundname": { - "block": "exchangedata", - "description": "name of the GWT Exchange cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", - "longname": "exchange boundname", - "name": "boundname", - "optional": "true", - "reader": "urword", - "type": "string", - }, - "cellidm1": { - "block": "exchangedata", - "description": "is the cellid of the cell in model 1 as specified in the simulation name file. For a structured grid that uses the DIS input file, CELLIDM1 is the layer, row, and column numbers of the cell. For a grid that uses the DISV input file, CELLIDM1 is the layer number and CELL2D number for the two cells. If the model uses the unstructured discretization (DISU) input file, then CELLIDM1 is the node number for the cell.", - "longname": "cellid of first cell", - "name": "cellidm1", - "numeric_index": "true", - "optional": "false", - "reader": "urword", - "type": "integer", - }, - "cellidm2": { - "block": "exchangedata", - "description": "is the cellid of the cell in model 2 as specified in the simulation name file. For a structured grid that uses the DIS input file, CELLIDM2 is the layer, row, and column numbers of the cell. For a grid that uses the DISV input file, CELLIDM2 is the layer number and CELL2D number for the two cells. If the model uses the unstructured discretization (DISU) input file, then CELLIDM2 is the node number for the cell.", - "longname": "cellid of second cell", - "name": "cellidm2", - "numeric_index": "true", - "optional": "false", - "reader": "urword", - "type": "integer", - }, - "cl1": { - "block": "exchangedata", - "description": "is the distance between the center of cell 1 and the its shared face with cell 2.", - "longname": "connection distance", - "name": "cl1", - "optional": "false", - "reader": "urword", - "type": "double precision", - }, - "cl2": { - "block": "exchangedata", - "description": "is the distance between the center of cell 2 and the its shared face with cell 1.", - "longname": "connection distance", - "name": "cl2", - "optional": "false", - "reader": "urword", - "type": "double precision", - }, - "hwva": { - "block": "exchangedata", - "description": "is the horizontal width of the flow connection between cell 1 and cell 2 if IHC $>$ 0, or it is the area perpendicular to flow of the vertical connection between cell 1 and cell 2 if IHC = 0.", - "longname": "horizontal cell width or area for vertical flow", - "name": "hwva", - "optional": "false", - "reader": "urword", - "type": "double precision", - }, - "ihc": { - "block": "exchangedata", - "description": "is an integer flag indicating the direction between node n and all of its m connections. If IHC = 0 then the connection is vertical. If IHC = 1 then the connection is horizontal. If IHC = 2 then the connection is horizontal for a vertically staggered grid.", - "longname": "integer flag for connection type", - "name": "ihc", - "optional": "false", - "reader": "urword", - "type": "integer", - }, - }, - "longname": "exchange data", - "name": "exchangedata", - "optional": False, - "reader": "urword", - "type": "record", - }, - "longname": "exchange data", - "name": "exchangedata", - "optional": False, - "reader": "urword", - "shape": "(nexg)", - "type": "recarray", - } - }, - "fkeys": { - "mvt_filerecord": { - "abbr": "mvt", - "key": "mvt_filerecord", - "param": "perioddata", - "parent": "parent_model_or_package", - "val": "perioddata", - }, - "obs_filerecord": { - "abbr": "obs", - "key": "obs_filerecord", - "param": "continuous", - "parent": "parent_model_or_package", - "val": "observations", - }, - }, - "multi": True, - "name": "exg-gwtgwt", - "options": { - "adv_scheme": { - "block": "options", - "description": "scheme used to solve the advection term. can be upstream, central, or tvd. if not specified, upstream weighting is the default weighting scheme.", - "longname": "advective scheme", - "name": "adv_scheme", - "optional": True, - "reader": "urword", - "type": "string", - "valid": "upstream central tvd", - }, - "auxiliary": { - "block": "options", - "description": "an array of auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided. most auxiliary variables will not be used by the gwt-gwt exchange, but they will be available for use by other parts of the program. if an auxiliary variable with the name 'angldegx' is found, then this information will be used as the angle (provided in degrees) between the connection face normal and the x axis, where a value of zero indicates that a normal vector points directly along the positive x axis. the connection face normal is a normal vector on the cell face shared between the cell in model 1 and the cell in model 2 pointing away from the model 1 cell. additional information on 'angldegx' is provided in the description of the disu package. angldegx must be specified if dispersion is simulated in the connected gwt models.", - "longname": "keyword to specify aux variables", - "name": "auxiliary", - "optional": True, - "reader": "urword", - "shape": "(naux)", - "type": "string", - }, - "boundnames": { - "block": "options", - "description": "keyword to indicate that boundary names may be provided with the list of gwt exchange cells.", - "name": "boundnames", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "dev_interfacemodel_on": { - "block": "options", - "description": "activates the interface model mechanism for calculating the coefficients at (and possibly near) the exchange. this keyword should only be used for development purposes.", - "longname": "activate interface model on exchange", - "mf6internal": "dev_ifmod_on", - "name": "dev_interfacemodel_on", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "dsp_xt3d_off": { - "block": "options", - "description": "deactivate the xt3d method for the dispersive flux and use the faster and less accurate approximation for this exchange.", - "longname": "deactivate xt3d", - "name": "dsp_xt3d_off", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "dsp_xt3d_rhs": { - "block": "options", - "description": "add xt3d dispersion terms to right-hand side, when possible, for this exchange.", - "longname": "xt3d on right-hand side", - "name": "dsp_xt3d_rhs", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "gwfmodelname1": { - "block": "options", - "description": "keyword to specify name of first corresponding gwf model. in the simulation name file, the gwt6-gwt6 entry contains names for gwt models (exgmnamea and exgmnameb). the gwt model with the name exgmnamea must correspond to the gwf model with the name gwfmodelname1.", - "longname": "keyword to specify name of first corresponding gwf model", - "name": "gwfmodelname1", - "optional": False, - "reader": "urword", - "type": "string", - }, - "gwfmodelname2": { - "block": "options", - "description": "keyword to specify name of second corresponding gwf model. in the simulation name file, the gwt6-gwt6 entry contains names for gwt models (exgmnamea and exgmnameb). the gwt model with the name exgmnameb must correspond to the gwf model with the name gwfmodelname2.", - "longname": "keyword to specify name of second corresponding gwf model", - "name": "gwfmodelname2", - "optional": False, - "reader": "urword", - "type": "string", - }, - "observations": { - "block": "options", - "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", - "name": "observations", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "obs", - "key": "obs_filerecord", - "param": "continuous", - "parent": "parent_model_or_package", - "val": "observations", - }, - "type": "record obs6 filein obs6_filename", - }, - "perioddata": { - "block": "options", - "description": "Contains data for the mvt package. Data can be passed as a dictionary to the mvt package with variable names as keys and package data as values. Data for the perioddata variable is also acceptable. See mvt package documentation for more information.", - "name": "perioddata", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "mvt", - "key": "mvt_filerecord", - "param": "perioddata", - "parent": "parent_model_or_package", - "val": "perioddata", - }, - "type": "record mvt6 filein mvt6_filename", - }, - "print_flows": { - "block": "options", - "description": "keyword to indicate that the list of exchange flow rates will be printed to the listing file for every stress period in which 'save budget' is specified in output control.", - "longname": "keyword to print gwfgwf flows to list file", - "mf6internal": "iprflow", - "name": "print_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "print_input": { - "block": "options", - "description": "keyword to indicate that the list of exchange entries will be echoed to the listing file immediately after it is read.", - "longname": "keyword to print input to list file", - "mf6internal": "iprpak", - "name": "print_input", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "save_flows": { - "block": "options", - "description": "keyword to indicate that cell-by-cell flow terms will be written to the budget file for each model provided that the output control for the models are set up with the 'budget save file' option.", - "longname": "keyword to save gwfgwf flows", - "mf6internal": "ipakcb", - "name": "save_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - }, - } + auxiliary = ArrayTemplateGenerator(('gwtgwt', 'options', 'auxiliary')) + mvt_filerecord = ListTemplateGenerator(('gwtgwt', 'options', 'mvt_filerecord')) + obs_filerecord = ListTemplateGenerator(('gwtgwt', 'options', 'obs_filerecord')) + exchangedata = ListTemplateGenerator(('gwtgwt', 'exchangedata', 'exchangedata')) + package_abbr = 'gwtgwt' + _package_type = 'gwtgwt' + dfn_file_name = 'exg-gwtgwt.dfn' + dfn = [['header', 'multi-package'], ['block options', 'name gwfmodelname1', 'type string', 'reader urword', 'optional false'], ['block options', 'name gwfmodelname2', 'type string', 'reader urword', 'optional false'], ['block options', 'name auxiliary', 'type string', 'shape (naux)', 'reader urword', 'optional true'], ['block options', 'name boundnames', 'type keyword', 'shape', 'reader urword', 'optional true'], ['block options', 'name print_input', 'type keyword', 'reader urword', 'optional true', 'mf6internal iprpak'], ['block options', 'name print_flows', 'type keyword', 'reader urword', 'optional true', 'mf6internal iprflow'], ['block options', 'name save_flows', 'type keyword', 'reader urword', 'optional true', 'mf6internal ipakcb'], ['block options', 'name adv_scheme', 'type string', 'valid upstream central tvd', 'reader urword', 'optional true'], ['block options', 'name dsp_xt3d_off', 'type keyword', 'shape', 'reader urword', 'optional true'], ['block options', 'name dsp_xt3d_rhs', 'type keyword', 'shape', 'reader urword', 'optional true'], ['block options', 'name filein', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name mvt_filerecord', 'type record mvt6 filein mvt6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package mvt', 'construct_data perioddata', 'parameter_name perioddata'], ['block options', 'name mvt6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name mvt6_filename', 'type string', 'preserve_case true', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block options', 'name obs_filerecord', 'type record obs6 filein obs6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package obs', 'construct_data observations', 'parameter_name continuous'], ['block options', 'name obs6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name obs6_filename', 'type string', 'preserve_case true', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block options', 'name dev_interfacemodel_on', 'type keyword', 'reader urword', 'optional true', 'mf6internal dev_ifmod_on'], ['block dimensions', 'name nexg', 'type integer', 'reader urword', 'optional false'], ['block exchangedata', 'name exchangedata', 'type recarray cellidm1 cellidm2 ihc cl1 cl2 hwva aux boundname', 'shape (nexg)', 'reader urword', 'optional false'], ['block exchangedata', 'name cellidm1', 'type integer', 'in_record true', 'tagged false', 'reader urword', 'optional false', 'numeric_index true'], ['block exchangedata', 'name cellidm2', 'type integer', 'in_record true', 'tagged false', 'reader urword', 'optional false', 'numeric_index true'], ['block exchangedata', 'name ihc', 'type integer', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block exchangedata', 'name cl1', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block exchangedata', 'name cl2', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block exchangedata', 'name hwva', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block exchangedata', 'name aux', 'type double precision', 'in_record true', 'tagged false', 'shape (naux)', 'reader urword', 'optional true', 'mf6internal auxvar'], ['block exchangedata', 'name boundname', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword', 'optional true']] def __init__( self, @@ -687,6 +167,7 @@ def __init__( dev_interfacemodel_on=None, nexg=None, exchangedata=None, + filename=None, pname=None, **kwargs, @@ -706,28 +187,22 @@ def __init__( self.exgmnameb = exgmnameb simulation.register_exchange_file(self) - self.gwfmodelname1 = self.build_mfdata("gwfmodelname1", gwfmodelname1) - self.gwfmodelname2 = self.build_mfdata("gwfmodelname2", gwfmodelname2) - self.auxiliary = self.build_mfdata("auxiliary", auxiliary) - self.boundnames = self.build_mfdata("boundnames", boundnames) - self.print_input = self.build_mfdata("print_input", print_input) - self.print_flows = self.build_mfdata("print_flows", print_flows) - self.save_flows = self.build_mfdata("save_flows", save_flows) - self.adv_scheme = self.build_mfdata("adv_scheme", adv_scheme) - self.dsp_xt3d_off = self.build_mfdata("dsp_xt3d_off", dsp_xt3d_off) - self.dsp_xt3d_rhs = self.build_mfdata("dsp_xt3d_rhs", dsp_xt3d_rhs) - self._mvt_filerecord = self.build_mfdata("mvt_filerecord", None) - self._mvt_package = self.build_child_package( - "mvt", perioddata, "perioddata", self._mvt_filerecord - ) - self._obs_filerecord = self.build_mfdata("obs_filerecord", None) - self._obs_package = self.build_child_package( - "obs", observations, "continuous", self._obs_filerecord - ) - self.dev_interfacemodel_on = self.build_mfdata( - "dev_interfacemodel_on", dev_interfacemodel_on - ) - self.nexg = self.build_mfdata("nexg", nexg) - self.exchangedata = self.build_mfdata("exchangedata", exchangedata) + self.gwfmodelname1 = self.build_mfdata('gwfmodelname1', gwfmodelname1) + self.gwfmodelname2 = self.build_mfdata('gwfmodelname2', gwfmodelname2) + self.auxiliary = self.build_mfdata('auxiliary', auxiliary) + self.boundnames = self.build_mfdata('boundnames', boundnames) + self.print_input = self.build_mfdata('print_input', print_input) + self.print_flows = self.build_mfdata('print_flows', print_flows) + self.save_flows = self.build_mfdata('save_flows', save_flows) + self.adv_scheme = self.build_mfdata('adv_scheme', adv_scheme) + self.dsp_xt3d_off = self.build_mfdata('dsp_xt3d_off', dsp_xt3d_off) + self.dsp_xt3d_rhs = self.build_mfdata('dsp_xt3d_rhs', dsp_xt3d_rhs) + self._mvt_filerecord = self.build_mfdata('mvt_filerecord', None) + self._mvt_package = self.build_child_package('mvt', perioddata, 'perioddata', self._mvt_filerecord) + self._obs_filerecord = self.build_mfdata('obs_filerecord', None) + self._obs_package = self.build_child_package('obs', observations, 'continuous', self._obs_filerecord) + self.dev_interfacemodel_on = self.build_mfdata('dev_interfacemodel_on', dev_interfacemodel_on) + self.nexg = self.build_mfdata('nexg', nexg) + self.exchangedata = self.build_mfdata('exchangedata', exchangedata) self._init_complete = True diff --git a/flopy/mf6/modflow/mfgwtic.py b/flopy/mf6/modflow/mfgwtic.py index 3f22ce063b..86f96d337e 100644 --- a/flopy/mf6/modflow/mfgwtic.py +++ b/flopy/mf6/modflow/mfgwtic.py @@ -42,82 +42,11 @@ class ModflowGwtic(MFPackage): """ - strt = ArrayTemplateGenerator(("gwt6", "ic", "griddata", "strt")) - package_abbr = "gwtic" - _package_type = "ic" - dfn_file_name = "gwt-ic.dfn" - dfn = [ - ["header"], - [ - "block options", - "name export_array_ascii", - "type keyword", - "reader urword", - "optional true", - "mf6internal export_ascii", - ], - [ - "block options", - "name export_array_netcdf", - "type keyword", - "reader urword", - "optional true", - "mf6internal export_nc", - "extended true", - ], - [ - "block griddata", - "name strt", - "type double precision", - "shape (nodes)", - "reader readarray", - "layered true", - "netcdf true", - "default 0.0", - ], - ] - spec = { - "advanced": False, - "griddata": { - "strt": { - "block": "griddata", - "default": 0.0, - "description": "is the initial (starting) concentration---that is, concentration at the beginning of the gwt model simulation. strt must be specified for all gwt model simulations. one value is read for every model cell.", - "layered": True, - "longname": "starting concentration", - "name": "strt", - "netcdf": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - } - }, - "multi": False, - "name": "gwt-ic", - "options": { - "export_array_ascii": { - "block": "options", - "description": "keyword that specifies input griddata arrays should be written to layered ascii output files.", - "longname": "export array variables to layered ascii files.", - "mf6internal": "export_ascii", - "name": "export_array_ascii", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "export_array_netcdf": { - "block": "options", - "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", - "extended": True, - "longname": "export array variables to netcdf output files.", - "mf6internal": "export_nc", - "name": "export_array_netcdf", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - }, - } + strt = ArrayTemplateGenerator(('gwt6', 'ic', 'griddata', 'strt')) + package_abbr = 'gwtic' + _package_type = 'ic' + dfn_file_name = 'gwt-ic.dfn' + dfn = [['header'], ['block options', 'name export_array_ascii', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_ascii'], ['block options', 'name export_array_netcdf', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_nc', 'extended true'], ['block griddata', 'name strt', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true', 'default 0.0']] def __init__( self, @@ -126,6 +55,7 @@ def __init__( export_array_ascii=None, export_array_netcdf=None, strt=0.0, + filename=None, pname=None, **kwargs, @@ -140,12 +70,9 @@ def __init__( **kwargs, ) - self.export_array_ascii = self.build_mfdata( - "export_array_ascii", export_array_ascii - ) - self.export_array_netcdf = self.build_mfdata( - "export_array_netcdf", export_array_netcdf - ) - self.strt = self.build_mfdata("strt", strt) + self.export_array_ascii = self.build_mfdata('export_array_ascii', export_array_ascii) + self.export_array_netcdf = self.build_mfdata('export_array_netcdf', export_array_netcdf) + self.strt = self.build_mfdata('strt', strt) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwtist.py b/flopy/mf6/modflow/mfgwtist.py index 475b004a04..214ca5d217 100644 --- a/flopy/mf6/modflow/mfgwtist.py +++ b/flopy/mf6/modflow/mfgwtist.py @@ -125,628 +125,24 @@ class ModflowGwtist(MFPackage): """ - budget_filerecord = ListTemplateGenerator( - ("gwt6", "ist", "options", "budget_filerecord") - ) - budgetcsv_filerecord = ListTemplateGenerator( - ("gwt6", "ist", "options", "budgetcsv_filerecord") - ) - cim_filerecord = ListTemplateGenerator(("gwt6", "ist", "options", "cim_filerecord")) - cimprintrecord = ListTemplateGenerator(("gwt6", "ist", "options", "cimprintrecord")) - sorbate_filerecord = ListTemplateGenerator( - ("gwt6", "ist", "options", "sorbate_filerecord") - ) - porosity = ArrayTemplateGenerator(("gwt6", "ist", "griddata", "porosity")) - volfrac = ArrayTemplateGenerator(("gwt6", "ist", "griddata", "volfrac")) - zetaim = ArrayTemplateGenerator(("gwt6", "ist", "griddata", "zetaim")) - cim = ArrayTemplateGenerator(("gwt6", "ist", "griddata", "cim")) - decay = ArrayTemplateGenerator(("gwt6", "ist", "griddata", "decay")) - decay_sorbed = ArrayTemplateGenerator(("gwt6", "ist", "griddata", "decay_sorbed")) - bulk_density = ArrayTemplateGenerator(("gwt6", "ist", "griddata", "bulk_density")) - distcoef = ArrayTemplateGenerator(("gwt6", "ist", "griddata", "distcoef")) - sp2 = ArrayTemplateGenerator(("gwt6", "ist", "griddata", "sp2")) - package_abbr = "gwtist" - _package_type = "ist" - dfn_file_name = "gwt-ist.dfn" - dfn = [ - ["header", "multi-package"], - [ - "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", - "mf6internal budfilerec", - ], - [ - "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", - "mf6internal budcsvfilerec", - ], - [ - "block options", - "name budgetcsv", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name budgetcsvfile", - "type string", - "preserve_case true", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - ], - [ - "block options", - "name sorption", - "type string", - "valid linear freundlich langmuir", - "reader urword", - "optional true", - ], - [ - "block options", - "name first_order_decay", - "type keyword", - "reader urword", - "optional true", - "mf6internal order1_decay", - ], - [ - "block options", - "name zero_order_decay", - "type keyword", - "reader urword", - "optional true", - "mf6internal order0_decay", - ], - [ - "block options", - "name cim_filerecord", - "type record cim fileout cimfile", - "shape", - "reader urword", - "tagged true", - "optional true", - "mf6internal cimfilerec", - ], - [ - "block options", - "name cim", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - "mf6internal cimopt", - ], - [ - "block options", - "name cimfile", - "type string", - "preserve_case true", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - ], - [ - "block options", - "name cimprintrecord", - "type record cim print_format formatrecord", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name print_format", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name formatrecord", - "type record columns width digits format", - "shape", - "in_record true", - "reader urword", - "tagged", - "optional false", - ], - [ - "block options", - "name columns", - "type integer", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional", - ], - [ - "block options", - "name width", - "type integer", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional", - ], - [ - "block options", - "name digits", - "type integer", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional", - ], - [ - "block options", - "name format", - "type string", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - ], - [ - "block options", - "name sorbate_filerecord", - "type record sorbate fileout sorbatefile", - "shape", - "reader urword", - "tagged true", - "optional true", - "mf6internal sorbatefilerec", - ], - [ - "block options", - "name sorbate", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name sorbatefile", - "type string", - "preserve_case true", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - ], - [ - "block options", - "name export_array_ascii", - "type keyword", - "reader urword", - "optional true", - "mf6internal export_ascii", - ], - [ - "block options", - "name export_array_netcdf", - "type keyword", - "reader urword", - "optional true", - "mf6internal export_nc", - "extended true", - ], - [ - "block griddata", - "name porosity", - "type double precision", - "shape (nodes)", - "reader readarray", - "layered true", - "netcdf true", - ], - [ - "block griddata", - "name volfrac", - "type double precision", - "shape (nodes)", - "reader readarray", - "layered true", - "netcdf true", - ], - [ - "block griddata", - "name zetaim", - "type double precision", - "shape (nodes)", - "reader readarray", - "layered true", - "netcdf true", - ], - [ - "block griddata", - "name cim", - "type double precision", - "shape (nodes)", - "reader readarray", - "optional true", - "layered true", - "netcdf true", - ], - [ - "block griddata", - "name decay", - "type double precision", - "shape (nodes)", - "reader readarray", - "layered true", - "netcdf true", - "optional true", - ], - [ - "block griddata", - "name decay_sorbed", - "type double precision", - "shape (nodes)", - "reader readarray", - "optional true", - "layered true", - "netcdf true", - ], - [ - "block griddata", - "name bulk_density", - "type double precision", - "shape (nodes)", - "reader readarray", - "optional true", - "layered true", - "netcdf true", - ], - [ - "block griddata", - "name distcoef", - "type double precision", - "shape (nodes)", - "reader readarray", - "optional true", - "layered true", - "netcdf true", - ], - [ - "block griddata", - "name sp2", - "type double precision", - "shape (nodes)", - "reader readarray", - "layered true", - "netcdf true", - "optional true", - ], - ] - spec = { - "advanced": False, - "griddata": { - "bulk_density": { - "block": "griddata", - "description": "is the bulk density of this immobile domain in mass per length cubed. bulk density is defined as the immobile domain solid mass per volume of the immobile domain. bulk_density is not required unless the sorption keyword is specified in the options block. if the sorption keyword is not specified in the options block, bulk_density will have no effect on simulation results.", - "layered": True, - "longname": "bulk density", - "name": "bulk_density", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "cim": { - "block": "griddata", - "description": "initial concentration of the immobile domain in mass per length cubed. if cim is not specified, then it is assumed to be zero.", - "layered": True, - "longname": "initial concentration of the immobile domain", - "name": "cim", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "decay": { - "block": "griddata", - "description": "is the rate coefficient for first or zero-order decay for the aqueous phase of the immobile domain. a negative value indicates solute production. the dimensions of decay for first-order decay is one over time. the dimensions of decay for zero-order decay is mass per length cubed per time. decay will have no effect on simulation results unless either first- or zero-order decay is specified in the options block.", - "layered": True, - "longname": "first rate coefficient", - "name": "decay", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "decay_sorbed": { - "block": "griddata", - "description": "is the rate coefficient for first or zero-order decay for the sorbed phase of the immobile domain. a negative value indicates solute production. the dimensions of decay_sorbed for first-order decay is one over time. the dimensions of decay_sorbed for zero-order decay is mass of solute per mass of aquifer per time. if decay_sorbed is not specified and both decay and sorption are active, then the program will terminate with an error. decay_sorbed will have no effect on simulation results unless the sorption keyword and either first- or zero-order decay are specified in the options block.", - "layered": True, - "longname": "second rate coefficient", - "name": "decay_sorbed", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "distcoef": { - "block": "griddata", - "description": "is the distribution coefficient for the equilibrium-controlled linear sorption isotherm in dimensions of length cubed per mass. distcoef is not required unless the sorption keyword is specified in the options block. if the sorption keyword is not specified in the options block, distcoef will have no effect on simulation results.", - "layered": True, - "longname": "distribution coefficient", - "name": "distcoef", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "porosity": { - "block": "griddata", - "description": "porosity of the immobile domain specified as the immobile domain pore volume per immobile domain volume.", - "layered": True, - "longname": "porosity of the immobile domain", - "name": "porosity", - "netcdf": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "sp2": { - "block": "griddata", - "description": "is the exponent for the freundlich isotherm and the sorption capacity for the langmuir isotherm. sp2 is not required unless the sorption keyword is specified in the options block and sorption is specified as freundlich or langmuir. if the sorption keyword is not specified in the options block, or if sorption is specified as linear, sp2 will have no effect on simulation results.", - "layered": True, - "longname": "second sorption parameter", - "name": "sp2", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "volfrac": { - "block": "griddata", - "description": "fraction of the cell volume that consists of this immobile domain. the sum of all immobile domain volume fractions must be less than one.", - "layered": True, - "longname": "volume fraction of this immobile domain", - "name": "volfrac", - "netcdf": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "zetaim": { - "block": "griddata", - "description": "mass transfer rate coefficient between the mobile and immobile domains, in dimensions of per time.", - "layered": True, - "longname": "mass transfer rate coefficient between the mobile and immobile domains", - "name": "zetaim", - "netcdf": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - }, - "multi": True, - "name": "gwt-ist", - "options": { - "budget_filerecord": { - "block": "options", - "fields": { - "budgetfile": { - "block": "options", - "description": "name of the binary output file to write budget information.", - "longname": "file keyword", - "name": "budgetfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "mf6internal": "budfilerec", - "name": "budget_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "budgetcsv_filerecord": { - "block": "options", - "fields": { - "budgetcsvfile": { - "block": "options", - "description": "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.", - "longname": "file keyword", - "name": "budgetcsvfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "mf6internal": "budcsvfilerec", - "name": "budgetcsv_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "cim_filerecord": { - "block": "options", - "fields": {}, - "mf6internal": "cimfilerec", - "name": "cim_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "cimprintrecord": { - "block": "options", - "fields": { - "print_format": { - "block": "options", - "description": "keyword to specify format for printing to the listing file.", - "longname": "keyword to indicate that a print format follows", - "name": "print_format", - "optional": "false", - "reader": "urword", - "type": "keyword", - } - }, - "name": "cimprintrecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "export_array_ascii": { - "block": "options", - "description": "keyword that specifies input griddata arrays should be written to layered ascii output files.", - "longname": "export array variables to layered ascii files.", - "mf6internal": "export_ascii", - "name": "export_array_ascii", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "export_array_netcdf": { - "block": "options", - "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", - "extended": True, - "longname": "export array variables to netcdf output files.", - "mf6internal": "export_nc", - "name": "export_array_netcdf", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "first_order_decay": { - "block": "options", - "description": "is a text keyword to indicate that first-order decay will occur. use of this keyword requires that decay and decay_sorbed (if sorption is active) are specified in the griddata block.", - "longname": "activate first-order decay", - "mf6internal": "order1_decay", - "name": "first_order_decay", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "save_flows": { - "block": "options", - "description": "keyword to indicate that ist flow terms will be written to the file specified with 'budget fileout' in output control.", - "longname": "save calculated flows to budget file", - "name": "save_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "sorbate_filerecord": { - "block": "options", - "fields": { - "sorbatefile": { - "block": "options", - "description": "name of the output file to write immobile sorbate concentration information. Immobile sorbate concentrations will be written whenever aqueous immobile concentrations are saved, as determined by settings in the Output Control option.", - "longname": "file keyword", - "name": "sorbatefile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "mf6internal": "sorbatefilerec", - "name": "sorbate_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "sorption": { - "block": "options", - "description": "is a text keyword to indicate that sorption will be activated. valid sorption options include linear, freundlich, and langmuir. use of this keyword requires that bulk_density and distcoef are specified in the griddata block. if sorption is specified as freundlich or langmuir then sp2 is also required in the griddata block. the sorption option must be consistent with the sorption option specified in the mst package or the program will terminate with an error.", - "longname": "activate sorption", - "name": "sorption", - "optional": True, - "reader": "urword", - "type": "string", - "valid": "linear freundlich langmuir", - }, - "zero_order_decay": { - "block": "options", - "description": "is a text keyword to indicate that zero-order decay will occur. use of this keyword requires that decay and decay_sorbed (if sorption is active) are specified in the griddata block.", - "longname": "activate zero-order decay", - "mf6internal": "order0_decay", - "name": "zero_order_decay", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - }, - } + budget_filerecord = ListTemplateGenerator(('gwt6', 'ist', 'options', 'budget_filerecord')) + budgetcsv_filerecord = ListTemplateGenerator(('gwt6', 'ist', 'options', 'budgetcsv_filerecord')) + cim_filerecord = ListTemplateGenerator(('gwt6', 'ist', 'options', 'cim_filerecord')) + cimprintrecord = ListTemplateGenerator(('gwt6', 'ist', 'options', 'cimprintrecord')) + sorbate_filerecord = ListTemplateGenerator(('gwt6', 'ist', 'options', 'sorbate_filerecord')) + porosity = ArrayTemplateGenerator(('gwt6', 'ist', 'griddata', 'porosity')) + volfrac = ArrayTemplateGenerator(('gwt6', 'ist', 'griddata', 'volfrac')) + zetaim = ArrayTemplateGenerator(('gwt6', 'ist', 'griddata', 'zetaim')) + cim = ArrayTemplateGenerator(('gwt6', 'ist', 'griddata', 'cim')) + decay = ArrayTemplateGenerator(('gwt6', 'ist', 'griddata', 'decay')) + decay_sorbed = ArrayTemplateGenerator(('gwt6', 'ist', 'griddata', 'decay_sorbed')) + bulk_density = ArrayTemplateGenerator(('gwt6', 'ist', 'griddata', 'bulk_density')) + distcoef = ArrayTemplateGenerator(('gwt6', 'ist', 'griddata', 'distcoef')) + sp2 = ArrayTemplateGenerator(('gwt6', 'ist', 'griddata', 'sp2')) + package_abbr = 'gwtist' + _package_type = 'ist' + dfn_file_name = 'gwt-ist.dfn' + dfn = [['header', 'multi-package'], ['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', 'mf6internal budfilerec'], ['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', 'mf6internal budcsvfilerec'], ['block options', 'name budgetcsv', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name budgetcsvfile', 'type string', 'preserve_case true', 'shape', 'in_record true', 'reader urword', 'tagged false', 'optional false'], ['block options', 'name sorption', 'type string', 'valid linear freundlich langmuir', 'reader urword', 'optional true'], ['block options', 'name first_order_decay', 'type keyword', 'reader urword', 'optional true', 'mf6internal order1_decay'], ['block options', 'name zero_order_decay', 'type keyword', 'reader urword', 'optional true', 'mf6internal order0_decay'], ['block options', 'name cim_filerecord', 'type record cim fileout cimfile', 'shape', 'reader urword', 'tagged true', 'optional true', 'mf6internal cimfilerec'], ['block options', 'name cim', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false', 'mf6internal cimopt'], ['block options', 'name cimfile', 'type string', 'preserve_case true', 'shape', 'in_record true', 'reader urword', 'tagged false', 'optional false'], ['block options', 'name cimprintrecord', 'type record cim print_format formatrecord', 'shape', 'reader urword', 'optional true'], ['block options', 'name print_format', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name formatrecord', 'type record columns width digits format', 'shape', 'in_record true', 'reader urword', 'tagged', 'optional false'], ['block options', 'name columns', 'type integer', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional'], ['block options', 'name width', 'type integer', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional'], ['block options', 'name digits', 'type integer', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional'], ['block options', 'name format', 'type string', 'shape', 'in_record true', 'reader urword', 'tagged false', 'optional false'], ['block options', 'name sorbate_filerecord', 'type record sorbate fileout sorbatefile', 'shape', 'reader urword', 'tagged true', 'optional true', 'mf6internal sorbatefilerec'], ['block options', 'name sorbate', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name sorbatefile', 'type string', 'preserve_case true', 'shape', 'in_record true', 'reader urword', 'tagged false', 'optional false'], ['block options', 'name export_array_ascii', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_ascii'], ['block options', 'name export_array_netcdf', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_nc', 'extended true'], ['block griddata', 'name porosity', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true'], ['block griddata', 'name volfrac', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true'], ['block griddata', 'name zetaim', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true'], ['block griddata', 'name cim', 'type double precision', 'shape (nodes)', 'reader readarray', 'optional true', 'layered true', 'netcdf true'], ['block griddata', 'name decay', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true', 'optional true'], ['block griddata', 'name decay_sorbed', 'type double precision', 'shape (nodes)', 'reader readarray', 'optional true', 'layered true', 'netcdf true'], ['block griddata', 'name bulk_density', 'type double precision', 'shape (nodes)', 'reader readarray', 'optional true', 'layered true', 'netcdf true'], ['block griddata', 'name distcoef', 'type double precision', 'shape (nodes)', 'reader readarray', 'optional true', 'layered true', 'netcdf true'], ['block griddata', 'name sp2', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true', 'optional true']] def __init__( self, @@ -772,6 +168,7 @@ def __init__( bulk_density=None, distcoef=None, sp2=None, + filename=None, pname=None, **kwargs, @@ -786,37 +183,26 @@ def __init__( **kwargs, ) - 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.sorption = self.build_mfdata("sorption", sorption) - self.first_order_decay = self.build_mfdata( - "first_order_decay", first_order_decay - ) - self.zero_order_decay = self.build_mfdata("zero_order_decay", zero_order_decay) - self.cim_filerecord = self.build_mfdata("cim_filerecord", cim_filerecord) - self.cimprintrecord = self.build_mfdata("cimprintrecord", cimprintrecord) - self.sorbate_filerecord = self.build_mfdata( - "sorbate_filerecord", sorbate_filerecord - ) - self.export_array_ascii = self.build_mfdata( - "export_array_ascii", export_array_ascii - ) - self.export_array_netcdf = self.build_mfdata( - "export_array_netcdf", export_array_netcdf - ) - self.porosity = self.build_mfdata("porosity", porosity) - self.volfrac = self.build_mfdata("volfrac", volfrac) - self.zetaim = self.build_mfdata("zetaim", zetaim) - self.cim = self.build_mfdata("cim", cim) - self.decay = self.build_mfdata("decay", decay) - self.decay_sorbed = self.build_mfdata("decay_sorbed", decay_sorbed) - self.bulk_density = self.build_mfdata("bulk_density", bulk_density) - self.distcoef = self.build_mfdata("distcoef", distcoef) - self.sp2 = self.build_mfdata("sp2", sp2) + 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.sorption = self.build_mfdata('sorption', sorption) + self.first_order_decay = self.build_mfdata('first_order_decay', first_order_decay) + self.zero_order_decay = self.build_mfdata('zero_order_decay', zero_order_decay) + self.cim_filerecord = self.build_mfdata('cim_filerecord', cim_filerecord) + self.cimprintrecord = self.build_mfdata('cimprintrecord', cimprintrecord) + self.sorbate_filerecord = self.build_mfdata('sorbate_filerecord', sorbate_filerecord) + self.export_array_ascii = self.build_mfdata('export_array_ascii', export_array_ascii) + self.export_array_netcdf = self.build_mfdata('export_array_netcdf', export_array_netcdf) + self.porosity = self.build_mfdata('porosity', porosity) + self.volfrac = self.build_mfdata('volfrac', volfrac) + self.zetaim = self.build_mfdata('zetaim', zetaim) + self.cim = self.build_mfdata('cim', cim) + self.decay = self.build_mfdata('decay', decay) + self.decay_sorbed = self.build_mfdata('decay_sorbed', decay_sorbed) + self.bulk_density = self.build_mfdata('bulk_density', bulk_density) + self.distcoef = self.build_mfdata('distcoef', distcoef) + self.sp2 = self.build_mfdata('sp2', sp2) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwtlkt.py b/flopy/mf6/modflow/mfgwtlkt.py index fa1d8cf3e5..53dd395d22 100644 --- a/flopy/mf6/modflow/mfgwtlkt.py +++ b/flopy/mf6/modflow/mfgwtlkt.py @@ -184,794 +184,18 @@ class ModflowGwtlkt(MFPackage): """ - auxiliary = ArrayTemplateGenerator(("gwt6", "lkt", "options", "auxiliary")) - concentration_filerecord = ListTemplateGenerator( - ("gwt6", "lkt", "options", "concentration_filerecord") - ) - budget_filerecord = ListTemplateGenerator( - ("gwt6", "lkt", "options", "budget_filerecord") - ) - budgetcsv_filerecord = ListTemplateGenerator( - ("gwt6", "lkt", "options", "budgetcsv_filerecord") - ) - ts_filerecord = ListTemplateGenerator(("gwt6", "lkt", "options", "ts_filerecord")) - obs_filerecord = ListTemplateGenerator(("gwt6", "lkt", "options", "obs_filerecord")) - packagedata = ListTemplateGenerator(("gwt6", "lkt", "packagedata", "packagedata")) - lakeperioddata = ListTemplateGenerator(("gwt6", "lkt", "period", "lakeperioddata")) - package_abbr = "gwtlkt" - _package_type = "lkt" - dfn_file_name = "gwt-lkt.dfn" - dfn = [ - ["header", "multi-package"], - [ - "block options", - "name flow_package_name", - "type string", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name auxiliary", - "type string", - "shape (naux)", - "reader urword", - "optional true", - ], - [ - "block options", - "name flow_package_auxiliary_name", - "type string", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name boundnames", - "type keyword", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name print_input", - "type keyword", - "reader urword", - "optional true", - ], - [ - "block options", - "name print_concentration", - "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 concentration_filerecord", - "type record concentration fileout concfile", - "shape", - "reader urword", - "tagged true", - "optional true", - ], - [ - "block options", - "name concentration", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name concfile", - "type string", - "preserve_case true", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - ], - [ - "block options", - "name budget_filerecord", - "type record budget fileout budgetfile", - "shape", - "reader urword", - "tagged true", - "optional true", - ], - [ - "block options", - "name budget", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name fileout", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name budgetfile", - "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", - ], - [ - "block options", - "name ts_filerecord", - "type record ts6 filein ts6_filename", - "shape", - "reader urword", - "tagged true", - "optional true", - "construct_package ts", - "construct_data timeseries", - "parameter_name timeseries", - ], - [ - "block options", - "name ts6", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name filein", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name ts6_filename", - "type string", - "preserve_case true", - "in_record true", - "reader urword", - "optional false", - "tagged false", - ], - [ - "block options", - "name obs_filerecord", - "type record obs6 filein obs6_filename", - "shape", - "reader urword", - "tagged true", - "optional true", - "construct_package obs", - "construct_data observations", - "parameter_name continuous", - ], - [ - "block options", - "name obs6", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name obs6_filename", - "type string", - "preserve_case true", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block packagedata", - "name packagedata", - "type recarray ifno strt aux boundname", - "shape (maxbound)", - "reader urword", - ], - [ - "block packagedata", - "name ifno", - "type integer", - "shape", - "tagged false", - "in_record true", - "reader urword", - "numeric_index true", - ], - [ - "block packagedata", - "name strt", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block packagedata", - "name aux", - "type double precision", - "in_record true", - "tagged false", - "shape (naux)", - "reader urword", - "time_series true", - "optional true", - ], - [ - "block packagedata", - "name boundname", - "type string", - "shape", - "tagged false", - "in_record true", - "reader urword", - "optional true", - ], - [ - "block period", - "name iper", - "type integer", - "block_variable true", - "in_record true", - "tagged false", - "shape", - "valid", - "reader urword", - "optional false", - ], - [ - "block period", - "name lakeperioddata", - "type recarray ifno laksetting", - "shape", - "reader urword", - ], - [ - "block period", - "name ifno", - "type integer", - "shape", - "tagged false", - "in_record true", - "reader urword", - "numeric_index true", - ], - [ - "block period", - "name laksetting", - "type keystring status concentration rainfall evaporation runoff ext-inflow auxiliaryrecord", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block period", - "name status", - "type string", - "shape", - "tagged true", - "in_record true", - "reader urword", - ], - [ - "block period", - "name concentration", - "type string", - "shape", - "tagged true", - "in_record true", - "time_series true", - "reader urword", - ], - [ - "block period", - "name rainfall", - "type string", - "shape", - "tagged true", - "in_record true", - "reader urword", - "time_series true", - ], - [ - "block period", - "name evaporation", - "type string", - "shape", - "tagged true", - "in_record true", - "reader urword", - "time_series true", - ], - [ - "block period", - "name runoff", - "type string", - "shape", - "tagged true", - "in_record true", - "reader urword", - "time_series true", - ], - [ - "block period", - "name ext-inflow", - "type string", - "shape", - "tagged true", - "in_record true", - "reader urword", - "time_series true", - ], - [ - "block period", - "name auxiliaryrecord", - "type record auxiliary auxname auxval", - "shape", - "tagged", - "in_record true", - "reader urword", - ], - [ - "block period", - "name auxiliary", - "type keyword", - "shape", - "in_record true", - "reader urword", - ], - [ - "block period", - "name auxname", - "type string", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block period", - "name auxval", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - "time_series true", - ], - ] - spec = { - "advanced": False, - "fkeys": { - "obs_filerecord": { - "abbr": "obs", - "key": "obs_filerecord", - "param": "continuous", - "parent": "parent_model_or_package", - "val": "observations", - }, - "ts_filerecord": { - "abbr": "ts", - "description": "xxx", - "key": "ts_filerecord", - "param": "timeseries", - "parent": "parent_package", - "val": "timeseries", - }, - }, - "multi": True, - "name": "gwt-lkt", - "options": { - "auxiliary": { - "block": "options", - "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", - "longname": "keyword to specify aux variables", - "name": "auxiliary", - "optional": True, - "reader": "urword", - "shape": "(naux)", - "type": "string", - }, - "boundnames": { - "block": "options", - "description": "keyword to indicate that boundary names may be provided with the list of lake cells.", - "name": "boundnames", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "budget_filerecord": { - "block": "options", - "fields": { - "budgetfile": { - "block": "options", - "description": "name of the binary output file to write budget information.", - "longname": "file keyword", - "name": "budgetfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "budget_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "budgetcsv_filerecord": { - "block": "options", - "fields": { - "budgetcsvfile": { - "block": "options", - "description": "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.", - "longname": "file keyword", - "name": "budgetcsvfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "budgetcsv_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "concentration_filerecord": { - "block": "options", - "fields": { - "concfile": { - "block": "options", - "description": "name of the binary output file to write concentration information.", - "longname": "file keyword", - "name": "concfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "concentration_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "flow_package_auxiliary_name": { - "block": "options", - "description": "keyword to specify the name of an auxiliary variable in the corresponding flow package. if specified, then the simulated concentrations from this advanced transport package will be copied into the auxiliary variable specified with this name. note that the flow package must have an auxiliary variable with this name or the program will terminate with an error. if the flows for this advanced transport package are read from a file, then this option will have no effect.", - "longname": "keyword to specify name of concentration auxiliary variable in flow package", - "name": "flow_package_auxiliary_name", - "optional": True, - "reader": "urword", - "type": "string", - }, - "flow_package_name": { - "block": "options", - "description": "keyword to specify the name of the corresponding flow package. if not specified, then the corresponding flow package must have the same name as this advanced transport package (the name associated with this package in the gwt name file).", - "longname": "keyword to specify name of corresponding flow package", - "name": "flow_package_name", - "optional": True, - "reader": "urword", - "type": "string", - }, - "observations": { - "block": "options", - "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", - "name": "observations", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "obs", - "key": "obs_filerecord", - "param": "continuous", - "parent": "parent_model_or_package", - "val": "observations", - }, - "type": "record obs6 filein obs6_filename", - }, - "print_concentration": { - "block": "options", - "description": "keyword to indicate that the list of lake {#2} will be printed to the listing file for every stress period in which 'concentration print' is specified in output control. if there is no output control option and print_{#3} is specified, then {#2} are printed for the last time step of each stress period.", - "longname": "print calculated stages to listing file", - "name": "print_concentration", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "print_flows": { - "block": "options", - "description": "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.", - "longname": "print calculated flows to listing file", - "name": "print_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "print_input": { - "block": "options", - "description": "keyword to indicate that the list of lake information will be written to the listing file immediately after it is read.", - "longname": "print input to listing file", - "name": "print_input", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "save_flows": { - "block": "options", - "description": "keyword to indicate that lake flow terms will be written to the file specified with 'budget fileout' in output control.", - "longname": "save lake flows to budget file", - "name": "save_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "timeseries": { - "block": "options", - "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", - "name": "timeseries", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "ts", - "description": "xxx", - "key": "ts_filerecord", - "param": "timeseries", - "parent": "parent_package", - "val": "timeseries", - }, - "type": "record ts6 filein ts6_filename", - }, - }, - "packagedata": { - "packagedata": { - "block": "packagedata", - "item": { - "block": "packagedata", - "fields": { - "aux": { - "block": "packagedata", - "description": "represents the values of the auxiliary variables for each lake. The values of auxiliary variables must be present for each lake. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "auxiliary variables", - "name": "aux", - "optional": "true", - "reader": "urword", - "shape": "(naux)", - "time_series": "true", - "type": "double precision", - }, - "boundname": { - "block": "packagedata", - "description": "name of the lake cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", - "longname": "lake name", - "name": "boundname", - "optional": "true", - "reader": "urword", - "type": "string", - }, - "ifno": { - "block": "period", - "description": "integer value that defines the feature (lake) number associated with the specified PERIOD data on the line. IFNO must be greater than zero and less than or equal to NLAKES.", - "longname": "lake number for this entry", - "name": "ifno", - "numeric_index": "true", - "reader": "urword", - "type": "integer", - }, - "strt": { - "block": "packagedata", - "description": "real value that defines the starting concentration for the lake.", - "longname": "starting lake concentration", - "name": "strt", - "reader": "urword", - "type": "double precision", - }, - }, - "name": "packagedata", - "reader": "urword", - "type": "record", - }, - "name": "packagedata", - "reader": "urword", - "shape": "(maxbound)", - "type": "recarray", - } - }, - "period": { - "lakeperioddata": { - "block": "period", - "item": { - "block": "period", - "fields": { - "ifno": { - "block": "period", - "description": "integer value that defines the feature (lake) number associated with the specified period data on the line. ifno must be greater than zero and less than or equal to nlakes.", - "longname": "lake number for this entry", - "name": "ifno", - "numeric_index": True, - "reader": "urword", - "type": "integer", - }, - "laksetting": { - "block": "period", - "choices": { - "auxiliaryrecord": { - "block": "period", - "fields": { - "auxiliary": { - "block": "period", - "description": "keyword for specifying auxiliary variable.", - "name": "auxiliary", - "reader": "urword", - "type": "keyword", - }, - "auxname": { - "block": "period", - "description": "name for the auxiliary variable to be assigned AUXVAL. AUXNAME must match one of the auxiliary variable names defined in the OPTIONS block. If AUXNAME does not match one of the auxiliary variable names defined in the OPTIONS block the data are ignored.", - "name": "auxname", - "reader": "urword", - "type": "string", - }, - "auxval": { - "block": "period", - "description": "value for the auxiliary variable. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "auxiliary variable value", - "name": "auxval", - "reader": "urword", - "time_series": "true", - "type": "double precision", - }, - }, - "name": "auxiliaryrecord", - "reader": "urword", - "type": "record", - }, - "concentration": { - "block": "period", - "description": "real or character value that defines the concentration for the lake. the specified concentration is only applied if the lake is a constant concentration lake. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "lake concentration", - "name": "concentration", - "reader": "urword", - "time_series": True, - "type": "string", - }, - "evaporation": { - "block": "period", - "description": "real or character value that defines the concentration of evaporated water $(ml^{-3})$ for the lake. if this concentration value is larger than the simulated concentration in the lake, then the evaporated water will be removed at the same concentration as the lake. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "evaporation concentration", - "name": "evaporation", - "reader": "urword", - "time_series": True, - "type": "string", - }, - "ext-inflow": { - "block": "period", - "description": "real or character value that defines the concentration of external inflow $(ml^{-3})$ for the lake. value must be greater than or equal to zero. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "ext-inflow concentration", - "name": "ext-inflow", - "reader": "urword", - "time_series": True, - "type": "string", - }, - "rainfall": { - "block": "period", - "description": "real or character value that defines the rainfall solute concentration $(ml^{-3})$ for the lake. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "rainfall concentration", - "name": "rainfall", - "reader": "urword", - "time_series": True, - "type": "string", - }, - "runoff": { - "block": "period", - "description": "real or character value that defines the concentration of runoff $(ml^{-3})$ for the lake. value must be greater than or equal to zero. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "runoff concentration", - "name": "runoff", - "reader": "urword", - "time_series": True, - "type": "string", - }, - "status": { - "block": "period", - "description": "keyword option to define lake status. status can be active, inactive, or constant. by default, status is active, which means that concentration will be calculated for the lake. if a lake is inactive, then there will be no solute mass fluxes into or out of the lake and the inactive value will be written for the lake concentration. if a lake is constant, then the concentration for the lake will be fixed at the user specified value.", - "longname": "lake concentration status", - "name": "status", - "reader": "urword", - "type": "string", - }, - }, - "description": "line of information that is parsed into a keyword and values. keyword values that can be used to start the laksetting string include: status, concentration, rainfall, evaporation, runoff, ext-inflow, and auxiliary. these settings are used to assign the concentration of associated with the corresponding flow terms. concentrations cannot be specified for all flow terms. for example, the lake package supports a 'withdrawal' flow term. if this withdrawal term is active, then water will be withdrawn from the lake at the calculated concentration of the lake.", - "name": "laksetting", - "reader": "urword", - "type": "keystring", - }, - }, - "name": "lakeperioddata", - "reader": "urword", - "type": "record", - }, - "name": "lakeperioddata", - "reader": "urword", - "type": "recarray", - }, - "transient_block": True, - }, - } + auxiliary = ArrayTemplateGenerator(('gwt6', 'lkt', 'options', 'auxiliary')) + concentration_filerecord = ListTemplateGenerator(('gwt6', 'lkt', 'options', 'concentration_filerecord')) + budget_filerecord = ListTemplateGenerator(('gwt6', 'lkt', 'options', 'budget_filerecord')) + budgetcsv_filerecord = ListTemplateGenerator(('gwt6', 'lkt', 'options', 'budgetcsv_filerecord')) + ts_filerecord = ListTemplateGenerator(('gwt6', 'lkt', 'options', 'ts_filerecord')) + obs_filerecord = ListTemplateGenerator(('gwt6', 'lkt', 'options', 'obs_filerecord')) + packagedata = ListTemplateGenerator(('gwt6', 'lkt', 'packagedata', 'packagedata')) + lakeperioddata = ListTemplateGenerator(('gwt6', 'lkt', 'period', 'lakeperioddata')) + package_abbr = 'gwtlkt' + _package_type = 'lkt' + dfn_file_name = 'gwt-lkt.dfn' + dfn = [['header', 'multi-package'], ['block options', 'name flow_package_name', 'type string', 'shape', 'reader urword', 'optional true'], ['block options', 'name auxiliary', 'type string', 'shape (naux)', 'reader urword', 'optional true'], ['block options', 'name flow_package_auxiliary_name', 'type string', 'shape', 'reader urword', 'optional true'], ['block options', 'name boundnames', 'type keyword', 'shape', 'reader urword', 'optional true'], ['block options', 'name print_input', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name print_concentration', '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 concentration_filerecord', 'type record concentration fileout concfile', 'shape', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name concentration', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name concfile', 'type string', 'preserve_case true', 'shape', 'in_record true', 'reader urword', 'tagged false', 'optional false'], ['block options', 'name budget_filerecord', 'type record budget fileout budgetfile', 'shape', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name budget', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name fileout', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name budgetfile', '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'], ['block options', 'name ts_filerecord', 'type record ts6 filein ts6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package ts', 'construct_data timeseries', 'parameter_name timeseries'], ['block options', 'name ts6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name filein', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name ts6_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false'], ['block options', 'name obs_filerecord', 'type record obs6 filein obs6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package obs', 'construct_data observations', 'parameter_name continuous'], ['block options', 'name obs6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name obs6_filename', 'type string', 'preserve_case true', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block packagedata', 'name packagedata', 'type recarray ifno strt aux boundname', 'shape (maxbound)', 'reader urword'], ['block packagedata', 'name ifno', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block packagedata', 'name strt', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block packagedata', 'name aux', 'type double precision', 'in_record true', 'tagged false', 'shape (naux)', 'reader urword', 'time_series true', 'optional true'], ['block packagedata', 'name boundname', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword', 'optional true'], ['block period', 'name iper', 'type integer', 'block_variable true', 'in_record true', 'tagged false', 'shape', 'valid', 'reader urword', 'optional false'], ['block period', 'name lakeperioddata', 'type recarray ifno laksetting', 'shape', 'reader urword'], ['block period', 'name ifno', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block period', 'name laksetting', 'type keystring status concentration rainfall evaporation runoff ext-inflow auxiliaryrecord', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name status', 'type string', 'shape', 'tagged true', 'in_record true', 'reader urword'], ['block period', 'name concentration', 'type string', 'shape', 'tagged true', 'in_record true', 'time_series true', 'reader urword'], ['block period', 'name rainfall', 'type string', 'shape', 'tagged true', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name evaporation', 'type string', 'shape', 'tagged true', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name runoff', 'type string', 'shape', 'tagged true', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name ext-inflow', 'type string', 'shape', 'tagged true', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name auxiliaryrecord', 'type record auxiliary auxname auxval', 'shape', 'tagged', 'in_record true', 'reader urword'], ['block period', 'name auxiliary', 'type keyword', 'shape', 'in_record true', 'reader urword'], ['block period', 'name auxname', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name auxval', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword', 'time_series true']] def __init__( self, @@ -992,6 +216,7 @@ def __init__( observations=None, packagedata=None, lakeperioddata=None, + filename=None, pname=None, **kwargs, @@ -1006,38 +231,23 @@ def __init__( **kwargs, ) - self.flow_package_name = self.build_mfdata( - "flow_package_name", flow_package_name - ) - self.auxiliary = self.build_mfdata("auxiliary", auxiliary) - self.flow_package_auxiliary_name = self.build_mfdata( - "flow_package_auxiliary_name", flow_package_auxiliary_name - ) - self.boundnames = self.build_mfdata("boundnames", boundnames) - self.print_input = self.build_mfdata("print_input", print_input) - self.print_concentration = self.build_mfdata( - "print_concentration", print_concentration - ) - self.print_flows = self.build_mfdata("print_flows", print_flows) - self.save_flows = self.build_mfdata("save_flows", save_flows) - self.concentration_filerecord = self.build_mfdata( - "concentration_filerecord", concentration_filerecord - ) - self.budget_filerecord = self.build_mfdata( - "budget_filerecord", budget_filerecord - ) - self.budgetcsv_filerecord = self.build_mfdata( - "budgetcsv_filerecord", budgetcsv_filerecord - ) - self._ts_filerecord = self.build_mfdata("ts_filerecord", None) - self._ts_package = self.build_child_package( - "ts", timeseries, "timeseries", self._ts_filerecord - ) - self._obs_filerecord = self.build_mfdata("obs_filerecord", None) - self._obs_package = self.build_child_package( - "obs", observations, "continuous", self._obs_filerecord - ) - self.packagedata = self.build_mfdata("packagedata", packagedata) - self.lakeperioddata = self.build_mfdata("lakeperioddata", lakeperioddata) + self.flow_package_name = self.build_mfdata('flow_package_name', flow_package_name) + self.auxiliary = self.build_mfdata('auxiliary', auxiliary) + self.flow_package_auxiliary_name = self.build_mfdata('flow_package_auxiliary_name', flow_package_auxiliary_name) + self.boundnames = self.build_mfdata('boundnames', boundnames) + self.print_input = self.build_mfdata('print_input', print_input) + self.print_concentration = self.build_mfdata('print_concentration', print_concentration) + self.print_flows = self.build_mfdata('print_flows', print_flows) + self.save_flows = self.build_mfdata('save_flows', save_flows) + self.concentration_filerecord = self.build_mfdata('concentration_filerecord', concentration_filerecord) + self.budget_filerecord = self.build_mfdata('budget_filerecord', budget_filerecord) + self.budgetcsv_filerecord = self.build_mfdata('budgetcsv_filerecord', budgetcsv_filerecord) + self._ts_filerecord = self.build_mfdata('ts_filerecord', None) + self._ts_package = self.build_child_package('ts', timeseries, 'timeseries', self._ts_filerecord) + self._obs_filerecord = self.build_mfdata('obs_filerecord', None) + self._obs_package = self.build_child_package('obs', observations, 'continuous', self._obs_filerecord) + self.packagedata = self.build_mfdata('packagedata', packagedata) + self.lakeperioddata = self.build_mfdata('lakeperioddata', lakeperioddata) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwtmst.py b/flopy/mf6/modflow/mfgwtmst.py index 930b99c87f..bfde8bcd08 100644 --- a/flopy/mf6/modflow/mfgwtmst.py +++ b/flopy/mf6/modflow/mfgwtmst.py @@ -99,328 +99,17 @@ class ModflowGwtmst(MFPackage): """ - sorbate_filerecord = ListTemplateGenerator( - ("gwt6", "mst", "options", "sorbate_filerecord") - ) - porosity = ArrayTemplateGenerator(("gwt6", "mst", "griddata", "porosity")) - decay = ArrayTemplateGenerator(("gwt6", "mst", "griddata", "decay")) - decay_sorbed = ArrayTemplateGenerator(("gwt6", "mst", "griddata", "decay_sorbed")) - bulk_density = ArrayTemplateGenerator(("gwt6", "mst", "griddata", "bulk_density")) - distcoef = ArrayTemplateGenerator(("gwt6", "mst", "griddata", "distcoef")) - sp2 = ArrayTemplateGenerator(("gwt6", "mst", "griddata", "sp2")) - package_abbr = "gwtmst" - _package_type = "mst" - dfn_file_name = "gwt-mst.dfn" - dfn = [ - ["header"], - [ - "block options", - "name save_flows", - "type keyword", - "reader urword", - "optional true", - ], - [ - "block options", - "name first_order_decay", - "type keyword", - "reader urword", - "optional true", - "mf6internal order1_decay", - ], - [ - "block options", - "name zero_order_decay", - "type keyword", - "reader urword", - "optional true", - "mf6internal order0_decay", - ], - [ - "block options", - "name sorption", - "type string", - "valid linear freundlich langmuir", - "reader urword", - "optional true", - ], - [ - "block options", - "name sorbate_filerecord", - "type record sorbate fileout sorbatefile", - "shape", - "reader urword", - "tagged true", - "optional true", - "mf6internal sorbate_rec", - ], - [ - "block options", - "name sorbate", - "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 sorbatefile", - "type string", - "preserve_case true", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - ], - [ - "block options", - "name export_array_ascii", - "type keyword", - "reader urword", - "optional true", - "mf6internal export_ascii", - ], - [ - "block options", - "name export_array_netcdf", - "type keyword", - "reader urword", - "optional true", - "mf6internal export_nc", - "extended true", - ], - [ - "block griddata", - "name porosity", - "type double precision", - "shape (nodes)", - "reader readarray", - "layered true", - "netcdf true", - ], - [ - "block griddata", - "name decay", - "type double precision", - "shape (nodes)", - "reader readarray", - "layered true", - "netcdf true", - "optional true", - ], - [ - "block griddata", - "name decay_sorbed", - "type double precision", - "shape (nodes)", - "reader readarray", - "optional true", - "layered true", - "netcdf true", - ], - [ - "block griddata", - "name bulk_density", - "type double precision", - "shape (nodes)", - "reader readarray", - "optional true", - "layered true", - "netcdf true", - ], - [ - "block griddata", - "name distcoef", - "type double precision", - "shape (nodes)", - "reader readarray", - "layered true", - "netcdf true", - "optional true", - ], - [ - "block griddata", - "name sp2", - "type double precision", - "shape (nodes)", - "reader readarray", - "layered true", - "netcdf true", - "optional true", - ], - ] - spec = { - "advanced": False, - "griddata": { - "bulk_density": { - "block": "griddata", - "description": "is the bulk density of the aquifer in mass per length cubed. bulk_density is not required unless the sorption keyword is specified. bulk density is defined as the mobile domain solid mass per mobile domain volume. additional information on bulk density is included in the modflow 6 supplemental technical information document.", - "layered": True, - "longname": "bulk density", - "name": "bulk_density", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "decay": { - "block": "griddata", - "description": "is the rate coefficient for first or zero-order decay for the aqueous phase of the mobile domain. a negative value indicates solute production. the dimensions of decay for first-order decay is one over time. the dimensions of decay for zero-order decay is mass per length cubed per time. decay will have no effect on simulation results unless either first- or zero-order decay is specified in the options block.", - "layered": True, - "longname": "aqueous phase decay rate coefficient", - "name": "decay", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "decay_sorbed": { - "block": "griddata", - "description": "is the rate coefficient for first or zero-order decay for the sorbed phase of the mobile domain. a negative value indicates solute production. the dimensions of decay_sorbed for first-order decay is one over time. the dimensions of decay_sorbed for zero-order decay is mass of solute per mass of aquifer per time. if decay_sorbed is not specified and both decay and sorption are active, then the program will terminate with an error. decay_sorbed will have no effect on simulation results unless the sorption keyword and either first- or zero-order decay are specified in the options block.", - "layered": True, - "longname": "sorbed phase decay rate coefficient", - "name": "decay_sorbed", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "distcoef": { - "block": "griddata", - "description": "is the distribution coefficient for the equilibrium-controlled linear sorption isotherm in dimensions of length cubed per mass. if the freunchlich isotherm is specified, then discoef is the freundlich constant. if the langmuir isotherm is specified, then distcoef is the langmuir constant. distcoef is not required unless the sorption keyword is specified.", - "layered": True, - "longname": "distribution coefficient", - "name": "distcoef", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "porosity": { - "block": "griddata", - "description": "is the mobile domain porosity, defined as the mobile domain pore volume per mobile domain volume. additional information on porosity within the context of mobile and immobile domain transport simulations is included in the modflow 6 supplemental technical information document.", - "layered": True, - "longname": "porosity", - "name": "porosity", - "netcdf": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - "sp2": { - "block": "griddata", - "description": "is the exponent for the freundlich isotherm and the sorption capacity for the langmuir isotherm. sp2 is not required unless the sorption keyword is specified in the options block. if the sorption keyword is not specified in the options block, sp2 will have no effect on simulation results.", - "layered": True, - "longname": "second sorption parameter", - "name": "sp2", - "netcdf": True, - "optional": True, - "reader": "readarray", - "shape": "(nodes)", - "type": "double precision", - }, - }, - "multi": False, - "name": "gwt-mst", - "options": { - "export_array_ascii": { - "block": "options", - "description": "keyword that specifies input griddata arrays should be written to layered ascii output files.", - "longname": "export array variables to layered ascii files.", - "mf6internal": "export_ascii", - "name": "export_array_ascii", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "export_array_netcdf": { - "block": "options", - "description": "keyword that specifies input gridded arrays should be written to the model output netcdf file with attributes that support using the generated file as a 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.", - "extended": True, - "longname": "export array variables to netcdf output files.", - "mf6internal": "export_nc", - "name": "export_array_netcdf", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "first_order_decay": { - "block": "options", - "description": "is a text keyword to indicate that first-order decay will occur. use of this keyword requires that decay and decay_sorbed (if sorption is active) are specified in the griddata block.", - "longname": "activate first-order decay", - "mf6internal": "order1_decay", - "name": "first_order_decay", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "save_flows": { - "block": "options", - "description": "keyword to indicate that mst flow terms will be written to the file specified with 'budget fileout' in output control.", - "longname": "save calculated flows to budget file", - "name": "save_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "sorbate_filerecord": { - "block": "options", - "fields": { - "sorbatefile": { - "block": "options", - "description": "name of the output file to write sorbate concentration information. Sorbate concentrations will be written whenever aqueous concentrations are saved, as determined by settings in the Output Control option.", - "longname": "file keyword", - "name": "sorbatefile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "mf6internal": "sorbate_rec", - "name": "sorbate_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "sorption": { - "block": "options", - "description": "is a text keyword to indicate that sorption will be activated. valid sorption options include linear, freundlich, and langmuir. use of this keyword requires that bulk_density and distcoef are specified in the griddata block. if sorption is specified as freundlich or langmuir then sp2 is also required in the griddata block.", - "longname": "activate sorption", - "name": "sorption", - "optional": True, - "reader": "urword", - "type": "string", - "valid": "linear freundlich langmuir", - }, - "zero_order_decay": { - "block": "options", - "description": "is a text keyword to indicate that zero-order decay will occur. use of this keyword requires that decay and decay_sorbed (if sorption is active) are specified in the griddata block.", - "longname": "activate zero-order decay", - "mf6internal": "order0_decay", - "name": "zero_order_decay", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - }, - } + sorbate_filerecord = ListTemplateGenerator(('gwt6', 'mst', 'options', 'sorbate_filerecord')) + porosity = ArrayTemplateGenerator(('gwt6', 'mst', 'griddata', 'porosity')) + decay = ArrayTemplateGenerator(('gwt6', 'mst', 'griddata', 'decay')) + decay_sorbed = ArrayTemplateGenerator(('gwt6', 'mst', 'griddata', 'decay_sorbed')) + bulk_density = ArrayTemplateGenerator(('gwt6', 'mst', 'griddata', 'bulk_density')) + distcoef = ArrayTemplateGenerator(('gwt6', 'mst', 'griddata', 'distcoef')) + sp2 = ArrayTemplateGenerator(('gwt6', 'mst', 'griddata', 'sp2')) + package_abbr = 'gwtmst' + _package_type = 'mst' + dfn_file_name = 'gwt-mst.dfn' + dfn = [['header'], ['block options', 'name save_flows', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name first_order_decay', 'type keyword', 'reader urword', 'optional true', 'mf6internal order1_decay'], ['block options', 'name zero_order_decay', 'type keyword', 'reader urword', 'optional true', 'mf6internal order0_decay'], ['block options', 'name sorption', 'type string', 'valid linear freundlich langmuir', 'reader urword', 'optional true'], ['block options', 'name sorbate_filerecord', 'type record sorbate fileout sorbatefile', 'shape', 'reader urword', 'tagged true', 'optional true', 'mf6internal sorbate_rec'], ['block options', 'name sorbate', '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 sorbatefile', 'type string', 'preserve_case true', 'shape', 'in_record true', 'reader urword', 'tagged false', 'optional false'], ['block options', 'name export_array_ascii', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_ascii'], ['block options', 'name export_array_netcdf', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_nc', 'extended true'], ['block griddata', 'name porosity', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true'], ['block griddata', 'name decay', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true', 'optional true'], ['block griddata', 'name decay_sorbed', 'type double precision', 'shape (nodes)', 'reader readarray', 'optional true', 'layered true', 'netcdf true'], ['block griddata', 'name bulk_density', 'type double precision', 'shape (nodes)', 'reader readarray', 'optional true', 'layered true', 'netcdf true'], ['block griddata', 'name distcoef', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true', 'optional true'], ['block griddata', 'name sp2', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true', 'optional true']] def __init__( self, @@ -439,6 +128,7 @@ def __init__( bulk_density=None, distcoef=None, sp2=None, + filename=None, pname=None, **kwargs, @@ -453,26 +143,19 @@ def __init__( **kwargs, ) - self.save_flows = self.build_mfdata("save_flows", save_flows) - self.first_order_decay = self.build_mfdata( - "first_order_decay", first_order_decay - ) - self.zero_order_decay = self.build_mfdata("zero_order_decay", zero_order_decay) - self.sorption = self.build_mfdata("sorption", sorption) - self.sorbate_filerecord = self.build_mfdata( - "sorbate_filerecord", sorbate_filerecord - ) - self.export_array_ascii = self.build_mfdata( - "export_array_ascii", export_array_ascii - ) - self.export_array_netcdf = self.build_mfdata( - "export_array_netcdf", export_array_netcdf - ) - self.porosity = self.build_mfdata("porosity", porosity) - self.decay = self.build_mfdata("decay", decay) - self.decay_sorbed = self.build_mfdata("decay_sorbed", decay_sorbed) - self.bulk_density = self.build_mfdata("bulk_density", bulk_density) - self.distcoef = self.build_mfdata("distcoef", distcoef) - self.sp2 = self.build_mfdata("sp2", sp2) + self.save_flows = self.build_mfdata('save_flows', save_flows) + self.first_order_decay = self.build_mfdata('first_order_decay', first_order_decay) + self.zero_order_decay = self.build_mfdata('zero_order_decay', zero_order_decay) + self.sorption = self.build_mfdata('sorption', sorption) + self.sorbate_filerecord = self.build_mfdata('sorbate_filerecord', sorbate_filerecord) + self.export_array_ascii = self.build_mfdata('export_array_ascii', export_array_ascii) + self.export_array_netcdf = self.build_mfdata('export_array_netcdf', export_array_netcdf) + self.porosity = self.build_mfdata('porosity', porosity) + self.decay = self.build_mfdata('decay', decay) + self.decay_sorbed = self.build_mfdata('decay_sorbed', decay_sorbed) + self.bulk_density = self.build_mfdata('bulk_density', bulk_density) + self.distcoef = self.build_mfdata('distcoef', distcoef) + self.sp2 = self.build_mfdata('sp2', sp2) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwtmvt.py b/flopy/mf6/modflow/mfgwtmvt.py index 7f4aea83a2..96a023ac94 100644 --- a/flopy/mf6/modflow/mfgwtmvt.py +++ b/flopy/mf6/modflow/mfgwtmvt.py @@ -51,186 +51,12 @@ class ModflowGwtmvt(MFPackage): """ - budget_filerecord = ListTemplateGenerator( - ("gwt6", "mvt", "options", "budget_filerecord") - ) - budgetcsv_filerecord = ListTemplateGenerator( - ("gwt6", "mvt", "options", "budgetcsv_filerecord") - ) - package_abbr = "gwtmvt" - _package_type = "mvt" - dfn_file_name = "gwt-mvt.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", - ], - ] - spec = { - "advanced": False, - "multi": False, - "name": "gwt-mvt", - "options": { - "budget_filerecord": { - "block": "options", - "fields": { - "budgetfile": { - "block": "options", - "description": "name of the binary output file to write budget information.", - "longname": "file keyword", - "name": "budgetfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "budget_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "budgetcsv_filerecord": { - "block": "options", - "fields": { - "budgetcsvfile": { - "block": "options", - "description": "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.", - "longname": "file keyword", - "name": "budgetcsvfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "budgetcsv_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "print_flows": { - "block": "options", - "description": "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.", - "longname": "print calculated flows to listing file", - "name": "print_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "print_input": { - "block": "options", - "description": "keyword to indicate that the list of mover information will be written to the listing file immediately after it is read.", - "longname": "print input to listing file", - "name": "print_input", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "save_flows": { - "block": "options", - "description": "keyword to indicate that lake flow terms will be written to the file specified with 'budget fileout' in output control.", - "longname": "save lake flows to budget file", - "name": "save_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - }, - "ref": { - "abbr": "mvt", - "key": "mvt_filerecord", - "param": "perioddata", - "parent": "parent_model_or_package", - "val": "perioddata", - }, - } + budget_filerecord = ListTemplateGenerator(('gwt6', 'mvt', 'options', 'budget_filerecord')) + budgetcsv_filerecord = ListTemplateGenerator(('gwt6', 'mvt', 'options', 'budgetcsv_filerecord')) + package_abbr = 'gwtmvt' + _package_type = 'mvt' + dfn_file_name = 'gwt-mvt.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, @@ -241,6 +67,7 @@ def __init__( save_flows=None, budget_filerecord=None, budgetcsv_filerecord=None, + filename=None, pname=None, **kwargs, @@ -255,24 +82,18 @@ def __init__( **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.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 GwtmvtPackages(MFChildPackages): """ GwtmvtPackages is a container class for the ModflowGwtmvt class. """ - package_abbr = "gwtmvtpackages" def initialize( @@ -282,6 +103,7 @@ def initialize( save_flows=None, budget_filerecord=None, budgetcsv_filerecord=None, + filename=None, pname=None, ): @@ -311,6 +133,7 @@ def append_package( save_flows=None, budget_filerecord=None, budgetcsv_filerecord=None, + filename=None, pname=None, ): diff --git a/flopy/mf6/modflow/mfgwtmwt.py b/flopy/mf6/modflow/mfgwtmwt.py index 2de297abc3..5db6ba197f 100644 --- a/flopy/mf6/modflow/mfgwtmwt.py +++ b/flopy/mf6/modflow/mfgwtmwt.py @@ -164,737 +164,18 @@ class ModflowGwtmwt(MFPackage): """ - auxiliary = ArrayTemplateGenerator(("gwt6", "mwt", "options", "auxiliary")) - concentration_filerecord = ListTemplateGenerator( - ("gwt6", "mwt", "options", "concentration_filerecord") - ) - budget_filerecord = ListTemplateGenerator( - ("gwt6", "mwt", "options", "budget_filerecord") - ) - budgetcsv_filerecord = ListTemplateGenerator( - ("gwt6", "mwt", "options", "budgetcsv_filerecord") - ) - ts_filerecord = ListTemplateGenerator(("gwt6", "mwt", "options", "ts_filerecord")) - obs_filerecord = ListTemplateGenerator(("gwt6", "mwt", "options", "obs_filerecord")) - packagedata = ListTemplateGenerator(("gwt6", "mwt", "packagedata", "packagedata")) - mwtperioddata = ListTemplateGenerator(("gwt6", "mwt", "period", "mwtperioddata")) - package_abbr = "gwtmwt" - _package_type = "mwt" - dfn_file_name = "gwt-mwt.dfn" - dfn = [ - ["header", "multi-package"], - [ - "block options", - "name flow_package_name", - "type string", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name auxiliary", - "type string", - "shape (naux)", - "reader urword", - "optional true", - ], - [ - "block options", - "name flow_package_auxiliary_name", - "type string", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name boundnames", - "type keyword", - "shape", - "reader urword", - "optional true", - ], - [ - "block options", - "name print_input", - "type keyword", - "reader urword", - "optional true", - ], - [ - "block options", - "name print_concentration", - "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 concentration_filerecord", - "type record concentration fileout concfile", - "shape", - "reader urword", - "tagged true", - "optional true", - ], - [ - "block options", - "name concentration", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name concfile", - "type string", - "preserve_case true", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - ], - [ - "block options", - "name budget_filerecord", - "type record budget fileout budgetfile", - "shape", - "reader urword", - "tagged true", - "optional true", - ], - [ - "block options", - "name budget", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name fileout", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name budgetfile", - "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", - ], - [ - "block options", - "name ts_filerecord", - "type record ts6 filein ts6_filename", - "shape", - "reader urword", - "tagged true", - "optional true", - "construct_package ts", - "construct_data timeseries", - "parameter_name timeseries", - ], - [ - "block options", - "name ts6", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name filein", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name ts6_filename", - "type string", - "preserve_case true", - "in_record true", - "reader urword", - "optional false", - "tagged false", - ], - [ - "block options", - "name obs_filerecord", - "type record obs6 filein obs6_filename", - "shape", - "reader urword", - "tagged true", - "optional true", - "construct_package obs", - "construct_data observations", - "parameter_name continuous", - ], - [ - "block options", - "name obs6", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name obs6_filename", - "type string", - "preserve_case true", - "in_record true", - "tagged false", - "reader urword", - "optional false", - ], - [ - "block packagedata", - "name packagedata", - "type recarray ifno strt aux boundname", - "shape (maxbound)", - "reader urword", - ], - [ - "block packagedata", - "name ifno", - "type integer", - "shape", - "tagged false", - "in_record true", - "reader urword", - "numeric_index true", - ], - [ - "block packagedata", - "name strt", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block packagedata", - "name aux", - "type double precision", - "in_record true", - "tagged false", - "shape (naux)", - "reader urword", - "time_series true", - "optional true", - ], - [ - "block packagedata", - "name boundname", - "type string", - "shape", - "tagged false", - "in_record true", - "reader urword", - "optional true", - ], - [ - "block period", - "name iper", - "type integer", - "block_variable true", - "in_record true", - "tagged false", - "shape", - "valid", - "reader urword", - "optional false", - ], - [ - "block period", - "name mwtperioddata", - "type recarray ifno mwtsetting", - "shape", - "reader urword", - ], - [ - "block period", - "name ifno", - "type integer", - "shape", - "tagged false", - "in_record true", - "reader urword", - "numeric_index true", - ], - [ - "block period", - "name mwtsetting", - "type keystring status concentration rate auxiliaryrecord", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block period", - "name status", - "type string", - "shape", - "tagged true", - "in_record true", - "reader urword", - ], - [ - "block period", - "name concentration", - "type string", - "shape", - "tagged true", - "in_record true", - "time_series true", - "reader urword", - ], - [ - "block period", - "name rate", - "type string", - "shape", - "tagged true", - "in_record true", - "reader urword", - "time_series true", - ], - [ - "block period", - "name auxiliaryrecord", - "type record auxiliary auxname auxval", - "shape", - "tagged", - "in_record true", - "reader urword", - ], - [ - "block period", - "name auxiliary", - "type keyword", - "shape", - "in_record true", - "reader urword", - ], - [ - "block period", - "name auxname", - "type string", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block period", - "name auxval", - "type double precision", - "shape", - "tagged false", - "in_record true", - "reader urword", - "time_series true", - ], - ] - spec = { - "advanced": False, - "fkeys": { - "obs_filerecord": { - "abbr": "obs", - "key": "obs_filerecord", - "param": "continuous", - "parent": "parent_model_or_package", - "val": "observations", - }, - "ts_filerecord": { - "abbr": "ts", - "description": "xxx", - "key": "ts_filerecord", - "param": "timeseries", - "parent": "parent_package", - "val": "timeseries", - }, - }, - "multi": True, - "name": "gwt-mwt", - "options": { - "auxiliary": { - "block": "options", - "description": "defines an array of one or more auxiliary variable names. there is no limit on the number of auxiliary variables that can be provided on this line; however, lists of information provided in subsequent blocks must have a column of data for each auxiliary variable name defined here. the number of auxiliary variables detected on this line determines the value for naux. comments cannot be provided anywhere on this line as they will be interpreted as auxiliary variable names. auxiliary variables may not be used by the package, but they will be available for use by other parts of the program. the program will terminate with an error if auxiliary variables are specified on more than one line in the options block.", - "longname": "keyword to specify aux variables", - "name": "auxiliary", - "optional": True, - "reader": "urword", - "shape": "(naux)", - "type": "string", - }, - "boundnames": { - "block": "options", - "description": "keyword to indicate that boundary names may be provided with the list of well cells.", - "name": "boundnames", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "budget_filerecord": { - "block": "options", - "fields": { - "budgetfile": { - "block": "options", - "description": "name of the binary output file to write budget information.", - "longname": "file keyword", - "name": "budgetfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "budget_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "budgetcsv_filerecord": { - "block": "options", - "fields": { - "budgetcsvfile": { - "block": "options", - "description": "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.", - "longname": "file keyword", - "name": "budgetcsvfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "budgetcsv_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "concentration_filerecord": { - "block": "options", - "fields": { - "concfile": { - "block": "options", - "description": "name of the binary output file to write concentration information.", - "longname": "file keyword", - "name": "concfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "concentration_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "flow_package_auxiliary_name": { - "block": "options", - "description": "keyword to specify the name of an auxiliary variable in the corresponding flow package. if specified, then the simulated concentrations from this advanced transport package will be copied into the auxiliary variable specified with this name. note that the flow package must have an auxiliary variable with this name or the program will terminate with an error. if the flows for this advanced transport package are read from a file, then this option will have no effect.", - "longname": "keyword to specify name of concentration auxiliary variable in flow package", - "name": "flow_package_auxiliary_name", - "optional": True, - "reader": "urword", - "type": "string", - }, - "flow_package_name": { - "block": "options", - "description": "keyword to specify the name of the corresponding flow package. if not specified, then the corresponding flow package must have the same name as this advanced transport package (the name associated with this package in the gwt name file).", - "longname": "keyword to specify name of corresponding flow package", - "name": "flow_package_name", - "optional": True, - "reader": "urword", - "type": "string", - }, - "observations": { - "block": "options", - "description": "Contains data for the obs package. Data can be passed as a dictionary to the obs package with variable names as keys and package data as values. Data for the observations variable is also acceptable. See obs package documentation for more information.", - "name": "observations", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "obs", - "key": "obs_filerecord", - "param": "continuous", - "parent": "parent_model_or_package", - "val": "observations", - }, - "type": "record obs6 filein obs6_filename", - }, - "print_concentration": { - "block": "options", - "description": "keyword to indicate that the list of well {#2} will be printed to the listing file for every stress period in which 'concentration print' is specified in output control. if there is no output control option and print_{#3} is specified, then {#2} are printed for the last time step of each stress period.", - "longname": "print calculated concentrations to listing file", - "name": "print_concentration", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "print_flows": { - "block": "options", - "description": "keyword to indicate that the list of well 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.", - "longname": "print calculated flows to listing file", - "name": "print_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "print_input": { - "block": "options", - "description": "keyword to indicate that the list of well information will be written to the listing file immediately after it is read.", - "longname": "print input to listing file", - "name": "print_input", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "save_flows": { - "block": "options", - "description": "keyword to indicate that well flow terms will be written to the file specified with 'budget fileout' in output control.", - "longname": "save well flows to budget file", - "name": "save_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "timeseries": { - "block": "options", - "description": "Contains data for the ts package. Data can be passed as a dictionary to the ts package with variable names as keys and package data as values. Data for the timeseries variable is also acceptable. See ts package documentation for more information.", - "name": "timeseries", - "optional": True, - "reader": "urword", - "ref": { - "abbr": "ts", - "description": "xxx", - "key": "ts_filerecord", - "param": "timeseries", - "parent": "parent_package", - "val": "timeseries", - }, - "type": "record ts6 filein ts6_filename", - }, - }, - "packagedata": { - "packagedata": { - "block": "packagedata", - "item": { - "block": "packagedata", - "fields": { - "aux": { - "block": "packagedata", - "description": "represents the values of the auxiliary variables for each well. The values of auxiliary variables must be present for each well. The values must be specified in the order of the auxiliary variables specified in the OPTIONS block. If the package supports time series and the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "auxiliary variables", - "name": "aux", - "optional": "true", - "reader": "urword", - "shape": "(naux)", - "time_series": "true", - "type": "double precision", - }, - "boundname": { - "block": "packagedata", - "description": "name of the well cell. BOUNDNAME is an ASCII character variable that can contain as many as 40 characters. If BOUNDNAME contains spaces in it, then the entire name must be enclosed within single quotes.", - "longname": "well name", - "name": "boundname", - "optional": "true", - "reader": "urword", - "type": "string", - }, - "ifno": { - "block": "period", - "description": "integer value that defines the feature (well) number associated with the specified PERIOD data on the line. IFNO must be greater than zero and less than or equal to NMAWWELLS.", - "longname": "well number for this entry", - "name": "ifno", - "numeric_index": "true", - "reader": "urword", - "type": "integer", - }, - "strt": { - "block": "packagedata", - "description": "real value that defines the starting concentration for the well.", - "longname": "starting well concentration", - "name": "strt", - "reader": "urword", - "type": "double precision", - }, - }, - "name": "packagedata", - "reader": "urword", - "type": "record", - }, - "name": "packagedata", - "reader": "urword", - "shape": "(maxbound)", - "type": "recarray", - } - }, - "period": { - "mwtperioddata": { - "block": "period", - "item": { - "block": "period", - "fields": { - "ifno": { - "block": "period", - "description": "integer value that defines the feature (well) number associated with the specified period data on the line. ifno must be greater than zero and less than or equal to nmawwells.", - "longname": "well number for this entry", - "name": "ifno", - "numeric_index": True, - "reader": "urword", - "type": "integer", - }, - "mwtsetting": { - "block": "period", - "choices": { - "auxiliaryrecord": { - "block": "period", - "fields": { - "auxiliary": { - "block": "period", - "description": "keyword for specifying auxiliary variable.", - "name": "auxiliary", - "reader": "urword", - "type": "keyword", - }, - "auxname": { - "block": "period", - "description": "name for the auxiliary variable to be assigned AUXVAL. AUXNAME must match one of the auxiliary variable names defined in the OPTIONS block. If AUXNAME does not match one of the auxiliary variable names defined in the OPTIONS block the data are ignored.", - "name": "auxname", - "reader": "urword", - "type": "string", - }, - "auxval": { - "block": "period", - "description": "value for the auxiliary variable. If the Options block includes a TIMESERIESFILE entry (see the 'Time-Variable Input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "auxiliary variable value", - "name": "auxval", - "reader": "urword", - "time_series": "true", - "type": "double precision", - }, - }, - "name": "auxiliaryrecord", - "reader": "urword", - "type": "record", - }, - "concentration": { - "block": "period", - "description": "real or character value that defines the concentration for the well. the specified concentration is only applied if the well is a constant concentration well. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "well concentration", - "name": "concentration", - "reader": "urword", - "time_series": True, - "type": "string", - }, - "rate": { - "block": "period", - "description": "real or character value that defines the injection solute concentration $(ml^{-3})$ for the well. if the options block includes a timeseriesfile entry (see the 'time-variable input' section), values can be obtained from a time series by entering the time-series name in place of a numeric value.", - "longname": "well injection concentration", - "name": "rate", - "reader": "urword", - "time_series": True, - "type": "string", - }, - "status": { - "block": "period", - "description": "keyword option to define well status. status can be active, inactive, or constant. by default, status is active, which means that concentration will be calculated for the well. if a well is inactive, then there will be no solute mass fluxes into or out of the well and the inactive value will be written for the well concentration. if a well is constant, then the concentration for the well will be fixed at the user specified value.", - "longname": "well concentration status", - "name": "status", - "reader": "urword", - "type": "string", - }, - }, - "description": "line of information that is parsed into a keyword and values. keyword values that can be used to start the mwtsetting string include: status, concentration, rate, and auxiliary. these settings are used to assign the concentration associated with the corresponding flow terms. concentrations cannot be specified for all flow terms. for example, the multi-aquifer well package supports a 'withdrawal' flow term. if this withdrawal term is active, then water will be withdrawn from the well at the calculated concentration of the well.", - "name": "mwtsetting", - "reader": "urword", - "type": "keystring", - }, - }, - "name": "mwtperioddata", - "reader": "urword", - "type": "record", - }, - "name": "mwtperioddata", - "reader": "urword", - "type": "recarray", - }, - "transient_block": True, - }, - } + auxiliary = ArrayTemplateGenerator(('gwt6', 'mwt', 'options', 'auxiliary')) + concentration_filerecord = ListTemplateGenerator(('gwt6', 'mwt', 'options', 'concentration_filerecord')) + budget_filerecord = ListTemplateGenerator(('gwt6', 'mwt', 'options', 'budget_filerecord')) + budgetcsv_filerecord = ListTemplateGenerator(('gwt6', 'mwt', 'options', 'budgetcsv_filerecord')) + ts_filerecord = ListTemplateGenerator(('gwt6', 'mwt', 'options', 'ts_filerecord')) + obs_filerecord = ListTemplateGenerator(('gwt6', 'mwt', 'options', 'obs_filerecord')) + packagedata = ListTemplateGenerator(('gwt6', 'mwt', 'packagedata', 'packagedata')) + mwtperioddata = ListTemplateGenerator(('gwt6', 'mwt', 'period', 'mwtperioddata')) + package_abbr = 'gwtmwt' + _package_type = 'mwt' + dfn_file_name = 'gwt-mwt.dfn' + dfn = [['header', 'multi-package'], ['block options', 'name flow_package_name', 'type string', 'shape', 'reader urword', 'optional true'], ['block options', 'name auxiliary', 'type string', 'shape (naux)', 'reader urword', 'optional true'], ['block options', 'name flow_package_auxiliary_name', 'type string', 'shape', 'reader urword', 'optional true'], ['block options', 'name boundnames', 'type keyword', 'shape', 'reader urword', 'optional true'], ['block options', 'name print_input', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name print_concentration', '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 concentration_filerecord', 'type record concentration fileout concfile', 'shape', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name concentration', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name concfile', 'type string', 'preserve_case true', 'shape', 'in_record true', 'reader urword', 'tagged false', 'optional false'], ['block options', 'name budget_filerecord', 'type record budget fileout budgetfile', 'shape', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name budget', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name fileout', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name budgetfile', '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'], ['block options', 'name ts_filerecord', 'type record ts6 filein ts6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package ts', 'construct_data timeseries', 'parameter_name timeseries'], ['block options', 'name ts6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name filein', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name ts6_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false'], ['block options', 'name obs_filerecord', 'type record obs6 filein obs6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package obs', 'construct_data observations', 'parameter_name continuous'], ['block options', 'name obs6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name obs6_filename', 'type string', 'preserve_case true', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block packagedata', 'name packagedata', 'type recarray ifno strt aux boundname', 'shape (maxbound)', 'reader urword'], ['block packagedata', 'name ifno', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block packagedata', 'name strt', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block packagedata', 'name aux', 'type double precision', 'in_record true', 'tagged false', 'shape (naux)', 'reader urword', 'time_series true', 'optional true'], ['block packagedata', 'name boundname', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword', 'optional true'], ['block period', 'name iper', 'type integer', 'block_variable true', 'in_record true', 'tagged false', 'shape', 'valid', 'reader urword', 'optional false'], ['block period', 'name mwtperioddata', 'type recarray ifno mwtsetting', 'shape', 'reader urword'], ['block period', 'name ifno', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block period', 'name mwtsetting', 'type keystring status concentration rate auxiliaryrecord', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name status', 'type string', 'shape', 'tagged true', 'in_record true', 'reader urword'], ['block period', 'name concentration', 'type string', 'shape', 'tagged true', 'in_record true', 'time_series true', 'reader urword'], ['block period', 'name rate', 'type string', 'shape', 'tagged true', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name auxiliaryrecord', 'type record auxiliary auxname auxval', 'shape', 'tagged', 'in_record true', 'reader urword'], ['block period', 'name auxiliary', 'type keyword', 'shape', 'in_record true', 'reader urword'], ['block period', 'name auxname', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name auxval', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword', 'time_series true']] def __init__( self, @@ -915,6 +196,7 @@ def __init__( observations=None, packagedata=None, mwtperioddata=None, + filename=None, pname=None, **kwargs, @@ -929,38 +211,23 @@ def __init__( **kwargs, ) - self.flow_package_name = self.build_mfdata( - "flow_package_name", flow_package_name - ) - self.auxiliary = self.build_mfdata("auxiliary", auxiliary) - self.flow_package_auxiliary_name = self.build_mfdata( - "flow_package_auxiliary_name", flow_package_auxiliary_name - ) - self.boundnames = self.build_mfdata("boundnames", boundnames) - self.print_input = self.build_mfdata("print_input", print_input) - self.print_concentration = self.build_mfdata( - "print_concentration", print_concentration - ) - self.print_flows = self.build_mfdata("print_flows", print_flows) - self.save_flows = self.build_mfdata("save_flows", save_flows) - self.concentration_filerecord = self.build_mfdata( - "concentration_filerecord", concentration_filerecord - ) - self.budget_filerecord = self.build_mfdata( - "budget_filerecord", budget_filerecord - ) - self.budgetcsv_filerecord = self.build_mfdata( - "budgetcsv_filerecord", budgetcsv_filerecord - ) - self._ts_filerecord = self.build_mfdata("ts_filerecord", None) - self._ts_package = self.build_child_package( - "ts", timeseries, "timeseries", self._ts_filerecord - ) - self._obs_filerecord = self.build_mfdata("obs_filerecord", None) - self._obs_package = self.build_child_package( - "obs", observations, "continuous", self._obs_filerecord - ) - self.packagedata = self.build_mfdata("packagedata", packagedata) - self.mwtperioddata = self.build_mfdata("mwtperioddata", mwtperioddata) + self.flow_package_name = self.build_mfdata('flow_package_name', flow_package_name) + self.auxiliary = self.build_mfdata('auxiliary', auxiliary) + self.flow_package_auxiliary_name = self.build_mfdata('flow_package_auxiliary_name', flow_package_auxiliary_name) + self.boundnames = self.build_mfdata('boundnames', boundnames) + self.print_input = self.build_mfdata('print_input', print_input) + self.print_concentration = self.build_mfdata('print_concentration', print_concentration) + self.print_flows = self.build_mfdata('print_flows', print_flows) + self.save_flows = self.build_mfdata('save_flows', save_flows) + self.concentration_filerecord = self.build_mfdata('concentration_filerecord', concentration_filerecord) + self.budget_filerecord = self.build_mfdata('budget_filerecord', budget_filerecord) + self.budgetcsv_filerecord = self.build_mfdata('budgetcsv_filerecord', budgetcsv_filerecord) + self._ts_filerecord = self.build_mfdata('ts_filerecord', None) + self._ts_package = self.build_child_package('ts', timeseries, 'timeseries', self._ts_filerecord) + self._obs_filerecord = self.build_mfdata('obs_filerecord', None) + self._obs_package = self.build_child_package('obs', observations, 'continuous', self._obs_filerecord) + self.packagedata = self.build_mfdata('packagedata', packagedata) + self.mwtperioddata = self.build_mfdata('mwtperioddata', mwtperioddata) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwtnam.py b/flopy/mf6/modflow/mfgwtnam.py index 8977184891..c6dc661c5c 100644 --- a/flopy/mf6/modflow/mfgwtnam.py +++ b/flopy/mf6/modflow/mfgwtnam.py @@ -83,367 +83,14 @@ class ModflowGwtnam(MFPackage): """ - nc_mesh2d_filerecord = ListTemplateGenerator( - ("gwt6", "nam", "options", "nc_mesh2d_filerecord") - ) - nc_structured_filerecord = ListTemplateGenerator( - ("gwt6", "nam", "options", "nc_structured_filerecord") - ) - nc_filerecord = ListTemplateGenerator(("gwt6", "nam", "options", "nc_filerecord")) - packages = ListTemplateGenerator(("gwt6", "nam", "packages", "packages")) - package_abbr = "gwtnam" - _package_type = "nam" - dfn_file_name = "gwt-nam.dfn" - dfn = [ - ["header"], - [ - "block options", - "name list", - "type string", - "reader urword", - "optional true", - "preserve_case true", - ], - [ - "block options", - "name print_input", - "type keyword", - "reader urword", - "optional true", - ], - [ - "block options", - "name print_flows", - "type keyword", - "reader urword", - "optional true", - ], - [ - "block options", - "name save_flows", - "type keyword", - "reader urword", - "optional true", - ], - [ - "block options", - "name dependent_variable_scaling", - "type keyword", - "reader urword", - "optional true", - "mf6internal idv_scale", - ], - [ - "block options", - "name nc_mesh2d_filerecord", - "type record netcdf_mesh2d fileout ncmesh2dfile", - "shape", - "reader urword", - "tagged true", - "optional true", - "mf6internal ncmesh2drec", - ], - [ - "block options", - "name netcdf_mesh2d", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - "extended true", - ], - [ - "block options", - "name nc_structured_filerecord", - "type record netcdf_structured fileout ncstructfile", - "shape", - "reader urword", - "tagged true", - "optional true", - "mf6internal ncstructrec", - ], - [ - "block options", - "name netcdf_structured", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - "mf6internal netcdf_struct", - "extended true", - ], - [ - "block options", - "name fileout", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name ncmesh2dfile", - "type string", - "preserve_case true", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - "extended true", - ], - [ - "block options", - "name ncstructfile", - "type string", - "preserve_case true", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - "extended true", - ], - [ - "block options", - "name nc_filerecord", - "type record netcdf filein netcdf_filename", - "reader urword", - "tagged true", - "optional true", - ], - [ - "block options", - "name netcdf", - "type keyword", - "in_record true", - "reader urword", - "tagged true", - "optional false", - "extended true", - ], - [ - "block options", - "name filein", - "type keyword", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name netcdf_filename", - "type string", - "preserve_case true", - "in_record true", - "reader urword", - "optional false", - "tagged false", - "mf6internal netcdf_fname", - "extended true", - ], - [ - "block packages", - "name packages", - "type recarray ftype fname pname", - "reader urword", - "optional false", - ], - [ - "block packages", - "name ftype", - "in_record true", - "type string", - "tagged false", - "reader urword", - ], - [ - "block packages", - "name fname", - "in_record true", - "type string", - "preserve_case true", - "tagged false", - "reader urword", - ], - [ - "block packages", - "name pname", - "in_record true", - "type string", - "tagged false", - "reader urword", - "optional true", - ], - ] - spec = { - "advanced": False, - "multi": False, - "name": "gwt-nam", - "options": { - "dependent_variable_scaling": { - "block": "options", - "description": "flag to scale x and rhs to avoid very large positive or negative dependent variable values", - "longname": "flag to scale x and rhs", - "mf6internal": "idv_scale", - "name": "dependent_variable_scaling", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "list": { - "block": "options", - "description": "is name of the listing file to create for this gwt model. if not specified, then the name of the list file will be the basename of the gwt model name file and the '.lst' extension. for example, if the gwt name file is called 'my.model.nam' then the list file will be called 'my.model.lst'.", - "longname": "name of listing file", - "name": "list", - "optional": True, - "reader": "urword", - "type": "string", - }, - "nc_filerecord": { - "block": "options", - "description": "netcdf filerecord", - "fields": { - "netcdf_filename": { - "block": "options", - "description": "defines a NetCDF input file.", - "extended": "true", - "longname": "netcdf input filename", - "mf6internal": "netcdf_fname", - "name": "netcdf_filename", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "name": "nc_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "nc_mesh2d_filerecord": { - "block": "options", - "description": "netcdf layered mesh fileout record.", - "fields": { - "ncmesh2dfile": { - "block": "options", - "description": "name of the NetCDF ugrid layered mesh output file.", - "extended": "true", - "longname": "file keyword", - "name": "ncmesh2dfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "mf6internal": "ncmesh2drec", - "name": "nc_mesh2d_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "nc_structured_filerecord": { - "block": "options", - "description": "netcdf structured fileout record.", - "fields": { - "ncstructfile": { - "block": "options", - "description": "name of the NetCDF structured output file.", - "extended": "true", - "longname": "file keyword", - "name": "ncstructfile", - "optional": "false", - "reader": "urword", - "type": "string", - } - }, - "mf6internal": "ncstructrec", - "name": "nc_structured_filerecord", - "optional": True, - "reader": "urword", - "type": "record", - }, - "print_flows": { - "block": "options", - "description": "keyword to indicate that the list of all model package 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.", - "longname": "print calculated flows to listing file", - "name": "print_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "print_input": { - "block": "options", - "description": "keyword to indicate that the list of all model stress package information will be written to the listing file immediately after it is read.", - "longname": "print input to listing file", - "name": "print_input", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - "save_flows": { - "block": "options", - "description": "keyword to indicate that all model package flow terms will be written to the file specified with 'budget fileout' in output control.", - "longname": "save flows for all packages to budget file", - "name": "save_flows", - "optional": True, - "reader": "urword", - "type": "keyword", - }, - }, - "packages": { - "packages": { - "block": "packages", - "item": { - "block": "packages", - "fields": { - "fname": { - "block": "packages", - "description": "is the name of the file containing the package input. The path to the file should be included if the file is not located in the folder where the program was run.", - "longname": "file name", - "name": "fname", - "reader": "urword", - "type": "string", - }, - "ftype": { - "block": "packages", - "description": "is the file type, which must be one of the following character values shown in table~ref{table:ftype-gwt}. Ftype may be entered in any combination of uppercase and lowercase.", - "longname": "package type", - "name": "ftype", - "reader": "urword", - "type": "string", - }, - "pname": { - "block": "packages", - "description": "is the user-defined name for the package. PNAME is restricted to 16 characters. No spaces are allowed in PNAME. PNAME character values are read and stored by the program for stress packages only. These names may be useful for labeling purposes when multiple stress packages of the same type are located within a single GWT Model. If PNAME is specified for a stress package, then PNAME will be used in the flow budget table in the listing file; it will also be used for the text entry in the cell-by-cell budget file. PNAME is case insensitive and is stored in all upper case letters.", - "longname": "user name for package", - "name": "pname", - "optional": "true", - "reader": "urword", - "type": "string", - }, - }, - "longname": "package list", - "name": "packages", - "optional": False, - "reader": "urword", - "type": "record", - }, - "longname": "package list", - "name": "packages", - "optional": False, - "reader": "urword", - "type": "recarray", - } - }, - } + nc_mesh2d_filerecord = ListTemplateGenerator(('gwt6', 'nam', 'options', 'nc_mesh2d_filerecord')) + nc_structured_filerecord = ListTemplateGenerator(('gwt6', 'nam', 'options', 'nc_structured_filerecord')) + nc_filerecord = ListTemplateGenerator(('gwt6', 'nam', 'options', 'nc_filerecord')) + packages = ListTemplateGenerator(('gwt6', 'nam', 'packages', 'packages')) + package_abbr = 'gwtnam' + _package_type = 'nam' + dfn_file_name = 'gwt-nam.dfn' + dfn = [['header'], ['block options', 'name list', 'type string', 'reader urword', 'optional true', 'preserve_case true'], ['block options', 'name print_input', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name print_flows', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name save_flows', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name dependent_variable_scaling', 'type keyword', 'reader urword', 'optional true', 'mf6internal idv_scale'], ['block options', 'name nc_mesh2d_filerecord', 'type record netcdf_mesh2d fileout ncmesh2dfile', 'shape', 'reader urword', 'tagged true', 'optional true', 'mf6internal ncmesh2drec'], ['block options', 'name netcdf_mesh2d', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false', 'extended true'], ['block options', 'name nc_structured_filerecord', 'type record netcdf_structured fileout ncstructfile', 'shape', 'reader urword', 'tagged true', 'optional true', 'mf6internal ncstructrec'], ['block options', 'name netcdf_structured', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false', 'mf6internal netcdf_struct', 'extended true'], ['block options', 'name fileout', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name ncmesh2dfile', 'type string', 'preserve_case true', 'shape', 'in_record true', 'reader urword', 'tagged false', 'optional false', 'extended true'], ['block options', 'name ncstructfile', 'type string', 'preserve_case true', 'shape', 'in_record true', 'reader urword', 'tagged false', 'optional false', 'extended true'], ['block options', 'name nc_filerecord', 'type record netcdf filein netcdf_filename', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name netcdf', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false', 'extended true'], ['block options', 'name filein', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name netcdf_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false', 'mf6internal netcdf_fname', 'extended true'], ['block packages', 'name packages', 'type recarray ftype fname pname', 'reader urword', 'optional false'], ['block packages', 'name ftype', 'in_record true', 'type string', 'tagged false', 'reader urword'], ['block packages', 'name fname', 'in_record true', 'type string', 'preserve_case true', 'tagged false', 'reader urword'], ['block packages', 'name pname', 'in_record true', 'type string', 'tagged false', 'reader urword', 'optional true']] def __init__( self, @@ -458,6 +105,7 @@ def __init__( nc_structured_filerecord=None, nc_filerecord=None, packages=None, + filename=None, pname=None, **kwargs, @@ -472,20 +120,15 @@ def __init__( **kwargs, ) - self.list = self.build_mfdata("list", list) - 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.dependent_variable_scaling = self.build_mfdata( - "dependent_variable_scaling", dependent_variable_scaling - ) - self.nc_mesh2d_filerecord = self.build_mfdata( - "nc_mesh2d_filerecord", nc_mesh2d_filerecord - ) - self.nc_structured_filerecord = self.build_mfdata( - "nc_structured_filerecord", nc_structured_filerecord - ) - self.nc_filerecord = self.build_mfdata("nc_filerecord", nc_filerecord) - self.packages = self.build_mfdata("packages", packages) + self.list = self.build_mfdata('list', list) + 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.dependent_variable_scaling = self.build_mfdata('dependent_variable_scaling', dependent_variable_scaling) + self.nc_mesh2d_filerecord = self.build_mfdata('nc_mesh2d_filerecord', nc_mesh2d_filerecord) + self.nc_structured_filerecord = self.build_mfdata('nc_structured_filerecord', nc_structured_filerecord) + self.nc_filerecord = self.build_mfdata('nc_filerecord', nc_filerecord) + self.packages = self.build_mfdata('packages', packages) self._init_complete = True + diff --git a/flopy/mf6/modflow/mfgwtoc.py b/flopy/mf6/modflow/mfgwtoc.py index 0742dae6f3..7514dde236 100644 --- a/flopy/mf6/modflow/mfgwtoc.py +++ b/flopy/mf6/modflow/mfgwtoc.py @@ -65,474 +65,16 @@ class ModflowGwtoc(MFPackage): """ - budget_filerecord = ListTemplateGenerator( - ("gwt6", "oc", "options", "budget_filerecord") - ) - budgetcsv_filerecord = ListTemplateGenerator( - ("gwt6", "oc", "options", "budgetcsv_filerecord") - ) - concentration_filerecord = ListTemplateGenerator( - ("gwt6", "oc", "options", "concentration_filerecord") - ) - concentrationprintrecord = ListTemplateGenerator( - ("gwt6", "oc", "options", "concentrationprintrecord") - ) - saverecord = ListTemplateGenerator(("gwt6", "oc", "period", "saverecord")) - printrecord = ListTemplateGenerator(("gwt6", "oc", "period", "printrecord")) - package_abbr = "gwtoc" - _package_type = "oc" - dfn_file_name = "gwt-oc.dfn" - dfn = [ - ["header"], - [ - "block options", - "name budget_filerecord", - "type record budget fileout budgetfile", - "shape", - "reader urword", - "tagged true", - "optional true", - "mf6internal budfilerec", - ], - [ - "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", - "mf6internal budcsvfilerec", - ], - [ - "block options", - "name budgetcsv", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name budgetcsvfile", - "type string", - "preserve_case true", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - ], - [ - "block options", - "name concentration_filerecord", - "type record concentration fileout concentrationfile", - "shape", - "reader urword", - "tagged true", - "optional true", - "mf6internal concfilerec", - ], - [ - "block options", - "name concentration", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name concentrationfile", - "type string", - "preserve_case true", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - "mf6internal concfile", - ], - [ - "block options", - "name concentrationprintrecord", - "type record concentration print_format formatrecord", - "shape", - "reader urword", - "optional true", - "mf6internal concprintrec", - ], - [ - "block options", - "name print_format", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block options", - "name formatrecord", - "type record columns width digits format", - "shape", - "in_record true", - "reader urword", - "tagged", - "optional false", - ], - [ - "block options", - "name columns", - "type integer", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional", - ], - [ - "block options", - "name width", - "type integer", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional", - ], - [ - "block options", - "name digits", - "type integer", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional", - ], - [ - "block options", - "name format", - "type string", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - ], - [ - "block period", - "name iper", - "type integer", - "block_variable true", - "in_record true", - "tagged false", - "shape", - "valid", - "reader urword", - "optional false", - ], - [ - "block period", - "name saverecord", - "type record save rtype ocsetting", - "shape", - "reader urword", - "tagged false", - "optional true", - ], - [ - "block period", - "name save", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block period", - "name printrecord", - "type record print rtype ocsetting", - "shape", - "reader urword", - "tagged false", - "optional true", - ], - [ - "block period", - "name print", - "type keyword", - "shape", - "in_record true", - "reader urword", - "tagged true", - "optional false", - ], - [ - "block period", - "name rtype", - "type string", - "shape", - "in_record true", - "reader urword", - "tagged false", - "optional false", - ], - [ - "block period", - "name ocsetting", - "type keystring all first last frequency steps", - "shape", - "tagged false", - "in_record true", - "reader urword", - ], - [ - "block period", - "name all", - "type keyword", - "shape", - "in_record true", - "reader urword", - ], - [ - "block period", - "name first", - "type keyword", - "shape", - "in_record true", - "reader urword", - ], - [ - "block period", - "name last", - "type keyword", - "shape", - "in_record true", - "reader urword", - ], - [ - "block period", - "name frequency", - "type integer", - "shape", - "tagged true", - "in_record true", - "reader urword", - ], - [ - "block period", - "name steps", - "type integer", - "shape ( Date: Fri, 6 Feb 2026 18:10:50 -0500 Subject: [PATCH 3/3] ruff --- flopy/mf6/modflow/__init__.py | 34 +- flopy/mf6/modflow/mfems.py | 13 +- flopy/mf6/modflow/mfgnc.py | 111 +++- flopy/mf6/modflow/mfgwe.py | 1 - flopy/mf6/modflow/mfgweadv.py | 31 +- flopy/mf6/modflow/mfgwecnd.py | 155 ++++- flopy/mf6/modflow/mfgwectp.py | 243 +++++++- flopy/mf6/modflow/mfgwedis.py | 278 ++++++++- flopy/mf6/modflow/mfgwedisu.py | 380 ++++++++++-- flopy/mf6/modflow/mfgwedisv.py | 351 ++++++++++- flopy/mf6/modflow/mfgweesl.py | 242 +++++++- flopy/mf6/modflow/mfgweest.py | 150 ++++- flopy/mf6/modflow/mfgwefmi.py | 71 ++- flopy/mf6/modflow/mfgwegwe.py | 312 +++++++++- flopy/mf6/modflow/mfgweic.py | 51 +- flopy/mf6/modflow/mfgwelke.py | 516 +++++++++++++++- flopy/mf6/modflow/mfgwemve.py | 128 +++- flopy/mf6/modflow/mfgwemwe.py | 486 ++++++++++++++- flopy/mf6/modflow/mfgwenam.py | 234 ++++++- flopy/mf6/modflow/mfgweoc.py | 336 +++++++++- flopy/mf6/modflow/mfgwesfe.py | 518 +++++++++++++++- flopy/mf6/modflow/mfgwessm.py | 127 +++- flopy/mf6/modflow/mfgweuze.py | 478 +++++++++++++- flopy/mf6/modflow/mfgwf.py | 1 - flopy/mf6/modflow/mfgwfapi.py | 121 +++- flopy/mf6/modflow/mfgwfbuy.py | 161 ++++- flopy/mf6/modflow/mfgwfchd.py | 252 +++++++- flopy/mf6/modflow/mfgwfchdg.py | 200 +++++- flopy/mf6/modflow/mfgwfcsub.py | 891 +++++++++++++++++++++++++-- flopy/mf6/modflow/mfgwfdis.py | 278 ++++++++- flopy/mf6/modflow/mfgwfdisu.py | 380 ++++++++++-- flopy/mf6/modflow/mfgwfdisv.py | 351 ++++++++++- flopy/mf6/modflow/mfgwfdrn.py | 284 ++++++++- flopy/mf6/modflow/mfgwfdrng.py | 238 ++++++- flopy/mf6/modflow/mfgwfevt.py | 326 +++++++++- flopy/mf6/modflow/mfgwfevta.py | 272 +++++++- flopy/mf6/modflow/mfgwfghb.py | 262 +++++++- flopy/mf6/modflow/mfgwfghbg.py | 216 ++++++- flopy/mf6/modflow/mfgwfgnc.py | 111 +++- flopy/mf6/modflow/mfgwfgwe.py | 13 +- flopy/mf6/modflow/mfgwfgwf.py | 356 ++++++++++- flopy/mf6/modflow/mfgwfgwt.py | 13 +- flopy/mf6/modflow/mfgwfhfb.py | 86 ++- flopy/mf6/modflow/mfgwfic.py | 51 +- flopy/mf6/modflow/mfgwflak.py | 901 +++++++++++++++++++++++++-- flopy/mf6/modflow/mfgwfmaw.py | 778 +++++++++++++++++++++-- flopy/mf6/modflow/mfgwfmvr.py | 277 ++++++++- flopy/mf6/modflow/mfgwfnam.py | 248 +++++++- flopy/mf6/modflow/mfgwfnpf.py | 434 +++++++++++-- flopy/mf6/modflow/mfgwfoc.py | 331 +++++++++- flopy/mf6/modflow/mfgwfprt.py | 13 +- flopy/mf6/modflow/mfgwfrch.py | 252 +++++++- flopy/mf6/modflow/mfgwfrcha.py | 247 +++++++- flopy/mf6/modflow/mfgwfriv.py | 272 +++++++- flopy/mf6/modflow/mfgwfrivg.py | 232 ++++++- flopy/mf6/modflow/mfgwfsfr.py | 993 ++++++++++++++++++++++++++++-- flopy/mf6/modflow/mfgwfsto.py | 225 ++++++- flopy/mf6/modflow/mfgwfuzf.py | 645 +++++++++++++++++-- flopy/mf6/modflow/mfgwfvsc.py | 194 +++++- flopy/mf6/modflow/mfgwfwel.py | 324 +++++++++- flopy/mf6/modflow/mfgwfwelg.py | 272 +++++++- flopy/mf6/modflow/mfgwt.py | 1 - flopy/mf6/modflow/mfgwtadv.py | 31 +- flopy/mf6/modflow/mfgwtapi.py | 121 +++- flopy/mf6/modflow/mfgwtcnc.py | 243 +++++++- flopy/mf6/modflow/mfgwtdis.py | 278 ++++++++- flopy/mf6/modflow/mfgwtdisu.py | 380 ++++++++++-- flopy/mf6/modflow/mfgwtdisv.py | 351 ++++++++++- flopy/mf6/modflow/mfgwtdsp.py | 141 ++++- flopy/mf6/modflow/mfgwtfmi.py | 71 ++- flopy/mf6/modflow/mfgwtgwt.py | 312 +++++++++- flopy/mf6/modflow/mfgwtic.py | 51 +- flopy/mf6/modflow/mfgwtist.py | 436 +++++++++++-- flopy/mf6/modflow/mfgwtlkt.py | 498 ++++++++++++++- flopy/mf6/modflow/mfgwtmst.py | 210 ++++++- flopy/mf6/modflow/mfgwtmvt.py | 128 +++- flopy/mf6/modflow/mfgwtmwt.py | 468 +++++++++++++- flopy/mf6/modflow/mfgwtnam.py | 234 ++++++- flopy/mf6/modflow/mfgwtoc.py | 336 +++++++++- flopy/mf6/modflow/mfgwtsft.py | 500 ++++++++++++++- flopy/mf6/modflow/mfgwtsrc.py | 254 +++++++- flopy/mf6/modflow/mfgwtssm.py | 127 +++- flopy/mf6/modflow/mfgwtuzt.py | 478 +++++++++++++- flopy/mf6/modflow/mfims.py | 464 ++++++++++++-- flopy/mf6/modflow/mfmvr.py | 275 ++++++++- flopy/mf6/modflow/mfmvt.py | 126 +++- flopy/mf6/modflow/mfnam.py | 264 +++++++- flopy/mf6/modflow/mfprt.py | 1 - flopy/mf6/modflow/mfprtdis.py | 270 +++++++- flopy/mf6/modflow/mfprtdisv.py | 345 ++++++++++- flopy/mf6/modflow/mfprtfmi.py | 59 +- flopy/mf6/modflow/mfprtmip.py | 62 +- flopy/mf6/modflow/mfprtnam.py | 79 ++- flopy/mf6/modflow/mfprtoc.py | 494 ++++++++++++++- flopy/mf6/modflow/mfprtprp.py | 560 +++++++++++++++-- flopy/mf6/modflow/mfpts.py | 206 ++++++- flopy/mf6/modflow/mfsimulation.py | 4 +- flopy/mf6/modflow/mftdis.py | 129 +++- flopy/mf6/modflow/mfutlats.py | 91 ++- flopy/mf6/modflow/mfutlhpc.py | 57 +- flopy/mf6/modflow/mfutllaktab.py | 78 ++- flopy/mf6/modflow/mfutlncf.py | 135 +++- flopy/mf6/modflow/mfutlobs.py | 124 +++- flopy/mf6/modflow/mfutlsfrtab.py | 69 ++- flopy/mf6/modflow/mfutlspc.py | 142 ++++- flopy/mf6/modflow/mfutlspca.py | 118 +++- flopy/mf6/modflow/mfutltas.py | 147 ++++- flopy/mf6/modflow/mfutlts.py | 214 ++++++- flopy/mf6/modflow/mfutltvk.py | 145 ++++- flopy/mf6/modflow/mfutltvs.py | 146 ++++- 110 files changed, 24811 insertions(+), 2389 deletions(-) diff --git a/flopy/mf6/modflow/__init__.py b/flopy/mf6/modflow/__init__.py index 29502a06f4..c009179e2d 100644 --- a/flopy/mf6/modflow/__init__.py +++ b/flopy/mf6/modflow/__init__.py @@ -1,10 +1,7 @@ # autogenerated file, do not modify -from .mfgwegwe import ModflowGwegwe -from .mfgwfgwe import ModflowGwfgwe -from .mfgwfgwf import ModflowGwfgwf -from .mfgwfgwt import ModflowGwfgwt -from .mfgwfprt import ModflowGwfprt -from .mfgwtgwt import ModflowGwtgwt +from .mfems import ModflowEms +from .mfgnc import ModflowGnc +from .mfgwe import ModflowGwe from .mfgweadv import ModflowGweadv from .mfgwecnd import ModflowGwecnd from .mfgwectp import ModflowGwectp @@ -14,16 +11,17 @@ from .mfgweesl import ModflowGweesl from .mfgweest import ModflowGweest from .mfgwefmi import ModflowGwefmi +from .mfgwegwe import ModflowGwegwe from .mfgweic import ModflowGweic from .mfgwelke import ModflowGwelke from .mfgwemve import ModflowGwemve from .mfgwemwe import ModflowGwemwe from .mfgwenam import ModflowGwenam -from .mfgwe import ModflowGwe from .mfgweoc import ModflowGweoc from .mfgwesfe import ModflowGwesfe from .mfgwessm import ModflowGwessm from .mfgweuze import ModflowGweuze +from .mfgwf import ModflowGwf from .mfgwfapi import ModflowGwfapi from .mfgwfbuy import ModflowGwfbuy from .mfgwfchd import ModflowGwfchd @@ -39,17 +37,18 @@ from .mfgwfghb import ModflowGwfghb from .mfgwfghbg import ModflowGwfghbg from .mfgwfgnc import ModflowGwfgnc -from .mfgnc import ModflowGnc +from .mfgwfgwe import ModflowGwfgwe +from .mfgwfgwf import ModflowGwfgwf +from .mfgwfgwt import ModflowGwfgwt from .mfgwfhfb import ModflowGwfhfb from .mfgwfic import ModflowGwfic from .mfgwflak import ModflowGwflak from .mfgwfmaw import ModflowGwfmaw from .mfgwfmvr import ModflowGwfmvr -from .mfmvr import ModflowMvr from .mfgwfnam import ModflowGwfnam -from .mfgwf import ModflowGwf from .mfgwfnpf import ModflowGwfnpf from .mfgwfoc import ModflowGwfoc +from .mfgwfprt import ModflowGwfprt from .mfgwfrch import ModflowGwfrch from .mfgwfrcha import ModflowGwfrcha from .mfgwfriv import ModflowGwfriv @@ -60,6 +59,7 @@ from .mfgwfvsc import ModflowGwfvsc from .mfgwfwel import ModflowGwfwel from .mfgwfwelg import ModflowGwfwelg +from .mfgwt import ModflowGwt from .mfgwtadv import ModflowGwtadv from .mfgwtapi import ModflowGwtapi from .mfgwtcnc import ModflowGwtcnc @@ -68,34 +68,34 @@ from .mfgwtdisv import ModflowGwtdisv from .mfgwtdsp import ModflowGwtdsp from .mfgwtfmi import ModflowGwtfmi +from .mfgwtgwt import ModflowGwtgwt from .mfgwtic import ModflowGwtic from .mfgwtist import ModflowGwtist from .mfgwtlkt import ModflowGwtlkt from .mfgwtmst import ModflowGwtmst from .mfgwtmvt import ModflowGwtmvt -from .mfmvt import ModflowMvt from .mfgwtmwt import ModflowGwtmwt from .mfgwtnam import ModflowGwtnam -from .mfgwt import ModflowGwt from .mfgwtoc import ModflowGwtoc from .mfgwtsft import ModflowGwtsft from .mfgwtsrc import ModflowGwtsrc from .mfgwtssm import ModflowGwtssm from .mfgwtuzt import ModflowGwtuzt +from .mfims import ModflowIms +from .mfmvr import ModflowMvr +from .mfmvt import ModflowMvt +from .mfnam import ModflowNam +from .mfprt import ModflowPrt from .mfprtdis import ModflowPrtdis from .mfprtdisv import ModflowPrtdisv from .mfprtfmi import ModflowPrtfmi from .mfprtmip import ModflowPrtmip from .mfprtnam import ModflowPrtnam -from .mfprt import ModflowPrt from .mfprtoc import ModflowPrtoc from .mfprtprp import ModflowPrtprp -from .mfnam import ModflowNam +from .mfpts import ModflowPts from .mfsimulation import MFSimulation from .mftdis import ModflowTdis -from .mfems import ModflowEms -from .mfims import ModflowIms -from .mfpts import ModflowPts from .mfutlats import ModflowUtlats from .mfutlhpc import ModflowUtlhpc from .mfutllaktab import ModflowUtllaktab diff --git a/flopy/mf6/modflow/mfems.py b/flopy/mf6/modflow/mfems.py index f0462bf905..da51659fa0 100644 --- a/flopy/mf6/modflow/mfems.py +++ b/flopy/mf6/modflow/mfems.py @@ -19,7 +19,7 @@ class ModflowEms(MFPackage): loading_package : bool, default False Do not set this parameter. It is intended for debugging and internal processing purposes only. - + filename : str or PathLike, optional Name or path of file where this package is stored. pname : str, optional @@ -29,16 +29,15 @@ class ModflowEms(MFPackage): """ - package_abbr = 'ems' - _package_type = 'ems' - dfn_file_name = 'sln-ems.dfn' - dfn = [['header', ['solution_package', '*']]] + package_abbr = "ems" + _package_type = "ems" + dfn_file_name = "sln-ems.dfn" + dfn = [["header", ["solution_package", "*"]]] def __init__( self, simulation, loading_package=False, - filename=None, pname=None, **kwargs, @@ -53,6 +52,4 @@ def __init__( **kwargs, ) - self._init_complete = True - diff --git a/flopy/mf6/modflow/mfgnc.py b/flopy/mf6/modflow/mfgnc.py index af148105dd..3c56e769c1 100644 --- a/flopy/mf6/modflow/mfgnc.py +++ b/flopy/mf6/modflow/mfgnc.py @@ -85,11 +85,95 @@ class ModflowGnc(MFPackage): """ - gncdata = ListTemplateGenerator(('gnc', 'gncdata', 'gncdata')) - package_abbr = 'gnc' - _package_type = 'gnc' - dfn_file_name = 'gwf-gnc.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 explicit', 'type keyword', 'tagged true', 'reader urword', 'optional true'], ['block dimensions', 'name numgnc', 'type integer', 'reader urword', 'optional false'], ['block dimensions', 'name numalphaj', 'type integer', 'reader urword', 'optional false'], ['block gncdata', 'name gncdata', 'type recarray cellidn cellidm cellidsj alphasj', 'shape (maxbound)', 'reader urword'], ['block gncdata', 'name cellidn', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block gncdata', 'name cellidm', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block gncdata', 'name cellidsj', 'type integer', 'shape (numalphaj)', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block gncdata', 'name alphasj', 'type double precision', 'shape (numalphaj)', 'tagged false', 'in_record true', 'reader urword']] + gncdata = ListTemplateGenerator(("gnc", "gncdata", "gncdata")) + package_abbr = "gnc" + _package_type = "gnc" + dfn_file_name = "gwf-gnc.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 explicit", + "type keyword", + "tagged true", + "reader urword", + "optional true", + ], + [ + "block dimensions", + "name numgnc", + "type integer", + "reader urword", + "optional false", + ], + [ + "block dimensions", + "name numalphaj", + "type integer", + "reader urword", + "optional false", + ], + [ + "block gncdata", + "name gncdata", + "type recarray cellidn cellidm cellidsj alphasj", + "shape (maxbound)", + "reader urword", + ], + [ + "block gncdata", + "name cellidn", + "type integer", + "shape", + "tagged false", + "in_record true", + "reader urword", + "numeric_index true", + ], + [ + "block gncdata", + "name cellidm", + "type integer", + "shape", + "tagged false", + "in_record true", + "reader urword", + "numeric_index true", + ], + [ + "block gncdata", + "name cellidsj", + "type integer", + "shape (numalphaj)", + "tagged false", + "in_record true", + "reader urword", + "numeric_index true", + ], + [ + "block gncdata", + "name alphasj", + "type double precision", + "shape (numalphaj)", + "tagged false", + "in_record true", + "reader urword", + ], + ] def __init__( self, @@ -101,7 +185,6 @@ def __init__( numgnc=None, numalphaj=None, gncdata=None, - filename=None, pname=None, **kwargs, @@ -116,19 +199,21 @@ def __init__( **kwargs, ) - self.print_input = self.build_mfdata('print_input', print_input) - self.print_flows = self.build_mfdata('print_flows', print_flows) - self.explicit = self.build_mfdata('explicit', explicit) - self.numgnc = self.build_mfdata('numgnc', numgnc) - self.numalphaj = self.build_mfdata('numalphaj', numalphaj) - self.gncdata = self.build_mfdata('gncdata', gncdata) + self.print_input = self.build_mfdata("print_input", print_input) + self.print_flows = self.build_mfdata("print_flows", print_flows) + self.explicit = self.build_mfdata("explicit", explicit) + self.numgnc = self.build_mfdata("numgnc", numgnc) + self.numalphaj = self.build_mfdata("numalphaj", numalphaj) + self.gncdata = self.build_mfdata("gncdata", gncdata) self._init_complete = True + class GncPackages(MFChildPackages): """ GncPackages is a container class for the ModflowGnc class. """ + package_abbr = "gncpackages" def initialize( @@ -139,7 +224,6 @@ def initialize( numgnc=None, numalphaj=None, gncdata=None, - filename=None, pname=None, ): @@ -171,7 +255,6 @@ def append_package( numgnc=None, numalphaj=None, gncdata=None, - filename=None, pname=None, ): diff --git a/flopy/mf6/modflow/mfgwe.py b/flopy/mf6/modflow/mfgwe.py index d7a2520769..f024d9e61d 100644 --- a/flopy/mf6/modflow/mfgwe.py +++ b/flopy/mf6/modflow/mfgwe.py @@ -94,7 +94,6 @@ def __init__( nc_mesh2d_filerecord=None, nc_structured_filerecord=None, nc_filerecord=None, - **kwargs, ): """Initialize ModflowGwe.""" diff --git a/flopy/mf6/modflow/mfgweadv.py b/flopy/mf6/modflow/mfgweadv.py index b4c9976388..2a37750678 100644 --- a/flopy/mf6/modflow/mfgweadv.py +++ b/flopy/mf6/modflow/mfgweadv.py @@ -44,10 +44,27 @@ class ModflowGweadv(MFPackage): """ - package_abbr = 'gweadv' - _package_type = 'adv' - dfn_file_name = 'gwe-adv.dfn' - dfn = [['header'], ['block options', 'name scheme', 'type string', 'valid central upstream tvd', 'reader urword', 'optional true'], ['block options', 'name ats_percel', 'type double precision', 'reader urword', 'optional true']] + package_abbr = "gweadv" + _package_type = "adv" + dfn_file_name = "gwe-adv.dfn" + dfn = [ + ["header"], + [ + "block options", + "name scheme", + "type string", + "valid central upstream tvd", + "reader urword", + "optional true", + ], + [ + "block options", + "name ats_percel", + "type double precision", + "reader urword", + "optional true", + ], + ] def __init__( self, @@ -55,7 +72,6 @@ def __init__( loading_package=False, scheme=None, ats_percel=None, - filename=None, pname=None, **kwargs, @@ -70,8 +86,7 @@ def __init__( **kwargs, ) - self.scheme = self.build_mfdata('scheme', scheme) - self.ats_percel = self.build_mfdata('ats_percel', ats_percel) + self.scheme = self.build_mfdata("scheme", scheme) + self.ats_percel = self.build_mfdata("ats_percel", ats_percel) self._init_complete = True - diff --git a/flopy/mf6/modflow/mfgwecnd.py b/flopy/mf6/modflow/mfgwecnd.py index 7232d53165..1555436707 100644 --- a/flopy/mf6/modflow/mfgwecnd.py +++ b/flopy/mf6/modflow/mfgwecnd.py @@ -88,17 +88,122 @@ class ModflowGwecnd(MFPackage): """ - alh = ArrayTemplateGenerator(('gwe6', 'cnd', 'griddata', 'alh')) - alv = ArrayTemplateGenerator(('gwe6', 'cnd', 'griddata', 'alv')) - ath1 = ArrayTemplateGenerator(('gwe6', 'cnd', 'griddata', 'ath1')) - ath2 = ArrayTemplateGenerator(('gwe6', 'cnd', 'griddata', 'ath2')) - atv = ArrayTemplateGenerator(('gwe6', 'cnd', 'griddata', 'atv')) - ktw = ArrayTemplateGenerator(('gwe6', 'cnd', 'griddata', 'ktw')) - kts = ArrayTemplateGenerator(('gwe6', 'cnd', 'griddata', 'kts')) - package_abbr = 'gwecnd' - _package_type = 'cnd' - dfn_file_name = 'gwe-cnd.dfn' - dfn = [['header'], ['block options', 'name xt3d_off', 'type keyword', 'shape', 'reader urword', 'optional true'], ['block options', 'name xt3d_rhs', 'type keyword', 'shape', 'reader urword', 'optional true'], ['block options', 'name export_array_ascii', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_ascii'], ['block options', 'name export_array_netcdf', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_nc', 'extended true'], ['block griddata', 'name alh', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true', 'optional true'], ['block griddata', 'name alv', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true', 'optional true'], ['block griddata', 'name ath1', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true', 'optional true'], ['block griddata', 'name ath2', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true', 'optional true'], ['block griddata', 'name atv', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true', 'optional true'], ['block griddata', 'name ktw', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true', 'optional true'], ['block griddata', 'name kts', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true', 'optional true']] + alh = ArrayTemplateGenerator(("gwe6", "cnd", "griddata", "alh")) + alv = ArrayTemplateGenerator(("gwe6", "cnd", "griddata", "alv")) + ath1 = ArrayTemplateGenerator(("gwe6", "cnd", "griddata", "ath1")) + ath2 = ArrayTemplateGenerator(("gwe6", "cnd", "griddata", "ath2")) + atv = ArrayTemplateGenerator(("gwe6", "cnd", "griddata", "atv")) + ktw = ArrayTemplateGenerator(("gwe6", "cnd", "griddata", "ktw")) + kts = ArrayTemplateGenerator(("gwe6", "cnd", "griddata", "kts")) + package_abbr = "gwecnd" + _package_type = "cnd" + dfn_file_name = "gwe-cnd.dfn" + dfn = [ + ["header"], + [ + "block options", + "name xt3d_off", + "type keyword", + "shape", + "reader urword", + "optional true", + ], + [ + "block options", + "name xt3d_rhs", + "type keyword", + "shape", + "reader urword", + "optional true", + ], + [ + "block options", + "name export_array_ascii", + "type keyword", + "reader urword", + "optional true", + "mf6internal export_ascii", + ], + [ + "block options", + "name export_array_netcdf", + "type keyword", + "reader urword", + "optional true", + "mf6internal export_nc", + "extended true", + ], + [ + "block griddata", + "name alh", + "type double precision", + "shape (nodes)", + "reader readarray", + "layered true", + "netcdf true", + "optional true", + ], + [ + "block griddata", + "name alv", + "type double precision", + "shape (nodes)", + "reader readarray", + "layered true", + "netcdf true", + "optional true", + ], + [ + "block griddata", + "name ath1", + "type double precision", + "shape (nodes)", + "reader readarray", + "layered true", + "netcdf true", + "optional true", + ], + [ + "block griddata", + "name ath2", + "type double precision", + "shape (nodes)", + "reader readarray", + "layered true", + "netcdf true", + "optional true", + ], + [ + "block griddata", + "name atv", + "type double precision", + "shape (nodes)", + "reader readarray", + "layered true", + "netcdf true", + "optional true", + ], + [ + "block griddata", + "name ktw", + "type double precision", + "shape (nodes)", + "reader readarray", + "layered true", + "netcdf true", + "optional true", + ], + [ + "block griddata", + "name kts", + "type double precision", + "shape (nodes)", + "reader readarray", + "layered true", + "netcdf true", + "optional true", + ], + ] def __init__( self, @@ -115,7 +220,6 @@ def __init__( atv=None, ktw=None, kts=None, - filename=None, pname=None, **kwargs, @@ -130,17 +234,20 @@ def __init__( **kwargs, ) - self.xt3d_off = self.build_mfdata('xt3d_off', xt3d_off) - self.xt3d_rhs = self.build_mfdata('xt3d_rhs', xt3d_rhs) - self.export_array_ascii = self.build_mfdata('export_array_ascii', export_array_ascii) - self.export_array_netcdf = self.build_mfdata('export_array_netcdf', export_array_netcdf) - self.alh = self.build_mfdata('alh', alh) - self.alv = self.build_mfdata('alv', alv) - self.ath1 = self.build_mfdata('ath1', ath1) - self.ath2 = self.build_mfdata('ath2', ath2) - self.atv = self.build_mfdata('atv', atv) - self.ktw = self.build_mfdata('ktw', ktw) - self.kts = self.build_mfdata('kts', kts) + self.xt3d_off = self.build_mfdata("xt3d_off", xt3d_off) + self.xt3d_rhs = self.build_mfdata("xt3d_rhs", xt3d_rhs) + self.export_array_ascii = self.build_mfdata( + "export_array_ascii", export_array_ascii + ) + self.export_array_netcdf = self.build_mfdata( + "export_array_netcdf", export_array_netcdf + ) + self.alh = self.build_mfdata("alh", alh) + self.alv = self.build_mfdata("alv", alv) + self.ath1 = self.build_mfdata("ath1", ath1) + self.ath2 = self.build_mfdata("ath2", ath2) + self.atv = self.build_mfdata("atv", atv) + self.ktw = self.build_mfdata("ktw", ktw) + self.kts = self.build_mfdata("kts", kts) self._init_complete = True - diff --git a/flopy/mf6/modflow/mfgwectp.py b/flopy/mf6/modflow/mfgwectp.py index 9704b51987..937f047b95 100644 --- a/flopy/mf6/modflow/mfgwectp.py +++ b/flopy/mf6/modflow/mfgwectp.py @@ -95,14 +95,209 @@ class ModflowGwectp(MFPackage): """ - auxiliary = ArrayTemplateGenerator(('gwe6', 'ctp', 'options', 'auxiliary')) - ts_filerecord = ListTemplateGenerator(('gwe6', 'ctp', 'options', 'ts_filerecord')) - obs_filerecord = ListTemplateGenerator(('gwe6', 'ctp', 'options', 'obs_filerecord')) - stress_period_data = ListTemplateGenerator(('gwe6', 'ctp', 'period', 'stress_period_data')) - package_abbr = 'gwectp' - _package_type = 'ctp' - dfn_file_name = 'gwe-ctp.dfn' - dfn = [['header', 'multi-package'], ['block options', 'name auxiliary', 'type string', 'shape (naux)', 'reader urword', 'optional true'], ['block options', 'name auxmultname', 'type string', 'shape', 'reader urword', 'optional true'], ['block options', 'name boundnames', 'type keyword', 'shape', 'reader urword', 'optional true'], ['block options', 'name print_input', 'type keyword', 'reader urword', 'optional true', 'mf6internal iprflow'], ['block options', 'name print_flows', 'type keyword', 'reader urword', 'optional true', 'mf6internal ipakcb'], ['block options', 'name save_flows', 'type keyword', 'reader urword', 'optional true', 'mf6internal iprpak'], ['block options', 'name ts_filerecord', 'type record ts6 filein ts6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package ts', 'construct_data timeseries', 'parameter_name timeseries'], ['block options', 'name ts6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name filein', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name ts6_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false'], ['block options', 'name obs_filerecord', 'type record obs6 filein obs6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package obs', 'construct_data observations', 'parameter_name continuous'], ['block options', 'name obs6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name obs6_filename', 'type string', 'preserve_case true', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block dimensions', 'name maxbound', 'type integer', 'reader urword', 'optional false'], ['block period', 'name iper', 'type integer', 'block_variable true', 'in_record true', 'tagged false', 'shape', 'valid', 'reader urword', 'optional false'], ['block period', 'name stress_period_data', 'type recarray cellid temp aux boundname', 'shape (maxbound)', 'reader urword', 'mf6internal spd'], ['block period', 'name cellid', 'type integer', 'shape (ncelldim)', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name temp', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword', 'time_series true', 'mf6internal tspvar'], ['block period', 'name aux', 'type double precision', 'in_record true', 'tagged false', 'shape (naux)', 'reader urword', 'optional true', 'time_series true', 'mf6internal auxvar'], ['block period', 'name boundname', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword', 'optional true']] + auxiliary = ArrayTemplateGenerator(("gwe6", "ctp", "options", "auxiliary")) + ts_filerecord = ListTemplateGenerator(("gwe6", "ctp", "options", "ts_filerecord")) + obs_filerecord = ListTemplateGenerator(("gwe6", "ctp", "options", "obs_filerecord")) + stress_period_data = ListTemplateGenerator( + ("gwe6", "ctp", "period", "stress_period_data") + ) + package_abbr = "gwectp" + _package_type = "ctp" + dfn_file_name = "gwe-ctp.dfn" + dfn = [ + ["header", "multi-package"], + [ + "block options", + "name auxiliary", + "type string", + "shape (naux)", + "reader urword", + "optional true", + ], + [ + "block options", + "name auxmultname", + "type string", + "shape", + "reader urword", + "optional true", + ], + [ + "block options", + "name boundnames", + "type keyword", + "shape", + "reader urword", + "optional true", + ], + [ + "block options", + "name print_input", + "type keyword", + "reader urword", + "optional true", + "mf6internal iprflow", + ], + [ + "block options", + "name print_flows", + "type keyword", + "reader urword", + "optional true", + "mf6internal ipakcb", + ], + [ + "block options", + "name save_flows", + "type keyword", + "reader urword", + "optional true", + "mf6internal iprpak", + ], + [ + "block options", + "name ts_filerecord", + "type record ts6 filein ts6_filename", + "shape", + "reader urword", + "tagged true", + "optional true", + "construct_package ts", + "construct_data timeseries", + "parameter_name timeseries", + ], + [ + "block options", + "name ts6", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name filein", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name ts6_filename", + "type string", + "preserve_case true", + "in_record true", + "reader urword", + "optional false", + "tagged false", + ], + [ + "block options", + "name obs_filerecord", + "type record obs6 filein obs6_filename", + "shape", + "reader urword", + "tagged true", + "optional true", + "construct_package obs", + "construct_data observations", + "parameter_name continuous", + ], + [ + "block options", + "name obs6", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name obs6_filename", + "type string", + "preserve_case true", + "in_record true", + "tagged false", + "reader urword", + "optional false", + ], + [ + "block dimensions", + "name maxbound", + "type integer", + "reader urword", + "optional false", + ], + [ + "block period", + "name iper", + "type integer", + "block_variable true", + "in_record true", + "tagged false", + "shape", + "valid", + "reader urword", + "optional false", + ], + [ + "block period", + "name stress_period_data", + "type recarray cellid temp aux boundname", + "shape (maxbound)", + "reader urword", + "mf6internal spd", + ], + [ + "block period", + "name cellid", + "type integer", + "shape (ncelldim)", + "tagged false", + "in_record true", + "reader urword", + ], + [ + "block period", + "name temp", + "type double precision", + "shape", + "tagged false", + "in_record true", + "reader urword", + "time_series true", + "mf6internal tspvar", + ], + [ + "block period", + "name aux", + "type double precision", + "in_record true", + "tagged false", + "shape (naux)", + "reader urword", + "optional true", + "time_series true", + "mf6internal auxvar", + ], + [ + "block period", + "name boundname", + "type string", + "shape", + "tagged false", + "in_record true", + "reader urword", + "optional true", + ], + ] def __init__( self, @@ -118,7 +313,6 @@ def __init__( observations=None, maxbound=None, stress_period_data=None, - filename=None, pname=None, **kwargs, @@ -133,18 +327,23 @@ def __init__( **kwargs, ) - self.auxiliary = self.build_mfdata('auxiliary', auxiliary) - self.auxmultname = self.build_mfdata('auxmultname', auxmultname) - self.boundnames = self.build_mfdata('boundnames', boundnames) - self.print_input = self.build_mfdata('print_input', print_input) - self.print_flows = self.build_mfdata('print_flows', print_flows) - self.save_flows = self.build_mfdata('save_flows', save_flows) - self._ts_filerecord = self.build_mfdata('ts_filerecord', None) - self._ts_package = self.build_child_package('ts', timeseries, 'timeseries', self._ts_filerecord) - self._obs_filerecord = self.build_mfdata('obs_filerecord', None) - self._obs_package = self.build_child_package('obs', observations, 'continuous', self._obs_filerecord) - self.maxbound = self.build_mfdata('maxbound', maxbound) - self.stress_period_data = self.build_mfdata('stress_period_data', stress_period_data) + self.auxiliary = self.build_mfdata("auxiliary", auxiliary) + self.auxmultname = self.build_mfdata("auxmultname", auxmultname) + self.boundnames = self.build_mfdata("boundnames", boundnames) + self.print_input = self.build_mfdata("print_input", print_input) + self.print_flows = self.build_mfdata("print_flows", print_flows) + self.save_flows = self.build_mfdata("save_flows", save_flows) + self._ts_filerecord = self.build_mfdata("ts_filerecord", None) + self._ts_package = self.build_child_package( + "ts", timeseries, "timeseries", self._ts_filerecord + ) + self._obs_filerecord = self.build_mfdata("obs_filerecord", None) + self._obs_package = self.build_child_package( + "obs", observations, "continuous", self._obs_filerecord + ) + self.maxbound = self.build_mfdata("maxbound", maxbound) + self.stress_period_data = self.build_mfdata( + "stress_period_data", stress_period_data + ) self._init_complete = True - diff --git a/flopy/mf6/modflow/mfgwedis.py b/flopy/mf6/modflow/mfgwedis.py index 40a507ae07..304cc6e100 100644 --- a/flopy/mf6/modflow/mfgwedis.py +++ b/flopy/mf6/modflow/mfgwedis.py @@ -94,17 +94,229 @@ class ModflowGwedis(MFPackage): """ - grb_filerecord = ListTemplateGenerator(('gwe6', 'dis', 'options', 'grb_filerecord')) - ncf_filerecord = ListTemplateGenerator(('gwe6', 'dis', 'options', 'ncf_filerecord')) - delr = ArrayTemplateGenerator(('gwe6', 'dis', 'griddata', 'delr')) - delc = ArrayTemplateGenerator(('gwe6', 'dis', 'griddata', 'delc')) - top = ArrayTemplateGenerator(('gwe6', 'dis', 'griddata', 'top')) - botm = ArrayTemplateGenerator(('gwe6', 'dis', 'griddata', 'botm')) - idomain = ArrayTemplateGenerator(('gwe6', 'dis', 'griddata', 'idomain')) - package_abbr = 'gwedis' - _package_type = 'dis' - dfn_file_name = 'gwe-dis.dfn' - dfn = [['header'], ['block options', 'name length_units', 'type string', 'reader urword', 'optional true'], ['block options', 'name nogrb', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name grb_filerecord', 'type record grb6 fileout grb6_filename', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name grb6', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name fileout', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name grb6_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false'], ['block options', 'name xorigin', 'type double precision', 'reader urword', 'optional true'], ['block options', 'name yorigin', 'type double precision', 'reader urword', 'optional true'], ['block options', 'name angrot', 'type double precision', 'reader urword', 'optional true'], ['block options', 'name export_array_ascii', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_ascii'], ['block options', 'name export_array_netcdf', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_nc', 'extended true'], ['block options', 'name crs', 'type string', 'shape lenbigline', 'preserve_case true', 'reader urword', 'optional true', 'developmode true'], ['block options', 'name ncf_filerecord', 'type record ncf6 filein ncf6_filename', 'reader urword', 'tagged true', 'optional true', 'construct_package ncf', 'construct_data packagedata', 'parameter_name packagedata'], ['block options', 'name ncf6', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false', 'extended true'], ['block options', 'name filein', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name ncf6_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false', 'extended true'], ['block dimensions', 'name nlay', 'type integer', 'reader urword', 'optional false', 'default 1'], ['block dimensions', 'name nrow', 'type integer', 'reader urword', 'optional false', 'default 2'], ['block dimensions', 'name ncol', 'type integer', 'reader urword', 'optional false', 'default 2'], ['block griddata', 'name delr', 'type double precision', 'shape (ncol)', 'reader readarray', 'netcdf true', 'default 1.0'], ['block griddata', 'name delc', 'type double precision', 'shape (nrow)', 'reader readarray', 'netcdf true', 'default 1.0'], ['block griddata', 'name top', 'type double precision', 'shape (ncol, nrow)', 'reader readarray', 'netcdf true', 'default 1.0'], ['block griddata', 'name botm', 'type double precision', 'shape (ncol, nrow, nlay)', 'reader readarray', 'layered true', 'netcdf true', 'default 0.'], ['block griddata', 'name idomain', 'type integer', 'shape (ncol, nrow, nlay)', 'reader readarray', 'layered true', 'netcdf true', 'optional true']] + grb_filerecord = ListTemplateGenerator(("gwe6", "dis", "options", "grb_filerecord")) + ncf_filerecord = ListTemplateGenerator(("gwe6", "dis", "options", "ncf_filerecord")) + delr = ArrayTemplateGenerator(("gwe6", "dis", "griddata", "delr")) + delc = ArrayTemplateGenerator(("gwe6", "dis", "griddata", "delc")) + top = ArrayTemplateGenerator(("gwe6", "dis", "griddata", "top")) + botm = ArrayTemplateGenerator(("gwe6", "dis", "griddata", "botm")) + idomain = ArrayTemplateGenerator(("gwe6", "dis", "griddata", "idomain")) + package_abbr = "gwedis" + _package_type = "dis" + dfn_file_name = "gwe-dis.dfn" + dfn = [ + ["header"], + [ + "block options", + "name length_units", + "type string", + "reader urword", + "optional true", + ], + [ + "block options", + "name nogrb", + "type keyword", + "reader urword", + "optional true", + ], + [ + "block options", + "name grb_filerecord", + "type record grb6 fileout grb6_filename", + "reader urword", + "tagged true", + "optional true", + ], + [ + "block options", + "name grb6", + "type keyword", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name fileout", + "type keyword", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name grb6_filename", + "type string", + "preserve_case true", + "in_record true", + "reader urword", + "optional false", + "tagged false", + ], + [ + "block options", + "name xorigin", + "type double precision", + "reader urword", + "optional true", + ], + [ + "block options", + "name yorigin", + "type double precision", + "reader urword", + "optional true", + ], + [ + "block options", + "name angrot", + "type double precision", + "reader urword", + "optional true", + ], + [ + "block options", + "name export_array_ascii", + "type keyword", + "reader urword", + "optional true", + "mf6internal export_ascii", + ], + [ + "block options", + "name export_array_netcdf", + "type keyword", + "reader urword", + "optional true", + "mf6internal export_nc", + "extended true", + ], + [ + "block options", + "name crs", + "type string", + "shape lenbigline", + "preserve_case true", + "reader urword", + "optional true", + "developmode true", + ], + [ + "block options", + "name ncf_filerecord", + "type record ncf6 filein ncf6_filename", + "reader urword", + "tagged true", + "optional true", + "construct_package ncf", + "construct_data packagedata", + "parameter_name packagedata", + ], + [ + "block options", + "name ncf6", + "type keyword", + "in_record true", + "reader urword", + "tagged true", + "optional false", + "extended true", + ], + [ + "block options", + "name filein", + "type keyword", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name ncf6_filename", + "type string", + "preserve_case true", + "in_record true", + "reader urword", + "optional false", + "tagged false", + "extended true", + ], + [ + "block dimensions", + "name nlay", + "type integer", + "reader urword", + "optional false", + "default 1", + ], + [ + "block dimensions", + "name nrow", + "type integer", + "reader urword", + "optional false", + "default 2", + ], + [ + "block dimensions", + "name ncol", + "type integer", + "reader urword", + "optional false", + "default 2", + ], + [ + "block griddata", + "name delr", + "type double precision", + "shape (ncol)", + "reader readarray", + "netcdf true", + "default 1.0", + ], + [ + "block griddata", + "name delc", + "type double precision", + "shape (nrow)", + "reader readarray", + "netcdf true", + "default 1.0", + ], + [ + "block griddata", + "name top", + "type double precision", + "shape (ncol, nrow)", + "reader readarray", + "netcdf true", + "default 1.0", + ], + [ + "block griddata", + "name botm", + "type double precision", + "shape (ncol, nrow, nlay)", + "reader readarray", + "layered true", + "netcdf true", + "default 0.", + ], + [ + "block griddata", + "name idomain", + "type integer", + "shape (ncol, nrow, nlay)", + "reader readarray", + "layered true", + "netcdf true", + "optional true", + ], + ] def __init__( self, @@ -127,7 +339,6 @@ def __init__( top=1.0, botm=0.0, idomain=None, - filename=None, pname=None, **kwargs, @@ -142,24 +353,29 @@ def __init__( **kwargs, ) - self.length_units = self.build_mfdata('length_units', length_units) - self.nogrb = self.build_mfdata('nogrb', nogrb) - self.grb_filerecord = self.build_mfdata('grb_filerecord', grb_filerecord) - self.xorigin = self.build_mfdata('xorigin', xorigin) - self.yorigin = self.build_mfdata('yorigin', yorigin) - self.angrot = self.build_mfdata('angrot', angrot) - self.export_array_ascii = self.build_mfdata('export_array_ascii', export_array_ascii) - self.export_array_netcdf = self.build_mfdata('export_array_netcdf', export_array_netcdf) - self._ncf_filerecord = self.build_mfdata('ncf_filerecord', None) - self._ncf_package = self.build_child_package('ncf', packagedata, 'packagedata', self._ncf_filerecord) - self.nlay = self.build_mfdata('nlay', nlay) - self.nrow = self.build_mfdata('nrow', nrow) - self.ncol = self.build_mfdata('ncol', ncol) - self.delr = self.build_mfdata('delr', delr) - self.delc = self.build_mfdata('delc', delc) - self.top = self.build_mfdata('top', top) - self.botm = self.build_mfdata('botm', botm) - self.idomain = self.build_mfdata('idomain', idomain) + self.length_units = self.build_mfdata("length_units", length_units) + self.nogrb = self.build_mfdata("nogrb", nogrb) + self.grb_filerecord = self.build_mfdata("grb_filerecord", grb_filerecord) + self.xorigin = self.build_mfdata("xorigin", xorigin) + self.yorigin = self.build_mfdata("yorigin", yorigin) + self.angrot = self.build_mfdata("angrot", angrot) + self.export_array_ascii = self.build_mfdata( + "export_array_ascii", export_array_ascii + ) + self.export_array_netcdf = self.build_mfdata( + "export_array_netcdf", export_array_netcdf + ) + self._ncf_filerecord = self.build_mfdata("ncf_filerecord", None) + self._ncf_package = self.build_child_package( + "ncf", packagedata, "packagedata", self._ncf_filerecord + ) + self.nlay = self.build_mfdata("nlay", nlay) + self.nrow = self.build_mfdata("nrow", nrow) + self.ncol = self.build_mfdata("ncol", ncol) + self.delr = self.build_mfdata("delr", delr) + self.delc = self.build_mfdata("delc", delc) + self.top = self.build_mfdata("top", top) + self.botm = self.build_mfdata("botm", botm) + self.idomain = self.build_mfdata("idomain", idomain) self._init_complete = True - diff --git a/flopy/mf6/modflow/mfgwedisu.py b/flopy/mf6/modflow/mfgwedisu.py index 3d823bd4f0..7339edf08f 100644 --- a/flopy/mf6/modflow/mfgwedisu.py +++ b/flopy/mf6/modflow/mfgwedisu.py @@ -174,23 +174,317 @@ class ModflowGwedisu(MFPackage): """ - grb_filerecord = ListTemplateGenerator(('gwe6', 'disu', 'options', 'grb_filerecord')) - top = ArrayTemplateGenerator(('gwe6', 'disu', 'griddata', 'top')) - bot = ArrayTemplateGenerator(('gwe6', 'disu', 'griddata', 'bot')) - area = ArrayTemplateGenerator(('gwe6', 'disu', 'griddata', 'area')) - idomain = ArrayTemplateGenerator(('gwe6', 'disu', 'griddata', 'idomain')) - iac = ArrayTemplateGenerator(('gwe6', 'disu', 'connectiondata', 'iac')) - ja = ArrayTemplateGenerator(('gwe6', 'disu', 'connectiondata', 'ja')) - ihc = ArrayTemplateGenerator(('gwe6', 'disu', 'connectiondata', 'ihc')) - cl12 = ArrayTemplateGenerator(('gwe6', 'disu', 'connectiondata', 'cl12')) - hwva = ArrayTemplateGenerator(('gwe6', 'disu', 'connectiondata', 'hwva')) - angldegx = ArrayTemplateGenerator(('gwe6', 'disu', 'connectiondata', 'angldegx')) - vertices = ListTemplateGenerator(('gwe6', 'disu', 'vertices', 'vertices')) - cell2d = ListTemplateGenerator(('gwe6', 'disu', 'cell2d', 'cell2d')) - package_abbr = 'gwedisu' - _package_type = 'disu' - dfn_file_name = 'gwe-disu.dfn' - dfn = [['header'], ['block options', 'name length_units', 'type string', 'reader urword', 'optional true'], ['block options', 'name nogrb', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name grb_filerecord', 'type record grb6 fileout grb6_filename', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name grb6', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name fileout', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name grb6_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false'], ['block options', 'name xorigin', 'type double precision', 'reader urword', 'optional true'], ['block options', 'name yorigin', 'type double precision', 'reader urword', 'optional true'], ['block options', 'name angrot', 'type double precision', 'reader urword', 'optional true'], ['block options', 'name vertical_offset_tolerance', 'type double precision', 'reader urword', 'optional true', 'default 0.0', 'mf6internal voffsettol'], ['block options', 'name export_array_ascii', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_ascii'], ['block options', 'name crs', 'type string', 'shape lenbigline', 'preserve_case true', 'reader urword', 'optional true', 'developmode true'], ['block dimensions', 'name nodes', 'type integer', 'reader urword', 'optional false'], ['block dimensions', 'name nja', 'type integer', 'reader urword', 'optional false'], ['block dimensions', 'name nvert', 'type integer', 'reader urword', 'optional true'], ['block griddata', 'name top', 'type double precision', 'shape (nodes)', 'reader readarray'], ['block griddata', 'name bot', 'type double precision', 'shape (nodes)', 'reader readarray'], ['block griddata', 'name area', 'type double precision', 'shape (nodes)', 'reader readarray'], ['block griddata', 'name idomain', 'type integer', 'shape (nodes)', 'reader readarray', 'layered false', 'optional true'], ['block connectiondata', 'name iac', 'type integer', 'shape (nodes)', 'reader readarray'], ['block connectiondata', 'name ja', 'type integer', 'shape (nja)', 'reader readarray', 'numeric_index true', 'jagged_array iac'], ['block connectiondata', 'name ihc', 'type integer', 'shape (nja)', 'reader readarray', 'jagged_array iac'], ['block connectiondata', 'name cl12', 'type double precision', 'shape (nja)', 'reader readarray', 'jagged_array iac'], ['block connectiondata', 'name hwva', 'type double precision', 'shape (nja)', 'reader readarray', 'jagged_array iac'], ['block connectiondata', 'name angldegx', 'type double precision', 'optional true', 'shape (nja)', 'reader readarray', 'jagged_array iac'], ['block vertices', 'name vertices', 'type recarray iv xv yv', 'shape (nvert)', 'reader urword', 'optional false'], ['block vertices', 'name iv', 'type integer', 'in_record true', 'tagged false', 'reader urword', 'optional false', 'numeric_index true'], ['block vertices', 'name xv', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block vertices', 'name yv', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block cell2d', 'name cell2d', 'type recarray icell2d xc yc ncvert icvert', 'shape (nodes)', 'reader urword', 'optional false'], ['block cell2d', 'name icell2d', 'type integer', 'in_record true', 'tagged false', 'reader urword', 'optional false', 'numeric_index true'], ['block cell2d', 'name xc', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block cell2d', 'name yc', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block cell2d', 'name ncvert', 'type integer', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block cell2d', 'name icvert', 'type integer', 'shape (ncvert)', 'in_record true', 'tagged false', 'reader urword', 'optional false', 'numeric_index true']] + grb_filerecord = ListTemplateGenerator( + ("gwe6", "disu", "options", "grb_filerecord") + ) + top = ArrayTemplateGenerator(("gwe6", "disu", "griddata", "top")) + bot = ArrayTemplateGenerator(("gwe6", "disu", "griddata", "bot")) + area = ArrayTemplateGenerator(("gwe6", "disu", "griddata", "area")) + idomain = ArrayTemplateGenerator(("gwe6", "disu", "griddata", "idomain")) + iac = ArrayTemplateGenerator(("gwe6", "disu", "connectiondata", "iac")) + ja = ArrayTemplateGenerator(("gwe6", "disu", "connectiondata", "ja")) + ihc = ArrayTemplateGenerator(("gwe6", "disu", "connectiondata", "ihc")) + cl12 = ArrayTemplateGenerator(("gwe6", "disu", "connectiondata", "cl12")) + hwva = ArrayTemplateGenerator(("gwe6", "disu", "connectiondata", "hwva")) + angldegx = ArrayTemplateGenerator(("gwe6", "disu", "connectiondata", "angldegx")) + vertices = ListTemplateGenerator(("gwe6", "disu", "vertices", "vertices")) + cell2d = ListTemplateGenerator(("gwe6", "disu", "cell2d", "cell2d")) + package_abbr = "gwedisu" + _package_type = "disu" + dfn_file_name = "gwe-disu.dfn" + dfn = [ + ["header"], + [ + "block options", + "name length_units", + "type string", + "reader urword", + "optional true", + ], + [ + "block options", + "name nogrb", + "type keyword", + "reader urword", + "optional true", + ], + [ + "block options", + "name grb_filerecord", + "type record grb6 fileout grb6_filename", + "reader urword", + "tagged true", + "optional true", + ], + [ + "block options", + "name grb6", + "type keyword", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name fileout", + "type keyword", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name grb6_filename", + "type string", + "preserve_case true", + "in_record true", + "reader urword", + "optional false", + "tagged false", + ], + [ + "block options", + "name xorigin", + "type double precision", + "reader urword", + "optional true", + ], + [ + "block options", + "name yorigin", + "type double precision", + "reader urword", + "optional true", + ], + [ + "block options", + "name angrot", + "type double precision", + "reader urword", + "optional true", + ], + [ + "block options", + "name vertical_offset_tolerance", + "type double precision", + "reader urword", + "optional true", + "default 0.0", + "mf6internal voffsettol", + ], + [ + "block options", + "name export_array_ascii", + "type keyword", + "reader urword", + "optional true", + "mf6internal export_ascii", + ], + [ + "block options", + "name crs", + "type string", + "shape lenbigline", + "preserve_case true", + "reader urword", + "optional true", + "developmode true", + ], + [ + "block dimensions", + "name nodes", + "type integer", + "reader urword", + "optional false", + ], + [ + "block dimensions", + "name nja", + "type integer", + "reader urword", + "optional false", + ], + [ + "block dimensions", + "name nvert", + "type integer", + "reader urword", + "optional true", + ], + [ + "block griddata", + "name top", + "type double precision", + "shape (nodes)", + "reader readarray", + ], + [ + "block griddata", + "name bot", + "type double precision", + "shape (nodes)", + "reader readarray", + ], + [ + "block griddata", + "name area", + "type double precision", + "shape (nodes)", + "reader readarray", + ], + [ + "block griddata", + "name idomain", + "type integer", + "shape (nodes)", + "reader readarray", + "layered false", + "optional true", + ], + [ + "block connectiondata", + "name iac", + "type integer", + "shape (nodes)", + "reader readarray", + ], + [ + "block connectiondata", + "name ja", + "type integer", + "shape (nja)", + "reader readarray", + "numeric_index true", + "jagged_array iac", + ], + [ + "block connectiondata", + "name ihc", + "type integer", + "shape (nja)", + "reader readarray", + "jagged_array iac", + ], + [ + "block connectiondata", + "name cl12", + "type double precision", + "shape (nja)", + "reader readarray", + "jagged_array iac", + ], + [ + "block connectiondata", + "name hwva", + "type double precision", + "shape (nja)", + "reader readarray", + "jagged_array iac", + ], + [ + "block connectiondata", + "name angldegx", + "type double precision", + "optional true", + "shape (nja)", + "reader readarray", + "jagged_array iac", + ], + [ + "block vertices", + "name vertices", + "type recarray iv xv yv", + "shape (nvert)", + "reader urword", + "optional false", + ], + [ + "block vertices", + "name iv", + "type integer", + "in_record true", + "tagged false", + "reader urword", + "optional false", + "numeric_index true", + ], + [ + "block vertices", + "name xv", + "type double precision", + "in_record true", + "tagged false", + "reader urword", + "optional false", + ], + [ + "block vertices", + "name yv", + "type double precision", + "in_record true", + "tagged false", + "reader urword", + "optional false", + ], + [ + "block cell2d", + "name cell2d", + "type recarray icell2d xc yc ncvert icvert", + "shape (nodes)", + "reader urword", + "optional false", + ], + [ + "block cell2d", + "name icell2d", + "type integer", + "in_record true", + "tagged false", + "reader urword", + "optional false", + "numeric_index true", + ], + [ + "block cell2d", + "name xc", + "type double precision", + "in_record true", + "tagged false", + "reader urword", + "optional false", + ], + [ + "block cell2d", + "name yc", + "type double precision", + "in_record true", + "tagged false", + "reader urword", + "optional false", + ], + [ + "block cell2d", + "name ncvert", + "type integer", + "in_record true", + "tagged false", + "reader urword", + "optional false", + ], + [ + "block cell2d", + "name icvert", + "type integer", + "shape (ncvert)", + "in_record true", + "tagged false", + "reader urword", + "optional false", + "numeric_index true", + ], + ] def __init__( self, @@ -219,7 +513,6 @@ def __init__( angldegx=None, vertices=None, cell2d=None, - filename=None, pname=None, **kwargs, @@ -234,29 +527,32 @@ def __init__( **kwargs, ) - self.length_units = self.build_mfdata('length_units', length_units) - self.nogrb = self.build_mfdata('nogrb', nogrb) - self.grb_filerecord = self.build_mfdata('grb_filerecord', grb_filerecord) - self.xorigin = self.build_mfdata('xorigin', xorigin) - self.yorigin = self.build_mfdata('yorigin', yorigin) - self.angrot = self.build_mfdata('angrot', angrot) - self.vertical_offset_tolerance = self.build_mfdata('vertical_offset_tolerance', vertical_offset_tolerance) - self.export_array_ascii = self.build_mfdata('export_array_ascii', export_array_ascii) - self.nodes = self.build_mfdata('nodes', nodes) - self.nja = self.build_mfdata('nja', nja) - self.nvert = self.build_mfdata('nvert', nvert) - self.top = self.build_mfdata('top', top) - self.bot = self.build_mfdata('bot', bot) - self.area = self.build_mfdata('area', area) - self.idomain = self.build_mfdata('idomain', idomain) - self.iac = self.build_mfdata('iac', iac) - self.ja = self.build_mfdata('ja', ja) - self.ihc = self.build_mfdata('ihc', ihc) - self.cl12 = self.build_mfdata('cl12', cl12) - self.hwva = self.build_mfdata('hwva', hwva) - self.angldegx = self.build_mfdata('angldegx', angldegx) - self.vertices = self.build_mfdata('vertices', vertices) - self.cell2d = self.build_mfdata('cell2d', cell2d) + self.length_units = self.build_mfdata("length_units", length_units) + self.nogrb = self.build_mfdata("nogrb", nogrb) + self.grb_filerecord = self.build_mfdata("grb_filerecord", grb_filerecord) + self.xorigin = self.build_mfdata("xorigin", xorigin) + self.yorigin = self.build_mfdata("yorigin", yorigin) + self.angrot = self.build_mfdata("angrot", angrot) + self.vertical_offset_tolerance = self.build_mfdata( + "vertical_offset_tolerance", vertical_offset_tolerance + ) + self.export_array_ascii = self.build_mfdata( + "export_array_ascii", export_array_ascii + ) + self.nodes = self.build_mfdata("nodes", nodes) + self.nja = self.build_mfdata("nja", nja) + self.nvert = self.build_mfdata("nvert", nvert) + self.top = self.build_mfdata("top", top) + self.bot = self.build_mfdata("bot", bot) + self.area = self.build_mfdata("area", area) + self.idomain = self.build_mfdata("idomain", idomain) + self.iac = self.build_mfdata("iac", iac) + self.ja = self.build_mfdata("ja", ja) + self.ihc = self.build_mfdata("ihc", ihc) + self.cl12 = self.build_mfdata("cl12", cl12) + self.hwva = self.build_mfdata("hwva", hwva) + self.angldegx = self.build_mfdata("angldegx", angldegx) + self.vertices = self.build_mfdata("vertices", vertices) + self.cell2d = self.build_mfdata("cell2d", cell2d) self._init_complete = True - diff --git a/flopy/mf6/modflow/mfgwedisv.py b/flopy/mf6/modflow/mfgwedisv.py index bc25d77998..389c20f60c 100644 --- a/flopy/mf6/modflow/mfgwedisv.py +++ b/flopy/mf6/modflow/mfgwedisv.py @@ -120,17 +120,302 @@ class ModflowGwedisv(MFPackage): """ - grb_filerecord = ListTemplateGenerator(('gwe6', 'disv', 'options', 'grb_filerecord')) - ncf_filerecord = ListTemplateGenerator(('gwe6', 'disv', 'options', 'ncf_filerecord')) - top = ArrayTemplateGenerator(('gwe6', 'disv', 'griddata', 'top')) - botm = ArrayTemplateGenerator(('gwe6', 'disv', 'griddata', 'botm')) - idomain = ArrayTemplateGenerator(('gwe6', 'disv', 'griddata', 'idomain')) - vertices = ListTemplateGenerator(('gwe6', 'disv', 'vertices', 'vertices')) - cell2d = ListTemplateGenerator(('gwe6', 'disv', 'cell2d', 'cell2d')) - package_abbr = 'gwedisv' - _package_type = 'disv' - dfn_file_name = 'gwe-disv.dfn' - dfn = [['header'], ['block options', 'name length_units', 'type string', 'reader urword', 'optional true'], ['block options', 'name nogrb', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name grb_filerecord', 'type record grb6 fileout grb6_filename', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name grb6', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name fileout', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name grb6_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false'], ['block options', 'name xorigin', 'type double precision', 'reader urword', 'optional true'], ['block options', 'name yorigin', 'type double precision', 'reader urword', 'optional true'], ['block options', 'name angrot', 'type double precision', 'reader urword', 'optional true'], ['block options', 'name export_array_ascii', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_ascii'], ['block options', 'name export_array_netcdf', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_nc', 'extended true'], ['block options', 'name crs', 'type string', 'shape lenbigline', 'preserve_case true', 'reader urword', 'optional true', 'developmode true'], ['block options', 'name ncf_filerecord', 'type record ncf6 filein ncf6_filename', 'reader urword', 'tagged true', 'optional true', 'construct_package ncf', 'construct_data packagedata', 'parameter_name packagedata'], ['block options', 'name ncf6', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false', 'extended true'], ['block options', 'name filein', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name ncf6_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false', 'extended true'], ['block dimensions', 'name nlay', 'type integer', 'reader urword', 'optional false'], ['block dimensions', 'name ncpl', 'type integer', 'reader urword', 'optional false'], ['block dimensions', 'name nvert', 'type integer', 'reader urword', 'optional false'], ['block griddata', 'name top', 'type double precision', 'shape (ncpl)', 'reader readarray', 'netcdf true'], ['block griddata', 'name botm', 'type double precision', 'shape (ncpl, nlay)', 'reader readarray', 'layered true', 'netcdf true'], ['block griddata', 'name idomain', 'type integer', 'shape (ncpl, nlay)', 'reader readarray', 'layered true', 'netcdf true', 'optional true'], ['block vertices', 'name vertices', 'type recarray iv xv yv', 'shape (nvert)', 'reader urword', 'optional false'], ['block vertices', 'name iv', 'type integer', 'in_record true', 'tagged false', 'reader urword', 'optional false', 'numeric_index true'], ['block vertices', 'name xv', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block vertices', 'name yv', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block cell2d', 'name cell2d', 'type recarray icell2d xc yc ncvert icvert', 'shape (ncpl)', 'reader urword', 'optional false'], ['block cell2d', 'name icell2d', 'type integer', 'in_record true', 'tagged false', 'reader urword', 'optional false', 'numeric_index true'], ['block cell2d', 'name xc', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block cell2d', 'name yc', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block cell2d', 'name ncvert', 'type integer', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block cell2d', 'name icvert', 'type integer', 'shape (ncvert)', 'in_record true', 'tagged false', 'reader urword', 'optional false', 'numeric_index true']] + grb_filerecord = ListTemplateGenerator( + ("gwe6", "disv", "options", "grb_filerecord") + ) + ncf_filerecord = ListTemplateGenerator( + ("gwe6", "disv", "options", "ncf_filerecord") + ) + top = ArrayTemplateGenerator(("gwe6", "disv", "griddata", "top")) + botm = ArrayTemplateGenerator(("gwe6", "disv", "griddata", "botm")) + idomain = ArrayTemplateGenerator(("gwe6", "disv", "griddata", "idomain")) + vertices = ListTemplateGenerator(("gwe6", "disv", "vertices", "vertices")) + cell2d = ListTemplateGenerator(("gwe6", "disv", "cell2d", "cell2d")) + package_abbr = "gwedisv" + _package_type = "disv" + dfn_file_name = "gwe-disv.dfn" + dfn = [ + ["header"], + [ + "block options", + "name length_units", + "type string", + "reader urword", + "optional true", + ], + [ + "block options", + "name nogrb", + "type keyword", + "reader urword", + "optional true", + ], + [ + "block options", + "name grb_filerecord", + "type record grb6 fileout grb6_filename", + "reader urword", + "tagged true", + "optional true", + ], + [ + "block options", + "name grb6", + "type keyword", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name fileout", + "type keyword", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name grb6_filename", + "type string", + "preserve_case true", + "in_record true", + "reader urword", + "optional false", + "tagged false", + ], + [ + "block options", + "name xorigin", + "type double precision", + "reader urword", + "optional true", + ], + [ + "block options", + "name yorigin", + "type double precision", + "reader urword", + "optional true", + ], + [ + "block options", + "name angrot", + "type double precision", + "reader urword", + "optional true", + ], + [ + "block options", + "name export_array_ascii", + "type keyword", + "reader urword", + "optional true", + "mf6internal export_ascii", + ], + [ + "block options", + "name export_array_netcdf", + "type keyword", + "reader urword", + "optional true", + "mf6internal export_nc", + "extended true", + ], + [ + "block options", + "name crs", + "type string", + "shape lenbigline", + "preserve_case true", + "reader urword", + "optional true", + "developmode true", + ], + [ + "block options", + "name ncf_filerecord", + "type record ncf6 filein ncf6_filename", + "reader urword", + "tagged true", + "optional true", + "construct_package ncf", + "construct_data packagedata", + "parameter_name packagedata", + ], + [ + "block options", + "name ncf6", + "type keyword", + "in_record true", + "reader urword", + "tagged true", + "optional false", + "extended true", + ], + [ + "block options", + "name filein", + "type keyword", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name ncf6_filename", + "type string", + "preserve_case true", + "in_record true", + "reader urword", + "optional false", + "tagged false", + "extended true", + ], + [ + "block dimensions", + "name nlay", + "type integer", + "reader urword", + "optional false", + ], + [ + "block dimensions", + "name ncpl", + "type integer", + "reader urword", + "optional false", + ], + [ + "block dimensions", + "name nvert", + "type integer", + "reader urword", + "optional false", + ], + [ + "block griddata", + "name top", + "type double precision", + "shape (ncpl)", + "reader readarray", + "netcdf true", + ], + [ + "block griddata", + "name botm", + "type double precision", + "shape (ncpl, nlay)", + "reader readarray", + "layered true", + "netcdf true", + ], + [ + "block griddata", + "name idomain", + "type integer", + "shape (ncpl, nlay)", + "reader readarray", + "layered true", + "netcdf true", + "optional true", + ], + [ + "block vertices", + "name vertices", + "type recarray iv xv yv", + "shape (nvert)", + "reader urword", + "optional false", + ], + [ + "block vertices", + "name iv", + "type integer", + "in_record true", + "tagged false", + "reader urword", + "optional false", + "numeric_index true", + ], + [ + "block vertices", + "name xv", + "type double precision", + "in_record true", + "tagged false", + "reader urword", + "optional false", + ], + [ + "block vertices", + "name yv", + "type double precision", + "in_record true", + "tagged false", + "reader urword", + "optional false", + ], + [ + "block cell2d", + "name cell2d", + "type recarray icell2d xc yc ncvert icvert", + "shape (ncpl)", + "reader urword", + "optional false", + ], + [ + "block cell2d", + "name icell2d", + "type integer", + "in_record true", + "tagged false", + "reader urword", + "optional false", + "numeric_index true", + ], + [ + "block cell2d", + "name xc", + "type double precision", + "in_record true", + "tagged false", + "reader urword", + "optional false", + ], + [ + "block cell2d", + "name yc", + "type double precision", + "in_record true", + "tagged false", + "reader urword", + "optional false", + ], + [ + "block cell2d", + "name ncvert", + "type integer", + "in_record true", + "tagged false", + "reader urword", + "optional false", + ], + [ + "block cell2d", + "name icvert", + "type integer", + "shape (ncvert)", + "in_record true", + "tagged false", + "reader urword", + "optional false", + "numeric_index true", + ], + ] def __init__( self, @@ -153,7 +438,6 @@ def __init__( idomain=None, vertices=None, cell2d=None, - filename=None, pname=None, **kwargs, @@ -168,24 +452,29 @@ def __init__( **kwargs, ) - self.length_units = self.build_mfdata('length_units', length_units) - self.nogrb = self.build_mfdata('nogrb', nogrb) - self.grb_filerecord = self.build_mfdata('grb_filerecord', grb_filerecord) - self.xorigin = self.build_mfdata('xorigin', xorigin) - self.yorigin = self.build_mfdata('yorigin', yorigin) - self.angrot = self.build_mfdata('angrot', angrot) - self.export_array_ascii = self.build_mfdata('export_array_ascii', export_array_ascii) - self.export_array_netcdf = self.build_mfdata('export_array_netcdf', export_array_netcdf) - self._ncf_filerecord = self.build_mfdata('ncf_filerecord', None) - self._ncf_package = self.build_child_package('ncf', packagedata, 'packagedata', self._ncf_filerecord) - self.nlay = self.build_mfdata('nlay', nlay) - self.ncpl = self.build_mfdata('ncpl', ncpl) - self.nvert = self.build_mfdata('nvert', nvert) - self.top = self.build_mfdata('top', top) - self.botm = self.build_mfdata('botm', botm) - self.idomain = self.build_mfdata('idomain', idomain) - self.vertices = self.build_mfdata('vertices', vertices) - self.cell2d = self.build_mfdata('cell2d', cell2d) + self.length_units = self.build_mfdata("length_units", length_units) + self.nogrb = self.build_mfdata("nogrb", nogrb) + self.grb_filerecord = self.build_mfdata("grb_filerecord", grb_filerecord) + self.xorigin = self.build_mfdata("xorigin", xorigin) + self.yorigin = self.build_mfdata("yorigin", yorigin) + self.angrot = self.build_mfdata("angrot", angrot) + self.export_array_ascii = self.build_mfdata( + "export_array_ascii", export_array_ascii + ) + self.export_array_netcdf = self.build_mfdata( + "export_array_netcdf", export_array_netcdf + ) + self._ncf_filerecord = self.build_mfdata("ncf_filerecord", None) + self._ncf_package = self.build_child_package( + "ncf", packagedata, "packagedata", self._ncf_filerecord + ) + self.nlay = self.build_mfdata("nlay", nlay) + self.ncpl = self.build_mfdata("ncpl", ncpl) + self.nvert = self.build_mfdata("nvert", nvert) + self.top = self.build_mfdata("top", top) + self.botm = self.build_mfdata("botm", botm) + self.idomain = self.build_mfdata("idomain", idomain) + self.vertices = self.build_mfdata("vertices", vertices) + self.cell2d = self.build_mfdata("cell2d", cell2d) self._init_complete = True - diff --git a/flopy/mf6/modflow/mfgweesl.py b/flopy/mf6/modflow/mfgweesl.py index 256326506c..b02626d8fe 100644 --- a/flopy/mf6/modflow/mfgweesl.py +++ b/flopy/mf6/modflow/mfgweesl.py @@ -96,14 +96,208 @@ class ModflowGweesl(MFPackage): """ - auxiliary = ArrayTemplateGenerator(('gwe6', 'esl', 'options', 'auxiliary')) - ts_filerecord = ListTemplateGenerator(('gwe6', 'esl', 'options', 'ts_filerecord')) - obs_filerecord = ListTemplateGenerator(('gwe6', 'esl', 'options', 'obs_filerecord')) - stress_period_data = ListTemplateGenerator(('gwe6', 'esl', 'period', 'stress_period_data')) - package_abbr = 'gweesl' - _package_type = 'esl' - dfn_file_name = 'gwe-esl.dfn' - dfn = [['header', 'multi-package'], ['block options', 'name auxiliary', 'type string', 'shape (naux)', 'reader urword', 'optional true'], ['block options', 'name auxmultname', 'type string', 'shape', 'reader urword', 'optional true'], ['block options', 'name boundnames', 'type keyword', 'shape', 'reader urword', 'optional true'], ['block options', 'name print_input', 'type keyword', 'reader urword', 'optional true', 'mf6internal iprpak'], ['block options', 'name print_flows', 'type keyword', 'reader urword', 'optional true', 'mf6internal iprflow'], ['block options', 'name save_flows', 'type keyword', 'reader urword', 'optional true', 'mf6internal ipakcb'], ['block options', 'name ts_filerecord', 'type record ts6 filein ts6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package ts', 'construct_data timeseries', 'parameter_name timeseries'], ['block options', 'name ts6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name filein', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name ts6_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false'], ['block options', 'name obs_filerecord', 'type record obs6 filein obs6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package obs', 'construct_data observations', 'parameter_name continuous'], ['block options', 'name obs6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name obs6_filename', 'type string', 'preserve_case true', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block dimensions', 'name maxbound', 'type integer', 'reader urword', 'optional false'], ['block period', 'name iper', 'type integer', 'block_variable true', 'in_record true', 'tagged false', 'shape', 'valid', 'reader urword', 'optional false'], ['block period', 'name stress_period_data', 'type recarray cellid senerrate aux boundname', 'shape (maxbound)', 'reader urword', 'mf6internal spd'], ['block period', 'name cellid', 'type integer', 'shape (ncelldim)', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name senerrate', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name aux', 'type double precision', 'in_record true', 'tagged false', 'shape (naux)', 'reader urword', 'optional true', 'time_series true', 'mf6internal auxvar'], ['block period', 'name boundname', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword', 'optional true']] + auxiliary = ArrayTemplateGenerator(("gwe6", "esl", "options", "auxiliary")) + ts_filerecord = ListTemplateGenerator(("gwe6", "esl", "options", "ts_filerecord")) + obs_filerecord = ListTemplateGenerator(("gwe6", "esl", "options", "obs_filerecord")) + stress_period_data = ListTemplateGenerator( + ("gwe6", "esl", "period", "stress_period_data") + ) + package_abbr = "gweesl" + _package_type = "esl" + dfn_file_name = "gwe-esl.dfn" + dfn = [ + ["header", "multi-package"], + [ + "block options", + "name auxiliary", + "type string", + "shape (naux)", + "reader urword", + "optional true", + ], + [ + "block options", + "name auxmultname", + "type string", + "shape", + "reader urword", + "optional true", + ], + [ + "block options", + "name boundnames", + "type keyword", + "shape", + "reader urword", + "optional true", + ], + [ + "block options", + "name print_input", + "type keyword", + "reader urword", + "optional true", + "mf6internal iprpak", + ], + [ + "block options", + "name print_flows", + "type keyword", + "reader urword", + "optional true", + "mf6internal iprflow", + ], + [ + "block options", + "name save_flows", + "type keyword", + "reader urword", + "optional true", + "mf6internal ipakcb", + ], + [ + "block options", + "name ts_filerecord", + "type record ts6 filein ts6_filename", + "shape", + "reader urword", + "tagged true", + "optional true", + "construct_package ts", + "construct_data timeseries", + "parameter_name timeseries", + ], + [ + "block options", + "name ts6", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name filein", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name ts6_filename", + "type string", + "preserve_case true", + "in_record true", + "reader urword", + "optional false", + "tagged false", + ], + [ + "block options", + "name obs_filerecord", + "type record obs6 filein obs6_filename", + "shape", + "reader urword", + "tagged true", + "optional true", + "construct_package obs", + "construct_data observations", + "parameter_name continuous", + ], + [ + "block options", + "name obs6", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name obs6_filename", + "type string", + "preserve_case true", + "in_record true", + "tagged false", + "reader urword", + "optional false", + ], + [ + "block dimensions", + "name maxbound", + "type integer", + "reader urword", + "optional false", + ], + [ + "block period", + "name iper", + "type integer", + "block_variable true", + "in_record true", + "tagged false", + "shape", + "valid", + "reader urword", + "optional false", + ], + [ + "block period", + "name stress_period_data", + "type recarray cellid senerrate aux boundname", + "shape (maxbound)", + "reader urword", + "mf6internal spd", + ], + [ + "block period", + "name cellid", + "type integer", + "shape (ncelldim)", + "tagged false", + "in_record true", + "reader urword", + ], + [ + "block period", + "name senerrate", + "type double precision", + "shape", + "tagged false", + "in_record true", + "reader urword", + "time_series true", + ], + [ + "block period", + "name aux", + "type double precision", + "in_record true", + "tagged false", + "shape (naux)", + "reader urword", + "optional true", + "time_series true", + "mf6internal auxvar", + ], + [ + "block period", + "name boundname", + "type string", + "shape", + "tagged false", + "in_record true", + "reader urword", + "optional true", + ], + ] def __init__( self, @@ -119,7 +313,6 @@ def __init__( observations=None, maxbound=None, stress_period_data=None, - filename=None, pname=None, **kwargs, @@ -134,18 +327,23 @@ def __init__( **kwargs, ) - self.auxiliary = self.build_mfdata('auxiliary', auxiliary) - self.auxmultname = self.build_mfdata('auxmultname', auxmultname) - self.boundnames = self.build_mfdata('boundnames', boundnames) - self.print_input = self.build_mfdata('print_input', print_input) - self.print_flows = self.build_mfdata('print_flows', print_flows) - self.save_flows = self.build_mfdata('save_flows', save_flows) - self._ts_filerecord = self.build_mfdata('ts_filerecord', None) - self._ts_package = self.build_child_package('ts', timeseries, 'timeseries', self._ts_filerecord) - self._obs_filerecord = self.build_mfdata('obs_filerecord', None) - self._obs_package = self.build_child_package('obs', observations, 'continuous', self._obs_filerecord) - self.maxbound = self.build_mfdata('maxbound', maxbound) - self.stress_period_data = self.build_mfdata('stress_period_data', stress_period_data) + self.auxiliary = self.build_mfdata("auxiliary", auxiliary) + self.auxmultname = self.build_mfdata("auxmultname", auxmultname) + self.boundnames = self.build_mfdata("boundnames", boundnames) + self.print_input = self.build_mfdata("print_input", print_input) + self.print_flows = self.build_mfdata("print_flows", print_flows) + self.save_flows = self.build_mfdata("save_flows", save_flows) + self._ts_filerecord = self.build_mfdata("ts_filerecord", None) + self._ts_package = self.build_child_package( + "ts", timeseries, "timeseries", self._ts_filerecord + ) + self._obs_filerecord = self.build_mfdata("obs_filerecord", None) + self._obs_package = self.build_child_package( + "obs", observations, "continuous", self._obs_filerecord + ) + self.maxbound = self.build_mfdata("maxbound", maxbound) + self.stress_period_data = self.build_mfdata( + "stress_period_data", stress_period_data + ) self._init_complete = True - diff --git a/flopy/mf6/modflow/mfgweest.py b/flopy/mf6/modflow/mfgweest.py index a33f264e17..b7e021a94c 100644 --- a/flopy/mf6/modflow/mfgweest.py +++ b/flopy/mf6/modflow/mfgweest.py @@ -90,15 +90,113 @@ class ModflowGweest(MFPackage): """ - porosity = ArrayTemplateGenerator(('gwe6', 'est', 'griddata', 'porosity')) - decay_water = ArrayTemplateGenerator(('gwe6', 'est', 'griddata', 'decay_water')) - decay_solid = ArrayTemplateGenerator(('gwe6', 'est', 'griddata', 'decay_solid')) - heat_capacity_solid = ArrayTemplateGenerator(('gwe6', 'est', 'griddata', 'heat_capacity_solid')) - density_solid = ArrayTemplateGenerator(('gwe6', 'est', 'griddata', 'density_solid')) - package_abbr = 'gweest' - _package_type = 'est' - dfn_file_name = 'gwe-est.dfn' - dfn = [['header'], ['block options', 'name save_flows', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name zero_order_decay_water', 'type keyword', 'reader urword', 'optional true', 'mf6internal ord0_decay_water'], ['block options', 'name zero_order_decay_solid', 'type keyword', 'reader urword', 'optional true', 'mf6internal ord0_decay_solid'], ['block options', 'name density_water', 'type double precision', 'reader urword', 'optional true', 'default 1000.0', 'mf6internal rhow'], ['block options', 'name heat_capacity_water', 'type double precision', 'reader urword', 'optional true', 'default 4184.0', 'mf6internal cpw'], ['block options', 'name latent_heat_vaporization', 'type double precision', 'reader urword', 'optional true', 'default 2453500.0', 'mf6internal latheatvap'], ['block griddata', 'name porosity', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true'], ['block griddata', 'name decay_water', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'optional true'], ['block griddata', 'name decay_solid', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'optional true'], ['block griddata', 'name heat_capacity_solid', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'mf6internal cps'], ['block griddata', 'name density_solid', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'mf6internal rhos']] + porosity = ArrayTemplateGenerator(("gwe6", "est", "griddata", "porosity")) + decay_water = ArrayTemplateGenerator(("gwe6", "est", "griddata", "decay_water")) + decay_solid = ArrayTemplateGenerator(("gwe6", "est", "griddata", "decay_solid")) + heat_capacity_solid = ArrayTemplateGenerator( + ("gwe6", "est", "griddata", "heat_capacity_solid") + ) + density_solid = ArrayTemplateGenerator(("gwe6", "est", "griddata", "density_solid")) + package_abbr = "gweest" + _package_type = "est" + dfn_file_name = "gwe-est.dfn" + dfn = [ + ["header"], + [ + "block options", + "name save_flows", + "type keyword", + "reader urword", + "optional true", + ], + [ + "block options", + "name zero_order_decay_water", + "type keyword", + "reader urword", + "optional true", + "mf6internal ord0_decay_water", + ], + [ + "block options", + "name zero_order_decay_solid", + "type keyword", + "reader urword", + "optional true", + "mf6internal ord0_decay_solid", + ], + [ + "block options", + "name density_water", + "type double precision", + "reader urword", + "optional true", + "default 1000.0", + "mf6internal rhow", + ], + [ + "block options", + "name heat_capacity_water", + "type double precision", + "reader urword", + "optional true", + "default 4184.0", + "mf6internal cpw", + ], + [ + "block options", + "name latent_heat_vaporization", + "type double precision", + "reader urword", + "optional true", + "default 2453500.0", + "mf6internal latheatvap", + ], + [ + "block griddata", + "name porosity", + "type double precision", + "shape (nodes)", + "reader readarray", + "layered true", + ], + [ + "block griddata", + "name decay_water", + "type double precision", + "shape (nodes)", + "reader readarray", + "layered true", + "optional true", + ], + [ + "block griddata", + "name decay_solid", + "type double precision", + "shape (nodes)", + "reader readarray", + "layered true", + "optional true", + ], + [ + "block griddata", + "name heat_capacity_solid", + "type double precision", + "shape (nodes)", + "reader readarray", + "layered true", + "mf6internal cps", + ], + [ + "block griddata", + "name density_solid", + "type double precision", + "shape (nodes)", + "reader readarray", + "layered true", + "mf6internal rhos", + ], + ] def __init__( self, @@ -115,7 +213,6 @@ def __init__( decay_solid=None, heat_capacity_solid=None, density_solid=None, - filename=None, pname=None, **kwargs, @@ -130,17 +227,26 @@ def __init__( **kwargs, ) - self.save_flows = self.build_mfdata('save_flows', save_flows) - self.zero_order_decay_water = self.build_mfdata('zero_order_decay_water', zero_order_decay_water) - self.zero_order_decay_solid = self.build_mfdata('zero_order_decay_solid', zero_order_decay_solid) - self.density_water = self.build_mfdata('density_water', density_water) - self.heat_capacity_water = self.build_mfdata('heat_capacity_water', heat_capacity_water) - self.latent_heat_vaporization = self.build_mfdata('latent_heat_vaporization', latent_heat_vaporization) - self.porosity = self.build_mfdata('porosity', porosity) - self.decay_water = self.build_mfdata('decay_water', decay_water) - self.decay_solid = self.build_mfdata('decay_solid', decay_solid) - self.heat_capacity_solid = self.build_mfdata('heat_capacity_solid', heat_capacity_solid) - self.density_solid = self.build_mfdata('density_solid', density_solid) + self.save_flows = self.build_mfdata("save_flows", save_flows) + self.zero_order_decay_water = self.build_mfdata( + "zero_order_decay_water", zero_order_decay_water + ) + self.zero_order_decay_solid = self.build_mfdata( + "zero_order_decay_solid", zero_order_decay_solid + ) + self.density_water = self.build_mfdata("density_water", density_water) + self.heat_capacity_water = self.build_mfdata( + "heat_capacity_water", heat_capacity_water + ) + self.latent_heat_vaporization = self.build_mfdata( + "latent_heat_vaporization", latent_heat_vaporization + ) + self.porosity = self.build_mfdata("porosity", porosity) + self.decay_water = self.build_mfdata("decay_water", decay_water) + self.decay_solid = self.build_mfdata("decay_solid", decay_solid) + self.heat_capacity_solid = self.build_mfdata( + "heat_capacity_solid", heat_capacity_solid + ) + self.density_solid = self.build_mfdata("density_solid", density_solid) self._init_complete = True - diff --git a/flopy/mf6/modflow/mfgwefmi.py b/flopy/mf6/modflow/mfgwefmi.py index ba668643ac..eaa534e1fd 100644 --- a/flopy/mf6/modflow/mfgwefmi.py +++ b/flopy/mf6/modflow/mfgwefmi.py @@ -56,11 +56,62 @@ class ModflowGwefmi(MFPackage): """ - packagedata = ListTemplateGenerator(('gwe6', 'fmi', 'packagedata', 'packagedata')) - package_abbr = 'gwefmi' - _package_type = 'fmi' - dfn_file_name = 'gwe-fmi.dfn' - dfn = [['header'], ['block options', 'name save_flows', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name flow_imbalance_correction', 'type keyword', 'reader urword', 'optional true', 'mf6internal imbalancecorrect'], ['block packagedata', 'name packagedata', 'type recarray flowtype filein fname', 'reader urword', 'optional true'], ['block packagedata', 'name flowtype', 'in_record true', 'type string', 'tagged false', 'reader urword'], ['block packagedata', 'name filein', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block packagedata', 'name fname', 'in_record true', 'type string', 'preserve_case true', 'tagged false', 'reader urword']] + packagedata = ListTemplateGenerator(("gwe6", "fmi", "packagedata", "packagedata")) + package_abbr = "gwefmi" + _package_type = "fmi" + dfn_file_name = "gwe-fmi.dfn" + dfn = [ + ["header"], + [ + "block options", + "name save_flows", + "type keyword", + "reader urword", + "optional true", + ], + [ + "block options", + "name flow_imbalance_correction", + "type keyword", + "reader urword", + "optional true", + "mf6internal imbalancecorrect", + ], + [ + "block packagedata", + "name packagedata", + "type recarray flowtype filein fname", + "reader urword", + "optional true", + ], + [ + "block packagedata", + "name flowtype", + "in_record true", + "type string", + "tagged false", + "reader urword", + ], + [ + "block packagedata", + "name filein", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block packagedata", + "name fname", + "in_record true", + "type string", + "preserve_case true", + "tagged false", + "reader urword", + ], + ] def __init__( self, @@ -69,7 +120,6 @@ def __init__( save_flows=None, flow_imbalance_correction=None, packagedata=None, - filename=None, pname=None, **kwargs, @@ -84,9 +134,10 @@ def __init__( **kwargs, ) - self.save_flows = self.build_mfdata('save_flows', save_flows) - self.flow_imbalance_correction = self.build_mfdata('flow_imbalance_correction', flow_imbalance_correction) - self.packagedata = self.build_mfdata('packagedata', packagedata) + self.save_flows = self.build_mfdata("save_flows", save_flows) + self.flow_imbalance_correction = self.build_mfdata( + "flow_imbalance_correction", flow_imbalance_correction + ) + self.packagedata = self.build_mfdata("packagedata", packagedata) self._init_complete = True - diff --git a/flopy/mf6/modflow/mfgwegwe.py b/flopy/mf6/modflow/mfgwegwe.py index 8c8be3c77d..a1cb8d3670 100644 --- a/flopy/mf6/modflow/mfgwegwe.py +++ b/flopy/mf6/modflow/mfgwegwe.py @@ -7,6 +7,7 @@ from flopy.mf6.data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator from flopy.mf6.mfpackage import MFPackage + class ModflowGwegwe(MFPackage): """ ModflowGwegwe defines a GWEGWE package. @@ -138,14 +139,268 @@ class ModflowGwegwe(MFPackage): """ - auxiliary = ArrayTemplateGenerator(('gwegwe', 'options', 'auxiliary')) - mve_filerecord = ListTemplateGenerator(('gwegwe', 'options', 'mve_filerecord')) - obs_filerecord = ListTemplateGenerator(('gwegwe', 'options', 'obs_filerecord')) - exchangedata = ListTemplateGenerator(('gwegwe', 'exchangedata', 'exchangedata')) - package_abbr = 'gwegwe' - _package_type = 'gwegwe' - dfn_file_name = 'exg-gwegwe.dfn' - dfn = [['header', 'multi-package'], ['block options', 'name gwfmodelname1', 'type string', 'reader urword', 'optional false'], ['block options', 'name gwfmodelname2', 'type string', 'reader urword', 'optional false'], ['block options', 'name auxiliary', 'type string', 'shape (naux)', 'reader urword', 'optional true'], ['block options', 'name boundnames', 'type keyword', 'shape', 'reader urword', 'optional true'], ['block options', 'name print_input', 'type keyword', 'reader urword', 'optional true', 'mf6internal iprpak'], ['block options', 'name print_flows', 'type keyword', 'reader urword', 'optional true', 'mf6internal iprflow'], ['block options', 'name save_flows', 'type keyword', 'reader urword', 'optional true', 'mf6internal ipakcb'], ['block options', 'name adv_scheme', 'type string', 'valid upstream central tvd', 'reader urword', 'optional true'], ['block options', 'name cnd_xt3d_off', 'type keyword', 'shape', 'reader urword', 'optional true'], ['block options', 'name cnd_xt3d_rhs', 'type keyword', 'shape', 'reader urword', 'optional true'], ['block options', 'name filein', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name mve_filerecord', 'type record mve6 filein mve6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package mve', 'construct_data perioddata', 'parameter_name perioddata'], ['block options', 'name mve6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name mve6_filename', 'type string', 'preserve_case true', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block options', 'name obs_filerecord', 'type record obs6 filein obs6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package obs', 'construct_data observations', 'parameter_name continuous'], ['block options', 'name obs6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name obs6_filename', 'type string', 'preserve_case true', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block options', 'name dev_interfacemodel_on', 'type keyword', 'reader urword', 'optional true', 'mf6internal dev_ifmod_on'], ['block dimensions', 'name nexg', 'type integer', 'reader urword', 'optional false'], ['block exchangedata', 'name exchangedata', 'type recarray cellidm1 cellidm2 ihc cl1 cl2 hwva aux boundname', 'shape (nexg)', 'reader urword', 'optional false'], ['block exchangedata', 'name cellidm1', 'type integer', 'in_record true', 'tagged false', 'reader urword', 'optional false', 'numeric_index true'], ['block exchangedata', 'name cellidm2', 'type integer', 'in_record true', 'tagged false', 'reader urword', 'optional false', 'numeric_index true'], ['block exchangedata', 'name ihc', 'type integer', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block exchangedata', 'name cl1', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block exchangedata', 'name cl2', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block exchangedata', 'name hwva', 'type double precision', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block exchangedata', 'name aux', 'type double precision', 'in_record true', 'tagged false', 'shape (naux)', 'reader urword', 'optional true', 'mf6internal auxvar'], ['block exchangedata', 'name boundname', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword', 'optional true']] + auxiliary = ArrayTemplateGenerator(("gwegwe", "options", "auxiliary")) + mve_filerecord = ListTemplateGenerator(("gwegwe", "options", "mve_filerecord")) + obs_filerecord = ListTemplateGenerator(("gwegwe", "options", "obs_filerecord")) + exchangedata = ListTemplateGenerator(("gwegwe", "exchangedata", "exchangedata")) + package_abbr = "gwegwe" + _package_type = "gwegwe" + dfn_file_name = "exg-gwegwe.dfn" + dfn = [ + ["header", "multi-package"], + [ + "block options", + "name gwfmodelname1", + "type string", + "reader urword", + "optional false", + ], + [ + "block options", + "name gwfmodelname2", + "type string", + "reader urword", + "optional false", + ], + [ + "block options", + "name auxiliary", + "type string", + "shape (naux)", + "reader urword", + "optional true", + ], + [ + "block options", + "name boundnames", + "type keyword", + "shape", + "reader urword", + "optional true", + ], + [ + "block options", + "name print_input", + "type keyword", + "reader urword", + "optional true", + "mf6internal iprpak", + ], + [ + "block options", + "name print_flows", + "type keyword", + "reader urword", + "optional true", + "mf6internal iprflow", + ], + [ + "block options", + "name save_flows", + "type keyword", + "reader urword", + "optional true", + "mf6internal ipakcb", + ], + [ + "block options", + "name adv_scheme", + "type string", + "valid upstream central tvd", + "reader urword", + "optional true", + ], + [ + "block options", + "name cnd_xt3d_off", + "type keyword", + "shape", + "reader urword", + "optional true", + ], + [ + "block options", + "name cnd_xt3d_rhs", + "type keyword", + "shape", + "reader urword", + "optional true", + ], + [ + "block options", + "name filein", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name mve_filerecord", + "type record mve6 filein mve6_filename", + "shape", + "reader urword", + "tagged true", + "optional true", + "construct_package mve", + "construct_data perioddata", + "parameter_name perioddata", + ], + [ + "block options", + "name mve6", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name mve6_filename", + "type string", + "preserve_case true", + "in_record true", + "tagged false", + "reader urword", + "optional false", + ], + [ + "block options", + "name obs_filerecord", + "type record obs6 filein obs6_filename", + "shape", + "reader urword", + "tagged true", + "optional true", + "construct_package obs", + "construct_data observations", + "parameter_name continuous", + ], + [ + "block options", + "name obs6", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name obs6_filename", + "type string", + "preserve_case true", + "in_record true", + "tagged false", + "reader urword", + "optional false", + ], + [ + "block options", + "name dev_interfacemodel_on", + "type keyword", + "reader urword", + "optional true", + "mf6internal dev_ifmod_on", + ], + [ + "block dimensions", + "name nexg", + "type integer", + "reader urword", + "optional false", + ], + [ + "block exchangedata", + "name exchangedata", + "type recarray cellidm1 cellidm2 ihc cl1 cl2 hwva aux boundname", + "shape (nexg)", + "reader urword", + "optional false", + ], + [ + "block exchangedata", + "name cellidm1", + "type integer", + "in_record true", + "tagged false", + "reader urword", + "optional false", + "numeric_index true", + ], + [ + "block exchangedata", + "name cellidm2", + "type integer", + "in_record true", + "tagged false", + "reader urword", + "optional false", + "numeric_index true", + ], + [ + "block exchangedata", + "name ihc", + "type integer", + "in_record true", + "tagged false", + "reader urword", + "optional false", + ], + [ + "block exchangedata", + "name cl1", + "type double precision", + "in_record true", + "tagged false", + "reader urword", + "optional false", + ], + [ + "block exchangedata", + "name cl2", + "type double precision", + "in_record true", + "tagged false", + "reader urword", + "optional false", + ], + [ + "block exchangedata", + "name hwva", + "type double precision", + "in_record true", + "tagged false", + "reader urword", + "optional false", + ], + [ + "block exchangedata", + "name aux", + "type double precision", + "in_record true", + "tagged false", + "shape (naux)", + "reader urword", + "optional true", + "mf6internal auxvar", + ], + [ + "block exchangedata", + "name boundname", + "type string", + "shape", + "tagged false", + "in_record true", + "reader urword", + "optional true", + ], + ] def __init__( self, @@ -169,7 +424,6 @@ def __init__( dev_interfacemodel_on=None, nexg=None, exchangedata=None, - filename=None, pname=None, **kwargs, @@ -189,22 +443,28 @@ def __init__( self.exgmnameb = exgmnameb simulation.register_exchange_file(self) - self.gwfmodelname1 = self.build_mfdata('gwfmodelname1', gwfmodelname1) - self.gwfmodelname2 = self.build_mfdata('gwfmodelname2', gwfmodelname2) - self.auxiliary = self.build_mfdata('auxiliary', auxiliary) - self.boundnames = self.build_mfdata('boundnames', boundnames) - self.print_input = self.build_mfdata('print_input', print_input) - self.print_flows = self.build_mfdata('print_flows', print_flows) - self.save_flows = self.build_mfdata('save_flows', save_flows) - self.adv_scheme = self.build_mfdata('adv_scheme', adv_scheme) - self.cnd_xt3d_off = self.build_mfdata('cnd_xt3d_off', cnd_xt3d_off) - self.cnd_xt3d_rhs = self.build_mfdata('cnd_xt3d_rhs', cnd_xt3d_rhs) - self._mve_filerecord = self.build_mfdata('mve_filerecord', None) - self._mve_package = self.build_child_package('mve', perioddata, 'perioddata', self._mve_filerecord) - self._obs_filerecord = self.build_mfdata('obs_filerecord', None) - self._obs_package = self.build_child_package('obs', observations, 'continuous', self._obs_filerecord) - self.dev_interfacemodel_on = self.build_mfdata('dev_interfacemodel_on', dev_interfacemodel_on) - self.nexg = self.build_mfdata('nexg', nexg) - self.exchangedata = self.build_mfdata('exchangedata', exchangedata) + self.gwfmodelname1 = self.build_mfdata("gwfmodelname1", gwfmodelname1) + self.gwfmodelname2 = self.build_mfdata("gwfmodelname2", gwfmodelname2) + self.auxiliary = self.build_mfdata("auxiliary", auxiliary) + self.boundnames = self.build_mfdata("boundnames", boundnames) + self.print_input = self.build_mfdata("print_input", print_input) + self.print_flows = self.build_mfdata("print_flows", print_flows) + self.save_flows = self.build_mfdata("save_flows", save_flows) + self.adv_scheme = self.build_mfdata("adv_scheme", adv_scheme) + self.cnd_xt3d_off = self.build_mfdata("cnd_xt3d_off", cnd_xt3d_off) + self.cnd_xt3d_rhs = self.build_mfdata("cnd_xt3d_rhs", cnd_xt3d_rhs) + self._mve_filerecord = self.build_mfdata("mve_filerecord", None) + self._mve_package = self.build_child_package( + "mve", perioddata, "perioddata", self._mve_filerecord + ) + self._obs_filerecord = self.build_mfdata("obs_filerecord", None) + self._obs_package = self.build_child_package( + "obs", observations, "continuous", self._obs_filerecord + ) + self.dev_interfacemodel_on = self.build_mfdata( + "dev_interfacemodel_on", dev_interfacemodel_on + ) + self.nexg = self.build_mfdata("nexg", nexg) + self.exchangedata = self.build_mfdata("exchangedata", exchangedata) self._init_complete = True diff --git a/flopy/mf6/modflow/mfgweic.py b/flopy/mf6/modflow/mfgweic.py index b0f8393971..f6e37172ea 100644 --- a/flopy/mf6/modflow/mfgweic.py +++ b/flopy/mf6/modflow/mfgweic.py @@ -42,11 +42,40 @@ class ModflowGweic(MFPackage): """ - strt = ArrayTemplateGenerator(('gwe6', 'ic', 'griddata', 'strt')) - package_abbr = 'gweic' - _package_type = 'ic' - dfn_file_name = 'gwe-ic.dfn' - dfn = [['header'], ['block options', 'name export_array_ascii', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_ascii'], ['block options', 'name export_array_netcdf', 'type keyword', 'reader urword', 'optional true', 'mf6internal export_nc', 'extended true'], ['block griddata', 'name strt', 'type double precision', 'shape (nodes)', 'reader readarray', 'layered true', 'netcdf true', 'default 0.0']] + strt = ArrayTemplateGenerator(("gwe6", "ic", "griddata", "strt")) + package_abbr = "gweic" + _package_type = "ic" + dfn_file_name = "gwe-ic.dfn" + dfn = [ + ["header"], + [ + "block options", + "name export_array_ascii", + "type keyword", + "reader urword", + "optional true", + "mf6internal export_ascii", + ], + [ + "block options", + "name export_array_netcdf", + "type keyword", + "reader urword", + "optional true", + "mf6internal export_nc", + "extended true", + ], + [ + "block griddata", + "name strt", + "type double precision", + "shape (nodes)", + "reader readarray", + "layered true", + "netcdf true", + "default 0.0", + ], + ] def __init__( self, @@ -55,7 +84,6 @@ def __init__( export_array_ascii=None, export_array_netcdf=None, strt=0.0, - filename=None, pname=None, **kwargs, @@ -70,9 +98,12 @@ def __init__( **kwargs, ) - self.export_array_ascii = self.build_mfdata('export_array_ascii', export_array_ascii) - self.export_array_netcdf = self.build_mfdata('export_array_netcdf', export_array_netcdf) - self.strt = self.build_mfdata('strt', strt) + self.export_array_ascii = self.build_mfdata( + "export_array_ascii", export_array_ascii + ) + self.export_array_netcdf = self.build_mfdata( + "export_array_netcdf", export_array_netcdf + ) + self.strt = self.build_mfdata("strt", strt) self._init_complete = True - diff --git a/flopy/mf6/modflow/mfgwelke.py b/flopy/mf6/modflow/mfgwelke.py index e9d10cf7d1..11ecf74fbf 100644 --- a/flopy/mf6/modflow/mfgwelke.py +++ b/flopy/mf6/modflow/mfgwelke.py @@ -187,18 +187,458 @@ class ModflowGwelke(MFPackage): """ - auxiliary = ArrayTemplateGenerator(('gwe6', 'lke', 'options', 'auxiliary')) - temperature_filerecord = ListTemplateGenerator(('gwe6', 'lke', 'options', 'temperature_filerecord')) - budget_filerecord = ListTemplateGenerator(('gwe6', 'lke', 'options', 'budget_filerecord')) - budgetcsv_filerecord = ListTemplateGenerator(('gwe6', 'lke', 'options', 'budgetcsv_filerecord')) - ts_filerecord = ListTemplateGenerator(('gwe6', 'lke', 'options', 'ts_filerecord')) - obs_filerecord = ListTemplateGenerator(('gwe6', 'lke', 'options', 'obs_filerecord')) - packagedata = ListTemplateGenerator(('gwe6', 'lke', 'packagedata', 'packagedata')) - lakeperioddata = ListTemplateGenerator(('gwe6', 'lke', 'period', 'lakeperioddata')) - package_abbr = 'gwelke' - _package_type = 'lke' - dfn_file_name = 'gwe-lke.dfn' - dfn = [['header', 'multi-package'], ['block options', 'name flow_package_name', 'type string', 'shape', 'reader urword', 'optional true'], ['block options', 'name auxiliary', 'type string', 'shape (naux)', 'reader urword', 'optional true'], ['block options', 'name flow_package_auxiliary_name', 'type string', 'shape', 'reader urword', 'optional true'], ['block options', 'name boundnames', 'type keyword', 'shape', 'reader urword', 'optional true'], ['block options', 'name print_input', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name print_temperature', '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 temperature_filerecord', 'type record temperature fileout tempfile', 'shape', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name temperature', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name tempfile', 'type string', 'preserve_case true', 'shape', 'in_record true', 'reader urword', 'tagged false', 'optional false'], ['block options', 'name budget_filerecord', 'type record budget fileout budgetfile', 'shape', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name budget', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name fileout', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name budgetfile', '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'], ['block options', 'name ts_filerecord', 'type record ts6 filein ts6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package ts', 'construct_data timeseries', 'parameter_name timeseries'], ['block options', 'name ts6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name filein', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name ts6_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false'], ['block options', 'name obs_filerecord', 'type record obs6 filein obs6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package obs', 'construct_data observations', 'parameter_name continuous'], ['block options', 'name obs6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name obs6_filename', 'type string', 'preserve_case true', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block packagedata', 'name packagedata', 'type recarray lakeno strt ktf rbthcnd aux boundname', 'shape (maxbound)', 'reader urword'], ['block packagedata', 'name lakeno', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block packagedata', 'name strt', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block packagedata', 'name ktf', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block packagedata', 'name rbthcnd', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block packagedata', 'name aux', 'type double precision', 'in_record true', 'tagged false', 'shape (naux)', 'reader urword', 'time_series true', 'optional true'], ['block packagedata', 'name boundname', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword', 'optional true'], ['block period', 'name iper', 'type integer', 'block_variable true', 'in_record true', 'tagged false', 'shape', 'valid', 'reader urword', 'optional false'], ['block period', 'name lakeperioddata', 'type recarray lakeno laksetting', 'shape', 'reader urword'], ['block period', 'name lakeno', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block period', 'name laksetting', 'type keystring status temperature rainfall evaporation runoff ext-inflow auxiliaryrecord', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name status', 'type string', 'shape', 'tagged true', 'in_record true', 'reader urword'], ['block period', 'name temperature', 'type string', 'shape', 'tagged true', 'in_record true', 'time_series true', 'reader urword'], ['block period', 'name rainfall', 'type string', 'shape', 'tagged true', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name evaporation', 'type string', 'shape', 'tagged true', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name runoff', 'type string', 'shape', 'tagged true', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name ext-inflow', 'type string', 'shape', 'tagged true', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name auxiliaryrecord', 'type record auxiliary auxname auxval', 'shape', 'tagged', 'in_record true', 'reader urword'], ['block period', 'name auxiliary', 'type keyword', 'shape', 'in_record true', 'reader urword'], ['block period', 'name auxname', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name auxval', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword', 'time_series true']] + auxiliary = ArrayTemplateGenerator(("gwe6", "lke", "options", "auxiliary")) + temperature_filerecord = ListTemplateGenerator( + ("gwe6", "lke", "options", "temperature_filerecord") + ) + budget_filerecord = ListTemplateGenerator( + ("gwe6", "lke", "options", "budget_filerecord") + ) + budgetcsv_filerecord = ListTemplateGenerator( + ("gwe6", "lke", "options", "budgetcsv_filerecord") + ) + ts_filerecord = ListTemplateGenerator(("gwe6", "lke", "options", "ts_filerecord")) + obs_filerecord = ListTemplateGenerator(("gwe6", "lke", "options", "obs_filerecord")) + packagedata = ListTemplateGenerator(("gwe6", "lke", "packagedata", "packagedata")) + lakeperioddata = ListTemplateGenerator(("gwe6", "lke", "period", "lakeperioddata")) + package_abbr = "gwelke" + _package_type = "lke" + dfn_file_name = "gwe-lke.dfn" + dfn = [ + ["header", "multi-package"], + [ + "block options", + "name flow_package_name", + "type string", + "shape", + "reader urword", + "optional true", + ], + [ + "block options", + "name auxiliary", + "type string", + "shape (naux)", + "reader urword", + "optional true", + ], + [ + "block options", + "name flow_package_auxiliary_name", + "type string", + "shape", + "reader urword", + "optional true", + ], + [ + "block options", + "name boundnames", + "type keyword", + "shape", + "reader urword", + "optional true", + ], + [ + "block options", + "name print_input", + "type keyword", + "reader urword", + "optional true", + ], + [ + "block options", + "name print_temperature", + "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 temperature_filerecord", + "type record temperature fileout tempfile", + "shape", + "reader urword", + "tagged true", + "optional true", + ], + [ + "block options", + "name temperature", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name tempfile", + "type string", + "preserve_case true", + "shape", + "in_record true", + "reader urword", + "tagged false", + "optional false", + ], + [ + "block options", + "name budget_filerecord", + "type record budget fileout budgetfile", + "shape", + "reader urword", + "tagged true", + "optional true", + ], + [ + "block options", + "name budget", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name fileout", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name budgetfile", + "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", + ], + [ + "block options", + "name ts_filerecord", + "type record ts6 filein ts6_filename", + "shape", + "reader urword", + "tagged true", + "optional true", + "construct_package ts", + "construct_data timeseries", + "parameter_name timeseries", + ], + [ + "block options", + "name ts6", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name filein", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name ts6_filename", + "type string", + "preserve_case true", + "in_record true", + "reader urword", + "optional false", + "tagged false", + ], + [ + "block options", + "name obs_filerecord", + "type record obs6 filein obs6_filename", + "shape", + "reader urword", + "tagged true", + "optional true", + "construct_package obs", + "construct_data observations", + "parameter_name continuous", + ], + [ + "block options", + "name obs6", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name obs6_filename", + "type string", + "preserve_case true", + "in_record true", + "tagged false", + "reader urword", + "optional false", + ], + [ + "block packagedata", + "name packagedata", + "type recarray lakeno strt ktf rbthcnd aux boundname", + "shape (maxbound)", + "reader urword", + ], + [ + "block packagedata", + "name lakeno", + "type integer", + "shape", + "tagged false", + "in_record true", + "reader urword", + "numeric_index true", + ], + [ + "block packagedata", + "name strt", + "type double precision", + "shape", + "tagged false", + "in_record true", + "reader urword", + ], + [ + "block packagedata", + "name ktf", + "type double precision", + "shape", + "tagged false", + "in_record true", + "reader urword", + ], + [ + "block packagedata", + "name rbthcnd", + "type double precision", + "shape", + "tagged false", + "in_record true", + "reader urword", + ], + [ + "block packagedata", + "name aux", + "type double precision", + "in_record true", + "tagged false", + "shape (naux)", + "reader urword", + "time_series true", + "optional true", + ], + [ + "block packagedata", + "name boundname", + "type string", + "shape", + "tagged false", + "in_record true", + "reader urword", + "optional true", + ], + [ + "block period", + "name iper", + "type integer", + "block_variable true", + "in_record true", + "tagged false", + "shape", + "valid", + "reader urword", + "optional false", + ], + [ + "block period", + "name lakeperioddata", + "type recarray lakeno laksetting", + "shape", + "reader urword", + ], + [ + "block period", + "name lakeno", + "type integer", + "shape", + "tagged false", + "in_record true", + "reader urword", + "numeric_index true", + ], + [ + "block period", + "name laksetting", + "type keystring status temperature rainfall evaporation runoff ext-inflow auxiliaryrecord", + "shape", + "tagged false", + "in_record true", + "reader urword", + ], + [ + "block period", + "name status", + "type string", + "shape", + "tagged true", + "in_record true", + "reader urword", + ], + [ + "block period", + "name temperature", + "type string", + "shape", + "tagged true", + "in_record true", + "time_series true", + "reader urword", + ], + [ + "block period", + "name rainfall", + "type string", + "shape", + "tagged true", + "in_record true", + "reader urword", + "time_series true", + ], + [ + "block period", + "name evaporation", + "type string", + "shape", + "tagged true", + "in_record true", + "reader urword", + "time_series true", + ], + [ + "block period", + "name runoff", + "type string", + "shape", + "tagged true", + "in_record true", + "reader urword", + "time_series true", + ], + [ + "block period", + "name ext-inflow", + "type string", + "shape", + "tagged true", + "in_record true", + "reader urword", + "time_series true", + ], + [ + "block period", + "name auxiliaryrecord", + "type record auxiliary auxname auxval", + "shape", + "tagged", + "in_record true", + "reader urword", + ], + [ + "block period", + "name auxiliary", + "type keyword", + "shape", + "in_record true", + "reader urword", + ], + [ + "block period", + "name auxname", + "type string", + "shape", + "tagged false", + "in_record true", + "reader urword", + ], + [ + "block period", + "name auxval", + "type double precision", + "shape", + "tagged false", + "in_record true", + "reader urword", + "time_series true", + ], + ] def __init__( self, @@ -219,7 +659,6 @@ def __init__( observations=None, packagedata=None, lakeperioddata=None, - filename=None, pname=None, **kwargs, @@ -234,23 +673,38 @@ def __init__( **kwargs, ) - self.flow_package_name = self.build_mfdata('flow_package_name', flow_package_name) - self.auxiliary = self.build_mfdata('auxiliary', auxiliary) - self.flow_package_auxiliary_name = self.build_mfdata('flow_package_auxiliary_name', flow_package_auxiliary_name) - self.boundnames = self.build_mfdata('boundnames', boundnames) - self.print_input = self.build_mfdata('print_input', print_input) - self.print_temperature = self.build_mfdata('print_temperature', print_temperature) - self.print_flows = self.build_mfdata('print_flows', print_flows) - self.save_flows = self.build_mfdata('save_flows', save_flows) - self.temperature_filerecord = self.build_mfdata('temperature_filerecord', temperature_filerecord) - self.budget_filerecord = self.build_mfdata('budget_filerecord', budget_filerecord) - self.budgetcsv_filerecord = self.build_mfdata('budgetcsv_filerecord', budgetcsv_filerecord) - self._ts_filerecord = self.build_mfdata('ts_filerecord', None) - self._ts_package = self.build_child_package('ts', timeseries, 'timeseries', self._ts_filerecord) - self._obs_filerecord = self.build_mfdata('obs_filerecord', None) - self._obs_package = self.build_child_package('obs', observations, 'continuous', self._obs_filerecord) - self.packagedata = self.build_mfdata('packagedata', packagedata) - self.lakeperioddata = self.build_mfdata('lakeperioddata', lakeperioddata) + self.flow_package_name = self.build_mfdata( + "flow_package_name", flow_package_name + ) + self.auxiliary = self.build_mfdata("auxiliary", auxiliary) + self.flow_package_auxiliary_name = self.build_mfdata( + "flow_package_auxiliary_name", flow_package_auxiliary_name + ) + self.boundnames = self.build_mfdata("boundnames", boundnames) + self.print_input = self.build_mfdata("print_input", print_input) + self.print_temperature = self.build_mfdata( + "print_temperature", print_temperature + ) + self.print_flows = self.build_mfdata("print_flows", print_flows) + self.save_flows = self.build_mfdata("save_flows", save_flows) + self.temperature_filerecord = self.build_mfdata( + "temperature_filerecord", temperature_filerecord + ) + self.budget_filerecord = self.build_mfdata( + "budget_filerecord", budget_filerecord + ) + self.budgetcsv_filerecord = self.build_mfdata( + "budgetcsv_filerecord", budgetcsv_filerecord + ) + self._ts_filerecord = self.build_mfdata("ts_filerecord", None) + self._ts_package = self.build_child_package( + "ts", timeseries, "timeseries", self._ts_filerecord + ) + self._obs_filerecord = self.build_mfdata("obs_filerecord", None) + self._obs_package = self.build_child_package( + "obs", observations, "continuous", self._obs_filerecord + ) + self.packagedata = self.build_mfdata("packagedata", packagedata) + self.lakeperioddata = self.build_mfdata("lakeperioddata", lakeperioddata) self._init_complete = True - diff --git a/flopy/mf6/modflow/mfgwemve.py b/flopy/mf6/modflow/mfgwemve.py index 966270535a..d4f6728291 100644 --- a/flopy/mf6/modflow/mfgwemve.py +++ b/flopy/mf6/modflow/mfgwemve.py @@ -51,12 +51,109 @@ class ModflowGwemve(MFPackage): """ - budget_filerecord = ListTemplateGenerator(('gwe6', 'mve', 'options', 'budget_filerecord')) - budgetcsv_filerecord = ListTemplateGenerator(('gwe6', 'mve', 'options', 'budgetcsv_filerecord')) - package_abbr = 'gwemve' - _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']] + budget_filerecord = ListTemplateGenerator( + ("gwe6", "mve", "options", "budget_filerecord") + ) + budgetcsv_filerecord = ListTemplateGenerator( + ("gwe6", "mve", "options", "budgetcsv_filerecord") + ) + package_abbr = "gwemve" + _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, @@ -67,7 +164,6 @@ def __init__( save_flows=None, budget_filerecord=None, budgetcsv_filerecord=None, - filename=None, pname=None, **kwargs, @@ -82,18 +178,24 @@ def __init__( **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.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 GwemvePackages(MFChildPackages): """ GwemvePackages is a container class for the ModflowGwemve class. """ + package_abbr = "gwemvepackages" def initialize( @@ -103,7 +205,6 @@ def initialize( save_flows=None, budget_filerecord=None, budgetcsv_filerecord=None, - filename=None, pname=None, ): @@ -133,7 +234,6 @@ def append_package( save_flows=None, budget_filerecord=None, budgetcsv_filerecord=None, - filename=None, pname=None, ): diff --git a/flopy/mf6/modflow/mfgwemwe.py b/flopy/mf6/modflow/mfgwemwe.py index a386f5bbde..a62a614fd3 100644 --- a/flopy/mf6/modflow/mfgwemwe.py +++ b/flopy/mf6/modflow/mfgwemwe.py @@ -171,18 +171,428 @@ class ModflowGwemwe(MFPackage): """ - auxiliary = ArrayTemplateGenerator(('gwe6', 'mwe', 'options', 'auxiliary')) - temperature_filerecord = ListTemplateGenerator(('gwe6', 'mwe', 'options', 'temperature_filerecord')) - budget_filerecord = ListTemplateGenerator(('gwe6', 'mwe', 'options', 'budget_filerecord')) - budgetcsv_filerecord = ListTemplateGenerator(('gwe6', 'mwe', 'options', 'budgetcsv_filerecord')) - ts_filerecord = ListTemplateGenerator(('gwe6', 'mwe', 'options', 'ts_filerecord')) - obs_filerecord = ListTemplateGenerator(('gwe6', 'mwe', 'options', 'obs_filerecord')) - packagedata = ListTemplateGenerator(('gwe6', 'mwe', 'packagedata', 'packagedata')) - mweperioddata = ListTemplateGenerator(('gwe6', 'mwe', 'period', 'mweperioddata')) - package_abbr = 'gwemwe' - _package_type = 'mwe' - dfn_file_name = 'gwe-mwe.dfn' - dfn = [['header', 'multi-package'], ['block options', 'name flow_package_name', 'type string', 'shape', 'reader urword', 'optional true'], ['block options', 'name auxiliary', 'type string', 'shape (naux)', 'reader urword', 'optional true'], ['block options', 'name flow_package_auxiliary_name', 'type string', 'shape', 'reader urword', 'optional true'], ['block options', 'name boundnames', 'type keyword', 'shape', 'reader urword', 'optional true'], ['block options', 'name print_input', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name print_temperature', '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 temperature_filerecord', 'type record temperature fileout tempfile', 'shape', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name temperature', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name tempfile', 'type string', 'preserve_case true', 'shape', 'in_record true', 'reader urword', 'tagged false', 'optional false'], ['block options', 'name budget_filerecord', 'type record budget fileout budgetfile', 'shape', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name budget', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name fileout', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name budgetfile', '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'], ['block options', 'name ts_filerecord', 'type record ts6 filein ts6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package ts', 'construct_data timeseries', 'parameter_name timeseries'], ['block options', 'name ts6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name filein', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name ts6_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false'], ['block options', 'name obs_filerecord', 'type record obs6 filein obs6_filename', 'shape', 'reader urword', 'tagged true', 'optional true', 'construct_package obs', 'construct_data observations', 'parameter_name continuous'], ['block options', 'name obs6', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name obs6_filename', 'type string', 'preserve_case true', 'in_record true', 'tagged false', 'reader urword', 'optional false'], ['block packagedata', 'name packagedata', 'type recarray mawno strt ktf fthk aux boundname', 'shape (maxbound)', 'reader urword'], ['block packagedata', 'name mawno', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block packagedata', 'name strt', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block packagedata', 'name ktf', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block packagedata', 'name fthk', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block packagedata', 'name aux', 'type double precision', 'in_record true', 'tagged false', 'shape (naux)', 'reader urword', 'time_series true', 'optional true'], ['block packagedata', 'name boundname', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword', 'optional true'], ['block period', 'name iper', 'type integer', 'block_variable true', 'in_record true', 'tagged false', 'shape', 'valid', 'reader urword', 'optional false'], ['block period', 'name mweperioddata', 'type recarray mawno mwesetting', 'shape', 'reader urword'], ['block period', 'name mawno', 'type integer', 'shape', 'tagged false', 'in_record true', 'reader urword', 'numeric_index true'], ['block period', 'name mwesetting', 'type keystring status temperature rate auxiliaryrecord', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name status', 'type string', 'shape', 'tagged true', 'in_record true', 'reader urword'], ['block period', 'name temperature', 'type string', 'shape', 'tagged true', 'in_record true', 'time_series true', 'reader urword'], ['block period', 'name rate', 'type string', 'shape', 'tagged true', 'in_record true', 'reader urword', 'time_series true'], ['block period', 'name auxiliaryrecord', 'type record auxiliary auxname auxval', 'shape', 'tagged', 'in_record true', 'reader urword'], ['block period', 'name auxiliary', 'type keyword', 'shape', 'in_record true', 'reader urword'], ['block period', 'name auxname', 'type string', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name auxval', 'type double precision', 'shape', 'tagged false', 'in_record true', 'reader urword', 'time_series true']] + auxiliary = ArrayTemplateGenerator(("gwe6", "mwe", "options", "auxiliary")) + temperature_filerecord = ListTemplateGenerator( + ("gwe6", "mwe", "options", "temperature_filerecord") + ) + budget_filerecord = ListTemplateGenerator( + ("gwe6", "mwe", "options", "budget_filerecord") + ) + budgetcsv_filerecord = ListTemplateGenerator( + ("gwe6", "mwe", "options", "budgetcsv_filerecord") + ) + ts_filerecord = ListTemplateGenerator(("gwe6", "mwe", "options", "ts_filerecord")) + obs_filerecord = ListTemplateGenerator(("gwe6", "mwe", "options", "obs_filerecord")) + packagedata = ListTemplateGenerator(("gwe6", "mwe", "packagedata", "packagedata")) + mweperioddata = ListTemplateGenerator(("gwe6", "mwe", "period", "mweperioddata")) + package_abbr = "gwemwe" + _package_type = "mwe" + dfn_file_name = "gwe-mwe.dfn" + dfn = [ + ["header", "multi-package"], + [ + "block options", + "name flow_package_name", + "type string", + "shape", + "reader urword", + "optional true", + ], + [ + "block options", + "name auxiliary", + "type string", + "shape (naux)", + "reader urword", + "optional true", + ], + [ + "block options", + "name flow_package_auxiliary_name", + "type string", + "shape", + "reader urword", + "optional true", + ], + [ + "block options", + "name boundnames", + "type keyword", + "shape", + "reader urword", + "optional true", + ], + [ + "block options", + "name print_input", + "type keyword", + "reader urword", + "optional true", + ], + [ + "block options", + "name print_temperature", + "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 temperature_filerecord", + "type record temperature fileout tempfile", + "shape", + "reader urword", + "tagged true", + "optional true", + ], + [ + "block options", + "name temperature", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name tempfile", + "type string", + "preserve_case true", + "shape", + "in_record true", + "reader urword", + "tagged false", + "optional false", + ], + [ + "block options", + "name budget_filerecord", + "type record budget fileout budgetfile", + "shape", + "reader urword", + "tagged true", + "optional true", + ], + [ + "block options", + "name budget", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name fileout", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name budgetfile", + "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", + ], + [ + "block options", + "name ts_filerecord", + "type record ts6 filein ts6_filename", + "shape", + "reader urword", + "tagged true", + "optional true", + "construct_package ts", + "construct_data timeseries", + "parameter_name timeseries", + ], + [ + "block options", + "name ts6", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name filein", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name ts6_filename", + "type string", + "preserve_case true", + "in_record true", + "reader urword", + "optional false", + "tagged false", + ], + [ + "block options", + "name obs_filerecord", + "type record obs6 filein obs6_filename", + "shape", + "reader urword", + "tagged true", + "optional true", + "construct_package obs", + "construct_data observations", + "parameter_name continuous", + ], + [ + "block options", + "name obs6", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name obs6_filename", + "type string", + "preserve_case true", + "in_record true", + "tagged false", + "reader urword", + "optional false", + ], + [ + "block packagedata", + "name packagedata", + "type recarray mawno strt ktf fthk aux boundname", + "shape (maxbound)", + "reader urword", + ], + [ + "block packagedata", + "name mawno", + "type integer", + "shape", + "tagged false", + "in_record true", + "reader urword", + "numeric_index true", + ], + [ + "block packagedata", + "name strt", + "type double precision", + "shape", + "tagged false", + "in_record true", + "reader urword", + ], + [ + "block packagedata", + "name ktf", + "type double precision", + "shape", + "tagged false", + "in_record true", + "reader urword", + ], + [ + "block packagedata", + "name fthk", + "type double precision", + "shape", + "tagged false", + "in_record true", + "reader urword", + ], + [ + "block packagedata", + "name aux", + "type double precision", + "in_record true", + "tagged false", + "shape (naux)", + "reader urword", + "time_series true", + "optional true", + ], + [ + "block packagedata", + "name boundname", + "type string", + "shape", + "tagged false", + "in_record true", + "reader urword", + "optional true", + ], + [ + "block period", + "name iper", + "type integer", + "block_variable true", + "in_record true", + "tagged false", + "shape", + "valid", + "reader urword", + "optional false", + ], + [ + "block period", + "name mweperioddata", + "type recarray mawno mwesetting", + "shape", + "reader urword", + ], + [ + "block period", + "name mawno", + "type integer", + "shape", + "tagged false", + "in_record true", + "reader urword", + "numeric_index true", + ], + [ + "block period", + "name mwesetting", + "type keystring status temperature rate auxiliaryrecord", + "shape", + "tagged false", + "in_record true", + "reader urword", + ], + [ + "block period", + "name status", + "type string", + "shape", + "tagged true", + "in_record true", + "reader urword", + ], + [ + "block period", + "name temperature", + "type string", + "shape", + "tagged true", + "in_record true", + "time_series true", + "reader urword", + ], + [ + "block period", + "name rate", + "type string", + "shape", + "tagged true", + "in_record true", + "reader urword", + "time_series true", + ], + [ + "block period", + "name auxiliaryrecord", + "type record auxiliary auxname auxval", + "shape", + "tagged", + "in_record true", + "reader urword", + ], + [ + "block period", + "name auxiliary", + "type keyword", + "shape", + "in_record true", + "reader urword", + ], + [ + "block period", + "name auxname", + "type string", + "shape", + "tagged false", + "in_record true", + "reader urword", + ], + [ + "block period", + "name auxval", + "type double precision", + "shape", + "tagged false", + "in_record true", + "reader urword", + "time_series true", + ], + ] def __init__( self, @@ -203,7 +613,6 @@ def __init__( observations=None, packagedata=None, mweperioddata=None, - filename=None, pname=None, **kwargs, @@ -218,23 +627,38 @@ def __init__( **kwargs, ) - self.flow_package_name = self.build_mfdata('flow_package_name', flow_package_name) - self.auxiliary = self.build_mfdata('auxiliary', auxiliary) - self.flow_package_auxiliary_name = self.build_mfdata('flow_package_auxiliary_name', flow_package_auxiliary_name) - self.boundnames = self.build_mfdata('boundnames', boundnames) - self.print_input = self.build_mfdata('print_input', print_input) - self.print_temperature = self.build_mfdata('print_temperature', print_temperature) - self.print_flows = self.build_mfdata('print_flows', print_flows) - self.save_flows = self.build_mfdata('save_flows', save_flows) - self.temperature_filerecord = self.build_mfdata('temperature_filerecord', temperature_filerecord) - self.budget_filerecord = self.build_mfdata('budget_filerecord', budget_filerecord) - self.budgetcsv_filerecord = self.build_mfdata('budgetcsv_filerecord', budgetcsv_filerecord) - self._ts_filerecord = self.build_mfdata('ts_filerecord', None) - self._ts_package = self.build_child_package('ts', timeseries, 'timeseries', self._ts_filerecord) - self._obs_filerecord = self.build_mfdata('obs_filerecord', None) - self._obs_package = self.build_child_package('obs', observations, 'continuous', self._obs_filerecord) - self.packagedata = self.build_mfdata('packagedata', packagedata) - self.mweperioddata = self.build_mfdata('mweperioddata', mweperioddata) + self.flow_package_name = self.build_mfdata( + "flow_package_name", flow_package_name + ) + self.auxiliary = self.build_mfdata("auxiliary", auxiliary) + self.flow_package_auxiliary_name = self.build_mfdata( + "flow_package_auxiliary_name", flow_package_auxiliary_name + ) + self.boundnames = self.build_mfdata("boundnames", boundnames) + self.print_input = self.build_mfdata("print_input", print_input) + self.print_temperature = self.build_mfdata( + "print_temperature", print_temperature + ) + self.print_flows = self.build_mfdata("print_flows", print_flows) + self.save_flows = self.build_mfdata("save_flows", save_flows) + self.temperature_filerecord = self.build_mfdata( + "temperature_filerecord", temperature_filerecord + ) + self.budget_filerecord = self.build_mfdata( + "budget_filerecord", budget_filerecord + ) + self.budgetcsv_filerecord = self.build_mfdata( + "budgetcsv_filerecord", budgetcsv_filerecord + ) + self._ts_filerecord = self.build_mfdata("ts_filerecord", None) + self._ts_package = self.build_child_package( + "ts", timeseries, "timeseries", self._ts_filerecord + ) + self._obs_filerecord = self.build_mfdata("obs_filerecord", None) + self._obs_package = self.build_child_package( + "obs", observations, "continuous", self._obs_filerecord + ) + self.packagedata = self.build_mfdata("packagedata", packagedata) + self.mweperioddata = self.build_mfdata("mweperioddata", mweperioddata) self._init_complete = True - diff --git a/flopy/mf6/modflow/mfgwenam.py b/flopy/mf6/modflow/mfgwenam.py index fee3608c72..7b1e0b7702 100644 --- a/flopy/mf6/modflow/mfgwenam.py +++ b/flopy/mf6/modflow/mfgwenam.py @@ -83,14 +83,206 @@ class ModflowGwenam(MFPackage): """ - nc_mesh2d_filerecord = ListTemplateGenerator(('gwe6', 'nam', 'options', 'nc_mesh2d_filerecord')) - nc_structured_filerecord = ListTemplateGenerator(('gwe6', 'nam', 'options', 'nc_structured_filerecord')) - nc_filerecord = ListTemplateGenerator(('gwe6', 'nam', 'options', 'nc_filerecord')) - packages = ListTemplateGenerator(('gwe6', 'nam', 'packages', 'packages')) - package_abbr = 'gwenam' - _package_type = 'nam' - dfn_file_name = 'gwe-nam.dfn' - dfn = [['header'], ['block options', 'name list', 'type string', 'reader urword', 'optional true', 'preserve_case true'], ['block options', 'name print_input', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name print_flows', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name save_flows', 'type keyword', 'reader urword', 'optional true'], ['block options', 'name dependent_variable_scaling', 'type keyword', 'reader urword', 'optional true', 'mf6internal idv_scale'], ['block options', 'name nc_mesh2d_filerecord', 'type record netcdf_mesh2d fileout ncmesh2dfile', 'shape', 'reader urword', 'tagged true', 'optional true', 'mf6internal ncmesh2drec'], ['block options', 'name netcdf_mesh2d', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false', 'extended true'], ['block options', 'name nc_structured_filerecord', 'type record netcdf_structured fileout ncstructfile', 'shape', 'reader urword', 'tagged true', 'optional true', 'mf6internal ncstructrec'], ['block options', 'name netcdf_structured', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false', 'mf6internal netcdf_struct', 'extended true'], ['block options', 'name fileout', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name ncmesh2dfile', 'type string', 'preserve_case true', 'shape', 'in_record true', 'reader urword', 'tagged false', 'optional false', 'extended true'], ['block options', 'name ncstructfile', 'type string', 'preserve_case true', 'shape', 'in_record true', 'reader urword', 'tagged false', 'optional false', 'extended true'], ['block options', 'name nc_filerecord', 'type record netcdf filein netcdf_filename', 'reader urword', 'tagged true', 'optional true'], ['block options', 'name netcdf', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false', 'extended true'], ['block options', 'name filein', 'type keyword', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name netcdf_filename', 'type string', 'preserve_case true', 'in_record true', 'reader urword', 'optional false', 'tagged false', 'mf6internal netcdf_fname', 'extended true'], ['block packages', 'name packages', 'type recarray ftype fname pname', 'reader urword', 'optional false'], ['block packages', 'name ftype', 'in_record true', 'type string', 'tagged false', 'reader urword'], ['block packages', 'name fname', 'in_record true', 'type string', 'preserve_case true', 'tagged false', 'reader urword'], ['block packages', 'name pname', 'in_record true', 'type string', 'tagged false', 'reader urword', 'optional true']] + nc_mesh2d_filerecord = ListTemplateGenerator( + ("gwe6", "nam", "options", "nc_mesh2d_filerecord") + ) + nc_structured_filerecord = ListTemplateGenerator( + ("gwe6", "nam", "options", "nc_structured_filerecord") + ) + nc_filerecord = ListTemplateGenerator(("gwe6", "nam", "options", "nc_filerecord")) + packages = ListTemplateGenerator(("gwe6", "nam", "packages", "packages")) + package_abbr = "gwenam" + _package_type = "nam" + dfn_file_name = "gwe-nam.dfn" + dfn = [ + ["header"], + [ + "block options", + "name list", + "type string", + "reader urword", + "optional true", + "preserve_case true", + ], + [ + "block options", + "name print_input", + "type keyword", + "reader urword", + "optional true", + ], + [ + "block options", + "name print_flows", + "type keyword", + "reader urword", + "optional true", + ], + [ + "block options", + "name save_flows", + "type keyword", + "reader urword", + "optional true", + ], + [ + "block options", + "name dependent_variable_scaling", + "type keyword", + "reader urword", + "optional true", + "mf6internal idv_scale", + ], + [ + "block options", + "name nc_mesh2d_filerecord", + "type record netcdf_mesh2d fileout ncmesh2dfile", + "shape", + "reader urword", + "tagged true", + "optional true", + "mf6internal ncmesh2drec", + ], + [ + "block options", + "name netcdf_mesh2d", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + "extended true", + ], + [ + "block options", + "name nc_structured_filerecord", + "type record netcdf_structured fileout ncstructfile", + "shape", + "reader urword", + "tagged true", + "optional true", + "mf6internal ncstructrec", + ], + [ + "block options", + "name netcdf_structured", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + "mf6internal netcdf_struct", + "extended true", + ], + [ + "block options", + "name fileout", + "type keyword", + "shape", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name ncmesh2dfile", + "type string", + "preserve_case true", + "shape", + "in_record true", + "reader urword", + "tagged false", + "optional false", + "extended true", + ], + [ + "block options", + "name ncstructfile", + "type string", + "preserve_case true", + "shape", + "in_record true", + "reader urword", + "tagged false", + "optional false", + "extended true", + ], + [ + "block options", + "name nc_filerecord", + "type record netcdf filein netcdf_filename", + "reader urword", + "tagged true", + "optional true", + ], + [ + "block options", + "name netcdf", + "type keyword", + "in_record true", + "reader urword", + "tagged true", + "optional false", + "extended true", + ], + [ + "block options", + "name filein", + "type keyword", + "in_record true", + "reader urword", + "tagged true", + "optional false", + ], + [ + "block options", + "name netcdf_filename", + "type string", + "preserve_case true", + "in_record true", + "reader urword", + "optional false", + "tagged false", + "mf6internal netcdf_fname", + "extended true", + ], + [ + "block packages", + "name packages", + "type recarray ftype fname pname", + "reader urword", + "optional false", + ], + [ + "block packages", + "name ftype", + "in_record true", + "type string", + "tagged false", + "reader urword", + ], + [ + "block packages", + "name fname", + "in_record true", + "type string", + "preserve_case true", + "tagged false", + "reader urword", + ], + [ + "block packages", + "name pname", + "in_record true", + "type string", + "tagged false", + "reader urword", + "optional true", + ], + ] def __init__( self, @@ -105,7 +297,6 @@ def __init__( nc_structured_filerecord=None, nc_filerecord=None, packages=None, - filename=None, pname=None, **kwargs, @@ -120,15 +311,20 @@ def __init__( **kwargs, ) - self.list = self.build_mfdata('list', list) - 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.dependent_variable_scaling = self.build_mfdata('dependent_variable_scaling', dependent_variable_scaling) - self.nc_mesh2d_filerecord = self.build_mfdata('nc_mesh2d_filerecord', nc_mesh2d_filerecord) - self.nc_structured_filerecord = self.build_mfdata('nc_structured_filerecord', nc_structured_filerecord) - self.nc_filerecord = self.build_mfdata('nc_filerecord', nc_filerecord) - self.packages = self.build_mfdata('packages', packages) + self.list = self.build_mfdata("list", list) + 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.dependent_variable_scaling = self.build_mfdata( + "dependent_variable_scaling", dependent_variable_scaling + ) + self.nc_mesh2d_filerecord = self.build_mfdata( + "nc_mesh2d_filerecord", nc_mesh2d_filerecord + ) + self.nc_structured_filerecord = self.build_mfdata( + "nc_structured_filerecord", nc_structured_filerecord + ) + self.nc_filerecord = self.build_mfdata("nc_filerecord", nc_filerecord) + self.packages = self.build_mfdata("packages", packages) self._init_complete = True - diff --git a/flopy/mf6/modflow/mfgweoc.py b/flopy/mf6/modflow/mfgweoc.py index 9295023c12..1270a025d3 100644 --- a/flopy/mf6/modflow/mfgweoc.py +++ b/flopy/mf6/modflow/mfgweoc.py @@ -65,16 +65,310 @@ class ModflowGweoc(MFPackage): """ - budget_filerecord = ListTemplateGenerator(('gwe6', 'oc', 'options', 'budget_filerecord')) - budgetcsv_filerecord = ListTemplateGenerator(('gwe6', 'oc', 'options', 'budgetcsv_filerecord')) - temperature_filerecord = ListTemplateGenerator(('gwe6', 'oc', 'options', 'temperature_filerecord')) - temperatureprintrecord = ListTemplateGenerator(('gwe6', 'oc', 'options', 'temperatureprintrecord')) - saverecord = ListTemplateGenerator(('gwe6', 'oc', 'period', 'saverecord')) - printrecord = ListTemplateGenerator(('gwe6', 'oc', 'period', 'printrecord')) - package_abbr = 'gweoc' - _package_type = 'oc' - dfn_file_name = 'gwe-oc.dfn' - dfn = [['header'], ['block options', 'name budget_filerecord', 'type record budget fileout budgetfile', 'shape', 'reader urword', 'tagged true', 'optional true', 'mf6internal budfilerec'], ['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', 'mf6internal budcsvfilerec'], ['block options', 'name budgetcsv', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name budgetcsvfile', 'type string', 'preserve_case true', 'shape', 'in_record true', 'reader urword', 'tagged false', 'optional false'], ['block options', 'name temperature_filerecord', 'type record temperature fileout temperaturefile', 'shape', 'reader urword', 'tagged true', 'optional true', 'mf6internal tempfilerec'], ['block options', 'name temperature', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name temperaturefile', 'type string', 'preserve_case true', 'shape', 'in_record true', 'reader urword', 'tagged false', 'optional false', 'mf6internal tempfile'], ['block options', 'name temperatureprintrecord', 'type record temperature print_format formatrecord', 'shape', 'reader urword', 'optional true', 'mf6internal tempprintrec'], ['block options', 'name print_format', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block options', 'name formatrecord', 'type record columns width digits format', 'shape', 'in_record true', 'reader urword', 'tagged', 'optional false'], ['block options', 'name columns', 'type integer', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional'], ['block options', 'name width', 'type integer', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional'], ['block options', 'name digits', 'type integer', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional'], ['block options', 'name format', 'type string', 'shape', 'in_record true', 'reader urword', 'tagged false', 'optional false'], ['block period', 'name iper', 'type integer', 'block_variable true', 'in_record true', 'tagged false', 'shape', 'valid', 'reader urword', 'optional false'], ['block period', 'name saverecord', 'type record save rtype ocsetting', 'shape', 'reader urword', 'tagged false', 'optional true'], ['block period', 'name save', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block period', 'name printrecord', 'type record print rtype ocsetting', 'shape', 'reader urword', 'tagged false', 'optional true'], ['block period', 'name print', 'type keyword', 'shape', 'in_record true', 'reader urword', 'tagged true', 'optional false'], ['block period', 'name rtype', 'type string', 'shape', 'in_record true', 'reader urword', 'tagged false', 'optional false'], ['block period', 'name ocsetting', 'type keystring all first last frequency steps', 'shape', 'tagged false', 'in_record true', 'reader urword'], ['block period', 'name all', 'type keyword', 'shape', 'in_record true', 'reader urword'], ['block period', 'name first', 'type keyword', 'shape', 'in_record true', 'reader urword'], ['block period', 'name last', 'type keyword', 'shape', 'in_record true', 'reader urword'], ['block period', 'name frequency', 'type integer', 'shape', 'tagged true', 'in_record true', 'reader urword'], ['block period', 'name steps', 'type integer', 'shape (