@@ -408,6 +408,7 @@ int cdiIterator_nextField(CdiIterator *me); //Points the iterator at the ne
//All outXXX arguments to these functions may be NULL.
char*cdiIterator_inqStartTime(CdiIterator*me);//Returns the (start) time as an ISO-8601 coded string. The caller is responsible to Free() the returned string.
char*cdiIterator_inqEndTime(CdiIterator*me);//Returns the end time of an integration period as an ISO-8601 coded string, or NULL if there is no end time. The caller is responsible to Free() the returned string.
char*cdiIterator_inqRTime(CdiIterator*me);//Returns the reference date as an ISO-8601 coded string. The caller is responsible to Free() the returned string.
char*cdiIterator_inqVTime(CdiIterator*me);//Returns the validity date as an ISO-8601 coded string. The caller is responsible to Free() the returned string.
intcdiIterator_inqLevelType(CdiIterator*me,intlevelSelector,char**outName_optional,char**outLongName_optional,char**outStdName_optional,char**outUnit_optional);//callers are responsible to Free() strings that they request
intcdiIterator_inqLevel(CdiIterator*me,intlevelSelector,double*outValue1_optional,double*outValue2_optional);//outValue2 is only written to if the level is a hybrid level
voidgribGetLongArray(grib_handle*gribHandle,constchar*key,long*array);//The caller is responsible to ensure a sufficiently large buffer.
longgribEditionNumber(grib_handle*gh);
char*gribMakeTimeString(grib_handle*gh,boolgetEndTime);//For statistical fields, setting getEndTime produces the time of the end of the integration period, otherwise the time of the start of the integration period is returned. Returns NULL if getEndTime is set and the field does not have an integration period.
char*gribMakeTimeString(grib_handle*gh,CdiTimeTypetimeType);//Returns NULL if timeType is kCdiTimeType_endTime and the field does not have an integration period (statistical data).
if(getEndTime)returnNULL;//The stream interface does not export the start/end times of statistical fields, so we treat all data as point of time data, returning the validity time as the start time.
//retrieve the time information
inttaxisId=vlistInqTaxis(me->vlistId);
intdate=taxisInqVdate(taxisId);
inttime=taxisInqVtime(taxisId);
intdate=0,time=0;
switch(timeType)
{
casekCdiTimeType_referenceTime:
date=taxisInqRdate(taxisId);
time=taxisInqRtime(taxisId);
break;
casekCdiTimeType_startTime:
date=taxisInqVdate(taxisId);
time=taxisInqVtime(taxisId);
break;
casekCdiTimeType_endTime:
returnNULL;//The stream interface does not export the start/end times of statistical fields, so we treat all data as point of time data, returning the validity time as the start time.
default:
assert(0&&"internal error, please report this bug");
}
//decode the time information and reencode it into an ISO-compliant string