Commit 04d62998 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Added support for zaxis type ZAXIS_TROPOPAUSE.

parent cd94e438
......@@ -3,6 +3,10 @@
* using CGRIBEX library version 1.9.5
* Version 1.9.9 released
2020-08-27 Uwe Schulzweida
* Added support for zaxis type ZAXIS_TROPOPAUSE
2020-08-25 Uwe Schulzweida
* Added support for szip compression with NetCDF 4.7.4
......
......@@ -311,6 +311,7 @@ void set_zaxistype(const char *attstring, int *zaxistype)
{
// clang-format off
if ( strcmp(attstring, "toa") == 0 ) *zaxistype = ZAXIS_TOA;
else if ( strcmp(attstring, "tropopause") == 0 ) *zaxistype = ZAXIS_TROPOPAUSE;
else if ( strcmp(attstring, "cloudbase") == 0 ) *zaxistype = ZAXIS_CLOUD_BASE;
else if ( strcmp(attstring, "cloudtop") == 0 ) *zaxistype = ZAXIS_CLOUD_TOP;
else if ( strcmp(attstring, "isotherm0") == 0 ) *zaxistype = ZAXIS_ISOTHERM_ZERO;
......
......@@ -180,6 +180,7 @@ extern "C" {
#define ZAXIS_MIX_LAYER 24 // Mixing Layer
#define ZAXIS_REFERENCE 25 // zaxis reference number
#define ZAXIS_CHAR 26 // Area types
#define ZAXIS_TROPOPAUSE 27 // Tropopause
// SUBTYPE types
......
......@@ -12,6 +12,7 @@
#define GRIB1_LTYPE_CLOUD_BASE 2
#define GRIB1_LTYPE_CLOUD_TOP 3
#define GRIB1_LTYPE_ISOTHERM0 4
#define GRIB1_LTYPE_TROPOPAUSE 7
#define GRIB1_LTYPE_TOA 8
#define GRIB1_LTYPE_SEA_BOTTOM 9
#define GRIB1_LTYPE_ATMOSPHERE 10
......
......@@ -14,11 +14,12 @@
#define GRIBAPI_MISSVAL -9.E33
/* GRIB2 Level Types */
// GRIB2 Level Types
#define GRIB2_LTYPE_SURFACE 1
#define GRIB2_LTYPE_CLOUD_BASE 2
#define GRIB2_LTYPE_CLOUD_TOP 3
#define GRIB2_LTYPE_ISOTHERM0 4
#define GRIB2_LTYPE_TROPOPAUSE 7
#define GRIB2_LTYPE_TOA 8
#define GRIB2_LTYPE_SEA_BOTTOM 9
#define GRIB2_LTYPE_ATMOSPHERE 10
......
......@@ -1486,6 +1486,7 @@ void cdfDefZaxis(stream_t *streamptr, int zaxisID)
case ZAXIS_CLOUD_BASE:
case ZAXIS_CLOUD_TOP:
case ZAXIS_ISOTHERM_ZERO:
case ZAXIS_TROPOPAUSE:
case ZAXIS_TOA:
case ZAXIS_SEA_BOTTOM:
case ZAXIS_ATMOSPHERE:
......
......@@ -1863,6 +1863,7 @@ void cgribexDefLevel(int *isec1, int *isec2, double *fsec2, int zaxisID, int lev
case ZAXIS_CLOUD_BASE:
case ZAXIS_CLOUD_TOP:
case ZAXIS_ISOTHERM_ZERO:
case ZAXIS_TROPOPAUSE:
case ZAXIS_TOA:
case ZAXIS_SEA_BOTTOM:
case ZAXIS_ATMOSPHERE:
......
......@@ -83,6 +83,7 @@ int grib1ltypeToZaxisType(int grib_ltype)
case GRIB1_LTYPE_CLOUD_BASE: zaxistype = ZAXIS_CLOUD_BASE; break;
case GRIB1_LTYPE_CLOUD_TOP: zaxistype = ZAXIS_CLOUD_TOP; break;
case GRIB1_LTYPE_ISOTHERM0: zaxistype = ZAXIS_ISOTHERM_ZERO; break;
case GRIB1_LTYPE_TROPOPAUSE: zaxistype = ZAXIS_TROPOPAUSE; 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;
......@@ -121,6 +122,7 @@ int grib2ltypeToZaxisType(int grib_ltype)
case GRIB2_LTYPE_CLOUD_BASE: zaxistype = ZAXIS_CLOUD_BASE; break;
case GRIB2_LTYPE_CLOUD_TOP: zaxistype = ZAXIS_CLOUD_TOP; break;
case GRIB2_LTYPE_ISOTHERM0: zaxistype = ZAXIS_ISOTHERM_ZERO; break;
case GRIB2_LTYPE_TROPOPAUSE: zaxistype = ZAXIS_TROPOPAUSE; 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;
......@@ -167,6 +169,7 @@ int zaxisTypeToGrib1ltype(int zaxistype)
case ZAXIS_ALTITUDE: grib_ltype = GRIB1_LTYPE_ALTITUDE; break;
case ZAXIS_SIGMA: grib_ltype = GRIB1_LTYPE_SIGMA; break;
case ZAXIS_MEANSEA: grib_ltype = GRIB1_LTYPE_MEANSEA; break;
case ZAXIS_TROPOPAUSE: grib_ltype = GRIB1_LTYPE_TROPOPAUSE; break;
case ZAXIS_TOA: grib_ltype = GRIB1_LTYPE_TOA; break;
case ZAXIS_SEA_BOTTOM: grib_ltype = GRIB1_LTYPE_SEA_BOTTOM; break;
case ZAXIS_ATMOSPHERE: grib_ltype = GRIB1_LTYPE_ATMOSPHERE; break;
......@@ -205,6 +208,7 @@ int zaxisTypeToGrib2ltype(int zaxistype)
case ZAXIS_ALTITUDE: grib_ltype = GRIB2_LTYPE_ALTITUDE; break;
case ZAXIS_SIGMA: grib_ltype = GRIB2_LTYPE_SIGMA; break;
case ZAXIS_MEANSEA: grib_ltype = GRIB2_LTYPE_MEANSEA; break;
case ZAXIS_TROPOPAUSE: grib_ltype = GRIB2_LTYPE_TROPOPAUSE; break;
case ZAXIS_TOA: grib_ltype = GRIB2_LTYPE_TOA; break;
case ZAXIS_SEA_BOTTOM: grib_ltype = GRIB2_LTYPE_SEA_BOTTOM; break;
case ZAXIS_ATMOSPHERE: grib_ltype = GRIB2_LTYPE_ATMOSPHERE; break;
......
......@@ -2436,6 +2436,7 @@ void gribapiDefLevel(int editionNumber, grib_handle *gh, int zaxisID, int levelI
case ZAXIS_CLOUD_BASE:
case ZAXIS_CLOUD_TOP:
case ZAXIS_ISOTHERM_ZERO:
case ZAXIS_TROPOPAUSE:
case ZAXIS_TOA:
case ZAXIS_SEA_BOTTOM:
case ZAXIS_LAKE_BOTTOM:
......
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