Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
20edaec7
Commit
20edaec7
authored
Aug 12, 2013
by
Uwe Schulzweida
Browse files
added support for GRIB2 level type: 162, 163, 164, 165, 166 [Feature #3254]
parent
ee859ec4
Changes
19
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
20edaec7
...
...
@@ -3,6 +3,14 @@
* Version 1.6.2 released
* using CGRIBEX library version 1.6.2
2013-08-12 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* GRIB2: added support for level type Lake Bottom (grib level type 162)
* GRIB2: added support for level type Bottom Of Sediment Layer (grib level type 163)
* GRIB2: added support for level type Bottom Of Thermally Active Sediment Layer (grib level type 164)
* GRIB2: added support for level type Bottom Of Sediment Layer Penetrated By Thermal Wave (grib level type 165)
* GRIB2: added support for level type Mixing Layer (grib level type 166)
2013-08-09 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* gribapiGetValidityDateTime: check timeRangeIndicator for editionNumber =1 (bug fix)
...
...
NEWS
View file @
20edaec7
...
...
@@ -3,6 +3,12 @@ CDI NEWS
Version 1.6.2 (26 September 2013):
New features:
* GRIB2: added support for level type Lake Bottom (grib level type 162)
* GRIB2: added support for level type Bottom Of Sediment Layer (grib level type 163)
* GRIB2: added support for level type Bottom Of Thermally Active Sediment Layer (grib level type 164)
* GRIB2: added support for level type Bottom Of Sediment Layer Penetrated By Thermal Wave (grib level type 165)
* GRIB2: added support for level type Mixing Layer (grib level type 166)
Fixed bugs:
* netCDF: wrong result if type of data and type of attribute valid_range differ [Bug #3727]
...
...
doc/tex/c_zaxis.tex
View file @
20edaec7
...
...
@@ -21,6 +21,8 @@ The type of the Z-axis, one of the set of predefined {\CDI} Z-axis types.
{
\tt
ZAXIS
\_
ISENTROPIC
}
,
{
\tt
ZAXIS
\_
ALTITUDE
}
,
{
\tt
ZAXIS
\_
MEANSEA
}
,
{
\tt
ZAXIS
\_
TOA
}
,
{
\tt
ZAXIS
\_
SEA
\_
BOTTOM
}
,
{
\tt
ZAXIS
\_
ATMOSPHERE
}
,
{
\tt
ZAXIS
\_
CLOUD
\_
BASE
}
,
{
\tt
ZAXIS
\_
CLOUD
\_
TOP
}
,
{
\tt
ZAXIS
\_
ISOTHERM
\_
ZERO
}
,
{
\tt
ZAXIS
\_
SNOW
}
,
{
\tt
ZAXIS
\_
LAKE
\_
BOTTOM
}
,
{
\tt
ZAXIS
\_
SEDIMENT
\_
BOTTOM
}
,
{
\tt
ZAXIS
\_
SEDIMENT
\_
BOTTOM
\_
TA
}
,
{
\tt
ZAXIS
\_
SEDIMENT
\_
BOTTOM
\_
TW
}
,
{
\tt
ZAXIS
\_
MIX
\_
LAYER
}
,
{
\tt
ZAXIS
\_
DEPTH
\_
BELOW
\_
SEA
}
and
{
\tt
ZAXIS
\_
DEPTH
\_
BELOW
\_
LAND
}
.
\item
[{\tt size}]
Number of levels.
...
...
@@ -99,6 +101,8 @@ The valid {\CDI} Z-axis types are {\tt ZAXIS\_GENERIC}, {\tt ZAXIS\_SURFACE},
{
\tt
ZAXIS
\_
ISENTROPIC
}
,
{
\tt
ZAXIS
\_
ALTITUDE
}
,
{
\tt
ZAXIS
\_
MEANSEA
}
,
{
\tt
ZAXIS
\_
TOA
}
,
{
\tt
ZAXIS
\_
SEA
\_
BOTTOM
}
,
{
\tt
ZAXIS
\_
ATMOSPHERE
}
,
{
\tt
ZAXIS
\_
CLOUD
\_
BASE
}
,
{
\tt
ZAXIS
\_
CLOUD
\_
TOP
}
,
{
\tt
ZAXIS
\_
ISOTHERM
\_
ZERO
}
,
{
\tt
ZAXIS
\_
SNOW
}
,
{
\tt
ZAXIS
\_
LAKE
\_
BOTTOM
}
,
{
\tt
ZAXIS
\_
SEDIMENT
\_
BOTTOM
}
,
{
\tt
ZAXIS
\_
SEDIMENT
\_
BOTTOM
\_
TA
}
,
{
\tt
ZAXIS
\_
SEDIMENT
\_
BOTTOM
\_
TW
}
,
{
\tt
ZAXIS
\_
MIX
\_
LAYER
}
,
{
\tt
ZAXIS
\_
DEPTH
\_
BELOW
\_
SEA
}
and
{
\tt
ZAXIS
\_
DEPTH
\_
BELOW
\_
LAND
}
.
...
...
doc/tex/cdi_cman.tex
View file @
20edaec7
...
...
@@ -135,7 +135,7 @@
\end{picture}
\begin{flushright}
\large\bf
{
Climate Data Interface
\\
Version 1.6.
0
\\
March
2013
}
\large\bf
{
Climate Data Interface
\\
Version 1.6.
2
\\
September
2013
}
\end{flushright}
\vfill
...
...
doc/tex/cdi_fman.tex
View file @
20edaec7
...
...
@@ -132,7 +132,7 @@
\end{picture}
\begin{flushright}
\large\bf
{
Climate Data Interface
\\
Version 1.6.
0
\\
March
2013
}
\large\bf
{
Climate Data Interface
\\
Version 1.6.
2
\\
September
2013
}
\end{flushright}
\vfill
...
...
doc/tex/f_zaxis.tex
View file @
20edaec7
...
...
@@ -21,6 +21,8 @@ The type of the Z-axis, one of the set of predefined {\CDI} Z-axis types.
{
\tt
ZAXIS
\_
ISENTROPIC
}
,
{
\tt
ZAXIS
\_
ALTITUDE
}
,
{
\tt
ZAXIS
\_
MEANSEA
}
,
{
\tt
ZAXIS
\_
TOA
}
,
{
\tt
ZAXIS
\_
SEA
\_
BOTTOM
}
,
{
\tt
ZAXIS
\_
ATMOSPHERE
}
,
{
\tt
ZAXIS
\_
CLOUD
\_
BASE
}
,
{
\tt
ZAXIS
\_
CLOUD
\_
TOP
}
,
{
\tt
ZAXIS
\_
ISOTHERM
\_
ZERO
}
,
{
\tt
ZAXIS
\_
SNOW
}
,
{
\tt
ZAXIS
\_
LAKE
\_
BOTTOM
}
,
{
\tt
ZAXIS
\_
SEDIMENT
\_
BOTTOM
}
,
{
\tt
ZAXIS
\_
SEDIMENT
\_
BOTTOM
\_
TA
}
,
{
\tt
ZAXIS
\_
SEDIMENT
\_
BOTTOM
\_
TW
}
,
{
\tt
ZAXIS
\_
MIX
\_
LAYER
}
,
{
\tt
ZAXIS
\_
DEPTH
\_
BELOW
\_
SEA
}
and
{
\tt
ZAXIS
\_
DEPTH
\_
BELOW
\_
LAND
}
.
\item
[{\tt size}]
Number of levels.
...
...
@@ -99,6 +101,8 @@ The valid {\CDI} Z-axis types are {\tt ZAXIS\_GENERIC}, {\tt ZAXIS\_SURFACE},
{
\tt
ZAXIS
\_
ISENTROPIC
}
,
{
\tt
ZAXIS
\_
ALTITUDE
}
,
{
\tt
ZAXIS
\_
MEANSEA
}
,
{
\tt
ZAXIS
\_
TOA
}
,
{
\tt
ZAXIS
\_
SEA
\_
BOTTOM
}
,
{
\tt
ZAXIS
\_
ATMOSPHERE
}
,
{
\tt
ZAXIS
\_
CLOUD
\_
BASE
}
,
{
\tt
ZAXIS
\_
CLOUD
\_
TOP
}
,
{
\tt
ZAXIS
\_
ISOTHERM
\_
ZERO
}
,
{
\tt
ZAXIS
\_
SNOW
}
,
{
\tt
ZAXIS
\_
LAKE
\_
BOTTOM
}
,
{
\tt
ZAXIS
\_
SEDIMENT
\_
BOTTOM
}
,
{
\tt
ZAXIS
\_
SEDIMENT
\_
BOTTOM
\_
TA
}
,
{
\tt
ZAXIS
\_
SEDIMENT
\_
BOTTOM
\_
TW
}
,
{
\tt
ZAXIS
\_
MIX
\_
LAYER
}
,
{
\tt
ZAXIS
\_
DEPTH
\_
BELOW
\_
SEA
}
and
{
\tt
ZAXIS
\_
DEPTH
\_
BELOW
\_
LAND
}
.
...
...
doc/tex/formats.tex
View file @
20edaec7
...
...
@@ -70,6 +70,12 @@ GRIB1 & GRIB2 & & \\
113
&
107
&
theta
&
Isentropic (theta) level
\\
--
&
114
&
--
&
Snow level
\\
160
&
160
&
depthBelowSea
&
Depth below sea level
\\
162
&
162
&
--
&
Lake or River Bottom
\\
163
&
163
&
--
&
Bottom Of Sediment Layer
\\
164
&
164
&
--
&
Bottom Of Thermally Active Sediment Layer
\\
165
&
165
&
--
&
Bottom Of Sediment Layer Penetrated By
\\
&
&
&
Thermal Wave
\\
166
&
166
&
--
&
Mixing Layer
\\
\hline
\end{tabular}
...
...
doc/tex/zaxis.tex
View file @
20edaec7
...
...
@@ -5,7 +5,7 @@ The following different Z-axis types are available:
\vspace*
{
3mm
}
\hspace*
{
8mm
}
\begin{minipage}
{
15cm
}
\begin{deflist}
{{
\large\tt
ZAXIS
\_
DEPTH
\_
BELOW
\_
LAND
\ \
}}
\begin{deflist}
{{
\large\tt
ZAXIS
\_
SEDIMENT
\_
BOTTOM
\_
TW
\ \
}}
\item
[{\large\tt ZAXIS\_GENERIC }]
Generic user defined level
\item
[{\large\tt ZAXIS\_SURFACE }]
Surface level
\item
[{\large\tt ZAXIS\_MEANSEA }]
Mean sea level
...
...
@@ -22,6 +22,11 @@ The following different Z-axis types are available:
\item
[{\large\tt ZAXIS\_CLOUD\_TOP }]
Level of cloud tops
\item
[{\large\tt ZAXIS\_ISOTHERM\_ZERO }]
Level of 0
$^{
\circ
}$
C isotherm
\item
[{\large\tt ZAXIS\_SNOW }]
Snow level
\item
[{\large\tt ZAXIS\_LAKE\_BOTTOM }]
Lake or River Bottom
\item
[{\large\tt ZAXIS\_SEDIMENT\_BOTTOM }]
Bottom Of Sediment Layer
\item
[{\large\tt ZAXIS\_SEDIMENT\_BOTTOM\_TA}]
Bottom Of Thermally Active Sediment Layer
\item
[{\large\tt ZAXIS\_SEDIMENT\_BOTTOM\_TW}]
Bottom Of Sediment Layer Penetrated By Thermal Wave
\item
[{\large\tt ZAXIS\_ZAXIS\_MIX\_LAYER }]
Mixing Layer
\item
[{\large\tt ZAXIS\_DEPTH\_BELOW\_SEA }]
Depth below sea level in meters
\item
[{\large\tt ZAXIS\_DEPTH\_BELOW\_LAND}]
Depth below land surface in centimeters
\end{deflist}
...
...
src/cdi.h
View file @
20edaec7
...
...
@@ -114,57 +114,62 @@ extern "C" {
/* Chunks */
#define CHUNK_AUTO 1
/* use default chunk size */
#define CHUNK_GRID 2
#define CHUNK_LINES 3
#define CHUNK_AUTO
1
/* use default chunk size
*/
#define CHUNK_GRID
2
#define CHUNK_LINES
3
/* GRID types */
#define GRID_GENERIC 1
/* Generic grid */
#define GRID_GAUSSIAN 2
/* Regular Gaussian lon/lat grid */
#define GRID_GAUSSIAN_REDUCED 3
/* Reduced Gaussian lon/lat grid */
#define GRID_LONLAT 4
/* Regular longitude/latitude grid */
#define GRID_SPECTRAL 5
/* Spherical harmonic coefficients */
#define GRID_FOURIER 6
/* Fourier coefficients */
#define GRID_GME 7
/* Icosahedral-hexagonal GME grid */
#define GRID_TRAJECTORY 8
/* Trajectory */
#define GRID_UNSTRUCTURED 9
/* General unstructured grid */
#define GRID_CURVILINEAR 10
/* Curvilinear grid */
#define GRID_LCC 11
/* Lambert Conformal Conic (GRIB) */
#define GRID_LCC2 12
/* Lambert Conformal Conic (PROJ) */
#define GRID_LAEA 13
/* Lambert Azimuthal Equal Area */
#define GRID_SINUSOIDAL 14
/* Sinusoidal */
#define GRID_REFERENCE 15
/* Grid reference number */
#define GRID_PROJECTION 16
/* Projected coordiantes */
#define GRID_GENERIC
1
/* Generic grid
*/
#define GRID_GAUSSIAN
2
/* Regular Gaussian lon/lat grid
*/
#define GRID_GAUSSIAN_REDUCED
3
/* Reduced Gaussian lon/lat grid
*/
#define GRID_LONLAT
4
/* Regular longitude/latitude grid
*/
#define GRID_SPECTRAL
5
/* Spherical harmonic coefficients
*/
#define GRID_FOURIER
6
/* Fourier coefficients
*/
#define GRID_GME
7
/* Icosahedral-hexagonal GME grid
*/
#define GRID_TRAJECTORY
8
/* Trajectory
*/
#define GRID_UNSTRUCTURED
9
/* General unstructured grid
*/
#define GRID_CURVILINEAR
10
/* Curvilinear grid
*/
#define GRID_LCC
11
/* Lambert Conformal Conic (GRIB)
*/
#define GRID_LCC2
12
/* Lambert Conformal Conic (PROJ)
*/
#define GRID_LAEA
13
/* Lambert Azimuthal Equal Area
*/
#define GRID_SINUSOIDAL
14
/* Sinusoidal
*/
#define GRID_REFERENCE
15
/* Grid reference number
*/
#define GRID_PROJECTION
16
/* Projected coordiantes
*/
/* ZAXIS types */
#define ZAXIS_SURFACE 0
/* Surface level */
#define ZAXIS_GENERIC 1
/* Generic level */
#define ZAXIS_HYBRID 2
/* Hybrid level */
#define ZAXIS_HYBRID_HALF 3
/* Hybrid half level */
#define ZAXIS_PRESSURE 4
/* Isobaric pressure level in Pascal */
#define ZAXIS_HEIGHT 5
/* Height above ground in meters */
#define ZAXIS_DEPTH_BELOW_SEA 6
/* Depth below sea level in meters */
#define ZAXIS_DEPTH_BELOW_LAND 7
/* Depth below land surface in centimeters */
#define ZAXIS_ISENTROPIC 8
/* Isentropic */
#define ZAXIS_TRAJECTORY 9
/* Trajectory */
#define ZAXIS_ALTITUDE 10
/* Altitude above mean sea level in meters */
#define ZAXIS_SIGMA 11
/* Sigma level */
#define ZAXIS_MEANSEA 12
/* Mean sea level */
#define ZAXIS_TOA 13
/* Norminal top of atmosphere */
#define ZAXIS_SEA_BOTTOM 14
/* Sea bottom */
#define ZAXIS_ATMOSPHERE 15
/* Entire atmosphere */
#define ZAXIS_CLOUD_BASE 16
/* Cloud base level */
#define ZAXIS_CLOUD_TOP 17
/* Level of cloud tops */
#define ZAXIS_ISOTHERM_ZERO 18
/* Level of 0o C isotherm */
#define ZAXIS_SNOW 19
/* Snow level */
#define ZAXIS_REFERENCE 20
/* zaxis reference number */
#define ZAXIS_SURFACE 0
/* Surface level */
#define ZAXIS_GENERIC 1
/* Generic level */
#define ZAXIS_HYBRID 2
/* Hybrid level */
#define ZAXIS_HYBRID_HALF 3
/* Hybrid half level */
#define ZAXIS_PRESSURE 4
/* Isobaric pressure level in Pascal */
#define ZAXIS_HEIGHT 5
/* Height above ground in meters */
#define ZAXIS_DEPTH_BELOW_SEA 6
/* Depth below sea level in meters */
#define ZAXIS_DEPTH_BELOW_LAND 7
/* Depth below land surface in centimeters */
#define ZAXIS_ISENTROPIC 8
/* Isentropic */
#define ZAXIS_TRAJECTORY 9
/* Trajectory */
#define ZAXIS_ALTITUDE 10
/* Altitude above mean sea level in meters */
#define ZAXIS_SIGMA 11
/* Sigma level */
#define ZAXIS_MEANSEA 12
/* Mean sea level */
#define ZAXIS_TOA 13
/* Norminal top of atmosphere */
#define ZAXIS_SEA_BOTTOM 14
/* Sea bottom */
#define ZAXIS_ATMOSPHERE 15
/* Entire atmosphere */
#define ZAXIS_CLOUD_BASE 16
/* Cloud base level */
#define ZAXIS_CLOUD_TOP 17
/* Level of cloud tops */
#define ZAXIS_ISOTHERM_ZERO 18
/* Level of 0o C isotherm */
#define ZAXIS_SNOW 19
/* Snow level */
#define ZAXIS_LAKE_BOTTOM 20
/* Lake or River Bottom */
#define ZAXIS_SEDIMENT_BOTTOM 21
/* Bottom Of Sediment Layer */
#define ZAXIS_SEDIMENT_BOTTOM_TA 22
/* Bottom Of Thermally Active Sediment Layer */
#define ZAXIS_SEDIMENT_BOTTOM_TW 23
/* Bottom Of Sediment Layer Penetrated By Thermal Wave */
#define ZAXIS_MIX_LAYER 24
/* Mixing Layer */
#define ZAXIS_REFERENCE 25
/* zaxis reference number */
/* TIME types */
#define TIME_CONSTANT 0
/* obsolate, use TSTEP_CONSTANT */
#define TIME_VARIABLE 1
/* obsolate, use TSTEP_INSTANT */
#define TIME_CONSTANT
0
/* obsolate, use TSTEP_CONSTANT
*/
#define TIME_VARIABLE
1
/* obsolate, use TSTEP_INSTANT
*/
/* TSTEP types */
...
...
src/cdi.inc
View file @
20edaec7
!
This
file
was
automatically
generated
,
don
'
t
edit
!
!
!
Fortran
interface
for
CDI
library
version
1.6.
1.1
!
Fortran
interface
for
CDI
library
version
1.6.
2
!
!
Author
:
!
-------
!
Uwe
Schulzweida
,
MPI
-
MET
,
Hamburg
,
July
2013
!
Uwe
Schulzweida
,
MPI
-
MET
,
Hamburg
,
August
2013
!
INTEGER
CDI_MAX_NAME
...
...
@@ -270,8 +270,18 @@
PARAMETER
(
ZAXIS_ISOTHERM_ZERO
=
18
)
INTEGER
ZAXIS_SNOW
PARAMETER
(
ZAXIS_SNOW
=
19
)
INTEGER
ZAXIS_LAKE_BOTTOM
PARAMETER
(
ZAXIS_LAKE_BOTTOM
=
20
)
INTEGER
ZAXIS_SEDIMENT_BOTTOM
PARAMETER
(
ZAXIS_SEDIMENT_BOTTOM
=
21
)
INTEGER
ZAXIS_SEDIMENT_BOTTOM_TA
PARAMETER
(
ZAXIS_SEDIMENT_BOTTOM_TA
=
22
)
INTEGER
ZAXIS_SEDIMENT_BOTTOM_TW
PARAMETER
(
ZAXIS_SEDIMENT_BOTTOM_TW
=
23
)
INTEGER
ZAXIS_MIX_LAYER
PARAMETER
(
ZAXIS_MIX_LAYER
=
24
)
INTEGER
ZAXIS_REFERENCE
PARAMETER
(
ZAXIS_REFERENCE
=
2
0
)
PARAMETER
(
ZAXIS_REFERENCE
=
2
5
)
!
!
TIME
types
!
...
...
@@ -1906,6 +1916,11 @@
!
(
INTEGER
zaxisID
)
EXTERNAL
zaxisInqPrec
!
zaxisDefPositive
!
(
INTEGER
zaxisID
,
!
INTEGER
positive
)
EXTERNAL
zaxisDefPositive
INTEGER
zaxisInqPositive
!
(
INTEGER
zaxisID
)
EXTERNAL
zaxisInqPositive
...
...
src/cdiFortran.c
View file @
20edaec7
...
...
@@ -428,6 +428,7 @@ FCALLSCSUB2 (zaxisInqStdname, ZAXISINQSTDNAME, zaxisinqstdname, INT, PSTRING)
FCALLSCSUB2
(
zaxisInqUnits
,
ZAXISINQUNITS
,
zaxisinqunits
,
INT
,
PSTRING
)
FCALLSCSUB2
(
zaxisDefPrec
,
ZAXISDEFPREC
,
zaxisdefprec
,
INT
,
INT
)
FCALLSCFUN1
(
INT
,
zaxisInqPrec
,
ZAXISINQPREC
,
zaxisinqprec
,
INT
)
FCALLSCSUB2
(
zaxisDefPositive
,
ZAXISDEFPOSITIVE
,
zaxisdefpositive
,
INT
,
INT
)
FCALLSCFUN1
(
INT
,
zaxisInqPositive
,
ZAXISINQPOSITIVE
,
zaxisinqpositive
,
INT
)
FCALLSCSUB2
(
zaxisDefLtype
,
ZAXISDEFLTYPE
,
zaxisdefltype
,
INT
,
INT
)
FCALLSCFUN1
(
INT
,
zaxisInqLtype
,
ZAXISINQLTYPE
,
zaxisinqltype
,
INT
)
...
...
src/cgribex.h
View file @
20edaec7
...
...
@@ -8,8 +8,8 @@
/* GRIB1 Level Types */
#define GRIB1_LTYPE_SURFACE 1
#define GRIB1_LTYPE_CLOUDBASE
2
#define GRIB1_LTYPE_CLOUDTOP
3
#define GRIB1_LTYPE_CLOUD
_
BASE 2
#define GRIB1_LTYPE_CLOUD
_
TOP 3
#define GRIB1_LTYPE_ISOTHERM0 4
#define GRIB1_LTYPE_TOA 8
#define GRIB1_LTYPE_SEA_BOTTOM 9
...
...
@@ -26,27 +26,32 @@
#define GRIB1_LTYPE_LANDDEPTH 111
#define GRIB1_LTYPE_LANDDEPTH_LAYER 112
#define GRIB1_LTYPE_ISENTROPIC 113
#define GRIB1_LTYPE_SEADEPTH 160
#define GRIB1_LTYPE_SEADEPTH 160
/* Depth Below Sea Level */
#define GRIB1_LTYPE_LAKE_BOTTOM 162
/* Lake or River Bottom */
#define GRIB1_LTYPE_SEDIMENT_BOTTOM 163
/* Bottom Of Sediment Layer */
#define GRIB1_LTYPE_SEDIMENT_BOTTOM_TA 164
/* Bottom Of Thermally Active Sediment Layer */
#define GRIB1_LTYPE_SEDIMENT_BOTTOM_TW 165
/* Bottom Of Sediment Layer Penetrated By Thermal Wave */
#define GRIB1_LTYPE_MIX_LAYER 166
/* Mixing Layer */
#define GRIB1_LTYPE_99_MARGIN 1000
/* GRIB1 Data representation type (Grid Type) [Table 6] */
#define GRIB1_GTYPE_LATLON 0
/* latitude/longitude */
#define GRIB1_GTYPE_LATLON_ROT 10
/* rotated latitude/longitude */
#define GRIB1_GTYPE_LATLON_STR 20
/* stretched latitude/longitude */
#define GRIB1_GTYPE_LATLON_ROTSTR 30
/* rotated and stretched latitude/longitude */
#define GRIB1_GTYPE_GAUSSIAN 4
/* gaussian grid */
#define GRIB1_GTYPE_GAUSSIAN_ROT 14
/* rotated gaussian grid */
#define GRIB1_GTYPE_GAUSSIAN_STR 24
/* stretched gaussian grid */
#define GRIB1_GTYPE_GAUSSIAN_ROTSTR 34
/* rotated and stretched gaussian grid */
#define GRIB1_GTYPE_LCC 3
/* Lambert conformal */
#define GRIB1_GTYPE_SPECTRAL 50
/* spherical harmonics */
#define GRIB1_GTYPE_GME 192
/* hexagonal GME grid */
#define GRIB1_GTYPE_LATLON 0
/* latitude/longitude
*/
#define GRIB1_GTYPE_LATLON_ROT 10
/* rotated latitude/longitude
*/
#define GRIB1_GTYPE_LATLON_STR 20
/* stretched latitude/longitude
*/
#define GRIB1_GTYPE_LATLON_ROTSTR 30
/* rotated and stretched latitude/longitude
*/
#define GRIB1_GTYPE_GAUSSIAN 4
/* gaussian grid
*/
#define GRIB1_GTYPE_GAUSSIAN_ROT 14
/* rotated gaussian grid
*/
#define GRIB1_GTYPE_GAUSSIAN_STR 24
/* stretched gaussian grid
*/
#define GRIB1_GTYPE_GAUSSIAN_ROTSTR 34
/* rotated and stretched gaussian grid
*/
#define GRIB1_GTYPE_LCC 3
/* Lambert conformal
*/
#define GRIB1_GTYPE_SPECTRAL 50
/* spherical harmonics
*/
#define GRIB1_GTYPE_GME 192
/* hexagonal GME grid
*/
/*
* Macros for the indicator section ( Section 0 )
*/
#define ISEC0_GRIB_Len (isec0[ 0])
/* Number of octets in the GRIB message */
#define ISEC0_GRIB_Version (isec0[ 1])
/* GRIB edition number */
#define ISEC0_GRIB_Len (isec0[ 0])
/* Number of octets in the GRIB message
*/
#define ISEC0_GRIB_Version (isec0[ 1])
/* GRIB edition number
*/
/*
...
...
src/gribapi.h
View file @
20edaec7
...
...
@@ -5,8 +5,8 @@
/* GRIB2 Level Types */
#define GRIB2_LTYPE_SURFACE 1
#define GRIB2_LTYPE_CLOUDBASE
2
#define GRIB2_LTYPE_CLOUDTOP
3
#define GRIB2_LTYPE_CLOUD
_
BASE 2
#define GRIB2_LTYPE_CLOUD
_
TOP 3
#define GRIB2_LTYPE_ISOTHERM0 4
#define GRIB2_LTYPE_TOA 8
#define GRIB2_LTYPE_SEA_BOTTOM 9
...
...
@@ -21,21 +21,26 @@
#define GRIB2_LTYPE_ISENTROPIC 107
#define GRIB2_LTYPE_SNOW 114
#define GRIB2_LTYPE_REFERENCE 150
#define GRIB2_LTYPE_SEADEPTH 160
#define GRIB2_LTYPE_SEADEPTH 160
/* Depth Below Sea Level */
#define GRIB2_LTYPE_LAKE_BOTTOM 162
/* Lake or River Bottom */
#define GRIB2_LTYPE_SEDIMENT_BOTTOM 163
/* Bottom Of Sediment Layer */
#define GRIB2_LTYPE_SEDIMENT_BOTTOM_TA 164
/* Bottom Of Thermally Active Sediment Layer */
#define GRIB2_LTYPE_SEDIMENT_BOTTOM_TW 165
/* Bottom Of Sediment Layer Penetrated By Thermal Wave */
#define GRIB2_LTYPE_MIX_LAYER 166
/* Mixing Layer */
/* GRIB2 Data representation type (Grid Type) */
#define GRIB2_GTYPE_LATLON 0
/* latitude/longitude */
#define GRIB2_GTYPE_LATLON_ROT 1
/* rotated latitude/longitude */
#define GRIB2_GTYPE_LATLON_STR 2
/* stretched latitude/longitude */
#define GRIB2_GTYPE_LATLON_ROTSTR 3
/* rotated and stretched latitude/longitude */
#define GRIB2_GTYPE_GAUSSIAN 40
/* gaussian grid */
#define GRIB2_GTYPE_GAUSSIAN_ROT 41
/* rotated gaussian grid */
#define GRIB2_GTYPE_GAUSSIAN_STR 42
/* stretched gaussian grid */
#define GRIB2_GTYPE_GAUSSIAN_ROTSTR 43
/* rotated and stretched gaussian grid */
#define GRIB2_GTYPE_LCC 30
/* Lambert conformal */
#define GRIB2_GTYPE_SPECTRAL 50
/* spherical harmonics */
#define GRIB2_GTYPE_GME 100
/* hexagonal GME grid */
#define GRIB2_GTYPE_NUMBER 101
/* General Unstructured Grid */
#define GRIB2_GTYPE_LATLON 0
/* latitude/longitude
*/
#define GRIB2_GTYPE_LATLON_ROT 1
/* rotated latitude/longitude
*/
#define GRIB2_GTYPE_LATLON_STR 2
/* stretched latitude/longitude
*/
#define GRIB2_GTYPE_LATLON_ROTSTR 3
/* rotated and stretched latitude/longitude
*/
#define GRIB2_GTYPE_GAUSSIAN 40
/* gaussian grid
*/
#define GRIB2_GTYPE_GAUSSIAN_ROT 41
/* rotated gaussian grid
*/
#define GRIB2_GTYPE_GAUSSIAN_STR 42
/* stretched gaussian grid
*/
#define GRIB2_GTYPE_GAUSSIAN_ROTSTR 43
/* rotated and stretched gaussian grid
*/
#define GRIB2_GTYPE_LCC 30
/* Lambert conformal
*/
#define GRIB2_GTYPE_SPECTRAL 50
/* spherical harmonics
*/
#define GRIB2_GTYPE_GME 100
/* hexagonal GME grid
*/
#define GRIB2_GTYPE_NUMBER 101
/* General Unstructured Grid
*/
const
char
*
gribapiLibraryVersion
(
void
);
void
gribContainersNew
(
stream_t
*
streamptr
);
...
...
src/make_fint.c
View file @
20edaec7
...
...
@@ -13,7 +13,7 @@
#endif
//#include "config.h"
#define VERSION "1.6.
1.1
"
#define VERSION "1.6.
2
"
typedef
struct
{
size_t
naline
;
...
...
src/stream_cdf.c
View file @
20edaec7
...
...
@@ -2192,14 +2192,19 @@ void cdfDefZaxis(stream_t *streamptr, int zaxisID)
dimlen
=
zaxisInqSize
(
zaxisID
);
type
=
zaxisInqType
(
zaxisID
);
if
(
dimlen
==
1
&&
type
==
ZAXIS_SURFACE
)
return
;
if
(
dimlen
==
1
&&
type
==
ZAXIS_CLOUD_BASE
)
return
;
if
(
dimlen
==
1
&&
type
==
ZAXIS_CLOUD_TOP
)
return
;
if
(
dimlen
==
1
&&
type
==
ZAXIS_ISOTHERM_ZERO
)
return
;
if
(
dimlen
==
1
&&
type
==
ZAXIS_TOA
)
return
;
if
(
dimlen
==
1
&&
type
==
ZAXIS_SEA_BOTTOM
)
return
;
if
(
dimlen
==
1
&&
type
==
ZAXIS_ATMOSPHERE
)
return
;
if
(
dimlen
==
1
&&
type
==
ZAXIS_MEANSEA
)
return
;
if
(
dimlen
==
1
&&
type
==
ZAXIS_SURFACE
)
return
;
if
(
dimlen
==
1
&&
type
==
ZAXIS_CLOUD_BASE
)
return
;
if
(
dimlen
==
1
&&
type
==
ZAXIS_CLOUD_TOP
)
return
;
if
(
dimlen
==
1
&&
type
==
ZAXIS_ISOTHERM_ZERO
)
return
;
if
(
dimlen
==
1
&&
type
==
ZAXIS_TOA
)
return
;
if
(
dimlen
==
1
&&
type
==
ZAXIS_SEA_BOTTOM
)
return
;
if
(
dimlen
==
1
&&
type
==
ZAXIS_ATMOSPHERE
)
return
;
if
(
dimlen
==
1
&&
type
==
ZAXIS_MEANSEA
)
return
;
if
(
dimlen
==
1
&&
type
==
ZAXIS_LAKE_BOTTOM
)
return
;
if
(
dimlen
==
1
&&
type
==
ZAXIS_SEDIMENT_BOTTOM
)
return
;
if
(
dimlen
==
1
&&
type
==
ZAXIS_SEDIMENT_BOTTOM_TA
)
return
;
if
(
dimlen
==
1
&&
type
==
ZAXIS_SEDIMENT_BOTTOM_TW
)
return
;
if
(
dimlen
==
1
&&
type
==
ZAXIS_MIX_LAYER
)
return
;
zaxisInqName
(
zaxisID
,
axisname
);
/*
...
...
@@ -3080,11 +3085,16 @@ int cdfDefVar(stream_t *streamptr, int varID)
if
(
zid
==
-
1
)
{
if
(
zaxisInqType
(
zaxisID
)
==
ZAXIS_CLOUD_BASE
||
zaxisInqType
(
zaxisID
)
==
ZAXIS_CLOUD_TOP
||
zaxisInqType
(
zaxisID
)
==
ZAXIS_ISOTHERM_ZERO
||
zaxisInqType
(
zaxisID
)
==
ZAXIS_TOA
||
zaxisInqType
(
zaxisID
)
==
ZAXIS_SEA_BOTTOM
||
if
(
zaxisInqType
(
zaxisID
)
==
ZAXIS_CLOUD_BASE
||
zaxisInqType
(
zaxisID
)
==
ZAXIS_CLOUD_TOP
||
zaxisInqType
(
zaxisID
)
==
ZAXIS_ISOTHERM_ZERO
||
zaxisInqType
(
zaxisID
)
==
ZAXIS_TOA
||
zaxisInqType
(
zaxisID
)
==
ZAXIS_SEA_BOTTOM
||
zaxisInqType
(
zaxisID
)
==
ZAXIS_LAKE_BOTTOM
||
zaxisInqType
(
zaxisID
)
==
ZAXIS_SEDIMENT_BOTTOM
||
zaxisInqType
(
zaxisID
)
==
ZAXIS_SEDIMENT_BOTTOM_TA
||
zaxisInqType
(
zaxisID
)
==
ZAXIS_SEDIMENT_BOTTOM_TW
||
zaxisInqType
(
zaxisID
)
==
ZAXIS_MIX_LAYER
||
zaxisInqType
(
zaxisID
)
==
ZAXIS_ATMOSPHERE
)
{
zaxisInqName
(
zaxisID
,
varname
);
...
...
@@ -4696,6 +4706,16 @@ void cdfScanVarAttributes(int nvars, ncvar_t *ncvars, ncdim_t *ncdims,
ncvars
[
ncvarid
].
zaxistype
=
ZAXIS_ISOTHERM_ZERO
;
else
if
(
strcmp
(
attstring
,
"seabottom"
)
==
0
)
ncvars
[
ncvarid
].
zaxistype
=
ZAXIS_SEA_BOTTOM
;
else
if
(
strcmp
(
attstring
,
"lakebottom"
)
==
0
)
ncvars
[
ncvarid
].
zaxistype
=
ZAXIS_LAKE_BOTTOM
;
else
if
(
strcmp
(
attstring
,
"sedimentbottom"
)
==
0
)
ncvars
[
ncvarid
].
zaxistype
=
ZAXIS_SEDIMENT_BOTTOM
;
else
if
(
strcmp
(
attstring
,
"sedimentbottomta"
)
==
0
)
ncvars
[
ncvarid
].
zaxistype
=
ZAXIS_SEDIMENT_BOTTOM_TA
;
else
if
(
strcmp
(
attstring
,
"sedimentbottomtw"
)
==
0
)
ncvars
[
ncvarid
].
zaxistype
=
ZAXIS_SEDIMENT_BOTTOM_TW
;
else
if
(
strcmp
(
attstring
,
"mixlayer"
)
==
0
)
ncvars
[
ncvarid
].
zaxistype
=
ZAXIS_MIX_LAYER
;
else
if
(
strcmp
(
attstring
,
"atmosphere"
)
==
0
)
ncvars
[
ncvarid
].
zaxistype
=
ZAXIS_ATMOSPHERE
;
else
...
...
src/stream_cgribex.c
View file @
20edaec7
...
...
@@ -1917,14 +1917,14 @@ void cgribexDefLevel(int *isec1, int *isec2, double *fsec2, int zaxisID, int lev
}
case
ZAXIS_CLOUD_BASE
:
{
ISEC1_LevelType
=
GRIB1_LTYPE_CLOUDBASE
;
ISEC1_LevelType
=
GRIB1_LTYPE_CLOUD
_
BASE
;
ISEC1_Level1
=
0
;
ISEC1_Level2
=
0
;
break
;
}
case
ZAXIS_CLOUD_TOP
:
{
ISEC1_LevelType
=
GRIB1_LTYPE_CLOUDTOP
;
ISEC1_LevelType
=
GRIB1_LTYPE_CLOUD
_
TOP
;
ISEC1_Level1
=
0
;
ISEC1_Level2
=
0
;
break
;
...
...
src/stream_grb.c
View file @
20edaec7
...
...
@@ -22,26 +22,31 @@ int grib1ltypeToZaxisType(int grib_ltype)
switch
(
grib_ltype
)
{
case
GRIB1_LTYPE_SURFACE
:
{
zaxistype
=
ZAXIS_SURFACE
;
break
;
}
case
GRIB1_LTYPE_CLOUDBASE
:
{
zaxistype
=
ZAXIS_CLOUD_BASE
;
break
;
}
case
GRIB1_LTYPE_CLOUDTOP
:
{
zaxistype
=
ZAXIS_CLOUD_TOP
;
break
;
}
case
GRIB1_LTYPE_ISOTHERM0
:
{
zaxistype
=
ZAXIS_ISOTHERM_ZERO
;
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
;
}
case
GRIB1_LTYPE_SURFACE
:
{
zaxistype
=
ZAXIS_SURFACE
;
break
;
}
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_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
;
}
case
GRIB1_LTYPE_99
:
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_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
:
case
GRIB1_LTYPE_SIGMA_LAYER
:
{
zaxistype
=
ZAXIS_SIGMA
;
break
;
}
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_HYBRID_LAYER
:
{
zaxistype
=
ZAXIS_HYBRID
;
break
;
}
case
GRIB1_LTYPE_LANDDEPTH
:
case
GRIB1_LTYPE_LANDDEPTH_LAYER
:
{
zaxistype
=
ZAXIS_DEPTH_BELOW_LAND
;
break
;
}
case
GRIB1_LTYPE_ISENTROPIC
:
{
zaxistype
=
ZAXIS_ISENTROPIC
;
break
;
}
case
GRIB1_LTYPE_SEADEPTH
:
{
zaxistype
=
ZAXIS_DEPTH_BELOW_SEA
;
break
;
}
case
GRIB1_LTYPE_LANDDEPTH_LAYER
:
{
zaxistype
=
ZAXIS_DEPTH_BELOW_LAND
;
break
;
}
case
GRIB1_LTYPE_ISENTROPIC
:
{
zaxistype
=
ZAXIS_ISENTROPIC
;
break
;
}
case
GRIB1_LTYPE_SEADEPTH
:
{
zaxistype
=
ZAXIS_DEPTH_BELOW_SEA
;
break
;
}
case
GRIB1_LTYPE_LAKE_BOTTOM
:
{
zaxistype
=
ZAXIS_LAKE_BOTTOM
;
break
;
}
case
GRIB1_LTYPE_SEDIMENT_BOTTOM
:
{
zaxistype
=
ZAXIS_SEDIMENT_BOTTOM
;
break
;
}
case
GRIB1_LTYPE_SEDIMENT_BOTTOM_TA
:
{
zaxistype
=
ZAXIS_SEDIMENT_BOTTOM_TA
;
break
;
}
case
GRIB1_LTYPE_SEDIMENT_BOTTOM_TW
:
{
zaxistype
=
ZAXIS_SEDIMENT_BOTTOM_TW
;
break
;
}
case
GRIB1_LTYPE_MIX_LAYER
:
{
zaxistype
=
ZAXIS_MIX_LAYER
;
break
;
}
}
return
(
zaxistype
);
...
...
@@ -54,25 +59,30 @@ int grib2ltypeToZaxisType(int grib_ltype)
switch
(
grib_ltype
)
{
case
GRIB2_LTYPE_SURFACE
:
{
zaxistype
=
ZAXIS_SURFACE
;
break
;
}
case
GRIB2_LTYPE_CLOUDBASE
:
{
zaxistype
=
ZAXIS_CLOUD_BASE
;
break
;
}
case
GRIB2_LTYPE_CLOUDTOP
:
{
zaxistype
=
ZAXIS_CLOUD_TOP
;
break
;
}
case
GRIB2_LTYPE_ISOTHERM0
:
{
zaxistype
=
ZAXIS_ISOTHERM_ZERO
;
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
;
}
case
GRIB2_LTYPE_ISOBARIC
:
{
zaxistype
=
ZAXIS_PRESSURE
;
break
;
}
case
GRIB2_LTYPE_HEIGHT
:
{
zaxistype
=
ZAXIS_HEIGHT
;
break
;
}
case
GRIB2_LTYPE_ALTITUDE
:
{
zaxistype
=
ZAXIS_ALTITUDE
;
break
;
}
case
GRIB2_LTYPE_SIGMA
:
{
zaxistype
=
ZAXIS_SIGMA
;
break
;
}
case
GRIB2_LTYPE_SURFACE
:
{
zaxistype
=
ZAXIS_SURFACE
;
break
;
}
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_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
;
}
case
GRIB2_LTYPE_ISOBARIC
:
{
zaxistype
=
ZAXIS_PRESSURE
;
break
;
}
case
GRIB2_LTYPE_HEIGHT
:
{
zaxistype
=
ZAXIS_HEIGHT
;
break
;
}
case
GRIB2_LTYPE_ALTITUDE
:
{
zaxistype
=
ZAXIS_ALTITUDE
;
break
;
}
case
GRIB2_LTYPE_SIGMA
:
{
zaxistype
=
ZAXIS_SIGMA
;
break
;
}
case
GRIB2_LTYPE_HYBRID
:
/* case GRIB2_LTYPE_HYBRID_LAYER: */
{
zaxistype
=
ZAXIS_HYBRID
;
break
;
}
/* case GRIB2_LTYPE_HYBRID_LAYER: */
{
zaxistype
=
ZAXIS_HYBRID
;
break
;
}
case
GRIB2_LTYPE_LANDDEPTH
:
/* case GRIB2_LTYPE_LANDDEPTH_LAYER: */
{
zaxistype
=
ZAXIS_DEPTH_BELOW_LAND
;
break
;
}
case
GRIB2_LTYPE_ISENTROPIC
:
{
zaxistype
=
ZAXIS_ISENTROPIC
;
break
;
}
case
GRIB2_LTYPE_SNOW
:
{
zaxistype
=
ZAXIS_SNOW
;
break
;
}
case
GRIB2_LTYPE_SEADEPTH
:
{
zaxistype
=
ZAXIS_DEPTH_BELOW_SEA
;
break
;
}
/* case GRIB2_LTYPE_LANDDEPTH_LAYER: */
{
zaxistype
=
ZAXIS_DEPTH_BELOW_LAND
;
break
;
}
case
GRIB2_LTYPE_ISENTROPIC
:
{
zaxistype
=
ZAXIS_ISENTROPIC
;
break
;
}
case
GRIB2_LTYPE_SNOW
:
{
zaxistype
=
ZAXIS_SNOW
;
break
;
}
case
GRIB2_LTYPE_SEADEPTH
:
{
zaxistype
=
ZAXIS_DEPTH_BELOW_SEA
;
break
;
}
case
GRIB2_LTYPE_LAKE_BOTTOM
:
{
zaxistype
=
ZAXIS_LAKE_BOTTOM
;
break
;
}
case
GRIB2_LTYPE_SEDIMENT_BOTTOM
:
{
zaxistype
=
ZAXIS_SEDIMENT_BOTTOM
;
break
;
}
case
GRIB2_LTYPE_SEDIMENT_BOTTOM_TA
:
{
zaxistype
=
ZAXIS_SEDIMENT_BOTTOM_TA
;
break
;
}
case
GRIB2_LTYPE_SEDIMENT_BOTTOM_TW
:
{
zaxistype
=
ZAXIS_SEDIMENT_BOTTOM_TW
;
break
;
}
case
GRIB2_LTYPE_MIX_LAYER
:
{
zaxistype
=
ZAXIS_MIX_LAYER
;
break
;
}
}
return
(
zaxistype
);
...
...
src/stream_gribapi.c
View file @
20edaec7
...
...
@@ -2673,56 +2673,58 @@ void gribapiDefLevel(int editionNumber, grib_handle *gh, int param, int zaxisID,
break
;
}
case
ZAXIS_CLOUD_BASE
:
{
if
(
editionNumber
<=
1
)
gribapiDefLevelType
(
gh
,
gcinit
,
"indicatorOfTypeOfLevel"
,
GRIB1_LTYPE_CLOUDBASE
);
else
gribapiDefLevelType
(
gh
,
gcinit
,
"typeOfFirstFixedSurface"
,
GRIB2_LTYPE_CLOUDBASE
);
break
;
}
case
ZAXIS_CLOUD_TOP
:
{
if
(
editionNumber
<=
1
)
gribapiDefLevelType
(
gh
,
gcinit
,
"indicatorOfTypeOfLevel"
,
GRIB1_LTYPE_CLOUDTOP
);
else
gribapiDefLevelType
(
gh
,
gcinit
,
"typeOfFirstFixedSurface"
,
GRIB2_LTYPE_CLOUDTOP
);
break
;
}
case
ZAXIS_ISOTHERM_ZERO
:
{
if
(
editionNumber
<=
1
)