Commit 6a3bda76 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

gribapiGetEndStep: use stepUnits for timeunits2

parent c2bf3d7a
......@@ -4,6 +4,7 @@
2013-05-27 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* gribapiGetEndStep: use stepUnits for timeunits2
* grib2GetLevel: set level bounds if 0 < leveltype2 < 255
2013-05-23 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
......
......@@ -189,15 +189,14 @@ static
int gribapiGetEndStep(grib_handle *gh, int startStep, int timeunits)
{
int endStep = startStep;
int timeunits2;
int timeunits2 = timeunits;
int status;
long unitsOfTime;
long lpar;
// status = grib_get_long(gh, "stepUnits", &unitsOfTime);
// timeunits2 = getTimeunits(unitsOfTime);
timeunits2 = gribapiGetTimeUnits(gh);
status = grib_get_long(gh, "stepUnits", &unitsOfTime);
if ( status == 0 ) timeunits2 = getTimeunits(unitsOfTime);
//timeunits2 = gribapiGetTimeUnits(gh);
status = grib_get_long(gh, "endStep", &lpar);
......@@ -328,8 +327,9 @@ int gribapiGetValidityDateTime(grib_handle *gh, int *vdate, int *vtime)
static int lprint = TRUE;
extern int grib_calendar;
int ryear, rmonth, rday, rhour, rminute, rsecond;
int time_period = endStep;
int julday, secofday, addsec;
int julday, secofday;
int64_t time_period = endStep;
int64_t addsec;
cdiDecodeDate(rdate, &ryear, &rmonth, &rday);
cdiDecodeTime(rtime, &rhour, &rminute, &rsecond);
......
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