Project

General

Profile

timmax AND timmin simultaneously

Added by Charles Manson almost 13 years ago

Hi,

I have netcdf files (model output) with two variables, tmax and tmin.
They represent the max and min temperature for a day.
Each file contains all days in a month (e.g. Jan = 31 timesteps).

I would like to find the max of tmax and min of tmin for each file (hence getting the monthly max and min temp) and keep the two variables in one file.
If I use CDO's timmax, I can get the max of tmax, but this will also output the max of tmin.
And vice-versa for timmin.
Is there any way I can get the max of tmax and min of tmin in one go?
Otherwise I'll have to do timmax, then delete tmin on output, then do timmin on the original files, then delete tmax on output, then merge the resulting output files.
The entire dataset is in the terabyte range so I'd like to minimize processing.

Many thanks.


Replies (3)

RE: timmax AND timmin simultaneously - Added by Ralf Mueller almost 13 years ago

Try

cdo -merge -timmax -selname,tmax modelInput.nc -timmin -selname,tmin modelInput.nc

RE: timmax AND timmin simultaneously - Added by Charles Manson almost 13 years ago

Hi Ralf,

Great! It works (added output file at end).
I didn't realize commands could be chained.
CDO is a truly amazing tool, making life much easier.

thanks.

RE: timmax AND timmin simultaneously - Added by Ralf Mueller almost 13 years ago

Despite the pure number of possible operations, the operator chaining is the most powerful feature of CDO (imo), because you can create your own operators from the existing ones. Have a look at the tutorial for some simple examples.

regards
ralf

    (1-3/3)