Project

General

Profile

operator timavg keeps singleton time dimension

Added by Stephane Senesi over 9 years ago

Some operators, like timavg (and fldavg), produce data where the time (resp. lat and lon ) dimensions are reduced to a singleton. I wonder why this quite useless dimension is kept in the resulting datafile. I guess that I am here failing to imagine a most relevant reason, but I would see a use only if :
- the singleton value was present in the file, woth a thorough convention about what it means with respect to the wholme averaged period (I think that it is the case with CDO)
- AND the period over which the average is computed was recorded in the NetCDF file, either as to time_bounds values or as a metadata (which is not the case)


Replies (3)

RE: operator timavg keeps singleton time dimension - Added by Uwe Schulzweida over 9 years ago

You are right these dimensions are quite useless but sometimes necessary. The CDO internal I/O library has needed these dimension to detect the variables and coordinates correctly. In the mean time this I/O library do not need these dimension anymore. I have added the new CDO option --reduce_dim to reduce the dimension in timavg and fldavg if needed. I think this could be possibly the default for the operator fldmean. For timavg the time and time_bounds metadata are often necessary for further processing.

RE: operator timavg keeps singleton time dimension - Added by Stephane Senesi over 9 years ago

Thanks for taking care of this remark. Actually, I was wrong when stating that the averaging period was not recorded: it is actually recorded, at least for timavg, through the time_bnds variable. And so, the former behavior was much sensible. But having the option to discard the degenrated dimension is even finer. I think tehre is no need to introduce a change in teh default behaviour, even for fldavg

    (1-3/3)