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
fb20fe69
Commit
fb20fe69
authored
Dec 20, 2016
by
Uwe Schulzweida
Browse files
Added support for GRIB level type 210.
parent
32608fda
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/Makefile.in
View file @
fb20fe69
...
...
@@ -941,8 +941,8 @@ distclean-generic:
maintainer-clean-generic
:
@
echo
"This command is intended for maintainers to use"
@
echo
"it deletes files that may require special tools to rebuild."
@ENABLE_CDI_LIB_FALSE@install-exec-local
:
@ENABLE_CDI_LIB_FALSE@uninstall-local
:
@ENABLE_CDI_LIB_FALSE@install-exec-local
:
clean
:
clean-am
clean-am
:
clean-generic clean-libLTLIBRARIES clean-libtool
\
...
...
src/stream_cgribex.c
View file @
fb20fe69
...
...
@@ -660,8 +660,8 @@ int cgribexScanTimestep1(stream_t * streamptr)
param
=
cdiEncodeParam
(
ISEC1_Parameter
,
ISEC1_CodeTable
,
255
);
cdiParamToString
(
param
,
paramstr
,
sizeof
(
paramstr
));
if
(
ISEC1_LevelType
==
100
)
ISEC1_Level1
*=
100
;
if
(
ISEC1_LevelType
==
99
)
ISEC1_LevelType
=
100
;
if
(
ISEC1_LevelType
==
GRIB1_LTYPE_ISOBARIC
)
ISEC1_Level1
*=
100
;
if
(
ISEC1_LevelType
==
GRIB1_LTYPE_99
||
ISEC1_LevelType
==
GRIB1_LTYPE_ISOBARIC_PA
)
ISEC1_LevelType
=
GRIB1_LTYPE_ISOBARIC
;
level1
=
ISEC1_Level1
;
level2
=
ISEC1_Level2
;
...
...
@@ -882,8 +882,8 @@ int cgribexScanTimestep2(stream_t * streamptr)
param
=
cdiEncodeParam
(
ISEC1_Parameter
,
ISEC1_CodeTable
,
255
);
cdiParamToString
(
param
,
paramstr
,
sizeof
(
paramstr
));
if
(
ISEC1_LevelType
==
100
)
ISEC1_Level1
*=
100
;
if
(
ISEC1_LevelType
==
99
)
ISEC1_LevelType
=
100
;
if
(
ISEC1_LevelType
==
GRIB1_LTYPE_ISOBARIC
)
ISEC1_Level1
*=
100
;
if
(
ISEC1_LevelType
==
GRIB1_LTYPE_99
||
ISEC1_LevelType
==
GRIB1_LTYPE_ISOBARIC_PA
)
ISEC1_LevelType
=
GRIB1_LTYPE_ISOBARIC
;
level1
=
ISEC1_Level1
;
level2
=
ISEC1_Level2
;
...
...
@@ -1135,10 +1135,10 @@ int cgribexScanTimestep(stream_t * streamptr)
param
=
cdiEncodeParam
(
ISEC1_Parameter
,
ISEC1_CodeTable
,
255
);
cdiParamToString
(
param
,
paramstr
,
sizeof
(
paramstr
));
if
(
ISEC1_LevelType
==
100
)
ISEC1_Level1
*=
100
;
if
(
ISEC1_LevelType
==
99
)
ISEC1_LevelType
=
100
;
level1
=
ISEC1_Level1
;
level2
=
ISEC1_Level2
;
if
(
ISEC1_LevelType
==
GRIB1_LTYPE_ISOBARIC
)
ISEC1_Level1
*=
100
;
if
(
ISEC1_LevelType
==
GRIB1_LTYPE_99
||
ISEC1_LevelType
==
GRIB1_LTYPE_ISOBARIC_PA
)
ISEC1_LevelType
=
GRIB1_LTYPE_ISOBARIC
;
level1
=
ISEC1_Level1
;
level2
=
ISEC1_Level2
;
gribDateTime
(
isec1
,
&
vdate
,
&
vtime
);
...
...
src/stream_gribapi.c
View file @
fb20fe69
...
...
@@ -276,9 +276,9 @@ void grib1GetLevel(grib_handle *gh, int *leveltype, int *lbounds, int *level1, i
{
double
dlevel
;
GRIB_CHECK
(
grib_get_double
(
gh
,
"level"
,
&
dlevel
),
0
);
//2 byte
if
(
*
leveltype
==
100
)
dlevel
*=
100
;
if
(
*
leveltype
==
GRIB1_LTYPE_ISOBARIC
)
dlevel
*=
100
;
if
(
dlevel
<
-
2.e9
||
dlevel
>
2.e9
)
dlevel
=
0
;
if
(
*
leveltype
==
GRIB1_LTYPE_99
||
*
leveltype
==
GRIB1_LTYPE_ISOBARIC_PA
)
*
leveltype
=
100
;
if
(
*
leveltype
==
GRIB1_LTYPE_99
||
*
leveltype
==
GRIB1_LTYPE_ISOBARIC_PA
)
*
leveltype
=
GRIB1_LTYPE_ISOBARIC
;
*
level1
=
(
int
)
dlevel
;
*
level2
=
0
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment