From e27ec46878f3327d43a04570e1da11d23ed0ced4 Mon Sep 17 00:00:00 2001 From: lisazeyen Date: Thu, 23 Sep 2021 14:10:56 +0200 Subject: [PATCH] add further comments --- scripts/prepare_sector_network.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 6e992f03..f669e309 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -1668,6 +1668,7 @@ def create_nodes_for_heat_sector(): # urban can be split into district heating (central) and individual heating (decentral) ct_urban = pop_layout.urban.groupby(pop_layout["ct"]).sum() + # distribution of urban population within a country pop_layout["urban_ct_fraction"] = pop_layout["urban"] / \ pop_layout["ct"].map(ct_urban.get) # todays district heating share per country @@ -1690,7 +1691,8 @@ def create_nodes_for_heat_sector(): dist_fraction = central_fraction * urban_fraction nodes["urban central"] = dist_fraction.index - if options['district_heating_increase']: # take current district heating share + # take current district heating share + if options['district_heating_increase']: dist_fraction = dist_heat_share * \ pop_layout["urban_ct_fraction"] / pop_layout["fraction"] nodes["urban central"] = dist_fraction.index