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
0bb80cc0
Commit
0bb80cc0
authored
Nov 17, 2015
by
Uwe Schulzweida
Browse files
cdfCopyRecord: use MEMTYPE_FLOAT for DATATYPE_FLT32
parent
7281ee93
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
0bb80cc0
...
...
@@ -3,6 +3,10 @@
* Version 1.7.1 released
* using CGRIBEX library version 1.7.4
2015-11-17 Uwe Schulzweida
* cdfCopyRecord: use MEMTYPE_FLOAT for DATATYPE_FLT32
2015-11-04 Uwe Schulzweida
* tableRead: name is not interpreted correctly (bug introduced in 1.7.0 #3933)
...
...
src/stream_cdf.c
View file @
0bb80cc0
...
...
@@ -533,8 +533,15 @@ void cdfCopyRecord(stream_t *streamptr2, stream_t *streamptr1)
int
ivarID
=
streamptr1
->
tsteps
[
tsID
].
records
[
recID
].
varID
;
int
gridID
=
vlistInqVarGrid
(
vlistID1
,
ivarID
);
int
datasize
=
gridInqSize
(
gridID
);
int
datatype
=
vlistInqVarDatatype
(
vlistID1
,
ivarID
);
double
*
data
=
(
double
*
)
Malloc
((
size_t
)
datasize
*
sizeof
(
double
));
if
(
datatype
==
DATATYPE_FLT32
)
memtype
=
MEMTYPE_FLOAT
;
void
*
data
=
NULL
;
if
(
memtype
==
MEMTYPE_DOUBLE
)
data
=
Malloc
((
size_t
)
datasize
*
sizeof
(
double
));
else
data
=
Malloc
((
size_t
)
datasize
*
sizeof
(
float
));
int
nmiss
;
cdf_read_record
(
streamptr1
,
memtype
,
data
,
&
nmiss
);
...
...
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