Project

General

Profile

Calculating hourly mean using CDO

Added by Sandra Richard about 7 years ago

Hi,
I need some help in calculating the hourly mean for the netcdf data from a model output using CDO command.
Each of the files contains 24 hour time steps (hourly rainfall), for 9 years, starting from 1 Dec – 28 Feb (DJF). The rainfall values is written as rain(time, latitude, longitude). Files are written for each day as below.
rain_20081201.nc, rain_20081202.nc … rain_20090228.nc
rain_20091201.nc, rain_20101202.nc … rain_20100228.nc … etc

My question is can I use CDO to directly calculate the hourly mean for all files? Would CDO calculate it correctly even if there is data from 1 Mar-30Nov missing every year? What is the correct way to calculate the mean hourly rainfall for my case?
Thank you.


Replies (3)

RE: Calculating hourly mean using CDO - Added by Ralf Mueller about 7 years ago

yhourmean should do it, if I got it right.

RE: Calculating hourly mean using CDO - Added by Sandra Richard about 7 years ago

Ralf Mueller wrote:

yhourmean should do it, if I got it right.

Thanks for your reply, Ralf.
However, this function indicates that I need to have a yearly data (8784 time step). In my case, I only have a 3 months data for DJF (December of the previous year, Jan&Feb of the current year). Would yhourmean still calculate the right answer if I only have 3 months values?

RE: Calculating hourly mean using CDO - Added by Ralf Mueller about 7 years ago

Sandra,
give it a try or upload some sample data a I will give it a try. In any case - we'll make it work for you ;-)

    (1-3/3)