Commit 9905dbd5 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

grib cleanup

parent 51d2d020
......@@ -2161,15 +2161,9 @@ void cgribexDefaultSec1(int *isec1)
static
void cgribexDefaultSec4(int *isec4)
{
isec4[2] = 0;
isec4[3] = 0;
isec4[4] = 0;
isec4[5] = 0;
isec4[6] = 0;
isec4[7] = 0;
isec4[8] = 0;
isec4[9] = 0;
isec4[10] = 0;
long i;
for ( i = 2; i <= 10; ++i ) isec4[i] = 0;
}
#endif
......
......@@ -189,15 +189,17 @@ int gribapiGetTimeUnits(grib_handle *gh)
GRIB_CHECK(grib_get_string(gh, "stepUnits", stepunits, &len), 0);
if ( memcmp(stepunits, "s", len-1) == 0 ) timeunits = TUNIT_SECOND;
else if ( memcmp(stepunits, "m", len-1) == 0 ) timeunits = TUNIT_MINUTE;
else if ( memcmp(stepunits, "h", len-1) == 0 ) timeunits = TUNIT_HOUR;
else if ( memcmp(stepunits, "3h", len-1) == 0 ) timeunits = TUNIT_3HOURS;
else if ( memcmp(stepunits, "6h", len-1) == 0 ) timeunits = TUNIT_6HOURS;
else if ( memcmp(stepunits, "12h", len-1) == 0 ) timeunits = TUNIT_12HOURS;
else if ( memcmp(stepunits, "D", len-1) == 0 ) timeunits = TUNIT_DAY;
else if ( memcmp(stepunits, "M", len-1) == 0 ) timeunits = TUNIT_MONTH;
else if ( memcmp(stepunits, "Y", len-1) == 0 ) timeunits = TUNIT_YEAR;
len--;
if ( memcmp(stepunits, "s", len) == 0 ) timeunits = TUNIT_SECOND;
else if ( memcmp(stepunits, "m", len) == 0 ) timeunits = TUNIT_MINUTE;
else if ( memcmp(stepunits, "h", len) == 0 ) timeunits = TUNIT_HOUR;
else if ( memcmp(stepunits, "3h", len) == 0 ) timeunits = TUNIT_3HOURS;
else if ( memcmp(stepunits, "6h", len) == 0 ) timeunits = TUNIT_6HOURS;
else if ( memcmp(stepunits, "12h", len) == 0 ) timeunits = TUNIT_12HOURS;
else if ( memcmp(stepunits, "D", len) == 0 ) timeunits = TUNIT_DAY;
else if ( memcmp(stepunits, "M", len) == 0 ) timeunits = TUNIT_MONTH;
else if ( memcmp(stepunits, "Y", len) == 0 ) timeunits = TUNIT_YEAR;
else if ( lprint )
{
Message("Step units >%s< unsupported!", stepunits);
......
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