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
da12db61
Commit
da12db61
authored
Jun 06, 2013
by
Uwe Schulzweida
Browse files
cdfDefVarMissval: changed xtype from NC_BYTE to NC_INT for missvals > 127
parent
12fdaa16
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
da12db61
...
...
@@ -4,6 +4,7 @@
2013-06-06 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* cdfDefVarMissval: changed xtype from NC_BYTE to NC_INT for missvals > 127 (workaround for a netCDF bug)
* use 'number_of_grid_used' only for undefined grid types
2013-06-03 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
...
...
src/stream_cdf.c
View file @
da12db61
...
...
@@ -689,6 +689,8 @@ void cdfDefVarMissval(stream_t *streamptr, int varID, int dtype, int lcheck)
if
(
lcheck
&&
streamptr
->
ncmode
==
2
)
cdf_redef
(
fileID
);
xtype
=
cdfDefDatatype
(
dtype
,
streamptr
->
filetype
);
/* workaround for a netCDF bug? */
if
(
xtype
==
NC_BYTE
&&
missval
>
127
)
xtype
=
NC_INT
;
cdf_put_att_double
(
fileID
,
ncvarid
,
"_FillValue"
,
(
nc_type
)
xtype
,
1
,
&
missval
);
cdf_put_att_double
(
fileID
,
ncvarid
,
"missing_value"
,
(
nc_type
)
xtype
,
1
,
&
missval
);
...
...
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