Skip to content

Commit

Permalink
handle delr/delc and ensure size is correct
Browse files Browse the repository at this point in the history
  • Loading branch information
langevin-usgs committed Nov 20, 2023
1 parent 597ab8f commit d81c565
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions flopy/utils/gridutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down

0 comments on commit d81c565

Please sign in to comment.