2023-07-03 15:13:16 +00:00
|
|
|
# SPDX-FileCopyrightText: : 2023 The PyPSA-Eur Authors
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
|
|
|
|
|
|
|
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:
|
|
|
|
snapshots=config["snapshots"],
|
|
|
|
countries=config["countries"],
|
|
|
|
output:
|
|
|
|
RESOURCES + "historical_electricity_production.csv",
|
|
|
|
log:
|
|
|
|
LOGS + "build_electricity_production.log",
|
|
|
|
resources:
|
|
|
|
mem_mb=5000,
|
|
|
|
script:
|
2023-07-05 09:07:36 +00:00
|
|
|
"../scripts/build_electricity_production.py"
|
|
|
|
|
|
|
|
|
|
|
|
PLOTS = ["production_bar", "production_deviation_bar", "seasonal_operation_area"]
|
2023-07-03 15:13:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
rule plot_electricity_production:
|
|
|
|
input:
|
|
|
|
network=RESULTS + "networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc",
|
2023-07-05 09:07:36 +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
|
|
|
|
+ f"figures/validation_{plot}_elec_s{{simpl}}_{{clusters}}_ec_l{{ll}}_{{opts}}.pdf"
|
|
|
|
for plot in PLOTS
|
|
|
|
},
|
|
|
|
plots_touch=RESULTS
|
|
|
|
+ "figures/.validation_plots_elec_s{simpl}_{clusters}_ec_l{ll}_{opts}",
|
2023-07-03 15:13:16 +00:00
|
|
|
script:
|
2023-07-05 09:07:36 +00:00
|
|
|
"../scripts/plot_electricity_production.py"
|