Daily total rainfall from AUS2200 output

In this case I’m using xarray to read in all the data into a single virtual dataset (called ds for convenience), so the time-0 dimension has length 36, which was all the data that was available. If they’re 10 minutes apart then that is 6 hours, not 24.

So the python command below is accessing just the fld_s04i201 variable by accessing it directly as a key value for the ds object, then calling the .resample method to convert to daily (1D) time intervals and then calling the .sum() as the aggregating function for the resample operation

ds['fld_s04i201'].resample(time_0='1D').sum()

Here are some resources about the resample operation

Glad you got the cdo version working. The advantage of python is that it doesn’t have to create lots of intermediate data, which wastes space and can rapidly fill directories with lots of derivative data.

Also using python in jupyter notebooks provides a nicer data exploration interface, and provides some record of you work, which can be useful to refer to later on.

1 Like