From ad8ccf3b25d72b3635cc6668b75572319bac539c Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Mon, 6 Feb 2023 09:52:35 +0100 Subject: [PATCH] fix process emission localisation with co2 (not) spatially resolved --- scripts/prepare_sector_network.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 26d2b2d3..7a7edc25 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -2416,13 +2416,19 @@ def add_industry(n, costs): unit="t_co2" ) + sel = ["process emission", "process emission from feedstock"] + if options.get("co2_spatial", options["co2network"]): + p_set = -industrial_demand.loc[nodes, sel].sum(axis=1).rename(index=lambda x: x + " process emissions") / 8760 + else: + p_set = -industrial_demand.loc[nodes, sel].sum(axis=1).sum() / 8760 + # this should be process emissions fossil+feedstock # then need load on atmosphere for feedstock emissions that are currently going to atmosphere via Link Fischer-Tropsch demand n.add("Load", spatial.co2.process_emissions, bus=spatial.co2.process_emissions, carrier="process emissions", - p_set=-industrial_demand.loc[nodes,["process emission", "process emission from feedstock"]].sum(axis=1).sum() / 8760 + p_set=p_set, ) n.add("Link",