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
867a50af
Commit
867a50af
authored
May 10, 2019
by
Uwe Schulzweida
Browse files
cdf_define_all_grids: check xdimid and ydimid before access ncdims[].
parent
3601e654
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/stream_cdf_i.c
View file @
867a50af
...
...
@@ -2724,8 +2724,8 @@ int cdf_define_all_grids(ncgrid_t *ncgrid, int vlistID, ncdim_t *ncdims, int nva
const
int
gridindex
=
vlistGridIndex
(
vlistID
,
gridID
);
ncgrid
[
gridindex
].
gridID
=
gridID
;
ncgrid
[
gridindex
].
ncIDs
[
CDF_DIMID_X
]
=
ncdims
[
xdimid
].
dimid
;
ncgrid
[
gridindex
].
ncIDs
[
CDF_DIMID_Y
]
=
ncdims
[
ydimid
].
dimid
;
if
(
xdimid
!=
CDI_UNDEFID
)
ncgrid
[
gridindex
].
ncIDs
[
CDF_DIMID_X
]
=
ncdims
[
xdimid
].
dimid
;
if
(
ydimid
!=
CDI_UNDEFID
)
ncgrid
[
gridindex
].
ncIDs
[
CDF_DIMID_Y
]
=
ncdims
[
ydimid
].
dimid
;
if
(
grid
->
type
==
GRID_TRAJECTORY
)
{
ncgrid
[
gridindex
].
ncIDs
[
CDF_VARID_X
]
=
xvarid
;
...
...
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