GreenScheduler / cats

CATS: the Climate-Aware Task Scheduler :cat2: :tiger2: :leopard:
https://greenscheduler.github.io/cats/
MIT License
47 stars 7 forks source link

How to best estimate an average carbon intensity over the duration of a job #42

Open Llannelongue opened 1 year ago

Llannelongue commented 1 year ago

We have been discussing with @tlestang about what the data collected by the carbon intensity.org.uk represents, and therefore how best to calculate the average CI over a long period of time.

The API sends data for 30min periods, each value having a from and a to parameter (e.g. 50 gCO2e from 7:00am to 7:30am).

There are at least two ways these values can have been obtained (figure below).

IMG_3193

Assuming the blue line is the real (continue) CI forecast:

  1. The values provided can be timepoints on that curve (red dots) that are then provided for the next 30min (in the example above, the value for 9:00-9:30 would be 40)
  2. Or they could have already been averaged over the 30min (green lines). In the example above, the value for 9:00-9:30 would be 45.
  3. The consequence is that in case (1), it is best to approximate the blues curve by using some form of integration between the red dots (trapezoidal was used so far), while in (2), it is best to sum the respective averages (easier).

Probably best to have both options implemented for when/if we add now APIs, but also good to have a good understanding of what's best.

I'm emailing the people in charge to ask about that, but good to hear everyone's thoughts about that! (as it's quite an important part of the tool!)

tlestang commented 1 year ago

carbonintensity.org.uk says (under Methodology):

The demand and generation by fuel type (gas, coal, wind, nuclear, solar etc.) for each region is forecast several days ahead at 30-min temporal resolution [...]. The forecasts are updated every 30 mins using a nowcasting technique to adjust the forecasts a short period ahead.

The natiogridESO report (link) says:

The GB carbon intensity $C_t$ at time $t$ is found by weighting the carbon intensity $cg$ for fuel type $g$ by the generation $P{g,t}$ of that fuel type. This is then divided by national demand $D_t$ to give the carbon intensity for GB

To me this is indicating that intensity values provided by the API are point estimates rather that the result of an average over the 30min period.

Let's see what they say

tlestang commented 1 year ago

@Llannelongue did you hear from the people behind carbonintensity.org.uk about this?