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/.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/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 f46e47193e..f1176e0590 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): @@ -473,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, @@ -493,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 @@ -744,9 +950,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, @@ -2874,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/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): 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/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_mf6.py b/autotest/test_mf6.py index 39207dfee1..645b890386 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, ) @@ -2091,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/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/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/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/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) 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/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" 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/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 diff --git a/flopy/mf6/data/mffileaccess.py b/flopy/mf6/data/mffileaccess.py index 5a2238aca0..af093f7ba9 100644 --- a/flopy/mf6/data/mffileaccess.py +++ b/flopy/mf6/data/mffileaccess.py @@ -212,7 +212,10 @@ 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: + # write data from each layer with a separate header for layer, value in enumerate(data): self._write_layer( fd, @@ -226,6 +229,7 @@ def write_binary_file( layer + 1, ) else: + # write data with a single header self._write_layer( fd, data, @@ -236,7 +240,6 @@ def write_binary_file( text, fname, ) - data.tofile(fd) fd.close() def _write_layer( @@ -252,7 +255,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 +276,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 +285,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 +305,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 +339,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 +362,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/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 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) 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/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 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] = ( diff --git a/flopy/utils/binaryfile.py b/flopy/utils/binaryfile.py index cb5b585afd..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", ] @@ -562,7 +563,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 +1032,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 +1142,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 +1690,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/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"), ] 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 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] diff --git a/flopy/utils/mtlistfile.py b/flopy/utils/mtlistfile.py index 5214859795..8ae3b54e54 100644 --- a/flopy/utils/mtlistfile.py +++ b/flopy/utils/mtlistfile.py @@ -3,6 +3,7 @@ mt3d(usgs) run. Also includes support for SFT budget. """ +import re import warnings import numpy as np @@ -23,7 +24,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 +47,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 +115,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 +278,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 +502,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}" + ) 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/pyproject.toml b/pyproject.toml index 8eb30c8ef5..c1afffbabd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -88,7 +88,8 @@ doc = [ "PyYAML", "recommonmark", "rtds-action", - "sphinx-rtd-theme", + "sphinx >=4", + "sphinx-rtd-theme >=1", ] [project.scripts] 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