Project

General

Profile

WRF outut and cdo

Added by patrik laux over 11 years ago

Dear CDO users,

as a CDO newbie I am wondering of how to make use of cdo to process wrf-output files. I performed climate simulations from 1961-1990 and 2020-2050 with a resolution of 6 hours. I stored the output in monthly files. The overall goal is to calculate the climate change signal (future minus past) for the domain of interest and on a monthly basis, i.e. are future Jan, Feb, etc. expected to be warmer/cooler?. Finally, I would like to come up with a) 12 values for the past (long term-mean values for 1961-1990) and 12 values for the future. b) In addition to that, I would like to compare each month in a spatial sense (map of domain for future Jan values minus map of domain for past values).
I was reaading the manual, but am still not sure how to do that. I think several steps will be necessary:
- calculate mean values for each month (Jan 1961, Jan 1962, Jan 1963, etc.); the output of e.g. the Jan 1961 ends at 01/02/1961 at 00:00:00 h, thus, the monmean function will possibly create 2 files out of 1 wrfoutput file?!
- calculate long-term mean values (Jan1961-1990)
- concatenate the files to one file (not sure if necessary?)
- perform the same steps for the future time slice
- for aspect a) (see above): average the values over the domain of interest
- calculate differences

I am grateful for any hints on that, suggested functions, order of commands, etc. I also found in manual that these steps can be done at once (pipe!)


Replies (2)

RE: WRF outut and cdo - Added by Jaison-Thomas Ambadan over 11 years ago

Hi,

Welcome to the CDO world! ;)

I stored the output in monthly files.

what is the format of the file; GRIB/NetCDF (it doesn't really matter in general)

- concatenate the files to one file (not sure if necessary?)

I think it is better to concatenate first. To do so:

cdo -mergetime *.nc all_year.nc

for more details, see https://code.zmaw.de/embedded/cdo/1.5.5/cdo.html#x1-720002.2.3

From an earlier post by Uwe Schulzweida : "it is a good praxis to name/rename your files in a way that there are alphanumerically sorted. it is very important for the CDO operators copy, cat and mergetime."

- calculate mean values for each month (Jan 1961, Jan 1962, Jan 1963, etc.);

cdo -monmean all_year.nc all_year_month_mean.nc

OR

for january mean:

cdo -monmean -selmon,1 all_year.nc all_year_jan_mean.nc

calculate long-term mean values (Jan1961-1990)

cdo -ymonmean all_year.nc lonterm_mean.nc

OR for January alone:

cdo -ymonmean -selmon,1 all_year.nc lonterm_jan_mean.nc

for more info: https://code.zmaw.de/embedded/cdo/1.5.5/cdo.html#x1-4170002.8.29

average the values over the domain of interest

e.g., for tropics (180E/180W, 20S/20N) jan monthly mean

cdo -ymonmean -sellonlatbox,-180,180,-20,20 -selmon,1 all_year.nc trop_longterm_jan_mean.nc

- calculate differences

https://code.zmaw.de/embedded/cdo/1.5.5/cdo.html#x1-2300002.7.4

Regarding the calculation of average/mean (using ANY operator):

https://code.zmaw.de/embedded/cdo/1.5.5/cdo.html#x1-290001.7.1

Cheers,
J.

RE: WRF outut and cdo - Added by patrik laux over 11 years ago

Thank you very much for your quick and comprehensive reply!!!!!!!!!!!

    (1-2/2)