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 shared_cutouts: true
scenario: scenario:
weather_year:
- ""
clusters: clusters:
- 5 - 5
opts: opts:

View File

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

View File

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

View File

@ -326,7 +326,7 @@ rule add_electricity:
costs=config["costs"], costs=config["costs"],
input: 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"] 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=RESOURCES
+ "pop_weighted_energy_totals{weather_year}_s{simpl}_{clusters}.csv", + "pop_weighted_energy_totals{weather_year}_s{simpl}_{clusters}.csv",
pop_weighted_heat_totals=RESOURCES 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", shipping_demand=RESOURCES + "shipping_demand{weather_year}_s{simpl}_{clusters}.csv",
transport_demand=RESOURCES + "transport_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", 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" "../scripts/solve_operations_network_other_year.py"
rule solve_operations_network_other_year_myopic: # rule solve_operations_network_other_year_myopic:
input: # input:
overrides="data/override_component_attrs", # overrides="data/override_component_attrs",
pre=RDIR # pre=RDIR
+ "/prenetworks/elec{weather_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}.nc", # + "/prenetworks/elec{weather_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}.nc",
post=RDIR # post=RDIR
+ "/postnetworks/elec{capacity_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}.nc", # + "/postnetworks/elec{capacity_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}.nc",
previous=solved_previous_year, # previous=solved_previous_year,
output: # output:
RDIR # RDIR
+ "/operations/elec{capacity_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}_{weather_year}_myopic.nc", # + "/operations/elec{capacity_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}_{weather_year}_myopic.nc",
shadow: # shadow:
"shallow" # "shallow"
log: # log:
solver=RDIR # solver=RDIR
+ "/logs/elec{capacity_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}_{weather_year}_solver.log", # + "/logs/elec{capacity_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}_{weather_year}_solver.log",
python=RDIR # python=RDIR
+ "/logs/elec{capacity_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}_{weather_year}_python.log", # + "/logs/elec{capacity_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}_{weather_year}_python.log",
threads: 4 # threads: 4
resources: # resources:
mem_mb=10000, # mem_mb=10000,
benchmark: # benchmark:
( # (
RDIR # RDIR
+ "/benchmarks/solve_operations_network_myopic/elec{capacity_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}_{weather_year}" # + "/benchmarks/solve_operations_network_myopic/elec{capacity_year}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}_{weather_year}"
) # )
script: # script:
"../scripts/solve_operations_network_other_year_myopic.py" # "../scripts/solve_operations_network_other_year_myopic.py"