remove duplicate retrieve_cost_data
This commit is contained in:
parent
7334913e11
commit
f83fd9cf1e
22
Snakefile
22
Snakefile
@ -19,7 +19,7 @@ run = config.get("run", {})
|
||||
RDIR = run["name"] + "/" if run.get("name") else ""
|
||||
CDIR = RDIR if not run.get("shared_cutouts") else ""
|
||||
|
||||
COSTS = "resources/" + RDIR + "costs.csv"
|
||||
COSTS = "resources/" + RDIR + f"costs_{config['costs']['year']}.csv"
|
||||
ATLITE_NPROCESSES = config["atlite"].get("nprocesses", 4)
|
||||
|
||||
|
||||
@ -278,19 +278,18 @@ 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_{config['costs']['year']}.csv",
|
||||
"raw.githubusercontent.com/PyPSA/technology-data/{}/outputs/".format(config['costs']['version']) + "costs_{year}.csv",
|
||||
keep_local=True,
|
||||
),
|
||||
output:
|
||||
COSTS,
|
||||
"data/costs_{year}.csv",
|
||||
log:
|
||||
"logs/" + RDIR + "retrieve_cost_data.log",
|
||||
"logs/" + RDIR + "retrieve_cost_data_{year}.log",
|
||||
resources:
|
||||
mem_mb=5000,
|
||||
mem_mb=1000,
|
||||
run:
|
||||
move(input[0], output[0])
|
||||
|
||||
|
||||
if config["enable"].get("build_natura_raster", False):
|
||||
|
||||
rule build_natura_raster:
|
||||
@ -642,22 +641,13 @@ datafiles = [
|
||||
directory("data/jrc-idees-2015"),
|
||||
]
|
||||
|
||||
if config.get('retrieve_sector_databundle', True):
|
||||
if config["enable"].get('retrieve_sector_databundle', True):
|
||||
rule retrieve_sector_databundle:
|
||||
output: *datafiles
|
||||
log: "logs/retrieve_sector_databundle.log"
|
||||
script: 'scripts/retrieve_sector_databundle.py'
|
||||
|
||||
|
||||
if config.get("retrieve_cost_data", True):
|
||||
rule retrieve_cost_data:
|
||||
input: HTTP.remote("raw.githubusercontent.com/PyPSA/technology-data/{}/outputs/".format(config['costs']['version']) + "costs_{year}.csv", keep_local=True)
|
||||
output: "data/costs_{year}.csv"
|
||||
log: "logs/" + RDIR + "retrieve_cost_data_{year}.log",
|
||||
resources: mem_mb=1000,
|
||||
run: move(input[0], output[0])
|
||||
|
||||
|
||||
rule build_population_layouts:
|
||||
input:
|
||||
nuts3_shapes='resources/' + RDIR + 'nuts3_shapes.geojson',
|
||||
|
@ -67,6 +67,7 @@ snapshots:
|
||||
enable:
|
||||
prepare_links_p_nom: false
|
||||
retrieve_databundle: true
|
||||
retrieve_sector_databundle: true
|
||||
retrieve_cost_data: true
|
||||
build_cutout: false
|
||||
retrieve_cutout: true
|
||||
@ -74,9 +75,6 @@ enable:
|
||||
retrieve_natura_raster: true
|
||||
custom_busmap: false
|
||||
|
||||
retrieve_sector_databundle: true
|
||||
retrieve_cost_data: true
|
||||
|
||||
# CO2 budget as a fraction of 1990 emissions
|
||||
# this is over-ridden if CO2Lx is set in sector_opts
|
||||
# this is also over-ridden if cb is set in sector_opts
|
||||
|
Loading…
Reference in New Issue
Block a user