-1

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?

1 Answers1

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