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
c4a23f1c
Commit
c4a23f1c
authored
Jan 11, 2008
by
Uwe Schulzweida
Browse files
grbDefTime: bug fix for ival
parent
9ea3e3d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/stream_grb.c
View file @
c4a23f1c
...
@@ -1730,13 +1730,18 @@ void grbDefTime(int *isec1, int date, int time, int numavg, int timeID)
...
@@ -1730,13 +1730,18 @@ void grbDefTime(int *isec1, int date, int time, int numavg, int timeID)
decode_date
(
date
,
&
year
,
&
month
,
&
day
);
decode_date
(
date
,
&
year
,
&
month
,
&
day
);
decode_time
(
time
,
&
hour
,
&
minute
);
decode_time
(
time
,
&
hour
,
&
minute
);
/*
/*
printf("date time %d %d
%g
\n", date, time
, value
);
printf("date time %d %d\n", date, time);
printf("year %d, month %d, day %d, hour %d, minute %d\n", year, month, day, hour, minute);
printf("year %d, month %d, day %d, hour %d, minute %d\n", year, month, day, hour, minute);
*/
*/
encode_juldaysec
(
year
,
month
,
day
,
hour
,
minute
,
&
julday2
,
&
secofday2
);
encode_juldaysec
(
year
,
month
,
day
,
hour
,
minute
,
&
julday2
,
&
secofday2
);
(
void
)
julday_sub
(
julday1
,
secofday1
,
julday2
,
secofday2
,
&
days
,
&
secs
);
(
void
)
julday_sub
(
julday1
,
secofday1
,
julday2
,
secofday2
,
&
days
,
&
secs
);
ival
=
(
int
)
((
days
*
86400
.
0
+
secs
)
/
factor
);
/* ival = (int) ((days*86400.0 + secs)/factor); */
if
(
(
int
)
fmod
(
days
*
86400
.
0
+
secs
,
factor
)
)
ival
=
-
1
;
else
ival
=
(
int
)
((
days
*
86400
.
0
+
secs
)
/
factor
);
if
(
ival
<
0
||
ival
>
255
)
timetype
=
TAXIS_ABSOLUTE
;
if
(
ival
<
0
||
ival
>
255
)
timetype
=
TAXIS_ABSOLUTE
;
...
...
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