Skip to content

Commit

Permalink
feat: add rule to download cost file
Browse files Browse the repository at this point in the history
  • Loading branch information
energyLS committed Oct 17, 2023
1 parent 31e3abd commit 05a503e
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion Snakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from os.path import exists
from shutil import copyfile
from shutil import copyfile, move

from snakemake.remote.HTTP import RemoteProvider as HTTPRemoteProvider

Expand Down Expand Up @@ -45,6 +45,21 @@ subworkflow pypsaearth:
configfile:
"./config.pypsa-earth.yaml"

if config["enable"].get("retrieve_cost_data", True):

rule retrieve_cost_data:
input:
HTTP.remote(
f"raw.githubusercontent.com/PyPSA/technology-data/{config['costs']['version']}/outputs/costs" + "_{planning_horizons}.csv",
keep_local=True,
),
output:
costs=CDIR + "costs_{planning_horizons}.csv",
resources:
mem_mb=5000,
run:
move(input[0], output[0])


rule prepare_sector_networks:
input:
Expand Down

0 comments on commit 05a503e

Please sign in to comment.