From 649a8ce35e4b8f5cb427a50eec8c7081ed7925c3 Mon Sep 17 00:00:00 2001 From: mjreno Date: Tue, 29 Oct 2024 13:45:45 -0400 Subject: [PATCH] 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 4b80781..d6ffc59 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 7310768..a74edf4 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 2163a6d..05735f2 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 0000000..144b328 --- /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 b331413..09dc6c2 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 0000000..5ccffb1 --- /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 2f13ab4..0158a00 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 0000000..a6d00e6 --- /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 bc10bb9..a01a9cc 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 97f170a..6cb5bfe 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 f81c2d8..531e3c2 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 54d94e7..23bfba7 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 980c7f8..1e94045 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 0000000..1b20356 --- /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 0000000..be7be43 --- /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 0000000..49fd5aa --- /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 0000000..915162c --- /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 0000000..87a6692 --- /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 0000000..5c57a17 --- /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 0000000..7dba13a --- /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 0000000..2d8f91a --- /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 0000000..ef2fcda --- /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 0000000..726d232 --- /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 0000000..4b51324 --- /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 0000000..4c57c02 --- /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 0000000..c3d802a --- /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 0000000..907dbda --- /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 0000000..55c7dc0 --- /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 0000000..85f650b --- /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 0000000..f5b7e18 --- /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 0000000..610d21b --- /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 0000000..4360a8f --- /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 0000000..d854659 --- /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 0000000..28f0b5a --- /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 0000000..9f250a7 --- /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 0000000..979cee0 --- /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 0000000..140ceab --- /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 0000000..0d48327 --- /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 0000000..e37bb19 --- /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 fb7650f..cd2b7a6 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"])