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
cfeaddd1
Commit
cfeaddd1
authored
Feb 12, 2020
by
Uwe Schulzweida
Browse files
Preserve NetCDF attribute positive on data variables.
parent
05b9e160
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/stream_cdf_i.c
View file @
cfeaddd1
...
...
@@ -1143,7 +1143,7 @@ void cdfScanVarAttr(int nvars, ncvar_t *ncvars, int ndims, ncdim_t *ncdims, int
}
}
if
(
ncvars
[
ncvarid
].
natts
==
0
)
if
(
ncvars
[
ncvarid
].
natts
==
0
&&
nvatts
>
0
)
ncvars
[
ncvarid
].
atts
=
(
int
*
)
Malloc
((
size_t
)
nvatts
*
sizeof
(
int
));
for
(
iatt
=
0
;
iatt
<
nvatts
;
iatt
++
)
...
...
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