Project

General

Profile

timselmean skips the first timestep

Added by ep gupal almost 3 years ago

I have an hourly averaged data, and I would like to average this into 3 hourly. So, I am using the following command

cdo timselmean,3 in.nc out.nc

I expected that I would get something like

00, 03, 06, 09, ... in hours. But what I get is
01, 04, 07, 10, ...

So, in order to avoid this I used

cdo timselmean,3,0 in.nc out.nc

in order to prevent skipping the first timestep, but I keep getting the same results. How do I fix this?

Thanks.

I've uploaded the file that I am working with (with 12 timesteps).

tmp.nc (5.31 MB) tmp.nc

Replies (2)

RE: timselmean skips the first timestep - Added by Uwe Schulzweida almost 3 years ago

The timestamp in the output is in the middle of the involved input time steps. Use the CDO option --timestat_date to change it to the first time step:

cdo --timestat_date first timselmean,3 infile outfile

RE: timselmean skips the first timestep - Added by ep gupal almost 3 years ago

Oooh!It worked!
Thank you!

    (1-2/2)