Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream emissions #120

Draft
wants to merge 24 commits into
base: main
Choose a base branch
from
Draft

Upstream emissions #120

wants to merge 24 commits into from

Conversation

JulianGeis
Copy link
Contributor

@JulianGeis JulianGeis commented Jun 19, 2024

Move the co2 emission tracking from the current state of downstream tracking (downstream emissions: from use of products and end-of-life treatment (e.g. disposal)) to upstream tracking (upstream emissions: from raw materials (coal, oil)

Reason:

  • atm technologies which extract co2 from a store to consume it receive money and therefore the capex and the prices to the buses these technologies attend to are influenced (e.g. FT)
  • shifting the co2 tracking upstream alters the carriers / technologies which are being affected: now gas, oil and coal are directly restricted and pay higher prices than before

This change should not:

  • alter system costs
  • alter technology capacity, generation, ....

The only thing that should change are the marginal prices:

  • co2 atmosphere should be 0
  • oil, coal, lignite and gas prices should increase

ToDO:

  • take care of the constraint on German CO2 emissions in the current downstream cap -> constraint German gas/oil/coal/sequestration usage
  • remove "co2 atmosphere" bus an all links to it

@JulianGeis
Copy link
Contributor Author

JulianGeis commented Jul 18, 2024

One diff in 2040 is present for the hydrogen production:

kwargs = {
    'groupby': n.statistics.groupers.get_name_bus_and_carrier,
    'nice_names': False,
}

hydrogen_production = n.statistics.supply(
    bus_carrier="H2", **kwargs
).filter(like=region).groupby(
    ["carrier"]
).sum()

For downstream we have:
Downstream

upstream:
Upstream

@JulianGeis
Copy link
Contributor Author

JulianGeis commented Jul 18, 2024

What have I tested?

  • model is running in 3H resolution
  • upstream and downstream constraints lead to the same CO2 emissions both if you count them up or downstream
  • comparing upstream and downstream models

Comparison of 365H models:

downstream:

  • policy_carbon

-secondary_energy_detailed

upstream:

  • policy_carbon
  • secondary_energy_detailed

system costs (def=downstream; ue=upstream)

comparison:

expected difference:

  • Price-Primary-Energy-Coal
  • Price-Primary-Energy-Gas
  • Price-Primary-Energy-Oil
  • Price-Secondary-Energy-Liquids

unexpected differences:
Secondary-Energy-Liquids-Fossil
Secondary-Energy-Liquids-Hydrogen
Secondary-Energy-Liquids-Oil
Secondary-Energy-Methanol
Trade-Primary-Energy-Gas-Volume-Exports
Trade-Secondary-Energy-Hydrogen-Volume-Exports
Trade-Secondary-Energy-Liquids-Hydrogen-Volume
Trade-Secondary-Energy-Liquids-Hydrogen-Volume-Exports

@lindnemi
Copy link
Collaborator

Seems that the constraint on e-fuel imports/exports might be throwing things off. Possibly we should rewrite it to comply with how e-fuels are accounted in Ariadne, or even remove it altogether

@lindnemi
Copy link
Collaborator

A fairly straightforward way to ensure that all e-fuels are actually CO2-neutral would be to add the additional constraint that CO2 Sequestration has to be at least as high as sequestration from fossil sources

@JulianGeis
Copy link
Contributor Author

JulianGeis commented Jul 19, 2024

When comparing the downstream and upstream models and not restricting the e-fuel import / export (in the downstream constraint), the behaviour in 2040 is very similar. However now there is a difference in the hydrogen trade in 2045:

Hydrogen Trade in 2045

Trade-Secondary-Energy-Hydrogen-Volume

Trade-Secondary-Energy-Hydrogen-Volume-Exports

Trade-Secondary-Energy-Hydrogen-Volume-Imports

Trade-Secondary-Energy-Liquids-Hydrogen-Volume

Trade-Secondary-Energy-Liquids-Hydrogen-Volume-Exports

Trade-Secondary-Energy-Liquids-Hydrogen-Volume-Imports

Copy link

github-actions bot commented Sep 17, 2024

Validator Report

I am the Validator. Download all artifacts here.
I'll be back and edit this comment for each new commit.

⚠️ Config changes detected!

Results may differ due to these changes:

diff --git a/config/config.yaml b/config/config.yaml
index 18a70e0..2d2b26c 100644
--- a/config/config.yaml
+++ b/config/config.yaml
@@ -233,7 +233,7 @@ clustering:
     # 'ES': 0.0408
     # 'IT': 0.0612
   temporal:
-    resolution_sector: 365H
+    resolution_sector: 780H
 
 # docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#co2-budget
 co2_budget:
@@ -297,8 +297,6 @@ sector:
   regional_oil_demand: true  #set to true if regional CO2 constraints needed
   regional_coal_demand: true  #set to true if regional CO2 constraints needed
   gas_network: false
-  regional_gas_demand: true
-  H2_retrofit: true
   biogas_upgrading_cc: true
   biomass_to_liquid: true
   biomass_to_liquid_cc: true
@@ -401,7 +399,7 @@ solving:
   mem_mb: 70000 #30000 is OK for 22 nodes, 365H; 140000 for 22 nodes 3H; 400000 for 44 nodes 3H
   options:
     assign_all_duals: true
-    load_shedding: false
+    load_shedding: true
     skip_iterations: true # settings for post-discretization: false
     min_iterations: 1 # settings for post-discretization: 1
     max_iterations: 1 # settings for post-discretization: 1
@@ -632,6 +630,9 @@ must_run_biogas:
   p_min_pu: 0.6
   regions: ['DE']
 
+emissions_upstream:
+  enable: true
+
 transmission_projects:
   new_link_capacity: keep #keep or zero
 

General

Plots comparison
Main branch Feature branch
Image not available Image not available
Image not available Image not available
Image not available Image not available
Image not available Image not available
Image not available Image not available
Image not available Image not available
Files comparison
Status NRMSE MAE (norm)
csvs/nodal_cfs.csv ⚠️ Missing
csvs/supply.csv ⚠️ Missing
csvs/prices.csv ⚠️ Missing
csvs/nodal_supply_energy.csv ⚠️ Missing
csvs/nodal_capacities.csv ⚠️ Missing
csvs/weighted_prices.csv ⚠️ Missing
csvs/market_values.csv ⚠️ Missing
csvs/nodal_costs.csv ⚠️ Missing
csvs/cumulative_cost.csv ⚠️ Missing
csvs/price_statistics.csv ⚠️ Missing
csvs/curtailment.csv ⚠️ Missing
csvs/capacities.csv ⚠️ Missing
csvs/costs.csv ⚠️ Missing
csvs/metrics.csv ⚠️ Missing
csvs/cfs.csv ⚠️ Missing
csvs/supply_energy.csv ⚠️ Missing
csvs/energy.csv ⚠️ Missing

NRMSE: Normalized (combined-min-max) Root Mean Square Error
MAE (norm): Mean Absolute Error on normalized data (min-max)
Status Threshold: MAE (norm) > 0.05 and NRMSE > 0.3

Model Metrics

Benchmarks Image not available Image not available Image not available

Comparing upstream-emissions (e85823d) with main (e3cabf0).
Branch is 23 commits ahead and 0 commits behind.
Last updated on 2024-10-14 16:33:39 CEST.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants