Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
0bdaf611
Commit
0bdaf611
authored
Dec 05, 2010
by
Uwe Schulzweida
Browse files
stream_gribapi: make bitsPerValue optional
parent
3934ce00
Changes
3
Hide whitespace changes
Inline
Side-by-side
config/default
View file @
0bdaf611
...
...
@@ -17,6 +17,8 @@ case "${HOSTNAME}" in
--with-netcdf
=
/opt/local
\
--with-hdf5
=
/opt/local
\
--with-szlib
=
$HOME
/local
\
--with-jasper
=
$HOME
/local
\
--with-grib_api
=
$HOME
/local/gribapi-1.9.5
\
CC
=
gcc
CFLAGS
=
"-g -pipe -D_REENTRANT -Wall -W -Wfloat-equal -pedantic -O2 -Df2cFortran"
;;
# ia64-nec-linux
...
...
src/stream_cdf.c
View file @
0bdaf611
...
...
@@ -5420,7 +5420,7 @@ int cdfInqContents(int streamID)
init_ncdims
(
ndims
,
ncdims
);
init_ncvars
(
nvars
,
ncvars
);
/* read global attributtes*/
/* read global attributtes
*/
for
(
iatt
=
0
;
iatt
<
ngatts
;
iatt
++
)
{
cdf_inq_attname
(
fileID
,
NC_GLOBAL
,
iatt
,
attname
);
...
...
src/stream_gribapi.c
View file @
0bdaf611
...
...
@@ -847,12 +847,14 @@ void gribapiScanTimestep1(int streamID)
printf("%d %d %d.%d.%d\n", vdate, vtime, pnum, pcat, pdis);
*/
GRIB_CHECK
(
grib_get_long
(
gh
,
"bitsPerValue"
,
&
lpar
),
0
);
bitsPerValue
=
(
int
)
lpar
;
if
(
bitsPerValue
>
0
&&
bitsPerValue
<=
32
)
prec
=
bitsPerValue
;
else
prec
=
DATATYPE_PACK
;
prec
=
DATATYPE_PACK
;
status
=
grib_get_long
(
gh
,
"bitsPerValue"
,
&
lpar
);
if
(
status
==
0
)
{
bitsPerValue
=
(
int
)
lpar
;
if
(
bitsPerValue
>
0
&&
bitsPerValue
<=
32
)
prec
=
bitsPerValue
;
}
if
(
nrecs
==
0
)
{
...
...
Write
Preview
Markdown
is supported
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