From 8c330a7890fe732c5489ce6a2d5184a7b2fb70ee Mon Sep 17 00:00:00 2001 From: spaulins-usgs Date: Thu, 27 Jul 2023 08:30:33 -0700 Subject: [PATCH] fix(check): check now works properly with confined conditions (#1880) (#1882) * fix(check): check now works properly with confined conditions (#1880) * github workflows undo --------- Co-authored-by: scottrp <45947939+scottrp@users.noreply.github.com> --- autotest/regression/test_mf6.py | 7 ++++++- flopy/pakbase.py | 9 +++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/autotest/regression/test_mf6.py b/autotest/regression/test_mf6.py index 2f8b1a2418..6b8b8d207e 100644 --- a/autotest/regression/test_mf6.py +++ b/autotest/regression/test_mf6.py @@ -948,9 +948,14 @@ def test_np002(function_tmpdir, example_data_path): oc_package.printrecord.set_data([("HEAD", "ALL"), ("BUDGET", "ALL")], 1) sto_package = ModflowGwfsto( - model, save_flows=True, iconvert=1, ss=0.000001, sy=0.15 + model, save_flows=True, iconvert=0, ss=0.000001, sy=None, pname="sto_t" ) + sto_package.check() + model.remove_package("sto_t") + sto_package = ModflowGwfsto( + model, save_flows=True, iconvert=1, ss=0.000001, sy=0.15 + ) hfb_package = ModflowGwfhfb( model, print_input=True, diff --git a/flopy/pakbase.py b/flopy/pakbase.py index 11aee0f5a6..432381820c 100644 --- a/flopy/pakbase.py +++ b/flopy/pakbase.py @@ -413,6 +413,15 @@ def _check_storage(self, chk, storage_coeff): skip_sy_check = True else: iconvert = self.iconvert.array + inds = np.array( + [ + True if l > 0 or l < 0 else False + for l in iconvert.flatten() + ] + ) + if not inds.any(): + skip_sy_check = True + for ishape in np.ndindex(active.shape): if active[ishape]: active[ishape] = (