Skip to content

Commit

Permalink
separate domestic and international aviation
Browse files Browse the repository at this point in the history
This is required so that other models can do CO2 limits on each type
of aviation separately.
  • Loading branch information
nworbmot committed Jan 29, 2024
1 parent 879e94c commit 29e0978
Showing 1 changed file with 30 additions and 25 deletions.
55 changes: 30 additions & 25 deletions scripts/prepare_sector_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -2868,40 +2868,45 @@ def add_industry(n, costs):

p_set = (
demand_factor
* pop_weighted_energy_totals.loc[nodes, all_aviation].sum(axis=1)
* pop_weighted_energy_totals.loc[nodes, all_aviation]
* 1e6
/ nhours
).rename(lambda x: x + " kerosene for aviation")

if not options["regional_oil_demand"]:
p_set = p_set.sum()

n.madd(
"Bus",
spatial.oil.kerosene,
location=spatial.oil.demand_locations,
carrier="kerosene for aviation",
unit="MWh_LHV",
)
for scope in ["domestic", "international"]:

n.madd(
"Load",
spatial.oil.kerosene,
bus=spatial.oil.kerosene,
carrier="kerosene for aviation",
p_set=p_set,
)
n.madd(
"Bus",
spatial.oil.kerosene,
suffix=f" {scope}",
location=spatial.oil.demand_locations,
carrier=f"kerosene for aviation {scope}",
unit="MWh_LHV",
)

n.madd(
"Link",
spatial.oil.kerosene,
bus0=spatial.oil.nodes,
bus1=spatial.oil.kerosene,
bus2="co2 atmosphere",
carrier="kerosene for aviation",
p_nom_extendable=True,
efficiency2=costs.at["oil", "CO2 intensity"],
)
n.madd(
"Load",
spatial.oil.kerosene,
suffix=f" {scope}",
bus=spatial.oil.kerosene + f" {scope}",
carrier=f"kerosene for aviation {scope}",
p_set=p_set[f"total {scope} aviation"],
)

n.madd(
"Link",
spatial.oil.kerosene,
suffix=f" {scope}",
bus0=spatial.oil.nodes,
bus1=spatial.oil.kerosene + f" {scope}",
bus2="co2 atmosphere",
carrier=f"kerosene for aviation {scope}",
p_nom_extendable=True,
efficiency2=costs.at["oil", "CO2 intensity"],
)

# TODO simplify bus expression
n.madd(
Expand Down

0 comments on commit 29e0978

Please sign in to comment.