You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/measuring/carbon/grid-carbon-intensity.md
+25-7Lines changed: 25 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,21 +18,39 @@ Examples of available databases and services can be found on the Green Software
18
18
19
19
## Relevance for the Green Metrics Tool
20
20
21
-
Grid carbon intensity is the **I** parameter in the [Software Carbon Intensity (SCI)]({{< relref "sci" >}}) metric. The Green Metrics Tool uses grid carbon intensity to transform the measured energy consumption into carbon emissions based on local grid characteristics.
21
+
The Green Metrics Tool uses grid carbon intensity to transform the measured energy consumption into operational carbon emissions based on local grid characteristics.
22
+
23
+
In the [Software Carbon Intensity (SCI)]({{< relref "sci" >}}) metric this value corresponds to the **I** parameter. Previously this was configured as a single static `sci.I` value in the `config.yml`. **This is no longer the case.** The carbon intensity is now supplied by a dedicated **carbon intensity metric provider**, which lets you choose between a static value and live grid data on a per-run basis.
24
+
25
+
## Carbon Intensity Providers
26
+
27
+
You select how the grid carbon intensity is determined by activating one of the carbon intensity providers in the `metric-providers` section of your `config.yml`. The following providers are available:
28
+
29
+
-**Static** (`CarbonIntensityStaticMachineProvider`) — Uses a fixed value you configure. This is the direct replacement for the old `sci.I` value and gives you **reproducible measurements** and **fair comparisons** (every run on the same machine uses the same baseline).
30
+
-**Electricity Maps** ([CarbonIntensityElectricitymapsMachineProvider]({{< relref "../metric-providers/carbon-intensity-electricitymaps-machine" >}})) — Fetches the real grid carbon intensity for your region and measurement window from the [Electricity Maps API](https://www.electricitymaps.com/).
31
+
-**Elephant** ([CarbonIntensityElephantMachineProvider]({{< relref "../metric-providers/carbon-intensity-elephant-machine" >}})) — Fetches the carbon intensity from a self-hosted or remotely hosted [Elephant](https://github.com/green-coding-solutions/elephant) service. Elephant is a small HTTP service developed by us that aggregates carbon intensity data from multiple upstream sources (e.g. Bundesnetzagentur, Electricity Maps) behind a uniform REST interface, without leaking any information to a third party. It can also *simulate* arbitrary carbon intensity curves so the same workload can be re-evaluated under different grid scenarios.
22
32
23
33
### Configuration
24
34
25
-
You can configure the grid carbon intensity as part of the [SCI]({{< relref "sci" >}}) configuration in`config.yml`:
35
+
The static provider is the most common choice if you want a stable baseline. You configure it under `measurement.metric-providers.common` in your`config.yml`:
26
36
27
37
```yml
28
-
sci:
29
-
I: 334# Grid carbon intensity in gCO2e/kWh (example value for Germany 2024)
38
+
measurement:
39
+
metric-providers:
40
+
common:
41
+
carbon_intensity_static_machine:
42
+
# Static carbon intensity in gCO2e/kWh. Replaces the former SCI 'I' value.
43
+
# The number 342 is for Germany 2025 (https://app.electricitymaps.com/zone/DE/all/yearly)
44
+
value: 342
45
+
sampling_rate: 99# Remove if you don't want value padding
30
46
```
31
47
32
-
GMT calculates the operational carbon emissions by multiplying measured energy consumption by the grid carbon intensity value.
48
+
GMT calculates the operational carbon emissions by multiplying the measured energy consumption by the carbon intensity value reported by the active provider.
49
+
50
+
For the configuration details of the live providers see the dedicated provider pages linked above and the [Configuration →]({{< relref "../configuration" >}}) documentation.
33
51
34
52
### Static vs Dynamic Values
35
53
36
-
The Green Metrics Tool uses **static** grid carbon intensity values rather than dynamic real-time data. This design choice ensures **reproducible measurements** (results remain consistent across different measurement times) and **fair comparisons** (measurements on the same machine with the same configuration use the same baseline for carbon intensity).
54
+
The **static** provider uses a single carbon intensity value rather than dynamic real-time data. This ensures **reproducible measurements** (results remain consistent across different measurement times) and **fair comparisons** (measurements on the same machine with the same configuration use the same baseline for carbon intensity). You should set the value to represent the typical or average value for your location.
37
55
38
-
You should set the grid carbon intensity to represent the typical or average value for your location.
56
+
The **Electricity Maps** and **Elephant** providers instead attach the *actual* grid carbon intensity for the time the measurement ran. This reflects reality more closely, but means that two otherwise identical runs can produce different carbon results depending on when they were executed. Choose the approach that matches your goal: a stable baseline for comparing software versions, or live data for reporting real-world impact.
0 commit comments