I have a .nc file that contains data every 1 hour of precipitation, my interest is to add the daily precipitation. But for this I have to take into account the precipitation between 12 pm on one day and 12 pm on the other, so I cannot apply "daysum" of cdo. Any suggestion?
Asked
Active
Viewed 130 times
-1
-
1Previous answer seems applicable here: https://stackoverflow.com/a/59946046/7017006 – Robert Davy Mar 28 '22 at 00:14
-
Correct Robert, that's the solution – ClimateUnboxed Mar 28 '22 at 05:12
1 Answers
1
you can fudge it by shifting the time 12 hours, using daysum and then shifting it back:
cdo shifttime,12hours in.nc out1.nc
cdo daysum out1.nc out2.nc
cdo shifttime,-12hours out2.nc outer.nc
Using piping
cdo shifttime,-12hours -daysum -shifttime,12hours in.nc out.nc

ClimateUnboxed
- 7,106
- 3
- 41
- 86
-
Hello Adrian, im here again. Now i have a .nc file that contains data every 6 hours of precipitation. I need to change the shifttime command to 6 hours instead of 12 hours? – Fernando Primo Forgioni Jan 11 '23 at 12:33