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
9df36ae3
Commit
9df36ae3
authored
Mar 31, 2010
by
Uwe Schulzweida
Browse files
cgribexDefTime: bug fix for timerange=3
parent
83d127db
Changes
3
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
9df36ae3
2010-03-31 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* cgribexDefTime: bug fix for timerange=3
* using CGRIBEX library version 1.4.4
2010-03-30 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* vlistCat: correct temporary parameter numbers
...
...
src/cgribexlib.c
View file @
9df36ae3
/* Automatically generated by m214003 at 2010-03-
24
, do not edit */
/* Automatically generated by m214003 at 2010-03-
31
, do not edit */
/* CGRIBEXLIB_VERSION="1.4.4" */
...
...
@@ -3029,46 +3029,36 @@ void encodePDS(GRIBPACK *lpds, long pdsLen, int *isec1)
Put1Byte
(
ISEC1_Day
);
/* 14 Day */
Put1Byte
(
ISEC1_Hour
);
/* 15 Hour */
Put1Byte
(
ISEC1_Minute
);
/* 16 Minute */
if
(
ISEC1_AvgNum
>
0
)
Put1Byte
(
ISEC1_TimeUnit
);
/* 17 Time unit */
if
(
ISEC1_TimeRange
==
10
)
{
Put1Byte
(
ISEC1_TimePeriod1
);
Put1Byte
(
ISEC1_TimePeriod2
);
}
else
if
(
ISEC1_TimeRange
==
113
||
ISEC1_TimeRange
==
0
)
{
Put1Byte
(
2
);
/* 17 Time unit */
Put1Byte
(
0
);
/* 18 Time 1 */
Put1Byte
(
0
);
/* 19 Time 2 */
Put1Byte
(
3
);
/* 20 Timerange flag */
Put2Byte
(
ISEC1_AvgNum
);
/* 21 Average */
Put1Byte
(
ISEC1_TimePeriod1
);
Put1Byte
(
0
);
}
else
if
(
ISEC1_TimeRange
==
5
||
ISEC1_TimeRange
==
4
||
ISEC1_TimeRange
==
3
||
ISEC1_TimeRange
==
2
)
{
Put1Byte
(
0
);
Put1Byte
(
ISEC1_TimePeriod2
);
}
else
{
Put1Byte
(
ISEC1_TimeUnit
);
/* 17 Time unit */
if
(
ISEC1_TimeRange
==
10
)
{
Put1Byte
(
ISEC1_TimePeriod1
);
Put1Byte
(
ISEC1_TimePeriod2
);
}
else
if
(
ISEC1_TimeRange
==
113
||
ISEC1_TimeRange
==
0
)
{
Put1Byte
(
ISEC1_TimePeriod1
);
Put1Byte
(
0
);
}
else
if
(
ISEC1_TimeRange
==
5
||
ISEC1_TimeRange
==
4
||
ISEC1_TimeRange
==
3
||
ISEC1_TimeRange
==
2
)
{
Put1Byte
(
0
);
Put1Byte
(
ISEC1_TimePeriod2
);
}
else
{
Put1Byte
(
0
);
Put1Byte
(
0
);
}
Put1Byte
(
ISEC1_TimeRange
);
/* 20 Timerange flag */
Put2Byte
(
ISEC1_AvgNum
);
/* 21 Average */
Put1Byte
(
0
);
Put1Byte
(
0
);
}
Put1Byte
(
ISEC1_TimeRange
);
/* 20 Timerange flag */
Put2Byte
(
ISEC1_AvgNum
);
/* 21 Average */
Put1Byte
(
ISEC1_AvgMiss
);
/* 23 Missing from averages */
Put1Byte
(
century
);
/* 24 Century */
Put1Byte
(
ISEC1_SubCenterID
);
/* 25 Subcenter */
Put2Byte
(
ISEC1_DecScaleFactor
);
/* 26 Decimal scale factor */
Put1Byte
(
ISEC1_AvgMiss
);
/* 23 Missing from averages */
Put1Byte
(
century
);
/* 24 Century */
Put1Byte
(
ISEC1_SubCenterID
);
/* 25 Subcenter */
Put2Byte
(
ISEC1_DecScaleFactor
);
/* 26 Decimal scale factor */
if
(
ISEC1_LocalFLag
)
{
...
...
@@ -8853,7 +8843,7 @@ int gribUnzip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbu
return
(
gribLen
);
}
static
const
char
grb_libvers
[]
=
"1.4.4"
" of ""Mar
24
2010"" ""
15:35:19
"
;
static
const
char
grb_libvers
[]
=
"1.4.4"
" of ""Mar
31
2010"" ""
09:12:03
"
;
const
char
*
cgribexLibraryVersion
(
void
)
{
...
...
src/stream_cgribex.c
View file @
9df36ae3
...
...
@@ -1632,11 +1632,11 @@ void cgribexDefTime(int *isec1, int vdate, int vtime, int tsteptype, int numavg,
timerange
=
cgribexDefTimerange
(
tsteptype
,
factor
,
calendar
,
rdate
,
rtime
,
vdate
,
vtime
,
&
ip1
,
&
ip2
);
if
(
timerange
==
-
1
)
if
(
timerange
==
-
1
||
timerange
==
3
)
{
timetype
=
TAXIS_ABSOLUTE
;
}
if
(
timerange
==
10
)
else
if
(
timerange
==
10
)
{
if
(
ip1
<
0
||
ip1
>
0xFFFF
)
timetype
=
TAXIS_ABSOLUTE
;
if
(
ip2
<
0
||
ip2
>
0xFFFF
)
timetype
=
TAXIS_ABSOLUTE
;
...
...
@@ -1661,7 +1661,9 @@ void cgribexDefTime(int *isec1, int vdate, int vtime, int tsteptype, int numavg,
ISEC1_TimeRange = 0;
else
*/
ISEC1_TimeRange
=
10
;
if
(
ISEC1_TimeRange
!=
3
)
ISEC1_TimeRange
=
10
;
ISEC1_TimePeriod1
=
0
;
ISEC1_TimePeriod2
=
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