Commit 14e0aa29 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

cdf_define_all_zaxes: dimids are greater than ndims after ncrename (bug fix).

parent e66bcaad
......@@ -2962,7 +2962,7 @@ int cdf_define_all_zaxes(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int
}
const int zaxisindex = vlistZaxisIndex(vlistID, zaxisID);
streamptr->zaxisID[zaxisindex] = zdimid;
streamptr->zaxisID[zaxisindex] = zdimid >= 0 ? ncdims[zdimid].dimid : zdimid;
if ( CDI_Debug )
Message("zaxisID %d %d %s", zaxisID, ncvarid, ncvar->name);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment