Commit 90f5239d authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

streamInqTimestep: set curRecID to CDI_UNDEFID (fix for netCDF).

parent bbe2cd33
...@@ -1289,7 +1289,8 @@ int streamInqTimestep(int streamID, int tsID) ...@@ -1289,7 +1289,8 @@ int streamInqTimestep(int streamID, int tsID)
stream_t *streamptr = stream_to_pointer(streamID); stream_t *streamptr = stream_to_pointer(streamID);
int vlistID = streamptr->vlistID; int vlistID = streamptr->vlistID;
if ( tsID < streamptr->rtsteps ) if (tsID < streamptr->ntsteps) streamptr->tsteps[tsID].curRecID = CDI_UNDEFID; // fix for netCDF
if (tsID < streamptr->rtsteps)
{ {
streamptr->curTsID = tsID; streamptr->curTsID = tsID;
nrecs = streamptr->tsteps[tsID].nrecs; nrecs = streamptr->tsteps[tsID].nrecs;
...@@ -1302,10 +1303,7 @@ int streamInqTimestep(int streamID, int tsID) ...@@ -1302,10 +1303,7 @@ int streamInqTimestep(int streamID, int tsID)
return nrecs; return nrecs;
} }
if ( tsID >= streamptr->ntsteps && streamptr->ntsteps != CDI_UNDEFID ) if ( tsID >= streamptr->ntsteps && streamptr->ntsteps != CDI_UNDEFID ) return 0;
{
return 0;
}
int filetype = streamptr->filetype; int filetype = streamptr->filetype;
......
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