Commit 62d1d764 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

netCDF: check position of time dimension

parent d751872b
......@@ -3,6 +3,10 @@
* Version 1.6.0 released
* using CGRIBEX library version 1.6.0
2013-01-08 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* netCDF: check position of time dimension
2013-01-15 Thomas Jahns <jahns@dkrz.de>
* make_fint.c: added regexec support
......
......@@ -4375,11 +4375,24 @@ void cdfScanVarAttributes(int nvars, ncvar_t *ncvars, ncdim_t *ncdims,
#endif
if ( nvdims > 0 )
if ( timedimid == dimidsp[0] )
{
ncvars[ncvarid].tsteptype = TSTEP_INSTANT;
cdfSetDim(ncvars, ncvarid, 0, T_AXIS);
}
{
if ( timedimid == dimidsp[0] )
{
ncvars[ncvarid].tsteptype = TSTEP_INSTANT;
cdfSetDim(ncvars, ncvarid, 0, T_AXIS);
}
else
{
for ( ncdimid = 1; ncdimid < nvdims; ncdimid++ )
{
if ( timedimid == dimidsp[ncdimid] )
{
Warning("Time must be the first dimension! Unsupported array structure, skipped variable %s!", ncvars[ncvarid].name);
ncvars[ncvarid].isvar = FALSE;
}
}
}
}
for ( iatt = 0; iatt < nvatts; iatt++ )
{
......@@ -6450,13 +6463,13 @@ int cdfInqContents(stream_t *streamptr)
{
streamptr->basetime.ncvarid = ncvarid;
ltimevar = TRUE;
if ( CDI_Debug )
if ( CDI_Debug )
fprintf(stderr, "timevar %s\n", ncvars[ncvarid].name);
}
else
{
if ( CDI_Debug )
fprintf(stderr, "skip timevar %s\n", ncvars[ncvarid].name);
fprintf(stderr, "skipped timevar %s\n", ncvars[ncvarid].name);
}
}
......
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