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
50e7bc9a
Commit
50e7bc9a
authored
Feb 15, 2010
by
Uwe Schulzweida
Browse files
cgriblib update
parent
e2359159
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/cgribexlib.c
View file @
50e7bc9a
...
...
@@ -299,7 +299,8 @@ void gribDecode(int *isec0, int *isec1, int *isec2, double *fsec2, int *isec3,
#define BDS_RefValue decfp2((int)bds[ 6], GET_UINT3(bds[ 7], bds[ 8], bds[ 9]))
#define BDS_NumBits ((int) bds[10])
#define BDS_RealCoef decfp2((int)bds[zoff+11], GET_UINT3(bds[zoff+12], bds[zoff+13], bds[zoff+14]))
#define BDS_Power GET_INT2(bds[13], bds[14])
#define BDS_PackData ((int) ((bds[zoff+11]<<8) + bds[zoff+12]))
#define BDS_Power GET_INT2(bds[zoff+13], bds[zoff+14])
#define BDS_Z (bds[13])
/* GRIB1 Section 5: End Section (ES) */
...
...
@@ -4645,6 +4646,7 @@ int decodeBDS(int decscale, unsigned char *bds, int *isec2, int *isec4,
}
else
/* complex packed spherical harmonics */
{
isec4
[
15
]
=
BDS_PackData
;
/* scaling factor */
isec4
[
16
]
=
BDS_Power
;
...
...
@@ -8851,7 +8853,7 @@ int gribUnzip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbu
return
(
gribLen
);
}
static
const
char
grb_libvers
[]
=
"1.4.3"
" of ""Feb 15 2010"" ""1
1:31
:3
9
"
;
static
const
char
grb_libvers
[]
=
"1.4.3"
" of ""Feb 15 2010"" ""1
3:50
:3
1
"
;
const
char
*
cgribexLibraryVersion
(
void
)
{
...
...
src/stream_cgribex.c
View file @
50e7bc9a
...
...
@@ -1553,7 +1553,7 @@ int cgribexDefTimerange(int tsteptype, int factor, int calendar,
*
pip1
=
ip1
;
*
pip2
=
ip2
;
// printf("timerange %d %d %d\n", timerange, ip1, ip2);
return
(
timerange
);
}
...
...
@@ -1831,10 +1831,15 @@ void cgribexDefGrid(int *isec1, int *isec2, int *isec4, int gridID)
ISEC2_PentaK
=
ISEC2_PentaJ
;
ISEC2_PentaM
=
ISEC2_PentaJ
;
ISEC2_RepType
=
1
;
isec4
[
2
]
=
128
;
if
(
gridInqComplexPacking
(
gridID
)
)
{
ISEC2_RepMode
=
2
;
isec4
[
3
]
=
64
;
isec4
[
16
]
=
0
;
isec4
[
17
]
=
20
;
isec4
[
18
]
=
20
;
isec4
[
19
]
=
20
;
}
else
{
...
...
@@ -2141,6 +2146,10 @@ size_t cgribexEncode(int varID, int levelID, int vlistID, int gridID, int zaxisI
ISEC1_Sec2Or3Flag
|=
64
;
}
if
(
isec4
[
2
]
==
128
&&
isec4
[
3
]
==
64
)
isec4
[
16
]
=
(
int
)
(
1000
*
calculate_pfactor
(
data
,
ISEC2_PentaJ
,
isec4
[
17
]));
//printf("isec4[16] %d\n", isec4[16]);
gribExDP
(
isec0
,
isec1
,
isec2
,
fsec2
,
isec3
,
fsec3
,
isec4
,
(
double
*
)
data
,
datasize
,
(
int
*
)
gribbuffer
,
gribsize
,
&
iword
,
"C"
,
&
iret
);
...
...
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