From e34bd9b7fb6a9bad241b95e2f678f344652ff1d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Kyhl=20G=C3=B8tske=20ekg=40mpe=2Eau=2Edk?= Date: Wed, 31 Aug 2022 13:07:43 +0200 Subject: [PATCH] Change costs year in snakefile and config file --- Snakefile | 6 +++--- config.default.yaml | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Snakefile b/Snakefile index 6db0bca0..6b195d12 100644 --- a/Snakefile +++ b/Snakefile @@ -474,7 +474,7 @@ rule prepare_sector_network: co2="data/eea/UNFCCC_v23.csv", biomass_potentials='resources/biomass_potentials_s{simpl}_{clusters}.csv', heat_profile="data/heat_load_profile_BDEW.csv", - costs=CDIR + "costs_{planning_horizons}.csv", + costs=CDIR + "costs_{}.csv".format(config['costs']['year']) if config["foresight"] == "overnight" else CDIR + "costs_{planning_horizons}.csv", profile_offwind_ac=pypsaeur("resources/profile_offwind-ac.nc"), profile_offwind_dc=pypsaeur("resources/profile_offwind-dc.nc"), h2_cavern="resources/salt_cavern_potentials_s{simpl}_{clusters}.csv", @@ -539,7 +539,7 @@ rule make_summary: RDIR + "/postnetworks/elec_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}.nc", **config['scenario'] ), - costs=CDIR + "costs_{}.csv".format(config['scenario']['planning_horizons'][0]), + costs=CDIR + "costs_{}.csv".format(config['costs']['year']) if config["foresight"] == "overnight" else CDIR + "costs_{}.csv".format(config['scenario']['planning_horizons'][0]), plots=expand( RDIR + "/maps/elec_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}-costs-all_{planning_horizons}.pdf", **config['scenario'] @@ -589,7 +589,7 @@ if config["foresight"] == "overnight": input: overrides="data/override_component_attrs", network=RDIR + "/prenetworks/elec_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}.nc", - costs=CDIR + "costs_{planning_horizons}.csv", + costs=CDIR + "costs_{}.csv".format(config['costs']['year']), config=SDIR + '/configs/config.yaml' output: RDIR + "/postnetworks/elec_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}.nc" shadow: "shallow" diff --git a/config.default.yaml b/config.default.yaml index 5f7cbb33..c964abce 100644 --- a/config.default.yaml +++ b/config.default.yaml @@ -40,7 +40,7 @@ scenario: # planning_horizons), be:beta decay; ex:exponential decay # cb40ex0 distributes a carbon budget of 40 GtCO2 following an exponential # decay with initial growth rate 0 - planning_horizons: # investment years for myopic and perfect; or costs year for overnight + planning_horizons: # investment years for myopic and perfect; for overnight, year of cost assumptions can be different and is defined under 'costs' - 2030 # for example, set to # - 2020 @@ -327,6 +327,7 @@ industry: # Material Economics (2019): https://materialeconomics.com/latest-updates/industrial-transformation-2050 costs: + year: 2030 lifetime: 25 #default lifetime # From a Lion Hirth paper, also reflects average of Noothout et al 2016 discountrate: 0.07