Commit 6933cc4c authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

cdi_generate_vars: set level to level1 if zaxis bounds are available.

parent 6b38c8af
......@@ -3,6 +3,10 @@
* using CGRIBEX library version 1.9.5
* Version 1.9.9 released
2020-09-25 Uwe Schulzweida
* cdi_generate_vars: set level to level1 if zaxis bounds are available (removed level = (level1 + level2) / 2)
2020-09-21 Uwe Schulzweida
* Ignore netCDF attribute _NCProperties
......
......@@ -602,11 +602,12 @@ void cdi_generate_vars(stream_t *streamptr)
double *dlevels = (double *) Malloc(nlevels*sizeof(double));
/*
if ( lbounds && zaxistype != ZAXIS_HYBRID && zaxistype != ZAXIS_HYBRID_HALF )
for ( unsigned levelID = 0; levelID < nlevels; levelID++ )
dlevels[levelID] = (level_sf*levelTable[levelID].level1 +
level_sf*levelTable[levelID].level2)/2;
dlevels[levelID] = (level_sf*levelTable[levelID].level1 + level_sf*levelTable[levelID].level2) / 2.0;
else
*/
for ( unsigned levelID = 0; levelID < nlevels; levelID++ )
dlevels[levelID] = level_sf*levelTable[levelID].level1;
......@@ -645,11 +646,12 @@ void cdi_generate_vars(stream_t *streamptr)
if ( lsort )
{
/*
if ( lbounds && zaxistype != ZAXIS_HYBRID && zaxistype != ZAXIS_HYBRID_HALF )
for ( unsigned levelID = 0; levelID < nlevels; levelID++ )
dlevels[levelID] = (level_sf*levelTable[levelID].level1 +
level_sf*levelTable[levelID].level2)/2.;
dlevels[levelID] = (level_sf*levelTable[levelID].level1 + level_sf*levelTable[levelID].level2) / 2.0;
else
*/
for ( unsigned levelID = 0; levelID < nlevels; levelID++ )
dlevels[levelID] = level_sf*levelTable[levelID].level1;
}
......
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