Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
davide-f committed Dec 21, 2024
1 parent 5a33886 commit 6022316
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ RESDIR = config["results_dir"].strip("/") + f"/{SECDIR}"
load_data_paths = get_load_paths_gegis("data", config)

if config["enable"].get("retrieve_cost_data", True):
COSTS = (
"resources/" + RDIR + f"costs_{config["costs"]["year"]}.csv"
)
COSTS = "resources/" + RDIR + f"costs_{config['costs']['year']}.csv"
else:
COSTS = "data/costs.csv"
ATLITE_NPROCESSES = config["atlite"].get("nprocesses", 4)
Expand Down Expand Up @@ -394,14 +392,15 @@ if config["enable"].get("retrieve_cost_data", True):

rule retrieve_cost_data:
params:
version=config['costs']['version'],
version=config["costs"]["version"],
input:
HTTP.remote(
"raw.githubusercontent.com/PyPSA/technology-data/{params.version}/outputs/costs_{year}.csv",
f"raw.githubusercontent.com/PyPSA/technology-data/{config['costs']['version']}/outputs/"
+ "costs_{year}.csv",
keep_local=True,
),
output:
RDIR + "costs_{year}.csv",
"resources/" + RDIR + "costs_{year}.csv",
log:
"logs/" + RDIR + "retrieve_cost_data_{year}.log",
resources:
Expand Down Expand Up @@ -1060,7 +1059,7 @@ rule prepare_sector_network:
input:
network=RESDIR
+ "prenetworks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}_{sopts}_{planning_horizons}_{discountrate}_{demand}_presec.nc",
costs=RDIR + "costs_{planning_horizons}.csv",
costs="resources/" + RDIR + "costs_{planning_horizons}.csv",
h2_cavern="data/hydrogen_salt_cavern_potentials.csv",
nodal_energy_totals="resources/"
+ SECDIR
Expand Down Expand Up @@ -1152,7 +1151,7 @@ rule add_export:
input:
overrides="data/override_component_attrs",
export_ports="resources/" + SECDIR + "export_ports.csv",
costs=RDIR + "costs_{planning_horizons}.csv",
costs="resources/" + RDIR + "costs_{planning_horizons}.csv",
ship_profile="resources/" + SECDIR + "ship_profile_{h2export}TWh.csv",
network=RESDIR
+ "prenetworks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}_{sopts}_{planning_horizons}_{discountrate}_{demand}.nc",
Expand Down Expand Up @@ -1610,7 +1609,7 @@ if config["foresight"] == "overnight":
# + "prenetworks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}_{sopts}_{planning_horizons}_{discountrate}.nc",
network=RESDIR
+ "prenetworks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}_{sopts}_{planning_horizons}_{discountrate}_{demand}_{h2export}export.nc",
costs=RDIR + "costs_{planning_horizons}.csv",
costs="resources/" + RDIR + "costs_{planning_horizons}.csv",
configs=SDIR + "configs/config.yaml", # included to trigger copy_config rule
output:
RESDIR
Expand Down Expand Up @@ -1655,7 +1654,7 @@ rule make_sector_summary:
**config["costs"],
**config["export"],
),
costs=RDIR + "costs_{planning_horizons}.csv",
costs="resources/" + RDIR + "costs_{planning_horizons}.csv",
plots=expand(
RESDIR
+ "maps/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}_{sopts}-costs-all_{planning_horizons}_{discountrate}_{demand}_{h2export}export.pdf",
Expand Down Expand Up @@ -1892,7 +1891,7 @@ rule build_industry_demand: #default data
+ SECDIR
+ "demand/base_industry_totals_{planning_horizons}_{demand}.csv",
industrial_database="data/industrial_database.csv",
costs=RDIR + "costs_{planning_horizons}.csv",
costs="resources/" + RDIR + "costs_{planning_horizons}.csv",
industry_growth_cagr="data/demand/industry_growth_cagr.csv",
output:
industrial_energy_demand_per_node="resources/"
Expand Down

0 comments on commit 6022316

Please sign in to comment.