small fixes to weather_year wildcard handling

This commit is contained in:
Fabian Neumann 2023-07-26 10:52:58 +02:00
parent d527797dc3
commit 16eb4e644a
6 changed files with 36 additions and 30 deletions

View File

@ -12,6 +12,8 @@ run:
shared_cutouts: true
scenario:
weather_year:
- ""
clusters:
- 5
opts:

View File

@ -13,6 +13,8 @@ run:
foresight: myopic
scenario:
weather_year:
- ""
ll:
- v1.5
clusters:

View File

@ -12,6 +12,8 @@ run:
scenario:
weather_year:
- ""
ll:
- v1.5
clusters:

View File

@ -326,7 +326,7 @@ rule add_electricity:
costs=config["costs"],
input:
**{
f"profile_{tech}": RESOURCES + f"profile{weather_year}_{tech}.nc"
f"profile_{tech}": RESOURCES + "profile{weather_year}" + f"_{tech}.nc"
for tech in config["electricity"]["renewable_carriers"]
},
**{

View File

@ -748,7 +748,7 @@ rule prepare_sector_network:
pop_weighted_energy_totals=RESOURCES
+ "pop_weighted_energy_totals{weather_year}_s{simpl}_{clusters}.csv",
pop_weighted_heat_totals=RESOURCES
+ "pop_weighted_heat_totals{weather_year}_s{simpl}_{clusters}.csv"
+ "pop_weighted_heat_totals{weather_year}_s{simpl}_{clusters}.csv",
shipping_demand=RESOURCES + "shipping_demand{weather_year}_s{simpl}_{clusters}.csv",
transport_demand=RESOURCES + "transport_demand{weather_year}_s{simpl}_{clusters}.csv",
transport_data=RESOURCES + "transport_data{weather_year}_s{simpl}_{clusters}.csv",

View File

@ -71,31 +71,31 @@ rule solve_operations_network_other_year:
"../scripts/solve_operations_network_other_year.py"
rule solve_operations_network_other_year_myopic:
input:
overrides="data/override_component_attrs",
pre=RDIR
+ "/prenetworks/elec{weather_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}.nc",
post=RDIR
+ "/postnetworks/elec{capacity_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}.nc",
previous=solved_previous_year,
output:
RDIR
+ "/operations/elec{capacity_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}_{weather_year}_myopic.nc",
shadow:
"shallow"
log:
solver=RDIR
+ "/logs/elec{capacity_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}_{weather_year}_solver.log",
python=RDIR
+ "/logs/elec{capacity_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}_{weather_year}_python.log",
threads: 4
resources:
mem_mb=10000,
benchmark:
(
RDIR
+ "/benchmarks/solve_operations_network_myopic/elec{capacity_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}_{weather_year}"
)
script:
"../scripts/solve_operations_network_other_year_myopic.py"
# rule solve_operations_network_other_year_myopic:
# input:
# overrides="data/override_component_attrs",
# pre=RDIR
# + "/prenetworks/elec{weather_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}.nc",
# post=RDIR
# + "/postnetworks/elec{capacity_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}.nc",
# previous=solved_previous_year,
# output:
# RDIR
# + "/operations/elec{capacity_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}_{weather_year}_myopic.nc",
# shadow:
# "shallow"
# log:
# solver=RDIR
# + "/logs/elec{capacity_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}_{weather_year}_solver.log",
# python=RDIR
# + "/logs/elec{capacity_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}_{weather_year}_python.log",
# threads: 4
# resources:
# mem_mb=10000,
# benchmark:
# (
# RDIR
# + "/benchmarks/solve_operations_network_myopic/elec{capacity_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}_{weather_year}"
# )
# script:
# "../scripts/solve_operations_network_other_year_myopic.py"