mark downloaded files as ancient rather than protected

This commit is contained in:
Fabian Neumann 2024-05-20 22:37:16 +02:00
parent 0c33a55bc5
commit d32feb3aae
3 changed files with 10 additions and 12 deletions

View File

@ -314,6 +314,8 @@ Upcoming Release
directly as methanol demand rather than with fixed methane and electricity directly as methanol demand rather than with fixed methane and electricity
demands from today's industry sector ratios. demands from today's industry sector ratios.
* Mark downloaded files as ``ancient`` rather than ``protected``.
PyPSA-Eur 0.10.0 (19th February 2024) PyPSA-Eur 0.10.0 (19th February 2024)
===================================== =====================================

View File

@ -33,8 +33,8 @@ if config["enable"]["retrieve"] and config["enable"].get("retrieve_databundle",
rule retrieve_databundle: rule retrieve_databundle:
output: output:
protected(expand("data/bundle/{file}", file=datafiles)), ancient(expand("data/bundle/{file}", file=datafiles)),
protected(directory("data/bundle/jrc-idees-2015")), ancient(directory("data/bundle/jrc-idees-2015")),
log: log:
"logs/retrieve_databundle.log", "logs/retrieve_databundle.log",
resources: resources:
@ -158,7 +158,7 @@ if config["enable"]["retrieve"]:
keep_local=True, keep_local=True,
), ),
output: output:
protected("data/shipdensity_global.zip"), ancient("data/shipdensity_global.zip"),
log: log:
"logs/retrieve_ship_raster.log", "logs/retrieve_ship_raster.log",
resources: resources:
@ -240,7 +240,7 @@ if config["enable"]["retrieve"]:
zip="data/WDPA_shp.zip", zip="data/WDPA_shp.zip",
folder=directory("data/WDPA"), folder=directory("data/WDPA"),
output: output:
gpkg=protected("data/WDPA.gpkg"), gpkg=ancient("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}")
@ -265,7 +265,7 @@ if config["enable"]["retrieve"]:
zip="data/WDPA_WDOECM_marine.zip", zip="data/WDPA_WDOECM_marine.zip",
folder=directory("data/WDPA_WDOECM_marine"), folder=directory("data/WDPA_WDOECM_marine"),
output: output:
gpkg=protected("data/WDPA_WDOECM_marine.gpkg"), gpkg=ancient("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}")

View File

@ -2708,8 +2708,7 @@ def add_industry(n, costs):
) )
p_set_methanol = ( p_set_methanol = (
industrial_demand["methanol"] industrial_demand["methanol"].rename(lambda x: x + " industry methanol")
.rename(lambda x: x + " industry methanol")
/ nhours / nhours
) )
@ -2732,10 +2731,7 @@ def add_industry(n, costs):
bus2="co2 atmosphere", bus2="co2 atmosphere",
carrier="industry methanol", carrier="industry methanol",
p_nom_extendable=True, p_nom_extendable=True,
efficiency2=1 efficiency2=1 / options["MWh_MeOH_per_tCO2"],
/ options[
"MWh_MeOH_per_tCO2"
],
# CO2 intensity methanol based on stoichiometric calculation with 22.7 GJ/t methanol (32 g/mol), CO2 (44 g/mol), 277.78 MWh/TJ = 0.218 t/MWh # CO2 intensity methanol based on stoichiometric calculation with 22.7 GJ/t methanol (32 g/mol), CO2 (44 g/mol), 277.78 MWh/TJ = 0.218 t/MWh
) )