Commit 397f76ae authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

stream_cdf::define_all_grids: modify check for same x and y varids

parent 7ed7cf0d
...@@ -6584,13 +6584,6 @@ int cdfInqContents(int streamID) ...@@ -6584,13 +6584,6 @@ int cdfInqContents(int streamID)
} }
} }
if ( CDI_Debug ) printNCvars(ncvars, nvars);
/* define all grids */
define_all_grids(streamptr, fileID, vlistID, ncdims, nvars, ncvars, timedimid);
/* find VCT */ /* find VCT */
for ( ncvarid = 0; ncvarid < nvars; ncvarid++ ) for ( ncvarid = 0; ncvarid < nvars; ncvarid++ )
{ {
...@@ -6600,17 +6593,29 @@ int cdfInqContents(int streamID) ...@@ -6600,17 +6593,29 @@ int cdfInqContents(int streamID)
{ {
vcta_id = ncvarid; vcta_id = ncvarid;
nvcth_id = ncvars[ncvarid].dimids[0]; nvcth_id = ncvars[ncvarid].dimids[0];
ncvars[ncvarid].isvar = FALSE;
continue; continue;
} }
if ( memcmp(ncvars[ncvarid].name, "hybi", 4) == 0 ) if ( memcmp(ncvars[ncvarid].name, "hybi", 4) == 0 )
{ {
vctb_id = ncvarid; vctb_id = ncvarid;
nvcth_id = ncvars[ncvarid].dimids[0]; nvcth_id = ncvars[ncvarid].dimids[0];
ncvars[ncvarid].isvar = FALSE;
continue; continue;
} }
if ( memcmp(ncvars[ncvarid].name, "hyam", 4) == 0 ) ncvars[ncvarid].isvar = FALSE;
else if ( memcmp(ncvars[ncvarid].name, "hybm", 4) == 0 ) ncvars[ncvarid].isvar = FALSE;
} }
} }
if ( CDI_Debug ) printNCvars(ncvars, nvars);
/* define all grids */
define_all_grids(streamptr, fileID, vlistID, ncdims, nvars, ncvars, timedimid);
/* read VCT */ /* read VCT */
if ( nvcth_id != UNDEFID && vcta_id != UNDEFID && vctb_id != UNDEFID ) if ( nvcth_id != UNDEFID && vcta_id != UNDEFID && vctb_id != UNDEFID )
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment