From 7c02c5afa44f2a1f67238c86006ba89e96d4d03c Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Sun, 22 Sep 2024 10:40:16 +0200 Subject: [PATCH 1/2] bugfix: account for kerosene emissions in methanol-to-kerosene link --- scripts/prepare_sector_network.py | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index fcbacd385..21cbfc2cf 100755 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -931,25 +931,10 @@ def add_methanol_to_power(n, costs, types=None): def add_methanol_to_kerosene(n, costs): - nodes = pop_layout.index - nhours = n.snapshot_weightings.generators.sum() - - demand_factor = options["aviation_demand_factor"] - tech = "methanol-to-kerosene" logger.info(f"Adding {tech}.") - all_aviation = ["total international aviation", "total domestic aviation"] - - p_nom_max = ( - demand_factor - * pop_weighted_energy_totals.loc[nodes, all_aviation].sum(axis=1) - * 1e6 - / nhours - * costs.at[tech, "methanol-input"] - ) - capital_cost = costs.at[tech, "fixed"] / costs.at[tech, "methanol-input"] n.madd( @@ -961,12 +946,13 @@ def add_methanol_to_kerosene(n, costs): bus0=spatial.methanol.nodes, bus1=spatial.oil.kerosene, bus2=spatial.h2.nodes, + bus3="co2 atmosphere", efficiency=costs.at[tech, "methanol-input"], efficiency2=-costs.at[tech, "hydrogen-input"] / costs.at[tech, "methanol-input"], + efficiency3=costs.at["oil", "CO2 intensity"] + / costs.at[tech, "methanol-input"], p_nom_extendable=True, - p_min_pu=1, - p_nom_max=p_nom_max.values, ) From 3630a0b05c10a554a807dec96d76484a7d4aa863 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 22 Sep 2024 08:44:56 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- scripts/prepare_sector_network.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 21cbfc2cf..8716de45c 100755 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -950,8 +950,7 @@ def add_methanol_to_kerosene(n, costs): efficiency=costs.at[tech, "methanol-input"], efficiency2=-costs.at[tech, "hydrogen-input"] / costs.at[tech, "methanol-input"], - efficiency3=costs.at["oil", "CO2 intensity"] - / costs.at[tech, "methanol-input"], + efficiency3=costs.at["oil", "CO2 intensity"] / costs.at[tech, "methanol-input"], p_nom_extendable=True, )