Project

General

Profile

Indexes/timesteps of cdo yearmax

Added by Oliver Angelil about 6 years ago

Instead of getting the maximum value per year like cdo yearmax would do, is it possible to get the index/timestep of the maximum; being the day of the year. So I'd end with a netcdf file of the same dimensions as what cdo yearmax file.nc would give me, except it would consist of integers from 0 - 364 (365 is possible for leap years).

Oliver


Replies (5)

RE: Indexes/timesteps of cdo yearmax - Added by Ralf Mueller about 6 years ago

hi Oliver!

there is no such operator at the moment. Many users have similar requests, but there is no CF-compliant way of saving time-values as data fields. Integer seems to be the logical consequence, but I see no operators to work in such fields. I guess I have to take some time to think and talk to Uwe about it.

cheers
ralf

RE: Indexes/timesteps of cdo yearmax - Added by Uwe Schulzweida about 6 years ago

The next CDO release 1.9.4 comes with the operator yearmaxidx:)

RE: Indexes/timesteps of cdo yearmax - Added by Oliver Angelil almost 6 years ago

Hi Uwe,

That's great news. It might also be useful to have a command that could then use the output of yearmaxidx to extract data. For example, I may want to know what the humidity/pressure/etc conditions were on the hottest day of the year, for every grid cell and every year. I am guessing this would be handy for many climate scientists / meteorologists.

Thanks for the awesome piece of software.

Oliver

RE: Indexes/timesteps of cdo yearmax - Added by Uwe Schulzweida almost 6 years ago

Hi Oliver,

I have added the operator selyearidx to extract data by indices created with yearmaxidx/*yearminidx*. Both operators have the status experimental. Documentation is not available, yet. Here is an example:

cdo yearmaxidx infile idxfile
cdo selyearidx idxfile infile outfile
If you like, you can test it is with CDO prerelease 1.9.4rc3. Your feedback is very welcome!

Cheers,
Uwe

    (1-5/5)