diff --git a/flopy/export/utils.py b/flopy/export/utils.py index d0b5773983..56e12dec4d 100644 --- a/flopy/export/utils.py +++ b/flopy/export/utils.py @@ -1207,7 +1207,7 @@ def array3d_export(f: Union[str, os.PathLike], u3d, fmt=None, **kwargs): f ).suffix.lower() == ".shp": array_dict = {} - for ilay in range(modelgrid.nlay): + for ilay in range(u3d.array.shape[0]): u2d = u3d[ilay] if isinstance(u2d, np.ndarray): dname = u3d.name