Project

General

Profile

nighttime and daytime average from hourly data

Added by David RAGATOA about 2 years ago

Hi everyone,

I have an hourly ERA5 dataset and would like to compute the daytime (from 06:00 to 18:00) and nighttime (from 18:00 to 06:00) average.

I used daymean with -selhour,6/18 ( -selhour,19/06 -shifttime,-5 to shift to time back to 19:00 and take from 19:00 to 06:00).

The daytime average seems good but I am not sure of the nighttime results. The time bounds of the nighttimes are 1 January 1980 06:00:00 --> 19:00:00.
Any idea what the issue is?
Or how to compute the daytime/nighttime average on daily bases?

Please your help is appreciated.
Thank you


Replies (2)

RE: nighttime and daytime average from hourly data - Added by Ralf Mueller about 2 years ago

hi David!

First things first: a data upload makes things a lot clearer in most cases. time bounds are a bit hard to create in analytic data to reproduce your results

BTW: I am not sure that your approach works, but without the exact CDO calls its hard to say

cheers
ralf

RE: nighttime and daytime average from hourly data - Added by Ralf Mueller about 2 years ago

IMO something like this should do the trick:

cdo -s -shifttime,+12hours -selhour,6/18 -shifttime,-12hour  <ifile> <ofile>

I ignore any bounds problems here

    (1-2/2)