Merge pull request #819 from PyPSA/retrieve-to-data
Retrieve GLC and WDPA to data directory, not resources
This commit is contained in:
commit
a54d00d745
@ -208,10 +208,9 @@ rule build_ship_raster:
|
|||||||
|
|
||||||
rule determine_availability_matrix_MD_UA:
|
rule determine_availability_matrix_MD_UA:
|
||||||
input:
|
input:
|
||||||
copernicus=RESOURCES
|
copernicus="data/Copernicus_LC100_global_v3.0.1_2019-nrt_Discrete-Classification-map_EPSG-4326.tif",
|
||||||
+ "Copernicus_LC100_global_v3.0.1_2019-nrt_Discrete-Classification-map_EPSG-4326.tif",
|
wdpa="data/WDPA.gpkg",
|
||||||
wdpa=RESOURCES + f"WDPA.gpkg",
|
wdpa_marine="data/WDPA_WDOECM_marine.gpkg",
|
||||||
wdpa_marine=RESOURCES + f"WDPA_WDOECM_marine.gpkg",
|
|
||||||
gebco=lambda w: (
|
gebco=lambda w: (
|
||||||
"data/bundle/GEBCO_2014_2D.nc"
|
"data/bundle/GEBCO_2014_2D.nc"
|
||||||
if "max_depth" in config["renewable"][w.technology].keys()
|
if "max_depth" in config["renewable"][w.technology].keys()
|
||||||
|
@ -113,7 +113,7 @@ if config["enable"]["retrieve"] and config["enable"].get(
|
|||||||
static=True,
|
static=True,
|
||||||
),
|
),
|
||||||
output:
|
output:
|
||||||
protected(RESOURCES + "natura.tiff"),
|
RESOURCES + "natura.tiff",
|
||||||
log:
|
log:
|
||||||
LOGS + "retrieve_natura_raster.log",
|
LOGS + "retrieve_natura_raster.log",
|
||||||
resources:
|
resources:
|
||||||
@ -239,8 +239,7 @@ if config["enable"]["retrieve"]:
|
|||||||
static=True,
|
static=True,
|
||||||
),
|
),
|
||||||
output:
|
output:
|
||||||
RESOURCES
|
"data/Copernicus_LC100_global_v3.0.1_2019-nrt_Discrete-Classification-map_EPSG-4326.tif",
|
||||||
+ "Copernicus_LC100_global_v3.0.1_2019-nrt_Discrete-Classification-map_EPSG-4326.tif",
|
|
||||||
run:
|
run:
|
||||||
move(input[0], output[0])
|
move(input[0], output[0])
|
||||||
|
|
||||||
@ -286,10 +285,10 @@ if config["enable"]["retrieve"]:
|
|||||||
keep_local=True,
|
keep_local=True,
|
||||||
),
|
),
|
||||||
params:
|
params:
|
||||||
zip=RESOURCES + f"WDPA_shp.zip",
|
zip="data/WDPA_shp.zip",
|
||||||
folder=directory(RESOURCES + f"WDPA"),
|
folder=directory("data/WDPA"),
|
||||||
output:
|
output:
|
||||||
gpkg=RESOURCES + f"WDPA.gpkg",
|
gpkg=protected("data/WDPA.gpkg"),
|
||||||
run:
|
run:
|
||||||
shell("cp {input} {params.zip}")
|
shell("cp {input} {params.zip}")
|
||||||
shell("unzip -o {params.zip} -d {params.folder}")
|
shell("unzip -o {params.zip} -d {params.folder}")
|
||||||
@ -312,10 +311,10 @@ if config["enable"]["retrieve"]:
|
|||||||
keep_local=True,
|
keep_local=True,
|
||||||
),
|
),
|
||||||
params:
|
params:
|
||||||
zip=RESOURCES + f"WDPA_WDOECM_marine.zip",
|
zip="data/WDPA_WDOECM_marine.zip",
|
||||||
folder=directory(RESOURCES + f"WDPA_WDOECM_marine"),
|
folder=directory("data/WDPA_WDOECM_marine"),
|
||||||
output:
|
output:
|
||||||
gpkg=RESOURCES + f"WDPA_WDOECM_marine.gpkg",
|
gpkg=protected("data/WDPA_WDOECM_marine.gpkg"),
|
||||||
run:
|
run:
|
||||||
shell("cp {input} {params.zip}")
|
shell("cp {input} {params.zip}")
|
||||||
shell("unzip -o {params.zip} -d {params.folder}")
|
shell("unzip -o {params.zip} -d {params.folder}")
|
||||||
|
Loading…
Reference in New Issue
Block a user