From f7a786e1be0c4e9eb2a7a3c0ba02728323ea44a1 Mon Sep 17 00:00:00 2001 From: Michael Uleysky Date: Fri, 22 Nov 2024 13:02:07 +1000 Subject: [PATCH] Fixed incorrect read request --- src/layereddataz.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(); }