Calculate anomalies in ERA5

Hi everyone!

I'm using ERA5 land hourly and I want to obtain anomalies for 2017, considering:

  • the convention of 30 years, from Jan 1981 to Dec 2010
  • a range closer to 2017, from Jan 1991 to Dec 2020

My variables are 2m temperature, total precipitation and runoff. 

I found a way to obtain it through the how-to guides in CDS Toolbox documentation, I made some modifications in the Toolbox editor but it did not work, in fact the console reported -what I understood- various errors. 

Intuitively, the process I made was the following:

  1. Download data for a variable (2m temperature) and a year (2017)
  2. Convert units, in this case Kelvin to Celsius
  3. Convert time, hourly to daily values through average
  4. Compare values between the 30 years (1981-2010) and 2017 
  5. Obtain daily anomalies in temperature in Celsius for the whole year

Looking for other alternatives, I would like to know the way to do it in Python. 

If anyone knows, please share it. I will appreciate it!