Skip to content

Commit 48c9bb7

Browse files
author
Micha
authored
Merge pull request #87 from PyPSA/fix-PE-reporting
report decentral heat in primary energy
2 parents cf78190 + 8f600c1 commit 48c9bb7

1 file changed

Lines changed: 3 additions & 40 deletions

File tree

workflow/scripts/export_ariadne_variables.py

Lines changed: 3 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -711,21 +711,8 @@ def get_primary_energy(n, region):
711711
var["Primary Energy|Oil|Electricity"] = \
712712
oil_usage.get("oil", 0) + oil_CHP_E_usage
713713

714-
var["Primary Energy|Oil"] = (
715-
var["Primary Energy|Oil|Electricity"]
716-
+ var["Primary Energy|Oil|Heat"]
717-
+ oil_usage.reindex( # This is more like final energy than primary energy??
718-
[
719-
"land transport oil",
720-
"agriculture machinery oil",
721-
"shipping oil",
722-
"kerosene for aviation",
723-
"naphtha for industry"
724-
],
725-
).sum()
726-
)
714+
var["Primary Energy|Oil"] = oil_usage.sum()
727715

728-
# assert isclose(var["Primary Energy|Oil"], oil_usage.sum())
729716

730717
regional_gas_supply = n.statistics.supply(
731718
bus_carrier="gas",
@@ -778,18 +765,7 @@ def get_primary_energy(n, region):
778765
var["Primary Energy|Gas|Hydrogen"] = \
779766
gas_usage.filter(like="SMR").sum()
780767

781-
var["Primary Energy|Gas"] = (
782-
var["Primary Energy|Gas|Heat"]
783-
+ var["Primary Energy|Gas|Electricity"]
784-
+ var["Primary Energy|Gas|Hydrogen"]
785-
+ gas_usage.filter(like="gas for industry").sum()
786-
)
787-
788-
# assert isclose(
789-
# var["Primary Energy|Gas"],
790-
# gas_usage.sum(),
791-
# )
792-
# ! There are CC sub-categories that could be used
768+
var["Primary Energy|Gas"] = gas_usage.sum()
793769

794770

795771
waste_CHP_E_usage, waste_CHP_H_usage = get_CHP_E_and_H_usage(
@@ -871,23 +847,10 @@ def get_primary_energy(n, region):
871847
var["Primary Energy|Biomass|Heat"] = \
872848
biomass_CHP_H_usage + biomass_usage.get("urban central solid biomass boiler", 0)
873849

874-
# var["Primary Energy|Biomass|Gases"] = \
875-
# In this case Gases are only E-Fuels in AriadneDB
876-
# Not possibly in an easy way because biogas to gas goes to the
877-
# gas bus, where it mixes with fossil imports
878850

879-
var["Primary Energy|Biomass"] = (
880-
var["Primary Energy|Biomass|Electricity"]
881-
+ var["Primary Energy|Biomass|Heat"]
882-
+ biomass_usage.filter(like="solid biomass for industry").sum()
883-
+ biomass_usage.filter(like="biogas to gas").sum()
884-
)
851+
var["Primary Energy|Biomass"] = biomass_usage.sum()
885852

886853

887-
# assert isclose(
888-
# var["Primary Energy|Biomass"],
889-
# biomass_usage.sum(),
890-
# )
891854

892855
var["Primary Energy|Nuclear"] = \
893856
n.statistics.withdrawal(

0 commit comments

Comments
 (0)