Commit 85e48994 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Implementation of CDI_reduce_dim for time axis.

parent a10e945b
......@@ -4,6 +4,7 @@
2017-08-30 Uwe Schulzweida
* Implementation of CDI_reduce_dim for time axis
* cdfDefAxisCommon: bug fix for zaxis bounds in CDI_cmor_mode
2017-08-08 Uwe Schulzweida
......
......@@ -381,7 +381,7 @@ int cdfDefVar(stream_t *streamptr, int varID)
int tid = streamptr->basetime.ncdimid;
if ( tsteptype != TSTEP_CONSTANT )
if ( !CDI_reduce_dim && tsteptype != TSTEP_CONSTANT )
{
if ( tid == CDI_UNDEFID ) Error("Internal problem, time undefined!");
chunks[ndims] = 1;
......
......@@ -1499,12 +1499,15 @@ int vlistHasTime(int vlistID)
bool hastime = false;
vlist_t *vlistptr = vlist_to_pointer(vlistID);
for ( int varID = 0; varID < vlistptr->nvars; varID++ )
if ( vlistptr->vars[varID].tsteptype != TSTEP_CONSTANT )
{
hastime = true;
break;
}
if ( !(CDI_reduce_dim && vlistptr->ntsteps == 1) )
{
for ( int varID = 0; varID < vlistptr->nvars; varID++ )
if ( vlistptr->vars[varID].tsteptype != TSTEP_CONSTANT )
{
hastime = true;
break;
}
}
return (int)hastime;
}
......
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