Skip to content

Commit

Permalink
fix(PlotCrossSection): boundary conditions not plotting for DISU (#2012)
Browse files Browse the repository at this point in the history
  • Loading branch information
langevin-usgs committed Nov 21, 2023
1 parent 419ae0e commit 6e3c791
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions flopy/plot/crosssection.py
Original file line number Diff line number Diff line change
Expand Up @@ -877,14 +877,18 @@ def plot_bc(
else:
idx = mflist["node"]

if len(self.mg.shape) != 3:
plotarray = np.zeros((self._nlay, self._ncpl), dtype=int)
plotarray[tuple(idx)] = 1
else:
if len(self.mg.shape) == 3:
plotarray = np.zeros(
(self.mg.nlay, self.mg.nrow, self.mg.ncol), dtype=int
)
plotarray[idx[0], idx[1], idx[2]] = 1
elif len(self.mg.shape) == 2:
plotarray = np.zeros((self._nlay, self._ncpl), dtype=int)
plotarray[tuple(idx)] = 1
else:
plotarray = np.zeros(self._ncpl, dtype=int)
idx = idx.flatten()
plotarray[idx] = 1

plotarray = np.ma.masked_equal(plotarray, 0)
if color is None:
Expand Down

0 comments on commit 6e3c791

Please sign in to comment.