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
13dbf909
Commit
13dbf909
authored
Nov 16, 2006
by
Uwe Schulzweida
Browse files
splitBasetime: convert timeunit string to lower case
parent
55fd3444
Changes
5
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
13dbf909
2006-1
2
-?? Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
2006-1
1
-?? Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* using GRIB library version 1.0.4
* splitBasetime: convert timeunit string to lower case
* new function: streamNvals
* Version 1.0.4 released
...
...
src/griblib.c
View file @
13dbf909
/* Generated automatically from m214003 on
Fri
Nov
3 13:30:05
CET 2006 */
/* Generated automatically from m214003 on
Thu
Nov
16 14:21:31
CET 2006 */
#if defined (HAVE_CONFIG_H)
# include "config.h"
...
...
@@ -4260,10 +4260,15 @@ static int decodeBDS(int decscale, unsigned char *bds, int *isec2, int *isec4, d
if
(
bds_aflag
)
{
/*
if ( irep == 0 )
ISEC4_NumValues = ISEC2_NumLon*ISEC2_NumLat;
else
ISEC4_NumValues = (ISEC2_PentaJ+1)*(ISEC2_PentaJ+2);
*/
ISEC4_NumValues
=
GET_UINT3
(
bds
[
17
],
bds
[
18
],
bds
[
19
])
*
8
/
ISEC4_NumBits
;
if
(
irep
==
1
)
ISEC4_NumValues
++
;
}
if
(
dfunc
==
'J'
)
return
(
bdsLen
);
...
...
@@ -7995,7 +8000,7 @@ int gribUnzip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbu
return
(
gribLen
);
}
static
const
char
grb_libvers
[]
=
"1.0.
3
"
" of ""Nov
3
2006"" ""1
3:30:06
"
;
static
const
char
grb_libvers
[]
=
"1.0.
4
"
" of ""Nov
16
2006"" ""1
4:21:31
"
;
...
...
src/stream_cdf.c
View file @
13dbf909
...
...
@@ -96,7 +96,7 @@ NCVAR;
static
int
splitBasetime
(
char
*
timeunits
,
TAXIS
*
taxis
)
{
static
char
func
[]
=
"splitBasetime"
;
int
len
;
int
len
,
i
;
char
*
ptu
;
int
year
,
month
,
day
;
int
hour
=
0
,
minute
=
0
,
second
=
0
;
...
...
@@ -107,6 +107,8 @@ static int splitBasetime(char *timeunits, TAXIS *taxis)
ptu
=
timeunits
;
len
=
(
int
)
strlen
(
timeunits
);
for
(
i
=
0
;
i
<
len
;
i
++
)
ptu
[
i
]
=
tolower
((
int
)
ptu
[
i
]);
(
*
taxis
).
type
=
timetype
;
if
(
strncmp
(
ptu
,
"sec"
,
3
)
==
0
)
timeunit
=
TUNIT_SECOND
;
...
...
@@ -118,7 +120,7 @@ static int splitBasetime(char *timeunits, TAXIS *taxis)
else
if
(
strncmp
(
ptu
,
"year"
,
4
)
==
0
)
timeunit
=
TUNIT_YEAR
;
else
{
Message
(
func
,
"Unsupported TIMEUNIT %s!"
,
ptu
);
Message
(
func
,
"Unsupported TIMEUNIT
:
%s!"
,
ptu
);
return
(
1
);
}
...
...
src/stream_grb.c
View file @
13dbf909
...
...
@@ -1327,8 +1327,8 @@ int grbScanTimestep2(int streamID)
gridID
=
vlistInqVarGrid
(
vlistID
,
varID
);
if
(
gridInqSize
(
gridID
)
==
1
&&
gridInqType
(
gridID
)
==
GRID_LONLAT
)
{
if
(
gridInqXval
(
gridID
,
0
)
!=
ISEC2_FirstLon
*
0
.
001
||
gridInqYval
(
gridID
,
0
)
!=
ISEC2_FirstLat
*
0
.
001
)
if
(
!
DBL_IS_EQUAL
(
gridInqXval
(
gridID
,
0
)
,
ISEC2_FirstLon
*
0
.
001
)
||
!
DBL_IS_EQUAL
(
gridInqYval
(
gridID
,
0
)
,
ISEC2_FirstLat
*
0
.
001
)
)
gridChangeType
(
gridID
,
GRID_TRAJECTORY
);
}
}
...
...
src/taxis.c
View file @
13dbf909
...
...
@@ -627,7 +627,7 @@ void timeval2vtime(double timevalue, TAXIS *taxis, int *vdate, int *vtime)
double
value
,
factor
=
1
;
int
timeunit
;
int
calendar
,
dpy
=
0
;
double
second
;
double
second
=
0
;
static
int
lwarn
=
TRUE
;
*
vdate
=
0
;
...
...
@@ -688,7 +688,7 @@ void timeval2vtime(double timevalue, TAXIS *taxis, int *vdate, int *vtime)
}
*
vdate
=
year
*
10000
+
month
*
100
+
day
;
*
vtime
=
hour
*
100
+
minute
;
*
vtime
=
hour
*
100
+
minute
/* + (int) (second/60+0.5)*/
;
}
...
...
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