Taking values at different time
Added by Puri Am over 3 years ago
Hi,
I have a set of hourly data and I would like to take the values of the variable (let's say precipitation) from 8pm to 23 pm of today and 0h to 8 am of next day. I wonder which operators could be useful here?
Thanks a lot!!
Replies (5)
RE: Taking values at different time - Added by Karin Meier-Fleischer over 3 years ago
Hi Puri,
shifttime is your favorite. See https://code.mpimet.mpg.de/projects/cdo/embedded/cdo.pdf#subsection.2.6.4
-Karin
RE: Taking values at different time - Added by Puri Am over 3 years ago
Hi,
So you mean shifttime into 4 files then do the calculation as normal?
best
RE: Taking values at different time - Added by Karin Meier-Fleischer over 3 years ago
It depends what you want to do. Do you have to shift the time for a few file or do you have to do it at the end?
E.g.
cdo -O -shifttime,8hours -mergetime file1.nc file2.nc file3.nc file4.nc outfile.nc
RE: Taking values at different time - Added by Puri Am over 3 years ago
Hi,
I mean I only need the value in the period of time, let's say: from 8pm to 23pm
All the best,
RE: Taking values at different time - Added by Karin Meier-Fleischer over 3 years ago
cdo -O -seltime,08:00:00,09:00:00,10:00:00,11:00:00,12:00:00,13:00:00,14:00:00,15:00:00,16:00:00,17:00:00,18:00:00,19:00:00,20:00:00,21:00:00,22:00:00,23:00:00 -mergetime file*.nc outfile.nc