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

grib2GetLevel: set level bounds if 0 < leveltype2 < 255

parent b7c29e8a
......@@ -2,6 +2,10 @@
* Version 1.6.1 released
2013-05-27 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* grib2GetLevel: set level bounds if 0 < leveltype2 < 255
2013-05-23 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* netCDF: missing_value attribute removed [Bug #3592]
......
......@@ -72,7 +72,7 @@ int main(void)
vlistDefTaxis(vlistID, taxisID);
// Create a dataset in netCDF format
streamID = streamOpenWrite("example.grb2", FILETYPE_GRB2);
streamID = streamOpenWrite("example.nc", FILETYPE_NC);
if ( streamID < 0 )
{
fprintf(stderr, "%s\n", cdiStringError(streamID));
......
......@@ -724,7 +724,7 @@ void grib2GetLevel(grib_handle *gh, int *leveltype, int *lbounds, int *level1, i
status = grib_get_long(gh, "typeOfSecondFixedSurface", &lpar);
if ( status == 0 ) leveltype2 = lpar;
if ( *leveltype == leveltype2 && *leveltype != 255 ) *lbounds = 1;
if ( *leveltype != 255 && *leveltype2 != 255 && *leveltype2 > 0 ) *lbounds = 1;
if ( *lbounds == 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