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
4d3e3d64
Commit
4d3e3d64
authored
Feb 19, 2010
by
Uwe Schulzweida
Browse files
have_missval bug fix
parent
fc334b2d
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/cdi.c
View file @
4d3e3d64
...
...
@@ -11,7 +11,7 @@
#include
<math.h>
#include
"cdi.h"
int
vlistInqVarMissvalUsed
(
int
vlistID
,
int
varID
);
#ifndef DBL_IS_NAN
#if defined (HAVE_ISNAN)
# define DBL_IS_NAN(x) (isnan(x))
...
...
src/stream.c
View file @
4d3e3d64
...
...
@@ -2017,7 +2017,7 @@ void streamDefVlist(int streamID, int vlistID)
zaxisID
=
vlistInqVarZaxis
(
vlistID
,
varID
);
streamNewVar
(
streamID
,
gridID
,
zaxisID
);
if
(
streamptr
->
have_missval
)
vlistDefVarMissval
(
vlistID
,
varID
,
vlistInqVarMissval
(
vlistID
,
varID
));
vlistDefVarMissval
(
streamptr
->
vlistID
,
varID
,
vlistInqVarMissval
(
vlistID
,
varID
));
}
if
(
streamptr
->
filemode
==
'w'
)
...
...
src/stream_cdf.c
View file @
4d3e3d64
...
...
@@ -652,7 +652,7 @@ void cdfDefVarSzip(int ncid, int ncvarid)
#endif
static
void
cdfDefMissval
(
int
streamID
,
int
varID
,
int
dtype
,
int
lcheck
)
void
cdfDef
Var
Missval
(
int
streamID
,
int
varID
,
int
dtype
,
int
lcheck
)
{
#if defined (HAVE_LIBNETCDF)
stream_t
*
streamptr
;
...
...
@@ -2879,7 +2879,7 @@ int cdfDefVar(int streamID, int varID)
streamptr
->
vars
[
varID
].
ncvarid
=
ncvarid
;
if
(
vlistInqVarMissvalUsed
(
vlistID
,
varID
)
)
cdfDefMissval
(
streamID
,
varID
,
vlistInqVarDatatype
(
vlistID
,
varID
),
0
);
cdfDef
Var
Missval
(
streamID
,
varID
,
vlistInqVarDatatype
(
vlistID
,
varID
),
0
);
/* Attributes */
defineAttributes
(
vlistID
,
varID
,
fileID
,
ncvarid
);
...
...
@@ -3120,7 +3120,7 @@ void cdfWriteVarDP(int streamID, int varID, const double *data, int nmiss)
dtype
=
vlistInqVarDatatype
(
vlistID
,
varID
);
if
(
nmiss
>
0
)
cdfDefMissval
(
streamID
,
varID
,
dtype
,
1
);
if
(
nmiss
>
0
)
cdfDef
Var
Missval
(
streamID
,
varID
,
dtype
,
1
);
/* if ( dtype == DATATYPE_INT8 || dtype == DATATYPE_INT16 || dtype == DATATYPE_INT32 ) */
{
...
...
@@ -3530,7 +3530,7 @@ int cdfWriteVarSliceDP(int streamID, int varID, int levelID, const double *data,
dtype
=
vlistInqVarDatatype
(
vlistID
,
varID
);
if
(
nmiss
>
0
)
cdfDefMissval
(
streamID
,
varID
,
dtype
,
1
);
if
(
nmiss
>
0
)
cdfDef
Var
Missval
(
streamID
,
varID
,
dtype
,
1
);
/* if ( dtype == DATATYPE_INT8 || dtype == DATATYPE_INT16 || dtype == DATATYPE_INT32 ) */
{
...
...
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