diff --git a/src/layereddataz.cpp b/src/layereddataz.cpp index 4ea0494..9a03be9 100644 --- a/src/layereddataz.cpp +++ b/src/layereddataz.cpp @@ -276,8 +276,8 @@ LayeredDataZ::Data LayeredDataZ::ReadVarRaw(const NC& f, const MString& name, si else { { - auto ret = nodepth ? f.Read(name, data, trans, {dname.lonname, p->xb, dname.nx - p->xb + 1}, {dname.latname, p->yb, p->ye - p->yb + 1}, {dname.timename, i, 1}) - : f.Read(name, data, trans, {dname.lonname, p->xb, dname.nx - p->xb + 1}, {dname.latname, p->yb, p->ye - p->yb + 1}, {dname.timename, i, 1}, + auto ret = nodepth ? f.Read(name, data, trans, {dname.lonname, p->xb, dname.nx - p->xb}, {dname.latname, p->yb, p->ye - p->yb + 1}, {dname.timename, i, 1}) + : f.Read(name, data, trans, {dname.lonname, p->xb, dname.nx - p->xb}, {dname.latname, p->yb, p->ye - p->yb + 1}, {dname.timename, i, 1}, {dname.depthname, rlayer, 1}); if(!ret) return Data(); }