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

Renamed juldate_decode() to julianDateDecode().

parent 9e7ff923
......@@ -4457,7 +4457,7 @@ get_cmor_time_val(list_t *kvl, int taxisID, JulianDate ref_date, int /*tunitsec*
int rtime;
int64_t rdate;
int ryear, rmonth, rday, addseconds = 0;
juldate_decode(calendar, ref_date, &rdate, &rtime);
julianDateDecode(calendar, ref_date, &rdate, &rtime);
cdiDecodeDate(rdate, &ryear, &rmonth, &rday);
/* Only print this for the first time step */
if (ts_id < 2)
......@@ -4548,7 +4548,7 @@ get_time_bounds(list_t *kvl, int taxisID, int ifreq, JulianDate ref_date, Julian
cdiDecodeDate(taxisInqVdate(taxisID), &year, &month, &day);
if (month == 0 || day == 0)
{
juldate_decode(calendar, jtime_val, &vdatecorr, &vtimecorr);
julianDateDecode(calendar, jtime_val, &vdatecorr, &vtimecorr);
cdiDecodeDate(vdatecorr, &year, &month, &day);
}
/***/
......
......@@ -169,7 +169,7 @@ Intgridtraj(void *process)
pstreamDefVlist(streamID2, vlistID2);
}
juldate_decode(calendar, juldate, &vdate, &vtime);
julianDateDecode(calendar, juldate, &vdate, &vtime);
taxisDefVdate(taxisID2, vdate);
taxisDefVtime(taxisID2, vtime);
pstreamDefTimestep(streamID2, tsIDo++);
......@@ -227,7 +227,7 @@ Intgridtraj(void *process)
if (tsIDo == 0)
{
juldate_decode(calendar, juldate, &vdate, &vtime);
julianDateDecode(calendar, juldate, &vdate, &vtime);
char vdatestr[32], vtimestr[32];
date2str(vdate, vdatestr, sizeof(vdatestr));
time2str(vtime, vtimestr, sizeof(vtimestr));
......
......@@ -133,7 +133,7 @@ Intntime(void *process)
const double seconds = it * julianDateToSeconds(julianDateSub(juldate2, juldate1)) / numts;
JulianDate juldate = julianDateAddSeconds(lround(seconds), juldate1);
juldate_decode(calendar, juldate, &vdate, &vtime);
julianDateDecode(calendar, juldate, &vdate, &vtime);
if (Options::cdoVerbose)
{
......
......@@ -190,7 +190,7 @@ Inttime(void *process)
if (julianDateToSeconds(juldate) >= julianDateToSeconds(juldate1)
&& julianDateToSeconds(juldate) <= julianDateToSeconds(juldate2))
{
juldate_decode(calendar, juldate, &vdate, &vtime);
julianDateDecode(calendar, juldate, &vdate, &vtime);
if (Options::cdoVerbose)
{
......@@ -265,7 +265,7 @@ Inttime(void *process)
if (tunit == TUNIT_MONTH || tunit == TUNIT_YEAR)
{
juldate_decode(calendar, juldate, &vdate, &vtime);
julianDateDecode(calendar, juldate, &vdate, &vtime);
cdiDecodeDate(vdate, &year, &month, &day);
......
......@@ -150,7 +150,7 @@ shifttime(int calendar, int tunit, int64_t ijulinc, int64_t *pdate, int *ptime)
JulianDate juldate;
juldate = juldate_encode(calendar, vdate, vtime);
juldate = julianDateAddSeconds(ijulinc, juldate);
juldate_decode(calendar, juldate, &vdate, &vtime);
julianDateDecode(calendar, juldate, &vdate, &vtime);
*pdate = vdate;
*ptime = vtime;
......@@ -194,7 +194,7 @@ time_gen_bounds(int calendar, int tunit, int incperiod, int64_t vdate, int vtime
vdateb[0] = vdate;
juldate = juldate_encode(calendar, vdateb[0], vtimeb[0]);
juldate = julianDateAddSeconds(86400, juldate);
juldate_decode(calendar, juldate, &vdateb[1], &vtimeb[1]);
julianDateDecode(calendar, juldate, &vdateb[1], &vtimeb[1]);
}
else if (tunit == TUNIT_HOUR || tunit == TUNIT_3HOURS || tunit == TUNIT_6HOURS || tunit == TUNIT_12HOURS)
{
......@@ -218,7 +218,7 @@ time_gen_bounds(int calendar, int tunit, int incperiod, int64_t vdate, int vtime
vdateb[1] = cdiEncodeDate(year, month, day + 1);
juldate = juldate_encode(calendar, vdateb[0], vtimeb[0]);
juldate = julianDateAddSeconds(incperiod * 3600, juldate);
juldate_decode(calendar, juldate, &vdateb[1], &vtimeb[1]);
julianDateDecode(calendar, juldate, &vdateb[1], &vtimeb[1]);
}
else
vtimeb[1] = cdiEncodeTime(h1, 0, 0);
......@@ -551,7 +551,7 @@ Settime(void *process)
}
else
{
juldate_decode(calendar, juldate, &vdate, &vtime);
julianDateDecode(calendar, juldate, &vdate, &vtime);
juldate = julianDateAddSeconds(ijulinc, juldate);
}
}
......@@ -565,7 +565,7 @@ Settime(void *process)
const JulianDate juldate2 = juldate_encode(calendar, vdateb[1], vtimeb[1]);
const double seconds = julianDateToSeconds(julianDateSub(juldate2, juldate1)) / 2;
const JulianDate juldatem = julianDateAddSeconds(lround(seconds), juldate1);
juldate_decode(calendar, juldatem, &vdate, &vtime);
julianDateDecode(calendar, juldatem, &vdate, &vtime);
}
}
else if (operatorID == SHIFTTIME)
......
......@@ -206,7 +206,7 @@ fill_gap(int ngaps, int ntsm[MAX_NTSM], int rangetsm[MAX_GAPS][2], int64_t vdate
juldate0 = julianDateAddSeconds(ijulinc, juldate0);
while (julianDateToSeconds(juldate0) < julianDateToSeconds(juldate))
{
juldate_decode(calendar, juldate0, &ndate, &ntime);
julianDateDecode(calendar, juldate0, &ndate, &ntime);
juldate0 = julianDateAddSeconds(ijulinc, juldate0);
if (its < MAX_NTSM)
{
......
......@@ -151,7 +151,7 @@ DateTimeList::taxisInqTimestep(int taxisID, int tsID)
if (vtime == 0 && julianDateToSeconds(juldate1) < julianDateToSeconds(juldate2))
{
JulianDate juldate = julianDateAddSeconds(-1, juldate2);
juldate_decode(calendar, juldate, &vdate, &vtime);
julianDateDecode(calendar, juldate, &vdate, &vtime);
this->dtinfo[tsID].c.date = vdate;
this->dtinfo[tsID].c.time = vtime;
......@@ -209,7 +209,7 @@ DateTimeList::mean(int nsteps)
}
juldate = julianDateAddSeconds(lround(seconds / nsteps), juldate0);
juldate_decode(calendar, juldate, &vdate, &vtime);
julianDateDecode(calendar, juldate, &vdate, &vtime);
#else
vdate = this->dtinfo[nsteps / 2 - 1].v.date;
vtime = this->dtinfo[nsteps / 2 - 1].v.time;
......@@ -221,7 +221,7 @@ DateTimeList::mean(int nsteps)
double seconds = julianDateToSeconds(julianDateSub(juldate2, juldate1)) / 2;
JulianDate juldatem = julianDateAddSeconds(lround(seconds), juldate1);
juldate_decode(calendar, juldatem, &vdate, &vtime);
julianDateDecode(calendar, juldatem, &vdate, &vtime);
#endif
}
else
......@@ -295,7 +295,7 @@ datetime_avg(int calendar, int ndates, CdoDateTime *datetime)
double seconds = julianDateToSeconds(julianDateSub(juldate2, juldate1)) / 2;
JulianDate juldatem = julianDateAddSeconds(lround(seconds), juldate1);
juldate_decode(calendar, juldatem, &vdate, &vtime);
julianDateDecode(calendar, juldatem, &vdate, &vtime);
}
else
{
......
......@@ -101,7 +101,7 @@ private:
};
JulianDate juldate_encode(int calendar, int64_t date, int time);
void juldate_decode(int calendar, const JulianDate &juldate, int64_t *date, int *time);
void julianDateDecode(int calendar, const JulianDate &juldate, int64_t *date, int *time);
JulianDate julianDateSub(const JulianDate &juldate2, const JulianDate &juldate1);
JulianDate julianDateAddSeconds(int64_t seconds, const JulianDate &juldate);
double julianDateToSeconds(const JulianDate &juldate);
......
......@@ -34,7 +34,7 @@ juldate_encode(int calendar, int64_t date, int time)
}
void
juldate_decode(int calendar, const JulianDate &juldate, int64_t *date, int *time)
julianDateDecode(int calendar, const JulianDate &juldate, int64_t *date, int *time)
{
int year, month, day, hour, minute, second;
decode_caldaysec(calendar, juldate.julday, juldate.secofday, &year, &month, &day, &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