Skip to content

Commit

Permalink
Merge pull request #359 from cpschau/fix_emission_bug
Browse files Browse the repository at this point in the history
Fix emission bug
  • Loading branch information
hazemakhalek authored Jul 18, 2024
2 parents 7f88c62 + a8cbb02 commit a84abcf
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions scripts/prepare_sector_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ def add_aviation(n, cost):
airports["p_set"].sum()
* domestic_to_total
* costs.at["oil", "CO2 intensity"]
)
).sum()

n.add(
"Load",
Expand Down Expand Up @@ -1398,7 +1398,7 @@ def add_shipping(n, costs):
ports["p_set"].sum()
* domestic_to_total
* costs.at["oil", "CO2 intensity"]
)
).sum()

n.add(
"Load",
Expand Down Expand Up @@ -1630,9 +1630,11 @@ def add_industry(n, costs):
spatial.nodes,
suffix=" low-temperature heat for industry",
bus=[
node + " urban central heat"
if node + " urban central heat" in n.buses.index
else node + " services urban decentral heat"
(
node + " urban central heat"
if node + " urban central heat" in n.buses.index
else node + " services urban decentral heat"
)
for node in spatial.nodes
],
carrier="low-temperature heat for industry",
Expand Down Expand Up @@ -2376,7 +2378,7 @@ def add_services(n, costs):
)

# TODO check with different snapshot settings
co2 = p_set_gas.sum(axis=1).mean() * costs.at["gas", "CO2 intensity"] * 8760
co2 = p_set_gas.sum(axis=1).mean() * costs.at["gas", "CO2 intensity"]

n.add(
"Load",
Expand Down Expand Up @@ -2575,7 +2577,7 @@ def add_residential(n, costs):
)

# TODO: check 8760 compatibility with different snapshot settings
co2 = p_set_gas.sum(axis=1).mean() * costs.at["gas", "CO2 intensity"] * 8760
co2 = p_set_gas.sum(axis=1).mean() * costs.at["gas", "CO2 intensity"]

n.add(
"Load",
Expand Down

0 comments on commit a84abcf

Please sign in to comment.