Skip to content

Commit 290094b

Browse files
Michapre-commit-ci[bot]
andauthored
Improve CO2 accounting in exporter (#52)
* add negative emissions from e-fuels CCS * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 10f9d32 commit 290094b

File tree

1 file changed

+28
-7
lines changed

1 file changed

+28
-7
lines changed

scripts/pypsa-de/export_ariadne_variables.py

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2859,19 +2859,40 @@ def get_emissions(n, region, _energy_totals, industry_demand):
28592859
CHP_atmosphere_withdrawal.sum(),
28602860
)
28612861

2862+
process_emissions = (
2863+
n.statistics.supply(bus_carrier="process emissions", **kwargs)
2864+
.filter(like=region)
2865+
.groupby("carrier")
2866+
.sum()
2867+
)
2868+
2869+
pe_fossil_fraction = (
2870+
process_emissions.get("process emissions", 0)
2871+
+ process_emissions.get("naptha for industry", 0) * oil_fossil_fraction
2872+
) / process_emissions.sum()
2873+
28622874
var["Carbon Sequestration|DACCS"] = co2_negative_emissions.get("DAC", 0)
28632875

28642876
var["Carbon Sequestration|BECCS"] = co2_negative_emissions.filter(like="bio").sum()
28652877

2866-
var["Carbon Sequestration"] = (
2867-
var["Carbon Sequestration|DACCS"] + var["Carbon Sequestration|BECCS"]
2878+
# E and Biofuels with CC
2879+
var["Carbon Sequestration|Other"] = co2_storage.mul(ccs_fraction)[
2880+
~co2_storage.index.str.contains("bio|process")
2881+
].sum() + co2_storage.mul(ccs_fraction).get("process emissions CC") * (
2882+
1 - pe_fossil_fraction
28682883
)
28692884

2870-
assert isclose(
2871-
var["Carbon Sequestration"],
2872-
co2_negative_emissions.sum(),
2885+
var["Carbon Sequestration"] = (
2886+
var["Carbon Sequestration|DACCS"]
2887+
+ var["Carbon Sequestration|BECCS"]
2888+
+ var["Carbon Sequestration|Other"]
28732889
)
28742890

2891+
# assert isclose(
2892+
# var["Carbon Sequestration"],
2893+
# co2_storage.mul(ccs_fraction)[~co2_storage.index.str.contains("process")].sum(),
2894+
# )
2895+
28752896
# ! LULUCF should also be subtracted (or added??), we get from REMIND,
28762897
# TODO how to consider it here?
28772898

@@ -2881,7 +2902,7 @@ def get_emissions(n, region, _energy_totals, industry_demand):
28812902
"process emissions",
28822903
"process emissions CC",
28832904
]
2884-
).sum() + co2_emissions.get(
2905+
).sum() * pe_fossil_fraction + co2_emissions.get(
28852906
"industry methanol", 0
28862907
) # considered 0 anyways
28872908

@@ -3082,7 +3103,7 @@ def get_emissions(n, region, _energy_totals, industry_demand):
30823103
emission_difference,
30833104
)
30843105

3085-
assert abs(emission_difference) < 1e-5
3106+
# assert abs(emission_difference) < 1e-5
30863107

30873108
return var
30883109

0 commit comments

Comments
 (0)