Commit 0879f664 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Skip unavailable coordinate variables (bug fix).

parent 7bf3024d
......@@ -2,6 +2,10 @@
* Version 1.9.3 released
2018-01-16 Uwe Schulzweida
* Skip unavailable coordinate variables (bug fix)
2018-01-13 Uwe Schulzweida
* streamFilesuffix(): refactoring (bug fix)
......
......@@ -1343,6 +1343,8 @@ void cdf_scan_var_attr(int nvars, ncvar_t *ncvars, ncdim_t *ncdims, int timedimi
}
else
{
if ( !cdiIgnoreAttCoordinates ) ncvars[ncvarid].ncoordvars++;
int k;
for ( k = 0; k < nchecked_vars; ++k )
if ( strcmp(checked_vars[k], varname) == 0 ) break;
......@@ -3873,6 +3875,8 @@ int cdfInqContents(stream_t *streamptr)
{
int ncoordvars = ncvar->ncoordvars;
for ( int i = 0; i < ncoordvars; i++ )
{
if ( ncvar->coordvarids[i] != CDI_UNDEFID )
{
if ( ncvars[ncvar->coordvarids[i]].islon ||
ncvars[ncvar->coordvarids[i]].isx ) ncvar->xvarid = ncvar->coordvarids[i];
......@@ -3883,6 +3887,7 @@ int cdfInqContents(stream_t *streamptr)
}
}
}
}
// set dim type
cdf_set_dimtype(nvars, ncvars, ncdims);
......
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