Project

General

Profile

Extract timestep values from cumulative time series

Added by Marco Alves about 3 years ago

Hello all,

Does anyone know how to extract hourly values from a daily accumulated time series?

I am working with the ERA5Land reanalysis data at hourly timesteps. In this dataset, variables such as precipitation and radiative fluxes are accumulated from the beginning of the forecast time (hour 00, step 1) to the end of the forecast step (hour 00, step 24, day+1).

So, to get the unaccumulated hourly values, I firstly have to shift the time steps to 1 hour, and after, I need to calculate the difference between the timesteps within the same day (keeping the hour 00 as it is).

I know that with the function 'deltat', I can calculate the difference between the timesteps. But in this case, the differences must be calculated within each day instead of the entire time series.

Thanks in advance!

;)


Replies (2)

RE: Extract timestep values from cumulative time series - Added by Karin Meier-Fleischer about 3 years ago

Hi Marco,

if I understand you right then you mean

cdo -dayavg -deltat infile outfile?

-Karin

RE: Extract timestep values from cumulative time series - Added by Marco Alves about 3 years ago

Hi Karen,

Thanks for your reply.

Actually, I expect to get the hourly values and not the daily mean.

For example, ERA5Land gives the hourly accumulated precipitation (Cum_Precip column), but I want to get the hourly precipitation values (Precip column).

day 1
hour Cum_Precip Precip
00 0.1 0.1
01 0.2 0.1
02 0.2 0.0
03 0.5 0.3
04 0.6 0.1
. . .
. . .
23 1.0 n - (n-1)

day 2
hour Cum_Precip Precip
00 0.2 0.2
01 0.4 0.2
02 0.4 0.0
03 0.5 0.1
04 0.6 0.1
. . .
. . .
23 1.0 n - (n-1)

Cheers

    (1-2/2)