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
12841779
Commit
12841779
authored
Sep 10, 2010
by
Uwe Schulzweida
Browse files
cgribexlib update
parent
c6755c6f
Changes
2
Hide whitespace changes
Inline
Side-by-side
config/default
View file @
12841779
...
...
@@ -16,7 +16,7 @@ case "${HOSTNAME}" in
./configure
--prefix
=
$HOME
/local
\
--with-netcdf
=
/opt/local
\
--with-hdf5
=
/opt/local
\
--with-szlib
=
/opt
/local
\
--with-szlib
=
$HOME
/local
\
CC
=
gcc
CFLAGS
=
"-g -pipe -D_REENTRANT -Wall -W -Wfloat-equal -pedantic -O2 -Df2cFortran"
;;
# ia64-nec-linux
...
...
src/cgribexlib.c
View file @
12841779
/* Automatically generated by m214003 at 2010-09-0
9
, do not edit */
/* Automatically generated by m214003 at 2010-09-
1
0, do not edit */
/* CGRIBEXLIB_VERSION="1.4.6" */
...
...
@@ -3630,7 +3630,7 @@ int encodeBDS(GRIBPACK *lGrib, long *gribLen, int decscale, int *isec2, int *ise
*
datstart
=
bds_head
+
bds_ext
;
nbpv
=
numBits
=
ISEC4_NumBits
;
numBits
=
ISEC4_NumBits
;
if
(
lspherc
&&
lcomplex
)
{
...
...
@@ -3665,14 +3665,14 @@ int encodeBDS(GRIBPACK *lGrib, long *gribLen, int decscale, int *isec2, int *ise
if
(
GRB_Const
&&
!
lspherc
)
{
if
(
IS_EQUAL
(
fmin
,
fmax
)
)
n
bpv
=
0
;
if
(
IS_EQUAL
(
fmin
,
fmax
)
)
n
umBits
=
0
;
}
blockLength
=
(
*
datstart
)
+
(
n
bpv
*
(
datasize
-
PackStart
)
+
7
)
/
8
;
blockLength
=
(
*
datstart
)
+
(
n
umBits
*
(
datasize
-
PackStart
)
+
7
)
/
8
;
if
(
(
blockLength
%
2
)
==
1
)
blockLength
++
;
unused_bits
=
blockLength
*
8
-
(
*
datstart
)
*
8
-
n
bpv
*
(
datasize
-
PackStart
);
unused_bits
=
blockLength
*
8
-
(
*
datstart
)
*
8
-
n
umBits
*
(
datasize
-
PackStart
);
Flag
+=
unused_bits
;
...
...
@@ -3681,6 +3681,7 @@ int encodeBDS(GRIBPACK *lGrib, long *gribLen, int decscale, int *isec2, int *ise
Adjust number of bits per value if full integer length to
avoid hitting most significant bit (sign bit).
*/
nbpv
=
numBits
;
/* if( nbpv == ibits ) nbpv = nbpv - 1; */
/*
Calculate the binary scaling factor to spread the range of
...
...
@@ -3793,9 +3794,9 @@ int encodeBDS(GRIBPACK *lGrib, long *gribLen, int decscale, int *isec2, int *ise
}
}
*
datsize
=
((
datasize
-
PackStart
)
*
n
bpv
+
7
)
/
8
;
*
datsize
=
((
datasize
-
PackStart
)
*
n
umBits
+
7
)
/
8
;
encode_double_array
(
n
bpv
,
PackStart
,
datasize
,
lGrib
,
encode_double_array
(
n
umBits
,
PackStart
,
datasize
,
lGrib
,
data
,
zref
,
factor
,
&
z
);
if
(
unused_bits
>=
8
)
...
...
@@ -5107,7 +5108,7 @@ void gribDecode(int *isec0, int *isec1, int *isec2, double *fsec2, int *isec3,
if
(
ISEC4_NumNonMissValues
!=
j
)
{
if
(
dfunc
!=
'J'
)
if
(
dfunc
!=
'J'
&&
ISEC4_NumBits
!=
0
)
Warning
(
func
,
"Bitmap (%d) and data (%d) section differ, using bitmap section!"
,
j
,
ISEC4_NumNonMissValues
);
...
...
@@ -8674,10 +8675,10 @@ int gribZip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbufs
if
(
bds_nbits
!=
8
&&
bds_nbits
!=
16
&&
bds_nbits
!=
24
&&
bds_nbits
!=
32
)
{
static
int
linfo
=
1
;
if
(
linfo
)
if
(
linfo
&&
bds_nbits
!=
0
)
{
linfo
=
0
;
fprintf
(
stderr
,
"GRIB zip
is
only
available for
8, 16, 24 and 32 bit data!
\n
"
);
fprintf
(
stderr
,
"GRIB
s
zip only
supports
8, 16, 24 and 32 bit data!
\n
"
);
}
return
(
rec_len
);
}
...
...
@@ -9117,7 +9118,7 @@ int gribUnzip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbu
return
(
gribLen
);
}
static
const
char
grb_libvers
[]
=
"1.4.6"
" of ""Sep
9
2010"" ""1
3:13:52
"
;
static
const
char
grb_libvers
[]
=
"1.4.6"
" of ""Sep
10
2010"" ""1
0:53:41
"
;
const
char
*
cgribexLibraryVersion
(
void
)
{
...
...
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