From b1e6b77af34448fee388efed5bbfa8d902fe93dc Mon Sep 17 00:00:00 2001 From: w-bonelli Date: Wed, 12 Jul 2023 14:46:56 -0400 Subject: [PATCH 01/25] fix(binaryfile/gridutil): avoid numpy deprecation warnings (#1868) * use ndarray.item() to retrieve single elements * update gridutil get_disu_kwargs() docstrings --- flopy/utils/binaryfile.py | 12 ++++++------ flopy/utils/gridutil.py | 32 ++++++++++++++++++++++++++++---- 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/flopy/utils/binaryfile.py b/flopy/utils/binaryfile.py index cb5b585afd..8ed15bf54b 100644 --- a/flopy/utils/binaryfile.py +++ b/flopy/utils/binaryfile.py @@ -562,7 +562,7 @@ def get_ts(self, idx): ) # change ilay from header to zero-based if ilay != k: continue - ipos = int(self.iposarray[irec]) + ipos = self.iposarray[irec].item() # Calculate offset necessary to reach intended cell self.file.seek(ipos + int(ioffset), 0) @@ -1031,9 +1031,9 @@ def _build_index(self): print(f"{itxt}: {s}") print("file position: ", ipos) if ( - int(header["imeth"]) != 5 - and int(header["imeth"]) != 6 - and int(header["imeth"]) != 7 + header["imeth"].item() != 5 + and header["imeth"].item() != 6 + and header["imeth"].item() != 7 ): print("") @@ -1141,7 +1141,7 @@ def _get_header(self): ) for name in temp.dtype.names: header2[name] = temp[name] - if int(header2["imeth"]) == 6: + if header2["imeth"].item() == 6: header2["modelnam"] = binaryread(self.file, str, charlen=16) header2["paknam"] = binaryread(self.file, str, charlen=16) header2["modelnam2"] = binaryread(self.file, str, charlen=16) @@ -1689,7 +1689,7 @@ def get_record(self, idx, full3D=False): idx = np.array([idx]) header = self.recordarray[idx] - ipos = int(self.iposarray[idx]) + ipos = self.iposarray[idx].item() self.file.seek(ipos, 0) imeth = header["imeth"][0] diff --git a/flopy/utils/gridutil.py b/flopy/utils/gridutil.py index 953ee97a68..d9ca28c190 100644 --- a/flopy/utils/gridutil.py +++ b/flopy/utils/gridutil.py @@ -58,10 +58,34 @@ def get_lni(ncpl, nodes) -> List[Tuple[int, int]]: return tuples -def get_disu_kwargs(nlay, nrow, ncol, delr, delc, tp, botm): +def get_disu_kwargs( + nlay, + nrow, + ncol, + delr, + delc, + tp, + botm, +): """ - Simple utility for creating args needed to construct - a disu package + Create args needed to construct a DISU package. + + Parameters + ---------- + nlay : int + Number of layers + nrow : int + Number of rows + ncol : int + Number of columns + delr : numpy.ndarray + Column spacing along a row + delc : numpy.ndarray + Row spacing along a column + tp : int or numpy.ndarray + Top elevation(s) of cells in the model's top layer + botm : numpy.ndarray + Bottom elevation(s) of all cells in the model """ def get_nn(k, i, j): @@ -88,7 +112,7 @@ def get_nn(k, i, j): cl12.append(n + 1) hwva.append(n + 1) if k == 0: - top[n] = tp + top[n] = tp.item() if isinstance(tp, np.ndarray) else tp else: top[n] = botm[k - 1] bot[n] = botm[k] From 89fa273e8fd3ab7788ba4a65e62455d7d65c504d Mon Sep 17 00:00:00 2001 From: Joshua Larsen Date: Fri, 14 Jul 2023 14:03:44 -0700 Subject: [PATCH 02/25] update(_set_neighbors): check for closed iverts and remove closing ivert (#1876) --- flopy/discretization/grid.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/flopy/discretization/grid.py b/flopy/discretization/grid.py index 428873846d..5da4c9aa6c 100644 --- a/flopy/discretization/grid.py +++ b/flopy/discretization/grid.py @@ -560,6 +560,8 @@ def _set_neighbors(self, reset=False, method="rook"): node_nums = [] if method == "rook": for poly in self.iverts: + if poly[0] == poly[-1]: + poly = poly[:-1] for v in range(len(poly)): geoms.append(tuple(sorted([poly[v - 1], poly[v]]))) node_nums += [node_num] * len(poly) @@ -567,6 +569,8 @@ def _set_neighbors(self, reset=False, method="rook"): else: # queen neighbors for poly in self.iverts: + if poly[0] == poly[-1]: + poly = poly[:-1] for vert in poly: geoms.append(vert) node_nums += [node_num] * len(poly) From aa74356708137223ffed501f01d759832c336457 Mon Sep 17 00:00:00 2001 From: jdhughes-usgs Date: Sun, 16 Jul 2023 18:19:11 -0500 Subject: [PATCH 03/25] fix(binary): fix binary header information (#1877) * modify pip upgrade in rtd workflow Replaces PR #1848 (Close #1848) --- .github/workflows/rtd.yml | 2 +- autotest/test_mf6.py | 187 +++++++++++++++++++++++++-------- flopy/mf6/data/mffileaccess.py | 51 ++++++--- flopy/utils/binaryfile.py | 1 + flopy/utils/datafile.py | 12 +-- 5 files changed, 187 insertions(+), 66 deletions(-) diff --git a/.github/workflows/rtd.yml b/.github/workflows/rtd.yml index dddcae5fcc..5df817f687 100644 --- a/.github/workflows/rtd.yml +++ b/.github/workflows/rtd.yml @@ -46,7 +46,7 @@ jobs: cache-dependency-path: pyproject.toml - name: Upgrade pip - run: pip install --upgrade pip + run: python -m pip install --upgrade pip - name: Install flopy and dependencies run: pip install ".[test, doc, optional]" diff --git a/autotest/test_mf6.py b/autotest/test_mf6.py index 39207dfee1..5e8e2c5eb8 100644 --- a/autotest/test_mf6.py +++ b/autotest/test_mf6.py @@ -505,40 +505,88 @@ def test_subdir(function_tmpdir): @requires_exe("mf6") -def test_binary_write(function_tmpdir): +@pytest.mark.parametrize("layered", [True, False]) +def test_binary_write(function_tmpdir, layered): nlay, nrow, ncol = 2, 1, 10 shape2d = (nrow, ncol) - shape3d = (nlay, nrow, ncol) + + # data for layers + botm = [4.0, 0.0] + strt = [5.0, 10.0] # create binary data structured + if layered: + idomain_data = [] + botm_data = [] + strt_data = [] + for k in range(nlay): + idomain_data.append( + { + "factor": 1.0, + "filename": f"idomain_l{k+1}.bin", + "data": 1, + "binary": True, + "iprn": 1, + } + ) + botm_data.append( + { + "filename": f"botm_l{k+1}.bin", + "binary": True, + "iprn": 1, + "data": np.full(shape2d, botm[k], dtype=float), + } + ) + strt_data.append( + { + "filename": f"strt_l{k+1}.bin", + "binary": True, + "iprn": 1, + "data": np.full(shape2d, strt[k], dtype=float), + } + ) + else: + idomain_data = { + "filename": "idomain.bin", + "binary": True, + "iprn": 1, + "data": 1, + } + botm_data = { + "filename": "botm.bin", + "binary": True, + "iprn": 1, + "data": np.array( + [ + np.full(shape2d, botm[0], dtype=float), + np.full(shape2d, botm[1], dtype=float), + ] + ), + } + strt_data = { + "filename": "strt.bin", + "binary": True, + "iprn": 1, + "data": np.array( + [ + np.full(shape2d, strt[0], dtype=float), + np.full(shape2d, strt[1], dtype=float), + ] + ), + } + + # binary data that does not vary by layers top_data = { "filename": "top.bin", "binary": True, - "iprn": 0, + "iprn": 1, "data": 10.0, } - botm_data = { - "filename": "botm.bin", - "binary": True, - "iprn": 0, - "data": np.array( - [ - np.full(shape2d, 4.0, dtype=float), - np.full(shape2d, 0.0, dtype=float), - ] - ), - } - strt_data = { - "filename": "strt.bin", - "binary": True, - "iprn": 0, - "data": np.full(shape3d, 10.0, dtype=float), - } rch_data = { 0: { "filename": "recharge.bin", "binary": True, - "iprn": 0, + "iprn": 1, "data": 0.000001, }, } @@ -550,7 +598,7 @@ def test_binary_write(function_tmpdir): 0: { "filename": "chd.bin", "binary": True, - "iprn": 0, + "iprn": 1, "data": chd_data, }, } @@ -568,6 +616,7 @@ def test_binary_write(function_tmpdir): delc=1.0, top=top_data, botm=botm_data, + idomain=idomain_data, ) ModflowGwfnpf( gwf, @@ -575,7 +624,7 @@ def test_binary_write(function_tmpdir): ) ModflowGwfic( gwf, - strt=10.0, + strt=strt_data, ) ModflowGwfchd( gwf, @@ -590,8 +639,8 @@ def test_binary_write(function_tmpdir): @requires_exe("mf6") -@pytest.mark.skip(reason="todo:: after flopy binary fix.") -def test_vor_binary_write(function_tmpdir): +@pytest.mark.parametrize("layered", [True, False]) +def test_vor_binary_write(function_tmpdir, layered): # build voronoi grid boundary = [(0.0, 0.0), (0.0, 1.0), (10.0, 1.0), (10.0, 0.0)] triangle_ws = function_tmpdir / "triangle" @@ -608,37 +657,84 @@ def test_vor_binary_write(function_tmpdir): # problem dimensions nlay = 2 - shape3d = (nlay, vor.ncpl) + + # data for layers + botm = [4.0, 0.0] + strt = [5.0, 10.0] # build binary data + if layered: + idomain_data = [] + botm_data = [] + strt_data = [] + for k in range(nlay): + idomain_data.append( + { + "factor": 1.0, + "filename": f"idomain_l{k + 1}.bin", + "data": 1, + "binary": True, + "iprn": 1, + } + ) + botm_data.append( + { + "filename": f"botm_l{k + 1}.bin", + "binary": True, + "iprn": 1, + "data": np.full(vor.ncpl, botm[k], dtype=float), + } + ) + strt_data.append( + { + "filename": f"strt_l{k + 1}.bin", + "binary": True, + "iprn": 1, + "data": np.full(vor.ncpl, strt[k], dtype=float), + } + ) + else: + idomain_data = { + "filename": "idomain.bin", + "binary": True, + "iprn": 1, + "data": 1, + } + botm_data = { + "filename": "botm.bin", + "binary": True, + "iprn": 1, + "data": np.array( + [ + np.full(vor.ncpl, botm[0], dtype=float), + np.full(vor.ncpl, botm[1], dtype=float), + ] + ), + } + strt_data = { + "filename": "strt.bin", + "binary": True, + "iprn": 1, + "data": np.array( + [ + np.full(vor.ncpl, strt[0], dtype=float), + np.full(vor.ncpl, strt[1], dtype=float), + ] + ), + } + + # binary data that does not vary by layers top_data = { "filename": "top.bin", "binary": True, - "iprn": 0, + "iprn": 1, "data": 10.0, } - botm_data = { - "filename": "botm.bin", - "binary": True, - "iprn": 0, - "data": np.array( - [ - np.full(vor.ncpl, 4.0, dtype=float), - np.full(vor.ncpl, 0.0, dtype=float), - ] - ), - } - strt_data = { - "filename": "strt.bin", - "binary": True, - "iprn": 0, - "data": np.full(shape3d, 10.0, dtype=float), - } rch_data = { 0: { "filename": "recharge.bin", "binary": True, - "iprn": 0, + "iprn": 1, "data": np.full(vor.ncpl, 0.000001, dtype=float), # 0.000001, }, } @@ -670,6 +766,7 @@ def test_vor_binary_write(function_tmpdir): cell2d=vor.get_disv_gridprops()["cell2d"], top=top_data, botm=botm_data, + idomain=idomain_data, xorigin=0.0, yorigin=0.0, ) diff --git a/flopy/mf6/data/mffileaccess.py b/flopy/mf6/data/mffileaccess.py index 5a2238aca0..b1af8c9073 100644 --- a/flopy/mf6/data/mffileaccess.py +++ b/flopy/mf6/data/mffileaccess.py @@ -212,6 +212,8 @@ def write_binary_file( ): data = self._resolve_cellid_numbers_to_file(data) fd = self._open_ext_file(fname, binary=True, write=True) + if data.size == modelgrid.nnodes: + write_multi_layer = False if write_multi_layer: for layer, value in enumerate(data): self._write_layer( @@ -252,7 +254,14 @@ def _write_layer( ilay=None, ): header_data = self._get_header( - modelgrid, modeltime, stress_period, precision, text, fname, ilay + modelgrid, + modeltime, + stress_period, + precision, + text, + fname, + ilay=ilay, + data=data, ) header_data.tofile(fd) data.tofile(fd) @@ -266,6 +275,7 @@ def _get_header( text, fname, ilay=None, + data=None, ): # handle dis (row, col, lay), disv (ncpl, lay), and disu (nodes) cases if modelgrid is not None and modeltime is not None: @@ -274,13 +284,18 @@ def _get_header( if ilay is None: ilay = modelgrid.nlay if modelgrid.grid_type == "structured": + m1, m2, m3 = modelgrid.ncol, modelgrid.nrow, ilay + if data is not None: + shape3d = modelgrid.nlay * modelgrid.nrow * modelgrid.ncol + if data.size == shape3d: + m1, m2, m3 = shape3d, 1, 1 return BinaryHeader.create( bintype="vardis", precision=precision, text=text, - nrow=modelgrid.nrow, - ncol=modelgrid.ncol, - ilay=ilay, + m1=m1, + m2=m2, + m3=m3, pertim=pertim, totim=totim, kstp=1, @@ -289,24 +304,30 @@ def _get_header( elif modelgrid.grid_type == "vertex": if ilay is None: ilay = modelgrid.nlay + m1, m2, m3 = modelgrid.ncpl, 1, ilay + if data is not None: + shape3d = modelgrid.nlay * modelgrid.ncpl + if data.size == shape3d: + m1, m2, m3 = shape3d, 1, 1 return BinaryHeader.create( bintype="vardisv", precision=precision, text=text, - ncpl=modelgrid.ncpl, - ilay=ilay, - m3=1, + m1=m1, + m2=m2, + m3=m3, pertim=pertim, totim=totim, kstp=1, kper=stress_period, ) elif modelgrid.grid_type == "unstructured": + m1, m2, m3 = modelgrid.nnodes, 1, 1 return BinaryHeader.create( bintype="vardisu", precision=precision, text=text, - nodes=modelgrid.nnodes, + m1=m1, m2=1, m3=1, pertim=pertim, @@ -317,13 +338,14 @@ def _get_header( else: if ilay is None: ilay = 1 + m1, m2, m3 = 1, 1, ilay header = BinaryHeader.create( bintype="vardis", precision=precision, text=text, - nrow=1, - ncol=1, - ilay=ilay, + m1=m1, + m2=m2, + m3=m3, pertim=pertim, totim=totim, kstp=1, @@ -339,14 +361,15 @@ def _get_header( "binary file {}.".format(fname) ) else: + m1, m2, m3 = 1, 1, 1 pertim = np.float64(1.0) header = BinaryHeader.create( bintype="vardis", precision=precision, text=text, - nrow=1, - ncol=1, - ilay=1, + m1=m1, + m2=m2, + m3=m3, pertim=pertim, totim=pertim, kstp=1, diff --git a/flopy/utils/binaryfile.py b/flopy/utils/binaryfile.py index 8ed15bf54b..db7ffaf9fb 100644 --- a/flopy/utils/binaryfile.py +++ b/flopy/utils/binaryfile.py @@ -194,6 +194,7 @@ def set_values(self, **kwargs): "ilay", "ncpl", "nodes", + "m1", "m2", "m3", ] diff --git a/flopy/utils/datafile.py b/flopy/utils/datafile.py index 73a7f61b66..87fb4d9d98 100644 --- a/flopy/utils/datafile.py +++ b/flopy/utils/datafile.py @@ -81,9 +81,9 @@ def __init__(self, filetype=None, precision="single"): ("pertim", floattype), ("totim", floattype), ("text", "a16"), - ("ncol", "i4"), - ("nrow", "i4"), - ("ilay", "i4"), + ("m1", "i4"), + ("m2", "i4"), + ("m3", "i4"), ] ) elif self.header_type == "vardisv": @@ -94,8 +94,8 @@ def __init__(self, filetype=None, precision="single"): ("pertim", floattype), ("totim", floattype), ("text", "a16"), - ("ncpl", "i4"), - ("ilay", "i4"), + ("m1", "i4"), + ("m2", "i4"), ("m3", "i4"), ] ) @@ -107,7 +107,7 @@ def __init__(self, filetype=None, precision="single"): ("pertim", floattype), ("totim", floattype), ("text", "a16"), - ("nodes", "i4"), + ("m1", "i4"), ("m2", "i4"), ("m3", "i4"), ] From 021159bed614e80b0676a0e4c1dd61ac68c531de Mon Sep 17 00:00:00 2001 From: spaulins-usgs Date: Thu, 20 Jul 2023 07:28:06 -0700 Subject: [PATCH 04/25] fix(time series): fix for multiple time series attached to single package (#1867) (#1873) Co-authored-by: scottrp <45947939+scottrp@users.noreply.github.com> --- autotest/regression/test_mf6.py | 204 ++++++++++++++++++++++++++++++++ flopy/mf6/mfpackage.py | 35 ++++-- 2 files changed, 229 insertions(+), 10 deletions(-) diff --git a/autotest/regression/test_mf6.py b/autotest/regression/test_mf6.py index f46e47193e..ef34bc89ce 100644 --- a/autotest/regression/test_mf6.py +++ b/autotest/regression/test_mf6.py @@ -54,6 +54,210 @@ pytestmark = pytest.mark.mf6 +@requires_exe("mf6") +@pytest.mark.regression +def test_ts(function_tmpdir, example_data_path): + ws = function_tmpdir / "ws" + name = "test_ts" + + # create the flopy simulation and tdis objects + sim = flopy.mf6.MFSimulation( + sim_name=name, exe_name="mf6", version="mf6", sim_ws=ws + ) + tdis_rc = [(1.0, 1, 1.0), (10.0, 5, 1.0), (10.0, 5, 1.0), (10.0, 1, 1.0)] + tdis_package = flopy.mf6.modflow.mftdis.ModflowTdis( + sim, time_units="DAYS", nper=4, perioddata=tdis_rc + ) + # create the Flopy groundwater flow (gwf) model object + model_nam_file = f"{name}.nam" + gwf = flopy.mf6.ModflowGwf( + sim, modelname=name, model_nam_file=model_nam_file + ) + # create the flopy iterative model solver (ims) package object + ims = flopy.mf6.modflow.mfims.ModflowIms( + sim, pname="ims", complexity="SIMPLE" + ) + # create the discretization package + bot = np.linspace(-3.0, -50.0 / 3.0, 3) + delrow = delcol = 4.0 + dis = flopy.mf6.modflow.mfgwfdis.ModflowGwfdis( + gwf, + pname="dis", + nogrb=True, + nlay=3, + nrow=101, + ncol=101, + delr=delrow, + delc=delcol, + top=0.0, + botm=bot, + ) + # create the initial condition (ic) and node property flow (npf) packages + ic_package = flopy.mf6.modflow.mfgwfic.ModflowGwfic(gwf, strt=50.0) + npf_package = flopy.mf6.modflow.mfgwfnpf.ModflowGwfnpf( + gwf, + save_flows=True, + icelltype=[1, 0, 0], + k=[5.0, 0.1, 4.0], + k33=[0.5, 0.005, 0.1], + ) + oc = ModflowGwfoc( + gwf, + budget_filerecord=[(f"{name}.cbc",)], + head_filerecord=[(f"{name}.hds",)], + saverecord={ + 0: [("HEAD", "ALL"), ("BUDGET", "ALL")], + 1: [], + }, + printrecord=[("HEAD", "ALL")], + ) + + # build ghb stress period data + ghb_spd_ts = {} + ghb_period = [] + for layer, cond in zip(range(1, 3), [15.0, 1500.0]): + for row in range(0, 15): + ghb_period.append(((layer, row, 9), "tides", cond, "Estuary-L2")) + ghb_spd_ts[0] = ghb_period + + # build ts data + ts_data = [] + for n in range(0, 365): + time = float(n / 11.73) + val = float(n / 60.0) + ts_data.append((time, val)) + ts_dict = { + "filename": "tides.ts", + "time_series_namerecord": "tide", + "timeseries": ts_data, + "interpolation_methodrecord": "linearend", + "sfacrecord": 1.1, + } + + # build ghb package + ghb = flopy.mf6.modflow.mfgwfghb.ModflowGwfghb( + gwf, + print_input=True, + print_flows=True, + save_flows=True, + boundnames=True, + timeseries=ts_dict, + pname="ghb", + maxbound=30, + stress_period_data=ghb_spd_ts, + ) + + # set required time series attributes + ghb.ts.time_series_namerecord = "tides" + + # clean up for next example + gwf.remove_package("ghb") + + # build ghb stress period data + ghb_spd_ts = {} + ghb_period = [] + for layer, cond in zip(range(1, 3), [15.0, 1500.0]): + for row in range(0, 15): + if row < 10: + ghb_period.append( + ((layer, row, 9), "tides", cond, "Estuary-L2") + ) + else: + ghb_period.append(((layer, row, 9), "wl", cond, "Estuary-L2")) + ghb_spd_ts[0] = ghb_period + + # build ts data + ts_data = [] + for n in range(0, 365): + time = float(n / 11.73) + val = float(n / 60.0) + ts_data.append((time, val)) + ts_data2 = [] + for n in range(0, 365): + time = float(n / 11.73) + val = float(n / 30.0) + ts_data2.append((time, val)) + ts_data3 = [] + for n in range(0, 365): + time = float(n / 11.73) + val = float(n / 20.0) + ts_data3.append((time, val)) + + # build ghb package + ghb = flopy.mf6.modflow.mfgwfghb.ModflowGwfghb( + gwf, + print_input=True, + print_flows=True, + save_flows=True, + boundnames=True, + pname="ghb", + maxbound=30, + stress_period_data=ghb_spd_ts, + ) + + # initialize first time series + ghb.ts.initialize( + filename="tides.ts", + timeseries=ts_data, + time_series_namerecord="tides", + interpolation_methodrecord="linearend", + sfacrecord=1.1, + ) + + # append additional time series + ghb.ts.append_package( + filename="wls.ts", + timeseries=ts_data2, + time_series_namerecord="wl", + interpolation_methodrecord="stepwise", + sfacrecord=1.2, + ) + # append additional time series + ghb.ts.append_package( + filename="wls2.ts", + timeseries=ts_data3, + time_series_namerecord="wl2", + interpolation_methodrecord="stepwise", + sfacrecord=1.3, + ) + + sim.write_simulation() + ret = sim.run_simulation() + assert ret + sim2 = flopy.mf6.MFSimulation.load("mfsim.nam", sim_ws=ws, exe_name="mf6") + sim2_ws = os.path.join(ws, "2") + sim2.set_sim_path(sim2_ws) + sim2.write_simulation() + ret = sim2.run_simulation() + assert ret + + # compare datasets + model2 = sim2.get_model() + ghb_m2 = model2.get_package("ghb") + wls_m2 = ghb_m2.ts[1] + wls_m1 = ghb.ts[1] + + ts_m1 = wls_m1.timeseries.get_data() + ts_m2 = wls_m2.timeseries.get_data() + + assert ts_m1[0][1] == 0.0 + assert ts_m1[30][1] == 1.0 + for m1_line, m2_line in zip(ts_m1, ts_m2): + assert abs(m1_line[1] - m2_line[1]) < 0.000001 + + # compare output to expected results + head_1 = os.path.join(ws, f"{name}.hds") + head_2 = os.path.join(sim2_ws, f"{name}.hds") + outfile = os.path.join(ws, "head_compare.dat") + assert compare_heads( + None, + None, + files1=[head_1], + files2=[head_2], + outfile=outfile, + ) + + @requires_exe("mf6") @pytest.mark.regression def test_np001(function_tmpdir, example_data_path): diff --git a/flopy/mf6/mfpackage.py b/flopy/mf6/mfpackage.py index d62fd71e2f..ed5bcb8e84 100644 --- a/flopy/mf6/mfpackage.py +++ b/flopy/mf6/mfpackage.py @@ -1739,7 +1739,7 @@ def __init__( ): # initialize as part of the parent's child package group chld_pkg_grp = self.parent_file._child_package_groups[package_type] - chld_pkg_grp.init_package(self, self._filename) + chld_pkg_grp.init_package(self, self._filename, False) # remove any remaining valid kwargs key_list = list(kwargs.keys()) @@ -3264,15 +3264,26 @@ def _next_default_file_path(self): suffix += 1 return possible_path - def init_package(self, package, fname): - # clear out existing packages - self._remove_packages() + def init_package(self, package, fname, remove_packages=True): + if remove_packages: + # clear out existing packages + self._remove_packages() + elif fname is not None: + self._remove_packages(fname) if fname is None: # build a file name fname = self._next_default_file_path() package._filename = fname - # set file record variable - self._filerecord.set_data(fname, autofill=True) + # check file record variable + found = False + fr_data = self._filerecord.get_data() + if fr_data is not None: + for line in fr_data: + if line[0] == fname: + found = True + if not found: + # append file record variable + self._filerecord.append_data([(fname,)]) # add the package to the list self._packages.append(package) @@ -3319,7 +3330,11 @@ def _append_package(self, package, fname, update_frecord=True): # add the package to the list self._packages.append(package) - def _remove_packages(self): - for package in self._packages: - self._model_or_sim.remove_package(package) - self._packages = [] + def _remove_packages(self, fname=None): + rp_list = [] + for idx, package in enumerate(self._packages): + if fname is None or package.filename == fname: + self._model_or_sim.remove_package(package) + rp_list.append(idx) + for idx in reversed(rp_list): + self._packages.pop(idx) From 7e8a0cba122707ab1a87b0d1f13e05afbce29e94 Mon Sep 17 00:00:00 2001 From: spaulins-usgs Date: Thu, 27 Jul 2023 08:30:33 -0700 Subject: [PATCH 05/25] fix(check): check now works properly with confined conditions (#1880) (#1882) * fix(check): check now works properly with confined conditions (#1880) * github workflows undo --------- Co-authored-by: scottrp <45947939+scottrp@users.noreply.github.com> --- autotest/regression/test_mf6.py | 7 ++++++- flopy/pakbase.py | 9 +++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/autotest/regression/test_mf6.py b/autotest/regression/test_mf6.py index ef34bc89ce..1b0b19db43 100644 --- a/autotest/regression/test_mf6.py +++ b/autotest/regression/test_mf6.py @@ -948,9 +948,14 @@ def test_np002(function_tmpdir, example_data_path): oc_package.printrecord.set_data([("HEAD", "ALL"), ("BUDGET", "ALL")], 1) sto_package = ModflowGwfsto( - model, save_flows=True, iconvert=1, ss=0.000001, sy=0.15 + model, save_flows=True, iconvert=0, ss=0.000001, sy=None, pname="sto_t" ) + sto_package.check() + model.remove_package("sto_t") + sto_package = ModflowGwfsto( + model, save_flows=True, iconvert=1, ss=0.000001, sy=0.15 + ) hfb_package = ModflowGwfhfb( model, print_input=True, diff --git a/flopy/pakbase.py b/flopy/pakbase.py index 11aee0f5a6..432381820c 100644 --- a/flopy/pakbase.py +++ b/flopy/pakbase.py @@ -413,6 +413,15 @@ def _check_storage(self, chk, storage_coeff): skip_sy_check = True else: iconvert = self.iconvert.array + inds = np.array( + [ + True if l > 0 or l < 0 else False + for l in iconvert.flatten() + ] + ) + if not inds.any(): + skip_sy_check = True + for ishape in np.ndindex(active.shape): if active[ishape]: active[ishape] = ( From 364b4d17da421b15e69918a67b4d1c0b159fbf77 Mon Sep 17 00:00:00 2001 From: w-bonelli Date: Wed, 2 Aug 2023 18:33:52 -0400 Subject: [PATCH 06/25] refactor(dependencies): constrain sphinx >=4 (#1898) --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 8eb30c8ef5..b0e7d43cbe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -88,6 +88,7 @@ doc = [ "PyYAML", "recommonmark", "rtds-action", + "sphinx >=4", "sphinx-rtd-theme", ] From ee92091b096ad16a14cd8dd1f142abbb944bf91f Mon Sep 17 00:00:00 2001 From: w-bonelli Date: Thu, 3 Aug 2023 08:49:24 -0400 Subject: [PATCH 07/25] refactor(dependencies): constrain sphinx-rtd-theme >=1 (#1900) --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b0e7d43cbe..c1afffbabd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -89,7 +89,7 @@ doc = [ "recommonmark", "rtds-action", "sphinx >=4", - "sphinx-rtd-theme", + "sphinx-rtd-theme >=1", ] [project.scripts] From 2222245a1fbc4c9955f99a0f98c319843f4eb18a Mon Sep 17 00:00:00 2001 From: Ralf Junghanns Date: Thu, 3 Aug 2023 23:03:21 +0200 Subject: [PATCH 08/25] fix(mtlistfile): fix reading MT3D budget (#1899) * fix character span reading tkstp with a regex match * skip particle information reading GW-Mass Budget Co-authored-by: Ralf Junghanns --- autotest/test_listbudget.py | 4 + examples/data/mt3d_test/mt3d_with_adv.list | 330 +++++++++++++++++++++ flopy/utils/mtlistfile.py | 44 ++- 3 files changed, 374 insertions(+), 4 deletions(-) create mode 100644 examples/data/mt3d_test/mt3d_with_adv.list diff --git a/autotest/test_listbudget.py b/autotest/test_listbudget.py index ffc4a094a3..dddf150ce9 100644 --- a/autotest/test_listbudget.py +++ b/autotest/test_listbudget.py @@ -123,6 +123,10 @@ def test_mtlist(example_data_path): mt = MtListBudget(mt_dir / "mcomp.list") df_gw, df_sw = mt.parse(forgive=False, diff=False, start_datetime=None) + mt_dir = example_data_path / "mt3d_test" + mt = MtListBudget(mt_dir / "mt3d_with_adv.list") + df_gw, df_sw = mt.parse(forgive=False, diff=False, start_datetime=None) + mt_dir = example_data_path / "mt3d_test" mt = MtListBudget(mt_dir / "CrnkNic.mt3d.list") df_gw, df_sw = mt.parse(forgive=False, diff=True, start_datetime=None) diff --git a/examples/data/mt3d_test/mt3d_with_adv.list b/examples/data/mt3d_test/mt3d_with_adv.list new file mode 100644 index 0000000000..daf39ef40c --- /dev/null +++ b/examples/data/mt3d_test/mt3d_with_adv.list @@ -0,0 +1,330 @@ + LISTING FILE: mt.list + UNIT 16 + + OPENING mt3d_link.ftl + FILE TYPE:FTL UNIT 10 + + OPENING mt.btn + FILE TYPE:BTN UNIT 31 + + OPENING mt.adv + FILE TYPE:ADV UNIT 32 + + OPENING mt.dsp + FILE TYPE:DSP UNIT 33 + + OPENING mt.gcg + FILE TYPE:GCG UNIT 35 + + OPENING mt.ssm + FILE TYPE:SSM UNIT 34 + + OPENING mt.rct + FILE TYPE:RCT UNIT 36 + + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + + + + MT3DMS + + + A Modular 3D Multi-Species Transport Model + + + For Simulation of Advection, Dispersion and Chemical Reactions + + + of Contaminants in Groundwater Systems + + + + + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + ----- + | M T | ## BTN for MT3DMS, generated by Flopy. + | 3 D | ## + ----- + THE TRANSPORT MODEL CONSISTS OF 1 LAYER(S) 31 ROW(S) 31 COLUMN(S) + NUMBER OF STRESS PERIOD(S) FOR TRANSPORT SIMULATION = 1 + NUMBER OF ALL COMPONENTS INCLUDED IN SIMULATION = 1 + NUMBER OF MOBILE COMPONENTS INCLUDED IN SIMULATION = 1 + UNIT FOR TIME IS D ; UNIT FOR LENGTH IS M ; UNIT FOR MASS IS KG + OPTIONAL PACKAGES INCLUDED IN CURRENT SIMULATION: + o ADV ON UNIT 32 + o DSP ON UNIT 33 + o SSM ON UNIT 34 + o RCT ON UNIT 36 + o GCG ON UNIT 35 + + BTN5 -- BASIC TRANSPORT PACKAGE, VERSION 5, FEBRUARY 2010, INPUT READ FROM UNIT 31 + 15500 ELEMENTS OF THE X ARRAY USED BY THE BTN PACKAGE + 962 ELEMENTS OF THE IX ARRAY USED BY THE BTN PACKAGE + + FMI5 -- FLOW MODEL INTERFACE PACKAGE, VERSION 5, FEBRUARY 2010, INPUT READ FROM UNIT 10 + FLOW MODEL IS STEADY-STATE + + ADV5 -- ADVECTION PACKAGE, VERSION 5, FEBRUARY 2010, INPUT READ FROM UNIT 32 + ADVECTION IS SOLVED WITH THE HYBRID [MOC]/[MMOC] SCHEME + COURANT NUMBER ALLOWED IN SOLVING THE ADVECTION TERM = 0.750 + MAXIMUM NUMBER OF MOVING PARTICLES ALLOWED = 800000 + 3200000 ELEMENTS OF THE X ARRAY USED BY THE ADV PACKAGE + 1600961 ELEMENTS OF THE IX ARRAY USED BY THE ADV PACKAGE + + DSP5 -- DISPERSION PACKAGE, VERSION 5, FEBRUARY 2010, INPUT READ FROM UNIT 33 + 10573 ELEMENTS OF THE X ARRAY USED BY THE DSP PACKAGE + 0 ELEMENTS OF THE IX ARRAY USED BY THE DSP PACKAGE + + SSM5 -- SINK & SOURCE MIXING PACKAGE, VERSION 5, FEBRUARY 2010, INPUT READ FROM UNIT 34 + HEADER LINE OF THE SSM PACKAGE INPUT FILE: + T F F F F F F F F F F F F F F F + MAJOR STRESS COMPONENTS PRESENT IN THE FLOW MODEL: + o WELL [WEL] + MAXIMUM NUMBER OF POINT SINKS/SOURCES = 121 + 1573 ELEMENTS OF THE X ARRAY USED BY THE SSM PACKAGE + 0 ELEMENTS OF THE IX ARRAY BY THE SSM PACKAGE + + RCT5 -- CHEMICAL REACTION PACKAGE, VERSION 5, FEBRUARY 2010, INPUT READ FROM UNIT 36 + NO SORPTION [OR DUAL-DOMAIN MODEL] IS SIMULATED + NO FIRST-ORDER RATE REACTION IS SIMULATED + REACTION COEFFICIENTS ASSIGNED CELL-BY-CELL + INITIAL SORBED/IMMOBILE PHASE CONCENTRATION ASSIGNED BY DEFAULT + 0 ELEMENTS OF THE X ARRAY USED BY THE RCT PACKAGE + 0 ELEMENTS OF THE IX ARRAY USED BY THE RCT PACKAGE + + GCG5 -- GENERALIZED CONJUGATE GRADIENT SOLVER PACKAGE, VERSION 5, FEBRUARY 2010 INPUT READ FROM UNIT 35 + MAXIMUM OF 1 OUTER ITERATIONS + AND 50 INNER ITERATIONS ALLOWED FOR CLOSURE + THE PRECONDITIONING TYPE SELECTED IS MODIFIED INCOMPLETE CHOLESKY (MIC). + DISPERSION CROSS TERMS LUMPED INTO RIGHT-HAND-SIDE + 21192 ELEMENTS OF THE X ARRAY USED BY THE GCG PACKAGE + 150 ELEMENTS OF THE IX ARRAY USED BY THE GCG PACKAGE + + .......................................... + ELEMENTS OF THE X ARRAY USED = 3248839 + ELEMENTS OF THE IX ARRAY USED = 1602074 + .......................................... + + LAYER NUMBER AQUIFER TYPE + ------------ ------------ + 1 0 + + WIDTH ALONG ROWS (DELR) READ ON UNIT 31 USING FORMAT: " (31E15.6) " + ----------------------------------------------------------------------------- + + WIDTH ALONG COLS (DELC) READ ON UNIT 31 USING FORMAT: " (31E15.6) " + ----------------------------------------------------------------------------- + TOP ELEV. OF 1ST LAYER = 10.00000 + + CELL THICKNESS (DZ) FOR LAYER 1 READ ON UNIT 31 USING FORMAT: " (31E15.6) " + ------------------------------------------------------------------------------------------ + POROSITY = 0.3000000 FOR LAYER 1 + CONCN. BOUNDARY ARRAY = 1 FOR LAYER 1 + INITIAL CONC.: COMP. 01 = 0.000000 FOR LAYER 1 + + VALUE INDICATING INACTIVE CONCENTRATION CELLS = 0.1000000E+31 + MINIMUM SATURATED THICKNESS [THKMIN] ALLOWED = 0.0100 OF TOTAL CELL THICKNESS + + + OUTPUT CONTROL OPTIONS + ---------------------- + + DO NOT PRINT CELL CONCENTRATION + DO NOT PRINT PARTICLE NUMBER IN EACH CELL + DO NOT PRINT RETARDATION FACTOR + DO NOT PRINT DISPERSION COEFFICIENT + SAVE DISSOLVED PHASE CONCENTRATIONS IN UNFORMATTED FILES [MT3Dnnn.UCN] + FOR EACH SPECIES ON UNITS 201 AND ABOVE + + NUMBER OF TIMES AT WHICH SIMULATION RESULTS ARE SAVED = 0 + + NUMBER OF OBSERVATION POINTS = 0 + + SAVE ONE-LINE SUMMARY OF MASS BUDGETS IN FILES [MT3Dnnn.MAS] + FOR EACH SPECIES ON UNITS 601 AND ABOVE, EVERY 1 TRANSPORT STEPS + + MAXIMUM LENGTH ALONG THE X (J) AXIS = 311.0040 + MAXIMUM LENGTH ALONG THE Y (I) AXIS = 313.7939 + MAXIMUM LENGTH ALONG THE Z (K) AXIS = 1.000000 + + + ADVECTION SOLUTION OPTIONS + -------------------------- + + ADVECTION IS SOLVED WITH THE HYBRID [MOC]/[MMOC] SCHEME + COURANT NUMBER ALLOWED IN SOLVING THE ADVECTION TERM = 0.750 + MAXIMUM NUMBER OF MOVING PARTICLES ALLOWED = 800000 + METHOD FOR PARTICLE TRACKING IS [MIXED ORDER] + CONCENTRATION WEIGHTING FACTOR [WD] = 0.500 + THE CONCENTRATION GRADIENT CONSIDERED NEGLIGIBLE [DCEPS] = 0.1000000E-04 + INITIAL PARTICLES ARE PLACED ON 2 VERTICAL PLANE(S) WITHIN CELL BLOCK + PARTICLE NUMBER PER CELL IF DCCELL =< DCEPS = 10 + PARTICLE NUMBER PER CELL IF DCCELL > DCEPS = 40 + MINIMUM PARTICLE NUMBER ALLOWD PER CELL = 5 + MAXIMUM PARTICLE NUMBER ALLOWD PER CELL = 80 + MULTIPLIER OF PARTICLE NUMBER AT SOURCE = 1.00 + SCHEME FOR CONCENTRATION INTERPOLATION IS [LINEAR] + PARTICLES FOR APPROXIMATING A SINK CELL IN THE [MMOC] SCHEME + ARE PLACED RANDOMLY WITHIN CELL BLOCK + NUMBER OF PARTICLES USED TO APPROXIMATE A SINK CELL IN THE [MMOC] SCHEME = 15 + CRITICAL CONCENTRATION GRADIENT USED IN THE "HMOC" SCHEME [DCHMOC] = 0.1000E-03 + THE "MOC" SOLUTION IS USED WHEN DCCELL > DCHMOC + THE "MMOC" SOLUTION IS USED WHEN DCCELL =< DCHMOC + + + DISPERSION INPUT PARAMETERS + --------------------------- + + LONG. DISPERSIVITY (AL) = 0.1000000E-01 FOR LAYER 1 + H. TRANS./LONG. DISP. = 0.1000000 + V. TRANS./LONG. DISP. = 0.1000000E-01 + DIFFUSION COEFFICIENT = 0.1000000E-08 + + + SORPTION AND 1ST/0TH ORDER REACTION PARAMETERS + ---------------------------------------------- + + + + + SOLUTION BY THE GENERALIZED CONJUGATE GRADIENT METHOD + ----------------------------------------------------- + MAXIMUM OUTER ITERATIONS ALLOWED FOR CLOSURE = 1 + MAXIMUM INNER ITERATIONS ALLOWED FOR CLOSURE = 50 + PRECONDITIONING TYPE SELECTED = 3 + ACCELERATION PARAMETER = 1.0000 + CONCENTRATION CHANGE CRITERION FOR CLOSURE = 0.10000E-04 + GCG CONCENTRATION CHANGE PRINTOUT INTERVAL = 999 + + + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + STRESS PERIOD NO. 001 + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + + LENGTH OF CURRENT STRESS PERIOD = 26.00000 + NUMBER OF TIME STEPS FOR CURRENT STRESS PERIOD = 1 + TIME STEP MULTIPLIER USED IN FLOW SOLUTION = 1.000000 + + ***Type of Transport Simulation is TRANSIENT + + USER-SPECIFIED TRANSPORT STEPSIZE = 0.000000 D + MAXIMUM NUMBER OF TRANSPORT STEPS ALLOWED IN ONE FLOW TIME STEP = 50000 + MULTIPLIER FOR SUCCESSIVE TRANSPORT STEPS [USED IN IMPLICIT SCHEMES] = 1.000 + MAXIMUM TRANSPORT STEP SIZE [USED IN IMPLICIT SCHEMES] = 0.000000 D + + NO LAYER ROW COLUMN CONCENTRATION TYPE COMPONENT + 1 1 16 16 50.00000 WELL 1 + + + ================================================ + TIME STEP NO. 001 + ================================================ + + FROM TIME = 0.0000 TO 26.000 + + + "THKSAT " FLOW TERMS FOR TIME STEP 1, STRESS PERIOD 1 READ UNFORMATTED ON UNIT 10 + -------------------------------------------------------------------------------------------- + + "QXX " FLOW TERMS FOR TIME STEP 1, STRESS PERIOD 1 READ UNFORMATTED ON UNIT 10 + -------------------------------------------------------------------------------------------- + + "QYY " FLOW TERMS FOR TIME STEP 1, STRESS PERIOD 1 READ UNFORMATTED ON UNIT 10 + -------------------------------------------------------------------------------------------- + + MAXIMUM STEPSIZE DURING WHICH ANY PARTICLE CANNOT MOVE MORE THAN ONE CELL + = 1.666 (WHEN MIN. R.F.=1) AT K= 1, I= 16, J= 15 + + MAXIMUM STEPSIZE WHICH MEETS STABILITY CRITERION OF THE ADVECTION TERM + (FOR PURE FINITE-DIFFERENCE OPTION, MIXELM=0) + = 0.6094 (WHEN MIN. R.F.=1) AT K= 1, I= 16, J= 16 + + "CNH " FLOW TERMS FOR TIME STEP 1, STRESS PERIOD 1 READ UNFORMATTED ON UNIT 10 + -------------------------------------------------------------------------------------------- + + "WEL " FLOW TERMS FOR TIME STEP 1, STRESS PERIOD 1 READ UNFORMATTED ON UNIT 10 + -------------------------------------------------------------------------------------------- + + + TOTAL NUMBER OF POINT SOURCES/SINKS PRESENT IN THE FLOW MODEL = 121 + + MAXIMUM STEPSIZE WHICH MEETS STABILITY CRITERION OF THE SINK & SOURCE TERM + = 0.3047 (WHEN MIN. R.F.=1) AT K= 1, I= 16, J= 16 + + MAXIMUM STEPSIZE WHICH MEETS STABILITY CRITERION OF THE DISPERSION TERM + = 307.1 (WHEN MIN. R.F.=1) AT K= 1, I= 16, J= 16 + + + 1 CALLS TO GCG PACKAGE FOR TRANSPORT TIME STEP 1 IN FLOW TIME STEP 1 STRESS PERIOD 1 + 2 TOTAL ITERATIONS + 1 CALLS TO GCG PACKAGE FOR TRANSPORT TIME STEP 2 IN FLOW TIME STEP 1 STRESS PERIOD 1 + 2 TOTAL ITERATIONS + 1 CALLS TO GCG PACKAGE FOR TRANSPORT TIME STEP 3 IN FLOW TIME STEP 1 STRESS PERIOD 1 + 2 TOTAL ITERATIONS + 1 CALLS TO GCG PACKAGE FOR TRANSPORT TIME STEP 4 IN FLOW TIME STEP 1 STRESS PERIOD 1 + 2 TOTAL ITERATIONS + 1 CALLS TO GCG PACKAGE FOR TRANSPORT TIME STEP 5 IN FLOW TIME STEP 1 STRESS PERIOD 1 + 2 TOTAL ITERATIONS + 1 CALLS TO GCG PACKAGE FOR TRANSPORT TIME STEP 6 IN FLOW TIME STEP 1 STRESS PERIOD 1 + 2 TOTAL ITERATIONS + 1 CALLS TO GCG PACKAGE FOR TRANSPORT TIME STEP 7 IN FLOW TIME STEP 1 STRESS PERIOD 1 + 2 TOTAL ITERATIONS + 1 CALLS TO GCG PACKAGE FOR TRANSPORT TIME STEP 8 IN FLOW TIME STEP 1 STRESS PERIOD 1 + 2 TOTAL ITERATIONS + 1 CALLS TO GCG PACKAGE FOR TRANSPORT TIME STEP 9 IN FLOW TIME STEP 1 STRESS PERIOD 1 + 2 TOTAL ITERATIONS + 1 CALLS TO GCG PACKAGE FOR TRANSPORT TIME STEP 10 IN FLOW TIME STEP 1 STRESS PERIOD 1 + 2 TOTAL ITERATIONS + 1 CALLS TO GCG PACKAGE FOR TRANSPORT TIME STEP 11 IN FLOW TIME STEP 1 STRESS PERIOD 1 + 2 TOTAL ITERATIONS + 1 CALLS TO GCG PACKAGE FOR TRANSPORT TIME STEP 12 IN FLOW TIME STEP 1 STRESS PERIOD 1 + 2 TOTAL ITERATIONS + 1 CALLS TO GCG PACKAGE FOR TRANSPORT TIME STEP 13 IN FLOW TIME STEP 1 STRESS PERIOD 1 + 2 TOTAL ITERATIONS + 1 CALLS TO GCG PACKAGE FOR TRANSPORT TIME STEP 14 IN FLOW TIME STEP 1 STRESS PERIOD 1 + 2 TOTAL ITERATIONS + 1 CALLS TO GCG PACKAGE FOR TRANSPORT TIME STEP 15 IN FLOW TIME STEP 1 STRESS PERIOD 1 + 2 TOTAL ITERATIONS + 1 CALLS TO GCG PACKAGE FOR TRANSPORT TIME STEP 16 IN FLOW TIME STEP 1 STRESS PERIOD 1 + 2 TOTAL ITERATIONS + 1 CALLS TO GCG PACKAGE FOR TRANSPORT TIME STEP 17 IN FLOW TIME STEP 1 STRESS PERIOD 1 + 2 TOTAL ITERATIONS + 1 CALLS TO GCG PACKAGE FOR TRANSPORT TIME STEP 18 IN FLOW TIME STEP 1 STRESS PERIOD 1 + 2 TOTAL ITERATIONS + 1 CALLS TO GCG PACKAGE FOR TRANSPORT TIME STEP 19 IN FLOW TIME STEP 1 STRESS PERIOD 1 + 2 TOTAL ITERATIONS + 1 CALLS TO GCG PACKAGE FOR TRANSPORT TIME STEP 20 IN FLOW TIME STEP 1 STRESS PERIOD 1 + 2 TOTAL ITERATIONS + 1 CALLS TO GCG PACKAGE FOR TRANSPORT TIME STEP 21 IN FLOW TIME STEP 1 STRESS PERIOD 1 + 2 TOTAL ITERATIONS + MAXIMUM CONCENTRATION CHANGES FOR EACH ITERATION: + MAX. CHANGE LAYER,ROW,COL MAX. CHANGE LAYER,ROW,COL MAX. CHANGE LAYER,ROW,COL MAX. CHANGE LAYER,ROW,COL MAX. CHANGE LAYER,ROW,COL + ------------------------------------------------------------------------------------------------------------------------------------ + 0.1276E-03 ( 1, 14, 12) 0.7523E-36 ( 1, 3, 30) + + + + >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>FOR COMPONENT NO. 01<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< + + + ------------------------------------------- + TRANSPORT STEP NO. 21 + ------------------------------------------- + + TOTAL ELAPSED TIME SINCE BEGINNING OF SIMULATION = 26.00000 D + ..................................................................... + + TOTAL PARTICLES USED IN THE CURRENT STEP = 4264 + PARTICLES ADDED AT BEGINNING OF THE STEP = 256 + PARTICLES REMOVED AT END OF LAST STEP = 0 + + CUMMULATIVE MASS BUDGETS AT END OF TRANSPORT STEP 21, TIME STEP 1, STRESS PERIOD 1 + ------------------------------------------------------------------------------------------ + + IN OUT + ---------------- ---------------- + CONSTANT CONCENTRATION: 0.000000 0.000000 + CONSTANT HEAD: 0.000000 -0.1140626E-09 + WELLS: 130000.0 0.000000 + 1ST/0TH ORDER REACTION: 0.000000 0.000000 + MASS STORAGE (SOLUTE): 43.12313 -122520.2 + --------------------------------------------------------------------------- + [TOTAL]: 130043.1 KG -122520.2 KG + + NET (IN - OUT): 7522.922 + DISCREPANCY (PERCENT): 5.957257 + ----- + | M T | + | 3 D | END OF MODEL OUTPUT + ----- diff --git a/flopy/utils/mtlistfile.py b/flopy/utils/mtlistfile.py index 5214859795..5699061b56 100644 --- a/flopy/utils/mtlistfile.py +++ b/flopy/utils/mtlistfile.py @@ -3,12 +3,11 @@ mt3d(usgs) run. Also includes support for SFT budget. """ +import re import warnings import numpy as np -from ..utils import import_optional_dependency - class MtListBudget: """ @@ -23,7 +22,6 @@ class MtListBudget: Examples -------- >>> mt_list = MtListBudget("my_mt3d.list") - >>> incremental, cumulative = mt_list.get_budget() >>> gw_df, sw_df = mt_list.parse(start_datetime="10-21-2015") """ @@ -47,6 +45,7 @@ def __init__(self, file_name): self.time_key = line.lower() line = "TRANSPORT TIME STEP" self.tkstp_key = line.lower() + self.particles_key = "TOTAL PARTICLES USED IN THE CURRENT STEP" return @@ -114,7 +113,18 @@ def parse( else: self._parse_sw(f, line) elif self.tkstp_key in line: - self.tkstp_overflow = int(line[51:58]) + try: + self.tkstp_overflow = ( + self._extract_number_between_strings( + line, self.tkstp_key, "in" + ) + ) + except Exception as e: + warnings.warn( + "error parsing TKSTP key " + f"starting on line {self.lcount}: {e!s}" + ) + break if len(self.gw_data) == 0: raise Exception("no groundwater budget info found...") @@ -266,6 +276,15 @@ def _parse_gw(self, f, line): line = self._readline(f) if line is None: raise Exception("EOF while reading from totim to time step") + + if self.particles_key.lower() in line: + for _ in range(4): + line = self._readline(f) + if line is None: + raise Exception( + "EOF while reading from time step to particles" + ) + try: kper = int(line[-6:-1]) kstp = int(line[-26:-21]) @@ -481,3 +500,20 @@ def _add_to_sw_data(self, inout, item, cval, fval, comp): if iitem not in self.sw_data.keys(): self.sw_data[iitem] = [] self.sw_data[iitem].append(val) + + @staticmethod + def _extract_number_between_strings( + input_string, start_string, end_string + ): + pattern = ( + rf"{re.escape(start_string)}\s*(\d+)\s*{re.escape(end_string)}" + ) + match = re.search(pattern, input_string) + + if match: + extracted_number = int(match.group(1)) + return extracted_number + else: + raise Exception( + f"Error extracting number between {start_string} and {end_string} in {input_string}" + ) From 5d21410cbe0c36d998fb3e6bcc4f8e443fcd7448 Mon Sep 17 00:00:00 2001 From: spaulins-usgs Date: Sun, 6 Aug 2023 09:08:52 -0700 Subject: [PATCH 09/25] fix(check): Updated flopy's check to work with cellid -1 values (#1885) * fix(test): should be a complete grid * fix(model grid): Always resync mf2005 grids * Revert "fix(model grid): Always resync mf2005 grids" * fix(grid idomain): grid idomain now defaults to all 1's for MF6 only * fix(notebook): notebook contained out of bounds cellid * fix(modelgrid): always force modelgrid to resync until an idomain array is provided --------- Co-authored-by: scottrp <45947939+scottrp@users.noreply.github.com> --- .docs/Notebooks/mf6_data_tutorial06.py | 9 +++--- autotest/regression/test_mf6.py | 4 ++- flopy/discretization/vertexgrid.py | 3 -- flopy/mf6/data/mfdatalist.py | 32 ++++++++++++++++++++- flopy/mf6/mfmodel.py | 40 ++++++++++++++++++++------ 5 files changed, 71 insertions(+), 17 deletions(-) diff --git a/.docs/Notebooks/mf6_data_tutorial06.py b/.docs/Notebooks/mf6_data_tutorial06.py index 92e7aa48cf..9fd43753a0 100644 --- a/.docs/Notebooks/mf6_data_tutorial06.py +++ b/.docs/Notebooks/mf6_data_tutorial06.py @@ -1,13 +1,14 @@ # --- # jupyter: # jupytext: +# notebook_metadata_filter: metadata # text_representation: # extension: .py # format_name: light -# format_version: "1.5" -# jupytext_version: 1.5.1 +# format_version: '1.5' +# jupytext_version: 1.14.4 # kernelspec: -# display_name: Python 3 +# display_name: Python 3 (ipykernel) # language: python # name: python3 # metadata: @@ -159,7 +160,7 @@ # Note that the cellid information (layer, row, column) is encapsulated in # a tuple. -stress_period_data = [((1, 10, 10), 100.0), ((1, 10, 11), 105.0)] +stress_period_data = [((1, 8, 8), 100.0), ((1, 9, 9), 105.0)] # build chd package chd = flopy.mf6.modflow.mfgwfchd.ModflowGwfchd( gwf, diff --git a/autotest/regression/test_mf6.py b/autotest/regression/test_mf6.py index 1b0b19db43..fba485696b 100644 --- a/autotest/regression/test_mf6.py +++ b/autotest/regression/test_mf6.py @@ -677,6 +677,7 @@ def test_np001(function_tmpdir, example_data_path): sim.delete_output_files() # test error checking + sim.simulation_data.verify_data = False drn_package = ModflowGwfdrn( model, print_input=True, @@ -697,6 +698,7 @@ def test_np001(function_tmpdir, example_data_path): k=100001.0, k33=1e-12, ) + sim.simulation_data.verify_data = True chk = sim.check() summary = ".".join(chk[0].summary_array.desc) assert "drn_1 package: invalid BC index" in summary @@ -3083,7 +3085,7 @@ def test028_create_tests_sfr(function_tmpdir, example_data_path): delc=5000.0, top=top, botm=botm, - idomain=idomain, + #idomain=idomain, filename=f"{model_name}.dis", ) strt = testutils.read_std_array(os.path.join(pth, "strt.txt"), "float") diff --git a/flopy/discretization/vertexgrid.py b/flopy/discretization/vertexgrid.py index 340439d3b2..d3bf905df4 100644 --- a/flopy/discretization/vertexgrid.py +++ b/flopy/discretization/vertexgrid.py @@ -97,9 +97,6 @@ def __init__( self._vertices = vertices self._cell1d = cell1d self._cell2d = cell2d - self._top = top - self._botm = botm - self._idomain = idomain if botm is None: self._nlay = nlay self._ncpl = ncpl diff --git a/flopy/mf6/data/mfdatalist.py b/flopy/mf6/data/mfdatalist.py index c9635b458f..e264bdb8f6 100644 --- a/flopy/mf6/data/mfdatalist.py +++ b/flopy/mf6/data/mfdatalist.py @@ -505,6 +505,36 @@ def _check_valid_cellids(self): idomain_val = idomain # cellid should be within the model grid for idx, cellid_part in enumerate(record[index]): + if cellid_part == -1: + # cellid not defined, all values should + # be -1 + match = all( + elem == record[index][0] + for elem in record[index] + ) + if not match: + message = ( + f"Invalid cellid {record[index]}" + ) + ( + type_, + value_, + traceback_, + ) = sys.exc_info() + raise MFDataException( + self.structure.get_model(), + self.structure.get_package(), + self.structure.path, + "storing data", + self.structure.name, + inspect.stack()[0][3], + type_, + value_, + traceback_, + message, + self._simulation_data.debug, + ) + continue if ( model_shape[idx] <= cellid_part or cellid_part < 0 @@ -530,7 +560,7 @@ def _check_valid_cellids(self): ) idomain_val = idomain_val[cellid_part] # cellid should be at an active cell - if idomain_val < 1: + if record[index][0] != -1 and idomain_val < 1: message = ( "Cellid {} is outside of the " "active model grid" diff --git a/flopy/mf6/mfmodel.py b/flopy/mf6/mfmodel.py index a47cf106c4..42356c976b 100644 --- a/flopy/mf6/mfmodel.py +++ b/flopy/mf6/mfmodel.py @@ -328,7 +328,7 @@ def modelgrid(self): model. """ - + force_resync = False if not self._mg_resync: return self._modelgrid if self.get_grid_type() == DiscretizationType.DIS: @@ -352,12 +352,17 @@ def modelgrid(self): angrot=self._modelgrid.angrot, ) else: + botm = dis.botm.array + idomain = dis.idomain.array + if idomain is None: + force_resync = True + idomain = self._resolve_idomain(idomain, botm) self._modelgrid = StructuredGrid( delc=dis.delc.array, delr=dis.delr.array, top=dis.top.array, - botm=dis.botm.array, - idomain=dis.idomain.array, + botm=botm, + idomain=idomain, lenuni=dis.length_units.array, crs=self._modelgrid.crs, xoff=self._modelgrid.xoffset, @@ -385,12 +390,17 @@ def modelgrid(self): angrot=self._modelgrid.angrot, ) else: + botm = dis.botm.array + idomain = dis.idomain.array + if idomain is None: + force_resync = True + idomain = self._resolve_idomain(idomain, botm) self._modelgrid = VertexGrid( vertices=dis.vertices.array, cell2d=dis.cell2d.array, top=dis.top.array, - botm=dis.botm.array, - idomain=dis.idomain.array, + botm=botm, + idomain=idomain, lenuni=dis.length_units.array, crs=self._modelgrid.crs, xoff=self._modelgrid.xoffset, @@ -480,12 +490,17 @@ def modelgrid(self): angrot=self._modelgrid.angrot, ) else: + botm = dis.botm.array + idomain = dis.idomain.array + if idomain is None: + force_resync = True + idomain = self._resolve_idomain(idomain, botm) self._modelgrid = VertexGrid( vertices=dis.vertices.array, cell1d=dis.cell1d.array, top=dis.top.array, - botm=dis.botm.array, - idomain=dis.idomain.array, + botm=botm, + idomain=idomain, lenuni=dis.length_units.array, crs=self._modelgrid.crs, xoff=self._modelgrid.xoffset, @@ -528,7 +543,7 @@ def modelgrid(self): angrot, self._modelgrid.crs, ) - self._mg_resync = not self._modelgrid.is_complete + self._mg_resync = not self._modelgrid.is_complete or force_resync return self._modelgrid @property @@ -1924,3 +1939,12 @@ def plot(self, SelPackList=None, **kwargs): ) return axes + + @staticmethod + def _resolve_idomain(idomain, botm): + if idomain is None: + if botm is None: + return idomain + else: + return np.ones_like(botm) + return idomain From 82bc3f1100eec3167f546e71a8c4d4520b7c0a3d Mon Sep 17 00:00:00 2001 From: w-bonelli Date: Mon, 7 Aug 2023 13:45:18 -0400 Subject: [PATCH 10/25] fix(BaseModel): don't suppress error if exe not found (#1901) * warn at init/load time if exe not found, raise error at model run time --- autotest/test_mbase.py | 17 +++++++++----- autotest/test_modflow.py | 50 ++++++++++++++++++++++++++++++++++++++++ flopy/mbase.py | 25 +++++++++++++++----- 3 files changed, 80 insertions(+), 12 deletions(-) diff --git a/autotest/test_mbase.py b/autotest/test_mbase.py index a2b3f6f619..757909f960 100644 --- a/autotest/test_mbase.py +++ b/autotest/test_mbase.py @@ -18,7 +18,7 @@ def mf6_model_path(example_data_path): @requires_exe("mf6") @pytest.mark.parametrize("use_ext", [True, False]) -def test_resolve_exe_named(function_tmpdir, use_ext): +def test_resolve_exe_by_name(function_tmpdir, use_ext): if use_ext and system() != "Windows": pytest.skip(".exe extensions are Windows-only") @@ -31,7 +31,7 @@ def test_resolve_exe_named(function_tmpdir, use_ext): @requires_exe("mf6") @pytest.mark.parametrize("use_ext", [True, False]) -def test_resolve_exe_full_path(function_tmpdir, use_ext): +def test_resolve_exe_by_abs_path(function_tmpdir, use_ext): if use_ext and system() != "Windows": pytest.skip(".exe extensions are Windows-only") @@ -44,7 +44,8 @@ def test_resolve_exe_full_path(function_tmpdir, use_ext): @requires_exe("mf6") @pytest.mark.parametrize("use_ext", [True, False]) -def test_resolve_exe_rel_path(function_tmpdir, use_ext): +@pytest.mark.parametrize("forgive", [True, False]) +def test_resolve_exe_by_rel_path(function_tmpdir, use_ext, forgive): if use_ext and system() != "Windows": pytest.skip(".exe extensions are Windows-only") @@ -66,9 +67,13 @@ def test_resolve_exe_rel_path(function_tmpdir, use_ext): assert actual.lower() == expected assert which(actual) - # should raise an error if exe DNE - with pytest.raises(FileNotFoundError): - resolve_exe("../bin/mf2005") + # check behavior if exe DNE + with ( + pytest.warns(UserWarning) + if forgive + else pytest.raises(FileNotFoundError) + ): + assert not resolve_exe("../bin/mf2005", forgive) def test_run_model_when_namefile_not_in_model_ws( diff --git a/autotest/test_modflow.py b/autotest/test_modflow.py index 72993c8909..4f165dd11d 100644 --- a/autotest/test_modflow.py +++ b/autotest/test_modflow.py @@ -200,6 +200,56 @@ def test_mt_modelgrid(function_tmpdir): assert np.array_equal(swt.modelgrid.idomain, ml.modelgrid.idomain) +@requires_exe("mp7") +def test_exe_selection(example_data_path, function_tmpdir): + model_path = example_data_path / "freyberg" + namfile_path = model_path / "freyberg.nam" + + # no selection defaults to mf2005 + exe_name = "mf2005" + assert Path(Modflow().exe_name).name == exe_name + assert Path(Modflow(exe_name=None).exe_name).name == exe_name + assert ( + Path(Modflow.load(namfile_path, model_ws=model_path).exe_name).name + == exe_name + ) + assert ( + Path( + Modflow.load( + namfile_path, exe_name=None, model_ws=model_path + ).exe_name + ).name + == exe_name + ) + + # user-specified (just for testing - there is no legitimate reason + # to use mp7 with Modflow but Modpath7 derives from BaseModel too) + exe_name = "mp7" + assert Path(Modflow(exe_name=exe_name).exe_name).name == exe_name + assert ( + Path( + Modflow.load( + namfile_path, exe_name=exe_name, model_ws=model_path + ).exe_name + ).name + == exe_name + ) + + # init/load should warn if exe DNE + exe_name = "not_an_exe" + with pytest.warns(UserWarning): + ml = Modflow(exe_name=exe_name) + with pytest.warns(UserWarning): + ml = Modflow.load(namfile_path, exe_name=exe_name, model_ws=model_path) + + # run should error if exe DNE + ml = Modflow.load(namfile_path, exe_name=exe_name, model_ws=model_path) + ml.change_model_ws(function_tmpdir) + ml.write_input() + with pytest.raises(ValueError): + ml.run_model() + + def test_free_format_flag(function_tmpdir): Lx = 100.0 Ly = 100.0 diff --git a/flopy/mbase.py b/flopy/mbase.py index c780ce093a..846bc6fca9 100644 --- a/flopy/mbase.py +++ b/flopy/mbase.py @@ -41,15 +41,21 @@ iprn = -1 -def resolve_exe(exe_name: Union[str, os.PathLike]) -> str: +def resolve_exe( + exe_name: Union[str, os.PathLike], forgive: bool = False +) -> str: """ - Resolves the absolute path of the executable. + Resolves the absolute path of the executable, raising FileNotFoundError if the executable + cannot be found (set forgive to True to return None and warn instead of raising an error). Parameters ---------- exe_name : str or PathLike The executable's name or path. If only the name is provided, the executable must be on the system path. + forgive : bool + If True and executable cannot be found, return None and warn + rather than raising a FileNotFoundError. Defaults to False. Returns ------- @@ -75,6 +81,12 @@ def resolve_exe(exe_name: Union[str, os.PathLike]) -> str: # try tilde-expanded abspath without .exe suffix exe = which(Path(exe_name[:-4]).expanduser().absolute()) if exe is None: + if forgive: + warn( + f"The program {exe_name} does not exist or is not executable." + ) + return None + raise FileNotFoundError( f"The program {exe_name} does not exist or is not executable." ) @@ -376,10 +388,11 @@ def __init__( self._namefile = self.__name + "." + self.namefile_ext self._packagelist = [] self.heading = "" - try: - self.exe_name = resolve_exe(exe_name) - except: - self.exe_name = "mf2005" + self.exe_name = ( + "mf2005" + if exe_name is None + else resolve_exe(exe_name, forgive=True) + ) self._verbose = verbose self.external_path = None self.external_extension = "ref" From 4e00489f8d2a7626786338942210b5764995dd8a Mon Sep 17 00:00:00 2001 From: spaulins-usgs Date: Wed, 16 Aug 2023 07:28:34 -0700 Subject: [PATCH 11/25] fix(keyword data): optional keywords (#1920) Flopy allows some keywords to be excluded from recarrays, like "FILEIN". This fix makes sure that optional keywords, like "MIXED" are not excluded from recarrays. Since they are optional their presence adds information to the recarray and they therefore can not be excluded. Co-authored-by: scottrp <45947939+scottrp@users.noreply.github.com> --- autotest/test_mf6.py | 14 ++++++++++++++ flopy/mf6/data/mfdatastorage.py | 1 + 2 files changed, 15 insertions(+) diff --git a/autotest/test_mf6.py b/autotest/test_mf6.py index 5e8e2c5eb8..645b890386 100644 --- a/autotest/test_mf6.py +++ b/autotest/test_mf6.py @@ -2188,6 +2188,20 @@ def test_multi_model(function_tmpdir): assert rec_array[0][3] == model_names[1] assert rec_array[1][1] == "transport.ims" assert rec_array[1][2] == model_names[2] + # test ssm fileinput + gwt2 = sim2.get_model("gwt_model_1") + ssm2 = gwt2.get_package("ssm") + fileinput = [ + ("RCH-1", f"gwt_model_1.rch1.spc"), + ("RCH-2", f"gwt_model_1.rch2.spc"), + ("RCH-3", f"gwt_model_1.rch3.spc", "MIXED"), + ("RCH-4", f"gwt_model_1.rch4.spc"), + ] + ssm2.fileinput = fileinput + fi_out = ssm2.fileinput.get_data() + assert fi_out[2][1] == "gwt_model_1.rch3.spc" + assert fi_out[1][2] is None + assert fi_out[2][2] == "MIXED" # create a new gwt model sourcerecarray = [("WEL-1", "AUX", "CONCENTRATION")] diff --git a/flopy/mf6/data/mfdatastorage.py b/flopy/mf6/data/mfdatastorage.py index b235e38ad0..bea0c90675 100644 --- a/flopy/mf6/data/mfdatastorage.py +++ b/flopy/mf6/data/mfdatastorage.py @@ -2848,6 +2848,7 @@ def build_type_list( if ( data_item.type != DatumType.keyword or data_set.block_variable + or data_item.optional ): initial_keyword = False shape_rule = None From 22205f446bdd1e72ee204e5802af30dd501eece9 Mon Sep 17 00:00:00 2001 From: Mike Taves Date: Tue, 22 Aug 2023 02:07:51 +1200 Subject: [PATCH 12/25] fix(GridIntersect): combine list of geometries using unary_union (#1923) --- flopy/utils/gridintersect.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/flopy/utils/gridintersect.py b/flopy/utils/gridintersect.py index 73c44dc989..465ca23229 100644 --- a/flopy/utils/gridintersect.py +++ b/flopy/utils/gridintersect.py @@ -18,6 +18,10 @@ if Version(shapely.__version__) < Version("1.8"): warnings.warn("GridIntersect requires shapely>=1.8.") shapely = None + if SHAPELY_GE_20: + from shapely import unary_union + else: + from shapely.ops import unary_union else: SHAPELY_GE_20 = False @@ -1487,10 +1491,7 @@ def _intersect_linestring_structured( tempverts.append(vertices[i]) ishp = ixshapes[i] if isinstance(ishp, list): - if len(ishp) > 1: - ishp = shapely_geo.MultiLineString(ishp) - else: - ishp = ishp[0] + ishp = unary_union(ishp) tempshapes.append(ishp) nodelist = tempnodes lengths = templengths From 672d6be6b07e1bf3b8cb6b0c3b6ce54be669399f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dav=C3=ADd=20Brakenhoff?= Date: Mon, 21 Aug 2023 23:38:57 +0200 Subject: [PATCH 13/25] fix(gridintersect): add multilinestring tests (#1924) - tests for example in #1922 --- autotest/test_gridintersect.py | 52 ++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/autotest/test_gridintersect.py b/autotest/test_gridintersect.py index 82c1f93856..92861f6366 100644 --- a/autotest/test_gridintersect.py +++ b/autotest/test_gridintersect.py @@ -425,6 +425,22 @@ def test_rect_grid_multilinestring_in_one_cell(): assert result.cellids[0] == (1, 0) +@requires_pkg("shapely") +def test_rect_grid_multilinestring_in_multiple_cells(): + gr = get_rect_grid() + ix = GridIntersect(gr, method="structured") + result = ix.intersect( + MultiLineString( + [ + LineString([(20.0, 0.0), (7.5, 12.0), (2.5, 7.0), (0.0, 4.5)]), + LineString([(5.0, 19.0), (2.5, 7.0)]), + ] + ) + ) + assert len(result) == 3 + assert np.allclose(sum(result.lengths), 40.19197584109293) + + @requires_pkg("shapely") def test_rect_grid_linestring_in_and_out_of_cell(): gr = get_rect_grid() @@ -537,6 +553,23 @@ def test_rect_grid_multilinestring_in_one_cell_shapely(rtree): assert result.cellids[0] == (1, 0) +@requires_pkg("shapely") +@rtree_toggle +def test_rect_grid_multilinestring_in_multiple_cells_shapely(rtree): + gr = get_rect_grid() + ix = GridIntersect(gr, method="vertex", rtree=rtree) + result = ix.intersect( + MultiLineString( + [ + LineString([(20.0, 0.0), (7.5, 12.0), (2.5, 7.0), (0.0, 4.5)]), + LineString([(5.0, 19.0), (2.5, 7.0)]), + ] + ) + ) + assert len(result) == 3 + assert np.allclose(sum(result.lengths), 40.19197584109293) + + @requires_pkg("shapely") @rtree_toggle def test_rect_grid_linestring_in_and_out_of_cell_shapely(rtree): @@ -655,6 +688,25 @@ def test_tri_grid_multilinestring_in_one_cell(rtree): assert result.cellids[0] == 4 +@requires_pkg("shapely") +@rtree_toggle +def test_tri_grid_multilinestring_in_multiple_cells(rtree): + gr = get_tri_grid() + if gr == -1: + return + ix = GridIntersect(gr, rtree=rtree) + result = ix.intersect( + MultiLineString( + [ + LineString([(20.0, 0.0), (7.5, 12.0), (2.5, 7.0), (0.0, 4.5)]), + LineString([(5.0, 19.0), (2.5, 7.0)]), + ] + ) + ) + assert len(result) == 5 + assert np.allclose(sum(result.lengths), 40.19197584109293) + + @requires_pkg("shapely") @rtree_toggle def test_tri_grid_linestrings_on_boundaries_return_all_ix(rtree): From d1c60717b1d04922a718bea134cd28e6e050c660 Mon Sep 17 00:00:00 2001 From: scottrp <45947939+scottrp@users.noreply.github.com> Date: Fri, 25 Aug 2023 10:55:30 -0700 Subject: [PATCH 14/25] fix(binary file): Was writing binary file information twice to external files (#1925) (#1928) --- flopy/mf6/data/mffileaccess.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flopy/mf6/data/mffileaccess.py b/flopy/mf6/data/mffileaccess.py index b1af8c9073..af093f7ba9 100644 --- a/flopy/mf6/data/mffileaccess.py +++ b/flopy/mf6/data/mffileaccess.py @@ -215,6 +215,7 @@ def write_binary_file( if data.size == modelgrid.nnodes: write_multi_layer = False if write_multi_layer: + # write data from each layer with a separate header for layer, value in enumerate(data): self._write_layer( fd, @@ -228,6 +229,7 @@ def write_binary_file( layer + 1, ) else: + # write data with a single header self._write_layer( fd, data, @@ -238,7 +240,6 @@ def write_binary_file( text, fname, ) - data.tofile(fd) fd.close() def _write_layer( From 00e99c1e07a07225829c5f2bd8e8992eeb50aeb9 Mon Sep 17 00:00:00 2001 From: w-bonelli Date: Fri, 25 Aug 2023 18:54:53 -0400 Subject: [PATCH 15/25] fix(ParticleData): fix docstring, structured default is False (#1935) --- flopy/modpath/mp7particledata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flopy/modpath/mp7particledata.py b/flopy/modpath/mp7particledata.py index 9da7e57490..9f8b8b393d 100644 --- a/flopy/modpath/mp7particledata.py +++ b/flopy/modpath/mp7particledata.py @@ -24,7 +24,7 @@ class ParticleData: locations or nodes. structured : bool Boolean defining if a structured (True) or unstructured - particle recarray will be created (default is True). + particle recarray will be created (default is False). particleids : list, tuple, or np.ndarray Particle ids for the defined particle locations. If particleids is None, MODPATH 7 will define the particle ids to each particle From 9b036f42e0f2782298a3562c006d45ba6ae5843f Mon Sep 17 00:00:00 2001 From: Wes Bonelli Date: Fri, 25 Aug 2023 18:58:06 -0400 Subject: [PATCH 16/25] chore: import import_optional_dependency in mtlistfile.py --- flopy/utils/mtlistfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flopy/utils/mtlistfile.py b/flopy/utils/mtlistfile.py index 5699061b56..8ae3b54e54 100644 --- a/flopy/utils/mtlistfile.py +++ b/flopy/utils/mtlistfile.py @@ -8,6 +8,8 @@ import numpy as np +from ..utils import import_optional_dependency + class MtListBudget: """ From 16d3daecef132a2e8bb9a1b15646d070c9b9f148 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 25 Aug 2023 23:10:08 +0000 Subject: [PATCH 17/25] ci(release): set version to 3.4.2, update plugins from DFN files, update changelog --- CITATION.cff | 4 ++-- README.md | 4 ++-- autotest/regression/test_mf6.py | 2 +- code.json | 4 ++-- docs/PyPI_release.md | 2 +- docs/version_changes.md | 23 +++++++++++++++++++++++ flopy/mf6/modflow/mfems.py | 2 +- flopy/mf6/modflow/mfgnc.py | 2 +- flopy/mf6/modflow/mfgwf.py | 2 +- flopy/mf6/modflow/mfgwfapi.py | 2 +- flopy/mf6/modflow/mfgwfbuy.py | 2 +- flopy/mf6/modflow/mfgwfchd.py | 2 +- flopy/mf6/modflow/mfgwfcsub.py | 2 +- flopy/mf6/modflow/mfgwfdis.py | 2 +- flopy/mf6/modflow/mfgwfdisu.py | 2 +- flopy/mf6/modflow/mfgwfdisv.py | 2 +- flopy/mf6/modflow/mfgwfdrn.py | 2 +- flopy/mf6/modflow/mfgwfevt.py | 2 +- flopy/mf6/modflow/mfgwfevta.py | 2 +- flopy/mf6/modflow/mfgwfghb.py | 2 +- flopy/mf6/modflow/mfgwfgnc.py | 2 +- flopy/mf6/modflow/mfgwfgwf.py | 2 +- flopy/mf6/modflow/mfgwfgwt.py | 2 +- flopy/mf6/modflow/mfgwfhfb.py | 2 +- flopy/mf6/modflow/mfgwfic.py | 2 +- flopy/mf6/modflow/mfgwflak.py | 2 +- flopy/mf6/modflow/mfgwfmaw.py | 2 +- flopy/mf6/modflow/mfgwfmvr.py | 2 +- flopy/mf6/modflow/mfgwfnam.py | 2 +- flopy/mf6/modflow/mfgwfnpf.py | 2 +- flopy/mf6/modflow/mfgwfoc.py | 2 +- flopy/mf6/modflow/mfgwfrch.py | 2 +- flopy/mf6/modflow/mfgwfrcha.py | 2 +- flopy/mf6/modflow/mfgwfriv.py | 2 +- flopy/mf6/modflow/mfgwfsfr.py | 2 +- flopy/mf6/modflow/mfgwfsto.py | 2 +- flopy/mf6/modflow/mfgwfuzf.py | 2 +- flopy/mf6/modflow/mfgwfvsc.py | 2 +- flopy/mf6/modflow/mfgwfwel.py | 2 +- flopy/mf6/modflow/mfgwt.py | 2 +- flopy/mf6/modflow/mfgwtadv.py | 2 +- flopy/mf6/modflow/mfgwtapi.py | 2 +- flopy/mf6/modflow/mfgwtcnc.py | 2 +- flopy/mf6/modflow/mfgwtdis.py | 2 +- flopy/mf6/modflow/mfgwtdisu.py | 2 +- flopy/mf6/modflow/mfgwtdisv.py | 2 +- flopy/mf6/modflow/mfgwtdsp.py | 2 +- flopy/mf6/modflow/mfgwtfmi.py | 2 +- flopy/mf6/modflow/mfgwtgwt.py | 2 +- flopy/mf6/modflow/mfgwtic.py | 2 +- flopy/mf6/modflow/mfgwtist.py | 2 +- flopy/mf6/modflow/mfgwtlkt.py | 2 +- flopy/mf6/modflow/mfgwtmst.py | 2 +- flopy/mf6/modflow/mfgwtmvt.py | 2 +- flopy/mf6/modflow/mfgwtmwt.py | 2 +- flopy/mf6/modflow/mfgwtnam.py | 2 +- flopy/mf6/modflow/mfgwtoc.py | 2 +- flopy/mf6/modflow/mfgwtsft.py | 2 +- flopy/mf6/modflow/mfgwtsrc.py | 2 +- flopy/mf6/modflow/mfgwtssm.py | 2 +- flopy/mf6/modflow/mfgwtuzt.py | 2 +- flopy/mf6/modflow/mfims.py | 2 +- flopy/mf6/modflow/mfmvr.py | 2 +- flopy/mf6/modflow/mfmvt.py | 2 +- flopy/mf6/modflow/mfnam.py | 2 +- flopy/mf6/modflow/mftdis.py | 2 +- flopy/mf6/modflow/mfutlats.py | 2 +- flopy/mf6/modflow/mfutllaktab.py | 2 +- flopy/mf6/modflow/mfutlobs.py | 2 +- flopy/mf6/modflow/mfutlsfrtab.py | 2 +- flopy/mf6/modflow/mfutlspc.py | 2 +- flopy/mf6/modflow/mfutlspca.py | 2 +- flopy/mf6/modflow/mfutltas.py | 2 +- flopy/mf6/modflow/mfutlts.py | 2 +- flopy/mf6/modflow/mfutltvk.py | 2 +- flopy/mf6/modflow/mfutltvs.py | 2 +- flopy/version.py | 4 ++-- version.txt | 2 +- 78 files changed, 104 insertions(+), 81 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index a6dc9b9928..f9732fead9 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -3,8 +3,8 @@ message: If you use this software, please cite both the article from preferred-c and the software itself. type: software title: FloPy -version: 3.4.1 -date-released: '2023-06-29' +version: 3.4.2 +date-released: '2023-08-25' doi: 10.5066/F7BK19FH abstract: A Python package to create, run, and post-process MODFLOW-based models. repository-artifact: https://pypi.org/project/flopy diff --git a/README.md b/README.md index fda5f75b1c..9d297427e8 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ flopy3 -### Version 3.4.1 +### Version 3.4.2 [![flopy continuous integration](https://github.com/modflowpy/flopy/actions/workflows/commit.yml/badge.svg?branch=develop)](https://github.com/modflowpy/flopy/actions/workflows/commit.yml) [![Read the Docs](https://github.com/modflowpy/flopy/actions/workflows/rtd.yml/badge.svg?branch=develop)](https://github.com/modflowpy/flopy/actions/workflows/rtd.yml) @@ -142,7 +142,7 @@ How to Cite ##### ***Software/Code citation for FloPy:*** -[Bakker, Mark, Post, Vincent, Hughes, J. D., Langevin, C. D., White, J. T., Leaf, A. T., Paulinski, S. R., Bellino, J. C., Morway, E. D., Toews, M. W., Larsen, J. D., Fienen, M. N., Starn, J. J., Brakenhoff, D. A., and Bonelli, W. P., 2023, FloPy v3.4.1: U.S. Geological Survey Software Release, 29 June 2023, https://doi.org/10.5066/F7BK19FH](https://doi.org/10.5066/F7BK19FH) +[Bakker, Mark, Post, Vincent, Hughes, J. D., Langevin, C. D., White, J. T., Leaf, A. T., Paulinski, S. R., Bellino, J. C., Morway, E. D., Toews, M. W., Larsen, J. D., Fienen, M. N., Starn, J. J., Brakenhoff, D. A., and Bonelli, W. P., 2023, FloPy v3.4.2: U.S. Geological Survey Software Release, 25 August 2023, https://doi.org/10.5066/F7BK19FH](https://doi.org/10.5066/F7BK19FH) Additional FloPy Related Publications diff --git a/autotest/regression/test_mf6.py b/autotest/regression/test_mf6.py index fba485696b..f1176e0590 100644 --- a/autotest/regression/test_mf6.py +++ b/autotest/regression/test_mf6.py @@ -3085,7 +3085,7 @@ def test028_create_tests_sfr(function_tmpdir, example_data_path): delc=5000.0, top=top, botm=botm, - #idomain=idomain, + # idomain=idomain, filename=f"{model_name}.dis", ) strt = testutils.read_std_array(os.path.join(pth, "strt.txt"), "float") diff --git a/code.json b/code.json index 0f84433995..0ba0adfdb6 100644 --- a/code.json +++ b/code.json @@ -29,9 +29,9 @@ "downloadURL": "https://code.usgs.gov/usgs/modflow/flopy/archive/master.zip", "vcs": "git", "laborHours": -1, - "version": "3.4.1", + "version": "3.4.2", "date": { - "metadataLastUpdated": "2023-06-29" + "metadataLastUpdated": "2023-08-25" }, "organization": "U.S. Geological Survey", "permissions": { diff --git a/docs/PyPI_release.md b/docs/PyPI_release.md index 521e29b464..55a9bea16d 100644 --- a/docs/PyPI_release.md +++ b/docs/PyPI_release.md @@ -30,7 +30,7 @@ How to Cite *Software/Code citation for FloPy:* -[Bakker, Mark, Post, Vincent, Hughes, J. D., Langevin, C. D., White, J. T., Leaf, A. T., Paulinski, S. R., Bellino, J. C., Morway, E. D., Toews, M. W., Larsen, J. D., Fienen, M. N., Starn, J. J., Brakenhoff, D. A., and Bonelli, W. P., 2023, FloPy v3.4.1: U.S. Geological Survey Software Release, 29 June 2023, https://doi.org/10.5066/F7BK19FH](https://doi.org/10.5066/F7BK19FH) +[Bakker, Mark, Post, Vincent, Hughes, J. D., Langevin, C. D., White, J. T., Leaf, A. T., Paulinski, S. R., Bellino, J. C., Morway, E. D., Toews, M. W., Larsen, J. D., Fienen, M. N., Starn, J. J., Brakenhoff, D. A., and Bonelli, W. P., 2023, FloPy v3.4.2: U.S. Geological Survey Software Release, 25 August 2023, https://doi.org/10.5066/F7BK19FH](https://doi.org/10.5066/F7BK19FH) Disclaimer diff --git a/docs/version_changes.md b/docs/version_changes.md index 934d29fc23..3126948f85 100644 --- a/docs/version_changes.md +++ b/docs/version_changes.md @@ -1,3 +1,26 @@ +### Version 3.4.2 + +#### Bug fixes + +* [fix(binaryfile/gridutil)](https://github.com/modflowpy/flopy/commit/b1e6b77af34448fee388efed5bbfa8d902fe93dc): Avoid numpy deprecation warnings (#1868). Committed by w-bonelli on 2023-07-12. +* [fix(binary)](https://github.com/modflowpy/flopy/commit/aa74356708137223ffed501f01d759832c336457): Fix binary header information (#1877). Committed by jdhughes-usgs on 2023-07-16. +* [fix(time series)](https://github.com/modflowpy/flopy/commit/021159bed614e80b0676a0e4c1dd61ac68c531de): Fix for multiple time series attached to single package (#1867) (#1873). Committed by spaulins-usgs on 2023-07-20. +* [fix(check)](https://github.com/modflowpy/flopy/commit/7e8a0cba122707ab1a87b0d1f13e05afbce29e94): Check now works properly with confined conditions (#1880) (#1882). Committed by spaulins-usgs on 2023-07-27. +* [fix(mtlistfile)](https://github.com/modflowpy/flopy/commit/2222245a1fbc4c9955f99a0f98c319843f4eb18a): Fix reading MT3D budget (#1899). Committed by Ralf Junghanns on 2023-08-03. +* [fix(check)](https://github.com/modflowpy/flopy/commit/5d21410cbe0c36d998fb3e6bcc4f8e443fcd7448): Updated flopy's check to work with cellid -1 values (#1885). Committed by spaulins-usgs on 2023-08-06. +* [fix(BaseModel)](https://github.com/modflowpy/flopy/commit/82bc3f1100eec3167f546e71a8c4d4520b7c0a3d): Don't suppress error if exe not found (#1901). Committed by w-bonelli on 2023-08-07. +* [fix(keyword data)](https://github.com/modflowpy/flopy/commit/4e00489f8d2a7626786338942210b5764995dd8a): Optional keywords (#1920). Committed by spaulins-usgs on 2023-08-16. +* [fix(GridIntersect)](https://github.com/modflowpy/flopy/commit/22205f446bdd1e72ee204e5802af30dd501eece9): Combine list of geometries using unary_union (#1923). Committed by Mike Taves on 2023-08-21. +* [fix(gridintersect)](https://github.com/modflowpy/flopy/commit/672d6be6b07e1bf3b8cb6b0c3b6ce54be669399f): Add multilinestring tests (#1924). Committed by Davíd Brakenhoff on 2023-08-21. +* [fix(binary file)](https://github.com/modflowpy/flopy/commit/d1c60717b1d04922a718bea134cd28e6e050c660): Was writing binary file information twice to external files (#1925) (#1928). Committed by scottrp on 2023-08-25. +* [fix(ParticleData)](https://github.com/modflowpy/flopy/commit/00e99c1e07a07225829c5f2bd8e8992eeb50aeb9): Fix docstring, structured default is False (#1935). Committed by w-bonelli on 2023-08-25. + +#### Refactoring + +* [refactor(_set_neighbors)](https://github.com/modflowpy/flopy/commit/89fa273e8fd3ab7788ba4a65e62455d7d65c504d): Check for closed iverts and remove closing ivert (#1876). Committed by Joshua Larsen on 2023-07-14. +* [refactor(dependencies)](https://github.com/modflowpy/flopy/commit/364b4d17da421b15e69918a67b4d1c0b159fbf77): Constrain sphinx >=4 (#1898). Committed by w-bonelli on 2023-08-02. +* [refactor(dependencies)](https://github.com/modflowpy/flopy/commit/ee92091b096ad16a14cd8dd1f142abbb944bf91f): Constrain sphinx-rtd-theme >=1 (#1900). Committed by w-bonelli on 2023-08-03. + ### Version 3.4.1 #### Bug fixes diff --git a/flopy/mf6/modflow/mfems.py b/flopy/mf6/modflow/mfems.py index 78e49a113f..a75fbc5e1e 100644 --- a/flopy/mf6/modflow/mfems.py +++ b/flopy/mf6/modflow/mfems.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage diff --git a/flopy/mf6/modflow/mfgnc.py b/flopy/mf6/modflow/mfgnc.py index 3231317e67..b3da2b8593 100644 --- a/flopy/mf6/modflow/mfgnc.py +++ b/flopy/mf6/modflow/mfgnc.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwf.py b/flopy/mf6/modflow/mfgwf.py index 9601fb38c4..9c5cc500be 100644 --- a/flopy/mf6/modflow/mfgwf.py +++ b/flopy/mf6/modflow/mfgwf.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfmodel from ..data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfapi.py b/flopy/mf6/modflow/mfgwfapi.py index 53232b6402..2fbb5e1056 100644 --- a/flopy/mf6/modflow/mfgwfapi.py +++ b/flopy/mf6/modflow/mfgwfapi.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:28 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfbuy.py b/flopy/mf6/modflow/mfgwfbuy.py index 216c0c0913..9e7e8f3fac 100644 --- a/flopy/mf6/modflow/mfgwfbuy.py +++ b/flopy/mf6/modflow/mfgwfbuy.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:28 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfchd.py b/flopy/mf6/modflow/mfgwfchd.py index b1d018e026..d3c7654adc 100644 --- a/flopy/mf6/modflow/mfgwfchd.py +++ b/flopy/mf6/modflow/mfgwfchd.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfcsub.py b/flopy/mf6/modflow/mfgwfcsub.py index 44262ed256..43073af3d2 100644 --- a/flopy/mf6/modflow/mfgwfcsub.py +++ b/flopy/mf6/modflow/mfgwfcsub.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:28 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfdis.py b/flopy/mf6/modflow/mfgwfdis.py index e72579690d..583b6d15d4 100644 --- a/flopy/mf6/modflow/mfgwfdis.py +++ b/flopy/mf6/modflow/mfgwfdis.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfdisu.py b/flopy/mf6/modflow/mfgwfdisu.py index 60a69828e8..eb6a5ae45f 100644 --- a/flopy/mf6/modflow/mfgwfdisu.py +++ b/flopy/mf6/modflow/mfgwfdisu.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfdisv.py b/flopy/mf6/modflow/mfgwfdisv.py index 74ceb30c6e..7b6a3cb782 100644 --- a/flopy/mf6/modflow/mfgwfdisv.py +++ b/flopy/mf6/modflow/mfgwfdisv.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfdrn.py b/flopy/mf6/modflow/mfgwfdrn.py index 5e3e68612a..87d73562af 100644 --- a/flopy/mf6/modflow/mfgwfdrn.py +++ b/flopy/mf6/modflow/mfgwfdrn.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfevt.py b/flopy/mf6/modflow/mfgwfevt.py index fcc407e9c3..48ca63400e 100644 --- a/flopy/mf6/modflow/mfgwfevt.py +++ b/flopy/mf6/modflow/mfgwfevt.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfevta.py b/flopy/mf6/modflow/mfgwfevta.py index eb74556e7a..e179751321 100644 --- a/flopy/mf6/modflow/mfgwfevta.py +++ b/flopy/mf6/modflow/mfgwfevta.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfghb.py b/flopy/mf6/modflow/mfgwfghb.py index 0bc28e4207..8d11af1464 100644 --- a/flopy/mf6/modflow/mfgwfghb.py +++ b/flopy/mf6/modflow/mfgwfghb.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfgnc.py b/flopy/mf6/modflow/mfgwfgnc.py index 9524630f9c..f16e30f8e1 100644 --- a/flopy/mf6/modflow/mfgwfgnc.py +++ b/flopy/mf6/modflow/mfgwfgnc.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:28 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfgwf.py b/flopy/mf6/modflow/mfgwfgwf.py index e0f63d9780..5d427823be 100644 --- a/flopy/mf6/modflow/mfgwfgwf.py +++ b/flopy/mf6/modflow/mfgwfgwf.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfgwt.py b/flopy/mf6/modflow/mfgwfgwt.py index e7ca2d3729..5c4839e79e 100644 --- a/flopy/mf6/modflow/mfgwfgwt.py +++ b/flopy/mf6/modflow/mfgwfgwt.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage diff --git a/flopy/mf6/modflow/mfgwfhfb.py b/flopy/mf6/modflow/mfgwfhfb.py index b86f4561d7..53d73cd861 100644 --- a/flopy/mf6/modflow/mfgwfhfb.py +++ b/flopy/mf6/modflow/mfgwfhfb.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfic.py b/flopy/mf6/modflow/mfgwfic.py index 5c6a562a51..75554b6ecb 100644 --- a/flopy/mf6/modflow/mfgwfic.py +++ b/flopy/mf6/modflow/mfgwfic.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwflak.py b/flopy/mf6/modflow/mfgwflak.py index 24570d2c0b..7dd3476ed6 100644 --- a/flopy/mf6/modflow/mfgwflak.py +++ b/flopy/mf6/modflow/mfgwflak.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:28 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfmaw.py b/flopy/mf6/modflow/mfgwfmaw.py index 0f11efbe9a..72bc13ccf7 100644 --- a/flopy/mf6/modflow/mfgwfmaw.py +++ b/flopy/mf6/modflow/mfgwfmaw.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:28 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfmvr.py b/flopy/mf6/modflow/mfgwfmvr.py index 7b9892565d..0ecd694d55 100644 --- a/flopy/mf6/modflow/mfgwfmvr.py +++ b/flopy/mf6/modflow/mfgwfmvr.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:28 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfnam.py b/flopy/mf6/modflow/mfgwfnam.py index 060d0fc9be..86a8dd46a0 100644 --- a/flopy/mf6/modflow/mfgwfnam.py +++ b/flopy/mf6/modflow/mfgwfnam.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfnpf.py b/flopy/mf6/modflow/mfgwfnpf.py index e230e13229..c601e46423 100644 --- a/flopy/mf6/modflow/mfgwfnpf.py +++ b/flopy/mf6/modflow/mfgwfnpf.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfoc.py b/flopy/mf6/modflow/mfgwfoc.py index 3586b96315..b8f2352dbe 100644 --- a/flopy/mf6/modflow/mfgwfoc.py +++ b/flopy/mf6/modflow/mfgwfoc.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:28 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfrch.py b/flopy/mf6/modflow/mfgwfrch.py index eeac8c5719..3fdc690527 100644 --- a/flopy/mf6/modflow/mfgwfrch.py +++ b/flopy/mf6/modflow/mfgwfrch.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfrcha.py b/flopy/mf6/modflow/mfgwfrcha.py index 35fc60d5fb..ead28e7488 100644 --- a/flopy/mf6/modflow/mfgwfrcha.py +++ b/flopy/mf6/modflow/mfgwfrcha.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfriv.py b/flopy/mf6/modflow/mfgwfriv.py index 56389249b8..c38073f684 100644 --- a/flopy/mf6/modflow/mfgwfriv.py +++ b/flopy/mf6/modflow/mfgwfriv.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfsfr.py b/flopy/mf6/modflow/mfgwfsfr.py index 0ff6e66df4..eff4747038 100644 --- a/flopy/mf6/modflow/mfgwfsfr.py +++ b/flopy/mf6/modflow/mfgwfsfr.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:28 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfsto.py b/flopy/mf6/modflow/mfgwfsto.py index 306ce7dbf4..617c4ccad3 100644 --- a/flopy/mf6/modflow/mfgwfsto.py +++ b/flopy/mf6/modflow/mfgwfsto.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfuzf.py b/flopy/mf6/modflow/mfgwfuzf.py index 085daefd32..cec6ae87c9 100644 --- a/flopy/mf6/modflow/mfgwfuzf.py +++ b/flopy/mf6/modflow/mfgwfuzf.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:28 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfvsc.py b/flopy/mf6/modflow/mfgwfvsc.py index 5c14ea448d..1cda4b286c 100644 --- a/flopy/mf6/modflow/mfgwfvsc.py +++ b/flopy/mf6/modflow/mfgwfvsc.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:28 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfwel.py b/flopy/mf6/modflow/mfgwfwel.py index 6dee2f1742..e101db5b58 100644 --- a/flopy/mf6/modflow/mfgwfwel.py +++ b/flopy/mf6/modflow/mfgwfwel.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwt.py b/flopy/mf6/modflow/mfgwt.py index afd4d7f9cf..37c0baceea 100644 --- a/flopy/mf6/modflow/mfgwt.py +++ b/flopy/mf6/modflow/mfgwt.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:28 UTC from .. import mfmodel from ..data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtadv.py b/flopy/mf6/modflow/mfgwtadv.py index e0e3a18208..32f9d005c7 100644 --- a/flopy/mf6/modflow/mfgwtadv.py +++ b/flopy/mf6/modflow/mfgwtadv.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:28 UTC from .. import mfpackage diff --git a/flopy/mf6/modflow/mfgwtapi.py b/flopy/mf6/modflow/mfgwtapi.py index 36425a383c..affba69128 100644 --- a/flopy/mf6/modflow/mfgwtapi.py +++ b/flopy/mf6/modflow/mfgwtapi.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:28 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtcnc.py b/flopy/mf6/modflow/mfgwtcnc.py index 313750b077..b47f9325ed 100644 --- a/flopy/mf6/modflow/mfgwtcnc.py +++ b/flopy/mf6/modflow/mfgwtcnc.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:28 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtdis.py b/flopy/mf6/modflow/mfgwtdis.py index d12d8a6aaa..38e0746e64 100644 --- a/flopy/mf6/modflow/mfgwtdis.py +++ b/flopy/mf6/modflow/mfgwtdis.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:28 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtdisu.py b/flopy/mf6/modflow/mfgwtdisu.py index f965cf1c37..a288275770 100644 --- a/flopy/mf6/modflow/mfgwtdisu.py +++ b/flopy/mf6/modflow/mfgwtdisu.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:28 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtdisv.py b/flopy/mf6/modflow/mfgwtdisv.py index f6d234bc74..071467786a 100644 --- a/flopy/mf6/modflow/mfgwtdisv.py +++ b/flopy/mf6/modflow/mfgwtdisv.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:28 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtdsp.py b/flopy/mf6/modflow/mfgwtdsp.py index 364f770a96..f841cf7985 100644 --- a/flopy/mf6/modflow/mfgwtdsp.py +++ b/flopy/mf6/modflow/mfgwtdsp.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:28 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtfmi.py b/flopy/mf6/modflow/mfgwtfmi.py index 9e9fc0ca98..b8333dece0 100644 --- a/flopy/mf6/modflow/mfgwtfmi.py +++ b/flopy/mf6/modflow/mfgwtfmi.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:28 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtgwt.py b/flopy/mf6/modflow/mfgwtgwt.py index bc8402ed85..959f2a4113 100644 --- a/flopy/mf6/modflow/mfgwtgwt.py +++ b/flopy/mf6/modflow/mfgwtgwt.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtic.py b/flopy/mf6/modflow/mfgwtic.py index 1bd48dae1c..171bab1922 100644 --- a/flopy/mf6/modflow/mfgwtic.py +++ b/flopy/mf6/modflow/mfgwtic.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:28 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtist.py b/flopy/mf6/modflow/mfgwtist.py index 3169443143..3f1d126e44 100644 --- a/flopy/mf6/modflow/mfgwtist.py +++ b/flopy/mf6/modflow/mfgwtist.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:28 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtlkt.py b/flopy/mf6/modflow/mfgwtlkt.py index 80c3abec15..dd22f92209 100644 --- a/flopy/mf6/modflow/mfgwtlkt.py +++ b/flopy/mf6/modflow/mfgwtlkt.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:28 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtmst.py b/flopy/mf6/modflow/mfgwtmst.py index 0036946c69..93cff4e6d4 100644 --- a/flopy/mf6/modflow/mfgwtmst.py +++ b/flopy/mf6/modflow/mfgwtmst.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:28 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtmvt.py b/flopy/mf6/modflow/mfgwtmvt.py index eb13fd9fe5..33e86b0803 100644 --- a/flopy/mf6/modflow/mfgwtmvt.py +++ b/flopy/mf6/modflow/mfgwtmvt.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:28 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtmwt.py b/flopy/mf6/modflow/mfgwtmwt.py index 45cbfb2b6a..c1d573c53d 100644 --- a/flopy/mf6/modflow/mfgwtmwt.py +++ b/flopy/mf6/modflow/mfgwtmwt.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:28 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtnam.py b/flopy/mf6/modflow/mfgwtnam.py index 86355bdd2f..1ed27c5c25 100644 --- a/flopy/mf6/modflow/mfgwtnam.py +++ b/flopy/mf6/modflow/mfgwtnam.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:28 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtoc.py b/flopy/mf6/modflow/mfgwtoc.py index fbf5be2646..2637402c32 100644 --- a/flopy/mf6/modflow/mfgwtoc.py +++ b/flopy/mf6/modflow/mfgwtoc.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:28 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtsft.py b/flopy/mf6/modflow/mfgwtsft.py index 9b8f50b005..5c4356d1a0 100644 --- a/flopy/mf6/modflow/mfgwtsft.py +++ b/flopy/mf6/modflow/mfgwtsft.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:28 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtsrc.py b/flopy/mf6/modflow/mfgwtsrc.py index 0b2f22d228..afbc3de3d9 100644 --- a/flopy/mf6/modflow/mfgwtsrc.py +++ b/flopy/mf6/modflow/mfgwtsrc.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:28 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtssm.py b/flopy/mf6/modflow/mfgwtssm.py index 66c4d8234f..9e23f0d6c0 100644 --- a/flopy/mf6/modflow/mfgwtssm.py +++ b/flopy/mf6/modflow/mfgwtssm.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:28 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtuzt.py b/flopy/mf6/modflow/mfgwtuzt.py index 4ef9ff3255..7556150f6f 100644 --- a/flopy/mf6/modflow/mfgwtuzt.py +++ b/flopy/mf6/modflow/mfgwtuzt.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:28 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfims.py b/flopy/mf6/modflow/mfims.py index 68a25846e9..a80681e5d1 100644 --- a/flopy/mf6/modflow/mfims.py +++ b/flopy/mf6/modflow/mfims.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfmvr.py b/flopy/mf6/modflow/mfmvr.py index e8312bb995..19e0b4c6cd 100644 --- a/flopy/mf6/modflow/mfmvr.py +++ b/flopy/mf6/modflow/mfmvr.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfmvt.py b/flopy/mf6/modflow/mfmvt.py index 25a980f26a..9b3facc2cd 100644 --- a/flopy/mf6/modflow/mfmvt.py +++ b/flopy/mf6/modflow/mfmvt.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfnam.py b/flopy/mf6/modflow/mfnam.py index 6b8e71ae1e..d355a3c592 100644 --- a/flopy/mf6/modflow/mfnam.py +++ b/flopy/mf6/modflow/mfnam.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mftdis.py b/flopy/mf6/modflow/mftdis.py index a03fd63fc7..6da201fb40 100644 --- a/flopy/mf6/modflow/mftdis.py +++ b/flopy/mf6/modflow/mftdis.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfutlats.py b/flopy/mf6/modflow/mfutlats.py index b7eafcd11d..cba03823c3 100644 --- a/flopy/mf6/modflow/mfutlats.py +++ b/flopy/mf6/modflow/mfutlats.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfutllaktab.py b/flopy/mf6/modflow/mfutllaktab.py index 835a219521..ab6d26a797 100644 --- a/flopy/mf6/modflow/mfutllaktab.py +++ b/flopy/mf6/modflow/mfutllaktab.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfutlobs.py b/flopy/mf6/modflow/mfutlobs.py index 1ecc6bd513..5c2388ff28 100644 --- a/flopy/mf6/modflow/mfutlobs.py +++ b/flopy/mf6/modflow/mfutlobs.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfutlsfrtab.py b/flopy/mf6/modflow/mfutlsfrtab.py index 5bed96975b..8bbcbcc91e 100644 --- a/flopy/mf6/modflow/mfutlsfrtab.py +++ b/flopy/mf6/modflow/mfutlsfrtab.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfutlspc.py b/flopy/mf6/modflow/mfutlspc.py index e67d6ca1f0..f6a6a27139 100644 --- a/flopy/mf6/modflow/mfutlspc.py +++ b/flopy/mf6/modflow/mfutlspc.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfutlspca.py b/flopy/mf6/modflow/mfutlspca.py index 4c76020f7d..ddf1681b2c 100644 --- a/flopy/mf6/modflow/mfutlspca.py +++ b/flopy/mf6/modflow/mfutlspca.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfutltas.py b/flopy/mf6/modflow/mfutltas.py index f32d2ce721..11a5c0c519 100644 --- a/flopy/mf6/modflow/mfutltas.py +++ b/flopy/mf6/modflow/mfutltas.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfutlts.py b/flopy/mf6/modflow/mfutlts.py index 748fe40a51..ec5258b457 100644 --- a/flopy/mf6/modflow/mfutlts.py +++ b/flopy/mf6/modflow/mfutlts.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfutltvk.py b/flopy/mf6/modflow/mfutltvk.py index 1246e42b0a..d82859181c 100644 --- a/flopy/mf6/modflow/mfutltvk.py +++ b/flopy/mf6/modflow/mfutltvk.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfutltvs.py b/flopy/mf6/modflow/mfutltvs.py index 668ea596b7..8068032717 100644 --- a/flopy/mf6/modflow/mfutltvs.py +++ b/flopy/mf6/modflow/mfutltvs.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on June 29, 2023 14:20:38 UTC +# FILE created on August 25, 2023 23:00:27 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/version.py b/flopy/version.py index 82c1fc0ddd..e88b55a2ca 100644 --- a/flopy/version.py +++ b/flopy/version.py @@ -1,3 +1,3 @@ -# flopy version file automatically created using update_version.py on June 29, 2023 14:20:34 +# flopy version file automatically created using update_version.py on August 25, 2023 23:00:24 -__version__ = "3.4.1" +__version__ = "3.4.2" diff --git a/version.txt b/version.txt index 8cf6caf561..a423d4217b 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -3.4.1 \ No newline at end of file +3.4.2 \ No newline at end of file From 30209f2ca2e69289227203e4afd2f33bfceed097 Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Tue, 19 Sep 2023 11:45:29 -0400 Subject: [PATCH 18/25] fix(export_contours/f): support matplotlib 3.8+ (#1951) * ContourSet.get_paths() returns one path per level * path may contain multiple disconnected components * walk contour components to determine connectivity --- autotest/test_export.py | 18 ++++ flopy/export/utils.py | 181 ++++++++++++++++++++++++++++++---------- 2 files changed, 157 insertions(+), 42 deletions(-) diff --git a/autotest/test_export.py b/autotest/test_export.py index 96f3503a28..e0ee5a622f 100644 --- a/autotest/test_export.py +++ b/autotest/test_export.py @@ -51,6 +51,10 @@ from flopy.utils.crs import get_authority_crs from flopy.utils.geometry import Polygon +HAS_PYPROJ = has_pkg("pyproj", strict=True) +if HAS_PYPROJ: + import pyproj + def namfiles() -> List[Path]: mf2005_path = get_example_data_path() / "mf2005_test" @@ -677,6 +681,13 @@ def test_export_contourf(function_tmpdir, example_data_path): len(shapes) >= 65 ), "multipolygons were skipped in contourf routine" + # debugging + # for s in shapes: + # x = [i[0] for i in s.points[:]] + # y = [i[1] for i in s.points[:]] + # plt.plot(x, y) + # plt.show() + @pytest.mark.mf6 @requires_pkg("shapefile", "shapely") @@ -706,6 +717,13 @@ def test_export_contours(function_tmpdir, example_data_path): # expect 65 with standard mpl contours (structured grids), 86 with tricontours assert len(shapes) >= 65 + # debugging + # for s in shapes: + # x = [i[0] for i in s.points[:]] + # y = [i[1] for i in s.points[:]] + # plt.plot(x, y) + # plt.show() + @pytest.mark.mf6 @requires_pkg("shapely") diff --git a/flopy/export/utils.py b/flopy/export/utils.py index 3b94cb10a9..c6efd3e162 100644 --- a/flopy/export/utils.py +++ b/flopy/export/utils.py @@ -1,8 +1,10 @@ import os +from itertools import repeat from pathlib import Path -from typing import Optional, Union +from typing import Union import numpy as np +from packaging.version import Version from ..datbase import DataInterface, DataListInterface, DataType from ..mbase import BaseModel, ModelInterface @@ -1693,6 +1695,7 @@ def export_contours( filename: Union[str, os.PathLike], contours, fieldname="level", + verbose=False, **kwargs, ): """ @@ -1706,6 +1709,8 @@ def export_contours( (object returned by matplotlib.pyplot.contour) fieldname : str gis attribute table field name + verbose : bool, optional, default False + whether to show verbose output **kwargs : key-word arguments to flopy.export.shapefile_utils.recarray2shp Returns @@ -1713,26 +1718,76 @@ def export_contours( df : dataframe of shapefile contents """ + from importlib.metadata import version + + from matplotlib.path import Path + from ..utils.geometry import LineString from .shapefile_utils import recarray2shp if not isinstance(contours, list): contours = [contours] + # Export a linestring for each contour component. + # Levels may have multiple disconnected components. geoms = [] level = [] + + # ContourSet.collections was deprecated with + # matplotlib 3.8. ContourSet is a collection + # of Paths, where each Path corresponds to a + # contour level, and may contain one or more + # (possibly disconnected) components. Before + # 3.8, iterating over ContourSet.collections + # and enumerating from get_paths() suffices, + # but post-3.8, we have to walk the segments + # to distinguish disconnected components. + mpl_ver = Version(version("matplotlib")) + for ctr in contours: - levels = ctr.levels - for i, c in enumerate(ctr.collections): - paths = c.get_paths() - geoms += [LineString(p.vertices) for p in paths] - level += list(np.ones(len(paths)) * levels[i]) + if mpl_ver < Version("3.8.0"): + levels = ctr.levels + for i, c in enumerate(ctr.collections): + paths = c.get_paths() + geoms += [LineString(p.vertices) for p in paths] + level += list(np.ones(len(paths)) * levels[i]) + else: + paths = ctr.get_paths() + for pi, path in enumerate(paths): + # skip empty paths + if path.vertices.shape[0] == 0: + continue + + # Each Path may contain multiple components + # so we unpack them as separate geometries. + lines = [] + segs = [] + for seg in path.iter_segments(): + pts, code = seg + if code == Path.MOVETO: + if len(segs) > 0: + lines.append(LineString(segs)) + segs = [] + segs.append(pts) + elif code == Path.LINETO: + segs.append(pts) + elif code == Path.CLOSEPOLY: + segs.append(pts) + segs.append(segs[0]) # add closing segment + lines.append(LineString(segs)) + segs = [] + if len(segs) > 0: + lines.append(LineString(segs)) + + level += list(np.ones(len(lines)) * ctr.levels[pi]) + geoms += lines + + if verbose: + print(f"Writing {len(level)} contour lines") - # convert the dictionary to a recarray ra = np.array(level, dtype=[(fieldname, float)]).view(np.recarray) recarray2shp(ra, geoms, filename, **kwargs) - return def export_contourf( @@ -1769,57 +1824,99 @@ def export_contourf( >>> export_contourf('myfilledcontours.shp', cs) """ + from importlib.metadata import version + + from matplotlib.path import Path + from ..utils.geometry import Polygon, is_clockwise from .shapefile_utils import recarray2shp + if not isinstance(contours, list): + contours = [contours] + + # export a polygon for each filled contour geoms = [] level = [] - if not isinstance(contours, list): - contours = [contours] + # ContourSet.collections was deprecated with + # matplotlib 3.8. ContourSet is a collection + # of Paths, where each Path corresponds to a + # contour level, and may contain one or more + # (possibly disconnected) components. Before + # 3.8, iterating over ContourSet.collections + # and enumerating from get_paths() suffices, + # but post-3.8, we have to walk the segments + # to distinguish disconnected components. + mpl_ver = Version(version("matplotlib")) - for c in contours: - levels = c.levels - for idx, col in enumerate(c.collections): - # Loop through all polygons that have the same intensity level - for contour_path in col.get_paths(): - # Create the polygon(s) for this intensity level - poly = None - for ncp, cp in enumerate(contour_path.to_polygons()): - x = cp[:, 0] - y = cp[:, 1] - verts = [(i[0], i[1]) for i in zip(x, y)] - new_shape = Polygon(verts) - - if ncp == 0: - poly = new_shape - else: - # check if this is a multipolygon by checking vertex - # order. - if is_clockwise(verts): - # Clockwise is a hole, set to interiors - if not poly.interiors: - poly.interiors = [new_shape.exterior] - else: - poly.interiors.append(new_shape.exterior) - else: - geoms.append(poly) - level.append(levels[idx]) + for ctr in contours: + if mpl_ver < Version("3.8.0"): + levels = ctr.levels + for idx, col in enumerate(ctr.collections): + for contour_path in col.get_paths(): + # Create the polygon(s) for this intensity level + poly = None + for ncp, cp in enumerate(contour_path.to_polygons()): + x = cp[:, 0] + y = cp[:, 1] + verts = [(i[0], i[1]) for i in zip(x, y)] + new_shape = Polygon(verts) + + if ncp == 0: poly = new_shape + else: + # check if this is a multipolygon by checking vertex + # order. + if is_clockwise(verts): + # Clockwise is a hole, set to interiors + if not poly.interiors: + poly.interiors = [new_shape.exterior] + else: + poly.interiors.append(new_shape.exterior) + else: + geoms.append(poly) + level.append(levels[idx]) + poly = new_shape - if poly is not None: - # store geometry object - geoms.append(poly) + if poly is not None: + # store geometry object + geoms.append(poly) level.append(levels[idx]) + else: + paths = ctr.get_paths() + for pi, path in enumerate(paths): + # skip empty paths + if path.vertices.shape[0] == 0: + continue + + polys = [] + segs = [] + for seg in path.iter_segments(): + pts, code = seg + if code == Path.MOVETO: + if len(segs) > 0: + polys.append(Polygon(segs)) + segs = [] + segs.append(pts) + elif code == Path.LINETO: + segs.append(pts) + elif code == Path.CLOSEPOLY: + segs.append(pts) + segs.append(segs[0]) # add closing segment + polys.append(Polygon(segs)) + segs = [] + if len(segs) > 0: + polys.append(Polygon(segs)) + + geoms.extend(polys) + level.extend(repeat(ctr.levels[pi], len(polys))) if verbose: print(f"Writing {len(level)} polygons") - # Create recarray ra = np.array(level, dtype=[(fieldname, float)]).view(np.recarray) recarray2shp(ra, geoms, filename, **kwargs) - return def export_array_contours( From d2dbacb65d2579e42bbd7965c1321a89ccce7d56 Mon Sep 17 00:00:00 2001 From: Chris Nicol <37314969+cnicol-gwlogic@users.noreply.github.com> Date: Fri, 22 Sep 2023 22:50:30 +1000 Subject: [PATCH 19/25] Fix usgbcf (#1959) * fix(usg bcf) ksat util3d call --> util2d call Signed-off-by: Chris Nicol * doc(modflow/sfr2) add sfr2 channel_geometry_data to docstring Signed-off-by: Chris Nicol --------- Signed-off-by: Chris Nicol --- flopy/mfusg/mfusgbcf.py | 2 +- flopy/modflow/mfsfr2.py | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/flopy/mfusg/mfusgbcf.py b/flopy/mfusg/mfusgbcf.py index 231e80d1e6..6bda77d7cb 100644 --- a/flopy/mfusg/mfusgbcf.py +++ b/flopy/mfusg/mfusgbcf.py @@ -219,7 +219,7 @@ def __init__( locat=self.unit_number[0], ) if not structured: - self.ksat = Util3d( + self.ksat = Util2d( model, (njag,), np.float32, diff --git a/flopy/modflow/mfsfr2.py b/flopy/modflow/mfsfr2.py index cf8355c01d..ef8d8a6578 100644 --- a/flopy/modflow/mfsfr2.py +++ b/flopy/modflow/mfsfr2.py @@ -181,6 +181,16 @@ class ModflowSfr2(Package): Numpy record array of length equal to nss, with columns for each variable entered in items 6a, 6b and 6c (see SFR package input instructions). Segment numbers are one-based. + channel_geometry_data : dict of dicts containing lists + Optional. Outer dictionary keyed by stress period (0-based); inner + dictionaries keyed by segment number (1-based), for which 8-point channel + cross section geometries are desired. Inner dict values are lists of shape + (2,8) - with the first dimension referring to two lists: one of 8 XCPT + values, and the other of 8 ZCPT values. + Example structure: {kper: {segment: [[xcpt1...xcpt8],[zcpt1...zcpt8]]}}. + Note that for these to be applied, the user must also specify an icalc + value of 2 for each corresponding segment in segment_data for the + relevant stress periods. dataset_5 : dict of lists Optional; will be built automatically from segment_data unless specified. Dict of lists, with key for each stress period. Each list From 3522dced8a49dc93fb0140d9ac360a88f31b11bb Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Sun, 24 Sep 2023 13:21:19 -0400 Subject: [PATCH 20/25] fix(resolve_exe): support extensionless abs/rel paths on windows (#1957) --- autotest/test_mbase.py | 33 ++++++++++++++------------- autotest/test_modflow.py | 12 +++++----- flopy/mbase.py | 48 +++++++++++++++++++++++++--------------- 3 files changed, 52 insertions(+), 41 deletions(-) diff --git a/autotest/test_mbase.py b/autotest/test_mbase.py index 757909f960..8a2eddcadc 100644 --- a/autotest/test_mbase.py +++ b/autotest/test_mbase.py @@ -11,6 +11,9 @@ from flopy.utils.flopy_io import relpath_safe +_system = system() + + @pytest.fixture def mf6_model_path(example_data_path): return example_data_path / "mf6" / "test006_gwf3" @@ -18,10 +21,7 @@ def mf6_model_path(example_data_path): @requires_exe("mf6") @pytest.mark.parametrize("use_ext", [True, False]) -def test_resolve_exe_by_name(function_tmpdir, use_ext): - if use_ext and system() != "Windows": - pytest.skip(".exe extensions are Windows-only") - +def test_resolve_exe_by_name(use_ext): ext = ".exe" if use_ext else "" expected = which("mf6").lower() actual = resolve_exe(f"mf6{ext}") @@ -31,13 +31,14 @@ def test_resolve_exe_by_name(function_tmpdir, use_ext): @requires_exe("mf6") @pytest.mark.parametrize("use_ext", [True, False]) -def test_resolve_exe_by_abs_path(function_tmpdir, use_ext): - if use_ext and system() != "Windows": - pytest.skip(".exe extensions are Windows-only") - - ext = ".exe" if use_ext else "" +def test_resolve_exe_by_abs_path(use_ext): + abs_path = which("mf6") + if _system == "Windows" and not use_ext: + abs_path = abs_path[:-4] + elif _system != "Windows" and use_ext: + abs_path = f"{abs_path}.exe" expected = which("mf6").lower() - actual = resolve_exe(which(f"mf6{ext}")) + actual = resolve_exe(abs_path) assert actual.lower() == expected assert which(actual) @@ -46,9 +47,6 @@ def test_resolve_exe_by_abs_path(function_tmpdir, use_ext): @pytest.mark.parametrize("use_ext", [True, False]) @pytest.mark.parametrize("forgive", [True, False]) def test_resolve_exe_by_rel_path(function_tmpdir, use_ext, forgive): - if use_ext and system() != "Windows": - pytest.skip(".exe extensions are Windows-only") - ext = ".exe" if use_ext else "" expected = which("mf6").lower() @@ -59,10 +57,11 @@ def test_resolve_exe_by_rel_path(function_tmpdir, use_ext, forgive): with set_dir(inner_dir): # copy exe to relative dir - copy(expected, bin_dir / "mf6") - assert (bin_dir / "mf6").is_file() + new_exe_path = bin_dir / Path(expected).name + copy(expected, new_exe_path) + assert new_exe_path.is_file() - expected = which(str(Path(bin_dir / "mf6").absolute())).lower() + expected = which(str(new_exe_path.absolute())).lower() actual = resolve_exe(f"../bin/mf6{ext}") assert actual.lower() == expected assert which(actual) @@ -77,7 +76,7 @@ def test_resolve_exe_by_rel_path(function_tmpdir, use_ext, forgive): def test_run_model_when_namefile_not_in_model_ws( - mf6_model_path, example_data_path, function_tmpdir + mf6_model_path, function_tmpdir ): # copy input files to temp workspace ws = function_tmpdir / "ws" diff --git a/autotest/test_modflow.py b/autotest/test_modflow.py index 4f165dd11d..8e1c8b114a 100644 --- a/autotest/test_modflow.py +++ b/autotest/test_modflow.py @@ -207,10 +207,10 @@ def test_exe_selection(example_data_path, function_tmpdir): # no selection defaults to mf2005 exe_name = "mf2005" - assert Path(Modflow().exe_name).name == exe_name - assert Path(Modflow(exe_name=None).exe_name).name == exe_name + assert Path(Modflow().exe_name).stem == exe_name + assert Path(Modflow(exe_name=None).exe_name).stem == exe_name assert ( - Path(Modflow.load(namfile_path, model_ws=model_path).exe_name).name + Path(Modflow.load(namfile_path, model_ws=model_path).exe_name).stem == exe_name ) assert ( @@ -218,20 +218,20 @@ def test_exe_selection(example_data_path, function_tmpdir): Modflow.load( namfile_path, exe_name=None, model_ws=model_path ).exe_name - ).name + ).stem == exe_name ) # user-specified (just for testing - there is no legitimate reason # to use mp7 with Modflow but Modpath7 derives from BaseModel too) exe_name = "mp7" - assert Path(Modflow(exe_name=exe_name).exe_name).name == exe_name + assert Path(Modflow(exe_name=exe_name).exe_name).stem == exe_name assert ( Path( Modflow.load( namfile_path, exe_name=exe_name, model_ws=model_path ).exe_name - ).name + ).stem == exe_name ) diff --git a/flopy/mbase.py b/flopy/mbase.py index 846bc6fca9..c09c9b1e02 100644 --- a/flopy/mbase.py +++ b/flopy/mbase.py @@ -26,8 +26,10 @@ from .utils import flopy_io from .version import __version__ +on_windows = sys.platform.startswith("win") + # Prepend flopy appdir bin directory to PATH to work with "get-modflow :flopy" -if sys.platform.startswith("win"): +if on_windows: flopy_bin = os.path.expandvars(r"%LOCALAPPDATA%\flopy\bin") else: flopy_bin = os.path.join(os.path.expanduser("~"), ".local/share/flopy/bin") @@ -62,25 +64,34 @@ def resolve_exe( str: absolute path to the executable """ - exe_name = str(exe_name) - exe = which(exe_name) - if exe is not None: - # in case which() returned a relative path, resolve it - exe = which(str(Path(exe).resolve())) - else: - if exe_name.lower().endswith(".exe"): - # try removing .exe suffix - exe = which(exe_name[:-4]) + def _resolve(exe_name): + exe = which(exe_name) if exe is not None: - # in case which() returned a relative path, resolve it + # if which() returned a relative path, resolve it exe = which(str(Path(exe).resolve())) else: - # try tilde-expanded abspath - exe = which(Path(exe_name).expanduser().absolute()) - if exe is None and exe_name.lower().endswith(".exe"): - # try tilde-expanded abspath without .exe suffix - exe = which(Path(exe_name[:-4]).expanduser().absolute()) - if exe is None: + if exe_name.lower().endswith(".exe"): + # try removing .exe suffix + exe = which(exe_name[:-4]) + if exe is not None: + # in case which() returned a relative path, resolve it + exe = which(str(Path(exe).resolve())) + else: + # try tilde-expanded abspath + exe = which(Path(exe_name).expanduser().absolute()) + if exe is None and exe_name.lower().endswith(".exe"): + # try tilde-expanded abspath without .exe suffix + exe = which(Path(exe_name[:-4]).expanduser().absolute()) + return exe + + name = str(exe_name) + exe_path = _resolve(name) + if exe_path is None and on_windows and Path(name).suffix == "": + # try adding .exe suffix on windows (for portability from other OS) + exe_path = _resolve(f"{name}.exe") + + # raise if we are unforgiving, otherwise return None + if exe_path is None: if forgive: warn( f"The program {exe_name} does not exist or is not executable." @@ -90,7 +101,8 @@ def resolve_exe( raise FileNotFoundError( f"The program {exe_name} does not exist or is not executable." ) - return exe + + return exe_path # external exceptions for users From b848f968af4179d8618b811cd4fe6f8de66d09cb Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Tue, 26 Sep 2023 15:36:59 -0400 Subject: [PATCH 21/25] fix(mbase): warn if duplicate pkgs or units (#1964) * consistent with MFSimulation verbosity defaults * use category=UserWarning for mbase.py warnings * closes #1817 --- autotest/test_mp7.py | 42 +++++++++++++++++++----------------------- flopy/mbase.py | 24 +++++++++++++----------- 2 files changed, 32 insertions(+), 34 deletions(-) diff --git a/autotest/test_mp7.py b/autotest/test_mp7.py index b51edf624e..b8b6a4e980 100644 --- a/autotest/test_mp7.py +++ b/autotest/test_mp7.py @@ -899,8 +899,7 @@ def test_pathline_plotting(function_tmpdir): @requires_exe("mf6", "mp7") -@pytest.mark.parametrize("verbose", [True, False]) -def test_mp7sim_replacement(function_tmpdir, capfd, verbose): +def test_mp7sim_replacement(function_tmpdir, capfd): mf6sim = Mp7Cases.mf6(function_tmpdir) mf6sim.write_simulation() mf6sim.run_simulation() @@ -911,7 +910,6 @@ def test_mp7sim_replacement(function_tmpdir, capfd, verbose): flowmodel=mf6sim.get_model(mf6sim.name), exe_name="mp7", model_ws=mf6sim.sim_path, - verbose=verbose, ) defaultiface6 = {"RCH": 6, "EVT": 6} mpbas = Modpath7Bas(mp, porosity=0.1, defaultiface=defaultiface6) @@ -931,27 +929,25 @@ def test_mp7sim_replacement(function_tmpdir, capfd, verbose): zones=Mp7Cases.zones, particlegroups=Mp7Cases.particlegroups, ) - # add a duplicate mp7sim package - mpsim = Modpath7Sim( - mp, - simulationtype="combined", - trackingdirection="forward", - weaksinkoption="pass_through", - weaksourceoption="pass_through", - budgetoutputoption="summary", - budgetcellnumbers=[1049, 1259], - traceparticledata=[1, 1000], - referencetime=[0, 0, 0.0], - stoptimeoption="extend", - timepointdata=[500, 1000.0], - zonedataoption="on", - zones=Mp7Cases.zones, - particlegroups=Mp7Cases.particlegroups, - ) - cap = capfd.readouterr() - msg = "Two packages of the same type" - assert verbose == (msg in cap.out) + # add a duplicate mp7sim package + with pytest.warns(UserWarning, match="Two packages of the same type"): + mpsim = Modpath7Sim( + mp, + simulationtype="combined", + trackingdirection="forward", + weaksinkoption="pass_through", + weaksourceoption="pass_through", + budgetoutputoption="summary", + budgetcellnumbers=[1049, 1259], + traceparticledata=[1, 1000], + referencetime=[0, 0, 0.0], + stoptimeoption="extend", + timepointdata=[500, 1000.0], + zonedataoption="on", + zones=Mp7Cases.zones, + particlegroups=Mp7Cases.particlegroups, + ) mp.write_input() success, buff = mp.run_model() diff --git a/flopy/mbase.py b/flopy/mbase.py index c09c9b1e02..c44dac9103 100644 --- a/flopy/mbase.py +++ b/flopy/mbase.py @@ -94,7 +94,8 @@ def _resolve(exe_name): if exe_path is None: if forgive: warn( - f"The program {exe_name} does not exist or is not executable." + f"The program {exe_name} does not exist or is not executable.", + category=UserWarning, ) return None @@ -416,7 +417,8 @@ def __init__( except: warn( f"\n{model_ws} not valid, " - f"workspace-folder was changed to {os.getcwd()}\n" + f"workspace-folder was changed to {os.getcwd()}\n", + category=UserWarning, ) model_ws = os.getcwd() self._model_ws = str(model_ws) @@ -647,20 +649,20 @@ def add_package(self, p): pn = p.name[idx] except: pn = p.name - if self.verbose: - print( - f"\nWARNING:\n unit {u} of package {pn} already in use." - ) + warn( + f"Unit {u} of package {pn} already in use.", + category=UserWarning, + ) self.package_units.append(u) for i, pp in enumerate(self.packagelist): if pp.allowDuplicates: continue elif isinstance(p, type(pp)): - if self.verbose: - print( - "\nWARNING:\n Two packages of the same type, " - f"Replacing existing '{p.name[0]}' package." - ) + warn( + "Two packages of the same type, " + f"Replacing existing '{p.name[0]}' package.", + category=UserWarning, + ) self.packagelist[i] = p return if self.verbose: From 92632d26be2ecb21b6d9d56717faadaa13e08369 Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Fri, 29 Sep 2023 14:25:13 -0400 Subject: [PATCH 22/25] fix(get_structured_faceflows): cover edge cases, expand tests (#1968) * reproduce and fix provided 2D model * stub simpler parametrized 2D tests * add freyberg mf6/mf2005 comparison * move get_face into get_structured_faceflows * remove og repro (covered by parametrized test) --- autotest/test_postprocessing.py | 188 ++++++++++++++++++++++++++---- flopy/mf6/utils/postprocessing.py | 109 +++++++++++++---- 2 files changed, 251 insertions(+), 46 deletions(-) diff --git a/autotest/test_postprocessing.py b/autotest/test_postprocessing.py index 4812ac9c02..fd49f03834 100644 --- a/autotest/test_postprocessing.py +++ b/autotest/test_postprocessing.py @@ -4,6 +4,7 @@ import pytest from modflow_devtools.markers import requires_exe +import flopy from flopy.mf6 import ( MFSimulation, ModflowGwf, @@ -26,51 +27,190 @@ ) -@pytest.fixture(scope="module") +@pytest.fixture +def mf2005_freyberg_path(example_data_path): + return example_data_path / "freyberg" + + +@pytest.fixture def mf6_freyberg_path(example_data_path): return example_data_path / "mf6-freyberg" +@pytest.mark.parametrize( + "nlay, nrow, ncol", + [ + # extended in 1 dimension + [3, 1, 1], + [1, 3, 1], + [1, 1, 3], + # 2D + [3, 3, 1], + [1, 3, 3], + [3, 1, 3], + # 3D + [3, 3, 3], + ], +) @pytest.mark.mf6 @requires_exe("mf6") -def test_faceflows(function_tmpdir, mf6_freyberg_path): +def test_get_structured_faceflows(function_tmpdir, nlay, nrow, ncol): + name = "gsff" + sim = flopy.mf6.MFSimulation( + sim_name=name, exe_name="mf6", version="mf6", sim_ws=function_tmpdir + ) + + # tdis + tdis = flopy.mf6.ModflowTdis( + sim, + nper=1, + perioddata=[(1.0, 1, 1.0)], + ) + + # gwf + gwf = flopy.mf6.ModflowGwf( + sim, + modelname=name, + model_nam_file="{}.nam".format(name), + save_flows=True, + ) + + # dis + botm = ( + np.ones((nlay, nrow, ncol)) + * np.arange(nlay - 1, -1, -1)[:, np.newaxis, np.newaxis] + ) + dis = flopy.mf6.ModflowGwfdis( + gwf, + nlay=nlay, + nrow=nrow, + ncol=ncol, + top=nlay, + botm=botm, + ) + + # initial conditions + h0 = nlay * 2 + start = h0 * np.ones((nlay, nrow, ncol)) + ic = flopy.mf6.ModflowGwfic(gwf, pname="ic", strt=start) + + # constant head + chd_rec = [] + max_dim = max(nlay, nrow, ncol) + h = np.linspace(11, 13, max_dim) + iface = 6 # top + for i in range(0, max_dim): + # ((layer,row,col),head,iface) + cell_id = ( + (0, 0, i) if ncol > 1 else (0, i, 0) if nrow > 1 else (i, 0, 0) + ) + chd_rec.append((cell_id, h[i], iface)) + chd = flopy.mf6.ModflowGwfchd( + gwf, + auxiliary=[("iface",)], + stress_period_data=chd_rec, + print_input=True, + print_flows=True, + save_flows=True, + ) + + # node property flow + npf = flopy.mf6.ModflowGwfnpf(gwf, save_specific_discharge=True) + + # output control + budgetfile = "{}.cbb".format(name) + budget_filerecord = [budgetfile] + saverecord = [("BUDGET", "ALL")] + oc = flopy.mf6.ModflowGwfoc( + gwf, + saverecord=saverecord, + budget_filerecord=budget_filerecord, + ) + + # solver + ims = flopy.mf6.ModflowIms(sim) + + # write and run the model + sim.write_simulation() + sim.check() + success, buff = sim.run_simulation() + assert success + + # load budget output + budget = gwf.output.budget() + flow_ja_face = budget.get_data(text="FLOW-JA-FACE")[0] + frf, fff, flf = get_structured_faceflows( + flow_ja_face, + grb_file=function_tmpdir / f"{gwf.name}.dis.grb", + verbose=True, + ) + + # expect nonzero flows only in extended (>1 cell) dimensions + assert np.any(frf) == (ncol > 1) + assert np.any(fff) == (nrow > 1) + assert np.any(flf) == (nlay > 1) + + +@pytest.mark.mf6 +@requires_exe("mf6") +def test_get_structured_faceflows_freyberg( + function_tmpdir, mf2005_freyberg_path, mf6_freyberg_path +): + # create workspaces + mf6_ws = function_tmpdir / "mf6" + mf2005_ws = function_tmpdir / "mf2005" + + # run freyberg mf6 sim = MFSimulation.load( sim_name="freyberg", exe_name="mf6", sim_ws=mf6_freyberg_path, ) - - # change the simulation workspace - sim.set_sim_path(function_tmpdir) - - # write the model simulation files + sim.set_sim_path(mf6_ws) sim.write_simulation() - - # run the simulation sim.run_simulation() - # get output + # get freyberg mf6 output and compute structured faceflows gwf = sim.get_model("freyberg") - head = gwf.output.head().get_data() - cbc = gwf.output.budget() + mf6_head = gwf.output.head().get_data() + mf6_cbc = gwf.output.budget() + mf6_spdis = mf6_cbc.get_data(text="DATA-SPDIS")[0] + mf6_flowja = mf6_cbc.get_data(text="FLOW-JA-FACE")[0] + mf6_frf, mf6_fff, mf6_flf = get_structured_faceflows( + mf6_flowja, + grb_file=mf6_ws / "freyberg.dis.grb", + ) + assert mf6_frf.shape == mf6_fff.shape == mf6_flf.shape == mf6_head.shape + assert not np.any(mf6_flf) # only 1 layer + + # run freyberg mf2005 + model = Modflow.load("freyberg", model_ws=mf2005_freyberg_path) + model.change_model_ws(mf2005_ws) + model.write_input() + model.run_model() + + # get freyberg mf2005 output + mf2005_cbc = flopy.utils.CellBudgetFile(mf2005_ws / "freyberg.cbc") + mf2005_frf, mf2005_fff = ( + mf2005_cbc.get_data(text="FLOW RIGHT FACE", full3D=True)[0], + mf2005_cbc.get_data(text="FLOW FRONT FACE", full3D=True)[0], + ) - spdis = cbc.get_data(text="DATA-SPDIS")[0] - flowja = cbc.get_data(text="FLOW-JA-FACE")[0] + # compare mf2005 faceflows with converted mf6 faceflows + assert mf2005_frf.shape == mf2005_fff.shape == mf6_head.shape + assert np.allclose(mf6_frf, np.flip(mf2005_frf, 0), atol=1e-3) + assert np.allclose(mf6_fff, np.flip(mf2005_fff, 0), atol=1e-3) - frf, fff, flf = get_structured_faceflows( - flowja, - grb_file=function_tmpdir / "freyberg.dis.grb", - ) Qx, Qy, Qz = get_specific_discharge( - (frf, fff, flf), + (mf6_frf, mf6_fff, mf6_flf), gwf, ) sqx, sqy, sqz = get_specific_discharge( - (frf, fff, flf), + (mf6_frf, mf6_fff, mf6_flf), gwf, - head=head, + head=mf6_head, ) - qx, qy, qz = get_specific_discharge(spdis, gwf) + qx, qy, qz = get_specific_discharge(mf6_spdis, gwf) fig = plt.figure(figsize=(12, 6), constrained_layout=True) ax = fig.add_subplot(1, 3, 1, aspect="equal") @@ -88,6 +228,7 @@ def test_faceflows(function_tmpdir, mf6_freyberg_path): q1 = mm.plot_vector(qx, qy) assert isinstance(q1, matplotlib.quiver.Quiver) + # plt.show() plt.close("all") # uv0 = np.column_stack((q0.U, q0.V)) @@ -96,7 +237,6 @@ def test_faceflows(function_tmpdir, mf6_freyberg_path): # assert ( # np.allclose(uv0, uv1) # ), "get_faceflows quivers are not equal to specific discharge vectors" - return @pytest.mark.mf6 @@ -149,7 +289,7 @@ def test_flowja_residuals(function_tmpdir, mf6_freyberg_path): @pytest.mark.mf6 @requires_exe("mf6") -def test_structured_faceflows_3d(function_tmpdir): +def test_structured_faceflows_3d_shape(function_tmpdir): name = "mymodel" sim = MFSimulation(sim_name=name, sim_ws=function_tmpdir, exe_name="mf6") tdis = ModflowTdis(sim) diff --git a/flopy/mf6/utils/postprocessing.py b/flopy/mf6/utils/postprocessing.py index df82997802..a5b00a9b47 100644 --- a/flopy/mf6/utils/postprocessing.py +++ b/flopy/mf6/utils/postprocessing.py @@ -4,7 +4,14 @@ def get_structured_faceflows( - flowja, grb_file=None, ia=None, ja=None, verbose=False + flowja, + grb_file=None, + ia=None, + ja=None, + nlay=None, + nrow=None, + ncol=None, + verbose=False, ): """ Get the face flows for the flow right face, flow front face, and @@ -22,6 +29,12 @@ def get_structured_faceflows( CRS row pointers. Only required if grb_file is not provided. ja : list or ndarray CRS column pointers. Only required if grb_file is not provided. + nlay : int + number of layers in the grid. Only required if grb_file is not provided. + nrow : int + number of rows in the grid. Only required if grb_file is not provided. + ncol : int + number of columns in the grid. Only required if grb_file is not provided. verbose: bool Write information to standard output @@ -43,11 +56,19 @@ def get_structured_faceflows( "is only for structured DIS grids" ) ia, ja = grb.ia, grb.ja + nlay, nrow, ncol = grb.nlay, grb.nrow, grb.ncol else: - if ia is None or ja is None: + if ( + ia is None + or ja is None + or nlay is None + or nrow is None + or ncol is None + ): raise ValueError( - "ia and ja arrays must be specified if the MODFLOW 6" - "binary grid file name is not specified." + "ia, ja, nlay, nrow, and ncol must be" + "specified if a MODFLOW 6 binary grid" + "file name is not specified." ) # flatten flowja, if necessary @@ -57,27 +78,71 @@ def get_structured_faceflows( # evaluate size of flowja relative to ja __check_flowja_size(flowja, ja) - # create face flow arrays - shape = (grb.nlay, grb.nrow, grb.ncol) - frf = np.zeros(shape, dtype=float).flatten() - fff = np.zeros(shape, dtype=float).flatten() - flf = np.zeros(shape, dtype=float).flatten() + # create empty flat face flow arrays + shape = (nlay, nrow, ncol) + frf = np.zeros(shape, dtype=float).flatten() # right + fff = np.zeros(shape, dtype=float).flatten() # front + flf = np.zeros(shape, dtype=float).flatten() # lower + + def get_face(m, n, nlay, nrow, ncol): + """ + Determine connection direction at (m, n) + in a connection or intercell flow matrix. + + Notes + ----- + For visual intuition in 2 dimensions + https://stackoverflow.com/a/16330162/6514033 + helps. MODFLOW uses the left-side scheme in 3D. + + Parameters + ---------- + m : int + row index + n : int + column index + nlay : int + number of layers in the grid + nrow : int + number of rows in the grid + ncol : int + number of columns in the grid + + Returns + ------- + face : int + 0: right, 1: front, 2: lower + """ + + d = m - n + if d == 1: + # handle 1D cases + if nrow == 1 and ncol == 1: + return 2 + elif nlay == 1 and ncol == 1: + return 1 + elif nlay == 1 and nrow == 1: + return 0 + else: + # handle 2D layers/rows case + return 1 if ncol == 1 else 0 + elif d == nrow * ncol: + return 2 + else: + return 1 - # fill flow terms - vmult = [-1.0, -1.0, -1.0] + # fill right, front and lower face flows + # (below main diagonal) flows = [frf, fff, flf] for n in range(grb.nodes): - i0, i1 = ia[n] + 1, ia[n + 1] - for j in range(i0, i1): - jcol = ja[j] - if jcol > n: - if jcol == n + 1: - ipos = 0 - elif jcol == n + grb.ncol: - ipos = 1 - else: - ipos = 2 - flows[ipos][n] = vmult[ipos] * flowja[j] + for i in range(ia[n] + 1, ia[n + 1]): + m = ja[i] + if m <= n: + continue + face = get_face(m, n, nlay, nrow, ncol) + flows[face][n] = -1 * flowja[i] + + # reshape and return return frf.reshape(shape), fff.reshape(shape), flf.reshape(shape) From 015d6399baa48819f9f0f78bf2f34f60bdd8ef18 Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Sat, 30 Sep 2023 08:07:06 -0400 Subject: [PATCH 23/25] fix(CellBudgetFile): detect compact fmt by negative nlay (#1966) * previously omitted totim=0 if compact * add mf6 test case courtesy of mbakker * test mf2005 with compact/non-compact --- autotest/test_binaryfile.py | 170 ++++++++++++++++++++++++++++++++++++ flopy/utils/binaryfile.py | 8 +- 2 files changed, 176 insertions(+), 2 deletions(-) diff --git a/autotest/test_binaryfile.py b/autotest/test_binaryfile.py index bb6795b708..c3b6e12a18 100644 --- a/autotest/test_binaryfile.py +++ b/autotest/test_binaryfile.py @@ -1,11 +1,14 @@ import os +from itertools import repeat import numpy as np import pytest from autotest.conftest import get_example_data_path from matplotlib import pyplot as plt from matplotlib.axes import Axes +from modflow_devtools.markers import requires_exe +import flopy from flopy.modflow import Modflow from flopy.utils import ( BinaryHeader, @@ -545,3 +548,170 @@ def test_cellbudgetfile_readrecord_waux(example_data_path): record ) v.close() + + +@pytest.fixture +@pytest.mark.mf6 +@requires_exe("mf6") +def mf6_gwf_2sp_st_tr(function_tmpdir): + """ + A basic flow model with 2 stress periods, + first steady-state, the second transient. + """ + + name = "mf6_gwf_2sp" + sim = flopy.mf6.MFSimulation( + sim_name=name, + version="mf6", + exe_name="mf6", + sim_ws=function_tmpdir, + ) + + tdis = flopy.mf6.ModflowTdis( + simulation=sim, + nper=2, + perioddata=[(0, 1, 1), (10, 10, 1)], + ) + + ims = flopy.mf6.ModflowIms( + simulation=sim, + complexity="SIMPLE", + ) + + gwf = flopy.mf6.ModflowGwf( + simulation=sim, + modelname=name, + save_flows=True, + ) + + dis = flopy.mf6.ModflowGwfdis( + model=gwf, nlay=1, nrow=1, ncol=10, delr=1, delc=10, top=10, botm=0 + ) + + npf = flopy.mf6.ModflowGwfnpf( + model=gwf, + icelltype=[0], + k=10, + ) + + ic = flopy.mf6.ModflowGwfic( + model=gwf, + strt=0, + ) + + wel = flopy.mf6.ModflowGwfwel( + model=gwf, + stress_period_data={0: 0, 1: [[(0, 0, 0), -1]]}, + ) + + sto = flopy.mf6.ModflowGwfsto( + model=gwf, + ss=1e-4, + steady_state={0: True}, + transient={1: True}, + ) + + chd = flopy.mf6.ModflowGwfchd( + model=gwf, + stress_period_data={0: [[(0, 0, 9), 0]]}, + ) + + oc = flopy.mf6.ModflowGwfoc( + model=gwf, + budget_filerecord=f"{name}.cbc", + head_filerecord=f"{name}.hds", + saverecord=[("HEAD", "ALL"), ("BUDGET", "ALL")], + ) + + return sim + + +def test_read_mf6_2sp(mf6_gwf_2sp_st_tr): + sim = mf6_gwf_2sp_st_tr + gwf = sim.get_model() + sim.write_simulation(silent=False) + success, _ = sim.run_simulation(silent=False) + assert success + + # load heads and flows + hds = gwf.output.head() + cbb = gwf.output.budget() + + # check times + exp_times = [float(t) for t in range(11)] + assert hds.get_times() == exp_times + assert cbb.get_times() == exp_times + + # check stress periods and time steps + exp_kstpkper = [(0, 0)] + [(i, 1) for i in range(10)] + assert hds.get_kstpkper() == exp_kstpkper + assert cbb.get_kstpkper() == exp_kstpkper + + # check head data access by time + exp_hds_data = np.array([[list(repeat(0.0, 10))]]) + hds_data = hds.get_data(totim=0) + assert np.array_equal(hds_data, exp_hds_data) + + # check budget file data by time + cbb_data = cbb.get_data(totim=0) + assert len(cbb_data) > 0 + + # check head data access by kstp and kper + hds_data = hds.get_data(kstpkper=(0, 0)) + assert np.array_equal(hds_data, exp_hds_data) + + # check budget file data by kstp and kper + cbb_data_kstpkper = cbb.get_data(kstpkper=(0, 0)) + assert len(cbb_data) == len(cbb_data_kstpkper) + for i in range(len(cbb_data)): + assert np.array_equal(cbb_data[i], cbb_data_kstpkper[i]) + + +@pytest.mark.parametrize("compact", [True, False]) +def test_read_mf2005_freyberg(example_data_path, function_tmpdir, compact): + m = flopy.modflow.Modflow.load( + example_data_path / "freyberg" / "freyberg.nam", + ) + m.change_model_ws(function_tmpdir) + oc = m.get_package("OC") + oc.compact = compact + + m.write_input() + success, buff = m.run_model(silent=False) + assert success + + # load heads and flows + hds_file = function_tmpdir / "freyberg.hds" + cbb_file = function_tmpdir / "freyberg.cbc" + assert hds_file.is_file() + assert cbb_file.is_file() + hds = HeadFile(hds_file) + cbb = CellBudgetFile(cbb_file, model=m) # failing to specify a model... + + # check times + exp_times = [10.0] + assert hds.get_times() == exp_times + assert cbb.get_times() == exp_times # ...causes get_times() to be empty + + # check stress periods and time steps + exp_kstpkper = [(0, 0)] + assert hds.get_kstpkper() == exp_kstpkper + assert cbb.get_kstpkper() == exp_kstpkper + + # check head data access by time + hds_data_totim = hds.get_data(totim=exp_times[0]) + assert hds_data_totim.shape == (1, 40, 20) + + # check budget file data by time + cbb_data = cbb.get_data(totim=exp_times[0]) + assert len(cbb_data) > 0 + + # check head data access by kstp and kper + hds_data_kstpkper = hds.get_data(kstpkper=(0, 0)) + assert np.array_equal(hds_data_kstpkper, hds_data_totim) + + # check budget file data by kstp and kper + cbb_data_kstpkper = cbb.get_data(kstpkper=(0, 0)) + assert len(cbb_data) == len(cbb_data_kstpkper) + for i in range(len(cbb_data)): + assert np.array_equal(cbb_data[i], cbb_data_kstpkper[i]) diff --git a/flopy/utils/binaryfile.py b/flopy/utils/binaryfile.py index db7ffaf9fb..a1c2029bfc 100644 --- a/flopy/utils/binaryfile.py +++ b/flopy/utils/binaryfile.py @@ -786,6 +786,7 @@ def __init__( self.imethlist = [] self.paknamlist = [] self.nrecords = 0 + self.compact = True # compact budget file flag self.dis = None self.modelgrid = None @@ -980,7 +981,9 @@ def _build_index(self): header = self._get_header() self.nrecords += 1 totim = header["totim"] - if totim == 0: + # if old-style (non-compact) file, + # compute totim from kstp and kper + if not self.compact: totim = self._totim_from_kstpkper( (header["kstp"] - 1, header["kper"] - 1) ) @@ -1133,7 +1136,8 @@ def _get_header(self): """ header1 = binaryread(self.file, self.header1_dtype, (1,)) nlay = header1["nlay"] - if nlay < 0: + self.compact = bool(nlay < 0) + if self.compact: # fill header2 by first reading imeth, delt, pertim and totim # and then adding modelnames and paknames if imeth = 6 temp = binaryread(self.file, self.header2_dtype0, (1,)) From 41e668ef3c902338a349aff04e495c16532c0c87 Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Sat, 30 Sep 2023 10:38:30 -0400 Subject: [PATCH 24/25] test(generate_classes): skip on master and release branches (#1971) --- autotest/test_generate_classes.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/autotest/test_generate_classes.py b/autotest/test_generate_classes.py index 06527a56fe..a169ec3922 100644 --- a/autotest/test_generate_classes.py +++ b/autotest/test_generate_classes.py @@ -3,10 +3,29 @@ from pprint import pprint import pytest +from modflow_devtools.misc import get_current_branch + +branch = get_current_branch() @pytest.mark.mf6 -def test_generate_classes_from_dfn(virtualenv, project_root_path): +@pytest.mark.slow +@pytest.mark.regression +@pytest.mark.skipif( + branch == "master" or branch.startswith("v"), + reason="skip on master and release branches", +) +def test_generate_classes_from_github_refs( + request, virtualenv, project_root_path, ref, worker_id +): + argv = ( + request.config.workerinput["mainargv"] + if hasattr(request.config, "workerinput") + else [] + ) + if worker_id != "master" and "loadfile" not in argv: + pytest.skip("can't run in parallel") + python = virtualenv.python venv = Path(python).parent print(f"Using temp venv at {venv} with python {python}") From 0787432ff2503d68024d49e2bfbc1909670dc445 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 30 Sep 2023 14:52:39 +0000 Subject: [PATCH 25/25] ci(release): set version to 3.4.3, update plugins from DFN files, update changelog --- CITATION.cff | 4 ++-- README.md | 4 ++-- autotest/test_mbase.py | 1 - code.json | 4 ++-- docs/PyPI_release.md | 2 +- docs/version_changes.md | 10 ++++++++++ flopy/mf6/modflow/mfems.py | 2 +- flopy/mf6/modflow/mfgnc.py | 2 +- flopy/mf6/modflow/mfgwf.py | 2 +- flopy/mf6/modflow/mfgwfapi.py | 2 +- flopy/mf6/modflow/mfgwfbuy.py | 2 +- flopy/mf6/modflow/mfgwfchd.py | 2 +- flopy/mf6/modflow/mfgwfcsub.py | 2 +- flopy/mf6/modflow/mfgwfdis.py | 2 +- flopy/mf6/modflow/mfgwfdisu.py | 2 +- flopy/mf6/modflow/mfgwfdisv.py | 2 +- flopy/mf6/modflow/mfgwfdrn.py | 2 +- flopy/mf6/modflow/mfgwfevt.py | 2 +- flopy/mf6/modflow/mfgwfevta.py | 2 +- flopy/mf6/modflow/mfgwfghb.py | 2 +- flopy/mf6/modflow/mfgwfgnc.py | 2 +- flopy/mf6/modflow/mfgwfgwf.py | 2 +- flopy/mf6/modflow/mfgwfgwt.py | 2 +- flopy/mf6/modflow/mfgwfhfb.py | 2 +- flopy/mf6/modflow/mfgwfic.py | 2 +- flopy/mf6/modflow/mfgwflak.py | 2 +- flopy/mf6/modflow/mfgwfmaw.py | 2 +- flopy/mf6/modflow/mfgwfmvr.py | 2 +- flopy/mf6/modflow/mfgwfnam.py | 2 +- flopy/mf6/modflow/mfgwfnpf.py | 2 +- flopy/mf6/modflow/mfgwfoc.py | 2 +- flopy/mf6/modflow/mfgwfrch.py | 2 +- flopy/mf6/modflow/mfgwfrcha.py | 2 +- flopy/mf6/modflow/mfgwfriv.py | 2 +- flopy/mf6/modflow/mfgwfsfr.py | 2 +- flopy/mf6/modflow/mfgwfsto.py | 2 +- flopy/mf6/modflow/mfgwfuzf.py | 2 +- flopy/mf6/modflow/mfgwfvsc.py | 2 +- flopy/mf6/modflow/mfgwfwel.py | 2 +- flopy/mf6/modflow/mfgwt.py | 2 +- flopy/mf6/modflow/mfgwtadv.py | 2 +- flopy/mf6/modflow/mfgwtapi.py | 2 +- flopy/mf6/modflow/mfgwtcnc.py | 2 +- flopy/mf6/modflow/mfgwtdis.py | 2 +- flopy/mf6/modflow/mfgwtdisu.py | 2 +- flopy/mf6/modflow/mfgwtdisv.py | 2 +- flopy/mf6/modflow/mfgwtdsp.py | 2 +- flopy/mf6/modflow/mfgwtfmi.py | 2 +- flopy/mf6/modflow/mfgwtgwt.py | 2 +- flopy/mf6/modflow/mfgwtic.py | 2 +- flopy/mf6/modflow/mfgwtist.py | 2 +- flopy/mf6/modflow/mfgwtlkt.py | 2 +- flopy/mf6/modflow/mfgwtmst.py | 2 +- flopy/mf6/modflow/mfgwtmvt.py | 2 +- flopy/mf6/modflow/mfgwtmwt.py | 2 +- flopy/mf6/modflow/mfgwtnam.py | 2 +- flopy/mf6/modflow/mfgwtoc.py | 2 +- flopy/mf6/modflow/mfgwtsft.py | 2 +- flopy/mf6/modflow/mfgwtsrc.py | 2 +- flopy/mf6/modflow/mfgwtssm.py | 2 +- flopy/mf6/modflow/mfgwtuzt.py | 2 +- flopy/mf6/modflow/mfims.py | 2 +- flopy/mf6/modflow/mfmvr.py | 2 +- flopy/mf6/modflow/mfmvt.py | 2 +- flopy/mf6/modflow/mfnam.py | 2 +- flopy/mf6/modflow/mftdis.py | 2 +- flopy/mf6/modflow/mfutlats.py | 2 +- flopy/mf6/modflow/mfutllaktab.py | 2 +- flopy/mf6/modflow/mfutlobs.py | 2 +- flopy/mf6/modflow/mfutlsfrtab.py | 2 +- flopy/mf6/modflow/mfutlspc.py | 2 +- flopy/mf6/modflow/mfutlspca.py | 2 +- flopy/mf6/modflow/mfutltas.py | 2 +- flopy/mf6/modflow/mfutlts.py | 2 +- flopy/mf6/modflow/mfutltvk.py | 2 +- flopy/mf6/modflow/mfutltvs.py | 2 +- flopy/version.py | 4 ++-- version.txt | 2 +- 78 files changed, 90 insertions(+), 81 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index f9732fead9..b2ba984989 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -3,8 +3,8 @@ message: If you use this software, please cite both the article from preferred-c and the software itself. type: software title: FloPy -version: 3.4.2 -date-released: '2023-08-25' +version: 3.4.3 +date-released: '2023-09-30' doi: 10.5066/F7BK19FH abstract: A Python package to create, run, and post-process MODFLOW-based models. repository-artifact: https://pypi.org/project/flopy diff --git a/README.md b/README.md index 9d297427e8..361bff05f2 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ flopy3 -### Version 3.4.2 +### Version 3.4.3 [![flopy continuous integration](https://github.com/modflowpy/flopy/actions/workflows/commit.yml/badge.svg?branch=develop)](https://github.com/modflowpy/flopy/actions/workflows/commit.yml) [![Read the Docs](https://github.com/modflowpy/flopy/actions/workflows/rtd.yml/badge.svg?branch=develop)](https://github.com/modflowpy/flopy/actions/workflows/rtd.yml) @@ -142,7 +142,7 @@ How to Cite ##### ***Software/Code citation for FloPy:*** -[Bakker, Mark, Post, Vincent, Hughes, J. D., Langevin, C. D., White, J. T., Leaf, A. T., Paulinski, S. R., Bellino, J. C., Morway, E. D., Toews, M. W., Larsen, J. D., Fienen, M. N., Starn, J. J., Brakenhoff, D. A., and Bonelli, W. P., 2023, FloPy v3.4.2: U.S. Geological Survey Software Release, 25 August 2023, https://doi.org/10.5066/F7BK19FH](https://doi.org/10.5066/F7BK19FH) +[Bakker, Mark, Post, Vincent, Hughes, J. D., Langevin, C. D., White, J. T., Leaf, A. T., Paulinski, S. R., Bellino, J. C., Morway, E. D., Toews, M. W., Larsen, J. D., Fienen, M. N., Starn, J. J., Brakenhoff, D. A., and Bonelli, W. P., 2023, FloPy v3.4.3: U.S. Geological Survey Software Release, 30 September 2023, https://doi.org/10.5066/F7BK19FH](https://doi.org/10.5066/F7BK19FH) Additional FloPy Related Publications diff --git a/autotest/test_mbase.py b/autotest/test_mbase.py index 8a2eddcadc..8e3ee5d828 100644 --- a/autotest/test_mbase.py +++ b/autotest/test_mbase.py @@ -10,7 +10,6 @@ from flopy.mbase import resolve_exe from flopy.utils.flopy_io import relpath_safe - _system = system() diff --git a/code.json b/code.json index 0ba0adfdb6..b7b4f16059 100644 --- a/code.json +++ b/code.json @@ -29,9 +29,9 @@ "downloadURL": "https://code.usgs.gov/usgs/modflow/flopy/archive/master.zip", "vcs": "git", "laborHours": -1, - "version": "3.4.2", + "version": "3.4.3", "date": { - "metadataLastUpdated": "2023-08-25" + "metadataLastUpdated": "2023-09-30" }, "organization": "U.S. Geological Survey", "permissions": { diff --git a/docs/PyPI_release.md b/docs/PyPI_release.md index 55a9bea16d..315be7329a 100644 --- a/docs/PyPI_release.md +++ b/docs/PyPI_release.md @@ -30,7 +30,7 @@ How to Cite *Software/Code citation for FloPy:* -[Bakker, Mark, Post, Vincent, Hughes, J. D., Langevin, C. D., White, J. T., Leaf, A. T., Paulinski, S. R., Bellino, J. C., Morway, E. D., Toews, M. W., Larsen, J. D., Fienen, M. N., Starn, J. J., Brakenhoff, D. A., and Bonelli, W. P., 2023, FloPy v3.4.2: U.S. Geological Survey Software Release, 25 August 2023, https://doi.org/10.5066/F7BK19FH](https://doi.org/10.5066/F7BK19FH) +[Bakker, Mark, Post, Vincent, Hughes, J. D., Langevin, C. D., White, J. T., Leaf, A. T., Paulinski, S. R., Bellino, J. C., Morway, E. D., Toews, M. W., Larsen, J. D., Fienen, M. N., Starn, J. J., Brakenhoff, D. A., and Bonelli, W. P., 2023, FloPy v3.4.3: U.S. Geological Survey Software Release, 30 September 2023, https://doi.org/10.5066/F7BK19FH](https://doi.org/10.5066/F7BK19FH) Disclaimer diff --git a/docs/version_changes.md b/docs/version_changes.md index 3126948f85..daa1573684 100644 --- a/docs/version_changes.md +++ b/docs/version_changes.md @@ -1,3 +1,13 @@ +### Version 3.4.3 + +#### Bug fixes + +* [fix(export_contours/f)](https://github.com/modflowpy/flopy/commit/30209f2ca2e69289227203e4afd2f33bfceed097): Support matplotlib 3.8+ (#1951). Committed by wpbonelli on 2023-09-19. +* [fix(resolve_exe)](https://github.com/modflowpy/flopy/commit/3522dced8a49dc93fb0140d9ac360a88f31b11bb): Support extensionless abs/rel paths on windows (#1957). Committed by wpbonelli on 2023-09-24. +* [fix(mbase)](https://github.com/modflowpy/flopy/commit/b848f968af4179d8618b811cd4fe6f8de66d09cb): Warn if duplicate pkgs or units (#1964). Committed by wpbonelli on 2023-09-26. +* [fix(get_structured_faceflows)](https://github.com/modflowpy/flopy/commit/92632d26be2ecb21b6d9d56717faadaa13e08369): Cover edge cases, expand tests (#1968). Committed by wpbonelli on 2023-09-29. +* [fix(CellBudgetFile)](https://github.com/modflowpy/flopy/commit/015d6399baa48819f9f0f78bf2f34f60bdd8ef18): Detect compact fmt by negative nlay (#1966). Committed by wpbonelli on 2023-09-30. + ### Version 3.4.2 #### Bug fixes diff --git a/flopy/mf6/modflow/mfems.py b/flopy/mf6/modflow/mfems.py index a75fbc5e1e..b3fa1f5228 100644 --- a/flopy/mf6/modflow/mfems.py +++ b/flopy/mf6/modflow/mfems.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage diff --git a/flopy/mf6/modflow/mfgnc.py b/flopy/mf6/modflow/mfgnc.py index b3da2b8593..a5206142c0 100644 --- a/flopy/mf6/modflow/mfgnc.py +++ b/flopy/mf6/modflow/mfgnc.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwf.py b/flopy/mf6/modflow/mfgwf.py index 9c5cc500be..3d9f8d167f 100644 --- a/flopy/mf6/modflow/mfgwf.py +++ b/flopy/mf6/modflow/mfgwf.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfmodel from ..data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfapi.py b/flopy/mf6/modflow/mfgwfapi.py index 2fbb5e1056..1a8e17645a 100644 --- a/flopy/mf6/modflow/mfgwfapi.py +++ b/flopy/mf6/modflow/mfgwfapi.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:28 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfbuy.py b/flopy/mf6/modflow/mfgwfbuy.py index 9e7e8f3fac..bda007d810 100644 --- a/flopy/mf6/modflow/mfgwfbuy.py +++ b/flopy/mf6/modflow/mfgwfbuy.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:28 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfchd.py b/flopy/mf6/modflow/mfgwfchd.py index d3c7654adc..dd5864bcd8 100644 --- a/flopy/mf6/modflow/mfgwfchd.py +++ b/flopy/mf6/modflow/mfgwfchd.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfcsub.py b/flopy/mf6/modflow/mfgwfcsub.py index 43073af3d2..a1204cbc76 100644 --- a/flopy/mf6/modflow/mfgwfcsub.py +++ b/flopy/mf6/modflow/mfgwfcsub.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:28 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfdis.py b/flopy/mf6/modflow/mfgwfdis.py index 583b6d15d4..1e33334a1e 100644 --- a/flopy/mf6/modflow/mfgwfdis.py +++ b/flopy/mf6/modflow/mfgwfdis.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfdisu.py b/flopy/mf6/modflow/mfgwfdisu.py index eb6a5ae45f..5a9ac212b0 100644 --- a/flopy/mf6/modflow/mfgwfdisu.py +++ b/flopy/mf6/modflow/mfgwfdisu.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfdisv.py b/flopy/mf6/modflow/mfgwfdisv.py index 7b6a3cb782..4e4d2dfe39 100644 --- a/flopy/mf6/modflow/mfgwfdisv.py +++ b/flopy/mf6/modflow/mfgwfdisv.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfdrn.py b/flopy/mf6/modflow/mfgwfdrn.py index 87d73562af..741c2f6fbb 100644 --- a/flopy/mf6/modflow/mfgwfdrn.py +++ b/flopy/mf6/modflow/mfgwfdrn.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfevt.py b/flopy/mf6/modflow/mfgwfevt.py index 48ca63400e..c723567328 100644 --- a/flopy/mf6/modflow/mfgwfevt.py +++ b/flopy/mf6/modflow/mfgwfevt.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfevta.py b/flopy/mf6/modflow/mfgwfevta.py index e179751321..26ade65cfd 100644 --- a/flopy/mf6/modflow/mfgwfevta.py +++ b/flopy/mf6/modflow/mfgwfevta.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfghb.py b/flopy/mf6/modflow/mfgwfghb.py index 8d11af1464..4db50892a9 100644 --- a/flopy/mf6/modflow/mfgwfghb.py +++ b/flopy/mf6/modflow/mfgwfghb.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfgnc.py b/flopy/mf6/modflow/mfgwfgnc.py index f16e30f8e1..3802a3672a 100644 --- a/flopy/mf6/modflow/mfgwfgnc.py +++ b/flopy/mf6/modflow/mfgwfgnc.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:28 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfgwf.py b/flopy/mf6/modflow/mfgwfgwf.py index 5d427823be..c8f56e3720 100644 --- a/flopy/mf6/modflow/mfgwfgwf.py +++ b/flopy/mf6/modflow/mfgwfgwf.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfgwt.py b/flopy/mf6/modflow/mfgwfgwt.py index 5c4839e79e..0b736c156c 100644 --- a/flopy/mf6/modflow/mfgwfgwt.py +++ b/flopy/mf6/modflow/mfgwfgwt.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage diff --git a/flopy/mf6/modflow/mfgwfhfb.py b/flopy/mf6/modflow/mfgwfhfb.py index 53d73cd861..afce6426a6 100644 --- a/flopy/mf6/modflow/mfgwfhfb.py +++ b/flopy/mf6/modflow/mfgwfhfb.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfic.py b/flopy/mf6/modflow/mfgwfic.py index 75554b6ecb..fe8dbe984b 100644 --- a/flopy/mf6/modflow/mfgwfic.py +++ b/flopy/mf6/modflow/mfgwfic.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwflak.py b/flopy/mf6/modflow/mfgwflak.py index 7dd3476ed6..26138668f0 100644 --- a/flopy/mf6/modflow/mfgwflak.py +++ b/flopy/mf6/modflow/mfgwflak.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:28 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfmaw.py b/flopy/mf6/modflow/mfgwfmaw.py index 72bc13ccf7..762472241e 100644 --- a/flopy/mf6/modflow/mfgwfmaw.py +++ b/flopy/mf6/modflow/mfgwfmaw.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:28 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfmvr.py b/flopy/mf6/modflow/mfgwfmvr.py index 0ecd694d55..203d57f326 100644 --- a/flopy/mf6/modflow/mfgwfmvr.py +++ b/flopy/mf6/modflow/mfgwfmvr.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:28 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfnam.py b/flopy/mf6/modflow/mfgwfnam.py index 86a8dd46a0..b01c1741f7 100644 --- a/flopy/mf6/modflow/mfgwfnam.py +++ b/flopy/mf6/modflow/mfgwfnam.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfnpf.py b/flopy/mf6/modflow/mfgwfnpf.py index c601e46423..56c886882f 100644 --- a/flopy/mf6/modflow/mfgwfnpf.py +++ b/flopy/mf6/modflow/mfgwfnpf.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfoc.py b/flopy/mf6/modflow/mfgwfoc.py index b8f2352dbe..347a0d938a 100644 --- a/flopy/mf6/modflow/mfgwfoc.py +++ b/flopy/mf6/modflow/mfgwfoc.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:28 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfrch.py b/flopy/mf6/modflow/mfgwfrch.py index 3fdc690527..d512bb1be6 100644 --- a/flopy/mf6/modflow/mfgwfrch.py +++ b/flopy/mf6/modflow/mfgwfrch.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfrcha.py b/flopy/mf6/modflow/mfgwfrcha.py index ead28e7488..e6034848a2 100644 --- a/flopy/mf6/modflow/mfgwfrcha.py +++ b/flopy/mf6/modflow/mfgwfrcha.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfriv.py b/flopy/mf6/modflow/mfgwfriv.py index c38073f684..7417d44530 100644 --- a/flopy/mf6/modflow/mfgwfriv.py +++ b/flopy/mf6/modflow/mfgwfriv.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfsfr.py b/flopy/mf6/modflow/mfgwfsfr.py index eff4747038..24655b69e1 100644 --- a/flopy/mf6/modflow/mfgwfsfr.py +++ b/flopy/mf6/modflow/mfgwfsfr.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:28 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfsto.py b/flopy/mf6/modflow/mfgwfsto.py index 617c4ccad3..2bdb75f272 100644 --- a/flopy/mf6/modflow/mfgwfsto.py +++ b/flopy/mf6/modflow/mfgwfsto.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfuzf.py b/flopy/mf6/modflow/mfgwfuzf.py index cec6ae87c9..4fea151fe2 100644 --- a/flopy/mf6/modflow/mfgwfuzf.py +++ b/flopy/mf6/modflow/mfgwfuzf.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:28 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfvsc.py b/flopy/mf6/modflow/mfgwfvsc.py index 1cda4b286c..5285cbb720 100644 --- a/flopy/mf6/modflow/mfgwfvsc.py +++ b/flopy/mf6/modflow/mfgwfvsc.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:28 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwfwel.py b/flopy/mf6/modflow/mfgwfwel.py index e101db5b58..ae14cd2061 100644 --- a/flopy/mf6/modflow/mfgwfwel.py +++ b/flopy/mf6/modflow/mfgwfwel.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwt.py b/flopy/mf6/modflow/mfgwt.py index 37c0baceea..517eb771e4 100644 --- a/flopy/mf6/modflow/mfgwt.py +++ b/flopy/mf6/modflow/mfgwt.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:28 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfmodel from ..data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtadv.py b/flopy/mf6/modflow/mfgwtadv.py index 32f9d005c7..9003e73c89 100644 --- a/flopy/mf6/modflow/mfgwtadv.py +++ b/flopy/mf6/modflow/mfgwtadv.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:28 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage diff --git a/flopy/mf6/modflow/mfgwtapi.py b/flopy/mf6/modflow/mfgwtapi.py index affba69128..b5ed4050c2 100644 --- a/flopy/mf6/modflow/mfgwtapi.py +++ b/flopy/mf6/modflow/mfgwtapi.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:28 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtcnc.py b/flopy/mf6/modflow/mfgwtcnc.py index b47f9325ed..fb3b823b63 100644 --- a/flopy/mf6/modflow/mfgwtcnc.py +++ b/flopy/mf6/modflow/mfgwtcnc.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:28 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtdis.py b/flopy/mf6/modflow/mfgwtdis.py index 38e0746e64..dc66d78ad3 100644 --- a/flopy/mf6/modflow/mfgwtdis.py +++ b/flopy/mf6/modflow/mfgwtdis.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:28 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtdisu.py b/flopy/mf6/modflow/mfgwtdisu.py index a288275770..03fcf41cfc 100644 --- a/flopy/mf6/modflow/mfgwtdisu.py +++ b/flopy/mf6/modflow/mfgwtdisu.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:28 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtdisv.py b/flopy/mf6/modflow/mfgwtdisv.py index 071467786a..a65194bada 100644 --- a/flopy/mf6/modflow/mfgwtdisv.py +++ b/flopy/mf6/modflow/mfgwtdisv.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:28 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtdsp.py b/flopy/mf6/modflow/mfgwtdsp.py index f841cf7985..ad263956e4 100644 --- a/flopy/mf6/modflow/mfgwtdsp.py +++ b/flopy/mf6/modflow/mfgwtdsp.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:28 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtfmi.py b/flopy/mf6/modflow/mfgwtfmi.py index b8333dece0..3eeabfaea8 100644 --- a/flopy/mf6/modflow/mfgwtfmi.py +++ b/flopy/mf6/modflow/mfgwtfmi.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:28 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtgwt.py b/flopy/mf6/modflow/mfgwtgwt.py index 959f2a4113..98bd1ce7aa 100644 --- a/flopy/mf6/modflow/mfgwtgwt.py +++ b/flopy/mf6/modflow/mfgwtgwt.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtic.py b/flopy/mf6/modflow/mfgwtic.py index 171bab1922..1c8527100f 100644 --- a/flopy/mf6/modflow/mfgwtic.py +++ b/flopy/mf6/modflow/mfgwtic.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:28 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtist.py b/flopy/mf6/modflow/mfgwtist.py index 3f1d126e44..3018130b07 100644 --- a/flopy/mf6/modflow/mfgwtist.py +++ b/flopy/mf6/modflow/mfgwtist.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:28 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtlkt.py b/flopy/mf6/modflow/mfgwtlkt.py index dd22f92209..89b2d68164 100644 --- a/flopy/mf6/modflow/mfgwtlkt.py +++ b/flopy/mf6/modflow/mfgwtlkt.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:28 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtmst.py b/flopy/mf6/modflow/mfgwtmst.py index 93cff4e6d4..ffe1b4791b 100644 --- a/flopy/mf6/modflow/mfgwtmst.py +++ b/flopy/mf6/modflow/mfgwtmst.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:28 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtmvt.py b/flopy/mf6/modflow/mfgwtmvt.py index 33e86b0803..cf7b668fff 100644 --- a/flopy/mf6/modflow/mfgwtmvt.py +++ b/flopy/mf6/modflow/mfgwtmvt.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:28 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtmwt.py b/flopy/mf6/modflow/mfgwtmwt.py index c1d573c53d..41c7c33bf3 100644 --- a/flopy/mf6/modflow/mfgwtmwt.py +++ b/flopy/mf6/modflow/mfgwtmwt.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:28 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtnam.py b/flopy/mf6/modflow/mfgwtnam.py index 1ed27c5c25..218b895451 100644 --- a/flopy/mf6/modflow/mfgwtnam.py +++ b/flopy/mf6/modflow/mfgwtnam.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:28 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtoc.py b/flopy/mf6/modflow/mfgwtoc.py index 2637402c32..bffcd7c225 100644 --- a/flopy/mf6/modflow/mfgwtoc.py +++ b/flopy/mf6/modflow/mfgwtoc.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:28 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtsft.py b/flopy/mf6/modflow/mfgwtsft.py index 5c4356d1a0..a46c886cf4 100644 --- a/flopy/mf6/modflow/mfgwtsft.py +++ b/flopy/mf6/modflow/mfgwtsft.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:28 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtsrc.py b/flopy/mf6/modflow/mfgwtsrc.py index afbc3de3d9..6cbab49a59 100644 --- a/flopy/mf6/modflow/mfgwtsrc.py +++ b/flopy/mf6/modflow/mfgwtsrc.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:28 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtssm.py b/flopy/mf6/modflow/mfgwtssm.py index 9e23f0d6c0..592b090bb2 100644 --- a/flopy/mf6/modflow/mfgwtssm.py +++ b/flopy/mf6/modflow/mfgwtssm.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:28 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfgwtuzt.py b/flopy/mf6/modflow/mfgwtuzt.py index 7556150f6f..5750e46a20 100644 --- a/flopy/mf6/modflow/mfgwtuzt.py +++ b/flopy/mf6/modflow/mfgwtuzt.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:28 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfims.py b/flopy/mf6/modflow/mfims.py index a80681e5d1..80e0f905cf 100644 --- a/flopy/mf6/modflow/mfims.py +++ b/flopy/mf6/modflow/mfims.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfmvr.py b/flopy/mf6/modflow/mfmvr.py index 19e0b4c6cd..8a3846eda7 100644 --- a/flopy/mf6/modflow/mfmvr.py +++ b/flopy/mf6/modflow/mfmvr.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfmvt.py b/flopy/mf6/modflow/mfmvt.py index 9b3facc2cd..372294b09e 100644 --- a/flopy/mf6/modflow/mfmvt.py +++ b/flopy/mf6/modflow/mfmvt.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfnam.py b/flopy/mf6/modflow/mfnam.py index d355a3c592..780f56a36d 100644 --- a/flopy/mf6/modflow/mfnam.py +++ b/flopy/mf6/modflow/mfnam.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mftdis.py b/flopy/mf6/modflow/mftdis.py index 6da201fb40..ee7a280b88 100644 --- a/flopy/mf6/modflow/mftdis.py +++ b/flopy/mf6/modflow/mftdis.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfutlats.py b/flopy/mf6/modflow/mfutlats.py index cba03823c3..8fd34420f6 100644 --- a/flopy/mf6/modflow/mfutlats.py +++ b/flopy/mf6/modflow/mfutlats.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfutllaktab.py b/flopy/mf6/modflow/mfutllaktab.py index ab6d26a797..ca634be4d1 100644 --- a/flopy/mf6/modflow/mfutllaktab.py +++ b/flopy/mf6/modflow/mfutllaktab.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfutlobs.py b/flopy/mf6/modflow/mfutlobs.py index 5c2388ff28..687ee545ca 100644 --- a/flopy/mf6/modflow/mfutlobs.py +++ b/flopy/mf6/modflow/mfutlobs.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfutlsfrtab.py b/flopy/mf6/modflow/mfutlsfrtab.py index 8bbcbcc91e..04b8db6477 100644 --- a/flopy/mf6/modflow/mfutlsfrtab.py +++ b/flopy/mf6/modflow/mfutlsfrtab.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfutlspc.py b/flopy/mf6/modflow/mfutlspc.py index f6a6a27139..0616bda599 100644 --- a/flopy/mf6/modflow/mfutlspc.py +++ b/flopy/mf6/modflow/mfutlspc.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfutlspca.py b/flopy/mf6/modflow/mfutlspca.py index ddf1681b2c..b490741248 100644 --- a/flopy/mf6/modflow/mfutlspca.py +++ b/flopy/mf6/modflow/mfutlspca.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfutltas.py b/flopy/mf6/modflow/mfutltas.py index 11a5c0c519..2db3efb6fb 100644 --- a/flopy/mf6/modflow/mfutltas.py +++ b/flopy/mf6/modflow/mfutltas.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ArrayTemplateGenerator, ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfutlts.py b/flopy/mf6/modflow/mfutlts.py index ec5258b457..b6ddc5f47a 100644 --- a/flopy/mf6/modflow/mfutlts.py +++ b/flopy/mf6/modflow/mfutlts.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfutltvk.py b/flopy/mf6/modflow/mfutltvk.py index d82859181c..01f9a782e3 100644 --- a/flopy/mf6/modflow/mfutltvk.py +++ b/flopy/mf6/modflow/mfutltvk.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/mf6/modflow/mfutltvs.py b/flopy/mf6/modflow/mfutltvs.py index 8068032717..e0f4cb6a93 100644 --- a/flopy/mf6/modflow/mfutltvs.py +++ b/flopy/mf6/modflow/mfutltvs.py @@ -1,6 +1,6 @@ # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py -# FILE created on August 25, 2023 23:00:27 UTC +# FILE created on September 30, 2023 14:44:04 UTC from .. import mfpackage from ..data.mfdatautil import ListTemplateGenerator diff --git a/flopy/version.py b/flopy/version.py index e88b55a2ca..8c76397b26 100644 --- a/flopy/version.py +++ b/flopy/version.py @@ -1,3 +1,3 @@ -# flopy version file automatically created using update_version.py on August 25, 2023 23:00:24 +# flopy version file automatically created using update_version.py on September 30, 2023 14:44:00 -__version__ = "3.4.2" +__version__ = "3.4.3" diff --git a/version.txt b/version.txt index a423d4217b..8a0feb98ca 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -3.4.2 \ No newline at end of file +3.4.3 \ No newline at end of file