Commit 29e27a47 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Ydrunstat: don't set the year to the minimum of years found on output timestep

parent a7f2d004
......@@ -5,6 +5,7 @@
2015-06-18 Uwe Schulzweida
* Ydrunstat: don't set the year to the minimum of years found on output timestep
* Ydaystat: set the year to the minimum of years found on output timestep
2015-06-17 Uwe Schulzweida
......
......@@ -226,23 +226,24 @@ void *Ydrunstat(void *argument)
tsID++;
}
/*
// set the year to the minimum of years found on output timestep
int outyear = 1e9;
int year, month, day;
for ( dayoy = 0; dayoy < NDAY; dayoy++ )
if ( stats->nsets[dayoy] )
{
int year, month, day;
cdiDecodeDate(stats->vdate[dayoy], &year, &month, &day);
if ( year < outyear ) outyear = year;
}
for ( dayoy = 0; dayoy < NDAY; dayoy++ )
if ( stats->nsets[dayoy] )
{
int year, month, day;
cdiDecodeDate(stats->vdate[dayoy], &year, &month, &day);
stats->vdate[dayoy] = cdiEncodeDate(outyear, month, day);
// printf("vdates[%d] = %d nsets = %d\n", dayoy, stats->vdate[dayoy], stats->nsets[dayoy]);
if ( year > outyear ) stats->vdate[dayoy] = cdiEncodeDate(outyear, month, day);
}
*/
ydstatFinalize(stats, operfunc);
otsID = 0;
......
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