Commit b5049715 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

added special relative taxis case: rdate = vdate = 0

parent 9905dbd5
......@@ -35,9 +35,10 @@ int days_per_month(int calendar, int year, int month)
if ( month >= 1 && month <= 12 )
dayspermonth = dpm[month-1];
/*
else
fprintf(stderr, "days_per_month: month %d out of range\n", month);
*/
if ( dpy == 0 && month == 2 )
{
if ( (year%4 == 0 && year%100 != 0) || year%400 == 0 )
......
......@@ -587,6 +587,7 @@ void taxisDefTunit(int taxisID, int unit)
taxisptr->unit = unit;
}
void taxisDefNumavg(int taxisID, int numavg)
{
taxis_t *taxisptr;
......@@ -669,7 +670,6 @@ void taxisCopyTimestep(int taxisID2, int taxisID1)
TAXIS_UNLOCK();
}
/*
@Function taxisInqVdate
@Title Get the verification date
......@@ -1021,6 +1021,9 @@ void timeval2vtime(double timevalue, taxis_t *taxis, int *vdate, int *vtime)
rdate = (*taxis).rdate;
rtime = (*taxis).rtime;
if ( rdate == 0 && rtime == 0 && DBL_IS_EQUAL(timevalue, 0) ) return;
cdiDecodeDate(rdate, &year, &month, &day);
cdiDecodeTime(rtime, &hour, &minute, &second);
......@@ -1115,6 +1118,8 @@ double vtime2timeval(int vdate, int vtime, taxis_t *taxis)
rtime = (*taxis).vtime;
}
if ( rdate == 0 && rtime == 0 && vdate == 0 && vtime == 0 ) return(value);
cdiDecodeDate(rdate, &ryear, &rmonth, &day);
cdiDecodeTime(rtime, &hour, &minute, &second);
......
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