Commit 768239b9 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Added support for GRIB level type 210.

parent c838d7d0
......@@ -3,6 +3,10 @@
* using CGRIBEX library version 1.7.6
* Version 1.8.0 released
2016-12-20 Uwe Schulzweida
* Added support for GRIB level type 210
2016-11-24 Uwe Schulzweida
* Version 1.8.0rc5 released
......
......@@ -1923,7 +1923,7 @@ void cgribexDefLevel(int *isec1, int *isec2, double *fsec2, int zaxisID, int lev
double dum;
if ( level < 32768 && (level < 100 || modf(level/100, &dum) > 0) )
grib_ltype = GRIB1_LTYPE_99;
grib_ltype = GRIB1_LTYPE_ISOBARIC_PA;
else
level = level/100;
......
......@@ -27,6 +27,7 @@ int grib1ltypeToZaxisType(int grib_ltype)
case GRIB1_LTYPE_ATMOSPHERE: zaxistype = ZAXIS_ATMOSPHERE; break;
case GRIB1_LTYPE_MEANSEA: zaxistype = ZAXIS_MEANSEA; break;
case GRIB1_LTYPE_99:
case GRIB1_LTYPE_ISOBARIC_PA:
case GRIB1_LTYPE_ISOBARIC: zaxistype = ZAXIS_PRESSURE; break;
case GRIB1_LTYPE_HEIGHT: zaxistype = ZAXIS_HEIGHT; break;
case GRIB1_LTYPE_ALTITUDE: zaxistype = ZAXIS_ALTITUDE; break;
......
......@@ -278,7 +278,7 @@ void grib1GetLevel(grib_handle *gh, int *leveltype, int *lbounds, int *level1, i
GRIB_CHECK(grib_get_double(gh, "level", &dlevel), 0); //2 byte
if ( *leveltype == 100 ) dlevel *= 100;
if ( dlevel < -2.e9 || dlevel > 2.e9 ) dlevel = 0;
if ( *leveltype == GRIB1_LTYPE_99 ) *leveltype = 100;
if ( *leveltype == GRIB1_LTYPE_99 || *leveltype == GRIB1_LTYPE_ISOBARIC_PA ) *leveltype = 100;
*level1 = (int) dlevel;
*level2 = 0;
......@@ -2449,7 +2449,7 @@ void gribapiDefLevel(int editionNumber, grib_handle *gh, int zaxisID, int levelI
{
double dum;
if ( level < 32768 && (level < 100 || modf(level/100, &dum) > 0) )
grib_ltype = GRIB1_LTYPE_99;
grib_ltype = GRIB1_LTYPE_ISOBARIC_PA;
else
level /= 100;
......
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