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
4a66a6a6
Commit
4a66a6a6
authored
Mar 13, 2013
by
Uwe Schulzweida
Browse files
stream_gribapi: added gribapiSetDataDateTime()
parent
5ee7e564
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/stream_gribapi.c
View file @
4a66a6a6
...
...
@@ -275,6 +275,13 @@ void gribapiGetDataDateTime(grib_handle *gh, int *datadate, int *datatime)
*
datatime
=
(
int
)
lpar
*
100
;
}
static
void
gribapiSetDataDateTime
(
grib_handle
*
gh
,
int
datadate
,
int
datatime
)
{
GRIB_CHECK
(
grib_set_long
(
gh
,
"dataDate"
,
datadate
),
0
);
GRIB_CHECK
(
grib_set_long
(
gh
,
"dataTime"
,
datatime
/
100
),
0
);
}
static
int
gribapiGetValidityDateTime
(
grib_handle
*
gh
,
int
*
vdate
,
int
*
vtime
)
{
...
...
@@ -2087,8 +2094,7 @@ void gribapiDefDateTimeAbs(int editionNumber, grib_handle *gh, int date, int tim
if
(
editionNumber
>
1
)
GRIB_CHECK
(
grib_set_long
(
gh
,
"stepRange"
,
0
),
0
);
if
(
date
==
0
)
date
=
10101
;
GRIB_CHECK
(
grib_set_long
(
gh
,
"dataDate"
,
date
),
0
);
GRIB_CHECK
(
grib_set_long
(
gh
,
"dataTime"
,
time
/
100
),
0
);
gribapiSetDataDateTime
(
gh
,
date
,
time
);
(
void
)
gribapiDefSteptype
(
editionNumber
,
gh
,
tsteptype
,
gcinit
);
}
...
...
@@ -2121,8 +2127,7 @@ int gribapiDefDateTimeRel(int editionNumber, grib_handle *gh, int rdate, int rti
if
(
editionNumber
>
1
)
GRIB_CHECK
(
grib_set_long
(
gh
,
"stepRange"
,
0
),
0
);
if
(
rdate
==
0
)
rdate
=
10101
;
GRIB_CHECK
(
grib_set_long
(
gh
,
"dataDate"
,
rdate
),
0
);
GRIB_CHECK
(
grib_set_long
(
gh
,
"dataTime"
,
rtime
/
100
),
0
);
gribapiSetDataDateTime
(
gh
,
rdate
,
rtime
);
// printf(">>>>> tsteptype %d startStep %d endStep %d\n", tsteptype, startStep, endStep);
...
...
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