Commit 0877630d authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Select: use dtlist to decode date/time.

parent b187ddbc
...@@ -179,6 +179,8 @@ void *Select(void *argument) ...@@ -179,6 +179,8 @@ void *Select(void *argument)
int streamCnt = cdoStreamCnt(); int streamCnt = cdoStreamCnt();
int nfiles = streamCnt - 1; int nfiles = streamCnt - 1;
dtlist_type *dtlist = dtlist_new();
if ( !cdoVerbose && nfiles > 1 ) progressInit(); if ( !cdoVerbose && nfiles > 1 ) progressInit();
timestep = 0; timestep = 0;
...@@ -527,8 +529,9 @@ void *Select(void *argument) ...@@ -527,8 +529,9 @@ void *Select(void *argument)
} }
} }
int vdate = taxisInqVdate(taxisID1); dtlist_taxisInqTimestep(dtlist, taxisID1, 0);
int vtime = taxisInqVtime(taxisID1); int vdate = dtlist_get_vdate(dtlist, 0);
int vtime = dtlist_get_vtime(dtlist, 0);
int second; int second;
cdiDecodeDate(vdate, &year, &month, &day); cdiDecodeDate(vdate, &year, &month, &day);
cdiDecodeTime(vtime, &hour, &minute, &second); cdiDecodeTime(vtime, &hour, &minute, &second);
...@@ -692,6 +695,8 @@ void *Select(void *argument) ...@@ -692,6 +695,8 @@ void *Select(void *argument)
if ( streamID2 != CDI_UNDEFID ) pstreamClose(streamID2); if ( streamID2 != CDI_UNDEFID ) pstreamClose(streamID2);
dtlist_delete(dtlist);
vlistDestroy(vlistID0); vlistDestroy(vlistID0);
vlistDestroy(vlistID2); vlistDestroy(vlistID2);
......
Supports Markdown
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