From f5bda897ad98e9861e137f750f43955529dc1597 Mon Sep 17 00:00:00 2001 From: mjreno Date: Mon, 28 Oct 2024 16:11:31 -0400 Subject: [PATCH 1/5] write runnable gwf base simulation --- docs/examples/array_example.py | 19 +- flopy4/array.py | 40 ++- flopy4/block.py | 14 +- flopy4/compound.py | 91 +++-- flopy4/ispec/exg_gwfgwf.py | 2 +- flopy4/ispec/gwe_dis.py | 10 +- flopy4/ispec/gwf_chd.py | 270 ++++++++++++++ flopy4/ispec/gwf_dis.py | 10 +- flopy4/ispec/gwf_ic.py | 2 +- flopy4/ispec/gwf_model.py | 4 + flopy4/ispec/gwf_npf.py | 615 ++++++++++++++++++++++++++++++++ flopy4/ispec/gwt_dis.py | 10 +- flopy4/ispec/prt_dis.py | 10 +- flopy4/ispec/prt_prp.py | 174 ++++----- flopy4/model.py | 30 +- flopy4/package.py | 1 + flopy4/param.py | 1 + flopy4/simulation.py | 42 ++- spec/dfn/gwf-chd.dfn | 222 ++++++++++++ spec/dfn/gwf-npf.dfn | 355 +++++++++++++++++++ spec/dfn/prt-prp.dfn | 124 +++---- spec/mf6pkg.template | 4 +- spec/toml/gwf-chd.toml | 347 ++++++++++++++++++ spec/toml/gwf-npf.toml | 620 +++++++++++++++++++++++++++++++++ spec/toml/prt-prp.toml | 156 ++++----- test/test_array.py | 11 +- test/test_dfn.py | 18 +- test/test_list.py | 13 +- test/test_package.py | 8 +- test/test_sim.py | 165 ++++++++- 30 files changed, 3043 insertions(+), 345 deletions(-) create mode 100644 flopy4/ispec/gwf_chd.py create mode 100644 flopy4/ispec/gwf_npf.py create mode 100644 spec/dfn/gwf-chd.dfn create mode 100644 spec/dfn/gwf-npf.dfn create mode 100644 spec/toml/gwf-chd.toml create mode 100644 spec/toml/gwf-npf.toml diff --git a/docs/examples/array_example.py b/docs/examples/array_example.py index 468f5014..4efc29f1 100644 --- a/docs/examples/array_example.py +++ b/docs/examples/array_example.py @@ -62,11 +62,12 @@ constant = data_path / "constant.txt" external = data_path / "external.txt" shape = (1000, 100) +type = "double" # Open and load a NumPy array representation fhandle = open(internal) -imfa = MFArray.load(fhandle, data_path, shape, header=False) +imfa = MFArray.load(fhandle, data_path, shape, type=type, header=False) # Get values @@ -87,7 +88,7 @@ plt.colorbar() fhandle = open(constant) -cmfa = MFArray.load(fhandle, data_path, shape, header=False) +cmfa = MFArray.load(fhandle, data_path, shape, type=type, header=False) cvals = cmfa.value plt.imshow(cvals[0:100]) plt.colorbar() @@ -110,7 +111,7 @@ # External fhandle = open(external) -emfa = MFArray.load(fhandle, data_path, shape, header=False) +emfa = MFArray.load(fhandle, data_path, shape, type=type, header=False) evals = emfa.value evals @@ -135,7 +136,9 @@ fhandle = open(ilayered) shape = (3, 1000, 100) -ilmfa = MFArray.load(fhandle, data_path, shape, header=False, layered=True) +ilmfa = MFArray.load( + fhandle, data_path, shape, type=type, header=False, layered=True +) vals = ilmfa.value ilmfa._value # internal storage @@ -182,7 +185,9 @@ fhandle = open(clayered) shape = (3, 1000, 100) -clmfa = MFArray.load(fhandle, data_path, shape, header=False, layered=True) +clmfa = MFArray.load( + fhandle, data_path, shape, type=type, header=False, layered=True +) clmfa._value @@ -235,7 +240,9 @@ fhandle = open(mlayered) shape = (3, 1000, 100) -mlmfa = MFArray.load(fhandle, data_path, shape, header=False, layered=True) +mlmfa = MFArray.load( + fhandle, data_path, shape, type=type, header=False, layered=True +) mlmfa.how diff --git a/flopy4/array.py b/flopy4/array.py index 775ec16d..4b807814 100644 --- a/flopy4/array.py +++ b/flopy4/array.py @@ -434,6 +434,16 @@ def load(cls, f, cwd, shape, header=True, **kwargs): model_shape = kwargs.pop("model_shape", None) params = kwargs.pop("blk_params", {}) mempath = kwargs.pop("mempath", None) + atype = kwargs.get("type", None) + + if atype is not None: + if atype == "integer": + dtype = np.int32 + elif atype == "double": + dtype = np.float64 + else: + raise ValueError("array spec type not defined") + if model_shape and isinstance(shape, str): if shape == "(nodes)": n = math.prod([x for x in model_shape]) @@ -459,7 +469,7 @@ def load(cls, f, cwd, shape, header=True, **kwargs): lshp = shape[1:] objs = [] for _ in range(nlay): - mfa = cls._load(f, cwd, lshp, name) + mfa = cls._load(f, cwd, lshp, dtype=dtype, name=name) objs.append(mfa) return MFArray( @@ -474,11 +484,17 @@ def load(cls, f, cwd, shape, header=True, **kwargs): else: kwargs.pop("layered", None) return cls._load( - f, cwd, shape, layered=layered, name=name, **kwargs + f, + cwd, + shape, + layered=layered, + dtype=dtype, + name=name, + **kwargs, ) @classmethod - def _load(cls, f, cwd, shape, layered=False, **kwargs): + def _load(cls, f, cwd, shape, layered=False, dtype=None, **kwargs): control_line = multi_line_strip(f).split() if CommonNames.iprn.lower() in control_line: @@ -491,17 +507,20 @@ def _load(cls, f, cwd, shape, layered=False, **kwargs): clpos = 1 if how == MFArrayType.internal: - array = cls.read_array(f) + array = cls.read_array(f, dtype) elif how == MFArrayType.constant: - array = float(control_line[clpos]) + if dtype == np.float64: + array = float(control_line[clpos]) + else: + array = int(control_line[clpos]) clpos += 1 elif how == MFArrayType.external: extpath = Path(control_line[clpos]) fpath = cwd / extpath with open(fpath) as foo: - array = cls.read_array(foo) + array = cls.read_array(foo, dtype) clpos += 1 else: @@ -509,7 +528,10 @@ def _load(cls, f, cwd, shape, layered=False, **kwargs): factor = None if len(control_line) > 2: - factor = float(control_line[clpos + 1]) + if dtype == np.float64: + factor = float(control_line[clpos + 1]) + else: + factor = int(control_line[clpos + 1]) return cls( shape, @@ -521,7 +543,7 @@ def _load(cls, f, cwd, shape, layered=False, **kwargs): ) @staticmethod - def read_array(f): + def read_array(f, dtype): """ Read a MODFLOW 6 array from an open file into a flat NumPy array representation. @@ -538,5 +560,5 @@ def read_array(f): astr.append(line) astr = StringIO(" ".join(astr)) - array = np.genfromtxt(astr).ravel() + array = np.genfromtxt(astr, dtype=dtype).ravel() return array diff --git a/flopy4/block.py b/flopy4/block.py index e5722b21..73107686 100644 --- a/flopy4/block.py +++ b/flopy4/block.py @@ -225,6 +225,7 @@ def load(cls, f, **kwargs): name = None index = None found = False + period = False params = dict() members = cls.params @@ -238,12 +239,17 @@ def load(cls, f, **kwargs): if line == "\n": continue words = strip(line).lower().split() - key = words[0] + if period: + key = "stress_period_data" + else: + key = words[0] if key == "begin": found = True name = words[1] if len(words) > 2 and str.isdigit(words[2]): index = int(words[2]) + if name == "period": + period = True elif key == "end": break elif found: @@ -268,12 +274,14 @@ def load(cls, f, **kwargs): # TODO: inject from model somehow? # and remove special handling here kwrgs["cwd"] = "" + # kwrgs["type"] = param.type kwrgs["mempath"] = f"{mempath}/{name}" - if ptype is not MFArray: + if ptype is not MFArray and ptype is not MFList: kwrgs.pop("model_shape", None) kwrgs.pop("blk_params", None) params[param.name] = ptype.load(f, **kwrgs) + period = False return cls(name=name, index=index, params=params) @@ -281,7 +289,7 @@ def write(self, f): """Write the block to file.""" index = self.index if self.index is not None else "" begin = f"BEGIN {self.name.upper()} {index}\n" - end = f"END {self.name.upper()}\n" + end = f"END {self.name.upper()}\n\n" f.write(begin) super().write(f) diff --git a/flopy4/compound.py b/flopy4/compound.py index 3ea38c03..96e419c7 100644 --- a/flopy4/compound.py +++ b/flopy4/compound.py @@ -7,7 +7,7 @@ from flopy4.array import MFArray, MFArrayType from flopy4.param import MFParam, MFParams, MFReader -from flopy4.scalar import MFDouble, MFInteger, MFScalar +from flopy4.scalar import MFScalar from flopy4.utils import strip PAD = " " @@ -338,21 +338,39 @@ def load(cls, f, **kwargs) -> "MFList": """Load list input with the given component parameters from a file.""" blk_params = kwargs.pop("blk_params", {}) + model_shape = kwargs.pop("model_shape", None) params = kwargs.pop("params", None) - type = kwargs.pop("type", None) kwargs.pop("mname", None) - kwargs.pop("shape", None) + kwargs.pop("shape", None) # e.g. maxbound + + param_lists = [] + param_cols = [] + param_types = [] + for k in list(params): + if params[k].name == "aux" or params[k].name == "boundname": + continue + # raise NotImplementedError( + # "boundames and auxvars not yet supported in period blocks" + # ) + pcols = 0 + if params[k].shape is None or params[k].shape == "": + pcols = 1 + elif params[k].shape == "(ncelldim)": + if model_shape: + pcols = len(model_shape) + else: + raise ValueError("model_shape not set") + else: + pcols = len(params[k].shape.split(",")) + param_cols.append(pcols) + param_lists.append(list()) + param_types.append(params[k].type) if list(params.items())[-1][1].shape == "(:)": - maxsplit = len(params) - 1 + maxsplit = sum(param_cols) - 1 else: maxsplit = -1 - param_lists = [] - # TODO: support multi-dimensional params - for i in range(len(params)): - param_lists.append(list()) - while True: pos = f.tell() line = f.readline() @@ -361,9 +379,28 @@ def load(cls, f, **kwargs) -> "MFList": break else: tokens = strip(line).split(maxsplit=maxsplit) - assert len(tokens) == len(param_lists) - for i, token in enumerate(tokens): - param_lists[i].append(token) + assert len(tokens) == sum(param_cols) + icol = 0 + for i, p in enumerate(param_lists): + if param_cols[i] == 1: + if param_types[i] == "integer": + param_lists[i].append(int(tokens[icol])) + elif param_types[i] == "double": + param_lists[i].append(float(tokens[icol])) + else: + param_lists[i].append(tokens[icol]) + icol += 1 + else: + row_l = [] + for j in range(param_cols[i]): + if param_types[i] == "integer": + row_l.append(int(tokens[icol])) + elif param_types[i] == "double": + row_l.append(float(tokens[icol])) + else: + row_l.append(tokens[icol]) + icol += 1 + param_lists[i].append(row_l) if blk_params and "dimensions" in blk_params: nbound = blk_params.get("dimensions").get("nbound") @@ -372,31 +409,41 @@ def load(cls, f, **kwargs) -> "MFList": if len(param_list) > nbound: raise ValueError("MFList nbound not satisfied") - list_params = MFList.create_list_params(params, param_lists, **kwargs) - return cls(list_params, type=type, **kwargs) + list_params = MFList.create_list_params( + params, param_lists, param_cols, **kwargs + ) + return cls(list_params, **kwargs) @staticmethod def create_list_params( params: Dict[str, MFParam], param_lists: list, + param_cols: list, **kwargs, ) -> Dict[str, MFParam]: """Create the param dictionary""" idx = 0 list_params = dict() for param_name, param in params.items(): - if type(param) is MFDouble: + if param_name == "aux" or param_name == "boundname": + continue + shape = None + if param_cols[idx] == 1: + shape = len(param_lists[idx]) + else: + shape = (len(param_lists[idx]), param_cols[idx]) + if type(param) is MFArray and param.type == "double": list_params[param_name] = MFArray( - shape=len(param_lists[idx]), + shape=shape, array=np.array(param_lists[idx], dtype=np.float64), how=MFArrayType.internal, factor=1.0, path=None, **kwargs, ) - elif type(param) is MFInteger: + elif type(param) is MFArray and param.type == "integer": list_params[param_name] = MFArray( - shape=len(param_lists[idx]), + shape=shape, array=np.array(param_lists[idx], dtype=np.int32), how=MFArrayType.internal, factor=1, @@ -406,7 +453,7 @@ def create_list_params( else: list_params[param_name] = MFScalarList( value=param_lists[idx], - type=type(param), + # type=type(param), **kwargs, ) @@ -427,5 +474,9 @@ def write(self, f, **kwargs): for i in range(count): line = f"{PAD}" for name, param in self.params.items(): - line += f"{param.value[i]}\t" + if isinstance(param.value[i], np.ndarray): + for v in param.value[i]: + line += f"{v}\t" + else: + line += f"{param.value[i]}\t" f.write(line + "\n") diff --git a/flopy4/ispec/exg_gwfgwf.py b/flopy4/ispec/exg_gwfgwf.py index 3444531b..35cc9fef 100644 --- a/flopy4/ispec/exg_gwfgwf.py +++ b/flopy4/ispec/exg_gwfgwf.py @@ -463,7 +463,7 @@ class ExgGwfgwf(MFPackage): ) aux = MFArray( - type = "array", + type = "double", block = "exchangedata", shape = "(naux)", reader = "urword", diff --git a/flopy4/ispec/gwe_dis.py b/flopy4/ispec/gwe_dis.py index 3530f28c..712ccab3 100644 --- a/flopy4/ispec/gwe_dis.py +++ b/flopy4/ispec/gwe_dis.py @@ -199,7 +199,7 @@ class GweDis(MFPackage): ) delr = MFArray( - type = "array", + type = "double", block = "griddata", shape = "(ncol)", reader = "readarray", @@ -211,7 +211,7 @@ class GweDis(MFPackage): ) delc = MFArray( - type = "array", + type = "double", block = "griddata", shape = "(nrow)", reader = "readarray", @@ -223,7 +223,7 @@ class GweDis(MFPackage): ) top = MFArray( - type = "array", + type = "double", block = "griddata", shape = "(ncol, nrow)", reader = "readarray", @@ -235,7 +235,7 @@ class GweDis(MFPackage): ) botm = MFArray( - type = "array", + type = "double", block = "griddata", shape = "(ncol, nrow, nlay)", reader = "readarray", @@ -247,7 +247,7 @@ class GweDis(MFPackage): ) idomain = MFArray( - type = "array", + type = "integer", block = "griddata", shape = "(ncol, nrow, nlay)", reader = "readarray", diff --git a/flopy4/ispec/gwf_chd.py b/flopy4/ispec/gwf_chd.py new file mode 100644 index 00000000..1e0c8389 --- /dev/null +++ b/flopy4/ispec/gwf_chd.py @@ -0,0 +1,270 @@ +# generated file +from flopy4.array import MFArray +from flopy4.compound import MFRecord, MFList +from flopy4.package import MFPackage +from flopy4.scalar import MFDouble, MFFilename, MFInteger, MFKeyword, MFString + + +class GwfChd(MFPackage): + multipkg = False + stress = False + advanced = False + + auxiliary = MFString( + type = "string", + block = "options", + shape = "(naux)", + reader = "urword", + optional = True, + longname = +"""keyword to specify aux variables""", + description = +"""REPLACE auxnames {'{#1}': 'Groundwater Flow'}""", + ) + + auxmultname = MFString( + type = "string", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""name of auxiliary variable for multiplier""", + description = +"""REPLACE auxmultname {'{#1}': 'CHD head value'}""", + ) + + boundnames = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""""", + description = +"""REPLACE boundnames {'{#1}': 'constant-head'}""", + ) + + print_input = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""print input to listing file""", + description = +"""REPLACE print_input {'{#1}': 'constant-head'}""", + ) + + print_flows = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""print CHD flows to listing file""", + description = +"""REPLACE print_flows {'{#1}': 'constant-head'}""", + ) + + save_flows = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""save CHD flows to budget file""", + description = +"""REPLACE save_flows {'{#1}': 'constant-head'}""", + ) + + ts_filerecord = MFRecord( + type = "record", + params = { + "ts6": MFKeyword(), + "filein": MFKeyword(), + "ts6_filename": MFString(), + }, + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""""", + description = +"""""", + ) + + ts6 = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = False, + longname = +"""head keyword""", + description = +"""keyword to specify that record corresponds to a time-series file.""", + ) + + filein = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = False, + longname = +"""file keyword""", + description = +"""keyword to specify that an input filename is expected next.""", + ) + + ts6_filename = MFString( + type = "string", + block = "options", + shape = "", + reader = "urword", + optional = False, + longname = +"""file name of time series information""", + description = +"""REPLACE timeseriesfile {}""", + ) + + obs_filerecord = MFRecord( + type = "record", + params = { + "obs6": MFKeyword(), + "filein": MFKeyword(), + "obs6_filename": MFString(), + }, + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""""", + description = +"""""", + ) + + obs6 = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = False, + longname = +"""obs keyword""", + description = +"""keyword to specify that record corresponds to an observations file.""", + ) + + obs6_filename = MFString( + type = "string", + block = "options", + shape = "", + reader = "urword", + optional = False, + longname = +"""obs6 input filename""", + description = +"""REPLACE obs6_filename {'{#1}': 'constant-head'}""", + ) + + dev_no_newton = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""turn off Newton for unconfined cells""", + description = +"""turn off Newton for unconfined cells""", + ) + + maxbound = MFInteger( + type = "integer", + block = "dimensions", + shape = "", + reader = "urword", + optional = False, + longname = +"""maximum number of constant heads""", + description = +"""REPLACE maxbound {'{#1}': 'constant-head'}""", + ) + + cellid = MFArray( + type = "integer", + block = "period", + shape = "(ncelldim)", + reader = "urword", + optional = False, + longname = +"""cell identifier""", + description = +"""REPLACE cellid {}""", + ) + + head = MFDouble( + type = "double", + block = "period", + shape = "", + reader = "urword", + optional = False, + longname = +"""head value assigned to constant head""", + 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.""", + ) + + aux = MFArray( + type = "double", + block = "period", + shape = "(naux)", + reader = "urword", + optional = True, + longname = +"""auxiliary variables""", + description = +"""REPLACE aux {'{#1}': 'constant head'}""", + ) + + boundname = MFString( + type = "string", + block = "period", + shape = "", + reader = "urword", + optional = True, + longname = +"""constant head boundary name""", + description = +"""REPLACE boundname {'{#1}': 'constant head boundary'}""", + ) + + stress_period_data = MFList( + type = "recarray", + params = { + "cellid": cellid, + "head": head, + "aux": aux, + "boundname": boundname, + }, + block = "period", + shape = "(maxbound)", + reader = "urword", + optional = False, + longname = +"""""", + description = +"""""", + ) \ No newline at end of file diff --git a/flopy4/ispec/gwf_dis.py b/flopy4/ispec/gwf_dis.py index 2cd78a47..e21c00bc 100644 --- a/flopy4/ispec/gwf_dis.py +++ b/flopy4/ispec/gwf_dis.py @@ -199,7 +199,7 @@ class GwfDis(MFPackage): ) delr = MFArray( - type = "array", + type = "double", block = "griddata", shape = "(ncol)", reader = "readarray", @@ -211,7 +211,7 @@ class GwfDis(MFPackage): ) delc = MFArray( - type = "array", + type = "double", block = "griddata", shape = "(nrow)", reader = "readarray", @@ -223,7 +223,7 @@ class GwfDis(MFPackage): ) top = MFArray( - type = "array", + type = "double", block = "griddata", shape = "(ncol, nrow)", reader = "readarray", @@ -235,7 +235,7 @@ class GwfDis(MFPackage): ) botm = MFArray( - type = "array", + type = "double", block = "griddata", shape = "(ncol, nrow, nlay)", reader = "readarray", @@ -247,7 +247,7 @@ class GwfDis(MFPackage): ) idomain = MFArray( - type = "array", + type = "integer", block = "griddata", shape = "(ncol, nrow, nlay)", reader = "readarray", diff --git a/flopy4/ispec/gwf_ic.py b/flopy4/ispec/gwf_ic.py index 4b276fad..f1cf8d4f 100644 --- a/flopy4/ispec/gwf_ic.py +++ b/flopy4/ispec/gwf_ic.py @@ -37,7 +37,7 @@ class GwfIc(MFPackage): ) strt = MFArray( - type = "array", + type = "double", block = "griddata", shape = "(nodes)", reader = "readarray", diff --git a/flopy4/ispec/gwf_model.py b/flopy4/ispec/gwf_model.py index b46f31c3..2f13ab46 100644 --- a/flopy4/ispec/gwf_model.py +++ b/flopy4/ispec/gwf_model.py @@ -1,12 +1,16 @@ # generated file from flopy4.model import MFModel from flopy4.resolver import Resolve +from flopy4.ispec.gwf_chd import GwfChd from flopy4.ispec.gwf_dis import GwfDis from flopy4.ispec.gwf_ic import GwfIc from flopy4.ispec.gwf_nam import GwfNam +from flopy4.ispec.gwf_npf import GwfNpf class GwfModel(MFModel, Resolve): + chd6 = GwfChd() dis6 = GwfDis() ic6 = GwfIc() nam6 = GwfNam() + npf6 = GwfNpf() diff --git a/flopy4/ispec/gwf_npf.py b/flopy4/ispec/gwf_npf.py new file mode 100644 index 00000000..818d5234 --- /dev/null +++ b/flopy4/ispec/gwf_npf.py @@ -0,0 +1,615 @@ +# generated file +from flopy4.array import MFArray +from flopy4.compound import MFRecord, MFList +from flopy4.package import MFPackage +from flopy4.scalar import MFDouble, MFFilename, MFInteger, MFKeyword, MFString + + +class GwfNpf(MFPackage): + multipkg = False + stress = False + advanced = False + + save_flows = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""keyword to save NPF flows""", + description = +"""keyword to indicate that budget flow terms will be written to the file +specified with ``BUDGET SAVE FILE'' in Output Control.""", + ) + + print_flows = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""keyword to print NPF flows to listing file""", + 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.""", + ) + + alternative_cell_averaging = MFString( + type = "string", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""conductance weighting option""", + 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.""", + ) + + thickstrt = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""keyword to activate THICKSTRT option""", + 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.""", + ) + + cvoptions = MFRecord( + type = "record", + params = { + "variablecv": MFKeyword(), + "dewatered": MFKeyword(), + }, + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""vertical conductance options""", + description = +"""none""", + ) + + variablecv = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = False, + longname = +"""keyword to activate VARIABLECV option""", + 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.""", + ) + + dewatered = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""keyword to activate DEWATERED option""", + 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.""", + ) + + perched = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""keyword to activate PERCHED option""", + 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.""", + ) + + rewet_record = MFRecord( + type = "record", + params = { + "rewet": MFKeyword(), + "wetfct": MFDouble(), + "iwetit": MFInteger(), + "ihdwet": MFInteger(), + }, + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""""", + description = +"""""", + ) + + rewet = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = False, + longname = +"""keyword to activate rewetting""", + description = +"""activates model rewetting. Rewetting is off by default.""", + ) + + wetfct = MFDouble( + type = "double", + block = "options", + shape = "", + reader = "urword", + optional = False, + longname = +"""wetting factor to use for rewetting""", + 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.""", + ) + + iwetit = MFInteger( + type = "integer", + block = "options", + shape = "", + reader = "urword", + optional = False, + longname = +"""interval to use for rewetting""", + 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.""", + ) + + ihdwet = MFInteger( + type = "integer", + block = "options", + shape = "", + reader = "urword", + optional = False, + longname = +"""flag to determine wetting equation""", + 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).""", + ) + + xt3doptions = MFRecord( + type = "record", + params = { + "xt3d": MFKeyword(), + "rhs": MFKeyword(), + }, + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""keyword to activate XT3D""", + description = +"""none""", + ) + + xt3d = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = False, + longname = +"""keyword to activate XT3D""", + 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.""", + ) + + rhs = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""keyword to XT3D on right hand side""", + 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.""", + ) + + save_specific_discharge = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""keyword to save specific discharge""", + 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.""", + ) + + save_saturation = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""keyword to save saturation""", + 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.""", + ) + + k22overk = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""keyword to indicate that specified K22 is a ratio""", + 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.""", + ) + + k33overk = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""keyword to indicate that specified K33 is a ratio""", + 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.""", + ) + + tvk_filerecord = MFRecord( + type = "record", + params = { + "tvk6": MFKeyword(), + "filein": MFKeyword(), + "tvk6_filename": MFString(), + }, + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""""", + description = +"""""", + ) + + tvk6 = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = False, + longname = +"""tvk keyword""", + description = +"""keyword to specify that record corresponds to a time-varying hydraulic +conductivity (TVK) file. The behavior of TVK and a description of the +input file is provided separately.""", + ) + + filein = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = False, + longname = +"""file keyword""", + description = +"""keyword to specify that an input filename is expected next.""", + ) + + tvk6_filename = MFString( + type = "string", + block = "options", + shape = "", + reader = "urword", + optional = False, + longname = +"""file name of TVK information""", + description = +"""defines a time-varying hydraulic conductivity (TVK) input file. +Records in the TVK file can be used to change hydraulic conductivity +properties at specified times or stress periods.""", + ) + + export_array_ascii = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""export array variables to layered ascii files.""", + description = +"""keyword that specifies input griddata arrays should be written to +layered ascii output files.""", + ) + + export_array_netcdf = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""export array variables to netcdf output files.""", + description = +"""keyword that specifies input griddata arrays should be written to the +model output netcdf file.""", + ) + + dev_no_newton = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""turn off Newton for unconfined cells""", + description = +"""turn off Newton for unconfined cells""", + ) + + dev_omega = MFDouble( + type = "double", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""set saturation omega value""", + description = +"""set saturation omega value""", + ) + + icelltype = MFArray( + type = "integer", + block = "griddata", + shape = "(nodes)", + reader = "readarray", + optional = False, + longname = +"""confined or convertible indicator""", + 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.""", + ) + + k = MFArray( + type = "double", + block = "griddata", + shape = "(nodes)", + reader = "readarray", + optional = False, + longname = +"""hydraulic conductivity (L/T)""", + 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.""", + ) + + k22 = MFArray( + type = "double", + block = "griddata", + shape = "(nodes)", + reader = "readarray", + optional = True, + longname = +"""hydraulic conductivity of second ellipsoid axis""", + 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.""", + ) + + k33 = MFArray( + type = "double", + block = "griddata", + shape = "(nodes)", + reader = "readarray", + optional = True, + longname = +"""hydraulic conductivity of third ellipsoid axis (L/T)""", + 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.""", + ) + + angle1 = MFArray( + type = "double", + block = "griddata", + shape = "(nodes)", + reader = "readarray", + optional = True, + longname = +"""first anisotropy rotation angle (degrees)""", + 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.""", + ) + + angle2 = MFArray( + type = "double", + block = "griddata", + shape = "(nodes)", + reader = "readarray", + optional = True, + longname = +"""second anisotropy rotation angle (degrees)""", + 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.""", + ) + + angle3 = MFArray( + type = "double", + block = "griddata", + shape = "(nodes)", + reader = "readarray", + optional = True, + longname = +"""third anisotropy rotation angle (degrees)""", + 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.""", + ) + + wetdry = MFArray( + type = "double", + block = "griddata", + shape = "(nodes)", + reader = "readarray", + optional = True, + longname = +"""wetdry threshold and factor""", + 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.""", + ) \ No newline at end of file diff --git a/flopy4/ispec/gwt_dis.py b/flopy4/ispec/gwt_dis.py index b924243a..80221fdf 100644 --- a/flopy4/ispec/gwt_dis.py +++ b/flopy4/ispec/gwt_dis.py @@ -199,7 +199,7 @@ class GwtDis(MFPackage): ) delr = MFArray( - type = "array", + type = "double", block = "griddata", shape = "(ncol)", reader = "readarray", @@ -211,7 +211,7 @@ class GwtDis(MFPackage): ) delc = MFArray( - type = "array", + type = "double", block = "griddata", shape = "(nrow)", reader = "readarray", @@ -223,7 +223,7 @@ class GwtDis(MFPackage): ) top = MFArray( - type = "array", + type = "double", block = "griddata", shape = "(ncol, nrow)", reader = "readarray", @@ -235,7 +235,7 @@ class GwtDis(MFPackage): ) botm = MFArray( - type = "array", + type = "double", block = "griddata", shape = "(ncol, nrow, nlay)", reader = "readarray", @@ -247,7 +247,7 @@ class GwtDis(MFPackage): ) idomain = MFArray( - type = "array", + type = "integer", block = "griddata", shape = "(ncol, nrow, nlay)", reader = "readarray", diff --git a/flopy4/ispec/prt_dis.py b/flopy4/ispec/prt_dis.py index c80c3964..448a4e12 100644 --- a/flopy4/ispec/prt_dis.py +++ b/flopy4/ispec/prt_dis.py @@ -199,7 +199,7 @@ class PrtDis(MFPackage): ) delr = MFArray( - type = "array", + type = "double", block = "griddata", shape = "(ncol)", reader = "readarray", @@ -211,7 +211,7 @@ class PrtDis(MFPackage): ) delc = MFArray( - type = "array", + type = "double", block = "griddata", shape = "(nrow)", reader = "readarray", @@ -223,7 +223,7 @@ class PrtDis(MFPackage): ) top = MFArray( - type = "array", + type = "double", block = "griddata", shape = "(ncol, nrow)", reader = "readarray", @@ -235,7 +235,7 @@ class PrtDis(MFPackage): ) botm = MFArray( - type = "array", + type = "double", block = "griddata", shape = "(ncol, nrow, nlay)", reader = "readarray", @@ -247,7 +247,7 @@ class PrtDis(MFPackage): ) idomain = MFArray( - type = "array", + type = "integer", block = "griddata", shape = "(ncol, nrow, nlay)", reader = "readarray", diff --git a/flopy4/ispec/prt_prp.py b/flopy4/ispec/prt_prp.py index 6e38656c..00f24863 100644 --- a/flopy4/ispec/prt_prp.py +++ b/flopy4/ispec/prt_prp.py @@ -283,111 +283,78 @@ class PrtPrp(MFPackage): cell is inactive at release time.""", ) - release_timesrecord = MFRecord( - type = "record", - params = { - "release_times": MFKeyword(), - "times": MFArray(shape="(unknown)"), - }, - block = "options", - shape = "", - reader = "urword", - optional = True, - longname = -"""""", - description = -"""""", - ) - - release_times = MFKeyword( + dev_forceternary = MFKeyword( type = "keyword", block = "options", shape = "", reader = "urword", optional = False, longname = -"""""", - description = -"""keyword indicating release times will follow""", - ) - - times = MFArray( - type = "array", - block = "options", - shape = "(unknown)", - reader = "urword", - optional = False, - longname = -"""release times""", +"""force ternary tracking method""", description = -"""times to release, relative to the beginning of the simulation. -RELEASE_TIMES and RELEASE_TIMESFILE are mutually exclusive.""", +"""force use of the ternary tracking method regardless of cell type in +DISV grids.""", ) - release_timesfilerecord = MFRecord( - type = "record", - params = { - "release_timesfile": MFKeyword(), - "timesfile": MFString(), - }, + release_time_tolerance = MFDouble( + type = "double", block = "options", shape = "", reader = "urword", optional = True, longname = -"""""", +"""release time coincidence tolerance""", description = -"""""", +"""real number indicating the tolerance within which to consider adjacent +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.""", ) - release_timesfile = MFKeyword( - type = "keyword", - block = "options", - shape = "", - reader = "urword", - optional = False, - longname = -"""""", - description = -"""keyword indicating release times file name will follow""", - ) - - timesfile = MFString( - type = "string", + release_time_frequency = MFDouble( + type = "double", block = "options", shape = "", reader = "urword", - optional = False, + optional = True, longname = -"""file keyword""", +"""release time frequency""", description = -"""name of the release times file. RELEASE_TIMES and RELEASE_TIMESFILE -are mutually exclusive.""", +"""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.""", ) - dev_forceternary = MFKeyword( - type = "keyword", - block = "options", + nreleasepts = MFInteger( + type = "integer", + block = "dimensions", shape = "", reader = "urword", optional = False, longname = -"""force ternary tracking method""", +"""number of particle release points""", description = -"""force use of the ternary tracking method regardless of cell type in -DISV grids.""", +"""is the number of particle release points.""", ) - nreleasepts = MFInteger( + nreleasetimes = MFInteger( type = "integer", block = "dimensions", shape = "", reader = "urword", optional = False, longname = -"""number of particle release points""", +"""number of particle release times""", description = -"""is the number of particle release points.""", +"""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.""", ) irptno = MFInteger( @@ -407,7 +374,7 @@ class PrtPrp(MFPackage): ) cellid = MFArray( - type = "array", + type = "integer", block = "packagedata", shape = "(ncelldim)", reader = "urword", @@ -496,6 +463,34 @@ class PrtPrp(MFPackage): """""", ) + time = MFDouble( + type = "double", + block = "releasetimes", + shape = "", + reader = "urword", + optional = False, + longname = +"""release time""", + description = +"""real value that defines the release time with respect to the +simulation start time.""", + ) + + releasetimes = MFList( + type = "recarray", + params = { + "time": time, + }, + block = "releasetimes", + shape = "(nreleasetimes)", + reader = "urword", + optional = False, + longname = +"""""", + description = +"""""", + ) + all = MFKeyword( type = "keyword", block = "period", @@ -505,8 +500,8 @@ class PrtPrp(MFPackage): longname = """""", description = -"""keyword to indicate release of particles at the start of all time -steps in the period.""", +"""keyword to indicate release at the start of all time steps in the +period.""", ) first = MFKeyword( @@ -518,10 +513,23 @@ class PrtPrp(MFPackage): longname = """""", description = -"""keyword to indicate release of particles at the start of the first -time step in the period. This keyword may be used in conjunction with -other keywords to release particles at the start of multiple time -steps.""", +"""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.""", + ) + + last = MFKeyword( + type = "keyword", + block = "period", + shape = "", + reader = "urword", + optional = False, + longname = +"""""", + description = +"""keyword to indicate release at the start of the last time step in the +period. This keyword may be used in conjunction with other +RELEASESETTING options.""", ) frequency = MFInteger( @@ -533,13 +541,12 @@ class PrtPrp(MFPackage): longname = """""", description = -"""release particles at the specified time step frequency. This keyword -may be used in conjunction with other keywords to release particles at -the start of multiple time steps.""", +"""release at the specified time step frequency. This keyword may be used +in conjunction with other RELEASESETTING options.""", ) steps = MFArray( - type = "array", + type = "integer", block = "period", shape = "($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. +default_value 0 + +block griddata +name k +type double precision +shape (nodes) +valid +reader readarray +layered true +optional +longname hydraulic conductivity (L/T) +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. +default_value 1.0 + +block griddata +name k22 +type double precision +shape (nodes) +valid +reader readarray +layered true +optional true +longname hydraulic conductivity of second ellipsoid axis +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. + +block griddata +name k33 +type double precision +shape (nodes) +valid +reader readarray +layered true +optional true +longname hydraulic conductivity of third ellipsoid axis (L/T) +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. + +block griddata +name angle1 +type double precision +shape (nodes) +valid +reader readarray +layered true +optional true +longname first anisotropy rotation angle (degrees) +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. + +block griddata +name angle2 +type double precision +shape (nodes) +valid +reader readarray +layered true +optional true +longname second anisotropy rotation angle (degrees) +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. + +block griddata +name angle3 +type double precision +shape (nodes) +valid +reader readarray +layered true +optional true +longname third anisotropy rotation angle (degrees) +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. + +block griddata +name wetdry +type double precision +shape (nodes) +valid +reader readarray +layered true +optional true +longname wetdry threshold and factor +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. diff --git a/spec/dfn/prt-prp.dfn b/spec/dfn/prt-prp.dfn index 6affe2ca..bb5edd48 100644 --- a/spec/dfn/prt-prp.dfn +++ b/spec/dfn/prt-prp.dfn @@ -168,77 +168,29 @@ longname drape 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. block options -name release_timesrecord -type record release_times times -shape -reader urword -tagged true -optional true -longname -description - -block options -name release_times +name dev_forceternary type keyword reader urword -in_record true -tagged true -shape -longname -description keyword indicating release times will follow +optional false +longname force ternary tracking method +description force use of the ternary tracking method regardless of cell type in DISV grids. +mf6internal ifrctrn block options -name times +name release_time_tolerance type double precision -shape (unknown) -reader urword -in_record true -tagged false -repeating true -longname release times -description times to release, relative to the beginning of the simulation. RELEASE\_TIMES and RELEASE\_TIMESFILE are mutually exclusive. - -block options -name release_timesfilerecord -type record release_timesfile timesfile -shape reader urword -tagged true optional true -longname -description - -block options -name release_timesfile -type keyword -reader urword -in_record true -tagged true -shape -longname -description keyword indicating release times file name will follow - -block options -name timesfile -type string -preserve_case true -shape -in_record true -reader urword -tagged false -optional false -longname file keyword -description name of the release times file. RELEASE\_TIMES and RELEASE\_TIMESFILE are mutually exclusive. +longname release time coincidence tolerance +description real number indicating the tolerance within which to consider adjacent 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. block options -name dev_forceternary -type keyword +name release_time_frequency +type double precision reader urword -optional false -longname force ternary tracking method -description force use of the ternary tracking method regardless of cell type in DISV grids. -mf6internal ifrctrn - +optional true +longname release time frequency +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. # --------------------- prt prp dimensions --------------------- @@ -250,6 +202,14 @@ optional false longname number of particle release points description is the number of particle release points. +block dimensions +name nreleasetimes +type integer +reader urword +optional false +longname number of particle release times +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. + # --------------------- prt prp packagedata --------------------- block packagedata @@ -322,6 +282,26 @@ optional true longname release point name 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. +# --------------------- prt prp releasetimes --------------- + +block releasetimes +name releasetimes +type recarray time +shape (nreleasetimes) +reader urword +longname +description + +block releasetimes +name time +type double precision +shape +tagged false +in_record true +reader urword +longname release time +description real value that defines the release time with respect to the simulation start time. + # --------------------- prt prp period --------------------- block period @@ -353,7 +333,7 @@ tagged false in_record true reader urword longname -description specifies when to release particles within the stress period. Overrides package-level RELEASETIME option, which applies to all stress periods. By default, RELEASESETTING configures particles for release at the beginning of the specified time steps. For time-offset releases, provide a FRACTION value. +description specifies time steps at which to release a particle. A particle is released at the beginning of each specified time step. For fine control over release timing, specify times explicitly using the RELEASETIMES block. If the beginning of a specified time step coincides with a release time specified in the RELEASETIMES block or configured via RELEASE\_TIME\_FREQUENCY, only one particle is released at that time. Coincidence is evaluated up to the tolerance specified in RELEASE\_TIME\_TOLERANCE, or $\epsilon \times 10^11$ by default, where $\epsilon$ is machine precision. If no release times are configured via this setting, the RELEASETIMES block, or the RELEASE\_TIME\_FREQUENCY option, a single release time is configured at the beginning of the first time step of the simulation's first stress period. block period name all @@ -362,7 +342,7 @@ shape in_record true reader urword longname -description keyword to indicate release of particles at the start of all time steps in the period. +description keyword to indicate release at the start of all time steps in the period. block period name first @@ -371,7 +351,16 @@ shape in_record true reader urword longname -description keyword to indicate release of particles at the start of the first time step in the period. This keyword may be used in conjunction with other keywords to release particles at the start of multiple time steps. +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. + +block period +name last +type keyword +shape +in_record true +reader urword +longname +description keyword to indicate release at the start of the last time step in the period. This keyword may be used in conjunction with other RELEASESETTING options. block period name frequency @@ -381,7 +370,7 @@ tagged true in_record true reader urword longname -description release particles at the specified time step frequency. This keyword may be used in conjunction with other keywords to release particles at the start of multiple time steps. +description release at the specified time step frequency. This keyword may be used in conjunction with other RELEASESETTING options. block period name steps @@ -391,7 +380,7 @@ tagged true in_record true reader urword longname -description release particles at the start of each step specified in STEPS. This keyword may be used in conjunction with other keywords to release particles at the start of multiple time steps. +description release at the start of each step specified in STEPS. This option may be used in conjunction with other RELEASESETTING options. block period name fraction @@ -401,5 +390,6 @@ tagged true in_record true reader urword optional true +removed 6.5.1 longname -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. \ No newline at end of file +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. diff --git a/spec/mf6pkg.template b/spec/mf6pkg.template index 2df2378e..69eac350 100644 --- a/spec/mf6pkg.template +++ b/spec/mf6pkg.template @@ -29,7 +29,7 @@ class {{c}}{{s}}(MFPackage): {%- else %} {{pname}} = MFArray( - type = "array", + type = "double", {%- endif %} {%- elif 'integer' == params[pname].type %} {%- if '' == params[pname].shape %} @@ -39,7 +39,7 @@ class {{c}}{{s}}(MFPackage): {%- else %} {{pname}} = MFArray( - type = "array", + type = "integer", {%- endif %} {%- else %} {%- set tokens = params[pname].type.split(' ') %} diff --git a/spec/toml/gwf-chd.toml b/spec/toml/gwf-chd.toml new file mode 100644 index 00000000..d0a3d318 --- /dev/null +++ b/spec/toml/gwf-chd.toml @@ -0,0 +1,347 @@ +component = "GWF" +subcomponent = "CHD" +blocknames = [ "options", "dimensions", "period",] +multipkg = false +stress = true +advanced = false +multi = true + +[block.options.auxiliary] +type = "string" +block_variable = false +valid = [] +shape = "(naux)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "keyword to specify aux variables" +description = "REPLACE auxnames {'{#1}': 'Groundwater Flow'}" +deprecated = "" + +[block.options.auxmultname] +type = "string" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "name of auxiliary variable for multiplier" +description = "REPLACE auxmultname {'{#1}': 'CHD head value'}" +deprecated = "" + +[block.options.boundnames] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "" +description = "REPLACE boundnames {'{#1}': 'constant-head'}" +deprecated = "" + +[block.options.print_input] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "print input to listing file" +description = "REPLACE print_input {'{#1}': 'constant-head'}" +deprecated = "" + +[block.options.print_flows] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "print CHD flows to listing file" +description = "REPLACE print_flows {'{#1}': 'constant-head'}" +deprecated = "" + +[block.options.save_flows] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "save CHD flows to budget file" +description = "REPLACE save_flows {'{#1}': 'constant-head'}" +deprecated = "" + +[block.options.ts_filerecord] +type = "record ts6 filein ts6_filename" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "" +description = "" +deprecated = "" + +[block.options.ts6] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "head keyword" +description = "keyword to specify that record corresponds to a time-series file." +deprecated = "" + +[block.options.filein] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "file keyword" +description = "keyword to specify that an input filename is expected next." +deprecated = "" + +[block.options.ts6_filename] +type = "string" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = true +numeric_index = false +longname = "file name of time series information" +description = "REPLACE timeseriesfile {}" +deprecated = "" + +[block.options.obs_filerecord] +type = "record obs6 filein obs6_filename" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "" +description = "" +deprecated = "" + +[block.options.obs6] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "obs keyword" +description = "keyword to specify that record corresponds to an observations file." +deprecated = "" + +[block.options.obs6_filename] +type = "string" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = true +numeric_index = false +longname = "obs6 input filename" +description = "REPLACE obs6_filename {'{#1}': 'constant-head'}" +deprecated = "" + +[block.options.dev_no_newton] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "turn off Newton for unconfined cells" +description = "turn off Newton for unconfined cells" +deprecated = "" + +[block.dimensions.maxbound] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "maximum number of constant heads" +description = "REPLACE maxbound {'{#1}': 'constant-head'}" +deprecated = "" + +[block.period.cellid] +type = "integer" +block_variable = false +valid = [] +shape = "(ncelldim)" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "cell identifier" +description = "REPLACE cellid {}" +deprecated = "" + +[block.period.head] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = true +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "head value assigned to constant head" +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." +deprecated = "" + +[block.period.aux] +type = "double" +block_variable = false +valid = [] +shape = "(naux)" +tagged = false +in_record = true +layered = false +time_series = true +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "auxiliary variables" +description = "REPLACE aux {'{#1}': 'constant head'}" +deprecated = "" + +[block.period.boundname] +type = "string" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "constant head boundary name" +description = "REPLACE boundname {'{#1}': 'constant head boundary'}" +deprecated = "" + +[block.period.stress_period_data] +type = "recarray cellid head aux boundname" +block_variable = false +valid = [] +shape = "(maxbound)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "" +description = "" +deprecated = "" diff --git a/spec/toml/gwf-npf.toml b/spec/toml/gwf-npf.toml new file mode 100644 index 00000000..8e97362e --- /dev/null +++ b/spec/toml/gwf-npf.toml @@ -0,0 +1,620 @@ +component = "GWF" +subcomponent = "NPF" +blocknames = [ "options", "griddata",] +multipkg = false +stress = false +advanced = false + +[block.options.save_flows] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "keyword to save NPF flows" +description = "keyword to indicate that budget flow terms will be written to the file specified with ``BUDGET SAVE FILE'' in Output Control." +deprecated = "" + +[block.options.print_flows] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "keyword to print NPF flows to listing file" +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." +deprecated = "" + +[block.options.alternative_cell_averaging] +type = "string" +block_variable = false +valid = [ "logarithmic", "amt-lmk", "amt-hmk",] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "conductance weighting option" +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." +deprecated = "" + +[block.options.thickstrt] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "keyword to activate THICKSTRT option" +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." +deprecated = "" + +[block.options.cvoptions] +type = "record variablecv dewatered" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "vertical conductance options" +description = "none" +deprecated = "" + +[block.options.variablecv] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "keyword to activate VARIABLECV option" +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." +deprecated = "" + +[block.options.dewatered] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = true +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "keyword to activate DEWATERED option" +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." +deprecated = "" + +[block.options.perched] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "keyword to activate PERCHED option" +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." +deprecated = "" + +[block.options.rewet_record] +type = "record rewet wetfct iwetit ihdwet" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "" +description = "" +deprecated = "" + +[block.options.rewet] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "keyword to activate rewetting" +description = "activates model rewetting. Rewetting is off by default." +deprecated = "" + +[block.options.wetfct] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "wetting factor to use for rewetting" +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." +deprecated = "" + +[block.options.iwetit] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "interval to use for rewetting" +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." +deprecated = "" + +[block.options.ihdwet] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "flag to determine wetting equation" +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)." +deprecated = "" + +[block.options.xt3doptions] +type = "record xt3d rhs" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "keyword to activate XT3D" +description = "none" +deprecated = "" + +[block.options.xt3d] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "keyword to activate XT3D" +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." +deprecated = "" + +[block.options.rhs] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = true +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "keyword to XT3D on right hand side" +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." +deprecated = "" + +[block.options.save_specific_discharge] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "keyword to save specific discharge" +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." +deprecated = "" + +[block.options.save_saturation] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "keyword to save saturation" +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." +deprecated = "" + +[block.options.k22overk] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "keyword to indicate that specified K22 is a ratio" +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." +deprecated = "" + +[block.options.k33overk] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "keyword to indicate that specified K33 is a ratio" +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." +deprecated = "" + +[block.options.tvk_filerecord] +type = "record tvk6 filein tvk6_filename" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "" +description = "" +deprecated = "" + +[block.options.tvk6] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "tvk keyword" +description = "keyword to specify that record corresponds to a time-varying hydraulic conductivity (TVK) file. The behavior of TVK and a description of the input file is provided separately." +deprecated = "" + +[block.options.filein] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "file keyword" +description = "keyword to specify that an input filename is expected next." +deprecated = "" + +[block.options.tvk6_filename] +type = "string" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = true +numeric_index = false +longname = "file name of TVK information" +description = "defines a time-varying hydraulic conductivity (TVK) input file. Records in the TVK file can be used to change hydraulic conductivity properties at specified times or stress periods." +deprecated = "" + +[block.options.export_array_ascii] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "export array variables to layered ascii files." +description = "keyword that specifies input griddata arrays should be written to layered ascii output files." +deprecated = "" + +[block.options.export_array_netcdf] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "export array variables to netcdf output files." +description = "keyword that specifies input griddata arrays should be written to the model output netcdf file." +deprecated = "" + +[block.options.dev_no_newton] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "turn off Newton for unconfined cells" +description = "turn off Newton for unconfined cells" +deprecated = "" + +[block.options.dev_omega] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "set saturation omega value" +description = "set saturation omega value" +deprecated = "" + +[block.griddata.icelltype] +type = "integer" +block_variable = false +valid = [] +shape = "(nodes)" +tagged = true +in_record = false +layered = true +time_series = false +reader = "readarray" +optional = false +preserve_case = false +default_value = "0" +numeric_index = false +longname = "confined or convertible indicator" +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." +deprecated = "" + +[block.griddata.k] +type = "double" +block_variable = false +valid = [] +shape = "(nodes)" +tagged = true +in_record = false +layered = true +time_series = false +reader = "readarray" +optional = false +preserve_case = false +default_value = "1.0" +numeric_index = false +longname = "hydraulic conductivity (L/T)" +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." +deprecated = "" + +[block.griddata.k22] +type = "double" +block_variable = false +valid = [] +shape = "(nodes)" +tagged = true +in_record = false +layered = true +time_series = false +reader = "readarray" +optional = true +preserve_case = false +numeric_index = false +longname = "hydraulic conductivity of second ellipsoid axis" +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." +deprecated = "" + +[block.griddata.k33] +type = "double" +block_variable = false +valid = [] +shape = "(nodes)" +tagged = true +in_record = false +layered = true +time_series = false +reader = "readarray" +optional = true +preserve_case = false +numeric_index = false +longname = "hydraulic conductivity of third ellipsoid axis (L/T)" +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." +deprecated = "" + +[block.griddata.angle1] +type = "double" +block_variable = false +valid = [] +shape = "(nodes)" +tagged = true +in_record = false +layered = true +time_series = false +reader = "readarray" +optional = true +preserve_case = false +numeric_index = false +longname = "first anisotropy rotation angle (degrees)" +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." +deprecated = "" + +[block.griddata.angle2] +type = "double" +block_variable = false +valid = [] +shape = "(nodes)" +tagged = true +in_record = false +layered = true +time_series = false +reader = "readarray" +optional = true +preserve_case = false +numeric_index = false +longname = "second anisotropy rotation angle (degrees)" +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." +deprecated = "" + +[block.griddata.angle3] +type = "double" +block_variable = false +valid = [] +shape = "(nodes)" +tagged = true +in_record = false +layered = true +time_series = false +reader = "readarray" +optional = true +preserve_case = false +numeric_index = false +longname = "third anisotropy rotation angle (degrees)" +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." +deprecated = "" + +[block.griddata.wetdry] +type = "double" +block_variable = false +valid = [] +shape = "(nodes)" +tagged = true +in_record = false +layered = true +time_series = false +reader = "readarray" +optional = true +preserve_case = false +numeric_index = false +longname = "wetdry threshold and factor" +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." +deprecated = "" diff --git a/spec/toml/prt-prp.toml b/spec/toml/prt-prp.toml index 504b69b5..f48011f3 100644 --- a/spec/toml/prt-prp.toml +++ b/spec/toml/prt-prp.toml @@ -1,6 +1,6 @@ component = "PRT" subcomponent = "PRP" -blocknames = [ "options", "dimensions", "packagedata", "period",] +blocknames = [ "options", "dimensions", "packagedata", "releasetimes", "period",] multipkg = false stress = false advanced = false @@ -312,61 +312,27 @@ longname = "drape" 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." deprecated = "" -[block.options.release_timesrecord] -type = "record release_times times" -block_variable = false -valid = [] -shape = "" -tagged = true -in_record = false -layered = false -time_series = false -reader = "urword" -optional = true -preserve_case = false -numeric_index = false -longname = "" -description = "" -deprecated = "" - -[block.options.release_times] +[block.options.dev_forceternary] type = "keyword" block_variable = false valid = [] shape = "" tagged = true -in_record = true +in_record = false layered = false time_series = false reader = "urword" optional = false preserve_case = false numeric_index = false -longname = "" -description = "keyword indicating release times will follow" +longname = "force ternary tracking method" +description = "force use of the ternary tracking method regardless of cell type in DISV grids." deprecated = "" -[block.options.times] +[block.options.release_time_tolerance] type = "double" block_variable = false valid = [] -shape = "(unknown)" -tagged = false -in_record = true -layered = false -time_series = false -reader = "urword" -optional = false -preserve_case = false -numeric_index = false -longname = "release times" -description = "times to release, relative to the beginning of the simulation. RELEASE_TIMES and RELEASE_TIMESFILE are mutually exclusive." -deprecated = "" - -[block.options.release_timesfilerecord] -type = "record release_timesfile timesfile" -block_variable = false -valid = [] shape = "" tagged = true in_record = false @@ -376,46 +342,29 @@ reader = "urword" optional = true preserve_case = false numeric_index = false -longname = "" -description = "" +longname = "release time coincidence tolerance" +description = "real number indicating the tolerance within which to consider adjacent 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." deprecated = "" -[block.options.release_timesfile] -type = "keyword" +[block.options.release_time_frequency] +type = "double" block_variable = false valid = [] shape = "" tagged = true -in_record = true +in_record = false layered = false time_series = false reader = "urword" -optional = false +optional = true preserve_case = false numeric_index = false -longname = "" -description = "keyword indicating release times file name will follow" +longname = "release time frequency" +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." deprecated = "" -[block.options.timesfile] -type = "string" -block_variable = false -valid = [] -shape = "" -tagged = false -in_record = true -layered = false -time_series = false -reader = "urword" -optional = false -preserve_case = true -numeric_index = false -longname = "file keyword" -description = "name of the release times file. RELEASE_TIMES and RELEASE_TIMESFILE are mutually exclusive." -deprecated = "" - -[block.options.dev_forceternary] -type = "keyword" +[block.dimensions.nreleasepts] +type = "integer" block_variable = false valid = [] shape = "" @@ -427,11 +376,11 @@ reader = "urword" optional = false preserve_case = false numeric_index = false -longname = "force ternary tracking method" -description = "force use of the ternary tracking method regardless of cell type in DISV grids." +longname = "number of particle release points" +description = "is the number of particle release points." deprecated = "" -[block.dimensions.nreleasepts] +[block.dimensions.nreleasetimes] type = "integer" block_variable = false valid = [] @@ -444,8 +393,8 @@ reader = "urword" optional = false preserve_case = false numeric_index = false -longname = "number of particle release points" -description = "is the number of particle release points." +longname = "number of particle release times" +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." deprecated = "" [block.packagedata.irptno] @@ -567,6 +516,40 @@ longname = "" description = "" deprecated = "" +[block.releasetimes.time] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "release time" +description = "real value that defines the release time with respect to the simulation start time." +deprecated = "" + +[block.releasetimes.releasetimes] +type = "recarray time" +block_variable = false +valid = [] +shape = "(nreleasetimes)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "" +description = "" +deprecated = "" + [block.period.releasesetting] type = "keystring all first frequency steps fraction" block_variable = false @@ -581,7 +564,7 @@ optional = false preserve_case = false numeric_index = false longname = "" -description = "specifies when to release particles within the stress period. Overrides package-level RELEASETIME option, which applies to all stress periods. By default, RELEASESETTING configures particles for release at the beginning of the specified time steps. For time-offset releases, provide a FRACTION value." +description = "specifies time steps at which to release a particle. A particle is released at the beginning of each specified time step. For fine control over release timing, specify times explicitly using the RELEASETIMES block. If the beginning of a specified time step coincides with a release time specified in the RELEASETIMES block or configured via RELEASE_TIME_FREQUENCY, only one particle is released at that time. Coincidence is evaluated up to the tolerance specified in RELEASE_TIME_TOLERANCE, or $epsilon times 10^11$ by default, where $epsilon$ is machine precision. If no release times are configured via this setting, the RELEASETIMES block, or the RELEASE_TIME_FREQUENCY option, a single release time is configured at the beginning of the first time step of the simulation's first stress period." deprecated = "" [block.period.all] @@ -598,7 +581,7 @@ optional = false preserve_case = false numeric_index = false longname = "" -description = "keyword to indicate release of particles at the start of all time steps in the period." +description = "keyword to indicate release at the start of all time steps in the period." deprecated = "" [block.period.first] @@ -615,7 +598,24 @@ optional = false preserve_case = false numeric_index = false longname = "" -description = "keyword to indicate release of particles at the start of the first time step in the period. This keyword may be used in conjunction with other keywords to release particles at the start of multiple time steps." +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." +deprecated = "" + +[block.period.last] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "" +description = "keyword to indicate release at the start of the last time step in the period. This keyword may be used in conjunction with other RELEASESETTING options." deprecated = "" [block.period.frequency] @@ -632,7 +632,7 @@ optional = false preserve_case = false numeric_index = false longname = "" -description = "release particles at the specified time step frequency. This keyword may be used in conjunction with other keywords to release particles at the start of multiple time steps." +description = "release at the specified time step frequency. This keyword may be used in conjunction with other RELEASESETTING options." deprecated = "" [block.period.steps] @@ -649,7 +649,7 @@ optional = false preserve_case = false numeric_index = false longname = "" -description = "release particles at the start of each step specified in STEPS. This keyword may be used in conjunction with other keywords to release particles at the start of multiple time steps." +description = "release at the start of each step specified in STEPS. This option may be used in conjunction with other RELEASESETTING options." deprecated = "" [block.period.fraction] @@ -666,7 +666,7 @@ optional = true preserve_case = false numeric_index = false longname = "" -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." +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." deprecated = "" [block.period.perioddata] diff --git a/test/test_array.py b/test/test_array.py index cb4ac14d..a366964c 100644 --- a/test/test_array.py +++ b/test/test_array.py @@ -13,7 +13,7 @@ def test_array_load_1d(tmp_path): with open(fpth, "w") as f: f.write(f"{name.upper()}\n{how}\n{value}\n") with open(fpth, "r") as f: - array = MFArray.load(f, cwd=tmp_path, shape=(3)) + array = MFArray.load(f, cwd=tmp_path, shape=(3), type="double") assert array.name == name assert np.allclose(array.value, np.array(v)) @@ -24,6 +24,7 @@ def test_array_load_3d(tmp_path): how = "INTERNAL" v = [[[1.0, 2.0, 3.0]], [[4.0, 5.0, 6.0]], [[7.0, 8.0, 9.0]]] value = "" + for a in v: for b in a: value += " ".join(str(x) for x in b) @@ -32,7 +33,7 @@ def test_array_load_3d(tmp_path): with open(fpth, "w") as f: f.write(f"{name.upper()}\n{how}\n{value}\n") with open(fpth, "r") as f: - array = MFArray.load(f, cwd=tmp_path, shape=(3, 1, 3)) + array = MFArray.load(f, cwd=tmp_path, shape=(3, 1, 3), type="double") assert array.name == name assert np.allclose(array.value, np.array(v)) @@ -44,6 +45,7 @@ def test_array_load_3d_external(tmp_path): how = "OPEN/CLOSE" v = [[[1.0, 2.0, 3.0]], [[4.0, 5.0, 6.0]], [[7.0, 8.0, 9.0]]] value = "" + for a in v: for b in a: value += " ".join(str(x) for x in b) @@ -54,7 +56,7 @@ def test_array_load_3d_external(tmp_path): with open(fpth, "w") as f: f.write(f"{name.upper()}\n{how} {extfpth}\n") with open(fpth, "r") as f: - array = MFArray.load(f, cwd=tmp_path, shape=(3, 1, 3)) + array = MFArray.load(f, cwd=tmp_path, shape=(3, 1, 3), type="double") assert array.name == name assert np.allclose(array.value, np.array(v)) @@ -65,6 +67,7 @@ def test_array_load_layered(tmp_path): how = "INTERNAL" v = [[[1.0, 2.0, 3.0]], [[4.0, 5.0, 6.0]], [[7.0, 8.0, 9.0]]] value = "" + for a in v: for b in a: value += " " + f"{how}\n" @@ -74,6 +77,6 @@ def test_array_load_layered(tmp_path): with open(fpth, "w") as f: f.write(f"{name.upper()} LAYERED\n{value}") with open(fpth, "r") as f: - array = MFArray.load(f, cwd=tmp_path, shape=(3, 1, 3)) + array = MFArray.load(f, cwd=tmp_path, shape=(3, 1, 3), type="double") assert array.name == name assert np.allclose(array.value, np.array(v)) diff --git a/test/test_dfn.py b/test/test_dfn.py index bb83e393..03c5feb0 100644 --- a/test/test_dfn.py +++ b/test/test_dfn.py @@ -18,8 +18,14 @@ def test_dfn_load(tmp_path): assert dfn.component == "prt" assert dfn.subcomponent == "prp" assert type(dfn.dfn) is dict - assert len(dfn) == 4 - assert dfn.blocknames == ["options", "dimensions", "packagedata", "period"] + assert len(list(dfn.dfn["block"])) == 5 + assert dfn.blocknames == [ + "options", + "dimensions", + "packagedata", + "releasetimes", + "period", + ] for b in dfn.blocknames: block_d = dfn[b] @@ -44,13 +50,9 @@ def test_dfn_load(tmp_path): "stop_at_weak_sink", "istopzone", "drape", - "release_timesrecord", - "release_times", - "times", - "release_timesfilerecord", - "release_timesfile", - "timesfile", "dev_forceternary", + "release_time_tolerance", + "release_time_frequency", ] assert dfn.param("options", "drape") == { diff --git a/test/test_list.py b/test/test_list.py index 5e17851f..a44f324d 100644 --- a/test/test_list.py +++ b/test/test_list.py @@ -11,8 +11,8 @@ class TestBlock(MFBlock): testblock = MFList( params={ "s": MFString(), - "i": MFInteger(), - "d": MFDouble(), + "i": MFInteger(type="integer"), + "d": MFDouble(type="double"), }, description="recarray", optional=False, @@ -67,12 +67,13 @@ def test_list_load1(tmp_path): assert isinstance(TestBlock.testblock.params["i"], MFInteger) assert isinstance(TestBlock.testblock.params["d"], MFDouble) assert isinstance(in_list.params["testblock"]["s"], list) - assert isinstance(in_list.params["testblock"]["i"], np.ndarray) - assert isinstance(in_list.params["testblock"]["d"], np.ndarray) + assert isinstance(in_list.params["testblock"]["i"], list) + assert isinstance(in_list.params["testblock"]["d"], list) assert isinstance(in_list.params["testblock"]["s"][0], str) - assert isinstance(in_list.params["testblock"]["i"][0], np.int32) - assert isinstance(in_list.params["testblock"]["d"][0], np.float64) + assert isinstance(in_list.params["testblock"]["i"][0], int) + assert isinstance(in_list.params["testblock"]["d"][0], float) assert in_list.params["testblock"]["s"] == ["model", "exch", "sim"] + print(in_list.params["testblock"]["i"]) assert np.allclose(in_list.params["testblock"]["i"], np.array([1, 2, 2])) assert np.allclose( in_list.params["testblock"]["d"], np.array([2.0, 3.0, 3.0]) diff --git a/test/test_package.py b/test/test_package.py index 9e74d4ec..9d186b0c 100644 --- a/test/test_package.py +++ b/test/test_package.py @@ -34,7 +34,7 @@ class TestPackage(MFPackage): optional=False, ) a = MFArray( - block="packagedata", type="array", description="array", shape=(3) + block="packagedata", type="double", description="array", shape=(3) ) @@ -73,6 +73,7 @@ class TestGwfIc(MFPackage): optional=False, # shape="(nodes)", shape=(10), + type="double", ) @@ -112,6 +113,7 @@ class TestGwfDis(MFPackage): optional=False, # shape="(ncol)", shape=(5), + type="double", ) delc = MFArray( block="griddata", @@ -120,6 +122,7 @@ class TestGwfDis(MFPackage): optional=False, # shape="(nrow)", shape=(5), + type="double", ) top = MFArray( block="griddata", @@ -129,6 +132,7 @@ class TestGwfDis(MFPackage): optional=False, # shape="(ncol, nrow)", shape=(5, 5), + type="double", ) botm = MFArray( block="griddata", @@ -137,6 +141,7 @@ class TestGwfDis(MFPackage): optional=False, # shape="(ncol, nrow, nlay)", shape=(3, 5, 5), + type="double", ) idomain = MFArray( block="griddata", @@ -155,6 +160,7 @@ class TestGwfDis(MFPackage): optional=False, # shape="(ncol, nrow, nlay)", shape=(3, 5, 5), + type="integer", ) diff --git a/test/test_sim.py b/test/test_sim.py index e97f6b91..382285c2 100644 --- a/test/test_sim.py +++ b/test/test_sim.py @@ -1,3 +1,6 @@ +import os +import subprocess + import numpy as np from flopy4.simulation import MFSimulation @@ -26,7 +29,7 @@ def test_load_sim(tmp_path): f.write(" CONSTANT -100.00000000\n") f.write(" CONSTANT -150.00000000\n") f.write(" CONSTANT -350.00000000\n") - f.write("END GRIDDATA\nn\\n") + f.write("END GRIDDATA\n") ic_fpth = tmp_path / f"{name}.ic" strt = np.linspace(0.0, 30.0, num=300) @@ -107,7 +110,7 @@ def test_load_sim(tmp_path): f.write(" INNER_MAXIMUM 300\n") f.write(" INNER_DVCLOSE 1.00000000E-09\n") # TODO: fails - # f.write(" inner_rclose 1.00000000E-06\n") + # f.write(" INNER_RCLOSE 1.00000000E-06\n") f.write(" LINEAR_ACCELERATION bicgstab\n") f.write(" RELAXATION_FACTOR 1.00000000\n") f.write(" SCALING_METHOD none\n") @@ -141,15 +144,15 @@ def test_load_sim(tmp_path): assert "exchanges" in s.nam assert "solutiongroup" in s.nam assert "tdis6" in s.nam["timing"] - # assert s.nam["timing"]["tdis6"].value == f"{tmp_path}/sim.tdis" + assert s.nam["timing"]["tdis6"].value == f"{tmp_path}/sim.tdis" assert "mtype" in s.nam["models"].params["models"] assert "mfname" in s.nam["models"].params["models"] assert "mname" in s.nam["models"].params["models"] assert s.nam["models"].params["models"]["mtype"][0] == "GWF6" - # assert ( - # s.nam["models"].params["models"]["mfname"][0] - # == f"{tmp_path}/{name}.nam" - # ) + assert ( + s.nam["models"].params["models"]["mfname"][0] + == f"{tmp_path}/{name}.nam" + ) assert s.nam["models"].params["models"]["mname"][0] == f"{name}" assert "slntype" in s.nam["solutiongroup"].params["solutiongroup"] assert "slnfname" in s.nam["solutiongroup"].params["solutiongroup"] @@ -157,10 +160,10 @@ def test_load_sim(tmp_path): assert ( s.nam["solutiongroup"].params["solutiongroup"]["slntype"][0] == "ims6" ) - # assert ( - # s.nam["solutiongroup"].params["solutiongroup"]["slnfname"][0] - # == f"{tmp_path}/{name}.ims" - # ) + assert ( + s.nam["solutiongroup"].params["solutiongroup"]["slnfname"][0] + == f"{tmp_path}/{name}.ims" + ) assert ( s.nam["solutiongroup"].params["solutiongroup"]["slnmnames"][0] == f"{name}" @@ -338,8 +341,146 @@ def test_load_sim(tmp_path): f"sim/{name}/dis/dimensions/ncol" ) - import os + write_dir = tmp_path / "write" + os.makedirs(write_dir) + s.write(write_dir) + + +def test_load_chd01(tmp_path): + name = "gwf_chd01" + + nlay = 1 + nrow = 1 + ncol = 100 + dis_fpth = tmp_path / f"{name}.dis" + with open(dis_fpth, "w") as f: + f.write("BEGIN OPTIONS\n") + f.write("END OPTIONS\n\n") + f.write("BEGIN DIMENSIONS\n") + f.write(f" NLAY {nlay}\n") + f.write(f" NROW {nrow}\n") + f.write(f" NCOL {ncol}\n") + f.write("END DIMENSIONS\n\n") + f.write("BEGIN GRIDDATA\n") + f.write(" DELR\n CONSTANT 1.00000000\n") + f.write(" DELC\n CONSTANT 1.00000000\n") + f.write(" TOP\n CONSTANT 1.00000000\n") + f.write(" BOTM\n CONSTANT 0.00000000\n") + f.write(" IDOMAIN\n INTERNAL FACTOR 1\n") + f.write( + " 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1" + " 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1" + " 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1" + " 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1" + " 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n" + ) + f.write("END GRIDDATA\n") + + ic_fpth = tmp_path / f"{name}.ic" + with open(ic_fpth, "w") as f: + f.write("BEGIN OPTIONS\n") + f.write("END OPTIONS\n\n") + f.write("BEGIN GRIDDATA\n") + f.write(" STRT\n CONSTANT 1.00000000\n") + f.write("END GRIDDATA\n") + + npf_fpth = tmp_path / f"{name}.npf" + with open(npf_fpth, "w") as f: + f.write("BEGIN OPTIONS\n") + f.write(" SAVE_SPECIFIC_DISCHARGE\n") + f.write("END OPTIONS\n\n") + f.write("BEGIN GRIDDATA\n") + f.write(" ICELLTYPE\n CONSTANT 0\n") + f.write(" K\n CONSTANT 1.00000000\n") + f.write(" K33\n CONSTANT 1.00000000\n") + f.write("END GRIDDATA\n") + + chd_fpth = tmp_path / f"{name}.chd" + with open(chd_fpth, "w") as f: + f.write("BEGIN OPTIONS\n") + f.write(" PRINT_FLOWS\n") + f.write("END OPTIONS\n\n") + f.write("BEGIN DIMENSIONS\n") + f.write(" MAXBOUND 2\n") + f.write("END DIMENSIONS\n\n") + f.write("BEGIN PERIOD 1\n") + f.write(" 1 1 1 1.00000000E+00\n") + f.write(" 1 1 100 0.00000000E+00\n") + f.write("END PERIOD 1\n") + + nam_fpth = tmp_path / f"{name}.nam" + with open(nam_fpth, "w") as f: + f.write("BEGIN OPTIONS\n") + f.write(" SAVE_FLOWS\n") + f.write("END OPTIONS\n") + f.write("\n") + f.write("BEGIN PACKAGES\n") + f.write(f" DIS6 {name}.dis dis\n") + f.write(f" IC6 {name}.ic ic\n") + f.write(f" NPF6 {name}.npf npf\n") + f.write(f" CHD6 {name}.chd chd-1\n") + # f.write(f" OC6 {name}.oc oc\n") + f.write("END PACKAGES\n") + + tdis_fpth = tmp_path / "chd01.tdis" + with open(tdis_fpth, "w") as f: + f.write("BEGIN OPTIONS\n") + f.write(" TIME_UNITS days\n") + f.write("END OPTIONS\n\n") + f.write("BEGIN DIMENSIONS\n") + f.write(" NPER 1\n") + f.write("END DIMENSIONS\n\n") + f.write("BEGIN PERIODDATA\n") + f.write(" 5.00000000 1 1.00000000\n") + f.write("END PERIODDATA\n\n") + + ims_fpth = tmp_path / f"{name}.ims" + with open(ims_fpth, "w") as f: + f.write("BEGIN OPTIONS\n") + f.write(" PRINT_OPTION summary\n") + f.write("END OPTIONS\n\n") + f.write("BEGIN NONLINEAR\n") + f.write(" OUTER_DVCLOSE 1.00000000E-06\n") + f.write(" OUTER_MAXIMUM 100\n") + f.write(" UNDER_RELAXATION none\n") + f.write("END NONLINEAR\n\n") + f.write("BEGIN LINEAR\n") + f.write(" INNER_MAXIMUM 300\n") + f.write(" INNER_DVCLOSE 1.00000000E-06\n") + # TODO: fails + # f.write(" inner_rclose 1.00000000E-06\n") + f.write(" LINEAR_ACCELERATION cg\n") + f.write(" RELAXATION_FACTOR 1.00000000\n") + f.write(" SCALING_METHOD none\n") + f.write(" REORDERING_METHOD none\n") + f.write("END LINEAR\n\n") + + sim_fpth = tmp_path / "mfsim.nam" + with open(sim_fpth, "w") as f: + f.write("BEGIN OPTIONS\n") + f.write("END OPTIONS\n\n") + f.write("BEGIN TIMING\n") + f.write(" TDIS6 chd01.tdis\n") + f.write("END TIMING\n\n") + f.write("BEGIN MODELS\n") + f.write(f" GWF6 {name}.nam {name}\n") + f.write("END MODELS\n\n") + f.write("BEGIN EXCHANGES\n") + f.write("END EXCHANGES\n\n") + f.write("BEGIN SOLUTIONGROUP 1\n") + f.write(f" ims6 {name}.ims {name}\n") + f.write("END SOLUTIONGROUP 1\n\n") + + s = None + with open(sim_fpth, "r") as f: + s = MFSimulation.load(f) write_dir = tmp_path / "write" os.makedirs(write_dir) s.write(write_dir) + + os.chdir(write_dir) + s = subprocess.run(["which", "mf6"]) + if s.returncode == 0: + subprocess.run(["mf6"]) + subprocess.run(["diff", f"./{name}.lst", f"../{name}.lst"]) From 3f6b84c442f1edea4cba4010af43020136752e96 Mon Sep 17 00:00:00 2001 From: mjreno Date: Mon, 28 Oct 2024 17:57:37 -0400 Subject: [PATCH 2/5] remove temp path checks --- flopy4/compound.py | 22 ++++++++-------------- test/test_sim.py | 9 --------- 2 files changed, 8 insertions(+), 23 deletions(-) diff --git a/flopy4/compound.py b/flopy4/compound.py index 96e419c7..2163a6d2 100644 --- a/flopy4/compound.py +++ b/flopy4/compound.py @@ -381,25 +381,19 @@ def load(cls, f, **kwargs) -> "MFList": tokens = strip(line).split(maxsplit=maxsplit) assert len(tokens) == sum(param_cols) icol = 0 - for i, p in enumerate(param_lists): - if param_cols[i] == 1: + for i in range(len(param_types)): + row_l = [] + for j in range(param_cols[i]): if param_types[i] == "integer": - param_lists[i].append(int(tokens[icol])) + row_l.append(int(tokens[icol])) elif param_types[i] == "double": - param_lists[i].append(float(tokens[icol])) + row_l.append(float(tokens[icol])) else: - param_lists[i].append(tokens[icol]) + row_l.append(tokens[icol]) icol += 1 + if param_cols[i] == 1: + param_lists[i].append(row_l[0]) else: - row_l = [] - for j in range(param_cols[i]): - if param_types[i] == "integer": - row_l.append(int(tokens[icol])) - elif param_types[i] == "double": - row_l.append(float(tokens[icol])) - else: - row_l.append(tokens[icol]) - icol += 1 param_lists[i].append(row_l) if blk_params and "dimensions" in blk_params: diff --git a/test/test_sim.py b/test/test_sim.py index 382285c2..fb7650f9 100644 --- a/test/test_sim.py +++ b/test/test_sim.py @@ -144,15 +144,10 @@ def test_load_sim(tmp_path): assert "exchanges" in s.nam assert "solutiongroup" in s.nam assert "tdis6" in s.nam["timing"] - assert s.nam["timing"]["tdis6"].value == f"{tmp_path}/sim.tdis" assert "mtype" in s.nam["models"].params["models"] assert "mfname" in s.nam["models"].params["models"] assert "mname" in s.nam["models"].params["models"] assert s.nam["models"].params["models"]["mtype"][0] == "GWF6" - assert ( - s.nam["models"].params["models"]["mfname"][0] - == f"{tmp_path}/{name}.nam" - ) assert s.nam["models"].params["models"]["mname"][0] == f"{name}" assert "slntype" in s.nam["solutiongroup"].params["solutiongroup"] assert "slnfname" in s.nam["solutiongroup"].params["solutiongroup"] @@ -160,10 +155,6 @@ def test_load_sim(tmp_path): assert ( s.nam["solutiongroup"].params["solutiongroup"]["slntype"][0] == "ims6" ) - assert ( - s.nam["solutiongroup"].params["solutiongroup"]["slnfname"][0] - == f"{tmp_path}/{name}.ims" - ) assert ( s.nam["solutiongroup"].params["solutiongroup"]["slnmnames"][0] == f"{name}" From 649a8ce35e4b8f5cb427a50eec8c7081ed7925c3 Mon Sep 17 00:00:00 2001 From: mjreno Date: Tue, 29 Oct 2024 13:45:45 -0400 Subject: [PATCH 3/5] add gwf disu test --- flopy4/array.py | 16 +- flopy4/block.py | 2 +- flopy4/compound.py | 4 +- flopy4/ispec/gwe_disu.py | 471 ++++++++++++++++ flopy4/ispec/gwe_model.py | 2 + flopy4/ispec/gwf_disu.py | 471 ++++++++++++++++ flopy4/ispec/gwf_model.py | 2 + flopy4/ispec/gwt_disu.py | 471 ++++++++++++++++ flopy4/ispec/gwt_model.py | 2 + flopy4/model.py | 6 +- flopy4/package.py | 2 +- flopy4/param.py | 1 - flopy4/simulation.py | 15 +- spec/dfn/gwe-disu.dfn | 286 ++++++++++ spec/dfn/gwf-disu.dfn | 286 ++++++++++ spec/dfn/gwt-disu.dfn | 286 ++++++++++ spec/toml/gwe-disu.toml | 517 ++++++++++++++++++ spec/toml/gwf-disu.toml | 517 ++++++++++++++++++ spec/toml/gwt-disu.toml | 517 ++++++++++++++++++ test/data/test_gwf_chd01/chd01.tdis | 13 + test/data/test_gwf_chd01/gwf_chd01.chd | 14 + test/data/test_gwf_chd01/gwf_chd01.dis | 24 + test/data/test_gwf_chd01/gwf_chd01.ic | 9 + test/data/test_gwf_chd01/gwf_chd01.ims | 22 + test/data/test_gwf_chd01/gwf_chd01.nam | 13 + test/data/test_gwf_chd01/gwf_chd01.npf | 14 + test/data/test_gwf_chd01/gwf_chd01.oc | 14 + test/data/test_gwf_chd01/mfsim.nam | 19 + .../test_mf6model_0-disu01a_0/disu01a.chd | 13 + .../test_mf6model_0-disu01a_0/disu01a.disu | 145 +++++ .../disu01a.disu.grb | Bin 0 -> 2424 bytes .../data/test_mf6model_0-disu01a_0/disu01a.ic | 9 + .../test_mf6model_0-disu01a_0/disu01a.ims | 5 + .../test_mf6model_0-disu01a_0/disu01a.lst | 224 ++++++++ .../test_mf6model_0-disu01a_0/disu01a.nam | 11 + .../test_mf6model_0-disu01a_0/disu01a.npf | 11 + .../disu01a.orig.disu | 148 +++++ .../test_mf6model_0-disu01a_0/disu01a.tdis | 12 + test/data/test_mf6model_0-disu01a_0/mfsim.lst | 286 ++++++++++ test/data/test_mf6model_0-disu01a_0/mfsim.nam | 19 + test/test_sim.py | 146 +---- 41 files changed, 4906 insertions(+), 139 deletions(-) create mode 100644 flopy4/ispec/gwe_disu.py create mode 100644 flopy4/ispec/gwf_disu.py create mode 100644 flopy4/ispec/gwt_disu.py create mode 100644 spec/dfn/gwe-disu.dfn create mode 100644 spec/dfn/gwf-disu.dfn create mode 100644 spec/dfn/gwt-disu.dfn create mode 100644 spec/toml/gwe-disu.toml create mode 100644 spec/toml/gwf-disu.toml create mode 100644 spec/toml/gwt-disu.toml create mode 100644 test/data/test_gwf_chd01/chd01.tdis create mode 100644 test/data/test_gwf_chd01/gwf_chd01.chd create mode 100644 test/data/test_gwf_chd01/gwf_chd01.dis create mode 100644 test/data/test_gwf_chd01/gwf_chd01.ic create mode 100644 test/data/test_gwf_chd01/gwf_chd01.ims create mode 100644 test/data/test_gwf_chd01/gwf_chd01.nam create mode 100644 test/data/test_gwf_chd01/gwf_chd01.npf create mode 100644 test/data/test_gwf_chd01/gwf_chd01.oc create mode 100644 test/data/test_gwf_chd01/mfsim.nam create mode 100644 test/data/test_mf6model_0-disu01a_0/disu01a.chd create mode 100644 test/data/test_mf6model_0-disu01a_0/disu01a.disu create mode 100644 test/data/test_mf6model_0-disu01a_0/disu01a.disu.grb create mode 100644 test/data/test_mf6model_0-disu01a_0/disu01a.ic create mode 100644 test/data/test_mf6model_0-disu01a_0/disu01a.ims create mode 100644 test/data/test_mf6model_0-disu01a_0/disu01a.lst create mode 100644 test/data/test_mf6model_0-disu01a_0/disu01a.nam create mode 100644 test/data/test_mf6model_0-disu01a_0/disu01a.npf create mode 100644 test/data/test_mf6model_0-disu01a_0/disu01a.orig.disu create mode 100644 test/data/test_mf6model_0-disu01a_0/disu01a.tdis create mode 100644 test/data/test_mf6model_0-disu01a_0/mfsim.lst create mode 100644 test/data/test_mf6model_0-disu01a_0/mfsim.nam diff --git a/flopy4/array.py b/flopy4/array.py index 4b807814..d6ffc595 100644 --- a/flopy4/array.py +++ b/flopy4/array.py @@ -456,14 +456,18 @@ def load(cls, f, cwd, shape, header=True, **kwargs): nlay = params.get("dimensions").get("nlay") nrow = params.get("dimensions").get("nrow") ncol = params.get("dimensions").get("ncol") + shape = (nlay, nrow, ncol) + elif "disv" in mempath.split("/"): + nlay = params.get("dimensions").get("nlay") ncpl = params.get("dimensions").get("ncpl") + shape = (nlay, ncpl) + elif "disu" in mempath.split("/"): nodes = params.get("dimensions").get("nodes") - if nrow and ncol: - shape = (nlay, nrow, ncol) - elif ncpl: - shape = (nlay, ncpl) - elif nodes: + nja = params.get("dimensions").get("nja") + if "nodes" in shape: shape = nodes + elif "nja" in shape: + shape = nja if layered: nlay = shape[0] lshp = shape[1:] @@ -554,7 +558,7 @@ def read_array(f, dtype): pos = f.tell() line = f.readline() line = line_strip(line) - if not re.match("^[0-9. ]+$", line): + if not re.match("^[-0-9. ]+$", line): f.seek(pos, 0) break astr.append(line) diff --git a/flopy4/block.py b/flopy4/block.py index 73107686..a74edf4b 100644 --- a/flopy4/block.py +++ b/flopy4/block.py @@ -236,7 +236,7 @@ def load(cls, f, **kwargs): line = f.readline() if line == "": raise ValueError("Early EOF, aborting") - if line == "\n": + if line == "\n" or line.lstrip().startswith("#"): continue words = strip(line).lower().split() if period: diff --git a/flopy4/compound.py b/flopy4/compound.py index 2163a6d2..05735f2b 100644 --- a/flopy4/compound.py +++ b/flopy4/compound.py @@ -374,7 +374,9 @@ def load(cls, f, **kwargs) -> "MFList": while True: pos = f.tell() line = f.readline() - if line.lower().startswith("end"): + if line == "\n" or line.lstrip().startswith("#"): + continue + elif line.lower().startswith("end"): f.seek(pos) break else: diff --git a/flopy4/ispec/gwe_disu.py b/flopy4/ispec/gwe_disu.py new file mode 100644 index 00000000..144b3286 --- /dev/null +++ b/flopy4/ispec/gwe_disu.py @@ -0,0 +1,471 @@ +# generated file +from flopy4.array import MFArray +from flopy4.compound import MFRecord, MFList +from flopy4.package import MFPackage +from flopy4.scalar import MFDouble, MFFilename, MFInteger, MFKeyword, MFString + + +class GweDisu(MFPackage): + multipkg = False + stress = False + advanced = False + + length_units = MFString( + type = "string", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""model length units""", + description = +"""is the length units used for this model. Values can be ``FEET'', +``METERS'', or ``CENTIMETERS''. If not specified, the default is +``UNKNOWN''.""", + ) + + nogrb = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""do not write binary grid file""", + description = +"""keyword to deactivate writing of the binary grid file.""", + ) + + xorigin = MFDouble( + type = "double", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""x-position origin of the model grid coordinate system""", + 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.""", + ) + + yorigin = MFDouble( + type = "double", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""y-position origin of the model grid coordinate system""", + 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.""", + ) + + angrot = MFDouble( + type = "double", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""rotation angle""", + 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.""", + ) + + vertical_offset_tolerance = MFDouble( + type = "double", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""vertical length dimension for top and bottom checking""", + 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.""", + ) + + export_array_ascii = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""export array variables to layered ascii files.""", + description = +"""keyword that specifies input griddata arrays should be written to +layered ascii output files.""", + ) + + nodes = MFInteger( + type = "integer", + block = "dimensions", + shape = "", + reader = "urword", + optional = False, + longname = +"""number of layers""", + description = +"""is the number of cells in the model grid.""", + ) + + nja = MFInteger( + type = "integer", + block = "dimensions", + shape = "", + reader = "urword", + optional = False, + longname = +"""number of columns""", + 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.""", + ) + + nvert = MFInteger( + type = "integer", + block = "dimensions", + shape = "", + reader = "urword", + optional = True, + longname = +"""number of vertices""", + 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.""", + ) + + top = MFArray( + type = "double", + block = "griddata", + shape = "(nodes)", + reader = "readarray", + optional = False, + longname = +"""cell top elevation""", + description = +"""is the top elevation for each cell in the model grid.""", + ) + + bot = MFArray( + type = "double", + block = "griddata", + shape = "(nodes)", + reader = "readarray", + optional = False, + longname = +"""cell bottom elevation""", + description = +"""is the bottom elevation for each cell.""", + ) + + area = MFArray( + type = "double", + block = "griddata", + shape = "(nodes)", + reader = "readarray", + optional = False, + longname = +"""cell surface area""", + description = +"""is the cell surface area (in plan view).""", + ) + + idomain = MFArray( + type = "integer", + block = "griddata", + shape = "(nodes)", + reader = "readarray", + optional = True, + longname = +"""idomain existence array""", + 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.""", + ) + + iac = MFArray( + type = "integer", + block = "connectiondata", + shape = "(nodes)", + reader = "readarray", + optional = False, + longname = +"""number of cell connections""", + description = +"""is the number of connections (plus 1) for each cell. The sum of all +the entries in IAC must be equal to NJA.""", + ) + + ja = MFArray( + type = "integer", + block = "connectiondata", + shape = "(nja)", + reader = "readarray", + optional = False, + longname = +"""grid connectivity""", + 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.""", + ) + + ihc = MFArray( + type = "integer", + block = "connectiondata", + shape = "(nja)", + reader = "readarray", + optional = False, + longname = +"""connection type""", + 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.""", + ) + + cl12 = MFArray( + type = "double", + block = "connectiondata", + shape = "(nja)", + reader = "readarray", + optional = False, + longname = +"""connection lengths""", + description = +"""is the array containing connection lengths between the center of cell +n and the shared face with each adjacent m cell.""", + ) + + hwva = MFArray( + type = "double", + block = "connectiondata", + shape = "(nja)", + reader = "readarray", + optional = False, + longname = +"""connection lengths""", + 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.""", + ) + + angldegx = MFArray( + type = "double", + block = "connectiondata", + shape = "(nja)", + reader = "readarray", + optional = True, + longname = +"""angle of face normal to connection""", + 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.""", + ) + + iv = MFInteger( + type = "integer", + block = "vertices", + shape = "", + reader = "urword", + optional = False, + longname = +"""vertex number""", + description = +"""is the vertex number. Records in the VERTICES block must be listed in +consecutive order from 1 to NVERT.""", + ) + + xv = MFDouble( + type = "double", + block = "vertices", + shape = "", + reader = "urword", + optional = False, + longname = +"""x-coordinate for vertex""", + description = +"""is the x-coordinate for the vertex.""", + ) + + yv = MFDouble( + type = "double", + block = "vertices", + shape = "", + reader = "urword", + optional = False, + longname = +"""y-coordinate for vertex""", + description = +"""is the y-coordinate for the vertex.""", + ) + + vertices = MFList( + type = "recarray", + params = { + "iv": iv, + "xv": xv, + "yv": yv, + }, + block = "vertices", + shape = "(nvert)", + reader = "urword", + optional = False, + longname = +"""vertices data""", + description = +"""""", + ) + + icell2d = MFInteger( + type = "integer", + block = "cell2d", + shape = "", + reader = "urword", + optional = False, + longname = +"""cell2d number""", + description = +"""is the cell2d number. Records in the CELL2D block must be listed in +consecutive order from 1 to NODES.""", + ) + + xc = MFDouble( + type = "double", + block = "cell2d", + shape = "", + reader = "urword", + optional = False, + longname = +"""x-coordinate for cell center""", + description = +"""is the x-coordinate for the cell center.""", + ) + + yc = MFDouble( + type = "double", + block = "cell2d", + shape = "", + reader = "urword", + optional = False, + longname = +"""y-coordinate for cell center""", + description = +"""is the y-coordinate for the cell center.""", + ) + + ncvert = MFInteger( + type = "integer", + block = "cell2d", + shape = "", + reader = "urword", + optional = False, + longname = +"""number of cell vertices""", + description = +"""is the number of vertices required to define the cell. There may be a +different number of vertices for each cell.""", + ) + + icvert = MFArray( + type = "integer", + block = "cell2d", + shape = "(ncvert)", + reader = "urword", + optional = False, + longname = +"""array of vertex numbers""", + 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.""", + ) + + cell2d = MFList( + type = "recarray", + params = { + "icell2d": icell2d, + "xc": xc, + "yc": yc, + "ncvert": ncvert, + "icvert": icvert, + }, + block = "cell2d", + shape = "(nodes)", + reader = "urword", + optional = False, + longname = +"""cell2d data""", + description = +"""""", + ) \ No newline at end of file diff --git a/flopy4/ispec/gwe_model.py b/flopy4/ispec/gwe_model.py index b331413c..09dc6c21 100644 --- a/flopy4/ispec/gwe_model.py +++ b/flopy4/ispec/gwe_model.py @@ -2,7 +2,9 @@ from flopy4.model import MFModel from flopy4.resolver import Resolve from flopy4.ispec.gwe_dis import GweDis +from flopy4.ispec.gwe_disu import GweDisu class GweModel(MFModel, Resolve): dis6 = GweDis() + disu6 = GweDisu() diff --git a/flopy4/ispec/gwf_disu.py b/flopy4/ispec/gwf_disu.py new file mode 100644 index 00000000..5ccffb1b --- /dev/null +++ b/flopy4/ispec/gwf_disu.py @@ -0,0 +1,471 @@ +# generated file +from flopy4.array import MFArray +from flopy4.compound import MFRecord, MFList +from flopy4.package import MFPackage +from flopy4.scalar import MFDouble, MFFilename, MFInteger, MFKeyword, MFString + + +class GwfDisu(MFPackage): + multipkg = False + stress = False + advanced = False + + length_units = MFString( + type = "string", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""model length units""", + description = +"""is the length units used for this model. Values can be ``FEET'', +``METERS'', or ``CENTIMETERS''. If not specified, the default is +``UNKNOWN''.""", + ) + + nogrb = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""do not write binary grid file""", + description = +"""keyword to deactivate writing of the binary grid file.""", + ) + + xorigin = MFDouble( + type = "double", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""x-position origin of the model grid coordinate system""", + 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.""", + ) + + yorigin = MFDouble( + type = "double", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""y-position origin of the model grid coordinate system""", + 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.""", + ) + + angrot = MFDouble( + type = "double", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""rotation angle""", + 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.""", + ) + + vertical_offset_tolerance = MFDouble( + type = "double", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""vertical length dimension for top and bottom checking""", + 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.""", + ) + + export_array_ascii = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""export array variables to layered ascii files.""", + description = +"""keyword that specifies input griddata arrays should be written to +layered ascii output files.""", + ) + + nodes = MFInteger( + type = "integer", + block = "dimensions", + shape = "", + reader = "urword", + optional = False, + longname = +"""number of layers""", + description = +"""is the number of cells in the model grid.""", + ) + + nja = MFInteger( + type = "integer", + block = "dimensions", + shape = "", + reader = "urword", + optional = False, + longname = +"""number of columns""", + 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.""", + ) + + nvert = MFInteger( + type = "integer", + block = "dimensions", + shape = "", + reader = "urword", + optional = True, + longname = +"""number of vertices""", + 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.""", + ) + + top = MFArray( + type = "double", + block = "griddata", + shape = "(nodes)", + reader = "readarray", + optional = False, + longname = +"""cell top elevation""", + description = +"""is the top elevation for each cell in the model grid.""", + ) + + bot = MFArray( + type = "double", + block = "griddata", + shape = "(nodes)", + reader = "readarray", + optional = False, + longname = +"""cell bottom elevation""", + description = +"""is the bottom elevation for each cell.""", + ) + + area = MFArray( + type = "double", + block = "griddata", + shape = "(nodes)", + reader = "readarray", + optional = False, + longname = +"""cell surface area""", + description = +"""is the cell surface area (in plan view).""", + ) + + idomain = MFArray( + type = "integer", + block = "griddata", + shape = "(nodes)", + reader = "readarray", + optional = True, + longname = +"""idomain existence array""", + 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.""", + ) + + iac = MFArray( + type = "integer", + block = "connectiondata", + shape = "(nodes)", + reader = "readarray", + optional = False, + longname = +"""number of cell connections""", + description = +"""is the number of connections (plus 1) for each cell. The sum of all +the entries in IAC must be equal to NJA.""", + ) + + ja = MFArray( + type = "integer", + block = "connectiondata", + shape = "(nja)", + reader = "readarray", + optional = False, + longname = +"""grid connectivity""", + 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.""", + ) + + ihc = MFArray( + type = "integer", + block = "connectiondata", + shape = "(nja)", + reader = "readarray", + optional = False, + longname = +"""connection type""", + 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.""", + ) + + cl12 = MFArray( + type = "double", + block = "connectiondata", + shape = "(nja)", + reader = "readarray", + optional = False, + longname = +"""connection lengths""", + description = +"""is the array containing connection lengths between the center of cell +n and the shared face with each adjacent m cell.""", + ) + + hwva = MFArray( + type = "double", + block = "connectiondata", + shape = "(nja)", + reader = "readarray", + optional = False, + longname = +"""connection lengths""", + 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.""", + ) + + angldegx = MFArray( + type = "double", + block = "connectiondata", + shape = "(nja)", + reader = "readarray", + optional = True, + longname = +"""angle of face normal to connection""", + 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.""", + ) + + iv = MFInteger( + type = "integer", + block = "vertices", + shape = "", + reader = "urword", + optional = False, + longname = +"""vertex number""", + description = +"""is the vertex number. Records in the VERTICES block must be listed in +consecutive order from 1 to NVERT.""", + ) + + xv = MFDouble( + type = "double", + block = "vertices", + shape = "", + reader = "urword", + optional = False, + longname = +"""x-coordinate for vertex""", + description = +"""is the x-coordinate for the vertex.""", + ) + + yv = MFDouble( + type = "double", + block = "vertices", + shape = "", + reader = "urword", + optional = False, + longname = +"""y-coordinate for vertex""", + description = +"""is the y-coordinate for the vertex.""", + ) + + vertices = MFList( + type = "recarray", + params = { + "iv": iv, + "xv": xv, + "yv": yv, + }, + block = "vertices", + shape = "(nvert)", + reader = "urword", + optional = True, + longname = +"""vertices data""", + description = +"""""", + ) + + icell2d = MFInteger( + type = "integer", + block = "cell2d", + shape = "", + reader = "urword", + optional = False, + longname = +"""cell2d number""", + description = +"""is the cell2d number. Records in the CELL2D block must be listed in +consecutive order from 1 to NODES.""", + ) + + xc = MFDouble( + type = "double", + block = "cell2d", + shape = "", + reader = "urword", + optional = False, + longname = +"""x-coordinate for cell center""", + description = +"""is the x-coordinate for the cell center.""", + ) + + yc = MFDouble( + type = "double", + block = "cell2d", + shape = "", + reader = "urword", + optional = False, + longname = +"""y-coordinate for cell center""", + description = +"""is the y-coordinate for the cell center.""", + ) + + ncvert = MFInteger( + type = "integer", + block = "cell2d", + shape = "", + reader = "urword", + optional = False, + longname = +"""number of cell vertices""", + description = +"""is the number of vertices required to define the cell. There may be a +different number of vertices for each cell.""", + ) + + icvert = MFArray( + type = "integer", + block = "cell2d", + shape = "(ncvert)", + reader = "urword", + optional = False, + longname = +"""array of vertex numbers""", + 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.""", + ) + + cell2d = MFList( + type = "recarray", + params = { + "icell2d": icell2d, + "xc": xc, + "yc": yc, + "ncvert": ncvert, + "icvert": icvert, + }, + block = "cell2d", + shape = "(nodes)", + reader = "urword", + optional = True, + longname = +"""cell2d data""", + description = +"""""", + ) \ No newline at end of file diff --git a/flopy4/ispec/gwf_model.py b/flopy4/ispec/gwf_model.py index 2f13ab46..0158a005 100644 --- a/flopy4/ispec/gwf_model.py +++ b/flopy4/ispec/gwf_model.py @@ -3,6 +3,7 @@ from flopy4.resolver import Resolve from flopy4.ispec.gwf_chd import GwfChd from flopy4.ispec.gwf_dis import GwfDis +from flopy4.ispec.gwf_disu import GwfDisu from flopy4.ispec.gwf_ic import GwfIc from flopy4.ispec.gwf_nam import GwfNam from flopy4.ispec.gwf_npf import GwfNpf @@ -11,6 +12,7 @@ class GwfModel(MFModel, Resolve): chd6 = GwfChd() dis6 = GwfDis() + disu6 = GwfDisu() ic6 = GwfIc() nam6 = GwfNam() npf6 = GwfNpf() diff --git a/flopy4/ispec/gwt_disu.py b/flopy4/ispec/gwt_disu.py new file mode 100644 index 00000000..a6d00e65 --- /dev/null +++ b/flopy4/ispec/gwt_disu.py @@ -0,0 +1,471 @@ +# generated file +from flopy4.array import MFArray +from flopy4.compound import MFRecord, MFList +from flopy4.package import MFPackage +from flopy4.scalar import MFDouble, MFFilename, MFInteger, MFKeyword, MFString + + +class GwtDisu(MFPackage): + multipkg = False + stress = False + advanced = False + + length_units = MFString( + type = "string", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""model length units""", + description = +"""is the length units used for this model. Values can be ``FEET'', +``METERS'', or ``CENTIMETERS''. If not specified, the default is +``UNKNOWN''.""", + ) + + nogrb = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""do not write binary grid file""", + description = +"""keyword to deactivate writing of the binary grid file.""", + ) + + xorigin = MFDouble( + type = "double", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""x-position origin of the model grid coordinate system""", + 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.""", + ) + + yorigin = MFDouble( + type = "double", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""y-position origin of the model grid coordinate system""", + 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.""", + ) + + angrot = MFDouble( + type = "double", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""rotation angle""", + 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.""", + ) + + vertical_offset_tolerance = MFDouble( + type = "double", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""vertical length dimension for top and bottom checking""", + 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.""", + ) + + export_array_ascii = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""export array variables to layered ascii files.""", + description = +"""keyword that specifies input griddata arrays should be written to +layered ascii output files.""", + ) + + nodes = MFInteger( + type = "integer", + block = "dimensions", + shape = "", + reader = "urword", + optional = False, + longname = +"""number of layers""", + description = +"""is the number of cells in the model grid.""", + ) + + nja = MFInteger( + type = "integer", + block = "dimensions", + shape = "", + reader = "urword", + optional = False, + longname = +"""number of columns""", + 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.""", + ) + + nvert = MFInteger( + type = "integer", + block = "dimensions", + shape = "", + reader = "urword", + optional = True, + longname = +"""number of vertices""", + 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.""", + ) + + top = MFArray( + type = "double", + block = "griddata", + shape = "(nodes)", + reader = "readarray", + optional = False, + longname = +"""cell top elevation""", + description = +"""is the top elevation for each cell in the model grid.""", + ) + + bot = MFArray( + type = "double", + block = "griddata", + shape = "(nodes)", + reader = "readarray", + optional = False, + longname = +"""cell bottom elevation""", + description = +"""is the bottom elevation for each cell.""", + ) + + area = MFArray( + type = "double", + block = "griddata", + shape = "(nodes)", + reader = "readarray", + optional = False, + longname = +"""cell surface area""", + description = +"""is the cell surface area (in plan view).""", + ) + + idomain = MFArray( + type = "integer", + block = "griddata", + shape = "(nodes)", + reader = "readarray", + optional = True, + longname = +"""idomain existence array""", + 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.""", + ) + + iac = MFArray( + type = "integer", + block = "connectiondata", + shape = "(nodes)", + reader = "readarray", + optional = False, + longname = +"""number of cell connections""", + description = +"""is the number of connections (plus 1) for each cell. The sum of all +the entries in IAC must be equal to NJA.""", + ) + + ja = MFArray( + type = "integer", + block = "connectiondata", + shape = "(nja)", + reader = "readarray", + optional = False, + longname = +"""grid connectivity""", + 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.""", + ) + + ihc = MFArray( + type = "integer", + block = "connectiondata", + shape = "(nja)", + reader = "readarray", + optional = False, + longname = +"""connection type""", + 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.""", + ) + + cl12 = MFArray( + type = "double", + block = "connectiondata", + shape = "(nja)", + reader = "readarray", + optional = False, + longname = +"""connection lengths""", + description = +"""is the array containing connection lengths between the center of cell +n and the shared face with each adjacent m cell.""", + ) + + hwva = MFArray( + type = "double", + block = "connectiondata", + shape = "(nja)", + reader = "readarray", + optional = False, + longname = +"""connection lengths""", + 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.""", + ) + + angldegx = MFArray( + type = "double", + block = "connectiondata", + shape = "(nja)", + reader = "readarray", + optional = True, + longname = +"""angle of face normal to connection""", + 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.""", + ) + + iv = MFInteger( + type = "integer", + block = "vertices", + shape = "", + reader = "urword", + optional = False, + longname = +"""vertex number""", + description = +"""is the vertex number. Records in the VERTICES block must be listed in +consecutive order from 1 to NVERT.""", + ) + + xv = MFDouble( + type = "double", + block = "vertices", + shape = "", + reader = "urword", + optional = False, + longname = +"""x-coordinate for vertex""", + description = +"""is the x-coordinate for the vertex.""", + ) + + yv = MFDouble( + type = "double", + block = "vertices", + shape = "", + reader = "urword", + optional = False, + longname = +"""y-coordinate for vertex""", + description = +"""is the y-coordinate for the vertex.""", + ) + + vertices = MFList( + type = "recarray", + params = { + "iv": iv, + "xv": xv, + "yv": yv, + }, + block = "vertices", + shape = "(nvert)", + reader = "urword", + optional = True, + longname = +"""vertices data""", + description = +"""""", + ) + + icell2d = MFInteger( + type = "integer", + block = "cell2d", + shape = "", + reader = "urword", + optional = False, + longname = +"""cell2d number""", + description = +"""is the cell2d number. Records in the CELL2D block must be listed in +consecutive order from 1 to NODES.""", + ) + + xc = MFDouble( + type = "double", + block = "cell2d", + shape = "", + reader = "urword", + optional = False, + longname = +"""x-coordinate for cell center""", + description = +"""is the x-coordinate for the cell center.""", + ) + + yc = MFDouble( + type = "double", + block = "cell2d", + shape = "", + reader = "urword", + optional = False, + longname = +"""y-coordinate for cell center""", + description = +"""is the y-coordinate for the cell center.""", + ) + + ncvert = MFInteger( + type = "integer", + block = "cell2d", + shape = "", + reader = "urword", + optional = False, + longname = +"""number of cell vertices""", + description = +"""is the number of vertices required to define the cell. There may be a +different number of vertices for each cell.""", + ) + + icvert = MFArray( + type = "integer", + block = "cell2d", + shape = "(ncvert)", + reader = "urword", + optional = False, + longname = +"""array of vertex numbers""", + 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.""", + ) + + cell2d = MFList( + type = "recarray", + params = { + "icell2d": icell2d, + "xc": xc, + "yc": yc, + "ncvert": ncvert, + "icvert": icvert, + }, + block = "cell2d", + shape = "(nodes)", + reader = "urword", + optional = True, + longname = +"""cell2d data""", + description = +"""""", + ) \ No newline at end of file diff --git a/flopy4/ispec/gwt_model.py b/flopy4/ispec/gwt_model.py index bc10bb93..a01a9ccc 100644 --- a/flopy4/ispec/gwt_model.py +++ b/flopy4/ispec/gwt_model.py @@ -2,7 +2,9 @@ from flopy4.model import MFModel from flopy4.resolver import Resolve from flopy4.ispec.gwt_dis import GwtDis +from flopy4.ispec.gwt_disu import GwtDisu class GwtModel(MFModel, Resolve): dis6 = GwtDis() + disu6 = GwtDisu() diff --git a/flopy4/model.py b/flopy4/model.py index 97f170af..6cb5bfed 100644 --- a/flopy4/model.py +++ b/flopy4/model.py @@ -137,14 +137,14 @@ def load_packages( nlay = packages[pname].params["nlay"] nrow = packages[pname].params["nrow"] ncol = packages[pname].params["ncol"] - model_shape = (nlay, nrow, ncol) + model_shape = [nlay, nrow, ncol] elif ftype.lower() == "disv6": nlay = packages[pname].params["nlay"] ncpl = packages[pname].params["ncpl"] - model_shape = (nlay, ncpl) + model_shape = [nlay, ncpl] elif ftype.lower() == "disu6": nodes = packages[pname].params["nodes"] - model_shape = nodes + model_shape = [nodes] def write(self, simpath, **kwargs): """Write the model to files.""" diff --git a/flopy4/package.py b/flopy4/package.py index f81c2d8f..531e3c25 100644 --- a/flopy4/package.py +++ b/flopy4/package.py @@ -251,7 +251,7 @@ def load(cls, f, **kwargs): line = f.readline() if line == "": break - if line == "\n": + if line == "\n" or line.lstrip().startswith("#"): continue line = strip(line).lower() words = line.split() diff --git a/flopy4/param.py b/flopy4/param.py index 54d94e7c..23bfba7d 100644 --- a/flopy4/param.py +++ b/flopy4/param.py @@ -239,7 +239,6 @@ def write(self, f, **kwargs): if len(self.params[param.name]): param.write(f, **kwargs) elif param.type is None: - print(param) raise TypeError( f"Unknown specification type for param '{param.name}'" ) diff --git a/flopy4/simulation.py b/flopy4/simulation.py index 980c7f85..1e940457 100644 --- a/flopy4/simulation.py +++ b/flopy4/simulation.py @@ -192,23 +192,22 @@ def load_solvers( kwargs["mempath"] = f"{mempath}/{slnname}" solvers[slnname] = sln.load(f, **kwargs) - def write(self, simpath, **kwargs): + def write(self, simpath: Path, **kwargs): """Write the simulation to files.""" - path = Path(simpath) - - fpath = Path(self.nam.params["tdis6"]) - newpath = Path(path / fpath.name) - with open(newpath, "w") as f: + tdis_fpath = Path(self.nam.params["tdis6"]) + with open(Path(simpath / tdis_fpath.name), "w") as f: self.tdis.write(f, **kwargs) # slntypes = self.nam.params["solutiongroup"]["slntype"] slnfnames = self.nam.params["solutiongroup"]["slnfname"] for index, sln in enumerate(self.solvers): - with open(path / slnfnames[index], "w") as f: + sln_fpath = Path(slnfnames[index]) + # with open(simpath / slnfnames[index], "w") as f: + with open(Path(simpath / sln_fpath.name), "w") as f: self.solvers[sln].write(f, **kwargs) for model in self.models: self.models[model].write(simpath, **kwargs) - with open(path / "mfsim.nam", "w") as f: + with open(simpath / "mfsim.nam", "w") as f: self.nam.write(f, **kwargs) diff --git a/spec/dfn/gwe-disu.dfn b/spec/dfn/gwe-disu.dfn new file mode 100644 index 00000000..1b203560 --- /dev/null +++ b/spec/dfn/gwe-disu.dfn @@ -0,0 +1,286 @@ +# --------------------- gwe disu options --------------------- + +block options +name length_units +type string +reader urword +optional true +longname model length units +description is the length units used for this model. Values can be ``FEET'', ``METERS'', or ``CENTIMETERS''. If not specified, the default is ``UNKNOWN''. + +block options +name nogrb +type keyword +reader urword +optional true +longname do not write binary grid file +description keyword to deactivate writing of the binary grid file. + +block options +name xorigin +type double precision +reader urword +optional true +longname x-position origin of the model grid coordinate system +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. + +block options +name yorigin +type double precision +reader urword +optional true +longname y-position origin of the model grid coordinate system +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. + +block options +name angrot +type double precision +reader urword +optional true +longname rotation angle +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. + +block options +name vertical_offset_tolerance +type double precision +reader urword +optional true +default_value 0.0 +longname vertical length dimension for top and bottom checking +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. +mf6internal voffsettol + +block options +name export_array_ascii +type keyword +reader urword +optional true +mf6internal export_ascii +longname export array variables to layered ascii files. +description keyword that specifies input griddata arrays should be written to layered ascii output files. + +# --------------------- gwe disu dimensions --------------------- + +block dimensions +name nodes +type integer +reader urword +optional false +longname number of layers +description is the number of cells in the model grid. + +block dimensions +name nja +type integer +reader urword +optional false +longname number of columns +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. + +block dimensions +name nvert +type integer +reader urword +optional true +longname number of vertices +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. + +# --------------------- gwe disu griddata --------------------- + +block griddata +name top +type double precision +shape (nodes) +reader readarray +longname cell top elevation +description is the top elevation for each cell in the model grid. + +block griddata +name bot +type double precision +shape (nodes) +reader readarray +longname cell bottom elevation +description is the bottom elevation for each cell. + +block griddata +name area +type double precision +shape (nodes) +reader readarray +longname cell surface area +description is the cell surface area (in plan view). + +block griddata +name idomain +type integer +shape (nodes) +reader readarray +layered false +optional true +longname idomain existence array +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. + +# --------------------- gwe disu connectiondata --------------------- + +block connectiondata +name iac +type integer +shape (nodes) +reader readarray +longname number of cell connections +description is the number of connections (plus 1) for each cell. The sum of all the entries in IAC must be equal to NJA. + +block connectiondata +name ja +type integer +shape (nja) +reader readarray +longname grid connectivity +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. +numeric_index true +jagged_array iac + +block connectiondata +name ihc +type integer +shape (nja) +reader readarray +longname connection type +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 + +block connectiondata +name cl12 +type double precision +shape (nja) +reader readarray +longname connection lengths +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 + +block connectiondata +name hwva +type double precision +shape (nja) +reader readarray +longname connection lengths +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 + +block connectiondata +name angldegx +type double precision +optional true +shape (nja) +reader readarray +longname angle of face normal to connection +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 + +# --------------------- gwe disu vertices --------------------- + +block vertices +name vertices +type recarray iv xv yv +shape (nvert) +reader urword +optional false +longname vertices data +description + +block vertices +name iv +type integer +in_record true +tagged false +reader urword +optional false +longname vertex number +description is the vertex number. Records in the VERTICES block must be listed in consecutive order from 1 to NVERT. +numeric_index true + +block vertices +name xv +type double precision +in_record true +tagged false +reader urword +optional false +longname x-coordinate for vertex +description is the x-coordinate for the vertex. + +block vertices +name yv +type double precision +in_record true +tagged false +reader urword +optional false +longname y-coordinate for vertex +description is the y-coordinate for the vertex. + + +# --------------------- gwe disu cell2d --------------------- + +block cell2d +name cell2d +type recarray icell2d xc yc ncvert icvert +shape (nodes) +reader urword +optional false +longname cell2d data +description + +block cell2d +name icell2d +type integer +in_record true +tagged false +reader urword +optional false +longname cell2d number +description is the cell2d number. Records in the CELL2D block must be listed in consecutive order from 1 to NODES. +numeric_index true + +block cell2d +name xc +type double precision +in_record true +tagged false +reader urword +optional false +longname x-coordinate for cell center +description is the x-coordinate for the cell center. + +block cell2d +name yc +type double precision +in_record true +tagged false +reader urword +optional false +longname y-coordinate for cell center +description is the y-coordinate for the cell center. + +block cell2d +name ncvert +type integer +in_record true +tagged false +reader urword +optional false +longname number of cell vertices +description is the number of vertices required to define the cell. There may be a different number of vertices for each cell. + +block cell2d +name icvert +type integer +shape (ncvert) +in_record true +tagged false +reader urword +optional false +longname array of vertex numbers +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. +numeric_index true diff --git a/spec/dfn/gwf-disu.dfn b/spec/dfn/gwf-disu.dfn new file mode 100644 index 00000000..be7be430 --- /dev/null +++ b/spec/dfn/gwf-disu.dfn @@ -0,0 +1,286 @@ +# --------------------- gwf disu options --------------------- + +block options +name length_units +type string +reader urword +optional true +longname model length units +description is the length units used for this model. Values can be ``FEET'', ``METERS'', or ``CENTIMETERS''. If not specified, the default is ``UNKNOWN''. + +block options +name nogrb +type keyword +reader urword +optional true +longname do not write binary grid file +description keyword to deactivate writing of the binary grid file. + +block options +name xorigin +type double precision +reader urword +optional true +longname x-position origin of the model grid coordinate system +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. + +block options +name yorigin +type double precision +reader urword +optional true +longname y-position origin of the model grid coordinate system +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. + +block options +name angrot +type double precision +reader urword +optional true +longname rotation angle +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. + +block options +name vertical_offset_tolerance +type double precision +reader urword +optional true +default_value 0.0 +longname vertical length dimension for top and bottom checking +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. +mf6internal voffsettol + +block options +name export_array_ascii +type keyword +reader urword +optional true +mf6internal export_ascii +longname export array variables to layered ascii files. +description keyword that specifies input griddata arrays should be written to layered ascii output files. + +# --------------------- gwf disu dimensions --------------------- + +block dimensions +name nodes +type integer +reader urword +optional false +longname number of layers +description is the number of cells in the model grid. + +block dimensions +name nja +type integer +reader urword +optional false +longname number of columns +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. + +block dimensions +name nvert +type integer +reader urword +optional true +longname number of vertices +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. + +# --------------------- gwf disu griddata --------------------- + +block griddata +name top +type double precision +shape (nodes) +reader readarray +longname cell top elevation +description is the top elevation for each cell in the model grid. + +block griddata +name bot +type double precision +shape (nodes) +reader readarray +longname cell bottom elevation +description is the bottom elevation for each cell. + +block griddata +name area +type double precision +shape (nodes) +reader readarray +longname cell surface area +description is the cell surface area (in plan view). + +block griddata +name idomain +type integer +shape (nodes) +reader readarray +layered false +optional true +longname idomain existence array +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. + +# --------------------- gwf disu connectiondata --------------------- + +block connectiondata +name iac +type integer +shape (nodes) +reader readarray +longname number of cell connections +description is the number of connections (plus 1) for each cell. The sum of all the entries in IAC must be equal to NJA. + +block connectiondata +name ja +type integer +shape (nja) +reader readarray +longname grid connectivity +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. +numeric_index true +jagged_array iac + +block connectiondata +name ihc +type integer +shape (nja) +reader readarray +longname connection type +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 + +block connectiondata +name cl12 +type double precision +shape (nja) +reader readarray +longname connection lengths +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 + +block connectiondata +name hwva +type double precision +shape (nja) +reader readarray +longname connection lengths +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 + +block connectiondata +name angldegx +type double precision +optional true +shape (nja) +reader readarray +longname angle of face normal to connection +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 + +# --------------------- gwf disu vertices --------------------- + +block vertices +name vertices +type recarray iv xv yv +shape (nvert) +reader urword +optional true +longname vertices data +description + +block vertices +name iv +type integer +in_record true +tagged false +reader urword +optional false +longname vertex number +description is the vertex number. Records in the VERTICES block must be listed in consecutive order from 1 to NVERT. +numeric_index true + +block vertices +name xv +type double precision +in_record true +tagged false +reader urword +optional false +longname x-coordinate for vertex +description is the x-coordinate for the vertex. + +block vertices +name yv +type double precision +in_record true +tagged false +reader urword +optional false +longname y-coordinate for vertex +description is the y-coordinate for the vertex. + + +# --------------------- gwf disu cell2d --------------------- + +block cell2d +name cell2d +type recarray icell2d xc yc ncvert icvert +shape (nodes) +reader urword +optional true +longname cell2d data +description + +block cell2d +name icell2d +type integer +in_record true +tagged false +reader urword +optional false +longname cell2d number +description is the cell2d number. Records in the CELL2D block must be listed in consecutive order from 1 to NODES. +numeric_index true + +block cell2d +name xc +type double precision +in_record true +tagged false +reader urword +optional false +longname x-coordinate for cell center +description is the x-coordinate for the cell center. + +block cell2d +name yc +type double precision +in_record true +tagged false +reader urword +optional false +longname y-coordinate for cell center +description is the y-coordinate for the cell center. + +block cell2d +name ncvert +type integer +in_record true +tagged false +reader urword +optional false +longname number of cell vertices +description is the number of vertices required to define the cell. There may be a different number of vertices for each cell. + +block cell2d +name icvert +type integer +shape (ncvert) +in_record true +tagged false +reader urword +optional false +longname array of vertex numbers +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. +numeric_index true diff --git a/spec/dfn/gwt-disu.dfn b/spec/dfn/gwt-disu.dfn new file mode 100644 index 00000000..49fd5aa5 --- /dev/null +++ b/spec/dfn/gwt-disu.dfn @@ -0,0 +1,286 @@ +# --------------------- gwt disu options --------------------- + +block options +name length_units +type string +reader urword +optional true +longname model length units +description is the length units used for this model. Values can be ``FEET'', ``METERS'', or ``CENTIMETERS''. If not specified, the default is ``UNKNOWN''. + +block options +name nogrb +type keyword +reader urword +optional true +longname do not write binary grid file +description keyword to deactivate writing of the binary grid file. + +block options +name xorigin +type double precision +reader urword +optional true +longname x-position origin of the model grid coordinate system +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. + +block options +name yorigin +type double precision +reader urword +optional true +longname y-position origin of the model grid coordinate system +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. + +block options +name angrot +type double precision +reader urword +optional true +longname rotation angle +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. + +block options +name vertical_offset_tolerance +type double precision +reader urword +optional true +default_value 0.0 +longname vertical length dimension for top and bottom checking +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. +mf6internal voffsettol + +block options +name export_array_ascii +type keyword +reader urword +optional true +mf6internal export_ascii +longname export array variables to layered ascii files. +description keyword that specifies input griddata arrays should be written to layered ascii output files. + +# --------------------- gwt disu dimensions --------------------- + +block dimensions +name nodes +type integer +reader urword +optional false +longname number of layers +description is the number of cells in the model grid. + +block dimensions +name nja +type integer +reader urword +optional false +longname number of columns +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. + +block dimensions +name nvert +type integer +reader urword +optional true +longname number of vertices +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. + +# --------------------- gwt disu griddata --------------------- + +block griddata +name top +type double precision +shape (nodes) +reader readarray +longname cell top elevation +description is the top elevation for each cell in the model grid. + +block griddata +name bot +type double precision +shape (nodes) +reader readarray +longname cell bottom elevation +description is the bottom elevation for each cell. + +block griddata +name area +type double precision +shape (nodes) +reader readarray +longname cell surface area +description is the cell surface area (in plan view). + +block griddata +name idomain +type integer +shape (nodes) +reader readarray +layered false +optional true +longname idomain existence array +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. + +# --------------------- gwt disu connectiondata --------------------- + +block connectiondata +name iac +type integer +shape (nodes) +reader readarray +longname number of cell connections +description is the number of connections (plus 1) for each cell. The sum of all the entries in IAC must be equal to NJA. + +block connectiondata +name ja +type integer +shape (nja) +reader readarray +longname grid connectivity +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. +numeric_index true +jagged_array iac + +block connectiondata +name ihc +type integer +shape (nja) +reader readarray +longname connection type +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 + +block connectiondata +name cl12 +type double precision +shape (nja) +reader readarray +longname connection lengths +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 + +block connectiondata +name hwva +type double precision +shape (nja) +reader readarray +longname connection lengths +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 + +block connectiondata +name angldegx +type double precision +optional true +shape (nja) +reader readarray +longname angle of face normal to connection +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 + +# --------------------- gwt disu vertices --------------------- + +block vertices +name vertices +type recarray iv xv yv +shape (nvert) +reader urword +optional true +longname vertices data +description + +block vertices +name iv +type integer +in_record true +tagged false +reader urword +optional false +longname vertex number +description is the vertex number. Records in the VERTICES block must be listed in consecutive order from 1 to NVERT. +numeric_index true + +block vertices +name xv +type double precision +in_record true +tagged false +reader urword +optional false +longname x-coordinate for vertex +description is the x-coordinate for the vertex. + +block vertices +name yv +type double precision +in_record true +tagged false +reader urword +optional false +longname y-coordinate for vertex +description is the y-coordinate for the vertex. + + +# --------------------- gwt disu cell2d --------------------- + +block cell2d +name cell2d +type recarray icell2d xc yc ncvert icvert +shape (nodes) +reader urword +optional true +longname cell2d data +description + +block cell2d +name icell2d +type integer +in_record true +tagged false +reader urword +optional false +longname cell2d number +description is the cell2d number. Records in the CELL2D block must be listed in consecutive order from 1 to NODES. +numeric_index true + +block cell2d +name xc +type double precision +in_record true +tagged false +reader urword +optional false +longname x-coordinate for cell center +description is the x-coordinate for the cell center. + +block cell2d +name yc +type double precision +in_record true +tagged false +reader urword +optional false +longname y-coordinate for cell center +description is the y-coordinate for the cell center. + +block cell2d +name ncvert +type integer +in_record true +tagged false +reader urword +optional false +longname number of cell vertices +description is the number of vertices required to define the cell. There may be a different number of vertices for each cell. + +block cell2d +name icvert +type integer +shape (ncvert) +in_record true +tagged false +reader urword +optional false +longname array of vertex numbers +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. +numeric_index true diff --git a/spec/toml/gwe-disu.toml b/spec/toml/gwe-disu.toml new file mode 100644 index 00000000..915162c0 --- /dev/null +++ b/spec/toml/gwe-disu.toml @@ -0,0 +1,517 @@ +component = "GWE" +subcomponent = "DISU" +blocknames = [ "options", "dimensions", "griddata", "connectiondata", "vertices", "cell2d",] +multipkg = false +stress = false +advanced = false + +[block.options.length_units] +type = "string" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "model length units" +description = "is the length units used for this model. Values can be ``FEET'', ``METERS'', or ``CENTIMETERS''. If not specified, the default is ``UNKNOWN''." +deprecated = "" + +[block.options.nogrb] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "do not write binary grid file" +description = "keyword to deactivate writing of the binary grid file." +deprecated = "" + +[block.options.xorigin] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "x-position origin of the model grid coordinate system" +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." +deprecated = "" + +[block.options.yorigin] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "y-position origin of the model grid coordinate system" +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." +deprecated = "" + +[block.options.angrot] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "rotation angle" +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." +deprecated = "" + +[block.options.vertical_offset_tolerance] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +default_value = "0.0" +numeric_index = false +longname = "vertical length dimension for top and bottom checking" +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." +deprecated = "" + +[block.options.export_array_ascii] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "export array variables to layered ascii files." +description = "keyword that specifies input griddata arrays should be written to layered ascii output files." +deprecated = "" + +[block.dimensions.nodes] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "number of layers" +description = "is the number of cells in the model grid." +deprecated = "" + +[block.dimensions.nja] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "number of columns" +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." +deprecated = "" + +[block.dimensions.nvert] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "number of vertices" +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." +deprecated = "" + +[block.griddata.top] +type = "double" +block_variable = false +valid = [] +shape = "(nodes)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "readarray" +optional = false +preserve_case = false +numeric_index = false +longname = "cell top elevation" +description = "is the top elevation for each cell in the model grid." +deprecated = "" + +[block.griddata.bot] +type = "double" +block_variable = false +valid = [] +shape = "(nodes)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "readarray" +optional = false +preserve_case = false +numeric_index = false +longname = "cell bottom elevation" +description = "is the bottom elevation for each cell." +deprecated = "" + +[block.griddata.area] +type = "double" +block_variable = false +valid = [] +shape = "(nodes)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "readarray" +optional = false +preserve_case = false +numeric_index = false +longname = "cell surface area" +description = "is the cell surface area (in plan view)." +deprecated = "" + +[block.griddata.idomain] +type = "integer" +block_variable = false +valid = [] +shape = "(nodes)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "readarray" +optional = true +preserve_case = false +numeric_index = false +longname = "idomain existence array" +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." +deprecated = "" + +[block.connectiondata.iac] +type = "integer" +block_variable = false +valid = [] +shape = "(nodes)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "readarray" +optional = false +preserve_case = false +numeric_index = false +longname = "number of cell connections" +description = "is the number of connections (plus 1) for each cell. The sum of all the entries in IAC must be equal to NJA." +deprecated = "" + +[block.connectiondata.ja] +type = "integer" +block_variable = false +valid = [] +shape = "(nja)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "readarray" +optional = false +preserve_case = false +numeric_index = true +longname = "grid connectivity" +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." +deprecated = "" + +[block.connectiondata.ihc] +type = "integer" +block_variable = false +valid = [] +shape = "(nja)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "readarray" +optional = false +preserve_case = false +numeric_index = false +longname = "connection type" +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." +deprecated = "" + +[block.connectiondata.cl12] +type = "double" +block_variable = false +valid = [] +shape = "(nja)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "readarray" +optional = false +preserve_case = false +numeric_index = false +longname = "connection lengths" +description = "is the array containing connection lengths between the center of cell n and the shared face with each adjacent m cell." +deprecated = "" + +[block.connectiondata.hwva] +type = "double" +block_variable = false +valid = [] +shape = "(nja)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "readarray" +optional = false +preserve_case = false +numeric_index = false +longname = "connection lengths" +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." +deprecated = "" + +[block.connectiondata.angldegx] +type = "double" +block_variable = false +valid = [] +shape = "(nja)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "readarray" +optional = true +preserve_case = false +numeric_index = false +longname = "angle of face normal to connection" +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." +deprecated = "" + +[block.vertices.iv] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = true +longname = "vertex number" +description = "is the vertex number. Records in the VERTICES block must be listed in consecutive order from 1 to NVERT." +deprecated = "" + +[block.vertices.xv] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "x-coordinate for vertex" +description = "is the x-coordinate for the vertex." +deprecated = "" + +[block.vertices.yv] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "y-coordinate for vertex" +description = "is the y-coordinate for the vertex." +deprecated = "" + +[block.vertices.vertices] +type = "recarray iv xv yv" +block_variable = false +valid = [] +shape = "(nvert)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "vertices data" +description = "" +deprecated = "" + +[block.cell2d.icell2d] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = true +longname = "cell2d number" +description = "is the cell2d number. Records in the CELL2D block must be listed in consecutive order from 1 to NODES." +deprecated = "" + +[block.cell2d.xc] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "x-coordinate for cell center" +description = "is the x-coordinate for the cell center." +deprecated = "" + +[block.cell2d.yc] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "y-coordinate for cell center" +description = "is the y-coordinate for the cell center." +deprecated = "" + +[block.cell2d.ncvert] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "number of cell vertices" +description = "is the number of vertices required to define the cell. There may be a different number of vertices for each cell." +deprecated = "" + +[block.cell2d.icvert] +type = "integer" +block_variable = false +valid = [] +shape = "(ncvert)" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = true +longname = "array of vertex numbers" +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." +deprecated = "" + +[block.cell2d.cell2d] +type = "recarray icell2d xc yc ncvert icvert" +block_variable = false +valid = [] +shape = "(nodes)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "cell2d data" +description = "" +deprecated = "" diff --git a/spec/toml/gwf-disu.toml b/spec/toml/gwf-disu.toml new file mode 100644 index 00000000..87a6692e --- /dev/null +++ b/spec/toml/gwf-disu.toml @@ -0,0 +1,517 @@ +component = "GWF" +subcomponent = "DISU" +blocknames = [ "options", "dimensions", "griddata", "connectiondata", "vertices", "cell2d",] +multipkg = false +stress = false +advanced = false + +[block.options.length_units] +type = "string" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "model length units" +description = "is the length units used for this model. Values can be ``FEET'', ``METERS'', or ``CENTIMETERS''. If not specified, the default is ``UNKNOWN''." +deprecated = "" + +[block.options.nogrb] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "do not write binary grid file" +description = "keyword to deactivate writing of the binary grid file." +deprecated = "" + +[block.options.xorigin] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "x-position origin of the model grid coordinate system" +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." +deprecated = "" + +[block.options.yorigin] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "y-position origin of the model grid coordinate system" +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." +deprecated = "" + +[block.options.angrot] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "rotation angle" +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." +deprecated = "" + +[block.options.vertical_offset_tolerance] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +default_value = "0.0" +numeric_index = false +longname = "vertical length dimension for top and bottom checking" +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." +deprecated = "" + +[block.options.export_array_ascii] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "export array variables to layered ascii files." +description = "keyword that specifies input griddata arrays should be written to layered ascii output files." +deprecated = "" + +[block.dimensions.nodes] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "number of layers" +description = "is the number of cells in the model grid." +deprecated = "" + +[block.dimensions.nja] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "number of columns" +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." +deprecated = "" + +[block.dimensions.nvert] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "number of vertices" +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." +deprecated = "" + +[block.griddata.top] +type = "double" +block_variable = false +valid = [] +shape = "(nodes)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "readarray" +optional = false +preserve_case = false +numeric_index = false +longname = "cell top elevation" +description = "is the top elevation for each cell in the model grid." +deprecated = "" + +[block.griddata.bot] +type = "double" +block_variable = false +valid = [] +shape = "(nodes)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "readarray" +optional = false +preserve_case = false +numeric_index = false +longname = "cell bottom elevation" +description = "is the bottom elevation for each cell." +deprecated = "" + +[block.griddata.area] +type = "double" +block_variable = false +valid = [] +shape = "(nodes)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "readarray" +optional = false +preserve_case = false +numeric_index = false +longname = "cell surface area" +description = "is the cell surface area (in plan view)." +deprecated = "" + +[block.griddata.idomain] +type = "integer" +block_variable = false +valid = [] +shape = "(nodes)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "readarray" +optional = true +preserve_case = false +numeric_index = false +longname = "idomain existence array" +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." +deprecated = "" + +[block.connectiondata.iac] +type = "integer" +block_variable = false +valid = [] +shape = "(nodes)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "readarray" +optional = false +preserve_case = false +numeric_index = false +longname = "number of cell connections" +description = "is the number of connections (plus 1) for each cell. The sum of all the entries in IAC must be equal to NJA." +deprecated = "" + +[block.connectiondata.ja] +type = "integer" +block_variable = false +valid = [] +shape = "(nja)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "readarray" +optional = false +preserve_case = false +numeric_index = true +longname = "grid connectivity" +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." +deprecated = "" + +[block.connectiondata.ihc] +type = "integer" +block_variable = false +valid = [] +shape = "(nja)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "readarray" +optional = false +preserve_case = false +numeric_index = false +longname = "connection type" +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." +deprecated = "" + +[block.connectiondata.cl12] +type = "double" +block_variable = false +valid = [] +shape = "(nja)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "readarray" +optional = false +preserve_case = false +numeric_index = false +longname = "connection lengths" +description = "is the array containing connection lengths between the center of cell n and the shared face with each adjacent m cell." +deprecated = "" + +[block.connectiondata.hwva] +type = "double" +block_variable = false +valid = [] +shape = "(nja)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "readarray" +optional = false +preserve_case = false +numeric_index = false +longname = "connection lengths" +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." +deprecated = "" + +[block.connectiondata.angldegx] +type = "double" +block_variable = false +valid = [] +shape = "(nja)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "readarray" +optional = true +preserve_case = false +numeric_index = false +longname = "angle of face normal to connection" +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." +deprecated = "" + +[block.vertices.iv] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = true +longname = "vertex number" +description = "is the vertex number. Records in the VERTICES block must be listed in consecutive order from 1 to NVERT." +deprecated = "" + +[block.vertices.xv] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "x-coordinate for vertex" +description = "is the x-coordinate for the vertex." +deprecated = "" + +[block.vertices.yv] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "y-coordinate for vertex" +description = "is the y-coordinate for the vertex." +deprecated = "" + +[block.vertices.vertices] +type = "recarray iv xv yv" +block_variable = false +valid = [] +shape = "(nvert)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "vertices data" +description = "" +deprecated = "" + +[block.cell2d.icell2d] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = true +longname = "cell2d number" +description = "is the cell2d number. Records in the CELL2D block must be listed in consecutive order from 1 to NODES." +deprecated = "" + +[block.cell2d.xc] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "x-coordinate for cell center" +description = "is the x-coordinate for the cell center." +deprecated = "" + +[block.cell2d.yc] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "y-coordinate for cell center" +description = "is the y-coordinate for the cell center." +deprecated = "" + +[block.cell2d.ncvert] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "number of cell vertices" +description = "is the number of vertices required to define the cell. There may be a different number of vertices for each cell." +deprecated = "" + +[block.cell2d.icvert] +type = "integer" +block_variable = false +valid = [] +shape = "(ncvert)" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = true +longname = "array of vertex numbers" +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." +deprecated = "" + +[block.cell2d.cell2d] +type = "recarray icell2d xc yc ncvert icvert" +block_variable = false +valid = [] +shape = "(nodes)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "cell2d data" +description = "" +deprecated = "" diff --git a/spec/toml/gwt-disu.toml b/spec/toml/gwt-disu.toml new file mode 100644 index 00000000..5c57a17b --- /dev/null +++ b/spec/toml/gwt-disu.toml @@ -0,0 +1,517 @@ +component = "GWT" +subcomponent = "DISU" +blocknames = [ "options", "dimensions", "griddata", "connectiondata", "vertices", "cell2d",] +multipkg = false +stress = false +advanced = false + +[block.options.length_units] +type = "string" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "model length units" +description = "is the length units used for this model. Values can be ``FEET'', ``METERS'', or ``CENTIMETERS''. If not specified, the default is ``UNKNOWN''." +deprecated = "" + +[block.options.nogrb] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "do not write binary grid file" +description = "keyword to deactivate writing of the binary grid file." +deprecated = "" + +[block.options.xorigin] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "x-position origin of the model grid coordinate system" +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." +deprecated = "" + +[block.options.yorigin] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "y-position origin of the model grid coordinate system" +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." +deprecated = "" + +[block.options.angrot] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "rotation angle" +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." +deprecated = "" + +[block.options.vertical_offset_tolerance] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +default_value = "0.0" +numeric_index = false +longname = "vertical length dimension for top and bottom checking" +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." +deprecated = "" + +[block.options.export_array_ascii] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "export array variables to layered ascii files." +description = "keyword that specifies input griddata arrays should be written to layered ascii output files." +deprecated = "" + +[block.dimensions.nodes] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "number of layers" +description = "is the number of cells in the model grid." +deprecated = "" + +[block.dimensions.nja] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "number of columns" +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." +deprecated = "" + +[block.dimensions.nvert] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "number of vertices" +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." +deprecated = "" + +[block.griddata.top] +type = "double" +block_variable = false +valid = [] +shape = "(nodes)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "readarray" +optional = false +preserve_case = false +numeric_index = false +longname = "cell top elevation" +description = "is the top elevation for each cell in the model grid." +deprecated = "" + +[block.griddata.bot] +type = "double" +block_variable = false +valid = [] +shape = "(nodes)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "readarray" +optional = false +preserve_case = false +numeric_index = false +longname = "cell bottom elevation" +description = "is the bottom elevation for each cell." +deprecated = "" + +[block.griddata.area] +type = "double" +block_variable = false +valid = [] +shape = "(nodes)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "readarray" +optional = false +preserve_case = false +numeric_index = false +longname = "cell surface area" +description = "is the cell surface area (in plan view)." +deprecated = "" + +[block.griddata.idomain] +type = "integer" +block_variable = false +valid = [] +shape = "(nodes)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "readarray" +optional = true +preserve_case = false +numeric_index = false +longname = "idomain existence array" +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." +deprecated = "" + +[block.connectiondata.iac] +type = "integer" +block_variable = false +valid = [] +shape = "(nodes)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "readarray" +optional = false +preserve_case = false +numeric_index = false +longname = "number of cell connections" +description = "is the number of connections (plus 1) for each cell. The sum of all the entries in IAC must be equal to NJA." +deprecated = "" + +[block.connectiondata.ja] +type = "integer" +block_variable = false +valid = [] +shape = "(nja)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "readarray" +optional = false +preserve_case = false +numeric_index = true +longname = "grid connectivity" +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." +deprecated = "" + +[block.connectiondata.ihc] +type = "integer" +block_variable = false +valid = [] +shape = "(nja)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "readarray" +optional = false +preserve_case = false +numeric_index = false +longname = "connection type" +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." +deprecated = "" + +[block.connectiondata.cl12] +type = "double" +block_variable = false +valid = [] +shape = "(nja)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "readarray" +optional = false +preserve_case = false +numeric_index = false +longname = "connection lengths" +description = "is the array containing connection lengths between the center of cell n and the shared face with each adjacent m cell." +deprecated = "" + +[block.connectiondata.hwva] +type = "double" +block_variable = false +valid = [] +shape = "(nja)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "readarray" +optional = false +preserve_case = false +numeric_index = false +longname = "connection lengths" +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." +deprecated = "" + +[block.connectiondata.angldegx] +type = "double" +block_variable = false +valid = [] +shape = "(nja)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "readarray" +optional = true +preserve_case = false +numeric_index = false +longname = "angle of face normal to connection" +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." +deprecated = "" + +[block.vertices.iv] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = true +longname = "vertex number" +description = "is the vertex number. Records in the VERTICES block must be listed in consecutive order from 1 to NVERT." +deprecated = "" + +[block.vertices.xv] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "x-coordinate for vertex" +description = "is the x-coordinate for the vertex." +deprecated = "" + +[block.vertices.yv] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "y-coordinate for vertex" +description = "is the y-coordinate for the vertex." +deprecated = "" + +[block.vertices.vertices] +type = "recarray iv xv yv" +block_variable = false +valid = [] +shape = "(nvert)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "vertices data" +description = "" +deprecated = "" + +[block.cell2d.icell2d] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = true +longname = "cell2d number" +description = "is the cell2d number. Records in the CELL2D block must be listed in consecutive order from 1 to NODES." +deprecated = "" + +[block.cell2d.xc] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "x-coordinate for cell center" +description = "is the x-coordinate for the cell center." +deprecated = "" + +[block.cell2d.yc] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "y-coordinate for cell center" +description = "is the y-coordinate for the cell center." +deprecated = "" + +[block.cell2d.ncvert] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "number of cell vertices" +description = "is the number of vertices required to define the cell. There may be a different number of vertices for each cell." +deprecated = "" + +[block.cell2d.icvert] +type = "integer" +block_variable = false +valid = [] +shape = "(ncvert)" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = true +longname = "array of vertex numbers" +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." +deprecated = "" + +[block.cell2d.cell2d] +type = "recarray icell2d xc yc ncvert icvert" +block_variable = false +valid = [] +shape = "(nodes)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "cell2d data" +description = "" +deprecated = "" diff --git a/test/data/test_gwf_chd01/chd01.tdis b/test/data/test_gwf_chd01/chd01.tdis new file mode 100644 index 00000000..7dba13af --- /dev/null +++ b/test/data/test_gwf_chd01/chd01.tdis @@ -0,0 +1,13 @@ +# File generated by Flopy version 3.9.0.dev0 on 10/11/2024 at 12:48:39. +BEGIN options + TIME_UNITS days +END options + +BEGIN dimensions + NPER 1 +END dimensions + +BEGIN perioddata + 5.00000000 1 1.00000000 +END perioddata + diff --git a/test/data/test_gwf_chd01/gwf_chd01.chd b/test/data/test_gwf_chd01/gwf_chd01.chd new file mode 100644 index 00000000..2d8f91a2 --- /dev/null +++ b/test/data/test_gwf_chd01/gwf_chd01.chd @@ -0,0 +1,14 @@ +# File generated by Flopy version 3.9.0.dev0 on 10/11/2024 at 12:48:39. +BEGIN options + PRINT_FLOWS +END options + +BEGIN dimensions + MAXBOUND 2 +END dimensions + +BEGIN period 1 + 1 1 1 1.00000000E+00 + 1 1 100 0.00000000E+00 +END period 1 + diff --git a/test/data/test_gwf_chd01/gwf_chd01.dis b/test/data/test_gwf_chd01/gwf_chd01.dis new file mode 100644 index 00000000..ef2fcda9 --- /dev/null +++ b/test/data/test_gwf_chd01/gwf_chd01.dis @@ -0,0 +1,24 @@ +# File generated by Flopy version 3.9.0.dev0 on 10/11/2024 at 12:48:39. +BEGIN options +END options + +BEGIN dimensions + NLAY 1 + NROW 1 + NCOL 100 +END dimensions + +BEGIN griddata + delr + CONSTANT 1.00000000 + delc + CONSTANT 1.00000000 + top + CONSTANT 1.00000000 + botm + CONSTANT 0.00000000 + idomain + INTERNAL FACTOR 1 + 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +END griddata + diff --git a/test/data/test_gwf_chd01/gwf_chd01.ic b/test/data/test_gwf_chd01/gwf_chd01.ic new file mode 100644 index 00000000..726d232f --- /dev/null +++ b/test/data/test_gwf_chd01/gwf_chd01.ic @@ -0,0 +1,9 @@ +# File generated by Flopy version 3.9.0.dev0 on 10/11/2024 at 12:48:39. +BEGIN options +END options + +BEGIN griddata + strt + CONSTANT 1.00000000 +END griddata + diff --git a/test/data/test_gwf_chd01/gwf_chd01.ims b/test/data/test_gwf_chd01/gwf_chd01.ims new file mode 100644 index 00000000..4b513245 --- /dev/null +++ b/test/data/test_gwf_chd01/gwf_chd01.ims @@ -0,0 +1,22 @@ +# File generated by Flopy version 3.9.0.dev0 on 10/11/2024 at 12:48:39. +BEGIN options + PRINT_OPTION summary +END options + +BEGIN nonlinear + OUTER_DVCLOSE 1.00000000E-06 + OUTER_MAXIMUM 100 + UNDER_RELAXATION none +END nonlinear + +BEGIN linear + INNER_MAXIMUM 300 + INNER_DVCLOSE 1.00000000E-06 + # INNER_RCLOSE causes pyphoenix test_sim fail + #inner_rclose 1.00000000E-06 + LINEAR_ACCELERATION cg + RELAXATION_FACTOR 1.00000000 + SCALING_METHOD none + REORDERING_METHOD none +END linear + diff --git a/test/data/test_gwf_chd01/gwf_chd01.nam b/test/data/test_gwf_chd01/gwf_chd01.nam new file mode 100644 index 00000000..4c57c025 --- /dev/null +++ b/test/data/test_gwf_chd01/gwf_chd01.nam @@ -0,0 +1,13 @@ +# File generated by Flopy version 3.9.0.dev0 on 10/11/2024 at 12:48:39. +BEGIN options + SAVE_FLOWS +END options + +BEGIN packages + DIS6 gwf_chd01.dis dis + IC6 gwf_chd01.ic ic + NPF6 gwf_chd01.npf npf + CHD6 gwf_chd01.chd chd-1 + #OC6 gwf_chd01.oc oc +END packages + diff --git a/test/data/test_gwf_chd01/gwf_chd01.npf b/test/data/test_gwf_chd01/gwf_chd01.npf new file mode 100644 index 00000000..c3d802a0 --- /dev/null +++ b/test/data/test_gwf_chd01/gwf_chd01.npf @@ -0,0 +1,14 @@ +# File generated by Flopy version 3.9.0.dev0 on 10/11/2024 at 12:48:39. +BEGIN options + SAVE_SPECIFIC_DISCHARGE +END options + +BEGIN griddata + icelltype + CONSTANT 0 + k + CONSTANT 1.00000000 + k33 + CONSTANT 1.00000000 +END griddata + diff --git a/test/data/test_gwf_chd01/gwf_chd01.oc b/test/data/test_gwf_chd01/gwf_chd01.oc new file mode 100644 index 00000000..907dbdaf --- /dev/null +++ b/test/data/test_gwf_chd01/gwf_chd01.oc @@ -0,0 +1,14 @@ +# File generated by Flopy version 3.9.0.dev0 on 10/11/2024 at 12:48:40. +BEGIN options + BUDGET FILEOUT gwf_chd01.cbc + HEAD FILEOUT gwf_chd01.hds + HEAD PRINT_FORMAT COLUMNS 10 WIDTH 15 DIGITS 6 GENERAL +END options + +BEGIN period 1 + SAVE HEAD LAST + SAVE BUDGET LAST + PRINT HEAD LAST + PRINT BUDGET LAST +END period 1 + diff --git a/test/data/test_gwf_chd01/mfsim.nam b/test/data/test_gwf_chd01/mfsim.nam new file mode 100644 index 00000000..55c7dc05 --- /dev/null +++ b/test/data/test_gwf_chd01/mfsim.nam @@ -0,0 +1,19 @@ +# File generated by Flopy version 3.9.0.dev0 on 10/11/2024 at 12:48:39. +BEGIN options +END options + +BEGIN timing + TDIS6 chd01.tdis +END timing + +BEGIN models + gwf6 gwf_chd01.nam gwf_chd01 +END models + +BEGIN exchanges +END exchanges + +BEGIN solutiongroup 1 + ims6 gwf_chd01.ims gwf_chd01 +END solutiongroup 1 + diff --git a/test/data/test_mf6model_0-disu01a_0/disu01a.chd b/test/data/test_mf6model_0-disu01a_0/disu01a.chd new file mode 100644 index 00000000..85f650bb --- /dev/null +++ b/test/data/test_mf6model_0-disu01a_0/disu01a.chd @@ -0,0 +1,13 @@ +# File generated by Flopy version 3.9.0.dev0 on 10/29/2024 at 08:36:29. +BEGIN options +END options + +BEGIN dimensions + MAXBOUND 2 +END dimensions + +BEGIN period 1 + 1 1.00000000E+00 + 9 0.00000000E+00 +END period 1 + diff --git a/test/data/test_mf6model_0-disu01a_0/disu01a.disu b/test/data/test_mf6model_0-disu01a_0/disu01a.disu new file mode 100644 index 00000000..f5b7e183 --- /dev/null +++ b/test/data/test_mf6model_0-disu01a_0/disu01a.disu @@ -0,0 +1,145 @@ +# File generated by Flopy version 3.9.0.dev0 on 10/29/2024 at 08:36:29. +BEGIN options + VERTICAL_OFFSET_TOLERANCE 0.00000000 +END options + +BEGIN dimensions + NODES 27 + NJA 135 +END dimensions + +BEGIN griddata + top + INTERNAL FACTOR 1.0 + 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 + bot + INTERNAL FACTOR 1.0 + -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -30.00000000 -30.00000000 -30.00000000 -30.00000000 -30.00000000 -30.00000000 -30.00000000 -30.00000000 -30.00000000 + area + INTERNAL FACTOR 1.0 + 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 +END griddata + +BEGIN connectiondata + iac + INTERNAL FACTOR 1 + 4 5 4 5 6 5 4 5 4 5 6 5 6 7 6 5 6 5 4 5 + 4 5 6 5 4 5 4 + ja + INTERNAL FACTOR 1 + 1 2 4 10 + 2 1 3 5 11 + 3 2 6 12 + 4 1 5 7 13 + 5 2 4 6 8 14 + 6 3 5 9 15 + 7 4 8 16 + 8 5 7 9 17 + 9 6 8 18 + 10 1 11 13 19 + 11 2 10 12 14 20 + 12 3 11 15 21 + 13 4 10 14 16 22 + 14 5 11 13 15 17 23 + 15 6 12 14 18 24 + 16 7 13 17 25 + 17 8 14 16 18 26 + 18 9 15 17 27 + 19 10 20 22 + 20 11 19 21 23 + 21 12 20 24 + 22 13 19 23 25 + 23 14 20 22 24 26 + 24 15 21 23 27 + 25 16 22 26 + 26 17 23 25 27 + 27 18 24 26 + ihc + INTERNAL FACTOR 1 + 1 1 1 0 + 1 1 1 1 0 + 1 1 1 0 + 1 1 1 1 0 + 1 1 1 1 1 0 + 1 1 1 1 0 + 1 1 1 0 + 1 1 1 1 0 + 1 1 1 0 + 2 0 1 1 0 + 2 0 1 1 1 0 + 2 0 1 1 0 + 2 0 1 1 1 0 + 2 0 1 1 1 1 0 + 2 0 1 1 1 0 + 2 0 1 1 0 + 2 0 1 1 1 0 + 2 0 1 1 0 + 3 0 1 1 + 3 0 1 1 1 + 3 0 1 1 + 3 0 1 1 1 + 3 0 1 1 1 1 + 3 0 1 1 1 + 3 0 1 1 + 3 0 1 1 1 + 3 0 1 1 + cl12 + INTERNAL FACTOR 1.0 + 1.00000000 5.00000000 5.00000000 5.00000000 + 2.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 3.00000000 5.00000000 5.00000000 5.00000000 + 4.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 5.00000000 5.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 6.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 7.00000000 5.00000000 5.00000000 5.00000000 + 8.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 9.00000000 5.00000000 5.00000000 5.00000000 + 10.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 11.00000000 5.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 12.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 13.00000000 5.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 14.00000000 5.00000000 5.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 15.00000000 5.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 16.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 17.00000000 5.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 18.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 19.00000000 5.00000000 5.00000000 5.00000000 + 20.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 21.00000000 5.00000000 5.00000000 5.00000000 + 22.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 23.00000000 5.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 24.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 25.00000000 5.00000000 5.00000000 5.00000000 + 26.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 27.00000000 5.00000000 5.00000000 5.00000000 + hwva + INTERNAL FACTOR 1.0 + 1.00000000 10.00000000 10.00000000 100.00000000 + 2.00000000 10.00000000 10.00000000 10.00000000 100.00000000 + 3.00000000 10.00000000 10.00000000 100.00000000 + 4.00000000 10.00000000 10.00000000 10.00000000 100.00000000 + 5.00000000 10.00000000 10.00000000 10.00000000 10.00000000 100.00000000 + 6.00000000 10.00000000 10.00000000 10.00000000 100.00000000 + 7.00000000 10.00000000 10.00000000 100.00000000 + 8.00000000 10.00000000 10.00000000 10.00000000 100.00000000 + 9.00000000 10.00000000 10.00000000 100.00000000 + 10.00000000 100.00000000 10.00000000 10.00000000 100.00000000 + 11.00000000 100.00000000 10.00000000 10.00000000 10.00000000 100.00000000 + 12.00000000 100.00000000 10.00000000 10.00000000 100.00000000 + 13.00000000 100.00000000 10.00000000 10.00000000 10.00000000 100.00000000 + 14.00000000 100.00000000 10.00000000 10.00000000 10.00000000 10.00000000 100.00000000 + 15.00000000 100.00000000 10.00000000 10.00000000 10.00000000 100.00000000 + 16.00000000 100.00000000 10.00000000 10.00000000 100.00000000 + 17.00000000 100.00000000 10.00000000 10.00000000 10.00000000 100.00000000 + 18.00000000 100.00000000 10.00000000 10.00000000 100.00000000 + 19.00000000 100.00000000 10.00000000 10.00000000 + 20.00000000 100.00000000 10.00000000 10.00000000 10.00000000 + 21.00000000 100.00000000 10.00000000 10.00000000 + 22.00000000 100.00000000 10.00000000 10.00000000 10.00000000 + 23.00000000 100.00000000 10.00000000 10.00000000 10.00000000 10.00000000 + 24.00000000 100.00000000 10.00000000 10.00000000 10.00000000 + 25.00000000 100.00000000 10.00000000 10.00000000 + 26.00000000 100.00000000 10.00000000 10.00000000 10.00000000 + 27.00000000 100.00000000 10.00000000 10.00000000 +END connectiondata + diff --git a/test/data/test_mf6model_0-disu01a_0/disu01a.disu.grb b/test/data/test_mf6model_0-disu01a_0/disu01a.disu.grb new file mode 100644 index 0000000000000000000000000000000000000000..5d4a69240e288e6aef8c58aebd42399a1e8628af GIT binary patch literal 2424 zcmchWOHUM05QWDFDpwR=_<+RR2#E_5)9niq5|e@MjF$|zNl!zV4GT9e+_-Y%!i|ak zEPtBk(_4WV7BtQPs z{`YCG|BsjSfaio0x5a(&L_8JG#B=dNWa6FJ6kYK_L@^LUaU?#9PvW!qBEE`m;=A}E zehK_8i>m@pa_(Ib%yBd2+`lFk1X`Q(y7F5Bt(}AJhG2ejJ8NF~qM(N}(A-Ipe(s~W zo1&d_PrsQBPv*go=R%GrHRi(aLCW!@j^C1?$96=A??XXud!j*)|D%-K&ghuqv7p!X zM$7vl+RoI`E~jXFqv8L`?99xp%s^yT?lUXiM0TQvCpz1kI-W$^nL0W=iMBTyJki_E QXu$TQh6Zd$>a)E50LJR^zW@LL literal 0 HcmV?d00001 diff --git a/test/data/test_mf6model_0-disu01a_0/disu01a.ic b/test/data/test_mf6model_0-disu01a_0/disu01a.ic new file mode 100644 index 00000000..610d21b8 --- /dev/null +++ b/test/data/test_mf6model_0-disu01a_0/disu01a.ic @@ -0,0 +1,9 @@ +# File generated by Flopy version 3.9.0.dev0 on 10/29/2024 at 08:36:29. +BEGIN options +END options + +BEGIN griddata + strt + CONSTANT 0.00000000 +END griddata + diff --git a/test/data/test_mf6model_0-disu01a_0/disu01a.ims b/test/data/test_mf6model_0-disu01a_0/disu01a.ims new file mode 100644 index 00000000..4360a8f7 --- /dev/null +++ b/test/data/test_mf6model_0-disu01a_0/disu01a.ims @@ -0,0 +1,5 @@ +# File generated by Flopy version 3.9.0.dev0 on 10/29/2024 at 08:36:29. +BEGIN options + PRINT_OPTION summary +END options + diff --git a/test/data/test_mf6model_0-disu01a_0/disu01a.lst b/test/data/test_mf6model_0-disu01a_0/disu01a.lst new file mode 100644 index 00000000..d854659d --- /dev/null +++ b/test/data/test_mf6model_0-disu01a_0/disu01a.lst @@ -0,0 +1,224 @@ + MODFLOW 6 EXTENDED + U.S. GEOLOGICAL SURVEY MODULAR HYDROLOGIC MODEL + GROUNDWATER FLOW MODEL (GWF) + VERSION 6.6.0.dev0 (preliminary) 05/23/2024 + ***DEVELOP MODE*** + + MODFLOW 6 compiled Oct 16 2024 07:42:59 with GCC version 11.4.0 + +This software is preliminary or provisional and is subject to +revision. It is being provided to meet the need for timely best +science. The software has not received final approval by the U.S. +Geological Survey (USGS). No warranty, expressed or implied, is made +by the USGS or the U.S. Government as to the functionality of the +software and related material nor shall the fact of release +constitute any such warranty. The software is provided on the +condition that neither the USGS nor the U.S. Government shall be held +liable for any damages resulting from the authorized or unauthorized +use of the software. + + +As a work of the United States Government, this USGS product is +in the public domain within the United States. You can copy, +modify, distribute, and perform the work, even for commercial +purposes, all without asking permission. Additionally, USGS +waives copyright and related rights in the work worldwide +through CC0 1.0 Universal Public Domain Dedication +(https://creativecommons.org/publicdomain/zero/1.0/). + +The following GNU Lesser General Public License (LGPL) libraries +are used in this USGS product: + + SPARSKIT version 2.0 + ilut, luson, and qsplit + (https://www-users.cse.umn.edu/~saad/software/SPARSKIT/) + + RCM - Reverse Cuthill McKee Ordering + (https://people.math.sc.edu/Burkardt/f_src/rcm/rcm.html) + + BLAS - Basic Linear Algebra Subprograms Level 1 + (https://people.math.sc.edu/Burkardt/f_src/blas1_d/blas1_d.html) + + SPARSEKIT - Sparse Matrix Utility Package + amux, dperm, dvperm, rperm, and cperm + (https://people.sc.fsu.edu/~jburkardt/f77_src/sparsekit/sparsekit.html) + +The following BSD-3 License libraries are used in this USGS product: + + Modern Fortran DAG Library + Copyright (c) 2018, Jacob Williams + All rights reserved. + (https://github.com/jacobwilliams/daglib) + +The following library is used in this USGS product: + + NetCDF, network Common Data Form software library + Copyright (c) 1993-2014 University Corporation for Atmospheric + Research/Unidata. Redistribution and use in source and binary + forms, with or without modification, are permitted provided that + the conditions in the NetCDF copyright are met + (https://www.unidata.ucar.edu/software/netcdf/copyright.html) + +The following 2-clause BSD License library is used in this +USGS product: + + PETSc, the Portable, Extensible Toolkit for Scientific + Computation Library + Copyright (c) 1991-2021, UChicago Argonne, LLC + and the PETSc Development Team All rights reserved. + (https://petsc.org/release/) + +MODFLOW 6 compiler options: -fdiagnostics-color=always -cpp -I +src/libmf6core.a.p -I src -I ../src -I src/libmf6_external.a.p -I +/home/mjreno/.clone/external/petsc/arch-linux-c-debug/include -I +/home/mjreno/.clone/external/petsc/include -I +/home/mjreno/.clone/external/petsc/arch-linux-c-debug/lib -I /usr/include -I +/usr/include/hdf5/serial -imultiarch x86_64-linux-gnu -D _FILE_OFFSET_BITS=64 +-D __linux__ -D __WITH_PETSC__ -D __WITH_MPI__ -D __WITH_NETCDF__ +-mtune=generic -march=x86-64 -O2 -Wall -Wpedantic -Wcharacter-truncation +-Wno-unused-dummy-argument -Wno-intrinsic-shadow -Wno-maybe-uninitialized +-Wno-uninitialized -std=f2008 -fall-intrinsics -ffpe-summary=overflow +-ffpe-trap=overflow,zero -fPIC -J src/libmf6core.a.p +-fpre-include=/usr/include/finclude/math-vector-fortran.h + +System command used to initiate simulation: +/home/mjreno/.clone/usgs/modflow6/bin/mf6 mfsim.nam + +MODFLOW was compiled using uniform precision. + +Real Variables + KIND: 8 + TINY (smallest non-zero value): 2.225074-308 + HUGE (largest value): 1.797693+308 + PRECISION: 15 + SIZE IN BITS: 64 + +Integer Variables + KIND: 4 + HUGE (largest value): 2147483647 + SIZE IN BITS: 32 + +Long Integer Variables + KIND: 8 + HUGE (largest value): 9223372036854775807 + SIZE IN BITS: 64 + +Logical Variables + KIND: 4 + SIZE IN BITS: 32 + + NAMEFILE OPTIONS: + END NAMEFILE OPTIONS: + + DISU -- UNSTRUCTURED GRID DISCRETIZATION PACKAGE, VERSION 2 : 3/27/2014 - INPUT READ FROM MEMPATH: __INPUT__/DISU01A/DISU + + + Setting Discretization Options + VERTICAL_OFFSET_TOLERANCE = 0.0000000000000000 + End Setting Discretization Options + + Setting Discretization Dimensions + NODES = 27 + NJA = 135 + End Setting Discretization Dimensions + + Setting Discretization Griddata + TOP set from input file + BOT set from input file + AREA set from input file + End Setting Discretization Griddata + + Setting Discretization Connectivity + IAC set from input file + JA set from input file + IHC set from input file + CL12 set from input file + HWVA set from input file + End Setting Discretization Connectivity + + + NPF -- NODE PROPERTY FLOW PACKAGE, VERSION 1, 3/30/2015 INPUT READ FROM MEMPATH: __INPUT__/DISU01A/NPF + + + IC -- Initial Conditions Package, Version 8, 3/28/2015 input read from mempath: __INPUT__/DISU01A/IC + + + Setting NPF Options + End Setting NPF Options + + Setting NPF Griddata + ICELLTYPE set from input file + K set from input file + K33 not provided. Setting K33 = K. + K22 not provided. Setting K22 = K. + End Setting NPF Griddata + + + CHD -- CHD PACKAGE, VERSION 8, 2/22/2014 INPUT READ FROM MEMPATH: __INPUT__/DISU01A/CHD_0 + + PROCESSING CHD BASE OPTIONS + END OF CHD BASE OPTIONS + + PROCESSING CHD BASE DIMENSIONS + MAXBOUND = 2 + END OF CHD BASE DIMENSIONS + STRT set from input file + BINARY GRID INFORMATION WILL BE WRITTEN TO: + UNIT NUMBER: 1010 + FILE NAME: disu01a.disu.grb + + OPENED disu01a.disu.grb + FILE TYPE:DATA(BINARY) UNIT 1010 STATUS:REPLACE + FORMAT:UNFORMATTED ACCESS:STREAM + ACTION:READWRITE + + THE LAST TIME STEP WILL BE PRINTED + THE LAST TIME STEP WILL BE PRINTED + +start timestep kper="1" kstp="1" mode="normal" + +1 + HEAD IN LAYER 1 AT END OF TIME STEP 1 IN STRESS PERIOD 1 + --------------------------------------------------------------------------- + + 1 2 3 4 5 6 7 8 9 10 + 11 12 13 14 15 16 17 18 19 20 + 21 22 23 24 25 26 27 + .................................................................................................................................................................................................................................................................................................................................... + 1 1.000 0.6434 0.5000 0.6434 0.5000 0.3566 0.5000 0.3566 0.000 0.6838 + 0.5735 0.5000 0.5735 0.5000 0.4265 0.5000 0.4265 0.3162 0.5882 0.5404 + 0.5000 0.5404 0.5000 0.4596 0.5000 0.4596 0.4118 + + + VOLUME BUDGET FOR ENTIRE MODEL AT END OF TIME STEP 1, STRESS PERIOD 1 + --------------------------------------------------------------------------------------------------- + + CUMULATIVE VOLUME L**3 RATES FOR THIS TIME STEP L**3/T PACKAGE NAME + ------------------ ------------------------ ---------------- + + IN: IN: + --- --- + CHD = 10.2941 CHD = 10.2941 CHD_0 + + TOTAL IN = 10.2941 TOTAL IN = 10.2941 + + OUT: OUT: + ---- ---- + CHD = 10.2941 CHD = 10.2941 CHD_0 + + TOTAL OUT = 10.2941 TOTAL OUT = 10.2941 + + IN - OUT = 6.3459E-06 IN - OUT = 6.3459E-06 + + PERCENT DISCREPANCY = 0.00 PERCENT DISCREPANCY = 0.00 + + + + + TIME SUMMARY AT END OF TIME STEP 1 IN STRESS PERIOD 1 + TIME STEP LENGTH = 1.00000 + STRESS PERIOD TIME = 1.00000 + TOTAL SIMULATION TIME = 1.00000 + +end timestep + diff --git a/test/data/test_mf6model_0-disu01a_0/disu01a.nam b/test/data/test_mf6model_0-disu01a_0/disu01a.nam new file mode 100644 index 00000000..28f0b5a1 --- /dev/null +++ b/test/data/test_mf6model_0-disu01a_0/disu01a.nam @@ -0,0 +1,11 @@ +# File generated by Flopy version 3.9.0.dev0 on 10/29/2024 at 08:36:29. +BEGIN options +END options + +BEGIN packages + DISU6 disu01a.disu disu + IC6 disu01a.ic ic + NPF6 disu01a.npf npf + CHD6 disu01a.chd chd_0 +END packages + diff --git a/test/data/test_mf6model_0-disu01a_0/disu01a.npf b/test/data/test_mf6model_0-disu01a_0/disu01a.npf new file mode 100644 index 00000000..9f250a7f --- /dev/null +++ b/test/data/test_mf6model_0-disu01a_0/disu01a.npf @@ -0,0 +1,11 @@ +# File generated by Flopy version 3.9.0.dev0 on 10/29/2024 at 08:36:29. +BEGIN options +END options + +BEGIN griddata + icelltype + CONSTANT 0 + k + CONSTANT 1.00000000 +END griddata + diff --git a/test/data/test_mf6model_0-disu01a_0/disu01a.orig.disu b/test/data/test_mf6model_0-disu01a_0/disu01a.orig.disu new file mode 100644 index 00000000..979cee0c --- /dev/null +++ b/test/data/test_mf6model_0-disu01a_0/disu01a.orig.disu @@ -0,0 +1,148 @@ +# File generated by Flopy version 3.9.0.dev0 on 10/29/2024 at 08:36:29. +BEGIN options + VERTICAL_OFFSET_TOLERANCE 0.00000000 +END options + +BEGIN dimensions + NODES 27 + NJA 135 +END dimensions + +BEGIN griddata + top + INTERNAL FACTOR 1.0 + 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -20.00000000 -20.00000000 + -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 + bot + INTERNAL FACTOR 1.0 + -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -30.00000000 -30.00000000 + -30.00000000 -30.00000000 -30.00000000 -30.00000000 -30.00000000 -30.00000000 -30.00000000 + area + INTERNAL FACTOR 1.0 + 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 + 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 +END griddata + +BEGIN connectiondata + iac + INTERNAL FACTOR 1 + 4 5 4 5 6 5 4 5 4 5 6 5 6 7 6 5 6 5 4 5 + 4 5 6 5 4 5 4 + ja + INTERNAL FACTOR 1 + 1 2 4 10 + 2 1 3 5 11 + 3 2 6 12 + 4 1 5 7 13 + 5 2 4 6 8 14 + 6 3 5 9 15 + 7 4 8 16 + 8 5 7 9 17 + 9 6 8 18 + 10 1 11 13 19 + 11 2 10 12 14 20 + 12 3 11 15 21 + 13 4 10 14 16 22 + 14 5 11 13 15 17 23 + 15 6 12 14 18 24 + 16 7 13 17 25 + 17 8 14 16 18 26 + 18 9 15 17 27 + 19 10 20 22 + 20 11 19 21 23 + 21 12 20 24 + 22 13 19 23 25 + 23 14 20 22 24 26 + 24 15 21 23 27 + 25 16 22 26 + 26 17 23 25 27 + 27 18 24 26 + ihc + INTERNAL FACTOR 1 + 1 1 1 0 + 1 1 1 1 0 + 1 1 1 0 + 1 1 1 1 0 + 1 1 1 1 1 0 + 1 1 1 1 0 + 1 1 1 0 + 1 1 1 1 0 + 1 1 1 0 + 2 0 1 1 0 + 2 0 1 1 1 0 + 2 0 1 1 0 + 2 0 1 1 1 0 + 2 0 1 1 1 1 0 + 2 0 1 1 1 0 + 2 0 1 1 0 + 2 0 1 1 1 0 + 2 0 1 1 0 + 3 0 1 1 + 3 0 1 1 1 + 3 0 1 1 + 3 0 1 1 1 + 3 0 1 1 1 1 + 3 0 1 1 1 + 3 0 1 1 + 3 0 1 1 1 + 3 0 1 1 + cl12 + INTERNAL FACTOR 1.0 + 1.00000000 5.00000000 5.00000000 5.00000000 + 2.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 3.00000000 5.00000000 5.00000000 5.00000000 + 4.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 5.00000000 5.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 6.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 7.00000000 5.00000000 5.00000000 5.00000000 + 8.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 9.00000000 5.00000000 5.00000000 5.00000000 + 10.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 11.00000000 5.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 12.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 13.00000000 5.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 14.00000000 5.00000000 5.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 15.00000000 5.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 16.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 17.00000000 5.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 18.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 19.00000000 5.00000000 5.00000000 5.00000000 + 20.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 21.00000000 5.00000000 5.00000000 5.00000000 + 22.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 23.00000000 5.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 24.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 25.00000000 5.00000000 5.00000000 5.00000000 + 26.00000000 5.00000000 5.00000000 5.00000000 5.00000000 + 27.00000000 5.00000000 5.00000000 5.00000000 + hwva + INTERNAL FACTOR 1.0 + 1.00000000 10.00000000 10.00000000 100.00000000 + 2.00000000 10.00000000 10.00000000 10.00000000 100.00000000 + 3.00000000 10.00000000 10.00000000 100.00000000 + 4.00000000 10.00000000 10.00000000 10.00000000 100.00000000 + 5.00000000 10.00000000 10.00000000 10.00000000 10.00000000 100.00000000 + 6.00000000 10.00000000 10.00000000 10.00000000 100.00000000 + 7.00000000 10.00000000 10.00000000 100.00000000 + 8.00000000 10.00000000 10.00000000 10.00000000 100.00000000 + 9.00000000 10.00000000 10.00000000 100.00000000 + 10.00000000 100.00000000 10.00000000 10.00000000 100.00000000 + 11.00000000 100.00000000 10.00000000 10.00000000 10.00000000 100.00000000 + 12.00000000 100.00000000 10.00000000 10.00000000 100.00000000 + 13.00000000 100.00000000 10.00000000 10.00000000 10.00000000 100.00000000 + 14.00000000 100.00000000 10.00000000 10.00000000 10.00000000 10.00000000 100.00000000 + 15.00000000 100.00000000 10.00000000 10.00000000 10.00000000 100.00000000 + 16.00000000 100.00000000 10.00000000 10.00000000 100.00000000 + 17.00000000 100.00000000 10.00000000 10.00000000 10.00000000 100.00000000 + 18.00000000 100.00000000 10.00000000 10.00000000 100.00000000 + 19.00000000 100.00000000 10.00000000 10.00000000 + 20.00000000 100.00000000 10.00000000 10.00000000 10.00000000 + 21.00000000 100.00000000 10.00000000 10.00000000 + 22.00000000 100.00000000 10.00000000 10.00000000 10.00000000 + 23.00000000 100.00000000 10.00000000 10.00000000 10.00000000 10.00000000 + 24.00000000 100.00000000 10.00000000 10.00000000 10.00000000 + 25.00000000 100.00000000 10.00000000 10.00000000 + 26.00000000 100.00000000 10.00000000 10.00000000 10.00000000 + 27.00000000 100.00000000 10.00000000 10.00000000 +END connectiondata + diff --git a/test/data/test_mf6model_0-disu01a_0/disu01a.tdis b/test/data/test_mf6model_0-disu01a_0/disu01a.tdis new file mode 100644 index 00000000..140ceab3 --- /dev/null +++ b/test/data/test_mf6model_0-disu01a_0/disu01a.tdis @@ -0,0 +1,12 @@ +# File generated by Flopy version 3.9.0.dev0 on 10/29/2024 at 08:36:29. +BEGIN options +END options + +BEGIN dimensions + NPER 1 +END dimensions + +BEGIN perioddata + 1.00000000 1 1.00000000 +END perioddata + diff --git a/test/data/test_mf6model_0-disu01a_0/mfsim.lst b/test/data/test_mf6model_0-disu01a_0/mfsim.lst new file mode 100644 index 00000000..0d483274 --- /dev/null +++ b/test/data/test_mf6model_0-disu01a_0/mfsim.lst @@ -0,0 +1,286 @@ + MODFLOW 6 EXTENDED + U.S. GEOLOGICAL SURVEY MODULAR HYDROLOGIC MODEL + VERSION 6.6.0.dev0 (preliminary) 05/23/2024 + ***DEVELOP MODE*** + + MODFLOW 6 compiled Oct 16 2024 07:42:59 with GCC version 11.4.0 + +This software is preliminary or provisional and is subject to +revision. It is being provided to meet the need for timely best +science. The software has not received final approval by the U.S. +Geological Survey (USGS). No warranty, expressed or implied, is made +by the USGS or the U.S. Government as to the functionality of the +software and related material nor shall the fact of release +constitute any such warranty. The software is provided on the +condition that neither the USGS nor the U.S. Government shall be held +liable for any damages resulting from the authorized or unauthorized +use of the software. + + +As a work of the United States Government, this USGS product is +in the public domain within the United States. You can copy, +modify, distribute, and perform the work, even for commercial +purposes, all without asking permission. Additionally, USGS +waives copyright and related rights in the work worldwide +through CC0 1.0 Universal Public Domain Dedication +(https://creativecommons.org/publicdomain/zero/1.0/). + +The following GNU Lesser General Public License (LGPL) libraries +are used in this USGS product: + + SPARSKIT version 2.0 + ilut, luson, and qsplit + (https://www-users.cse.umn.edu/~saad/software/SPARSKIT/) + + RCM - Reverse Cuthill McKee Ordering + (https://people.math.sc.edu/Burkardt/f_src/rcm/rcm.html) + + BLAS - Basic Linear Algebra Subprograms Level 1 + (https://people.math.sc.edu/Burkardt/f_src/blas1_d/blas1_d.html) + + SPARSEKIT - Sparse Matrix Utility Package + amux, dperm, dvperm, rperm, and cperm + (https://people.sc.fsu.edu/~jburkardt/f77_src/sparsekit/sparsekit.html) + +The following BSD-3 License libraries are used in this USGS product: + + Modern Fortran DAG Library + Copyright (c) 2018, Jacob Williams + All rights reserved. + (https://github.com/jacobwilliams/daglib) + +The following library is used in this USGS product: + + NetCDF, network Common Data Form software library + Copyright (c) 1993-2014 University Corporation for Atmospheric + Research/Unidata. Redistribution and use in source and binary + forms, with or without modification, are permitted provided that + the conditions in the NetCDF copyright are met + (https://www.unidata.ucar.edu/software/netcdf/copyright.html) + +The following 2-clause BSD License library is used in this +USGS product: + + PETSc, the Portable, Extensible Toolkit for Scientific + Computation Library + Copyright (c) 1991-2021, UChicago Argonne, LLC + and the PETSc Development Team All rights reserved. + (https://petsc.org/release/) + +MODFLOW 6 compiler options: -fdiagnostics-color=always -cpp -I +src/libmf6core.a.p -I src -I ../src -I src/libmf6_external.a.p -I +/home/mjreno/.clone/external/petsc/arch-linux-c-debug/include -I +/home/mjreno/.clone/external/petsc/include -I +/home/mjreno/.clone/external/petsc/arch-linux-c-debug/lib -I /usr/include -I +/usr/include/hdf5/serial -imultiarch x86_64-linux-gnu -D _FILE_OFFSET_BITS=64 +-D __linux__ -D __WITH_PETSC__ -D __WITH_MPI__ -D __WITH_NETCDF__ +-mtune=generic -march=x86-64 -O2 -Wall -Wpedantic -Wcharacter-truncation +-Wno-unused-dummy-argument -Wno-intrinsic-shadow -Wno-maybe-uninitialized +-Wno-uninitialized -std=f2008 -fall-intrinsics -ffpe-summary=overflow +-ffpe-trap=overflow,zero -fPIC -J src/libmf6core.a.p +-fpre-include=/usr/include/finclude/math-vector-fortran.h + +System command used to initiate simulation: +/home/mjreno/.clone/usgs/modflow6/bin/mf6 mfsim.nam + +MODFLOW was compiled using uniform precision. + +Real Variables + KIND: 8 + TINY (smallest non-zero value): 2.225074-308 + HUGE (largest value): 1.797693+308 + PRECISION: 15 + SIZE IN BITS: 64 + +Integer Variables + KIND: 4 + HUGE (largest value): 2147483647 + SIZE IN BITS: 32 + +Long Integer Variables + KIND: 8 + HUGE (largest value): 9223372036854775807 + SIZE IN BITS: 64 + +Logical Variables + KIND: 4 + SIZE IN BITS: 32 + + + OPENED mfsim.nam + FILE TYPE:NAM6 UNIT 1001 STATUS:OLD + FORMAT:FORMATTED ACCESS:SEQUENTIAL + ACTION:READ + + # File generated by Flopy version 3.9.0.dev0 on 10/29/2024 at 08:36:29. + + OPENED disu01a.tdis + FILE TYPE:TDIS6 UNIT 1002 STATUS:OLD + FORMAT:FORMATTED ACCESS:SEQUENTIAL + ACTION:READ + + # File generated by Flopy version 3.9.0.dev0 on 10/29/2024 at 08:36:29. + + OPENED disu01a.nam + FILE TYPE:GWF6 UNIT 1003 STATUS:OLD + FORMAT:FORMATTED ACCESS:SEQUENTIAL + ACTION:READ + + # File generated by Flopy version 3.9.0.dev0 on 10/29/2024 at 08:36:29. + + OPENED disu01a.disu + FILE TYPE:DISU6 UNIT 1004 STATUS:OLD + FORMAT:FORMATTED ACCESS:SEQUENTIAL + ACTION:READ + + # File generated by Flopy version 3.9.0.dev0 on 10/29/2024 at 08:36:29. + + OPENED disu01a.npf + FILE TYPE:NPF6 UNIT 1005 STATUS:OLD + FORMAT:FORMATTED ACCESS:SEQUENTIAL + ACTION:READ + + # File generated by Flopy version 3.9.0.dev0 on 10/29/2024 at 08:36:29. + + OPENED disu01a.ic + FILE TYPE:IC6 UNIT 1006 STATUS:OLD + FORMAT:FORMATTED ACCESS:SEQUENTIAL + ACTION:READ + + # File generated by Flopy version 3.9.0.dev0 on 10/29/2024 at 08:36:29. + + OPENED disu01a.chd + FILE TYPE:CHD6 UNIT 1007 STATUS:OLD + FORMAT:FORMATTED ACCESS:SEQUENTIAL + ACTION:READ + + # File generated by Flopy version 3.9.0.dev0 on 10/29/2024 at 08:36:29. + + READING SIMULATION OPTIONS + MAXIMUM NUMBER OF ERRORS THAT WILL BE STORED IS 1000 + END OF SIMULATION OPTIONS + + READING SIMULATION TIMING + + TDIS -- TEMPORAL DISCRETIZATION PACKAGE, + VERSION 1 : 11/13/2014 - INPUT READ FROM MEMPATH: __INPUT__/SIM/TDIS + PROCESSING TDIS OPTIONS + SIMULATION TIME UNIT IS UNDEFINED + END OF TDIS OPTIONS + PROCESSING TDIS DIMENSIONS + 1 STRESS PERIOD(S) IN SIMULATION + END OF TDIS DIMENSIONS + PROCESSING TDIS PERIODDATA + + + STRESS PERIOD LENGTH TIME STEPS MULTIPLIER FOR DELT + ---------------------------------------------------------------------------- + 1 1.000000 1 1.000 + END OF TDIS PERIODDATA + END OF SIMULATION TIMING + + READING SIMULATION MODELS + GWF6 model 1 will be created + END OF SIMULATION MODELS + + READING SIMULATION EXCHANGES + END OF SIMULATION EXCHANGES + + READING SOLUTIONGROUP + + Creating solution: SLN_1 + + OPENED disu01a.ims + FILE TYPE:IMS UNIT 1009 STATUS:OLD + FORMAT:FORMATTED ACCESS:SEQUENTIAL + ACTION:READ + + END OF SOLUTIONGROUP + +PROCESSING MODEL CONNECTIONS + + IMS -- ITERATIVE MODEL SOLUTION PACKAGE, VERSION 6, 4/28/2017 + INPUT READ FROM UNIT 1009 + # File generated by Flopy version 3.9.0.dev0 on 10/29/2024 at 08:36:29. + + PROCESSING IMS OPTIONS + END OF IMS OPTIONS + ***UNDER-RELAXATION WILL NOT BE USED*** + + ***IMS LINEAR SOLVER WILL BE USED*** + + IMSLINEAR -- UNSTRUCTURED LINEAR SOLUTION PACKAGE, VERSION 8, 04/28/2017 + A symmetric matrix will be solved + + OUTER ITERATION CONVERGENCE CRITERION (DVCLOSE) = 0.100000E-02 + MAXIMUM NUMBER OF OUTER ITERATIONS (MXITER) = 25 + SOLVER PRINTOUT INDEX (IPRIMS) = 1 + NONLINEAR ITERATION METHOD (NONLINMETH) = 0 + LINEAR SOLUTION METHOD (LINMETH) = 1 + + SOLUTION BY THE CONJUGATE-GRADIENT METHOD + ------------------------------------------------------------------ + MAXIMUM OF 25 CALLS OF SOLUTION ROUTINE + MAXIMUM OF 50 INTERNAL ITERATIONS PER CALL TO SOLUTION ROUTINE + LINEAR ACCELERATION METHOD = CG + MATRIX PRECONDITIONING TYPE = INCOMPLETE LU + MATRIX SCALING APPROACH = NO SCALING + MATRIX REORDERING APPROACH = ORIGINAL ORDERING + NUMBER OF ORTHOGONALIZATIONS = 0 + HEAD CHANGE CRITERION FOR CLOSURE = 0.10000E-02 + RESIDUAL CHANGE CRITERION FOR CLOSURE = 0.10000E+00 + RESIDUAL CONVERGENCE OPTION = 0 + RESIDUAL CONVERGENCE NORM = INFINITY NORM + RELAXATION FACTOR = 0.00000E+00 + + + + + Solving: Stress period: 1 Time step: 1 + +1 + STRESS PERIOD NO. 1, LENGTH = 1.000000 + ------------------------------------------ + NUMBER OF TIME STEPS = 1 + MULTIPLIER FOR DELT = 1.000 + INITIAL TIME STEP SIZE = 1.000000 + + SLN_1 OUTER ITERATION SUMMARY + ---------------------------------------------------------------------------------------------------------- + OUTER INNER STEP MAXIMUM CHANGE MODEL-(CELLID) OR + OUTER ITERATION STEP ITERATION ITERATION MAXIMUM CHANGE SUCCESS MODEL-PACKAGE-(NUMBER) + ---------------------------------------------------------------------------------------------------------- + Model 1 5 0.68382334 1_GWF-(10) + Model 2 1 -6.85437959E-06 * 1_GWF-(23) + ---------------------------------------------------------------------------------------------------------- + + + 2 CALLS TO NUMERICAL SOLUTION IN TIME STEP 1 STRESS PERIOD 1 + 6 TOTAL ITERATIONS + + + Solution SLN_1 summary + ---------------------------------------------------------------------- + Total formulate time: 0.28000000000000247E-4 seconds + Total solution time: 0.19999999999999185E-4 seconds + + + MEMORY MANAGER TOTAL STORAGE BY DATA TYPE, IN KILOBYTES + ------------------------------- + ALLOCATED + DATA TYPE MEMORY + ------------------------------- + Character 6.5490000 + Logical 4.40000000E-02 + Integer 9.1160000 + Real 17.072000 + ------------------------------- + Total 32.781000 + Virtual 0.0000000 + ------------------------------- + + + + Run end date and time (yyyy/mm/dd hh:mm:ss): 2024/10/29 8:36:29 + Elapsed run time: 0.029 Seconds + Normal termination of simulation. diff --git a/test/data/test_mf6model_0-disu01a_0/mfsim.nam b/test/data/test_mf6model_0-disu01a_0/mfsim.nam new file mode 100644 index 00000000..e37bb199 --- /dev/null +++ b/test/data/test_mf6model_0-disu01a_0/mfsim.nam @@ -0,0 +1,19 @@ +# File generated by Flopy version 3.9.0.dev0 on 10/29/2024 at 08:36:29. +BEGIN options +END options + +BEGIN timing + TDIS6 disu01a.tdis +END timing + +BEGIN models + gwf6 disu01a.nam disu01a +END models + +BEGIN exchanges +END exchanges + +BEGIN solutiongroup 1 + ims6 disu01a.ims disu01a +END solutiongroup 1 + diff --git a/test/test_sim.py b/test/test_sim.py index fb7650f9..cd2b7a63 100644 --- a/test/test_sim.py +++ b/test/test_sim.py @@ -1,5 +1,7 @@ import os +import shutil import subprocess +from pathlib import Path import numpy as np @@ -337,130 +339,36 @@ def test_load_sim(tmp_path): s.write(write_dir) -def test_load_chd01(tmp_path): +def test_gwf_chd01(tmp_path): name = "gwf_chd01" - nlay = 1 - nrow = 1 - ncol = 100 - dis_fpth = tmp_path / f"{name}.dis" - with open(dis_fpth, "w") as f: - f.write("BEGIN OPTIONS\n") - f.write("END OPTIONS\n\n") - f.write("BEGIN DIMENSIONS\n") - f.write(f" NLAY {nlay}\n") - f.write(f" NROW {nrow}\n") - f.write(f" NCOL {ncol}\n") - f.write("END DIMENSIONS\n\n") - f.write("BEGIN GRIDDATA\n") - f.write(" DELR\n CONSTANT 1.00000000\n") - f.write(" DELC\n CONSTANT 1.00000000\n") - f.write(" TOP\n CONSTANT 1.00000000\n") - f.write(" BOTM\n CONSTANT 0.00000000\n") - f.write(" IDOMAIN\n INTERNAL FACTOR 1\n") - f.write( - " 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1" - " 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1" - " 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1" - " 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1" - " 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n" - ) - f.write("END GRIDDATA\n") - - ic_fpth = tmp_path / f"{name}.ic" - with open(ic_fpth, "w") as f: - f.write("BEGIN OPTIONS\n") - f.write("END OPTIONS\n\n") - f.write("BEGIN GRIDDATA\n") - f.write(" STRT\n CONSTANT 1.00000000\n") - f.write("END GRIDDATA\n") + data_fpth = Path(__file__).parent / "data" / "test_gwf_chd01" + shutil.copytree(data_fpth, tmp_path / "gwf_chd01") + sim_fpth = Path(tmp_path / "gwf_chd01" / "mfsim.nam") - npf_fpth = tmp_path / f"{name}.npf" - with open(npf_fpth, "w") as f: - f.write("BEGIN OPTIONS\n") - f.write(" SAVE_SPECIFIC_DISCHARGE\n") - f.write("END OPTIONS\n\n") - f.write("BEGIN GRIDDATA\n") - f.write(" ICELLTYPE\n CONSTANT 0\n") - f.write(" K\n CONSTANT 1.00000000\n") - f.write(" K33\n CONSTANT 1.00000000\n") - f.write("END GRIDDATA\n") + s = None + with open(sim_fpth, "r") as f: + s = MFSimulation.load(f) - chd_fpth = tmp_path / f"{name}.chd" - with open(chd_fpth, "w") as f: - f.write("BEGIN OPTIONS\n") - f.write(" PRINT_FLOWS\n") - f.write("END OPTIONS\n\n") - f.write("BEGIN DIMENSIONS\n") - f.write(" MAXBOUND 2\n") - f.write("END DIMENSIONS\n\n") - f.write("BEGIN PERIOD 1\n") - f.write(" 1 1 1 1.00000000E+00\n") - f.write(" 1 1 100 0.00000000E+00\n") - f.write("END PERIOD 1\n") + write_dir = tmp_path / "write" + os.makedirs(write_dir) + s.write(write_dir) - nam_fpth = tmp_path / f"{name}.nam" - with open(nam_fpth, "w") as f: - f.write("BEGIN OPTIONS\n") - f.write(" SAVE_FLOWS\n") - f.write("END OPTIONS\n") - f.write("\n") - f.write("BEGIN PACKAGES\n") - f.write(f" DIS6 {name}.dis dis\n") - f.write(f" IC6 {name}.ic ic\n") - f.write(f" NPF6 {name}.npf npf\n") - f.write(f" CHD6 {name}.chd chd-1\n") - # f.write(f" OC6 {name}.oc oc\n") - f.write("END PACKAGES\n") + s = subprocess.run(["which", "mf6"]) + if s.returncode == 0: + os.chdir(tmp_path / "gwf_chd01") + subprocess.run(["mf6"]) + os.chdir(tmp_path / "write") + subprocess.run(["mf6"]) + subprocess.run(["diff", f"./{name}.lst", f"../gwf_chd01/{name}.lst"]) - tdis_fpth = tmp_path / "chd01.tdis" - with open(tdis_fpth, "w") as f: - f.write("BEGIN OPTIONS\n") - f.write(" TIME_UNITS days\n") - f.write("END OPTIONS\n\n") - f.write("BEGIN DIMENSIONS\n") - f.write(" NPER 1\n") - f.write("END DIMENSIONS\n\n") - f.write("BEGIN PERIODDATA\n") - f.write(" 5.00000000 1 1.00000000\n") - f.write("END PERIODDATA\n\n") - ims_fpth = tmp_path / f"{name}.ims" - with open(ims_fpth, "w") as f: - f.write("BEGIN OPTIONS\n") - f.write(" PRINT_OPTION summary\n") - f.write("END OPTIONS\n\n") - f.write("BEGIN NONLINEAR\n") - f.write(" OUTER_DVCLOSE 1.00000000E-06\n") - f.write(" OUTER_MAXIMUM 100\n") - f.write(" UNDER_RELAXATION none\n") - f.write("END NONLINEAR\n\n") - f.write("BEGIN LINEAR\n") - f.write(" INNER_MAXIMUM 300\n") - f.write(" INNER_DVCLOSE 1.00000000E-06\n") - # TODO: fails - # f.write(" inner_rclose 1.00000000E-06\n") - f.write(" LINEAR_ACCELERATION cg\n") - f.write(" RELAXATION_FACTOR 1.00000000\n") - f.write(" SCALING_METHOD none\n") - f.write(" REORDERING_METHOD none\n") - f.write("END LINEAR\n\n") +def test_gwf_disu(tmp_path): + name = "disu01a" - sim_fpth = tmp_path / "mfsim.nam" - with open(sim_fpth, "w") as f: - f.write("BEGIN OPTIONS\n") - f.write("END OPTIONS\n\n") - f.write("BEGIN TIMING\n") - f.write(" TDIS6 chd01.tdis\n") - f.write("END TIMING\n\n") - f.write("BEGIN MODELS\n") - f.write(f" GWF6 {name}.nam {name}\n") - f.write("END MODELS\n\n") - f.write("BEGIN EXCHANGES\n") - f.write("END EXCHANGES\n\n") - f.write("BEGIN SOLUTIONGROUP 1\n") - f.write(f" ims6 {name}.ims {name}\n") - f.write("END SOLUTIONGROUP 1\n\n") + data_fpth = Path(__file__).parent / "data" / "test_mf6model_0-disu01a_0" + shutil.copytree(data_fpth, tmp_path / "disu01a") + sim_fpth = Path(tmp_path / "disu01a" / "mfsim.nam") s = None with open(sim_fpth, "r") as f: @@ -470,8 +378,10 @@ def test_load_chd01(tmp_path): os.makedirs(write_dir) s.write(write_dir) - os.chdir(write_dir) s = subprocess.run(["which", "mf6"]) if s.returncode == 0: + os.chdir(tmp_path / "disu01a") + subprocess.run(["mf6"]) + os.chdir(tmp_path / "write") subprocess.run(["mf6"]) - subprocess.run(["diff", f"./{name}.lst", f"../{name}.lst"]) + subprocess.run(["diff", f"./{name}.lst", f"../disu01a/{name}.lst"]) From df36c20dceb1f59135af80b9f830f8848ed335ed Mon Sep 17 00:00:00 2001 From: mjreno Date: Wed, 30 Oct 2024 10:30:02 -0400 Subject: [PATCH 4/5] add gwf disv test --- flopy4/array.py | 8 +- flopy4/compound.py | 25 +- flopy4/ispec/gwe_disv.py | 386 +++++++++++++++ flopy4/ispec/gwe_model.py | 2 + flopy4/ispec/gwf_disv.py | 386 +++++++++++++++ flopy4/ispec/gwf_model.py | 2 + flopy4/ispec/gwt_disv.py | 386 +++++++++++++++ flopy4/ispec/gwt_model.py | 2 + flopy4/ispec/prt_disv.py | 386 +++++++++++++++ flopy4/ispec/prt_model.py | 2 + spec/dfn/gwe-disv.dfn | 263 ++++++++++ spec/dfn/gwf-disv.dfn | 263 ++++++++++ spec/dfn/gwt-disv.dfn | 263 ++++++++++ spec/dfn/prt-disv.dfn | 262 ++++++++++ spec/make_ispec.py | 2 +- spec/toml/gwe-disv.toml | 465 ++++++++++++++++++ spec/toml/gwf-disv.toml | 465 ++++++++++++++++++ spec/toml/gwt-disv.toml | 465 ++++++++++++++++++ spec/toml/prt-disv.toml | 465 ++++++++++++++++++ .../test_mf6model_0-disu01a_0/disu01a.disu | 9 +- .../test_mf6model_0-disu01a_0/disu01a.lst | 224 --------- .../disu01a.orig.disu | 148 ------ test/data/test_mf6model_0-disu01a_0/mfsim.lst | 286 ----------- .../test_mf6model_0-disv01a_0/disv01a.chd | 13 + .../test_mf6model_0-disv01a_0/disv01a.disv | 54 ++ .../data/test_mf6model_0-disv01a_0/disv01a.ic | 9 + .../test_mf6model_0-disv01a_0/disv01a.ims | 5 + .../test_mf6model_0-disv01a_0/disv01a.nam | 11 + .../test_mf6model_0-disv01a_0/disv01a.npf | 11 + .../test_mf6model_0-disv01a_0/disv01a.tdis | 12 + test/data/test_mf6model_0-disv01a_0/mfsim.nam | 19 + test/test_sim.py | 66 ++- 32 files changed, 4683 insertions(+), 682 deletions(-) create mode 100644 flopy4/ispec/gwe_disv.py create mode 100644 flopy4/ispec/gwf_disv.py create mode 100644 flopy4/ispec/gwt_disv.py create mode 100644 flopy4/ispec/prt_disv.py create mode 100644 spec/dfn/gwe-disv.dfn create mode 100644 spec/dfn/gwf-disv.dfn create mode 100644 spec/dfn/gwt-disv.dfn create mode 100644 spec/dfn/prt-disv.dfn create mode 100644 spec/toml/gwe-disv.toml create mode 100644 spec/toml/gwf-disv.toml create mode 100644 spec/toml/gwt-disv.toml create mode 100644 spec/toml/prt-disv.toml delete mode 100644 test/data/test_mf6model_0-disu01a_0/disu01a.lst delete mode 100644 test/data/test_mf6model_0-disu01a_0/disu01a.orig.disu delete mode 100644 test/data/test_mf6model_0-disu01a_0/mfsim.lst create mode 100644 test/data/test_mf6model_0-disv01a_0/disv01a.chd create mode 100644 test/data/test_mf6model_0-disv01a_0/disv01a.disv create mode 100644 test/data/test_mf6model_0-disv01a_0/disv01a.ic create mode 100644 test/data/test_mf6model_0-disv01a_0/disv01a.ims create mode 100644 test/data/test_mf6model_0-disv01a_0/disv01a.nam create mode 100644 test/data/test_mf6model_0-disv01a_0/disv01a.npf create mode 100644 test/data/test_mf6model_0-disv01a_0/disv01a.tdis create mode 100644 test/data/test_mf6model_0-disv01a_0/mfsim.nam diff --git a/flopy4/array.py b/flopy4/array.py index d6ffc595..98152696 100644 --- a/flopy4/array.py +++ b/flopy4/array.py @@ -460,7 +460,13 @@ def load(cls, f, cwd, shape, header=True, **kwargs): elif "disv" in mempath.split("/"): nlay = params.get("dimensions").get("nlay") ncpl = params.get("dimensions").get("ncpl") - shape = (nlay, ncpl) + nvert = params.get("dimensions").get("nvert") + if shape == "(ncpl)": + shape = ncpl + elif shape == "(ncpl, nlay)": + shape = (nlay, ncpl) + elif shape == "(nvert)": + shape = nvert elif "disu" in mempath.split("/"): nodes = params.get("dimensions").get("nodes") nja = params.get("dimensions").get("nja") diff --git a/flopy4/compound.py b/flopy4/compound.py index 05735f2b..e2760f98 100644 --- a/flopy4/compound.py +++ b/flopy4/compound.py @@ -343,6 +343,7 @@ def load(cls, f, **kwargs) -> "MFList": kwargs.pop("mname", None) kwargs.pop("shape", None) # e.g. maxbound + jidx = -1 param_lists = [] param_cols = [] param_types = [] @@ -353,18 +354,26 @@ def load(cls, f, **kwargs) -> "MFList": # "boundames and auxvars not yet supported in period blocks" # ) pcols = 0 - if params[k].shape is None or params[k].shape == "": + if ( + params[k].shape is None + or params[k].shape == "" + or params[k].shape == "(:)" + ): pcols = 1 elif params[k].shape == "(ncelldim)": - if model_shape: - pcols = len(model_shape) - else: - raise ValueError("model_shape not set") + assert model_shape + pcols = len(model_shape) + elif params[k].shape == "(ncvert)": + # param_cols will be updated each line + jidx = len(param_cols) - 1 else: - pcols = len(params[k].shape.split(",")) + raise ValueError( + "MFList param {params[k].name} has " + "unsupported shape {params[k].shape}" + ) param_cols.append(pcols) - param_lists.append(list()) param_types.append(params[k].type) + param_lists.append(list()) if list(params.items())[-1][1].shape == "(:)": maxsplit = sum(param_cols) - 1 @@ -381,6 +390,8 @@ def load(cls, f, **kwargs) -> "MFList": break else: tokens = strip(line).split(maxsplit=maxsplit) + if jidx >= 0: + param_cols[jidx + 1] = int(tokens[jidx]) assert len(tokens) == sum(param_cols) icol = 0 for i in range(len(param_types)): diff --git a/flopy4/ispec/gwe_disv.py b/flopy4/ispec/gwe_disv.py new file mode 100644 index 00000000..aed48ca9 --- /dev/null +++ b/flopy4/ispec/gwe_disv.py @@ -0,0 +1,386 @@ +# generated file +from flopy4.array import MFArray +from flopy4.compound import MFRecord, MFList +from flopy4.package import MFPackage +from flopy4.scalar import MFDouble, MFFilename, MFInteger, MFKeyword, MFString + + +class GweDisv(MFPackage): + multipkg = False + stress = False + advanced = False + + length_units = MFString( + type = "string", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""model length units""", + description = +"""is the length units used for this model. Values can be ``FEET'', +``METERS'', or ``CENTIMETERS''. If not specified, the default is +``UNKNOWN''.""", + ) + + nogrb = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""do not write binary grid file""", + description = +"""keyword to deactivate writing of the binary grid file.""", + ) + + xorigin = MFDouble( + type = "double", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""x-position origin of the model grid coordinate system""", + 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.""", + ) + + yorigin = MFDouble( + type = "double", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""y-position origin of the model grid coordinate system""", + 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.""", + ) + + angrot = MFDouble( + type = "double", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""rotation angle""", + 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.""", + ) + + export_array_ascii = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""export array variables to layered ascii files.""", + description = +"""keyword that specifies input griddata arrays should be written to +layered ascii output files.""", + ) + + export_array_netcdf = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""export array variables to netcdf output files.""", + description = +"""keyword that specifies input griddata arrays should be written to the +model output netcdf file.""", + ) + + ncf_filerecord = MFRecord( + type = "record", + params = { + "ncf6": MFKeyword(), + "filein": MFKeyword(), + "ncf6_filename": MFString(), + }, + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""""", + description = +"""""", + ) + + ncf6 = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = False, + longname = +"""ncf keyword""", + description = +"""keyword to specify that record corresponds to a netcdf configuration +(NCF) file.""", + ) + + filein = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = False, + longname = +"""file keyword""", + description = +"""keyword to specify that an input filename is expected next.""", + ) + + ncf6_filename = MFString( + type = "string", + block = "options", + shape = "", + reader = "urword", + optional = False, + longname = +"""file name of NCF information""", + description = +"""defines a netcdf configuration (NCF) input file.""", + ) + + nlay = MFInteger( + type = "integer", + block = "dimensions", + shape = "", + reader = "urword", + optional = False, + longname = +"""number of layers""", + description = +"""is the number of layers in the model grid.""", + ) + + ncpl = MFInteger( + type = "integer", + block = "dimensions", + shape = "", + reader = "urword", + optional = False, + longname = +"""number of cells per layer""", + description = +"""is the number of cells per layer. This is a constant value for the +grid and it applies to all layers.""", + ) + + nvert = MFInteger( + type = "integer", + block = "dimensions", + shape = "", + reader = "urword", + optional = False, + longname = +"""number of columns""", + description = +"""is the total number of (x, y) vertex pairs used to characterize the +horizontal configuration of the model grid.""", + ) + + top = MFArray( + type = "double", + block = "griddata", + shape = "(ncpl)", + reader = "readarray", + optional = False, + longname = +"""model top elevation""", + description = +"""is the top elevation for each cell in the top model layer.""", + ) + + botm = MFArray( + type = "double", + block = "griddata", + shape = "(ncpl, nlay)", + reader = "readarray", + optional = False, + longname = +"""model bottom elevation""", + description = +"""is the bottom elevation for each cell.""", + ) + + idomain = MFArray( + type = "integer", + block = "griddata", + shape = "(ncpl, nlay)", + reader = "readarray", + optional = True, + longname = +"""idomain existence array""", + 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.""", + ) + + iv = MFInteger( + type = "integer", + block = "vertices", + shape = "", + reader = "urword", + optional = False, + longname = +"""vertex number""", + description = +"""is the vertex number. Records in the VERTICES block must be listed in +consecutive order from 1 to NVERT.""", + ) + + xv = MFDouble( + type = "double", + block = "vertices", + shape = "", + reader = "urword", + optional = False, + longname = +"""x-coordinate for vertex""", + description = +"""is the x-coordinate for the vertex.""", + ) + + yv = MFDouble( + type = "double", + block = "vertices", + shape = "", + reader = "urword", + optional = False, + longname = +"""y-coordinate for vertex""", + description = +"""is the y-coordinate for the vertex.""", + ) + + vertices = MFList( + type = "recarray", + params = { + "iv": iv, + "xv": xv, + "yv": yv, + }, + block = "vertices", + shape = "(nvert)", + reader = "urword", + optional = False, + longname = +"""vertices data""", + description = +"""""", + ) + + icell2d = MFInteger( + type = "integer", + block = "cell2d", + shape = "", + reader = "urword", + optional = False, + longname = +"""cell2d number""", + description = +"""is the CELL2D number. Records in the CELL2D block must be listed in +consecutive order from the first to the last.""", + ) + + xc = MFDouble( + type = "double", + block = "cell2d", + shape = "", + reader = "urword", + optional = False, + longname = +"""x-coordinate for cell center""", + description = +"""is the x-coordinate for the cell center.""", + ) + + yc = MFDouble( + type = "double", + block = "cell2d", + shape = "", + reader = "urword", + optional = False, + longname = +"""y-coordinate for cell center""", + description = +"""is the y-coordinate for the cell center.""", + ) + + ncvert = MFInteger( + type = "integer", + block = "cell2d", + shape = "", + reader = "urword", + optional = False, + longname = +"""number of cell vertices""", + description = +"""is the number of vertices required to define the cell. There may be a +different number of vertices for each cell.""", + ) + + icvert = MFArray( + type = "integer", + block = "cell2d", + shape = "(ncvert)", + reader = "urword", + optional = False, + longname = +"""array of vertex numbers""", + 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.""", + ) + + cell2d = MFList( + type = "recarray", + params = { + "icell2d": icell2d, + "xc": xc, + "yc": yc, + "ncvert": ncvert, + "icvert": icvert, + }, + block = "cell2d", + shape = "(ncpl)", + reader = "urword", + optional = False, + longname = +"""cell2d data""", + description = +"""""", + ) \ No newline at end of file diff --git a/flopy4/ispec/gwe_model.py b/flopy4/ispec/gwe_model.py index 09dc6c21..a248880c 100644 --- a/flopy4/ispec/gwe_model.py +++ b/flopy4/ispec/gwe_model.py @@ -3,8 +3,10 @@ from flopy4.resolver import Resolve from flopy4.ispec.gwe_dis import GweDis from flopy4.ispec.gwe_disu import GweDisu +from flopy4.ispec.gwe_disv import GweDisv class GweModel(MFModel, Resolve): dis6 = GweDis() disu6 = GweDisu() + disv6 = GweDisv() diff --git a/flopy4/ispec/gwf_disv.py b/flopy4/ispec/gwf_disv.py new file mode 100644 index 00000000..142e5558 --- /dev/null +++ b/flopy4/ispec/gwf_disv.py @@ -0,0 +1,386 @@ +# generated file +from flopy4.array import MFArray +from flopy4.compound import MFRecord, MFList +from flopy4.package import MFPackage +from flopy4.scalar import MFDouble, MFFilename, MFInteger, MFKeyword, MFString + + +class GwfDisv(MFPackage): + multipkg = False + stress = False + advanced = False + + length_units = MFString( + type = "string", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""model length units""", + description = +"""is the length units used for this model. Values can be ``FEET'', +``METERS'', or ``CENTIMETERS''. If not specified, the default is +``UNKNOWN''.""", + ) + + nogrb = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""do not write binary grid file""", + description = +"""keyword to deactivate writing of the binary grid file.""", + ) + + xorigin = MFDouble( + type = "double", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""x-position origin of the model grid coordinate system""", + 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.""", + ) + + yorigin = MFDouble( + type = "double", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""y-position origin of the model grid coordinate system""", + 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.""", + ) + + angrot = MFDouble( + type = "double", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""rotation angle""", + 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.""", + ) + + export_array_ascii = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""export array variables to layered ascii files.""", + description = +"""keyword that specifies input griddata arrays should be written to +layered ascii output files.""", + ) + + export_array_netcdf = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""export array variables to netcdf output files.""", + description = +"""keyword that specifies input griddata arrays should be written to the +model output netcdf file.""", + ) + + ncf_filerecord = MFRecord( + type = "record", + params = { + "ncf6": MFKeyword(), + "filein": MFKeyword(), + "ncf6_filename": MFString(), + }, + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""""", + description = +"""""", + ) + + ncf6 = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = False, + longname = +"""ncf keyword""", + description = +"""keyword to specify that record corresponds to a netcdf configuration +(NCF) file.""", + ) + + filein = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = False, + longname = +"""file keyword""", + description = +"""keyword to specify that an input filename is expected next.""", + ) + + ncf6_filename = MFString( + type = "string", + block = "options", + shape = "", + reader = "urword", + optional = False, + longname = +"""file name of NCF information""", + description = +"""defines a netcdf configuration (NCF) input file.""", + ) + + nlay = MFInteger( + type = "integer", + block = "dimensions", + shape = "", + reader = "urword", + optional = False, + longname = +"""number of layers""", + description = +"""is the number of layers in the model grid.""", + ) + + ncpl = MFInteger( + type = "integer", + block = "dimensions", + shape = "", + reader = "urword", + optional = False, + longname = +"""number of cells per layer""", + description = +"""is the number of cells per layer. This is a constant value for the +grid and it applies to all layers.""", + ) + + nvert = MFInteger( + type = "integer", + block = "dimensions", + shape = "", + reader = "urword", + optional = False, + longname = +"""number of columns""", + description = +"""is the total number of (x, y) vertex pairs used to characterize the +horizontal configuration of the model grid.""", + ) + + top = MFArray( + type = "double", + block = "griddata", + shape = "(ncpl)", + reader = "readarray", + optional = False, + longname = +"""model top elevation""", + description = +"""is the top elevation for each cell in the top model layer.""", + ) + + botm = MFArray( + type = "double", + block = "griddata", + shape = "(ncpl, nlay)", + reader = "readarray", + optional = False, + longname = +"""model bottom elevation""", + description = +"""is the bottom elevation for each cell.""", + ) + + idomain = MFArray( + type = "integer", + block = "griddata", + shape = "(ncpl, nlay)", + reader = "readarray", + optional = True, + longname = +"""idomain existence array""", + 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.""", + ) + + iv = MFInteger( + type = "integer", + block = "vertices", + shape = "", + reader = "urword", + optional = False, + longname = +"""vertex number""", + description = +"""is the vertex number. Records in the VERTICES block must be listed in +consecutive order from 1 to NVERT.""", + ) + + xv = MFDouble( + type = "double", + block = "vertices", + shape = "", + reader = "urword", + optional = False, + longname = +"""x-coordinate for vertex""", + description = +"""is the x-coordinate for the vertex.""", + ) + + yv = MFDouble( + type = "double", + block = "vertices", + shape = "", + reader = "urword", + optional = False, + longname = +"""y-coordinate for vertex""", + description = +"""is the y-coordinate for the vertex.""", + ) + + vertices = MFList( + type = "recarray", + params = { + "iv": iv, + "xv": xv, + "yv": yv, + }, + block = "vertices", + shape = "(nvert)", + reader = "urword", + optional = False, + longname = +"""vertices data""", + description = +"""""", + ) + + icell2d = MFInteger( + type = "integer", + block = "cell2d", + shape = "", + reader = "urword", + optional = False, + longname = +"""cell2d number""", + description = +"""is the CELL2D number. Records in the CELL2D block must be listed in +consecutive order from the first to the last.""", + ) + + xc = MFDouble( + type = "double", + block = "cell2d", + shape = "", + reader = "urword", + optional = False, + longname = +"""x-coordinate for cell center""", + description = +"""is the x-coordinate for the cell center.""", + ) + + yc = MFDouble( + type = "double", + block = "cell2d", + shape = "", + reader = "urword", + optional = False, + longname = +"""y-coordinate for cell center""", + description = +"""is the y-coordinate for the cell center.""", + ) + + ncvert = MFInteger( + type = "integer", + block = "cell2d", + shape = "", + reader = "urword", + optional = False, + longname = +"""number of cell vertices""", + description = +"""is the number of vertices required to define the cell. There may be a +different number of vertices for each cell.""", + ) + + icvert = MFArray( + type = "integer", + block = "cell2d", + shape = "(ncvert)", + reader = "urword", + optional = False, + longname = +"""array of vertex numbers""", + 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.""", + ) + + cell2d = MFList( + type = "recarray", + params = { + "icell2d": icell2d, + "xc": xc, + "yc": yc, + "ncvert": ncvert, + "icvert": icvert, + }, + block = "cell2d", + shape = "(ncpl)", + reader = "urword", + optional = False, + longname = +"""cell2d data""", + description = +"""""", + ) \ No newline at end of file diff --git a/flopy4/ispec/gwf_model.py b/flopy4/ispec/gwf_model.py index 0158a005..62af6c8b 100644 --- a/flopy4/ispec/gwf_model.py +++ b/flopy4/ispec/gwf_model.py @@ -4,6 +4,7 @@ from flopy4.ispec.gwf_chd import GwfChd from flopy4.ispec.gwf_dis import GwfDis from flopy4.ispec.gwf_disu import GwfDisu +from flopy4.ispec.gwf_disv import GwfDisv from flopy4.ispec.gwf_ic import GwfIc from flopy4.ispec.gwf_nam import GwfNam from flopy4.ispec.gwf_npf import GwfNpf @@ -13,6 +14,7 @@ class GwfModel(MFModel, Resolve): chd6 = GwfChd() dis6 = GwfDis() disu6 = GwfDisu() + disv6 = GwfDisv() ic6 = GwfIc() nam6 = GwfNam() npf6 = GwfNpf() diff --git a/flopy4/ispec/gwt_disv.py b/flopy4/ispec/gwt_disv.py new file mode 100644 index 00000000..c8b5e075 --- /dev/null +++ b/flopy4/ispec/gwt_disv.py @@ -0,0 +1,386 @@ +# generated file +from flopy4.array import MFArray +from flopy4.compound import MFRecord, MFList +from flopy4.package import MFPackage +from flopy4.scalar import MFDouble, MFFilename, MFInteger, MFKeyword, MFString + + +class GwtDisv(MFPackage): + multipkg = False + stress = False + advanced = False + + length_units = MFString( + type = "string", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""model length units""", + description = +"""is the length units used for this model. Values can be ``FEET'', +``METERS'', or ``CENTIMETERS''. If not specified, the default is +``UNKNOWN''.""", + ) + + nogrb = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""do not write binary grid file""", + description = +"""keyword to deactivate writing of the binary grid file.""", + ) + + xorigin = MFDouble( + type = "double", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""x-position origin of the model grid coordinate system""", + 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.""", + ) + + yorigin = MFDouble( + type = "double", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""y-position origin of the model grid coordinate system""", + 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.""", + ) + + angrot = MFDouble( + type = "double", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""rotation angle""", + 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.""", + ) + + export_array_ascii = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""export array variables to layered ascii files.""", + description = +"""keyword that specifies input griddata arrays should be written to +layered ascii output files.""", + ) + + export_array_netcdf = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""export array variables to netcdf output files.""", + description = +"""keyword that specifies input griddata arrays should be written to the +model output netcdf file.""", + ) + + ncf_filerecord = MFRecord( + type = "record", + params = { + "ncf6": MFKeyword(), + "filein": MFKeyword(), + "ncf6_filename": MFString(), + }, + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""""", + description = +"""""", + ) + + ncf6 = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = False, + longname = +"""ncf keyword""", + description = +"""keyword to specify that record corresponds to a netcdf configuration +(NCF) file.""", + ) + + filein = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = False, + longname = +"""file keyword""", + description = +"""keyword to specify that an input filename is expected next.""", + ) + + ncf6_filename = MFString( + type = "string", + block = "options", + shape = "", + reader = "urword", + optional = False, + longname = +"""file name of NCF information""", + description = +"""defines a netcdf configuration (NCF) input file.""", + ) + + nlay = MFInteger( + type = "integer", + block = "dimensions", + shape = "", + reader = "urword", + optional = False, + longname = +"""number of layers""", + description = +"""is the number of layers in the model grid.""", + ) + + ncpl = MFInteger( + type = "integer", + block = "dimensions", + shape = "", + reader = "urword", + optional = False, + longname = +"""number of cells per layer""", + description = +"""is the number of cells per layer. This is a constant value for the +grid and it applies to all layers.""", + ) + + nvert = MFInteger( + type = "integer", + block = "dimensions", + shape = "", + reader = "urword", + optional = False, + longname = +"""number of columns""", + description = +"""is the total number of (x, y) vertex pairs used to characterize the +horizontal configuration of the model grid.""", + ) + + top = MFArray( + type = "double", + block = "griddata", + shape = "(ncpl)", + reader = "readarray", + optional = False, + longname = +"""model top elevation""", + description = +"""is the top elevation for each cell in the top model layer.""", + ) + + botm = MFArray( + type = "double", + block = "griddata", + shape = "(ncpl, nlay)", + reader = "readarray", + optional = False, + longname = +"""model bottom elevation""", + description = +"""is the bottom elevation for each cell.""", + ) + + idomain = MFArray( + type = "integer", + block = "griddata", + shape = "(ncpl, nlay)", + reader = "readarray", + optional = True, + longname = +"""idomain existence array""", + 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.""", + ) + + iv = MFInteger( + type = "integer", + block = "vertices", + shape = "", + reader = "urword", + optional = False, + longname = +"""vertex number""", + description = +"""is the vertex number. Records in the VERTICES block must be listed in +consecutive order from 1 to NVERT.""", + ) + + xv = MFDouble( + type = "double", + block = "vertices", + shape = "", + reader = "urword", + optional = False, + longname = +"""x-coordinate for vertex""", + description = +"""is the x-coordinate for the vertex.""", + ) + + yv = MFDouble( + type = "double", + block = "vertices", + shape = "", + reader = "urword", + optional = False, + longname = +"""y-coordinate for vertex""", + description = +"""is the y-coordinate for the vertex.""", + ) + + vertices = MFList( + type = "recarray", + params = { + "iv": iv, + "xv": xv, + "yv": yv, + }, + block = "vertices", + shape = "(nvert)", + reader = "urword", + optional = False, + longname = +"""vertices data""", + description = +"""""", + ) + + icell2d = MFInteger( + type = "integer", + block = "cell2d", + shape = "", + reader = "urword", + optional = False, + longname = +"""cell2d number""", + description = +"""is the CELL2D number. Records in the CELL2D block must be listed in +consecutive order from the first to the last.""", + ) + + xc = MFDouble( + type = "double", + block = "cell2d", + shape = "", + reader = "urword", + optional = False, + longname = +"""x-coordinate for cell center""", + description = +"""is the x-coordinate for the cell center.""", + ) + + yc = MFDouble( + type = "double", + block = "cell2d", + shape = "", + reader = "urword", + optional = False, + longname = +"""y-coordinate for cell center""", + description = +"""is the y-coordinate for the cell center.""", + ) + + ncvert = MFInteger( + type = "integer", + block = "cell2d", + shape = "", + reader = "urword", + optional = False, + longname = +"""number of cell vertices""", + description = +"""is the number of vertices required to define the cell. There may be a +different number of vertices for each cell.""", + ) + + icvert = MFArray( + type = "integer", + block = "cell2d", + shape = "(ncvert)", + reader = "urword", + optional = False, + longname = +"""array of vertex numbers""", + 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.""", + ) + + cell2d = MFList( + type = "recarray", + params = { + "icell2d": icell2d, + "xc": xc, + "yc": yc, + "ncvert": ncvert, + "icvert": icvert, + }, + block = "cell2d", + shape = "(ncpl)", + reader = "urword", + optional = False, + longname = +"""cell2d data""", + description = +"""""", + ) \ No newline at end of file diff --git a/flopy4/ispec/gwt_model.py b/flopy4/ispec/gwt_model.py index a01a9ccc..d2293dd7 100644 --- a/flopy4/ispec/gwt_model.py +++ b/flopy4/ispec/gwt_model.py @@ -3,8 +3,10 @@ from flopy4.resolver import Resolve from flopy4.ispec.gwt_dis import GwtDis from flopy4.ispec.gwt_disu import GwtDisu +from flopy4.ispec.gwt_disv import GwtDisv class GwtModel(MFModel, Resolve): dis6 = GwtDis() disu6 = GwtDisu() + disv6 = GwtDisv() diff --git a/flopy4/ispec/prt_disv.py b/flopy4/ispec/prt_disv.py new file mode 100644 index 00000000..f1343e4b --- /dev/null +++ b/flopy4/ispec/prt_disv.py @@ -0,0 +1,386 @@ +# generated file +from flopy4.array import MFArray +from flopy4.compound import MFRecord, MFList +from flopy4.package import MFPackage +from flopy4.scalar import MFDouble, MFFilename, MFInteger, MFKeyword, MFString + + +class PrtDisv(MFPackage): + multipkg = False + stress = False + advanced = False + + length_units = MFString( + type = "string", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""model length units""", + description = +"""is the length units used for this model. Values can be ``FEET'', +``METERS'', or ``CENTIMETERS''. If not specified, the default is +``UNKNOWN''.""", + ) + + nogrb = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""do not write binary grid file""", + description = +"""keyword to deactivate writing of the binary grid file.""", + ) + + xorigin = MFDouble( + type = "double", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""x-position origin of the model grid coordinate system""", + 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.""", + ) + + yorigin = MFDouble( + type = "double", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""y-position origin of the model grid coordinate system""", + 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.""", + ) + + angrot = MFDouble( + type = "double", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""rotation angle""", + 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.""", + ) + + export_array_ascii = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""export array variables to layered ascii files.""", + description = +"""keyword that specifies input griddata arrays should be written to +layered ascii output files.""", + ) + + export_array_netcdf = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""export array variables to netcdf output files.""", + description = +"""keyword that specifies input griddata arrays should be written to the +model output netcdf file.""", + ) + + ncf_filerecord = MFRecord( + type = "record", + params = { + "ncf6": MFKeyword(), + "filein": MFKeyword(), + "ncf6_filename": MFString(), + }, + block = "options", + shape = "", + reader = "urword", + optional = True, + longname = +"""""", + description = +"""""", + ) + + ncf6 = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = False, + longname = +"""ncf keyword""", + description = +"""keyword to specify that record corresponds to a netcdf configuration +(NCF) file.""", + ) + + filein = MFKeyword( + type = "keyword", + block = "options", + shape = "", + reader = "urword", + optional = False, + longname = +"""file keyword""", + description = +"""keyword to specify that an input filename is expected next.""", + ) + + ncf6_filename = MFString( + type = "string", + block = "options", + shape = "", + reader = "urword", + optional = False, + longname = +"""file name of NCF information""", + description = +"""defines a netcdf configuration (NCF) input file.""", + ) + + nlay = MFInteger( + type = "integer", + block = "dimensions", + shape = "", + reader = "urword", + optional = False, + longname = +"""number of layers""", + description = +"""is the number of layers in the model grid.""", + ) + + ncpl = MFInteger( + type = "integer", + block = "dimensions", + shape = "", + reader = "urword", + optional = False, + longname = +"""number of cells per layer""", + description = +"""is the number of cells per layer. This is a constant value for the +grid and it applies to all layers.""", + ) + + nvert = MFInteger( + type = "integer", + block = "dimensions", + shape = "", + reader = "urword", + optional = False, + longname = +"""number of columns""", + description = +"""is the total number of (x, y) vertex pairs used to characterize the +horizontal configuration of the model grid.""", + ) + + top = MFArray( + type = "double", + block = "griddata", + shape = "(ncpl)", + reader = "readarray", + optional = False, + longname = +"""model top elevation""", + description = +"""is the top elevation for each cell in the top model layer.""", + ) + + botm = MFArray( + type = "double", + block = "griddata", + shape = "(ncpl, nlay)", + reader = "readarray", + optional = False, + longname = +"""model bottom elevation""", + description = +"""is the bottom elevation for each cell.""", + ) + + idomain = MFArray( + type = "integer", + block = "griddata", + shape = "(ncpl, nlay)", + reader = "readarray", + optional = True, + longname = +"""idomain existence array""", + 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.""", + ) + + iv = MFInteger( + type = "integer", + block = "vertices", + shape = "", + reader = "urword", + optional = False, + longname = +"""vertex number""", + description = +"""is the vertex number. Records in the VERTICES block must be listed in +consecutive order from 1 to NVERT.""", + ) + + xv = MFDouble( + type = "double", + block = "vertices", + shape = "", + reader = "urword", + optional = False, + longname = +"""x-coordinate for vertex""", + description = +"""is the x-coordinate for the vertex.""", + ) + + yv = MFDouble( + type = "double", + block = "vertices", + shape = "", + reader = "urword", + optional = False, + longname = +"""y-coordinate for vertex""", + description = +"""is the y-coordinate for the vertex.""", + ) + + vertices = MFList( + type = "recarray", + params = { + "iv": iv, + "xv": xv, + "yv": yv, + }, + block = "vertices", + shape = "(nvert)", + reader = "urword", + optional = False, + longname = +"""vertices data""", + description = +"""""", + ) + + icell2d = MFInteger( + type = "integer", + block = "cell2d", + shape = "", + reader = "urword", + optional = False, + longname = +"""cell2d number""", + description = +"""is the CELL2D number. Records in the CELL2D block must be listed in +consecutive order from the first to the last.""", + ) + + xc = MFDouble( + type = "double", + block = "cell2d", + shape = "", + reader = "urword", + optional = False, + longname = +"""x-coordinate for cell center""", + description = +"""is the x-coordinate for the cell center.""", + ) + + yc = MFDouble( + type = "double", + block = "cell2d", + shape = "", + reader = "urword", + optional = False, + longname = +"""y-coordinate for cell center""", + description = +"""is the y-coordinate for the cell center.""", + ) + + ncvert = MFInteger( + type = "integer", + block = "cell2d", + shape = "", + reader = "urword", + optional = False, + longname = +"""number of cell vertices""", + description = +"""is the number of vertices required to define the cell. There may be a +different number of vertices for each cell.""", + ) + + icvert = MFArray( + type = "integer", + block = "cell2d", + shape = "(ncvert)", + reader = "urword", + optional = False, + longname = +"""array of vertex numbers""", + 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.""", + ) + + cell2d = MFList( + type = "recarray", + params = { + "icell2d": icell2d, + "xc": xc, + "yc": yc, + "ncvert": ncvert, + "icvert": icvert, + }, + block = "cell2d", + shape = "(ncpl)", + reader = "urword", + optional = False, + longname = +"""cell2d data""", + description = +"""""", + ) \ No newline at end of file diff --git a/flopy4/ispec/prt_model.py b/flopy4/ispec/prt_model.py index cc4454ba..f3322258 100644 --- a/flopy4/ispec/prt_model.py +++ b/flopy4/ispec/prt_model.py @@ -2,9 +2,11 @@ from flopy4.model import MFModel from flopy4.resolver import Resolve from flopy4.ispec.prt_dis import PrtDis +from flopy4.ispec.prt_disv import PrtDisv from flopy4.ispec.prt_prp import PrtPrp class PrtModel(MFModel, Resolve): dis6 = PrtDis() + disv6 = PrtDisv() prp6 = PrtPrp() diff --git a/spec/dfn/gwe-disv.dfn b/spec/dfn/gwe-disv.dfn new file mode 100644 index 00000000..9216bb24 --- /dev/null +++ b/spec/dfn/gwe-disv.dfn @@ -0,0 +1,263 @@ +# --------------------- gwe disv options --------------------- +# mf6 subpackage utl-ncf + +block options +name length_units +type string +reader urword +optional true +longname model length units +description is the length units used for this model. Values can be ``FEET'', ``METERS'', or ``CENTIMETERS''. If not specified, the default is ``UNKNOWN''. + +block options +name nogrb +type keyword +reader urword +optional true +longname do not write binary grid file +description keyword to deactivate writing of the binary grid file. + +block options +name xorigin +type double precision +reader urword +optional true +longname x-position origin of the model grid coordinate system +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. + +block options +name yorigin +type double precision +reader urword +optional true +longname y-position origin of the model grid coordinate system +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. + +block options +name angrot +type double precision +reader urword +optional true +longname rotation angle +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. + +block options +name export_array_ascii +type keyword +reader urword +optional true +mf6internal export_ascii +longname export array variables to layered ascii files. +description keyword that specifies input griddata arrays should be written to layered ascii output files. + +block options +name export_array_netcdf +type keyword +reader urword +optional true +mf6internal export_nc +longname export array variables to netcdf output files. +description keyword that specifies input griddata arrays should be written to the model output netcdf file. + +block options +name ncf_filerecord +type record ncf6 filein ncf6_filename +reader urword +tagged true +optional true +longname +description + +block options +name ncf6 +type keyword +in_record true +reader urword +tagged true +optional false +longname ncf keyword +description keyword to specify that record corresponds to a netcdf configuration (NCF) file. + +block options +name filein +type keyword +in_record true +reader urword +tagged true +optional false +longname file keyword +description keyword to specify that an input filename is expected next. + +block options +name ncf6_filename +type string +preserve_case true +in_record true +reader urword +optional false +tagged false +longname file name of NCF information +description defines a netcdf configuration (NCF) input file. + +# --------------------- gwe disv dimensions --------------------- + +block dimensions +name nlay +type integer +reader urword +optional false +longname number of layers +description is the number of layers in the model grid. + +block dimensions +name ncpl +type integer +reader urword +optional false +longname number of cells per layer +description is the number of cells per layer. This is a constant value for the grid and it applies to all layers. + +block dimensions +name nvert +type integer +reader urword +optional false +longname number of columns +description is the total number of (x, y) vertex pairs used to characterize the horizontal configuration of the model grid. + +# --------------------- gwe disv griddata --------------------- + +block griddata +name top +type double precision +shape (ncpl) +reader readarray +longname model top elevation +description is the top elevation for each cell in the top model layer. + +block griddata +name botm +type double precision +shape (ncpl, nlay) +reader readarray +layered true +longname model bottom elevation +description is the bottom elevation for each cell. + +block griddata +name idomain +type integer +shape (ncpl, nlay) +reader readarray +layered true +optional true +longname idomain existence array +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. + + +# --------------------- gwe disv vertices --------------------- + +block vertices +name vertices +type recarray iv xv yv +shape (nvert) +reader urword +optional false +longname vertices data +description + +block vertices +name iv +type integer +in_record true +tagged false +reader urword +optional false +longname vertex number +description is the vertex number. Records in the VERTICES block must be listed in consecutive order from 1 to NVERT. +numeric_index true + +block vertices +name xv +type double precision +in_record true +tagged false +reader urword +optional false +longname x-coordinate for vertex +description is the x-coordinate for the vertex. + +block vertices +name yv +type double precision +in_record true +tagged false +reader urword +optional false +longname y-coordinate for vertex +description is the y-coordinate for the vertex. + + +# --------------------- gwe disv cell2d --------------------- + +block cell2d +name cell2d +type recarray icell2d xc yc ncvert icvert +shape (ncpl) +reader urword +optional false +longname cell2d data +description + +block cell2d +name icell2d +type integer +in_record true +tagged false +reader urword +optional false +longname cell2d number +description is the CELL2D number. Records in the CELL2D block must be listed in consecutive order from the first to the last. +numeric_index true + +block cell2d +name xc +type double precision +in_record true +tagged false +reader urword +optional false +longname x-coordinate for cell center +description is the x-coordinate for the cell center. + +block cell2d +name yc +type double precision +in_record true +tagged false +reader urword +optional false +longname y-coordinate for cell center +description is the y-coordinate for the cell center. + +block cell2d +name ncvert +type integer +in_record true +tagged false +reader urword +optional false +longname number of cell vertices +description is the number of vertices required to define the cell. There may be a different number of vertices for each cell. + +block cell2d +name icvert +type integer +shape (ncvert) +in_record true +tagged false +reader urword +optional false +longname array of vertex numbers +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. +numeric_index true diff --git a/spec/dfn/gwf-disv.dfn b/spec/dfn/gwf-disv.dfn new file mode 100644 index 00000000..fe3a70db --- /dev/null +++ b/spec/dfn/gwf-disv.dfn @@ -0,0 +1,263 @@ +# --------------------- gwf disv options --------------------- +# mf6 subpackage utl-ncf + +block options +name length_units +type string +reader urword +optional true +longname model length units +description is the length units used for this model. Values can be ``FEET'', ``METERS'', or ``CENTIMETERS''. If not specified, the default is ``UNKNOWN''. + +block options +name nogrb +type keyword +reader urword +optional true +longname do not write binary grid file +description keyword to deactivate writing of the binary grid file. + +block options +name xorigin +type double precision +reader urword +optional true +longname x-position origin of the model grid coordinate system +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. + +block options +name yorigin +type double precision +reader urword +optional true +longname y-position origin of the model grid coordinate system +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. + +block options +name angrot +type double precision +reader urword +optional true +longname rotation angle +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. + +block options +name export_array_ascii +type keyword +reader urword +optional true +mf6internal export_ascii +longname export array variables to layered ascii files. +description keyword that specifies input griddata arrays should be written to layered ascii output files. + +block options +name export_array_netcdf +type keyword +reader urword +optional true +mf6internal export_nc +longname export array variables to netcdf output files. +description keyword that specifies input griddata arrays should be written to the model output netcdf file. + +block options +name ncf_filerecord +type record ncf6 filein ncf6_filename +reader urword +tagged true +optional true +longname +description + +block options +name ncf6 +type keyword +in_record true +reader urword +tagged true +optional false +longname ncf keyword +description keyword to specify that record corresponds to a netcdf configuration (NCF) file. + +block options +name filein +type keyword +in_record true +reader urword +tagged true +optional false +longname file keyword +description keyword to specify that an input filename is expected next. + +block options +name ncf6_filename +type string +preserve_case true +in_record true +reader urword +optional false +tagged false +longname file name of NCF information +description defines a netcdf configuration (NCF) input file. + +# --------------------- gwf disv dimensions --------------------- + +block dimensions +name nlay +type integer +reader urword +optional false +longname number of layers +description is the number of layers in the model grid. + +block dimensions +name ncpl +type integer +reader urword +optional false +longname number of cells per layer +description is the number of cells per layer. This is a constant value for the grid and it applies to all layers. + +block dimensions +name nvert +type integer +reader urword +optional false +longname number of columns +description is the total number of (x, y) vertex pairs used to characterize the horizontal configuration of the model grid. + +# --------------------- gwf disv griddata --------------------- + +block griddata +name top +type double precision +shape (ncpl) +reader readarray +longname model top elevation +description is the top elevation for each cell in the top model layer. + +block griddata +name botm +type double precision +shape (ncpl, nlay) +reader readarray +layered true +longname model bottom elevation +description is the bottom elevation for each cell. + +block griddata +name idomain +type integer +shape (ncpl, nlay) +reader readarray +layered true +optional true +longname idomain existence array +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. + + +# --------------------- gwf disv vertices --------------------- + +block vertices +name vertices +type recarray iv xv yv +shape (nvert) +reader urword +optional false +longname vertices data +description + +block vertices +name iv +type integer +in_record true +tagged false +reader urword +optional false +longname vertex number +description is the vertex number. Records in the VERTICES block must be listed in consecutive order from 1 to NVERT. +numeric_index true + +block vertices +name xv +type double precision +in_record true +tagged false +reader urword +optional false +longname x-coordinate for vertex +description is the x-coordinate for the vertex. + +block vertices +name yv +type double precision +in_record true +tagged false +reader urword +optional false +longname y-coordinate for vertex +description is the y-coordinate for the vertex. + + +# --------------------- gwf disv cell2d --------------------- + +block cell2d +name cell2d +type recarray icell2d xc yc ncvert icvert +shape (ncpl) +reader urword +optional false +longname cell2d data +description + +block cell2d +name icell2d +type integer +in_record true +tagged false +reader urword +optional false +longname cell2d number +description is the CELL2D number. Records in the CELL2D block must be listed in consecutive order from the first to the last. +numeric_index true + +block cell2d +name xc +type double precision +in_record true +tagged false +reader urword +optional false +longname x-coordinate for cell center +description is the x-coordinate for the cell center. + +block cell2d +name yc +type double precision +in_record true +tagged false +reader urword +optional false +longname y-coordinate for cell center +description is the y-coordinate for the cell center. + +block cell2d +name ncvert +type integer +in_record true +tagged false +reader urword +optional false +longname number of cell vertices +description is the number of vertices required to define the cell. There may be a different number of vertices for each cell. + +block cell2d +name icvert +type integer +shape (ncvert) +in_record true +tagged false +reader urword +optional false +longname array of vertex numbers +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. +numeric_index true diff --git a/spec/dfn/gwt-disv.dfn b/spec/dfn/gwt-disv.dfn new file mode 100644 index 00000000..119f33bd --- /dev/null +++ b/spec/dfn/gwt-disv.dfn @@ -0,0 +1,263 @@ +# --------------------- gwt disv options --------------------- +# mf6 subpackage utl-ncf + +block options +name length_units +type string +reader urword +optional true +longname model length units +description is the length units used for this model. Values can be ``FEET'', ``METERS'', or ``CENTIMETERS''. If not specified, the default is ``UNKNOWN''. + +block options +name nogrb +type keyword +reader urword +optional true +longname do not write binary grid file +description keyword to deactivate writing of the binary grid file. + +block options +name xorigin +type double precision +reader urword +optional true +longname x-position origin of the model grid coordinate system +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. + +block options +name yorigin +type double precision +reader urword +optional true +longname y-position origin of the model grid coordinate system +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. + +block options +name angrot +type double precision +reader urword +optional true +longname rotation angle +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. + +block options +name export_array_ascii +type keyword +reader urword +optional true +mf6internal export_ascii +longname export array variables to layered ascii files. +description keyword that specifies input griddata arrays should be written to layered ascii output files. + +block options +name export_array_netcdf +type keyword +reader urword +optional true +mf6internal export_nc +longname export array variables to netcdf output files. +description keyword that specifies input griddata arrays should be written to the model output netcdf file. + +block options +name ncf_filerecord +type record ncf6 filein ncf6_filename +reader urword +tagged true +optional true +longname +description + +block options +name ncf6 +type keyword +in_record true +reader urword +tagged true +optional false +longname ncf keyword +description keyword to specify that record corresponds to a netcdf configuration (NCF) file. + +block options +name filein +type keyword +in_record true +reader urword +tagged true +optional false +longname file keyword +description keyword to specify that an input filename is expected next. + +block options +name ncf6_filename +type string +preserve_case true +in_record true +reader urword +optional false +tagged false +longname file name of NCF information +description defines a netcdf configuration (NCF) input file. + +# --------------------- gwt disv dimensions --------------------- + +block dimensions +name nlay +type integer +reader urword +optional false +longname number of layers +description is the number of layers in the model grid. + +block dimensions +name ncpl +type integer +reader urword +optional false +longname number of cells per layer +description is the number of cells per layer. This is a constant value for the grid and it applies to all layers. + +block dimensions +name nvert +type integer +reader urword +optional false +longname number of columns +description is the total number of (x, y) vertex pairs used to characterize the horizontal configuration of the model grid. + +# --------------------- gwt disv griddata --------------------- + +block griddata +name top +type double precision +shape (ncpl) +reader readarray +longname model top elevation +description is the top elevation for each cell in the top model layer. + +block griddata +name botm +type double precision +shape (ncpl, nlay) +reader readarray +layered true +longname model bottom elevation +description is the bottom elevation for each cell. + +block griddata +name idomain +type integer +shape (ncpl, nlay) +reader readarray +layered true +optional true +longname idomain existence array +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. + + +# --------------------- gwt disv vertices --------------------- + +block vertices +name vertices +type recarray iv xv yv +shape (nvert) +reader urword +optional false +longname vertices data +description + +block vertices +name iv +type integer +in_record true +tagged false +reader urword +optional false +longname vertex number +description is the vertex number. Records in the VERTICES block must be listed in consecutive order from 1 to NVERT. +numeric_index true + +block vertices +name xv +type double precision +in_record true +tagged false +reader urword +optional false +longname x-coordinate for vertex +description is the x-coordinate for the vertex. + +block vertices +name yv +type double precision +in_record true +tagged false +reader urword +optional false +longname y-coordinate for vertex +description is the y-coordinate for the vertex. + + +# --------------------- gwt disv cell2d --------------------- + +block cell2d +name cell2d +type recarray icell2d xc yc ncvert icvert +shape (ncpl) +reader urword +optional false +longname cell2d data +description + +block cell2d +name icell2d +type integer +in_record true +tagged false +reader urword +optional false +longname cell2d number +description is the CELL2D number. Records in the CELL2D block must be listed in consecutive order from the first to the last. +numeric_index true + +block cell2d +name xc +type double precision +in_record true +tagged false +reader urword +optional false +longname x-coordinate for cell center +description is the x-coordinate for the cell center. + +block cell2d +name yc +type double precision +in_record true +tagged false +reader urword +optional false +longname y-coordinate for cell center +description is the y-coordinate for the cell center. + +block cell2d +name ncvert +type integer +in_record true +tagged false +reader urword +optional false +longname number of cell vertices +description is the number of vertices required to define the cell. There may be a different number of vertices for each cell. + +block cell2d +name icvert +type integer +shape (ncvert) +in_record true +tagged false +reader urword +optional false +longname array of vertex numbers +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. +numeric_index true diff --git a/spec/dfn/prt-disv.dfn b/spec/dfn/prt-disv.dfn new file mode 100644 index 00000000..540d70a0 --- /dev/null +++ b/spec/dfn/prt-disv.dfn @@ -0,0 +1,262 @@ +# --------------------- prt disv options --------------------- + +block options +name length_units +type string +reader urword +optional true +longname model length units +description is the length units used for this model. Values can be ``FEET'', ``METERS'', or ``CENTIMETERS''. If not specified, the default is ``UNKNOWN''. + +block options +name nogrb +type keyword +reader urword +optional true +longname do not write binary grid file +description keyword to deactivate writing of the binary grid file. + +block options +name xorigin +type double precision +reader urword +optional true +longname x-position origin of the model grid coordinate system +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. + +block options +name yorigin +type double precision +reader urword +optional true +longname y-position origin of the model grid coordinate system +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. + +block options +name angrot +type double precision +reader urword +optional true +longname rotation angle +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. + +block options +name export_array_ascii +type keyword +reader urword +optional true +mf6internal export_ascii +longname export array variables to layered ascii files. +description keyword that specifies input griddata arrays should be written to layered ascii output files. + +block options +name export_array_netcdf +type keyword +reader urword +optional true +mf6internal export_nc +longname export array variables to netcdf output files. +description keyword that specifies input griddata arrays should be written to the model output netcdf file. + +block options +name ncf_filerecord +type record ncf6 filein ncf6_filename +reader urword +tagged true +optional true +longname +description + +block options +name ncf6 +type keyword +in_record true +reader urword +tagged true +optional false +longname ncf keyword +description keyword to specify that record corresponds to a netcdf configuration (NCF) file. + +block options +name filein +type keyword +in_record true +reader urword +tagged true +optional false +longname file keyword +description keyword to specify that an input filename is expected next. + +block options +name ncf6_filename +type string +preserve_case true +in_record true +reader urword +optional false +tagged false +longname file name of NCF information +description defines a netcdf configuration (NCF) input file. + +# --------------------- prt disv dimensions --------------------- + +block dimensions +name nlay +type integer +reader urword +optional false +longname number of layers +description is the number of layers in the model grid. + +block dimensions +name ncpl +type integer +reader urword +optional false +longname number of cells per layer +description is the number of cells per layer. This is a constant value for the grid and it applies to all layers. + +block dimensions +name nvert +type integer +reader urword +optional false +longname number of columns +description is the total number of (x, y) vertex pairs used to characterize the horizontal configuration of the model grid. + +# --------------------- prt disv griddata --------------------- + +block griddata +name top +type double precision +shape (ncpl) +reader readarray +longname model top elevation +description is the top elevation for each cell in the top model layer. + +block griddata +name botm +type double precision +shape (ncpl, nlay) +reader readarray +layered true +longname model bottom elevation +description is the bottom elevation for each cell. + +block griddata +name idomain +type integer +shape (ncpl, nlay) +reader readarray +layered true +optional true +longname idomain existence array +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. + + +# --------------------- prt disv vertices --------------------- + +block vertices +name vertices +type recarray iv xv yv +shape (nvert) +reader urword +optional false +longname vertices data +description + +block vertices +name iv +type integer +in_record true +tagged false +reader urword +optional false +longname vertex number +description is the vertex number. Records in the VERTICES block must be listed in consecutive order from 1 to NVERT. +numeric_index true + +block vertices +name xv +type double precision +in_record true +tagged false +reader urword +optional false +longname x-coordinate for vertex +description is the x-coordinate for the vertex. + +block vertices +name yv +type double precision +in_record true +tagged false +reader urword +optional false +longname y-coordinate for vertex +description is the y-coordinate for the vertex. + + +# --------------------- prt disv cell2d --------------------- + +block cell2d +name cell2d +type recarray icell2d xc yc ncvert icvert +shape (ncpl) +reader urword +optional false +longname cell2d data +description + +block cell2d +name icell2d +type integer +in_record true +tagged false +reader urword +optional false +longname cell2d number +description is the CELL2D number. Records in the CELL2D block must be listed in consecutive order from the first to the last. +numeric_index true + +block cell2d +name xc +type double precision +in_record true +tagged false +reader urword +optional false +longname x-coordinate for cell center +description is the x-coordinate for the cell center. + +block cell2d +name yc +type double precision +in_record true +tagged false +reader urword +optional false +longname y-coordinate for cell center +description is the y-coordinate for the cell center. + +block cell2d +name ncvert +type integer +in_record true +tagged false +reader urword +optional false +longname number of cell vertices +description is the number of vertices required to define the cell. There may be a different number of vertices for each cell. + +block cell2d +name icvert +type integer +shape (ncvert) +in_record true +tagged false +reader urword +optional false +longname array of vertex numbers +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. +numeric_index true diff --git a/spec/make_ispec.py b/spec/make_ispec.py index dd438e40..2476a5c3 100644 --- a/spec/make_ispec.py +++ b/spec/make_ispec.py @@ -82,7 +82,7 @@ def __init__( typelist.clear() break else: - raise ValueError(f"Cannot add record type => {t}") + raise ValueError(f"Cannot add record type => {ptype}") if ptype.startswith("record"): tin["block"][b][blkparam]["rectypes"] = typelist else: diff --git a/spec/toml/gwe-disv.toml b/spec/toml/gwe-disv.toml new file mode 100644 index 00000000..2aa83630 --- /dev/null +++ b/spec/toml/gwe-disv.toml @@ -0,0 +1,465 @@ +component = "GWE" +subcomponent = "DISV" +blocknames = [ "options", "dimensions", "griddata", "vertices", "cell2d",] +multipkg = false +stress = false +advanced = false + +[block.options.length_units] +type = "string" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "model length units" +description = "is the length units used for this model. Values can be ``FEET'', ``METERS'', or ``CENTIMETERS''. If not specified, the default is ``UNKNOWN''." +deprecated = "" + +[block.options.nogrb] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "do not write binary grid file" +description = "keyword to deactivate writing of the binary grid file." +deprecated = "" + +[block.options.xorigin] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "x-position origin of the model grid coordinate system" +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." +deprecated = "" + +[block.options.yorigin] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "y-position origin of the model grid coordinate system" +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." +deprecated = "" + +[block.options.angrot] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "rotation angle" +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." +deprecated = "" + +[block.options.export_array_ascii] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "export array variables to layered ascii files." +description = "keyword that specifies input griddata arrays should be written to layered ascii output files." +deprecated = "" + +[block.options.export_array_netcdf] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "export array variables to netcdf output files." +description = "keyword that specifies input griddata arrays should be written to the model output netcdf file." +deprecated = "" + +[block.options.ncf_filerecord] +type = "record ncf6 filein ncf6_filename" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "" +description = "" +deprecated = "" + +[block.options.ncf6] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "ncf keyword" +description = "keyword to specify that record corresponds to a netcdf configuration (NCF) file." +deprecated = "" + +[block.options.filein] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "file keyword" +description = "keyword to specify that an input filename is expected next." +deprecated = "" + +[block.options.ncf6_filename] +type = "string" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = true +numeric_index = false +longname = "file name of NCF information" +description = "defines a netcdf configuration (NCF) input file." +deprecated = "" + +[block.dimensions.nlay] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "number of layers" +description = "is the number of layers in the model grid." +deprecated = "" + +[block.dimensions.ncpl] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "number of cells per layer" +description = "is the number of cells per layer. This is a constant value for the grid and it applies to all layers." +deprecated = "" + +[block.dimensions.nvert] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "number of columns" +description = "is the total number of (x, y) vertex pairs used to characterize the horizontal configuration of the model grid." +deprecated = "" + +[block.griddata.top] +type = "double" +block_variable = false +valid = [] +shape = "(ncpl)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "readarray" +optional = false +preserve_case = false +numeric_index = false +longname = "model top elevation" +description = "is the top elevation for each cell in the top model layer." +deprecated = "" + +[block.griddata.botm] +type = "double" +block_variable = false +valid = [] +shape = "(ncpl, nlay)" +tagged = true +in_record = false +layered = true +time_series = false +reader = "readarray" +optional = false +preserve_case = false +numeric_index = false +longname = "model bottom elevation" +description = "is the bottom elevation for each cell." +deprecated = "" + +[block.griddata.idomain] +type = "integer" +block_variable = false +valid = [] +shape = "(ncpl, nlay)" +tagged = true +in_record = false +layered = true +time_series = false +reader = "readarray" +optional = true +preserve_case = false +numeric_index = false +longname = "idomain existence array" +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." +deprecated = "" + +[block.vertices.iv] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = true +longname = "vertex number" +description = "is the vertex number. Records in the VERTICES block must be listed in consecutive order from 1 to NVERT." +deprecated = "" + +[block.vertices.xv] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "x-coordinate for vertex" +description = "is the x-coordinate for the vertex." +deprecated = "" + +[block.vertices.yv] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "y-coordinate for vertex" +description = "is the y-coordinate for the vertex." +deprecated = "" + +[block.vertices.vertices] +type = "recarray iv xv yv" +block_variable = false +valid = [] +shape = "(nvert)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "vertices data" +description = "" +deprecated = "" + +[block.cell2d.icell2d] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = true +longname = "cell2d number" +description = "is the CELL2D number. Records in the CELL2D block must be listed in consecutive order from the first to the last." +deprecated = "" + +[block.cell2d.xc] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "x-coordinate for cell center" +description = "is the x-coordinate for the cell center." +deprecated = "" + +[block.cell2d.yc] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "y-coordinate for cell center" +description = "is the y-coordinate for the cell center." +deprecated = "" + +[block.cell2d.ncvert] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "number of cell vertices" +description = "is the number of vertices required to define the cell. There may be a different number of vertices for each cell." +deprecated = "" + +[block.cell2d.icvert] +type = "integer" +block_variable = false +valid = [] +shape = "(ncvert)" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = true +longname = "array of vertex numbers" +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." +deprecated = "" + +[block.cell2d.cell2d] +type = "recarray icell2d xc yc ncvert icvert" +block_variable = false +valid = [] +shape = "(ncpl)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "cell2d data" +description = "" +deprecated = "" diff --git a/spec/toml/gwf-disv.toml b/spec/toml/gwf-disv.toml new file mode 100644 index 00000000..69d0425b --- /dev/null +++ b/spec/toml/gwf-disv.toml @@ -0,0 +1,465 @@ +component = "GWF" +subcomponent = "DISV" +blocknames = [ "options", "dimensions", "griddata", "vertices", "cell2d",] +multipkg = false +stress = false +advanced = false + +[block.options.length_units] +type = "string" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "model length units" +description = "is the length units used for this model. Values can be ``FEET'', ``METERS'', or ``CENTIMETERS''. If not specified, the default is ``UNKNOWN''." +deprecated = "" + +[block.options.nogrb] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "do not write binary grid file" +description = "keyword to deactivate writing of the binary grid file." +deprecated = "" + +[block.options.xorigin] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "x-position origin of the model grid coordinate system" +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." +deprecated = "" + +[block.options.yorigin] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "y-position origin of the model grid coordinate system" +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." +deprecated = "" + +[block.options.angrot] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "rotation angle" +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." +deprecated = "" + +[block.options.export_array_ascii] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "export array variables to layered ascii files." +description = "keyword that specifies input griddata arrays should be written to layered ascii output files." +deprecated = "" + +[block.options.export_array_netcdf] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "export array variables to netcdf output files." +description = "keyword that specifies input griddata arrays should be written to the model output netcdf file." +deprecated = "" + +[block.options.ncf_filerecord] +type = "record ncf6 filein ncf6_filename" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "" +description = "" +deprecated = "" + +[block.options.ncf6] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "ncf keyword" +description = "keyword to specify that record corresponds to a netcdf configuration (NCF) file." +deprecated = "" + +[block.options.filein] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "file keyword" +description = "keyword to specify that an input filename is expected next." +deprecated = "" + +[block.options.ncf6_filename] +type = "string" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = true +numeric_index = false +longname = "file name of NCF information" +description = "defines a netcdf configuration (NCF) input file." +deprecated = "" + +[block.dimensions.nlay] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "number of layers" +description = "is the number of layers in the model grid." +deprecated = "" + +[block.dimensions.ncpl] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "number of cells per layer" +description = "is the number of cells per layer. This is a constant value for the grid and it applies to all layers." +deprecated = "" + +[block.dimensions.nvert] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "number of columns" +description = "is the total number of (x, y) vertex pairs used to characterize the horizontal configuration of the model grid." +deprecated = "" + +[block.griddata.top] +type = "double" +block_variable = false +valid = [] +shape = "(ncpl)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "readarray" +optional = false +preserve_case = false +numeric_index = false +longname = "model top elevation" +description = "is the top elevation for each cell in the top model layer." +deprecated = "" + +[block.griddata.botm] +type = "double" +block_variable = false +valid = [] +shape = "(ncpl, nlay)" +tagged = true +in_record = false +layered = true +time_series = false +reader = "readarray" +optional = false +preserve_case = false +numeric_index = false +longname = "model bottom elevation" +description = "is the bottom elevation for each cell." +deprecated = "" + +[block.griddata.idomain] +type = "integer" +block_variable = false +valid = [] +shape = "(ncpl, nlay)" +tagged = true +in_record = false +layered = true +time_series = false +reader = "readarray" +optional = true +preserve_case = false +numeric_index = false +longname = "idomain existence array" +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." +deprecated = "" + +[block.vertices.iv] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = true +longname = "vertex number" +description = "is the vertex number. Records in the VERTICES block must be listed in consecutive order from 1 to NVERT." +deprecated = "" + +[block.vertices.xv] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "x-coordinate for vertex" +description = "is the x-coordinate for the vertex." +deprecated = "" + +[block.vertices.yv] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "y-coordinate for vertex" +description = "is the y-coordinate for the vertex." +deprecated = "" + +[block.vertices.vertices] +type = "recarray iv xv yv" +block_variable = false +valid = [] +shape = "(nvert)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "vertices data" +description = "" +deprecated = "" + +[block.cell2d.icell2d] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = true +longname = "cell2d number" +description = "is the CELL2D number. Records in the CELL2D block must be listed in consecutive order from the first to the last." +deprecated = "" + +[block.cell2d.xc] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "x-coordinate for cell center" +description = "is the x-coordinate for the cell center." +deprecated = "" + +[block.cell2d.yc] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "y-coordinate for cell center" +description = "is the y-coordinate for the cell center." +deprecated = "" + +[block.cell2d.ncvert] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "number of cell vertices" +description = "is the number of vertices required to define the cell. There may be a different number of vertices for each cell." +deprecated = "" + +[block.cell2d.icvert] +type = "integer" +block_variable = false +valid = [] +shape = "(ncvert)" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = true +longname = "array of vertex numbers" +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." +deprecated = "" + +[block.cell2d.cell2d] +type = "recarray icell2d xc yc ncvert icvert" +block_variable = false +valid = [] +shape = "(ncpl)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "cell2d data" +description = "" +deprecated = "" diff --git a/spec/toml/gwt-disv.toml b/spec/toml/gwt-disv.toml new file mode 100644 index 00000000..f7f0f58d --- /dev/null +++ b/spec/toml/gwt-disv.toml @@ -0,0 +1,465 @@ +component = "GWT" +subcomponent = "DISV" +blocknames = [ "options", "dimensions", "griddata", "vertices", "cell2d",] +multipkg = false +stress = false +advanced = false + +[block.options.length_units] +type = "string" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "model length units" +description = "is the length units used for this model. Values can be ``FEET'', ``METERS'', or ``CENTIMETERS''. If not specified, the default is ``UNKNOWN''." +deprecated = "" + +[block.options.nogrb] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "do not write binary grid file" +description = "keyword to deactivate writing of the binary grid file." +deprecated = "" + +[block.options.xorigin] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "x-position origin of the model grid coordinate system" +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." +deprecated = "" + +[block.options.yorigin] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "y-position origin of the model grid coordinate system" +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." +deprecated = "" + +[block.options.angrot] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "rotation angle" +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." +deprecated = "" + +[block.options.export_array_ascii] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "export array variables to layered ascii files." +description = "keyword that specifies input griddata arrays should be written to layered ascii output files." +deprecated = "" + +[block.options.export_array_netcdf] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "export array variables to netcdf output files." +description = "keyword that specifies input griddata arrays should be written to the model output netcdf file." +deprecated = "" + +[block.options.ncf_filerecord] +type = "record ncf6 filein ncf6_filename" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "" +description = "" +deprecated = "" + +[block.options.ncf6] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "ncf keyword" +description = "keyword to specify that record corresponds to a netcdf configuration (NCF) file." +deprecated = "" + +[block.options.filein] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "file keyword" +description = "keyword to specify that an input filename is expected next." +deprecated = "" + +[block.options.ncf6_filename] +type = "string" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = true +numeric_index = false +longname = "file name of NCF information" +description = "defines a netcdf configuration (NCF) input file." +deprecated = "" + +[block.dimensions.nlay] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "number of layers" +description = "is the number of layers in the model grid." +deprecated = "" + +[block.dimensions.ncpl] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "number of cells per layer" +description = "is the number of cells per layer. This is a constant value for the grid and it applies to all layers." +deprecated = "" + +[block.dimensions.nvert] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "number of columns" +description = "is the total number of (x, y) vertex pairs used to characterize the horizontal configuration of the model grid." +deprecated = "" + +[block.griddata.top] +type = "double" +block_variable = false +valid = [] +shape = "(ncpl)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "readarray" +optional = false +preserve_case = false +numeric_index = false +longname = "model top elevation" +description = "is the top elevation for each cell in the top model layer." +deprecated = "" + +[block.griddata.botm] +type = "double" +block_variable = false +valid = [] +shape = "(ncpl, nlay)" +tagged = true +in_record = false +layered = true +time_series = false +reader = "readarray" +optional = false +preserve_case = false +numeric_index = false +longname = "model bottom elevation" +description = "is the bottom elevation for each cell." +deprecated = "" + +[block.griddata.idomain] +type = "integer" +block_variable = false +valid = [] +shape = "(ncpl, nlay)" +tagged = true +in_record = false +layered = true +time_series = false +reader = "readarray" +optional = true +preserve_case = false +numeric_index = false +longname = "idomain existence array" +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." +deprecated = "" + +[block.vertices.iv] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = true +longname = "vertex number" +description = "is the vertex number. Records in the VERTICES block must be listed in consecutive order from 1 to NVERT." +deprecated = "" + +[block.vertices.xv] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "x-coordinate for vertex" +description = "is the x-coordinate for the vertex." +deprecated = "" + +[block.vertices.yv] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "y-coordinate for vertex" +description = "is the y-coordinate for the vertex." +deprecated = "" + +[block.vertices.vertices] +type = "recarray iv xv yv" +block_variable = false +valid = [] +shape = "(nvert)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "vertices data" +description = "" +deprecated = "" + +[block.cell2d.icell2d] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = true +longname = "cell2d number" +description = "is the CELL2D number. Records in the CELL2D block must be listed in consecutive order from the first to the last." +deprecated = "" + +[block.cell2d.xc] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "x-coordinate for cell center" +description = "is the x-coordinate for the cell center." +deprecated = "" + +[block.cell2d.yc] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "y-coordinate for cell center" +description = "is the y-coordinate for the cell center." +deprecated = "" + +[block.cell2d.ncvert] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "number of cell vertices" +description = "is the number of vertices required to define the cell. There may be a different number of vertices for each cell." +deprecated = "" + +[block.cell2d.icvert] +type = "integer" +block_variable = false +valid = [] +shape = "(ncvert)" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = true +longname = "array of vertex numbers" +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." +deprecated = "" + +[block.cell2d.cell2d] +type = "recarray icell2d xc yc ncvert icvert" +block_variable = false +valid = [] +shape = "(ncpl)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "cell2d data" +description = "" +deprecated = "" diff --git a/spec/toml/prt-disv.toml b/spec/toml/prt-disv.toml new file mode 100644 index 00000000..f500561b --- /dev/null +++ b/spec/toml/prt-disv.toml @@ -0,0 +1,465 @@ +component = "PRT" +subcomponent = "DISV" +blocknames = [ "options", "dimensions", "griddata", "vertices", "cell2d",] +multipkg = false +stress = false +advanced = false + +[block.options.length_units] +type = "string" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "model length units" +description = "is the length units used for this model. Values can be ``FEET'', ``METERS'', or ``CENTIMETERS''. If not specified, the default is ``UNKNOWN''." +deprecated = "" + +[block.options.nogrb] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "do not write binary grid file" +description = "keyword to deactivate writing of the binary grid file." +deprecated = "" + +[block.options.xorigin] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "x-position origin of the model grid coordinate system" +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." +deprecated = "" + +[block.options.yorigin] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "y-position origin of the model grid coordinate system" +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." +deprecated = "" + +[block.options.angrot] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "rotation angle" +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." +deprecated = "" + +[block.options.export_array_ascii] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "export array variables to layered ascii files." +description = "keyword that specifies input griddata arrays should be written to layered ascii output files." +deprecated = "" + +[block.options.export_array_netcdf] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "export array variables to netcdf output files." +description = "keyword that specifies input griddata arrays should be written to the model output netcdf file." +deprecated = "" + +[block.options.ncf_filerecord] +type = "record ncf6 filein ncf6_filename" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = true +preserve_case = false +numeric_index = false +longname = "" +description = "" +deprecated = "" + +[block.options.ncf6] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "ncf keyword" +description = "keyword to specify that record corresponds to a netcdf configuration (NCF) file." +deprecated = "" + +[block.options.filein] +type = "keyword" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "file keyword" +description = "keyword to specify that an input filename is expected next." +deprecated = "" + +[block.options.ncf6_filename] +type = "string" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = true +numeric_index = false +longname = "file name of NCF information" +description = "defines a netcdf configuration (NCF) input file." +deprecated = "" + +[block.dimensions.nlay] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "number of layers" +description = "is the number of layers in the model grid." +deprecated = "" + +[block.dimensions.ncpl] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "number of cells per layer" +description = "is the number of cells per layer. This is a constant value for the grid and it applies to all layers." +deprecated = "" + +[block.dimensions.nvert] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "number of columns" +description = "is the total number of (x, y) vertex pairs used to characterize the horizontal configuration of the model grid." +deprecated = "" + +[block.griddata.top] +type = "double" +block_variable = false +valid = [] +shape = "(ncpl)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "readarray" +optional = false +preserve_case = false +numeric_index = false +longname = "model top elevation" +description = "is the top elevation for each cell in the top model layer." +deprecated = "" + +[block.griddata.botm] +type = "double" +block_variable = false +valid = [] +shape = "(ncpl, nlay)" +tagged = true +in_record = false +layered = true +time_series = false +reader = "readarray" +optional = false +preserve_case = false +numeric_index = false +longname = "model bottom elevation" +description = "is the bottom elevation for each cell." +deprecated = "" + +[block.griddata.idomain] +type = "integer" +block_variable = false +valid = [] +shape = "(ncpl, nlay)" +tagged = true +in_record = false +layered = true +time_series = false +reader = "readarray" +optional = true +preserve_case = false +numeric_index = false +longname = "idomain existence array" +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." +deprecated = "" + +[block.vertices.iv] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = true +longname = "vertex number" +description = "is the vertex number. Records in the VERTICES block must be listed in consecutive order from 1 to NVERT." +deprecated = "" + +[block.vertices.xv] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "x-coordinate for vertex" +description = "is the x-coordinate for the vertex." +deprecated = "" + +[block.vertices.yv] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "y-coordinate for vertex" +description = "is the y-coordinate for the vertex." +deprecated = "" + +[block.vertices.vertices] +type = "recarray iv xv yv" +block_variable = false +valid = [] +shape = "(nvert)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "vertices data" +description = "" +deprecated = "" + +[block.cell2d.icell2d] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = true +longname = "cell2d number" +description = "is the CELL2D number. Records in the CELL2D block must be listed in consecutive order from the first to the last." +deprecated = "" + +[block.cell2d.xc] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "x-coordinate for cell center" +description = "is the x-coordinate for the cell center." +deprecated = "" + +[block.cell2d.yc] +type = "double" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "y-coordinate for cell center" +description = "is the y-coordinate for the cell center." +deprecated = "" + +[block.cell2d.ncvert] +type = "integer" +block_variable = false +valid = [] +shape = "" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "number of cell vertices" +description = "is the number of vertices required to define the cell. There may be a different number of vertices for each cell." +deprecated = "" + +[block.cell2d.icvert] +type = "integer" +block_variable = false +valid = [] +shape = "(ncvert)" +tagged = false +in_record = true +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = true +longname = "array of vertex numbers" +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." +deprecated = "" + +[block.cell2d.cell2d] +type = "recarray icell2d xc yc ncvert icvert" +block_variable = false +valid = [] +shape = "(ncpl)" +tagged = true +in_record = false +layered = false +time_series = false +reader = "urword" +optional = false +preserve_case = false +numeric_index = false +longname = "cell2d data" +description = "" +deprecated = "" diff --git a/test/data/test_mf6model_0-disu01a_0/disu01a.disu b/test/data/test_mf6model_0-disu01a_0/disu01a.disu index f5b7e183..979cee0c 100644 --- a/test/data/test_mf6model_0-disu01a_0/disu01a.disu +++ b/test/data/test_mf6model_0-disu01a_0/disu01a.disu @@ -11,13 +11,16 @@ END dimensions BEGIN griddata top INTERNAL FACTOR 1.0 - 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 + 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -20.00000000 -20.00000000 + -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 bot INTERNAL FACTOR 1.0 - -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -30.00000000 -30.00000000 -30.00000000 -30.00000000 -30.00000000 -30.00000000 -30.00000000 -30.00000000 -30.00000000 + -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -30.00000000 -30.00000000 + -30.00000000 -30.00000000 -30.00000000 -30.00000000 -30.00000000 -30.00000000 -30.00000000 area INTERNAL FACTOR 1.0 - 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 + 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 + 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 END griddata BEGIN connectiondata diff --git a/test/data/test_mf6model_0-disu01a_0/disu01a.lst b/test/data/test_mf6model_0-disu01a_0/disu01a.lst deleted file mode 100644 index d854659d..00000000 --- a/test/data/test_mf6model_0-disu01a_0/disu01a.lst +++ /dev/null @@ -1,224 +0,0 @@ - MODFLOW 6 EXTENDED - U.S. GEOLOGICAL SURVEY MODULAR HYDROLOGIC MODEL - GROUNDWATER FLOW MODEL (GWF) - VERSION 6.6.0.dev0 (preliminary) 05/23/2024 - ***DEVELOP MODE*** - - MODFLOW 6 compiled Oct 16 2024 07:42:59 with GCC version 11.4.0 - -This software is preliminary or provisional and is subject to -revision. It is being provided to meet the need for timely best -science. The software has not received final approval by the U.S. -Geological Survey (USGS). No warranty, expressed or implied, is made -by the USGS or the U.S. Government as to the functionality of the -software and related material nor shall the fact of release -constitute any such warranty. The software is provided on the -condition that neither the USGS nor the U.S. Government shall be held -liable for any damages resulting from the authorized or unauthorized -use of the software. - - -As a work of the United States Government, this USGS product is -in the public domain within the United States. You can copy, -modify, distribute, and perform the work, even for commercial -purposes, all without asking permission. Additionally, USGS -waives copyright and related rights in the work worldwide -through CC0 1.0 Universal Public Domain Dedication -(https://creativecommons.org/publicdomain/zero/1.0/). - -The following GNU Lesser General Public License (LGPL) libraries -are used in this USGS product: - - SPARSKIT version 2.0 - ilut, luson, and qsplit - (https://www-users.cse.umn.edu/~saad/software/SPARSKIT/) - - RCM - Reverse Cuthill McKee Ordering - (https://people.math.sc.edu/Burkardt/f_src/rcm/rcm.html) - - BLAS - Basic Linear Algebra Subprograms Level 1 - (https://people.math.sc.edu/Burkardt/f_src/blas1_d/blas1_d.html) - - SPARSEKIT - Sparse Matrix Utility Package - amux, dperm, dvperm, rperm, and cperm - (https://people.sc.fsu.edu/~jburkardt/f77_src/sparsekit/sparsekit.html) - -The following BSD-3 License libraries are used in this USGS product: - - Modern Fortran DAG Library - Copyright (c) 2018, Jacob Williams - All rights reserved. - (https://github.com/jacobwilliams/daglib) - -The following library is used in this USGS product: - - NetCDF, network Common Data Form software library - Copyright (c) 1993-2014 University Corporation for Atmospheric - Research/Unidata. Redistribution and use in source and binary - forms, with or without modification, are permitted provided that - the conditions in the NetCDF copyright are met - (https://www.unidata.ucar.edu/software/netcdf/copyright.html) - -The following 2-clause BSD License library is used in this -USGS product: - - PETSc, the Portable, Extensible Toolkit for Scientific - Computation Library - Copyright (c) 1991-2021, UChicago Argonne, LLC - and the PETSc Development Team All rights reserved. - (https://petsc.org/release/) - -MODFLOW 6 compiler options: -fdiagnostics-color=always -cpp -I -src/libmf6core.a.p -I src -I ../src -I src/libmf6_external.a.p -I -/home/mjreno/.clone/external/petsc/arch-linux-c-debug/include -I -/home/mjreno/.clone/external/petsc/include -I -/home/mjreno/.clone/external/petsc/arch-linux-c-debug/lib -I /usr/include -I -/usr/include/hdf5/serial -imultiarch x86_64-linux-gnu -D _FILE_OFFSET_BITS=64 --D __linux__ -D __WITH_PETSC__ -D __WITH_MPI__ -D __WITH_NETCDF__ --mtune=generic -march=x86-64 -O2 -Wall -Wpedantic -Wcharacter-truncation --Wno-unused-dummy-argument -Wno-intrinsic-shadow -Wno-maybe-uninitialized --Wno-uninitialized -std=f2008 -fall-intrinsics -ffpe-summary=overflow --ffpe-trap=overflow,zero -fPIC -J src/libmf6core.a.p --fpre-include=/usr/include/finclude/math-vector-fortran.h - -System command used to initiate simulation: -/home/mjreno/.clone/usgs/modflow6/bin/mf6 mfsim.nam - -MODFLOW was compiled using uniform precision. - -Real Variables - KIND: 8 - TINY (smallest non-zero value): 2.225074-308 - HUGE (largest value): 1.797693+308 - PRECISION: 15 - SIZE IN BITS: 64 - -Integer Variables - KIND: 4 - HUGE (largest value): 2147483647 - SIZE IN BITS: 32 - -Long Integer Variables - KIND: 8 - HUGE (largest value): 9223372036854775807 - SIZE IN BITS: 64 - -Logical Variables - KIND: 4 - SIZE IN BITS: 32 - - NAMEFILE OPTIONS: - END NAMEFILE OPTIONS: - - DISU -- UNSTRUCTURED GRID DISCRETIZATION PACKAGE, VERSION 2 : 3/27/2014 - INPUT READ FROM MEMPATH: __INPUT__/DISU01A/DISU - - - Setting Discretization Options - VERTICAL_OFFSET_TOLERANCE = 0.0000000000000000 - End Setting Discretization Options - - Setting Discretization Dimensions - NODES = 27 - NJA = 135 - End Setting Discretization Dimensions - - Setting Discretization Griddata - TOP set from input file - BOT set from input file - AREA set from input file - End Setting Discretization Griddata - - Setting Discretization Connectivity - IAC set from input file - JA set from input file - IHC set from input file - CL12 set from input file - HWVA set from input file - End Setting Discretization Connectivity - - - NPF -- NODE PROPERTY FLOW PACKAGE, VERSION 1, 3/30/2015 INPUT READ FROM MEMPATH: __INPUT__/DISU01A/NPF - - - IC -- Initial Conditions Package, Version 8, 3/28/2015 input read from mempath: __INPUT__/DISU01A/IC - - - Setting NPF Options - End Setting NPF Options - - Setting NPF Griddata - ICELLTYPE set from input file - K set from input file - K33 not provided. Setting K33 = K. - K22 not provided. Setting K22 = K. - End Setting NPF Griddata - - - CHD -- CHD PACKAGE, VERSION 8, 2/22/2014 INPUT READ FROM MEMPATH: __INPUT__/DISU01A/CHD_0 - - PROCESSING CHD BASE OPTIONS - END OF CHD BASE OPTIONS - - PROCESSING CHD BASE DIMENSIONS - MAXBOUND = 2 - END OF CHD BASE DIMENSIONS - STRT set from input file - BINARY GRID INFORMATION WILL BE WRITTEN TO: - UNIT NUMBER: 1010 - FILE NAME: disu01a.disu.grb - - OPENED disu01a.disu.grb - FILE TYPE:DATA(BINARY) UNIT 1010 STATUS:REPLACE - FORMAT:UNFORMATTED ACCESS:STREAM - ACTION:READWRITE - - THE LAST TIME STEP WILL BE PRINTED - THE LAST TIME STEP WILL BE PRINTED - -start timestep kper="1" kstp="1" mode="normal" - -1 - HEAD IN LAYER 1 AT END OF TIME STEP 1 IN STRESS PERIOD 1 - --------------------------------------------------------------------------- - - 1 2 3 4 5 6 7 8 9 10 - 11 12 13 14 15 16 17 18 19 20 - 21 22 23 24 25 26 27 - .................................................................................................................................................................................................................................................................................................................................... - 1 1.000 0.6434 0.5000 0.6434 0.5000 0.3566 0.5000 0.3566 0.000 0.6838 - 0.5735 0.5000 0.5735 0.5000 0.4265 0.5000 0.4265 0.3162 0.5882 0.5404 - 0.5000 0.5404 0.5000 0.4596 0.5000 0.4596 0.4118 - - - VOLUME BUDGET FOR ENTIRE MODEL AT END OF TIME STEP 1, STRESS PERIOD 1 - --------------------------------------------------------------------------------------------------- - - CUMULATIVE VOLUME L**3 RATES FOR THIS TIME STEP L**3/T PACKAGE NAME - ------------------ ------------------------ ---------------- - - IN: IN: - --- --- - CHD = 10.2941 CHD = 10.2941 CHD_0 - - TOTAL IN = 10.2941 TOTAL IN = 10.2941 - - OUT: OUT: - ---- ---- - CHD = 10.2941 CHD = 10.2941 CHD_0 - - TOTAL OUT = 10.2941 TOTAL OUT = 10.2941 - - IN - OUT = 6.3459E-06 IN - OUT = 6.3459E-06 - - PERCENT DISCREPANCY = 0.00 PERCENT DISCREPANCY = 0.00 - - - - - TIME SUMMARY AT END OF TIME STEP 1 IN STRESS PERIOD 1 - TIME STEP LENGTH = 1.00000 - STRESS PERIOD TIME = 1.00000 - TOTAL SIMULATION TIME = 1.00000 - -end timestep - diff --git a/test/data/test_mf6model_0-disu01a_0/disu01a.orig.disu b/test/data/test_mf6model_0-disu01a_0/disu01a.orig.disu deleted file mode 100644 index 979cee0c..00000000 --- a/test/data/test_mf6model_0-disu01a_0/disu01a.orig.disu +++ /dev/null @@ -1,148 +0,0 @@ -# File generated by Flopy version 3.9.0.dev0 on 10/29/2024 at 08:36:29. -BEGIN options - VERTICAL_OFFSET_TOLERANCE 0.00000000 -END options - -BEGIN dimensions - NODES 27 - NJA 135 -END dimensions - -BEGIN griddata - top - INTERNAL FACTOR 1.0 - 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -20.00000000 -20.00000000 - -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 - bot - INTERNAL FACTOR 1.0 - -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -30.00000000 -30.00000000 - -30.00000000 -30.00000000 -30.00000000 -30.00000000 -30.00000000 -30.00000000 -30.00000000 - area - INTERNAL FACTOR 1.0 - 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 - 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000 -END griddata - -BEGIN connectiondata - iac - INTERNAL FACTOR 1 - 4 5 4 5 6 5 4 5 4 5 6 5 6 7 6 5 6 5 4 5 - 4 5 6 5 4 5 4 - ja - INTERNAL FACTOR 1 - 1 2 4 10 - 2 1 3 5 11 - 3 2 6 12 - 4 1 5 7 13 - 5 2 4 6 8 14 - 6 3 5 9 15 - 7 4 8 16 - 8 5 7 9 17 - 9 6 8 18 - 10 1 11 13 19 - 11 2 10 12 14 20 - 12 3 11 15 21 - 13 4 10 14 16 22 - 14 5 11 13 15 17 23 - 15 6 12 14 18 24 - 16 7 13 17 25 - 17 8 14 16 18 26 - 18 9 15 17 27 - 19 10 20 22 - 20 11 19 21 23 - 21 12 20 24 - 22 13 19 23 25 - 23 14 20 22 24 26 - 24 15 21 23 27 - 25 16 22 26 - 26 17 23 25 27 - 27 18 24 26 - ihc - INTERNAL FACTOR 1 - 1 1 1 0 - 1 1 1 1 0 - 1 1 1 0 - 1 1 1 1 0 - 1 1 1 1 1 0 - 1 1 1 1 0 - 1 1 1 0 - 1 1 1 1 0 - 1 1 1 0 - 2 0 1 1 0 - 2 0 1 1 1 0 - 2 0 1 1 0 - 2 0 1 1 1 0 - 2 0 1 1 1 1 0 - 2 0 1 1 1 0 - 2 0 1 1 0 - 2 0 1 1 1 0 - 2 0 1 1 0 - 3 0 1 1 - 3 0 1 1 1 - 3 0 1 1 - 3 0 1 1 1 - 3 0 1 1 1 1 - 3 0 1 1 1 - 3 0 1 1 - 3 0 1 1 1 - 3 0 1 1 - cl12 - INTERNAL FACTOR 1.0 - 1.00000000 5.00000000 5.00000000 5.00000000 - 2.00000000 5.00000000 5.00000000 5.00000000 5.00000000 - 3.00000000 5.00000000 5.00000000 5.00000000 - 4.00000000 5.00000000 5.00000000 5.00000000 5.00000000 - 5.00000000 5.00000000 5.00000000 5.00000000 5.00000000 5.00000000 - 6.00000000 5.00000000 5.00000000 5.00000000 5.00000000 - 7.00000000 5.00000000 5.00000000 5.00000000 - 8.00000000 5.00000000 5.00000000 5.00000000 5.00000000 - 9.00000000 5.00000000 5.00000000 5.00000000 - 10.00000000 5.00000000 5.00000000 5.00000000 5.00000000 - 11.00000000 5.00000000 5.00000000 5.00000000 5.00000000 5.00000000 - 12.00000000 5.00000000 5.00000000 5.00000000 5.00000000 - 13.00000000 5.00000000 5.00000000 5.00000000 5.00000000 5.00000000 - 14.00000000 5.00000000 5.00000000 5.00000000 5.00000000 5.00000000 5.00000000 - 15.00000000 5.00000000 5.00000000 5.00000000 5.00000000 5.00000000 - 16.00000000 5.00000000 5.00000000 5.00000000 5.00000000 - 17.00000000 5.00000000 5.00000000 5.00000000 5.00000000 5.00000000 - 18.00000000 5.00000000 5.00000000 5.00000000 5.00000000 - 19.00000000 5.00000000 5.00000000 5.00000000 - 20.00000000 5.00000000 5.00000000 5.00000000 5.00000000 - 21.00000000 5.00000000 5.00000000 5.00000000 - 22.00000000 5.00000000 5.00000000 5.00000000 5.00000000 - 23.00000000 5.00000000 5.00000000 5.00000000 5.00000000 5.00000000 - 24.00000000 5.00000000 5.00000000 5.00000000 5.00000000 - 25.00000000 5.00000000 5.00000000 5.00000000 - 26.00000000 5.00000000 5.00000000 5.00000000 5.00000000 - 27.00000000 5.00000000 5.00000000 5.00000000 - hwva - INTERNAL FACTOR 1.0 - 1.00000000 10.00000000 10.00000000 100.00000000 - 2.00000000 10.00000000 10.00000000 10.00000000 100.00000000 - 3.00000000 10.00000000 10.00000000 100.00000000 - 4.00000000 10.00000000 10.00000000 10.00000000 100.00000000 - 5.00000000 10.00000000 10.00000000 10.00000000 10.00000000 100.00000000 - 6.00000000 10.00000000 10.00000000 10.00000000 100.00000000 - 7.00000000 10.00000000 10.00000000 100.00000000 - 8.00000000 10.00000000 10.00000000 10.00000000 100.00000000 - 9.00000000 10.00000000 10.00000000 100.00000000 - 10.00000000 100.00000000 10.00000000 10.00000000 100.00000000 - 11.00000000 100.00000000 10.00000000 10.00000000 10.00000000 100.00000000 - 12.00000000 100.00000000 10.00000000 10.00000000 100.00000000 - 13.00000000 100.00000000 10.00000000 10.00000000 10.00000000 100.00000000 - 14.00000000 100.00000000 10.00000000 10.00000000 10.00000000 10.00000000 100.00000000 - 15.00000000 100.00000000 10.00000000 10.00000000 10.00000000 100.00000000 - 16.00000000 100.00000000 10.00000000 10.00000000 100.00000000 - 17.00000000 100.00000000 10.00000000 10.00000000 10.00000000 100.00000000 - 18.00000000 100.00000000 10.00000000 10.00000000 100.00000000 - 19.00000000 100.00000000 10.00000000 10.00000000 - 20.00000000 100.00000000 10.00000000 10.00000000 10.00000000 - 21.00000000 100.00000000 10.00000000 10.00000000 - 22.00000000 100.00000000 10.00000000 10.00000000 10.00000000 - 23.00000000 100.00000000 10.00000000 10.00000000 10.00000000 10.00000000 - 24.00000000 100.00000000 10.00000000 10.00000000 10.00000000 - 25.00000000 100.00000000 10.00000000 10.00000000 - 26.00000000 100.00000000 10.00000000 10.00000000 10.00000000 - 27.00000000 100.00000000 10.00000000 10.00000000 -END connectiondata - diff --git a/test/data/test_mf6model_0-disu01a_0/mfsim.lst b/test/data/test_mf6model_0-disu01a_0/mfsim.lst deleted file mode 100644 index 0d483274..00000000 --- a/test/data/test_mf6model_0-disu01a_0/mfsim.lst +++ /dev/null @@ -1,286 +0,0 @@ - MODFLOW 6 EXTENDED - U.S. GEOLOGICAL SURVEY MODULAR HYDROLOGIC MODEL - VERSION 6.6.0.dev0 (preliminary) 05/23/2024 - ***DEVELOP MODE*** - - MODFLOW 6 compiled Oct 16 2024 07:42:59 with GCC version 11.4.0 - -This software is preliminary or provisional and is subject to -revision. It is being provided to meet the need for timely best -science. The software has not received final approval by the U.S. -Geological Survey (USGS). No warranty, expressed or implied, is made -by the USGS or the U.S. Government as to the functionality of the -software and related material nor shall the fact of release -constitute any such warranty. The software is provided on the -condition that neither the USGS nor the U.S. Government shall be held -liable for any damages resulting from the authorized or unauthorized -use of the software. - - -As a work of the United States Government, this USGS product is -in the public domain within the United States. You can copy, -modify, distribute, and perform the work, even for commercial -purposes, all without asking permission. Additionally, USGS -waives copyright and related rights in the work worldwide -through CC0 1.0 Universal Public Domain Dedication -(https://creativecommons.org/publicdomain/zero/1.0/). - -The following GNU Lesser General Public License (LGPL) libraries -are used in this USGS product: - - SPARSKIT version 2.0 - ilut, luson, and qsplit - (https://www-users.cse.umn.edu/~saad/software/SPARSKIT/) - - RCM - Reverse Cuthill McKee Ordering - (https://people.math.sc.edu/Burkardt/f_src/rcm/rcm.html) - - BLAS - Basic Linear Algebra Subprograms Level 1 - (https://people.math.sc.edu/Burkardt/f_src/blas1_d/blas1_d.html) - - SPARSEKIT - Sparse Matrix Utility Package - amux, dperm, dvperm, rperm, and cperm - (https://people.sc.fsu.edu/~jburkardt/f77_src/sparsekit/sparsekit.html) - -The following BSD-3 License libraries are used in this USGS product: - - Modern Fortran DAG Library - Copyright (c) 2018, Jacob Williams - All rights reserved. - (https://github.com/jacobwilliams/daglib) - -The following library is used in this USGS product: - - NetCDF, network Common Data Form software library - Copyright (c) 1993-2014 University Corporation for Atmospheric - Research/Unidata. Redistribution and use in source and binary - forms, with or without modification, are permitted provided that - the conditions in the NetCDF copyright are met - (https://www.unidata.ucar.edu/software/netcdf/copyright.html) - -The following 2-clause BSD License library is used in this -USGS product: - - PETSc, the Portable, Extensible Toolkit for Scientific - Computation Library - Copyright (c) 1991-2021, UChicago Argonne, LLC - and the PETSc Development Team All rights reserved. - (https://petsc.org/release/) - -MODFLOW 6 compiler options: -fdiagnostics-color=always -cpp -I -src/libmf6core.a.p -I src -I ../src -I src/libmf6_external.a.p -I -/home/mjreno/.clone/external/petsc/arch-linux-c-debug/include -I -/home/mjreno/.clone/external/petsc/include -I -/home/mjreno/.clone/external/petsc/arch-linux-c-debug/lib -I /usr/include -I -/usr/include/hdf5/serial -imultiarch x86_64-linux-gnu -D _FILE_OFFSET_BITS=64 --D __linux__ -D __WITH_PETSC__ -D __WITH_MPI__ -D __WITH_NETCDF__ --mtune=generic -march=x86-64 -O2 -Wall -Wpedantic -Wcharacter-truncation --Wno-unused-dummy-argument -Wno-intrinsic-shadow -Wno-maybe-uninitialized --Wno-uninitialized -std=f2008 -fall-intrinsics -ffpe-summary=overflow --ffpe-trap=overflow,zero -fPIC -J src/libmf6core.a.p --fpre-include=/usr/include/finclude/math-vector-fortran.h - -System command used to initiate simulation: -/home/mjreno/.clone/usgs/modflow6/bin/mf6 mfsim.nam - -MODFLOW was compiled using uniform precision. - -Real Variables - KIND: 8 - TINY (smallest non-zero value): 2.225074-308 - HUGE (largest value): 1.797693+308 - PRECISION: 15 - SIZE IN BITS: 64 - -Integer Variables - KIND: 4 - HUGE (largest value): 2147483647 - SIZE IN BITS: 32 - -Long Integer Variables - KIND: 8 - HUGE (largest value): 9223372036854775807 - SIZE IN BITS: 64 - -Logical Variables - KIND: 4 - SIZE IN BITS: 32 - - - OPENED mfsim.nam - FILE TYPE:NAM6 UNIT 1001 STATUS:OLD - FORMAT:FORMATTED ACCESS:SEQUENTIAL - ACTION:READ - - # File generated by Flopy version 3.9.0.dev0 on 10/29/2024 at 08:36:29. - - OPENED disu01a.tdis - FILE TYPE:TDIS6 UNIT 1002 STATUS:OLD - FORMAT:FORMATTED ACCESS:SEQUENTIAL - ACTION:READ - - # File generated by Flopy version 3.9.0.dev0 on 10/29/2024 at 08:36:29. - - OPENED disu01a.nam - FILE TYPE:GWF6 UNIT 1003 STATUS:OLD - FORMAT:FORMATTED ACCESS:SEQUENTIAL - ACTION:READ - - # File generated by Flopy version 3.9.0.dev0 on 10/29/2024 at 08:36:29. - - OPENED disu01a.disu - FILE TYPE:DISU6 UNIT 1004 STATUS:OLD - FORMAT:FORMATTED ACCESS:SEQUENTIAL - ACTION:READ - - # File generated by Flopy version 3.9.0.dev0 on 10/29/2024 at 08:36:29. - - OPENED disu01a.npf - FILE TYPE:NPF6 UNIT 1005 STATUS:OLD - FORMAT:FORMATTED ACCESS:SEQUENTIAL - ACTION:READ - - # File generated by Flopy version 3.9.0.dev0 on 10/29/2024 at 08:36:29. - - OPENED disu01a.ic - FILE TYPE:IC6 UNIT 1006 STATUS:OLD - FORMAT:FORMATTED ACCESS:SEQUENTIAL - ACTION:READ - - # File generated by Flopy version 3.9.0.dev0 on 10/29/2024 at 08:36:29. - - OPENED disu01a.chd - FILE TYPE:CHD6 UNIT 1007 STATUS:OLD - FORMAT:FORMATTED ACCESS:SEQUENTIAL - ACTION:READ - - # File generated by Flopy version 3.9.0.dev0 on 10/29/2024 at 08:36:29. - - READING SIMULATION OPTIONS - MAXIMUM NUMBER OF ERRORS THAT WILL BE STORED IS 1000 - END OF SIMULATION OPTIONS - - READING SIMULATION TIMING - - TDIS -- TEMPORAL DISCRETIZATION PACKAGE, - VERSION 1 : 11/13/2014 - INPUT READ FROM MEMPATH: __INPUT__/SIM/TDIS - PROCESSING TDIS OPTIONS - SIMULATION TIME UNIT IS UNDEFINED - END OF TDIS OPTIONS - PROCESSING TDIS DIMENSIONS - 1 STRESS PERIOD(S) IN SIMULATION - END OF TDIS DIMENSIONS - PROCESSING TDIS PERIODDATA - - - STRESS PERIOD LENGTH TIME STEPS MULTIPLIER FOR DELT - ---------------------------------------------------------------------------- - 1 1.000000 1 1.000 - END OF TDIS PERIODDATA - END OF SIMULATION TIMING - - READING SIMULATION MODELS - GWF6 model 1 will be created - END OF SIMULATION MODELS - - READING SIMULATION EXCHANGES - END OF SIMULATION EXCHANGES - - READING SOLUTIONGROUP - - Creating solution: SLN_1 - - OPENED disu01a.ims - FILE TYPE:IMS UNIT 1009 STATUS:OLD - FORMAT:FORMATTED ACCESS:SEQUENTIAL - ACTION:READ - - END OF SOLUTIONGROUP - -PROCESSING MODEL CONNECTIONS - - IMS -- ITERATIVE MODEL SOLUTION PACKAGE, VERSION 6, 4/28/2017 - INPUT READ FROM UNIT 1009 - # File generated by Flopy version 3.9.0.dev0 on 10/29/2024 at 08:36:29. - - PROCESSING IMS OPTIONS - END OF IMS OPTIONS - ***UNDER-RELAXATION WILL NOT BE USED*** - - ***IMS LINEAR SOLVER WILL BE USED*** - - IMSLINEAR -- UNSTRUCTURED LINEAR SOLUTION PACKAGE, VERSION 8, 04/28/2017 - A symmetric matrix will be solved - - OUTER ITERATION CONVERGENCE CRITERION (DVCLOSE) = 0.100000E-02 - MAXIMUM NUMBER OF OUTER ITERATIONS (MXITER) = 25 - SOLVER PRINTOUT INDEX (IPRIMS) = 1 - NONLINEAR ITERATION METHOD (NONLINMETH) = 0 - LINEAR SOLUTION METHOD (LINMETH) = 1 - - SOLUTION BY THE CONJUGATE-GRADIENT METHOD - ------------------------------------------------------------------ - MAXIMUM OF 25 CALLS OF SOLUTION ROUTINE - MAXIMUM OF 50 INTERNAL ITERATIONS PER CALL TO SOLUTION ROUTINE - LINEAR ACCELERATION METHOD = CG - MATRIX PRECONDITIONING TYPE = INCOMPLETE LU - MATRIX SCALING APPROACH = NO SCALING - MATRIX REORDERING APPROACH = ORIGINAL ORDERING - NUMBER OF ORTHOGONALIZATIONS = 0 - HEAD CHANGE CRITERION FOR CLOSURE = 0.10000E-02 - RESIDUAL CHANGE CRITERION FOR CLOSURE = 0.10000E+00 - RESIDUAL CONVERGENCE OPTION = 0 - RESIDUAL CONVERGENCE NORM = INFINITY NORM - RELAXATION FACTOR = 0.00000E+00 - - - - - Solving: Stress period: 1 Time step: 1 - -1 - STRESS PERIOD NO. 1, LENGTH = 1.000000 - ------------------------------------------ - NUMBER OF TIME STEPS = 1 - MULTIPLIER FOR DELT = 1.000 - INITIAL TIME STEP SIZE = 1.000000 - - SLN_1 OUTER ITERATION SUMMARY - ---------------------------------------------------------------------------------------------------------- - OUTER INNER STEP MAXIMUM CHANGE MODEL-(CELLID) OR - OUTER ITERATION STEP ITERATION ITERATION MAXIMUM CHANGE SUCCESS MODEL-PACKAGE-(NUMBER) - ---------------------------------------------------------------------------------------------------------- - Model 1 5 0.68382334 1_GWF-(10) - Model 2 1 -6.85437959E-06 * 1_GWF-(23) - ---------------------------------------------------------------------------------------------------------- - - - 2 CALLS TO NUMERICAL SOLUTION IN TIME STEP 1 STRESS PERIOD 1 - 6 TOTAL ITERATIONS - - - Solution SLN_1 summary - ---------------------------------------------------------------------- - Total formulate time: 0.28000000000000247E-4 seconds - Total solution time: 0.19999999999999185E-4 seconds - - - MEMORY MANAGER TOTAL STORAGE BY DATA TYPE, IN KILOBYTES - ------------------------------- - ALLOCATED - DATA TYPE MEMORY - ------------------------------- - Character 6.5490000 - Logical 4.40000000E-02 - Integer 9.1160000 - Real 17.072000 - ------------------------------- - Total 32.781000 - Virtual 0.0000000 - ------------------------------- - - - - Run end date and time (yyyy/mm/dd hh:mm:ss): 2024/10/29 8:36:29 - Elapsed run time: 0.029 Seconds - Normal termination of simulation. diff --git a/test/data/test_mf6model_0-disv01a_0/disv01a.chd b/test/data/test_mf6model_0-disv01a_0/disv01a.chd new file mode 100644 index 00000000..0c7f0ee4 --- /dev/null +++ b/test/data/test_mf6model_0-disv01a_0/disv01a.chd @@ -0,0 +1,13 @@ +# File generated by Flopy version 3.9.0.dev2 on 10/30/2024 at 08:03:52. +BEGIN options +END options + +BEGIN dimensions + MAXBOUND 2 +END dimensions + +BEGIN period 1 + 1 1 1.00000000E+00 + 1 9 0.00000000E+00 +END period 1 + diff --git a/test/data/test_mf6model_0-disv01a_0/disv01a.disv b/test/data/test_mf6model_0-disv01a_0/disv01a.disv new file mode 100644 index 00000000..f5fdc0e6 --- /dev/null +++ b/test/data/test_mf6model_0-disv01a_0/disv01a.disv @@ -0,0 +1,54 @@ +# File generated by Flopy version 3.9.0.dev2 on 10/30/2024 at 08:03:52. +BEGIN options +END options + +BEGIN dimensions + NLAY 3 + NCPL 9 + NVERT 16 +END dimensions + +BEGIN griddata + top + INTERNAL FACTOR 1.0 + 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 + botm LAYERED + INTERNAL FACTOR 1.0 + -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 -10.00000000 + INTERNAL FACTOR 1.0 + -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 -20.00000000 + INTERNAL FACTOR 1.0 + -30.00000000 -30.00000000 -30.00000000 -30.00000000 -30.00000000 -30.00000000 -30.00000000 -30.00000000 -30.00000000 +END griddata + +BEGIN vertices + 1 1.00000000E+08 1.00000030E+08 + 2 1.00000010E+08 1.00000030E+08 + 3 1.00000020E+08 1.00000030E+08 + 4 1.00000030E+08 1.00000030E+08 + 5 1.00000000E+08 1.00000020E+08 + 6 1.00000010E+08 1.00000020E+08 + 7 1.00000020E+08 1.00000020E+08 + 8 1.00000030E+08 1.00000020E+08 + 9 1.00000000E+08 1.00000010E+08 + 10 1.00000010E+08 1.00000010E+08 + 11 1.00000020E+08 1.00000010E+08 + 12 1.00000030E+08 1.00000010E+08 + 13 1.00000000E+08 1.00000000E+08 + 14 1.00000010E+08 1.00000000E+08 + 15 1.00000020E+08 1.00000000E+08 + 16 1.00000030E+08 1.00000000E+08 +END vertices + +BEGIN cell2d + 1 1.00000005E+08 1.00000025E+08 4 1 2 6 5 + 2 1.00000015E+08 1.00000025E+08 4 2 3 7 6 + 3 1.00000025E+08 1.00000025E+08 4 3 4 8 7 + 4 1.00000005E+08 1.00000015E+08 4 5 6 10 9 + 5 1.00000015E+08 1.00000015E+08 4 6 7 11 10 + 6 1.00000025E+08 1.00000015E+08 4 7 8 12 11 + 7 1.00000005E+08 1.00000005E+08 4 9 10 14 13 + 8 1.00000015E+08 1.00000005E+08 4 10 11 15 14 + 9 1.00000025E+08 1.00000005E+08 4 11 12 16 15 +END cell2d + diff --git a/test/data/test_mf6model_0-disv01a_0/disv01a.ic b/test/data/test_mf6model_0-disv01a_0/disv01a.ic new file mode 100644 index 00000000..944fcf3d --- /dev/null +++ b/test/data/test_mf6model_0-disv01a_0/disv01a.ic @@ -0,0 +1,9 @@ +# File generated by Flopy version 3.9.0.dev2 on 10/30/2024 at 08:03:52. +BEGIN options +END options + +BEGIN griddata + strt + CONSTANT 0.00000000 +END griddata + diff --git a/test/data/test_mf6model_0-disv01a_0/disv01a.ims b/test/data/test_mf6model_0-disv01a_0/disv01a.ims new file mode 100644 index 00000000..5e85a8dd --- /dev/null +++ b/test/data/test_mf6model_0-disv01a_0/disv01a.ims @@ -0,0 +1,5 @@ +# File generated by Flopy version 3.9.0.dev2 on 10/30/2024 at 08:03:52. +BEGIN options + PRINT_OPTION summary +END options + diff --git a/test/data/test_mf6model_0-disv01a_0/disv01a.nam b/test/data/test_mf6model_0-disv01a_0/disv01a.nam new file mode 100644 index 00000000..56d8c24e --- /dev/null +++ b/test/data/test_mf6model_0-disv01a_0/disv01a.nam @@ -0,0 +1,11 @@ +# File generated by Flopy version 3.9.0.dev2 on 10/30/2024 at 08:03:52. +BEGIN options +END options + +BEGIN packages + DISV6 disv01a.disv disv + IC6 disv01a.ic ic + NPF6 disv01a.npf npf + CHD6 disv01a.chd chd_0 +END packages + diff --git a/test/data/test_mf6model_0-disv01a_0/disv01a.npf b/test/data/test_mf6model_0-disv01a_0/disv01a.npf new file mode 100644 index 00000000..b8f11ad4 --- /dev/null +++ b/test/data/test_mf6model_0-disv01a_0/disv01a.npf @@ -0,0 +1,11 @@ +# File generated by Flopy version 3.9.0.dev2 on 10/30/2024 at 08:03:52. +BEGIN options +END options + +BEGIN griddata + icelltype + CONSTANT 0 + k + CONSTANT 1.00000000 +END griddata + diff --git a/test/data/test_mf6model_0-disv01a_0/disv01a.tdis b/test/data/test_mf6model_0-disv01a_0/disv01a.tdis new file mode 100644 index 00000000..163e9e4c --- /dev/null +++ b/test/data/test_mf6model_0-disv01a_0/disv01a.tdis @@ -0,0 +1,12 @@ +# File generated by Flopy version 3.9.0.dev2 on 10/30/2024 at 08:03:52. +BEGIN options +END options + +BEGIN dimensions + NPER 1 +END dimensions + +BEGIN perioddata + 1.00000000 1 1.00000000 +END perioddata + diff --git a/test/data/test_mf6model_0-disv01a_0/mfsim.nam b/test/data/test_mf6model_0-disv01a_0/mfsim.nam new file mode 100644 index 00000000..dcc26bff --- /dev/null +++ b/test/data/test_mf6model_0-disv01a_0/mfsim.nam @@ -0,0 +1,19 @@ +# File generated by Flopy version 3.9.0.dev2 on 10/30/2024 at 08:03:52. +BEGIN options +END options + +BEGIN timing + TDIS6 disv01a.tdis +END timing + +BEGIN models + gwf6 disv01a.nam disv01a +END models + +BEGIN exchanges +END exchanges + +BEGIN solutiongroup 1 + ims6 disv01a.ims disv01a +END solutiongroup 1 + diff --git a/test/test_sim.py b/test/test_sim.py index cd2b7a63..4c2f310c 100644 --- a/test/test_sim.py +++ b/test/test_sim.py @@ -346,21 +346,57 @@ def test_gwf_chd01(tmp_path): shutil.copytree(data_fpth, tmp_path / "gwf_chd01") sim_fpth = Path(tmp_path / "gwf_chd01" / "mfsim.nam") - s = None + sim = None with open(sim_fpth, "r") as f: - s = MFSimulation.load(f) + sim = MFSimulation.load(f) write_dir = tmp_path / "write" os.makedirs(write_dir) - s.write(write_dir) + sim.write(write_dir) - s = subprocess.run(["which", "mf6"]) - if s.returncode == 0: + w = subprocess.run(["which", "mf6"]) + if w.returncode == 0: os.chdir(tmp_path / "gwf_chd01") subprocess.run(["mf6"]) os.chdir(tmp_path / "write") subprocess.run(["mf6"]) - subprocess.run(["diff", f"./{name}.lst", f"../gwf_chd01/{name}.lst"]) + diff = subprocess.run( + ["diff", f"./{name}.lst", f"../gwf_chd01/{name}.lst"] + ) + if diff.stdout: + print(f"\nGWF model list file difference: {diff.stdout}") + if diff.stderr: + print(diff.stderr) + + +def test_gwf_disv(tmp_path): + name = "disv01a" + + data_fpth = Path(__file__).parent / "data" / "test_mf6model_0-disv01a_0" + shutil.copytree(data_fpth, tmp_path / "disv01a") + sim_fpth = Path(tmp_path / "disv01a" / "mfsim.nam") + + sim = None + with open(sim_fpth, "r") as f: + sim = MFSimulation.load(f) + + write_dir = tmp_path / "write" + os.makedirs(write_dir) + sim.write(write_dir) + + w = subprocess.run(["which", "mf6"]) + if w.returncode == 0: + os.chdir(tmp_path / "disv01a") + subprocess.run(["mf6"]) + os.chdir(tmp_path / "write") + subprocess.run(["mf6"]) + diff = subprocess.run( + ["diff", f"./{name}.lst", f"../disv01a/{name}.lst"] + ) + if diff.stdout: + print(f"\nGWF model list file difference: {diff.stdout}") + if diff.stderr: + print(diff.stderr) def test_gwf_disu(tmp_path): @@ -370,18 +406,24 @@ def test_gwf_disu(tmp_path): shutil.copytree(data_fpth, tmp_path / "disu01a") sim_fpth = Path(tmp_path / "disu01a" / "mfsim.nam") - s = None + sim = None with open(sim_fpth, "r") as f: - s = MFSimulation.load(f) + sim = MFSimulation.load(f) write_dir = tmp_path / "write" os.makedirs(write_dir) - s.write(write_dir) + sim.write(write_dir) - s = subprocess.run(["which", "mf6"]) - if s.returncode == 0: + w = subprocess.run(["which", "mf6"]) + if w.returncode == 0: os.chdir(tmp_path / "disu01a") subprocess.run(["mf6"]) os.chdir(tmp_path / "write") subprocess.run(["mf6"]) - subprocess.run(["diff", f"./{name}.lst", f"../disu01a/{name}.lst"]) + diff = subprocess.run( + ["diff", f"./{name}.lst", f"../disu01a/{name}.lst"] + ) + if diff.stdout: + print(f"\nGWF model list file difference: {diff.stdout}") + if diff.stderr: + print(diff.stderr) From f428803d0e2ba7ea193213697ad0eca97a2ffd97 Mon Sep 17 00:00:00 2001 From: mjreno Date: Mon, 18 Nov 2024 08:23:50 -0500 Subject: [PATCH 5/5] misc cleanup --- docs/examples/array_example.py | 14 +++++----- flopy4/compound.py | 5 ++-- .../disu01a.disu.grb | Bin 2424 -> 0 bytes test/test_sim.py | 26 +++++++++--------- 4 files changed, 23 insertions(+), 22 deletions(-) delete mode 100644 test/data/test_mf6model_0-disu01a_0/disu01a.disu.grb diff --git a/docs/examples/array_example.py b/docs/examples/array_example.py index 4efc29f1..b7660364 100644 --- a/docs/examples/array_example.py +++ b/docs/examples/array_example.py @@ -62,12 +62,12 @@ constant = data_path / "constant.txt" external = data_path / "external.txt" shape = (1000, 100) -type = "double" +dtype = "double" # Open and load a NumPy array representation fhandle = open(internal) -imfa = MFArray.load(fhandle, data_path, shape, type=type, header=False) +imfa = MFArray.load(fhandle, data_path, shape, type=dtype, header=False) # Get values @@ -88,7 +88,7 @@ plt.colorbar() fhandle = open(constant) -cmfa = MFArray.load(fhandle, data_path, shape, type=type, header=False) +cmfa = MFArray.load(fhandle, data_path, shape, type=dtype, header=False) cvals = cmfa.value plt.imshow(cvals[0:100]) plt.colorbar() @@ -111,7 +111,7 @@ # External fhandle = open(external) -emfa = MFArray.load(fhandle, data_path, shape, type=type, header=False) +emfa = MFArray.load(fhandle, data_path, shape, type=dtype, header=False) evals = emfa.value evals @@ -137,7 +137,7 @@ fhandle = open(ilayered) shape = (3, 1000, 100) ilmfa = MFArray.load( - fhandle, data_path, shape, type=type, header=False, layered=True + fhandle, data_path, shape, type=dtype, header=False, layered=True ) vals = ilmfa.value @@ -186,7 +186,7 @@ fhandle = open(clayered) shape = (3, 1000, 100) clmfa = MFArray.load( - fhandle, data_path, shape, type=type, header=False, layered=True + fhandle, data_path, shape, type=dtype, header=False, layered=True ) clmfa._value @@ -241,7 +241,7 @@ fhandle = open(mlayered) shape = (3, 1000, 100) mlmfa = MFArray.load( - fhandle, data_path, shape, type=type, header=False, layered=True + fhandle, data_path, shape, type=dtype, header=False, layered=True ) mlmfa.how diff --git a/flopy4/compound.py b/flopy4/compound.py index e2760f98..f0ca4e30 100644 --- a/flopy4/compound.py +++ b/flopy4/compound.py @@ -368,8 +368,8 @@ def load(cls, f, **kwargs) -> "MFList": jidx = len(param_cols) - 1 else: raise ValueError( - "MFList param {params[k].name} has " - "unsupported shape {params[k].shape}" + f"MFList param {params[k].name} has " + f"unsupported shape {params[k].shape}" ) param_cols.append(pcols) param_types.append(params[k].type) @@ -379,6 +379,7 @@ def load(cls, f, **kwargs) -> "MFList": maxsplit = sum(param_cols) - 1 else: maxsplit = -1 + assert not (jidx >= 0 and maxsplit >= 0) while True: pos = f.tell() diff --git a/test/data/test_mf6model_0-disu01a_0/disu01a.disu.grb b/test/data/test_mf6model_0-disu01a_0/disu01a.disu.grb deleted file mode 100644 index 5d4a69240e288e6aef8c58aebd42399a1e8628af..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2424 zcmchWOHUM05QWDFDpwR=_<+RR2#E_5)9niq5|e@MjF$|zNl!zV4GT9e+_-Y%!i|ak zEPtBk(_4WV7BtQPs z{`YCG|BsjSfaio0x5a(&L_8JG#B=dNWa6FJ6kYK_L@^LUaU?#9PvW!qBEE`m;=A}E zehK_8i>m@pa_(Ib%yBd2+`lFk1X`Q(y7F5Bt(}AJhG2ejJ8NF~qM(N}(A-Ipe(s~W zo1&d_PrsQBPv*go=R%GrHRi(aLCW!@j^C1?$96=A??XXud!j*)|D%-K&ghuqv7p!X zM$7vl+RoI`E~jXFqv8L`?99xp%s^yT?lUXiM0TQvCpz1kI-W$^nL0W=iMBTyJki_E QXu$TQh6Zd$>a)E50LJR^zW@LL diff --git a/test/test_sim.py b/test/test_sim.py index 4c2f310c..0a716ec9 100644 --- a/test/test_sim.py +++ b/test/test_sim.py @@ -183,7 +183,7 @@ def test_load_sim(tmp_path): assert s.tdis.params["start_date_time"] == "2041-01-01t00:00:00-05:00" assert s.tdis.params["nper"] == 31 assert np.allclose( - s.tdis.params["perioddata"]["perlen"], + [float(f) for f in s.tdis.params["perioddata"]["perlen"]], np.array( [ 1.0, @@ -259,7 +259,7 @@ def test_load_sim(tmp_path): ), ) assert np.allclose( - s.tdis.params["perioddata"]["tsmult"], + [float(f) for f in s.tdis.params["perioddata"]["tsmult"]], np.array( [ 1.0, @@ -310,11 +310,11 @@ def test_load_sim(tmp_path): assert "scaling_method" in s.solvers["ims_0"].params assert "reordering_method" in s.solvers["ims_0"].params assert s.solvers["ims_0"].params["print_option"] == "summary" - assert s.solvers["ims_0"].params["outer_dvclose"] == 1.00000000e-09 + assert float(s.solvers["ims_0"].params["outer_dvclose"]) == 1.00000000e-09 assert s.solvers["ims_0"].params["outer_maximum"] == 500 assert s.solvers["ims_0"].params["under_relaxation"] == "none" assert s.solvers["ims_0"].params["inner_maximum"] == 300 - assert s.solvers["ims_0"].params["inner_dvclose"] == 1.00000000e-09 + assert float(s.solvers["ims_0"].params["inner_dvclose"]) == 1.00000000e-09 assert s.solvers["ims_0"].params["linear_acceleration"] == "bicgstab" assert s.solvers["ims_0"].params["relaxation_factor"] == 1.00000000 assert s.solvers["ims_0"].params["scaling_method"] == "none" @@ -358,15 +358,15 @@ def test_gwf_chd01(tmp_path): if w.returncode == 0: os.chdir(tmp_path / "gwf_chd01") subprocess.run(["mf6"]) - os.chdir(tmp_path / "write") + os.chdir(write_dir) subprocess.run(["mf6"]) diff = subprocess.run( ["diff", f"./{name}.lst", f"../gwf_chd01/{name}.lst"] ) - if diff.stdout: - print(f"\nGWF model list file difference: {diff.stdout}") if diff.stderr: print(diff.stderr) + else: + print(f"\nmodel lst file diffs: {diff.stdout}") def test_gwf_disv(tmp_path): @@ -388,15 +388,15 @@ def test_gwf_disv(tmp_path): if w.returncode == 0: os.chdir(tmp_path / "disv01a") subprocess.run(["mf6"]) - os.chdir(tmp_path / "write") + os.chdir(write_dir) subprocess.run(["mf6"]) diff = subprocess.run( ["diff", f"./{name}.lst", f"../disv01a/{name}.lst"] ) - if diff.stdout: - print(f"\nGWF model list file difference: {diff.stdout}") if diff.stderr: print(diff.stderr) + else: + print(f"\nmodel lst file diffs: {diff.stdout}") def test_gwf_disu(tmp_path): @@ -418,12 +418,12 @@ def test_gwf_disu(tmp_path): if w.returncode == 0: os.chdir(tmp_path / "disu01a") subprocess.run(["mf6"]) - os.chdir(tmp_path / "write") + os.chdir(write_dir) subprocess.run(["mf6"]) diff = subprocess.run( ["diff", f"./{name}.lst", f"../disu01a/{name}.lst"] ) - if diff.stdout: - print(f"\nGWF model list file difference: {diff.stdout}") if diff.stderr: print(diff.stderr) + else: + print(f"\nmodel lst file diffs: {diff.stdout}")