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
0363dbae
Commit
0363dbae
authored
Jul 04, 2012
by
Uwe Schulzweida
Browse files
stream_cdf::define_all_grids: modify check for same x and y varids
parent
1b2fe64e
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
0363dbae
...
...
@@ -5,6 +5,7 @@
2012-07-04 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* stream_cdf::define_all_grids: modify check for same x and y varids
* cdfInqContents: set all undefined 1D variables to data variables [request: Florian Prill]
2012-06-20 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
...
...
src/stream_cdf.c
View file @
0363dbae
...
...
@@ -5712,20 +5712,24 @@ void define_all_grids(stream_t *streamptr, int fileID, int vlistID, ncdim_t *ncd
}
if
(
xdimid
==
xdimid2
&&
(
ydimid
==
ydimid2
||
(
xdimid
==
ydimid
&&
ydimid2
==
UNDEFID
))
)
(
ydimid
==
ydimid2
||
(
xdimid
==
ydimid
&&
ydimid2
==
UNDEFID
))
)
{
int
same_grid
=
TRUE
;
/*
if ( xvarid != -1 && ncvars[ncvarid2].xvarid != UNDEFID &&
xvarid != ncvars[ncvarid2].xvarid ) same_grid = FALSE;
if ( yvarid != -1 && ncvars[ncvarid2].yvarid != UNDEFID &&
yvarid != ncvars[ncvarid2].yvarid ) same_grid = FALSE;
*/
if
(
xvarid
!=
ncvars
[
ncvarid2
].
xvarid
)
same_grid
=
FALSE
;
if
(
yvarid
!=
ncvars
[
ncvarid2
].
yvarid
)
same_grid
=
FALSE
;
if
(
same_grid
)
{
printf
(
"xvarid %d %d yvarid %d %d
\n
"
,
xvarid
,
ncvars
[
ncvarid2
].
xvarid
,
yvarid
,
ncvars
[
ncvarid2
].
yvarid
);
if
(
CDI_Debug
)
Message
(
"gridID %d %d %s"
,
Message
(
"
Same
gridID %d %d %s"
,
ncvars
[
ncvarid
].
gridID
,
ncvarid2
,
ncvars
[
ncvarid2
].
name
);
ncvars
[
ncvarid2
].
gridID
=
ncvars
[
ncvarid
].
gridID
;
}
...
...
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