Skip to content
GitLab
Menu
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
88045651
Commit
88045651
authored
Mar 14, 2011
by
Uwe Schulzweida
Browse files
stream_gribapi: check stepType
parent
391c529d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/stream_gribapi.c
View file @
88045651
...
...
@@ -171,23 +171,27 @@ int gribapiGetTsteptype(grib_handle *gh)
if
(
gribapiTimeIsFC
(
gh
)
)
{
GRIB_CHECK
(
grib_get_long
(
gh
,
"stepType"
,
&
lpar
),
0
);
timerange
=
(
int
)
lpar
;
int
status
;
status
=
grib_get_long
(
gh
,
"stepType"
,
&
lpar
);
if
(
status
==
0
)
{
timerange
=
(
int
)
lpar
;
// printf("timerange %d\n", timerange);
// printf("timerange %d\n", timerange);
switch
(
timerange
)
{
case
0
:
tsteptype
=
TSTEP_AVG
;
break
;
case
1
:
tsteptype
=
TSTEP_ACCUM
;
break
;
case
2
:
tsteptype
=
TSTEP_MIN
;
break
;
case
3
:
tsteptype
=
TSTEP_MAX
;
break
;
case
4
:
tsteptype
=
TSTEP_DIFF
;
break
;
default:
if
(
lprint
)
switch
(
timerange
)
{
Message
(
"Time range %d unsupported"
,
timerange
);
lprint
=
FALSE
;
case
0
:
tsteptype
=
TSTEP_AVG
;
break
;
case
1
:
tsteptype
=
TSTEP_ACCUM
;
break
;
case
2
:
tsteptype
=
TSTEP_MIN
;
break
;
case
3
:
tsteptype
=
TSTEP_MAX
;
break
;
case
4
:
tsteptype
=
TSTEP_DIFF
;
break
;
default:
if
(
lprint
)
{
Message
(
"Time range %d unsupported"
,
timerange
);
lprint
=
FALSE
;
}
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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