From ce549cd9494228998ee6689d095ca06c171fff11 Mon Sep 17 00:00:00 2001 From: Koen van Greevenbroek Date: Mon, 18 Mar 2024 10:00:42 +0100 Subject: [PATCH 1/2] Allow the retrieval of cost data from forks of technology-data --- scripts/retrieve_cost_data.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/retrieve_cost_data.py b/scripts/retrieve_cost_data.py index eb1ef041..39fcab7c 100644 --- a/scripts/retrieve_cost_data.py +++ b/scripts/retrieve_cost_data.py @@ -25,9 +25,10 @@ if __name__ == "__main__": set_scenario_config(snakemake) version = snakemake.params.version - baseurl = ( - f"https://raw.githubusercontent.com/PyPSA/technology-data/{version}/outputs/" - ) + if "/" in version: + baseurl = f"https://raw.githubusercontent.com/{version}/outputs" + else: + baseurl = f"https://raw.githubusercontent.com/PyPSA/technology-data/{version}/outputs/" filepath = Path(snakemake.output[0]) url = baseurl + filepath.name From 1f499eda6ffb20ed81c15a1b6a3a8557a53e18d4 Mon Sep 17 00:00:00 2001 From: Koen van Greevenbroek Date: Mon, 18 Mar 2024 13:31:04 +0100 Subject: [PATCH 2/2] Document new handling of costs version config option --- doc/configtables/costs.csv | 2 +- doc/release_notes.rst | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/configtables/costs.csv b/doc/configtables/costs.csv index b69c0bf9..03933c18 100644 --- a/doc/configtables/costs.csv +++ b/doc/configtables/costs.csv @@ -1,6 +1,6 @@ ,Unit,Values,Description year,--,YYYY; e.g. '2030',Year for which to retrieve cost assumptions of ``resources/costs.csv``. -version,--,vX.X.X; e.g. 'v0.5.0',Version of ``technology-data`` repository to use. +version,--,vX.X.X or //vX.X.X; e.g. 'v0.5.0',Version of ``technology-data`` repository to use. If this string is of the form // then costs are instead retrieved from ``github.com//`` at the tag. rooftop_share,--,float,Share of rooftop PV when calculating capital cost of solar (joint rooftop and utility-scale PV). social_discountrate,p.u.,float,Social discount rate to compare costs in different investment periods. 0.02 corresponds to a social discount rate of 2%. fill_values,--,float,Default values if not specified for a technology in ``resources/costs.csv``. diff --git a/doc/release_notes.rst b/doc/release_notes.rst index 11fd3df7..21094250 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -82,6 +82,8 @@ Upcoming Release * Upgrade default techno-economic assumptions to ``technology-data`` v0.8.1. +* Add possibility to download cost data from custom fork of ``technology-data``. + * Linearly interpolate missing investment periods in year-dependent configuration options.