From d81c565406554655e570eff556b5f6d276fe7659 Mon Sep 17 00:00:00 2001 From: "Langevin, Christian D" Date: Mon, 20 Nov 2023 16:42:51 -0600 Subject: [PATCH] handle delr/delc and ensure size is correct --- flopy/utils/gridutil.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/flopy/utils/gridutil.py b/flopy/utils/gridutil.py index e5f2c4f015..9461957299 100644 --- a/flopy/utils/gridutil.py +++ b/flopy/utils/gridutil.py @@ -94,6 +94,13 @@ def get_disu_kwargs( def get_nn(k, i, j): return k * nrow * ncol + i * ncol + j + if not isinstance(delr, np.ndarray): + delr = np.array(delr) + if not isinstance(delc, np.ndarray): + delc = np.array(delc) + assert delr.shape == (ncol,) + assert delc.shape == (nrow,) + nodes = nlay * nrow * ncol iac = np.zeros((nodes), dtype=int) ja = []