Project

General

Profile

Accumulation of hourly to daily ERA5-Land latent heat flux [J/m2]

Added by Jonas Ardö over 1 year ago

Hi

I have some 50 files with one month each of hourly ERA5-Land latent heat flux [J/m2] data and I want daily LE (W/m2) in one output file.
Data cover 2019-01-01 to 202301-31
Data is accumulated with the value at yyyy-mm-dd 00:00:00 is the accumulation for the previous 24h.

Using cdo v 2.0.5.

cdo -seltime,00:00:00 -divc,86400 -mergetime MET_surface_latent_heat_flux_20*.grib MET_LE_daily_mergetime_v4.grib
cdo(1) divc: Process started
cdo(2) mergetime: Process started
cdo(2) mergetime: Processed 21540338208 values from 49 variables over 35808 timesteps.
cdo(1) divc: Processed 21540338208 values from 1 variable over 35808 timesteps.
cdo seltime: Processed 897514092 values from 1 variable over 35808 timesteps [208.40s 20MB].@

gives me a file with

Variable "Surface_latent_heat_flux_surface" (31 observations)
Variable "Surface_latent_heat_flux_surface_Mixed_intervals_Accumulation" (1461 observations)

Where I like one file with daily data for the period 2019-01-01 to 2023-01-31

Suggestion to solve this?

Example input data:
$ cdo info MET_surface_latent_heat_flux_2019-01_Africa_9km.grib
-1 : Date Time Level Gridsize Miss : Minimum Mean Maximum : Parameter ID
1 : 2019-01-01 00:00:00 0 601551 295732 : -2.2368e+07 -3.1925e+06 2.5192e+05 : 147.128
2 : 2019-01-01 01:00:00 0 601551 295732 : -1.3806e+06 -10708. 1.0901e+05 : 147.128
3 : 2019-01-01 02:00:00 0 601551 295735 : -2.6792e+06 -20985. 2.1921e+05 : 147.128
4 : 2019-01-01 03:00:00 0 601551 295735 : -3.9833e+06 -31117. 3.2936e+05 : 147.128
5 : 2019-01-01 04:00:00 0 601551 295735 : -5.3836e+06 -44381. 4.2361e+05 : 147.128
6 : 2019-01-01 05:00:00 0 601551 295732 : -6.8023e+06 -79057. 4.0585e+05 : 147.128
7 : 2019-01-01 06:00:00 0 601551 295733 : -8.1212e+06 -1.7303e+05 3.4321e+05 : 147.128
8 : 2019-01-01 07:00:00 0 601551 295732 : -9.3066e+06 -3.6968e+05 3.6488e+05 : 147.128
9 : 2019-01-01 08:00:00 0 601551 295732 : -1.0532e+07 -6.4069e+05 3.7733e+05 : 147.128
10 : 2019-01-01 09:00:00 0 601551 295732 : -1.1832e+07 -9.7454e+05 3.5836e+05 : 147.128
11 : 2019-01-01 10:00:00 0 601551 295732 : -1.3120e+07 -1.3546e+06 4.0733e+05 : 147.128
12 : 2019-01-01 11:00:00 0 601551 295732 : -1.4470e+07 -1.7507e+06 4.4125e+05 : 147.128
13 : 2019-01-01 12:00:00 0 601551 295732 : -1.5598e+07 -2.1317e+06 4.7491e+05 : 147.128
14 : 2019-01-01 13:00:00 0 601551 295732 : -1.6713e+07 -2.4646e+06 5.1572e+05 : 147.128
15 : 2019-01-01 14:00:00 0 601551 295732 : -1.7799e+07 -2.7360e+06 5.5660e+05 : 147.128
16 : 2019-01-01 15:00:00 0 601551 295732 : -1.9025e+07 -2.9362e+06 6.0239e+05 : 147.128
17 : 2019-01-01 16:00:00 0 601551 295732 : -2.0097e+07 -3.0603e+06 6.4902e+05 : 147.128
18 : 2019-01-01 17:00:00 0 601551 295732 : -2.1140e+07 -3.1272e+06 6.8181e+05 : 147.128
19 : 2019-01-01 18:00:00 0 601551 295732 : -2.2090e+07 -3.1609e+06 7.0380e+05 : 147.128
20 : 2019-01-01 19:00:00 0 601551 295732 : -2.3286e+07 -3.1836e+06 7.2099e+05 : 147.128
21 : 2019-01-01 20:00:00 0 601551 295732 : -2.3638e+07 -3.1995e+06 7.3048e+05 : 147.128
22 : 2019-01-01 21:00:00 0 601551 295732 : -2.3974e+07 -3.2132e+06 7.3175e+05 : 147.128
23 : 2019-01-01 22:00:00 0 601551 295732 : -2.4370e+07 -3.2253e+06 7.3427e+05 : 147.128
24 : 2019-01-01 23:00:00 0 601551 295732 : -2.4748e+07 -3.2364e+06 7.3616e+05 : 147.128
25 : 2019-01-02 00:00:00 0 601551 295732 : -2.5273e+07 -3.2468e+06 7.3778e+05 : 147.128
26 : 2019-01-02 01:00:00 0 601551 295736 : -1.1896e+06 -10099. 1.1691e+05 : 147.128


Replies (1)

RE: Accumulation of hourly to daily ERA5-Land latent heat flux [J/m2] - Added by Estanislao Gavilan over 1 year ago

Hi Jonas,

To convert hour to day, you need to use the command "daymean" which computes the daily mean. Also, if your input is chronologically ordered (i.e. input_2001, input_2002), you can use the command "cat". Cat is faster that mergetime. Lastly, the command divc means that you are dividing your entire timeseries by a constant. I hope it helps.

Kind regards,

Estanislao

    (1-1/1)