quintel / etsource

Data source for the Energy Transition Model
https://energytransitionmodel.com/
MIT License
12 stars 8 forks source link

Static from_energy.conversion in molecule graph should be dynamic #3023

Open mabijkerk opened 6 months ago

mabijkerk commented 6 months ago

Background In the molecule graph, industry nodes determine their CO2 flow based on hardcoded values for the co2_conversion_per_mj of the selected carrier. For example for in the industry_final_demand_for_chemical_fertilizers_network_gas_co2 node:

- from_energy.source = industry_final_demand_for_other_paper_network_gas
- from_energy.direction = input
- from_energy.conversion.network_gas = 0.0564
- input.co2 = 1.0

Issue This is problematic for a few reasons:

  1. Different CO2 emission factors may exist for different regions, this is the case for example for natural gas, of which the emission factor can be changed in the Dataset Manager.
  2. Some carriers are actually aggregate carriers of which the exact composition may change. For example network gas can consist of natural gas, green gas and propane, each with their own co2_conversion_per_mj. The same applies to crude oil, which may be a mix of several carriers, like bio oil etc.

The result is that the flows in the molecule graph do not match the CO2 emission factors of the associated carriers in the energy graph.

Solution Instead of hardcoded values, we would need to implement a way in which the molecule graph can retrieve these values dynamically. When a region has a different emission factor, or when a user changes the composition of an aggregate carrier, this needs to be accurately reflected in the molecule flows.

Note, this has already been attempted in some way, see https://github.com/quintel/etsource/commit/1d67bd923982b341e7b35daffdad5a2f7e3c4f16. However, instead of taking the carrier value, we might take the weighted_carrier_co2_per_mj of the relevant energy node as it is likely to produce the desired result.

Notifying @kaskranenburgQ and @kndehaan

github-actions[bot] commented 4 months ago

This issue has had no activity for 60 days and will be closed in 7 days. Removing the "Stale" label or posting a comment will prevent it from being closed automatically. You can also add the "Pinned" label to ensure it isn't marked as stale in the future.