From 82ac430fd92f2724918ff0e25568fdd57b75a9a5 Mon Sep 17 00:00:00 2001 From: chrstphtrs Date: Wed, 8 Nov 2023 09:57:24 +0100 Subject: [PATCH] fix spatial resolution for solid biomass links and naphtha oil loads under 'co2_spatial: true' flag --- scripts/prepare_sector_network.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 54830106..a5ca8941 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -145,6 +145,7 @@ def define_spatial(nodes, options): spatial.oil.nodes = nodes + " oil" spatial.oil.locations = nodes spatial.oil.naphtha = nodes + " naphtha for industry" + spatial.oil.naphtha_process_emissions = nodes + " naphtha process emissions" spatial.oil.kerosene = nodes + " kerosene for aviation" spatial.oil.shipping = nodes + " shipping oil" spatial.oil.agriculture_machinery = nodes + " agriculture machinery oil" @@ -152,6 +153,7 @@ def define_spatial(nodes, options): spatial.oil.nodes = ["EU oil"] spatial.oil.locations = ["EU"] spatial.oil.naphtha = ["EU naphtha for industry"] + spatial.oil.naphtha_process_emissions = "EU naphtha process emissions" spatial.oil.kerosene = ["EU kerosene for aviation"] spatial.oil.shipping = ["EU shipping oil"] spatial.oil.agriculture_machinery = ["EU agriculture machinery oil"] @@ -2443,9 +2445,14 @@ def add_industry(n, costs): efficiency=1.0, ) + if len(spatial.biomass.industry_cc)<=1 and len(spatial.co2.nodes)>1: + link_names = nodes + " " + spatial.biomass.industry_cc + else: + link_names = spatial.biomass.industry_cc + n.madd( "Link", - spatial.biomass.industry_cc, + link_names, bus0=spatial.biomass.nodes, bus1=spatial.biomass.industry, bus2="co2 atmosphere", @@ -2820,7 +2827,7 @@ def add_industry(n, costs): n.madd( "Load", - ["naphtha for industry into process emissions from feedstock"], + spatial.oil.naphtha_process_emissions, bus=spatial.oil.nodes, carrier="naphtha for industry", p_set=p_set_process_emissions,