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

Added support for GRIB level type 210.

parent 32608fda
......@@ -941,8 +941,8 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
@ENABLE_CDI_LIB_FALSE@install-exec-local:
@ENABLE_CDI_LIB_FALSE@uninstall-local:
@ENABLE_CDI_LIB_FALSE@install-exec-local:
clean: clean-am
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
......
......@@ -660,8 +660,8 @@ int cgribexScanTimestep1(stream_t * streamptr)
param = cdiEncodeParam(ISEC1_Parameter, ISEC1_CodeTable, 255);
cdiParamToString(param, paramstr, sizeof(paramstr));
if ( ISEC1_LevelType == 100 ) ISEC1_Level1 *= 100;
if ( ISEC1_LevelType == 99 ) ISEC1_LevelType = 100;
if ( ISEC1_LevelType == GRIB1_LTYPE_ISOBARIC ) ISEC1_Level1 *= 100;
if ( ISEC1_LevelType == GRIB1_LTYPE_99 || ISEC1_LevelType == GRIB1_LTYPE_ISOBARIC_PA ) ISEC1_LevelType = GRIB1_LTYPE_ISOBARIC;
level1 = ISEC1_Level1;
level2 = ISEC1_Level2;
......@@ -882,8 +882,8 @@ int cgribexScanTimestep2(stream_t * streamptr)
param = cdiEncodeParam(ISEC1_Parameter, ISEC1_CodeTable, 255);
cdiParamToString(param, paramstr, sizeof(paramstr));
if ( ISEC1_LevelType == 100 ) ISEC1_Level1 *= 100;
if ( ISEC1_LevelType == 99 ) ISEC1_LevelType = 100;
if ( ISEC1_LevelType == GRIB1_LTYPE_ISOBARIC ) ISEC1_Level1 *= 100;
if ( ISEC1_LevelType == GRIB1_LTYPE_99 || ISEC1_LevelType == GRIB1_LTYPE_ISOBARIC_PA ) ISEC1_LevelType = GRIB1_LTYPE_ISOBARIC;
level1 = ISEC1_Level1;
level2 = ISEC1_Level2;
......@@ -1135,10 +1135,10 @@ int cgribexScanTimestep(stream_t * streamptr)
param = cdiEncodeParam(ISEC1_Parameter, ISEC1_CodeTable, 255);
cdiParamToString(param, paramstr, sizeof(paramstr));
if ( ISEC1_LevelType == 100 ) ISEC1_Level1 *= 100;
if ( ISEC1_LevelType == 99 ) ISEC1_LevelType = 100;
level1 = ISEC1_Level1;
level2 = ISEC1_Level2;
if ( ISEC1_LevelType == GRIB1_LTYPE_ISOBARIC ) ISEC1_Level1 *= 100;
if ( ISEC1_LevelType == GRIB1_LTYPE_99 || ISEC1_LevelType == GRIB1_LTYPE_ISOBARIC_PA ) ISEC1_LevelType = GRIB1_LTYPE_ISOBARIC;
level1 = ISEC1_Level1;
level2 = ISEC1_Level2;
gribDateTime(isec1, &vdate, &vtime);
......
......@@ -276,9 +276,9 @@ void grib1GetLevel(grib_handle *gh, int *leveltype, int *lbounds, int *level1, i
{
double dlevel;
GRIB_CHECK(grib_get_double(gh, "level", &dlevel), 0); //2 byte
if ( *leveltype == 100 ) dlevel *= 100;
if ( *leveltype == GRIB1_LTYPE_ISOBARIC ) dlevel *= 100;
if ( dlevel < -2.e9 || dlevel > 2.e9 ) dlevel = 0;
if ( *leveltype == GRIB1_LTYPE_99 || *leveltype == GRIB1_LTYPE_ISOBARIC_PA ) *leveltype = 100;
if ( *leveltype == GRIB1_LTYPE_99 || *leveltype == GRIB1_LTYPE_ISOBARIC_PA ) *leveltype = GRIB1_LTYPE_ISOBARIC;
*level1 = (int) dlevel;
*level2 = 0;
......
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