2024-02-19 15:21:48 +00:00
|
|
|
# SPDX-FileCopyrightText: : 2023-2024 The PyPSA-Eur Authors
|
2023-07-03 15:13:16 +00:00
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
2023-07-05 13:50:57 +00:00
|
|
|
PRODUCTION_PLOTS = [
|
|
|
|
"production_bar",
|
|
|
|
"production_deviation_bar",
|
|
|
|
"seasonal_operation_area",
|
|
|
|
]
|
2023-07-22 11:24:35 +00:00
|
|
|
CROSS_BORDER_PLOTS = ["trade_time_series", "cross_border_bar"]
|
2023-07-19 08:11:54 +00:00
|
|
|
PRICES_PLOTS = ["price_bar", "price_line"]
|
2023-07-05 13:50:57 +00:00
|
|
|
|
2023-07-03 15:13:16 +00:00
|
|
|
|
|
|
|
rule build_electricity_production:
|
|
|
|
"""
|
|
|
|
This rule builds the electricity production for each country and technology from ENTSO-E data.
|
|
|
|
The data is used for validation of the optimization results.
|
|
|
|
"""
|
|
|
|
params:
|
2024-02-18 10:48:55 +00:00
|
|
|
snapshots=config_provider("snapshots"),
|
2024-02-10 17:09:23 +00:00
|
|
|
countries=config_provider("countries"),
|
2023-07-03 15:13:16 +00:00
|
|
|
output:
|
2023-08-23 15:14:57 +00:00
|
|
|
resources("historical_electricity_production.csv"),
|
2023-07-03 15:13:16 +00:00
|
|
|
log:
|
2023-08-23 15:14:57 +00:00
|
|
|
logs("build_electricity_production.log"),
|
2023-07-03 15:13:16 +00:00
|
|
|
resources:
|
|
|
|
mem_mb=5000,
|
|
|
|
script:
|
2023-07-05 09:07:36 +00:00
|
|
|
"../scripts/build_electricity_production.py"
|
|
|
|
|
|
|
|
|
2023-07-05 13:50:57 +00:00
|
|
|
rule build_cross_border_flows:
|
|
|
|
"""
|
|
|
|
This rule builds the cross-border flows from ENTSO-E data.
|
|
|
|
The data is used for validation of the optimization results.
|
|
|
|
"""
|
|
|
|
params:
|
2024-02-17 16:16:28 +00:00
|
|
|
snapshots=config_provider("snapshots"),
|
2024-02-10 17:09:23 +00:00
|
|
|
countries=config_provider("countries"),
|
2023-07-05 13:50:57 +00:00
|
|
|
input:
|
2023-08-23 15:14:57 +00:00
|
|
|
network=resources("networks/base.nc"),
|
2023-07-05 13:50:57 +00:00
|
|
|
output:
|
2023-08-23 15:14:57 +00:00
|
|
|
resources("historical_cross_border_flows.csv"),
|
2023-07-05 13:50:57 +00:00
|
|
|
log:
|
2023-08-23 15:14:57 +00:00
|
|
|
logs("build_cross_border_flows.log"),
|
2023-07-05 13:50:57 +00:00
|
|
|
resources:
|
|
|
|
mem_mb=5000,
|
|
|
|
script:
|
|
|
|
"../scripts/build_cross_border_flows.py"
|
|
|
|
|
|
|
|
|
|
|
|
rule build_electricity_prices:
|
|
|
|
"""
|
|
|
|
This rule builds the electricity prices from ENTSO-E data.
|
|
|
|
The data is used for validation of the optimization results.
|
|
|
|
"""
|
|
|
|
params:
|
2024-02-17 16:16:28 +00:00
|
|
|
snapshots=config_provider("snapshots"),
|
2024-02-10 17:09:23 +00:00
|
|
|
countries=config_provider("countries"),
|
2023-07-05 13:50:57 +00:00
|
|
|
output:
|
2023-08-23 15:14:57 +00:00
|
|
|
resources("historical_electricity_prices.csv"),
|
2023-07-05 13:50:57 +00:00
|
|
|
log:
|
2023-08-23 15:14:57 +00:00
|
|
|
logs("build_electricity_prices.log"),
|
2023-07-05 13:50:57 +00:00
|
|
|
resources:
|
|
|
|
mem_mb=5000,
|
|
|
|
script:
|
|
|
|
"../scripts/build_electricity_prices.py"
|
2023-07-03 15:13:16 +00:00
|
|
|
|
|
|
|
|
2023-07-05 13:50:57 +00:00
|
|
|
rule plot_validation_electricity_production:
|
2023-07-03 15:13:16 +00:00
|
|
|
input:
|
2024-09-13 13:37:01 +00:00
|
|
|
network=RESULTS + "networks/base_s_{clusters}_elec_l{ll}_{opts}.nc",
|
2023-08-23 15:14:57 +00:00
|
|
|
electricity_production=resources("historical_electricity_production.csv"),
|
2023-07-03 15:13:16 +00:00
|
|
|
output:
|
2023-07-05 09:07:36 +00:00
|
|
|
**{
|
|
|
|
plot: RESULTS
|
2024-09-13 13:37:01 +00:00
|
|
|
+ f"figures/validation_{plot}_base_s_{{clusters}}_elec_l{{ll}}_{{opts}}.pdf"
|
2023-07-05 13:50:57 +00:00
|
|
|
for plot in PRODUCTION_PLOTS
|
|
|
|
},
|
|
|
|
plots_touch=RESULTS
|
2024-09-13 13:37:01 +00:00
|
|
|
+ "figures/.validation_production_plots_base_s_{clusters}_elec_l{ll}_{opts}",
|
2023-07-05 13:50:57 +00:00
|
|
|
script:
|
|
|
|
"../scripts/plot_validation_electricity_production.py"
|
|
|
|
|
|
|
|
|
|
|
|
rule plot_validation_cross_border_flows:
|
2023-07-22 11:24:35 +00:00
|
|
|
params:
|
2024-02-10 17:09:23 +00:00
|
|
|
countries=config_provider("countries"),
|
2023-07-05 13:50:57 +00:00
|
|
|
input:
|
2024-09-13 13:37:01 +00:00
|
|
|
network=RESULTS + "networks/base_s_{clusters}_elec_l{ll}_{opts}.nc",
|
2023-08-23 15:14:57 +00:00
|
|
|
cross_border_flows=resources("historical_cross_border_flows.csv"),
|
2023-07-05 13:50:57 +00:00
|
|
|
output:
|
|
|
|
**{
|
|
|
|
plot: RESULTS
|
2024-09-13 13:37:01 +00:00
|
|
|
+ f"figures/validation_{plot}_base_s_{{clusters}}_elec_l{{ll}}_{{opts}}.pdf"
|
2023-07-05 13:50:57 +00:00
|
|
|
for plot in CROSS_BORDER_PLOTS
|
|
|
|
},
|
|
|
|
plots_touch=RESULTS
|
2024-09-13 13:37:01 +00:00
|
|
|
+ "figures/.validation_cross_border_plots_base_s_{clusters}_elec_l{ll}_{opts}",
|
2023-07-05 13:50:57 +00:00
|
|
|
script:
|
|
|
|
"../scripts/plot_validation_cross_border_flows.py"
|
|
|
|
|
|
|
|
|
|
|
|
rule plot_validation_electricity_prices:
|
|
|
|
input:
|
2024-09-13 13:37:01 +00:00
|
|
|
network=RESULTS + "networks/base_s_{clusters}_elec_l{ll}_{opts}.nc",
|
2023-08-23 15:14:57 +00:00
|
|
|
electricity_prices=resources("historical_electricity_prices.csv"),
|
2023-07-05 13:50:57 +00:00
|
|
|
output:
|
|
|
|
**{
|
|
|
|
plot: RESULTS
|
2024-09-13 13:37:01 +00:00
|
|
|
+ f"figures/validation_{plot}_base_s_{{clusters}}_elec_l{{ll}}_{{opts}}.pdf"
|
2023-07-05 13:50:57 +00:00
|
|
|
for plot in PRICES_PLOTS
|
2023-07-05 09:07:36 +00:00
|
|
|
},
|
|
|
|
plots_touch=RESULTS
|
2024-09-13 13:37:01 +00:00
|
|
|
+ "figures/.validation_prices_plots_base_s_{clusters}_elec_l{ll}_{opts}",
|
2023-07-03 15:13:16 +00:00
|
|
|
script:
|
2023-07-05 13:50:57 +00:00
|
|
|
"../scripts/plot_validation_electricity_prices.py"
|