Project

General

Profile

Find first and last day of year matching criteria

Added by David Gobbett over 12 years ago

Hello,

I want to perform analysis of daily climate data grids to find the first and last day of a year (or other time period) meeting certain criteria.

For example, find the first day of year where minimum temperature < 5 degrees.

While the ltc operator would let me select the days less than 5 degrees, then if I could set a variable for each of those days to the value of the day of year, I could then use yearmin to find the first day. However, is there a way I can obtain the day of year (1..366) value for each timestep?

Any suggestions appreciated.

thanks
David

PS Apologies for cross-posting. I posted to the wrong forum initially.


Replies (3)

RE: Find first and last day of year matching criteria - Added by Uwe Schulzweida over 12 years ago

Hi David,

I have added this functionality to the next CDO version. Please find attached a prerelease CDO version which already include the operator muldoy (multiply with the day of year). You have to set all zeros to missing value before using yearmin:

cdo yearmin -setctomiss,0 -muldoy -ltc,5 ifile ofile
The status of this operator is experimental and there is no documentation available, yet.

Best regards,
Uwe

RE: Find first and last day of year matching criteria - Added by David Gobbett over 12 years ago

Hi Uwe,
Thanks for your excellent help yet again! That seems to be a clever solution which could be applied to a variety of similar questions. I will try out the new version in coming days and let you know how it goes.
regards
David

RE: Find first and last day of year matching criteria - Added by David Gobbett about 12 years ago

Hello Uwe,

I have (finally!) trialled the muldoy operator in that context and it appears to work well.

Thanks

    (1-3/3)