From 2d0d095931ab129bb2a826e04109f366e90f4557 Mon Sep 17 00:00:00 2001 From: scottrp <45947939+scottrp@users.noreply.github.com> Date: Wed, 26 Jul 2023 13:28:00 -0700 Subject: [PATCH 1/2] fix(check): check now works properly with confined conditions (#1880) --- .github/workflows/commit.yml | 1 + .github/workflows/mf6.yml | 1 + .github/workflows/rtd.yml | 1 + autotest/regression/test_mf6.py | 7 ++++++- flopy/pakbase.py | 9 +++++++++ 5 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/commit.yml b/.github/workflows/commit.yml index 9864075694..cda5045e83 100644 --- a/.github/workflows/commit.yml +++ b/.github/workflows/commit.yml @@ -4,6 +4,7 @@ on: branches: - master - develop + - check_laytype - ci-diagnose* - notebooks pull_request: diff --git a/.github/workflows/mf6.yml b/.github/workflows/mf6.yml index f00b13fe1b..56b8f99d11 100644 --- a/.github/workflows/mf6.yml +++ b/.github/workflows/mf6.yml @@ -7,6 +7,7 @@ on: branches: - master - develop + - check_laytype - release* - ci-diagnose* pull_request: diff --git a/.github/workflows/rtd.yml b/.github/workflows/rtd.yml index 5df817f687..b33ceec4c0 100644 --- a/.github/workflows/rtd.yml +++ b/.github/workflows/rtd.yml @@ -5,6 +5,7 @@ on: branches: - master - develop + - check_laytype - release* - ci-diagnose* - notebooks* 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] = ( From 8ec09c76cb6db7fdf1f6e7334375f1c0a11ae781 Mon Sep 17 00:00:00 2001 From: scottrp <45947939+scottrp@users.noreply.github.com> Date: Wed, 26 Jul 2023 14:02:07 -0700 Subject: [PATCH 2/2] github workflows undo --- .github/workflows/commit.yml | 1 - .github/workflows/mf6.yml | 1 - .github/workflows/rtd.yml | 1 - 3 files changed, 3 deletions(-) diff --git a/.github/workflows/commit.yml b/.github/workflows/commit.yml index cda5045e83..9864075694 100644 --- a/.github/workflows/commit.yml +++ b/.github/workflows/commit.yml @@ -4,7 +4,6 @@ on: branches: - master - develop - - check_laytype - ci-diagnose* - notebooks pull_request: diff --git a/.github/workflows/mf6.yml b/.github/workflows/mf6.yml index 56b8f99d11..f00b13fe1b 100644 --- a/.github/workflows/mf6.yml +++ b/.github/workflows/mf6.yml @@ -7,7 +7,6 @@ on: branches: - master - develop - - check_laytype - release* - ci-diagnose* pull_request: diff --git a/.github/workflows/rtd.yml b/.github/workflows/rtd.yml index b33ceec4c0..5df817f687 100644 --- a/.github/workflows/rtd.yml +++ b/.github/workflows/rtd.yml @@ -5,7 +5,6 @@ on: branches: - master - develop - - check_laytype - release* - ci-diagnose* - notebooks*