I'm currently working with daily climate data (ERA5) and am analysing it with xarray.
da
<xarray.DataArray (time: 8036)>
dask.array<stack, shape=(8036,), dtype=float32, chunksize=(1,), chunktype=numpy.ndarray>
Coordinates:
* time (time) datetime64[ns] 1979-01-01 1979-01-02 ... 2000-12-31
I want to calculate the daily anomaly of this data from the local monthly mean of the time-series. That is, I want to take away the average of (eg) January 1979 from all the days in January 1979. And I'd like to do this for every month of every year in my array.
I don't think there is a simple way to do this with xarray at the moment, but I'd appreciate any workarounds people can find! :)