Commit 9f24af4c authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

added warning for conversion of GRIB2 parameter ID to GRIB1

parent 7c115897
......@@ -812,6 +812,7 @@ enable_dependency_tracking
with_gnu_ld
with_sysroot
enable_libtool_lock
with_gnu_ld
enable_largefile
with_threads
with_zlib
......@@ -843,16 +844,25 @@ LDFLAGS
LIBS
CPPFLAGS
CPP
CPPFLAGS
FC
FCFLAGS
LDFLAGS
LIBS
FPP
FPPFLAGS
F77
FFLAGS
LDFLAGS
LIBS
CXX
CXXFLAGS
LDFLAGS
LIBS
CPPFLAGS
CCC
CXXCPP
CPPFLAGS
FCMODEXT'
 
 
......
......@@ -1462,20 +1462,18 @@ static
void cgribexDefParam(int *isec1, int param)
{
int pdis, pcat, pnum;
static int lwarn = TRUE;
cdiDecodeParam(param, &pnum, &pcat, &pdis);
if ( pdis != 255 && lwarn )
if ( pnum < 0 ) pnum = -pnum;
if ( pdis != 255 )
{
char paramstr[32];
cdiParamToString(param, paramstr, sizeof(paramstr));
Warning("Can not convert GRIB2 parameter (%s) to GRIB1!", paramstr);
lwarn = FALSE;
Warning("Can't convert GRIB2 parameter ID (%s) to GRIB1, set to %d.%d!", paramstr, pnum, pcat);
}
if ( pnum < 0 ) pnum = -pnum;
ISEC1_CodeTable = pcat;
ISEC1_Parameter = pnum;
}
......
......@@ -1906,14 +1906,11 @@ void gribapiDefParam(grib_handle *gh, int param, const char *name)
if ( editionNumber <= 1 )
{
static int lwarn = TRUE;
if ( pdis != 255 && lwarn )
if ( pdis != 255 )
{
char paramstr[32];
cdiParamToString(param, paramstr, sizeof(paramstr));
Warning("Can not convert GRIB2 parameter (%s) to GRIB1!", paramstr);
lwarn = FALSE;
Warning("Can't convert GRIB2 parameter ID (%s) to GRIB1, set to %d.%d!", paramstr, pnum, pcat);
}
GRIB_CHECK(grib_set_long(gh, "table2Version", pcat), 0);
......@@ -2365,7 +2362,7 @@ void gribapiDefGrid(grib_handle *gh, int gridID, int ljpeg, int lieee, int datat
if ( status != 0 && warning )
{
warning = 0;
Warning("Can not write reference grid!");
Warning("Can't write reference grid!");
Warning("gridDefinitionTemplateNumber %d not found (grib2/template.3.%d.def)!",
GRIB2_GTYPE_NUMBER, GRIB2_GTYPE_NUMBER);
}
......
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