seldate function
Added by T. Tob over 11 years ago
Hallo CDO,
I have a simple question regarding the use of the seldate for my purpose.
What I want is to use seldate for selecting first 90 days for each year e.g Jan-March 90 days
(seldate first 90 days in a year repeating for each year ~ 30 years), how could I implement the seldate function
with a looping method.
Thank you.
Replies (6)
RE: seldate function - Added by Ralf Mueller over 11 years ago
if you're interested in the first three months, you can use selmon:
cdo -selmon,1/3 ifile ofile
RE: seldate function - Added by T. Tob over 11 years ago
Hi Ralf,
Sorry for the unclear message, My data is daily for 30 years.
As we know sometimes we will have a leap year in the data, thus by selecting -selmon,1/3
will not guarantee that the lenght of the day is 90 (could be 89 or 91).
any suggestion?
RE: seldate function - Added by Jaison-Thomas Ambadan over 11 years ago
try
cdo -mergetime -selmon,1,3 ifile -selday,1/28 -selmon,2 ifile ofile
Cheers,
J
RE: seldate function - Added by Uwe Schulzweida over 11 years ago
I have extended the operator select by the key timestep_of_day to select the timesteps of a year. Here is an example to select the first 90 days of a multi year daily time series:
cdo select,timestep_of_year=1/90 ifile ofileThis feature will be available in the next CDO release. A prerelease will be available during the next week.
RE: seldate function - Added by T. Tob over 11 years ago
Thank you Uwe,
with this new function, is it possible to select a time steps of a year starting from arbitrary date?
for instance 90 days start from 5 January. ? thank you
RE: seldate function - Added by Uwe Schulzweida over 11 years ago
The above command selects the first 90 timesteps of each year. If the years start on 5th January then the first timestep is the 5th January.