Commit 11c945b4 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

added support for GRIB1_LTYPE_SIGMA_LAYER

parent 40780360
2011-11-04 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* added support for GRIB1_LTYPE_SIGMA_LAYER
2011-11-01 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* added support for netcdf attribute valid_min/valid_max [request: Etienne Tourigny]
......
......@@ -401,7 +401,7 @@ void printShortinfo(int streamID, int vlistID, int vardis)
{
double level1, level2;
nbyte = nbyte0;
nbyte0 = fprintf(stdout, "%32s : ", "bounds");
nbyte0 = fprintf(stdout, "%33s : ", "bounds");
for ( levelID = 0; levelID < levelsize; levelID++ )
{
if ( nbyte > 80 )
......
......@@ -76,6 +76,7 @@ int cgribexGetZaxisHasBounds(int grb_ltype)
switch (grb_ltype)
{
case GRIB1_LTYPE_SIGMA_LAYER:
case GRIB1_LTYPE_HYBRID_LAYER:
case GRIB1_LTYPE_LANDDEPTH_LAYER:
{
......@@ -2039,12 +2040,21 @@ void cgribexDefLevel(int *isec1, int *isec2, double *fsec2, int zaxisID, int lev
}
case ZAXIS_SIGMA:
{
level = zaxisInqLevel(zaxisID, levelID);
if ( zaxisInqLbounds(zaxisID, NULL) && zaxisInqUbounds(zaxisID, NULL) )
{
ISEC1_LevelType = GRIB1_LTYPE_SIGMA_LAYER;
ISEC1_Level1 = (int) zaxisInqLbound(zaxisID, levelID);
ISEC1_Level2 = (int) zaxisInqUbound(zaxisID, levelID);
}
else
{
level = zaxisInqLevel(zaxisID, levelID);
ilevel = (int) level;
ISEC1_LevelType = GRIB1_LTYPE_SIGMA;
ISEC1_Level1 = ilevel;
ISEC1_Level2 = 0;
ilevel = (int) level;
ISEC1_LevelType = GRIB1_LTYPE_SIGMA;
ISEC1_Level1 = ilevel;
ISEC1_Level2 = 0;
}
break;
}
......
......@@ -23,7 +23,7 @@ int grib1ltypeToZaxisType(int grib_ltype)
switch ( grib_ltype )
{
case GRIB1_LTYPE_SURFACE: { zaxistype = ZAXIS_SURFACE; break; }
case GRIB1_LTYPE_TOA: { zaxistype = ZAXIS_TOA; break; }
case GRIB1_LTYPE_TOA: { zaxistype = ZAXIS_TOA; break; }
case GRIB1_LTYPE_SEA_BOTTOM: { zaxistype = ZAXIS_SEA_BOTTOM; break; }
case GRIB1_LTYPE_ATMOSPHERE: { zaxistype = ZAXIS_ATMOSPHERE; break; }
case GRIB1_LTYPE_MEANSEA: { zaxistype = ZAXIS_MEANSEA; break; }
......@@ -31,7 +31,8 @@ int grib1ltypeToZaxisType(int grib_ltype)
case GRIB1_LTYPE_ISOBARIC: { zaxistype = ZAXIS_PRESSURE; break; }
case GRIB1_LTYPE_HEIGHT: { zaxistype = ZAXIS_HEIGHT; break; }
case GRIB1_LTYPE_ALTITUDE: { zaxistype = ZAXIS_ALTITUDE; break; }
case GRIB1_LTYPE_SIGMA: { zaxistype = ZAXIS_SIGMA; break; }
case GRIB1_LTYPE_SIGMA:
case GRIB1_LTYPE_SIGMA_LAYER: { zaxistype = ZAXIS_SIGMA; break; }
case GRIB1_LTYPE_HYBRID:
case GRIB1_LTYPE_HYBRID_LAYER: { zaxistype = ZAXIS_HYBRID; break; }
case GRIB1_LTYPE_LANDDEPTH:
......@@ -51,7 +52,7 @@ int grib2ltypeToZaxisType(int grib_ltype)
switch ( grib_ltype )
{
case GRIB2_LTYPE_SURFACE: { zaxistype = ZAXIS_SURFACE; break; }
case GRIB2_LTYPE_TOA: { zaxistype = ZAXIS_TOA; break; }
case GRIB2_LTYPE_TOA: { zaxistype = ZAXIS_TOA; break; }
case GRIB2_LTYPE_SEA_BOTTOM: { zaxistype = ZAXIS_SEA_BOTTOM; break; }
case GRIB2_LTYPE_ATMOSPHERE: { zaxistype = ZAXIS_ATMOSPHERE; break; }
case GRIB2_LTYPE_MEANSEA: { zaxistype = ZAXIS_MEANSEA; break; }
......
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