Skip to content

Commit

Permalink
Merge pull request #970 from koen-vg/custom-costs-repo
Browse files Browse the repository at this point in the history
Allow the selection of custom fork of technology-data
  • Loading branch information
fneum authored Mar 19, 2024
2 parents db4219f + 1f499ed commit 3940d2e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion doc/configtables/costs.csv
Original file line number Diff line number Diff line change
@@ -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 <user>/<repo>/vX.X.X; e.g. 'v0.5.0',Version of ``technology-data`` repository to use. If this string is of the form <user>/<repo>/<version> then costs are instead retrieved from ``github.com/<user>/<repo>`` at the <version> 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``.
Expand Down
2 changes: 2 additions & 0 deletions doc/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
7 changes: 4 additions & 3 deletions scripts/retrieve_cost_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@
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

Expand Down

0 comments on commit 3940d2e

Please sign in to comment.