Project

General

Profile

calculate typical meteorological year - alternative to YMONMEAN, YMONMAX and YMONMIN

Added by david moreno over 1 year ago

Hi all,

I have a NC file with 30-year monthly data, for several variables (temperature, wind, precipitation, pressure, etc.).

The operators YMONMAX and YMONMIN give me the max and min multi-year monthly values of the variables: if the input file has 30*12 times, the output file will have 12 times (months), where each month is the max (if YMONMAX) or min (if YMONMIN) month of each variable. In other words, the January (time 1) of the output file will be the January corresponding to the max or min of each variable within the 30 "Januaries". And so forth for Feb, March, Apr, and so on.

I need to do something similar but only considering the temperature as the criteria for the max and min. This is, I need to get an output file with 12 months, where for each month I'll get ALL the variables from the hottest or coldest months. In other words, the January (time 1) of the output file will be the January corresponding to the max or min of the temperature within the 30 "Januaries", and the variables will be the ones from that "hottest" or "coldest" january, NOT the max or min from those variables. And so forth for Feb, March, Apr, and so on.

Is this possible with CDO??


Replies (1)

RE: calculate typical meteorological year - alternative to YMONMEAN, YMONMAX and YMONMIN - Added by Estanislao Gavilan over 1 year ago

Hi David,

it is definetly possible. I am no sure how to do it, but I can tell how to start. What you could do is to separate that operation into different steps. For instance you can use the command min and max to locate where are the hotest and coldest months by selecting the variable

cdo YMONMAX select,temp_variable infile outfile

Then, you can write another line to read the date of that outfile and extract the data of the remaining variables. I am not sure how to write that line. Try to find something similar in this forum. There are a lot of posts related with conditions that can help you to write your script.

Kind regards,

Estanislao

    (1-1/1)