From 3ccdd57e390b94c4f23daa3d46554efd39e8ec9d Mon Sep 17 00:00:00 2001 From: Michael Ou Date: Mon, 8 Feb 2021 11:20:02 -0600 Subject: [PATCH] fix(get_active) include the cbd layers when checking layer thickness before BAS is loaded (#1051) --- flopy/utils/check.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flopy/utils/check.py b/flopy/utils/check.py index 5ca1a7c05..13cd0bbb9 100644 --- a/flopy/utils/check.py +++ b/flopy/utils/check.py @@ -436,7 +436,8 @@ def get_active(self, include_cbd=False): """ mg = self.model.modelgrid if mg.grid_type == "structured": - inds = (mg.nlay, mg.nrow, mg.ncol) + nlaycbd = mg._StructuredGrid__laycbd.sum() if include_cbd else 0 + inds = (mg.nlay + nlaycbd, mg.nrow, mg.ncol) elif mg.grid_type == "vertex": inds = (mg.nlay, mg.ncpl) else: