From 53eab1ead24aac20fe0e23653b2a54fd089dd0fb Mon Sep 17 00:00:00 2001 From: lisazeyen Date: Tue, 28 Sep 2021 17:25:04 +0200 Subject: [PATCH] slice biomass potentials with the pop_layout index instead of the country if biomass transport = True --- scripts/prepare_sector_network.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 0b8518d4..81a60870 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -1688,8 +1688,7 @@ def add_biomass(n, costs): if options["biomass_transport"]: # potential per node distributed within country by population - biomass_potentials_spatial = (biomass_potentials.loc[pop_layout.ct] - .set_index(pop_layout.index) + biomass_potentials_spatial = (biomass_potentials.loc[pop_layout.index] .mul(pop_layout.fraction, axis="index") .rename(index=lambda x: x + " solid biomass")) else: @@ -2206,7 +2205,7 @@ if __name__ == "__main__": lv=1.0, opts='', sector_opts='Co2L0-168H-T-H-B-I-solar3-dist1', - planning_horizons=2030, + planning_horizons="2030", ) logging.basicConfig(level=snakemake.config['logging_level'])