2023-03-08 16:29:01 +00:00
|
|
|
# SPDX-FileCopyrightText: : 2023 The PyPSA-Eur Authors
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
2023-03-08 18:26:41 +00:00
|
|
|
|
2023-03-08 16:29:01 +00:00
|
|
|
rule build_population_layouts:
|
|
|
|
input:
|
2023-08-23 15:14:57 +00:00
|
|
|
nuts3_shapes=resources("nuts3_shapes.geojson"),
|
2023-03-08 16:29:01 +00:00
|
|
|
urban_percent="data/urban_percent.csv",
|
2024-02-12 15:56:00 +00:00
|
|
|
cutout=lambda w: "cutouts/"
|
|
|
|
+ CDIR
|
|
|
|
+ config_provider("atlite", "default_cutout")(w)
|
|
|
|
+ ".nc",
|
2023-03-08 16:29:01 +00:00
|
|
|
output:
|
2023-08-23 15:14:57 +00:00
|
|
|
pop_layout_total=resources("pop_layout_total.nc"),
|
|
|
|
pop_layout_urban=resources("pop_layout_urban.nc"),
|
|
|
|
pop_layout_rural=resources("pop_layout_rural.nc"),
|
2023-03-08 18:22:00 +00:00
|
|
|
log:
|
2023-08-23 15:14:57 +00:00
|
|
|
logs("build_population_layouts.log"),
|
2023-03-08 16:29:01 +00:00
|
|
|
resources:
|
|
|
|
mem_mb=20000,
|
|
|
|
benchmark:
|
2023-08-23 15:14:57 +00:00
|
|
|
benchmarks("build_population_layouts")
|
2023-03-08 16:29:01 +00:00
|
|
|
threads: 8
|
2023-03-08 18:26:41 +00:00
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
2023-03-08 16:29:01 +00:00
|
|
|
script:
|
2023-03-08 16:44:25 +00:00
|
|
|
"../scripts/build_population_layouts.py"
|
2023-03-08 16:29:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
rule build_clustered_population_layouts:
|
|
|
|
input:
|
2023-08-23 15:14:57 +00:00
|
|
|
pop_layout_total=resources("pop_layout_total.nc"),
|
|
|
|
pop_layout_urban=resources("pop_layout_urban.nc"),
|
|
|
|
pop_layout_rural=resources("pop_layout_rural.nc"),
|
|
|
|
regions_onshore=resources("regions_onshore_elec_s{simpl}_{clusters}.geojson"),
|
2024-02-12 15:56:00 +00:00
|
|
|
cutout=lambda w: "cutouts/"
|
|
|
|
+ CDIR
|
|
|
|
+ config_provider("atlite", "default_cutout")(w)
|
|
|
|
+ ".nc",
|
2023-03-08 16:29:01 +00:00
|
|
|
output:
|
2023-08-23 15:14:57 +00:00
|
|
|
clustered_pop_layout=resources("pop_layout_elec_s{simpl}_{clusters}.csv"),
|
2023-03-08 18:22:00 +00:00
|
|
|
log:
|
2023-08-23 15:14:57 +00:00
|
|
|
logs("build_clustered_population_layouts_{simpl}_{clusters}.log"),
|
2023-03-08 16:29:01 +00:00
|
|
|
resources:
|
|
|
|
mem_mb=10000,
|
|
|
|
benchmark:
|
2023-08-23 15:14:57 +00:00
|
|
|
benchmarks("build_clustered_population_layouts/s{simpl}_{clusters}")
|
2023-03-08 18:26:41 +00:00
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
2023-03-08 16:29:01 +00:00
|
|
|
script:
|
2023-03-08 16:44:25 +00:00
|
|
|
"../scripts/build_clustered_population_layouts.py"
|
2023-03-08 16:29:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
rule build_simplified_population_layouts:
|
|
|
|
input:
|
2023-08-23 15:14:57 +00:00
|
|
|
pop_layout_total=resources("pop_layout_total.nc"),
|
|
|
|
pop_layout_urban=resources("pop_layout_urban.nc"),
|
|
|
|
pop_layout_rural=resources("pop_layout_rural.nc"),
|
|
|
|
regions_onshore=resources("regions_onshore_elec_s{simpl}.geojson"),
|
2024-02-12 15:56:00 +00:00
|
|
|
cutout=lambda w: "cutouts/"
|
|
|
|
+ CDIR
|
|
|
|
+ config_provider("atlite", "default_cutout")(w)
|
|
|
|
+ ".nc",
|
2023-03-08 16:29:01 +00:00
|
|
|
output:
|
2023-08-23 15:14:57 +00:00
|
|
|
clustered_pop_layout=resources("pop_layout_elec_s{simpl}.csv"),
|
2023-03-08 16:29:01 +00:00
|
|
|
resources:
|
|
|
|
mem_mb=10000,
|
2023-03-08 18:22:00 +00:00
|
|
|
log:
|
2023-08-23 15:14:57 +00:00
|
|
|
logs("build_simplified_population_layouts_{simpl}"),
|
2023-03-08 16:29:01 +00:00
|
|
|
benchmark:
|
2023-08-23 15:14:57 +00:00
|
|
|
benchmarks("build_simplified_population_layouts/s{simpl}")
|
2023-03-08 18:26:41 +00:00
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
2023-03-08 16:29:01 +00:00
|
|
|
script:
|
2023-03-08 16:44:25 +00:00
|
|
|
"../scripts/build_clustered_population_layouts.py"
|
2023-03-08 16:29:01 +00:00
|
|
|
|
|
|
|
|
2024-01-04 18:12:04 +00:00
|
|
|
rule build_gas_network:
|
|
|
|
input:
|
|
|
|
gas_network="data/gas_network/scigrid-gas/data/IGGIELGN_PipeSegments.geojson",
|
|
|
|
output:
|
2024-02-10 16:22:01 +00:00
|
|
|
cleaned_gas_network=resources("gas_network.csv"),
|
2024-01-04 18:12:04 +00:00
|
|
|
resources:
|
|
|
|
mem_mb=4000,
|
|
|
|
log:
|
2024-02-10 16:22:01 +00:00
|
|
|
logs("build_gas_network.log"),
|
2024-01-04 18:12:04 +00:00
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
|
|
|
script:
|
|
|
|
"../scripts/build_gas_network.py"
|
2023-03-08 16:29:01 +00:00
|
|
|
|
|
|
|
|
2024-01-04 18:12:04 +00:00
|
|
|
rule build_gas_input_locations:
|
|
|
|
input:
|
|
|
|
gem=HTTP.remote(
|
|
|
|
"https://globalenergymonitor.org/wp-content/uploads/2023/07/Europe-Gas-Tracker-2023-03-v3.xlsx",
|
|
|
|
keep_local=True,
|
|
|
|
),
|
|
|
|
entry="data/gas_network/scigrid-gas/data/IGGIELGN_BorderPoints.geojson",
|
|
|
|
storage="data/gas_network/scigrid-gas/data/IGGIELGN_Storages.geojson",
|
2024-02-10 16:22:01 +00:00
|
|
|
regions_onshore=resources("regions_onshore_elec_s{simpl}_{clusters}.geojson"),
|
|
|
|
regions_offshore=resources("regions_offshore_elec_s{simpl}_{clusters}.geojson"),
|
2024-01-04 18:12:04 +00:00
|
|
|
output:
|
2024-02-10 16:22:01 +00:00
|
|
|
gas_input_nodes=resources("gas_input_locations_s{simpl}_{clusters}.geojson"),
|
2024-02-10 16:22:36 +00:00
|
|
|
gas_input_nodes_simplified=resources(
|
|
|
|
"gas_input_locations_s{simpl}_{clusters}_simplified.csv"
|
|
|
|
),
|
2024-01-04 18:12:04 +00:00
|
|
|
resources:
|
|
|
|
mem_mb=2000,
|
|
|
|
log:
|
2024-02-10 16:22:01 +00:00
|
|
|
logs("build_gas_input_locations_s{simpl}_{clusters}.log"),
|
2024-01-04 18:12:04 +00:00
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
|
|
|
script:
|
|
|
|
"../scripts/build_gas_input_locations.py"
|
2023-03-08 16:29:01 +00:00
|
|
|
|
|
|
|
|
2024-01-04 18:12:04 +00:00
|
|
|
rule cluster_gas_network:
|
|
|
|
input:
|
2024-02-10 16:22:01 +00:00
|
|
|
cleaned_gas_network=resources("gas_network.csv"),
|
|
|
|
regions_onshore=resources("regions_onshore_elec_s{simpl}_{clusters}.geojson"),
|
|
|
|
regions_offshore=resources("regions_offshore_elec_s{simpl}_{clusters}.geojson"),
|
2024-01-04 18:12:04 +00:00
|
|
|
output:
|
2024-02-10 16:22:01 +00:00
|
|
|
clustered_gas_network=resources("gas_network_elec_s{simpl}_{clusters}.csv"),
|
2024-01-04 18:12:04 +00:00
|
|
|
resources:
|
|
|
|
mem_mb=4000,
|
|
|
|
log:
|
2024-02-10 16:22:01 +00:00
|
|
|
logs("cluster_gas_network_s{simpl}_{clusters}.log"),
|
2024-01-04 18:12:04 +00:00
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
|
|
|
script:
|
|
|
|
"../scripts/cluster_gas_network.py"
|
2023-03-08 16:29:01 +00:00
|
|
|
|
|
|
|
|
2024-01-15 15:47:19 +00:00
|
|
|
rule build_daily_heat_demand:
|
2023-05-15 08:33:17 +00:00
|
|
|
params:
|
2024-02-12 15:56:00 +00:00
|
|
|
snapshots=lambda w: {
|
|
|
|
k: config_provider("snapshots", k)(w)
|
|
|
|
for k in ["start", "end", "inclusive"]
|
2024-02-10 17:09:46 +00:00
|
|
|
},
|
2023-03-08 16:29:01 +00:00
|
|
|
input:
|
2023-08-23 15:14:57 +00:00
|
|
|
pop_layout=resources("pop_layout_{scope}.nc"),
|
|
|
|
regions_onshore=resources("regions_onshore_elec_s{simpl}_{clusters}.geojson"),
|
2024-02-12 15:56:00 +00:00
|
|
|
cutout=lambda w: "cutouts/"
|
|
|
|
+ CDIR
|
|
|
|
+ config_provider("atlite", "default_cutout")(w)
|
|
|
|
+ ".nc",
|
2023-03-08 16:29:01 +00:00
|
|
|
output:
|
2024-02-10 16:22:01 +00:00
|
|
|
heat_demand=resources("daily_heat_demand_{scope}_elec_s{simpl}_{clusters}.nc"),
|
2023-03-08 16:29:01 +00:00
|
|
|
resources:
|
|
|
|
mem_mb=20000,
|
|
|
|
threads: 8
|
2023-03-08 18:22:00 +00:00
|
|
|
log:
|
2024-02-10 16:22:01 +00:00
|
|
|
logs("build_daily_heat_demand_{scope}_{simpl}_{clusters}.loc"),
|
2023-03-08 16:29:01 +00:00
|
|
|
benchmark:
|
2024-02-10 16:22:01 +00:00
|
|
|
benchmarks("build_daily_heat_demand/{scope}_s{simpl}_{clusters}")
|
2023-03-08 18:26:41 +00:00
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
2023-03-08 16:29:01 +00:00
|
|
|
script:
|
2024-01-15 15:47:19 +00:00
|
|
|
"../scripts/build_daily_heat_demand.py"
|
|
|
|
|
|
|
|
|
|
|
|
rule build_hourly_heat_demand:
|
|
|
|
params:
|
2024-02-12 15:56:00 +00:00
|
|
|
snapshots=lambda w: {
|
|
|
|
k: config_provider("snapshots", k)(w)
|
|
|
|
for k in ["start", "end", "inclusive"]
|
2024-02-10 17:09:46 +00:00
|
|
|
},
|
2024-01-15 15:47:19 +00:00
|
|
|
input:
|
|
|
|
heat_profile="data/heat_load_profile_BDEW.csv",
|
2024-02-10 17:09:23 +00:00
|
|
|
heat_demand=resources("daily_heat_demand_{scope}_elec_s{simpl}_{clusters}.nc"),
|
2024-01-15 15:47:19 +00:00
|
|
|
output:
|
2024-02-10 17:09:23 +00:00
|
|
|
heat_demand=resources("hourly_heat_demand_{scope}_elec_s{simpl}_{clusters}.nc"),
|
2024-01-15 15:47:19 +00:00
|
|
|
resources:
|
|
|
|
mem_mb=2000,
|
|
|
|
threads: 8
|
|
|
|
log:
|
2024-02-10 17:09:23 +00:00
|
|
|
logs("build_hourly_heat_demand_{scope}_{simpl}_{clusters}.loc"),
|
2024-01-15 15:47:19 +00:00
|
|
|
benchmark:
|
2024-02-10 17:09:23 +00:00
|
|
|
benchmarks("build_hourly_heat_demand/{scope}_s{simpl}_{clusters}")
|
2024-01-15 15:47:19 +00:00
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
|
|
|
script:
|
|
|
|
"../scripts/build_hourly_heat_demand.py"
|
2023-03-08 16:29:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
rule build_temperature_profiles:
|
2023-05-15 08:33:17 +00:00
|
|
|
params:
|
2024-02-12 15:56:00 +00:00
|
|
|
snapshots=lambda w: {
|
|
|
|
k: config_provider("snapshots", k)(w)
|
|
|
|
for k in ["start", "end", "inclusive"]
|
2024-02-10 17:09:46 +00:00
|
|
|
},
|
2023-03-08 16:29:01 +00:00
|
|
|
input:
|
2023-08-23 15:14:57 +00:00
|
|
|
pop_layout=resources("pop_layout_{scope}.nc"),
|
|
|
|
regions_onshore=resources("regions_onshore_elec_s{simpl}_{clusters}.geojson"),
|
2024-02-12 15:56:00 +00:00
|
|
|
cutout=lambda w: "cutouts/"
|
|
|
|
+ CDIR
|
|
|
|
+ config_provider("atlite", "default_cutout")(w)
|
|
|
|
+ ".nc",
|
2023-03-08 16:29:01 +00:00
|
|
|
output:
|
2023-08-23 15:14:57 +00:00
|
|
|
temp_soil=resources("temp_soil_{scope}_elec_s{simpl}_{clusters}.nc"),
|
|
|
|
temp_air=resources("temp_air_{scope}_elec_s{simpl}_{clusters}.nc"),
|
2023-03-08 16:29:01 +00:00
|
|
|
resources:
|
|
|
|
mem_mb=20000,
|
|
|
|
threads: 8
|
2023-03-08 18:22:00 +00:00
|
|
|
log:
|
2023-08-23 15:14:57 +00:00
|
|
|
logs("build_temperature_profiles_{scope}_{simpl}_{clusters}.log"),
|
2023-03-08 16:29:01 +00:00
|
|
|
benchmark:
|
2023-08-23 15:14:57 +00:00
|
|
|
benchmarks("build_temperature_profiles/{scope}_s{simpl}_{clusters}")
|
2023-03-08 18:26:41 +00:00
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
2023-03-08 16:29:01 +00:00
|
|
|
script:
|
2023-03-08 16:44:25 +00:00
|
|
|
"../scripts/build_temperature_profiles.py"
|
2023-03-08 16:29:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
rule build_cop_profiles:
|
2023-05-15 08:33:17 +00:00
|
|
|
params:
|
2023-08-15 13:02:41 +00:00
|
|
|
heat_pump_sink_T=config_provider("sector", "heat_pump_sink_T"),
|
2023-03-08 16:29:01 +00:00
|
|
|
input:
|
2023-08-23 15:14:57 +00:00
|
|
|
temp_soil_total=resources("temp_soil_total_elec_s{simpl}_{clusters}.nc"),
|
|
|
|
temp_soil_rural=resources("temp_soil_rural_elec_s{simpl}_{clusters}.nc"),
|
|
|
|
temp_soil_urban=resources("temp_soil_urban_elec_s{simpl}_{clusters}.nc"),
|
|
|
|
temp_air_total=resources("temp_air_total_elec_s{simpl}_{clusters}.nc"),
|
|
|
|
temp_air_rural=resources("temp_air_rural_elec_s{simpl}_{clusters}.nc"),
|
|
|
|
temp_air_urban=resources("temp_air_urban_elec_s{simpl}_{clusters}.nc"),
|
2023-03-08 16:29:01 +00:00
|
|
|
output:
|
2023-08-23 15:14:57 +00:00
|
|
|
cop_soil_total=resources("cop_soil_total_elec_s{simpl}_{clusters}.nc"),
|
|
|
|
cop_soil_rural=resources("cop_soil_rural_elec_s{simpl}_{clusters}.nc"),
|
|
|
|
cop_soil_urban=resources("cop_soil_urban_elec_s{simpl}_{clusters}.nc"),
|
|
|
|
cop_air_total=resources("cop_air_total_elec_s{simpl}_{clusters}.nc"),
|
|
|
|
cop_air_rural=resources("cop_air_rural_elec_s{simpl}_{clusters}.nc"),
|
|
|
|
cop_air_urban=resources("cop_air_urban_elec_s{simpl}_{clusters}.nc"),
|
2023-03-08 16:29:01 +00:00
|
|
|
resources:
|
|
|
|
mem_mb=20000,
|
2023-03-08 18:22:00 +00:00
|
|
|
log:
|
2023-08-23 15:14:57 +00:00
|
|
|
logs("build_cop_profiles_s{simpl}_{clusters}.log"),
|
2023-03-08 16:29:01 +00:00
|
|
|
benchmark:
|
2023-08-23 15:14:57 +00:00
|
|
|
benchmarks("build_cop_profiles/s{simpl}_{clusters}")
|
2023-03-08 18:26:41 +00:00
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
2023-03-08 16:29:01 +00:00
|
|
|
script:
|
2023-03-08 16:44:25 +00:00
|
|
|
"../scripts/build_cop_profiles.py"
|
2023-03-08 16:29:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
rule build_solar_thermal_profiles:
|
2023-05-15 08:33:17 +00:00
|
|
|
params:
|
2024-02-12 15:56:00 +00:00
|
|
|
snapshots=lambda w: {
|
|
|
|
k: config_provider("snapshots", k)(w)
|
|
|
|
for k in ["start", "end", "inclusive"]
|
2024-02-12 10:00:02 +00:00
|
|
|
},
|
2023-08-15 13:02:41 +00:00
|
|
|
solar_thermal=config_provider("solar_thermal"),
|
2023-03-08 16:29:01 +00:00
|
|
|
input:
|
2023-08-23 15:14:57 +00:00
|
|
|
pop_layout=resources("pop_layout_{scope}.nc"),
|
|
|
|
regions_onshore=resources("regions_onshore_elec_s{simpl}_{clusters}.geojson"),
|
2024-02-12 15:56:00 +00:00
|
|
|
cutout=lambda w: "cutouts/"
|
|
|
|
+ CDIR
|
|
|
|
+ config_provider("atlite", "default_cutout")(w)
|
|
|
|
+ ".nc",
|
2023-03-08 16:29:01 +00:00
|
|
|
output:
|
2023-08-23 15:14:57 +00:00
|
|
|
solar_thermal=resources("solar_thermal_{scope}_elec_s{simpl}_{clusters}.nc"),
|
2023-03-08 16:29:01 +00:00
|
|
|
resources:
|
|
|
|
mem_mb=20000,
|
|
|
|
threads: 16
|
2023-03-08 18:22:00 +00:00
|
|
|
log:
|
2023-08-23 15:14:57 +00:00
|
|
|
logs("build_solar_thermal_profiles_{scope}_s{simpl}_{clusters}.log"),
|
2023-03-08 16:29:01 +00:00
|
|
|
benchmark:
|
2023-08-23 15:14:57 +00:00
|
|
|
benchmarks("build_solar_thermal_profiles/{scope}_s{simpl}_{clusters}")
|
2023-03-08 18:26:41 +00:00
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
2023-03-08 16:29:01 +00:00
|
|
|
script:
|
2023-03-08 16:44:25 +00:00
|
|
|
"../scripts/build_solar_thermal_profiles.py"
|
2023-03-08 16:29:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
rule build_energy_totals:
|
2023-05-15 08:33:17 +00:00
|
|
|
params:
|
2023-08-15 13:02:41 +00:00
|
|
|
countries=config_provider("countries"),
|
|
|
|
energy=config_provider("energy"),
|
2023-03-08 16:29:01 +00:00
|
|
|
input:
|
2023-08-23 15:14:57 +00:00
|
|
|
nuts3_shapes=resources("nuts3_shapes.geojson"),
|
2023-08-24 09:11:33 +00:00
|
|
|
co2="data/bundle-sector/eea/UNFCCC_v23.csv",
|
|
|
|
swiss="data/bundle-sector/switzerland-sfoe/switzerland-new_format.csv",
|
|
|
|
idees="data/bundle-sector/jrc-idees-2015",
|
2023-03-08 16:29:01 +00:00
|
|
|
district_heat_share="data/district_heat_share.csv",
|
|
|
|
eurostat=input_eurostat,
|
|
|
|
output:
|
2023-08-23 15:14:57 +00:00
|
|
|
energy_name=resources("energy_totals.csv"),
|
|
|
|
co2_name=resources("co2_totals.csv"),
|
|
|
|
transport_name=resources("transport_data.csv"),
|
2024-02-10 16:22:01 +00:00
|
|
|
district_heat_share=resources("district_heat_share.csv"),
|
2023-03-08 16:29:01 +00:00
|
|
|
threads: 16
|
|
|
|
resources:
|
|
|
|
mem_mb=10000,
|
2023-03-08 18:22:00 +00:00
|
|
|
log:
|
2023-08-23 15:14:57 +00:00
|
|
|
logs("build_energy_totals.log"),
|
2023-03-08 16:29:01 +00:00
|
|
|
benchmark:
|
2023-08-23 15:14:57 +00:00
|
|
|
benchmarks("build_energy_totals")
|
2023-03-08 18:26:41 +00:00
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
2023-03-08 16:29:01 +00:00
|
|
|
script:
|
2023-03-08 16:44:25 +00:00
|
|
|
"../scripts/build_energy_totals.py"
|
2023-03-08 16:29:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
rule build_biomass_potentials:
|
2023-05-15 08:33:17 +00:00
|
|
|
params:
|
2023-08-15 13:02:41 +00:00
|
|
|
biomass=config_provider("biomass"),
|
2023-03-08 16:29:01 +00:00
|
|
|
input:
|
|
|
|
enspreso_biomass=HTTP.remote(
|
2023-12-11 15:03:45 +00:00
|
|
|
"https://zenodo.org/records/10356004/files/ENSPRESO_BIOMASS.xlsx",
|
2023-03-08 16:29:01 +00:00
|
|
|
keep_local=True,
|
|
|
|
),
|
2023-08-24 09:11:33 +00:00
|
|
|
nuts2="data/bundle-sector/nuts/NUTS_RG_10M_2013_4326_LEVL_2.geojson", # https://gisco-services.ec.europa.eu/distribution/v2/nuts/download/#nuts21
|
2023-08-23 15:14:57 +00:00
|
|
|
regions_onshore=resources("regions_onshore_elec_s{simpl}_{clusters}.geojson"),
|
2023-03-08 17:03:49 +00:00
|
|
|
nuts3_population=ancient("data/bundle/nama_10r_3popgdp.tsv.gz"),
|
|
|
|
swiss_cantons=ancient("data/bundle/ch_cantons.csv"),
|
|
|
|
swiss_population=ancient("data/bundle/je-e-21.03.02.xls"),
|
2023-08-23 15:14:57 +00:00
|
|
|
country_shapes=resources("country_shapes.geojson"),
|
2023-03-08 16:29:01 +00:00
|
|
|
output:
|
2023-08-23 15:14:57 +00:00
|
|
|
biomass_potentials_all=resources(
|
2024-02-10 16:22:01 +00:00
|
|
|
"biomass_potentials_all_s{simpl}_{clusters}_{planning_horizons}.csv"
|
2023-08-23 15:14:57 +00:00
|
|
|
),
|
2024-02-10 16:22:36 +00:00
|
|
|
biomass_potentials=resources(
|
|
|
|
"biomass_potentials_s{simpl}_{clusters}_{planning_horizons}.csv"
|
|
|
|
),
|
2023-03-08 16:29:01 +00:00
|
|
|
threads: 1
|
|
|
|
resources:
|
|
|
|
mem_mb=1000,
|
2023-03-08 18:22:00 +00:00
|
|
|
log:
|
2024-02-10 16:22:01 +00:00
|
|
|
logs("build_biomass_potentials_s{simpl}_{clusters}_{planning_horizons}.log"),
|
2023-03-08 16:29:01 +00:00
|
|
|
benchmark:
|
2024-02-10 16:22:01 +00:00
|
|
|
benchmarks("build_biomass_potentials_s{simpl}_{clusters}_{planning_horizons}")
|
2023-03-08 18:26:41 +00:00
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
2023-03-08 16:29:01 +00:00
|
|
|
script:
|
2023-03-08 16:44:25 +00:00
|
|
|
"../scripts/build_biomass_potentials.py"
|
2023-03-08 16:29:01 +00:00
|
|
|
|
|
|
|
|
2024-02-12 15:56:00 +00:00
|
|
|
rule build_biomass_transport_costs:
|
|
|
|
input:
|
|
|
|
transport_cost_data=HTTP.remote(
|
|
|
|
"publications.jrc.ec.europa.eu/repository/bitstream/JRC98626/biomass potentials in europe_web rev.pdf",
|
|
|
|
keep_local=True,
|
|
|
|
),
|
|
|
|
output:
|
|
|
|
biomass_transport_costs=resources("biomass_transport_costs.csv"),
|
|
|
|
threads: 1
|
|
|
|
resources:
|
|
|
|
mem_mb=1000,
|
|
|
|
log:
|
|
|
|
logs("build_biomass_transport_costs.log"),
|
|
|
|
benchmark:
|
|
|
|
benchmarks("build_biomass_transport_costs")
|
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
|
|
|
script:
|
|
|
|
"../scripts/build_biomass_transport_costs.py"
|
|
|
|
|
|
|
|
|
|
|
|
rule build_sequestration_potentials:
|
|
|
|
params:
|
|
|
|
sequestration_potential=config_provider(
|
|
|
|
"sector", "regional_co2_sequestration_potential"
|
|
|
|
),
|
|
|
|
input:
|
|
|
|
sequestration_potential=HTTP.remote(
|
|
|
|
"https://raw.githubusercontent.com/ericzhou571/Co2Storage/main/resources/complete_map_2020_unit_Mt.geojson",
|
|
|
|
keep_local=True,
|
|
|
|
),
|
|
|
|
regions_onshore=resources("regions_onshore_elec_s{simpl}_{clusters}.geojson"),
|
|
|
|
regions_offshore=resources("regions_offshore_elec_s{simpl}_{clusters}.geojson"),
|
|
|
|
output:
|
|
|
|
sequestration_potential=resources(
|
|
|
|
"co2_sequestration_potential_elec_s{simpl}_{clusters}.csv"
|
|
|
|
),
|
|
|
|
threads: 1
|
|
|
|
resources:
|
|
|
|
mem_mb=4000,
|
|
|
|
log:
|
|
|
|
logs("build_sequestration_potentials_s{simpl}_{clusters}.log"),
|
|
|
|
benchmark:
|
|
|
|
benchmarks("build_sequestration_potentials_s{simpl}_{clusters}")
|
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
|
|
|
script:
|
|
|
|
"../scripts/build_sequestration_potentials.py"
|
2023-03-08 16:29:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
rule build_salt_cavern_potentials:
|
|
|
|
input:
|
2023-08-24 09:11:33 +00:00
|
|
|
salt_caverns="data/bundle-sector/h2_salt_caverns_GWh_per_sqkm.geojson",
|
2023-08-23 15:14:57 +00:00
|
|
|
regions_onshore=resources("regions_onshore_elec_s{simpl}_{clusters}.geojson"),
|
|
|
|
regions_offshore=resources("regions_offshore_elec_s{simpl}_{clusters}.geojson"),
|
2023-03-08 16:29:01 +00:00
|
|
|
output:
|
2023-08-23 15:14:57 +00:00
|
|
|
h2_cavern_potential=resources("salt_cavern_potentials_s{simpl}_{clusters}.csv"),
|
2023-03-08 16:29:01 +00:00
|
|
|
threads: 1
|
|
|
|
resources:
|
|
|
|
mem_mb=2000,
|
2023-03-08 18:22:00 +00:00
|
|
|
log:
|
2023-08-23 15:14:57 +00:00
|
|
|
logs("build_salt_cavern_potentials_s{simpl}_{clusters}.log"),
|
2023-03-08 16:29:01 +00:00
|
|
|
benchmark:
|
2023-08-23 15:14:57 +00:00
|
|
|
benchmarks("build_salt_cavern_potentials_s{simpl}_{clusters}")
|
2023-03-08 18:26:41 +00:00
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
2023-03-08 16:29:01 +00:00
|
|
|
script:
|
2023-03-08 16:44:25 +00:00
|
|
|
"../scripts/build_salt_cavern_potentials.py"
|
2023-03-08 16:29:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
rule build_ammonia_production:
|
2023-05-15 08:33:17 +00:00
|
|
|
params:
|
2023-08-15 13:02:41 +00:00
|
|
|
countries=config_provider("countries"),
|
2023-03-08 16:29:01 +00:00
|
|
|
input:
|
2023-08-24 09:11:33 +00:00
|
|
|
usgs="data/bundle-sector/myb1-2017-nitro.xls",
|
2023-03-08 16:29:01 +00:00
|
|
|
output:
|
2023-08-23 15:14:57 +00:00
|
|
|
ammonia_production=resources("ammonia_production.csv"),
|
2023-03-08 16:29:01 +00:00
|
|
|
threads: 1
|
|
|
|
resources:
|
|
|
|
mem_mb=1000,
|
2023-03-08 18:22:00 +00:00
|
|
|
log:
|
2023-08-23 15:14:57 +00:00
|
|
|
logs("build_ammonia_production.log"),
|
2023-03-08 16:29:01 +00:00
|
|
|
benchmark:
|
2023-08-23 15:14:57 +00:00
|
|
|
benchmarks("build_ammonia_production")
|
2023-03-08 18:26:41 +00:00
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
2023-03-08 16:29:01 +00:00
|
|
|
script:
|
2023-03-08 16:44:25 +00:00
|
|
|
"../scripts/build_ammonia_production.py"
|
2023-03-08 16:29:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
rule build_industry_sector_ratios:
|
2023-05-15 08:33:17 +00:00
|
|
|
params:
|
2023-08-15 13:02:41 +00:00
|
|
|
industry=config_provider("industry"),
|
|
|
|
ammonia=config_provider("sector", "ammonia", default=False),
|
2023-03-08 16:29:01 +00:00
|
|
|
input:
|
2023-08-23 15:14:57 +00:00
|
|
|
ammonia_production=resources("ammonia_production.csv"),
|
2023-08-24 09:11:33 +00:00
|
|
|
idees="data/bundle-sector/jrc-idees-2015",
|
2023-03-08 16:29:01 +00:00
|
|
|
output:
|
2023-08-23 15:14:57 +00:00
|
|
|
industry_sector_ratios=resources("industry_sector_ratios.csv"),
|
2023-03-08 16:29:01 +00:00
|
|
|
threads: 1
|
|
|
|
resources:
|
|
|
|
mem_mb=1000,
|
2023-03-08 18:22:00 +00:00
|
|
|
log:
|
2023-08-23 15:14:57 +00:00
|
|
|
logs("build_industry_sector_ratios.log"),
|
2023-03-08 16:29:01 +00:00
|
|
|
benchmark:
|
2023-08-23 15:14:57 +00:00
|
|
|
benchmarks("build_industry_sector_ratios")
|
2023-03-08 18:26:41 +00:00
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
2023-03-08 16:29:01 +00:00
|
|
|
script:
|
2023-03-08 16:44:25 +00:00
|
|
|
"../scripts/build_industry_sector_ratios.py"
|
2023-03-08 16:29:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
rule build_industrial_production_per_country:
|
2023-05-15 08:33:17 +00:00
|
|
|
params:
|
2023-08-15 13:02:41 +00:00
|
|
|
industry=config_provider("industry"),
|
|
|
|
countries=config_provider("countries"),
|
2023-03-08 16:29:01 +00:00
|
|
|
input:
|
2023-08-23 15:14:57 +00:00
|
|
|
ammonia_production=resources("ammonia_production.csv"),
|
2023-08-24 09:11:33 +00:00
|
|
|
jrc="data/bundle-sector/jrc-idees-2015",
|
|
|
|
eurostat="data/bundle-sector/eurostat-energy_balances-may_2018_edition",
|
2023-03-08 16:29:01 +00:00
|
|
|
output:
|
2023-08-23 15:14:57 +00:00
|
|
|
industrial_production_per_country=resources(
|
|
|
|
"industrial_production_per_country.csv"
|
|
|
|
),
|
2023-03-08 16:29:01 +00:00
|
|
|
threads: 8
|
|
|
|
resources:
|
|
|
|
mem_mb=1000,
|
2023-03-08 18:22:00 +00:00
|
|
|
log:
|
2023-08-23 15:14:57 +00:00
|
|
|
logs("build_industrial_production_per_country.log"),
|
2023-03-08 16:29:01 +00:00
|
|
|
benchmark:
|
2023-08-23 15:14:57 +00:00
|
|
|
benchmarks("build_industrial_production_per_country")
|
2023-03-08 18:26:41 +00:00
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
2023-03-08 16:29:01 +00:00
|
|
|
script:
|
2023-03-08 16:44:25 +00:00
|
|
|
"../scripts/build_industrial_production_per_country.py"
|
2023-03-08 16:29:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
rule build_industrial_production_per_country_tomorrow:
|
2023-05-15 08:33:17 +00:00
|
|
|
params:
|
2023-08-15 13:02:41 +00:00
|
|
|
industry=config_provider("industry"),
|
2023-03-08 16:29:01 +00:00
|
|
|
input:
|
2023-08-23 15:14:57 +00:00
|
|
|
industrial_production_per_country=resources(
|
|
|
|
"industrial_production_per_country.csv"
|
|
|
|
),
|
2023-03-08 16:29:01 +00:00
|
|
|
output:
|
2023-08-23 15:14:57 +00:00
|
|
|
industrial_production_per_country_tomorrow=resources(
|
|
|
|
"industrial_production_per_country_tomorrow_{planning_horizons}.csv"
|
|
|
|
),
|
2023-03-08 16:29:01 +00:00
|
|
|
threads: 1
|
|
|
|
resources:
|
|
|
|
mem_mb=1000,
|
2023-03-08 18:22:00 +00:00
|
|
|
log:
|
2023-08-23 15:14:57 +00:00
|
|
|
logs("build_industrial_production_per_country_tomorrow_{planning_horizons}.log"),
|
2023-03-08 16:29:01 +00:00
|
|
|
benchmark:
|
2023-03-08 18:26:41 +00:00
|
|
|
(
|
2023-08-23 15:14:57 +00:00
|
|
|
benchmarks(
|
|
|
|
"build_industrial_production_per_country_tomorrow_{planning_horizons}"
|
|
|
|
)
|
2023-03-08 18:26:41 +00:00
|
|
|
)
|
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
2023-03-08 16:29:01 +00:00
|
|
|
script:
|
2023-03-08 16:44:25 +00:00
|
|
|
"../scripts/build_industrial_production_per_country_tomorrow.py"
|
2023-03-08 16:29:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
rule build_industrial_distribution_key:
|
2023-05-15 08:33:17 +00:00
|
|
|
params:
|
2023-08-15 13:02:41 +00:00
|
|
|
hotmaps_locate_missing=config_provider(
|
|
|
|
"industry", "hotmaps_locate_missing", default=False
|
|
|
|
),
|
|
|
|
countries=config_provider("countries"),
|
2023-03-08 16:29:01 +00:00
|
|
|
input:
|
2023-08-23 15:14:57 +00:00
|
|
|
regions_onshore=resources("regions_onshore_elec_s{simpl}_{clusters}.geojson"),
|
|
|
|
clustered_pop_layout=resources("pop_layout_elec_s{simpl}_{clusters}.csv"),
|
2023-08-24 09:11:33 +00:00
|
|
|
hotmaps_industrial_database="data/bundle-sector/Industrial_Database.csv",
|
2023-03-08 16:29:01 +00:00
|
|
|
output:
|
2023-08-23 15:14:57 +00:00
|
|
|
industrial_distribution_key=resources(
|
|
|
|
"industrial_distribution_key_elec_s{simpl}_{clusters}.csv"
|
|
|
|
),
|
2023-03-08 16:29:01 +00:00
|
|
|
threads: 1
|
|
|
|
resources:
|
|
|
|
mem_mb=1000,
|
2023-03-08 18:22:00 +00:00
|
|
|
log:
|
2023-08-23 15:14:57 +00:00
|
|
|
logs("build_industrial_distribution_key_s{simpl}_{clusters}.log"),
|
2023-03-08 16:29:01 +00:00
|
|
|
benchmark:
|
2023-08-23 15:14:57 +00:00
|
|
|
benchmarks("build_industrial_distribution_key/s{simpl}_{clusters}")
|
2023-03-08 18:26:41 +00:00
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
2023-03-08 16:29:01 +00:00
|
|
|
script:
|
2023-03-08 16:44:25 +00:00
|
|
|
"../scripts/build_industrial_distribution_key.py"
|
2023-03-08 16:29:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
rule build_industrial_production_per_node:
|
|
|
|
input:
|
2023-08-23 15:14:57 +00:00
|
|
|
industrial_distribution_key=resources(
|
|
|
|
"industrial_distribution_key_elec_s{simpl}_{clusters}.csv"
|
|
|
|
),
|
|
|
|
industrial_production_per_country_tomorrow=resources(
|
|
|
|
"industrial_production_per_country_tomorrow_{planning_horizons}.csv"
|
|
|
|
),
|
2023-03-08 16:29:01 +00:00
|
|
|
output:
|
2023-08-23 15:14:57 +00:00
|
|
|
industrial_production_per_node=resources(
|
|
|
|
"industrial_production_elec_s{simpl}_{clusters}_{planning_horizons}.csv"
|
|
|
|
),
|
2023-03-08 16:29:01 +00:00
|
|
|
threads: 1
|
|
|
|
resources:
|
|
|
|
mem_mb=1000,
|
2023-03-08 18:22:00 +00:00
|
|
|
log:
|
2023-08-23 15:14:57 +00:00
|
|
|
logs(
|
|
|
|
"build_industrial_production_per_node_s{simpl}_{clusters}_{planning_horizons}.log"
|
|
|
|
),
|
2023-03-08 16:29:01 +00:00
|
|
|
benchmark:
|
2023-03-08 18:26:41 +00:00
|
|
|
(
|
2023-08-23 15:14:57 +00:00
|
|
|
benchmarks(
|
|
|
|
"build_industrial_production_per_node/s{simpl}_{clusters}_{planning_horizons}"
|
|
|
|
)
|
2023-03-08 18:26:41 +00:00
|
|
|
)
|
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
2023-03-08 16:29:01 +00:00
|
|
|
script:
|
2023-03-08 16:44:25 +00:00
|
|
|
"../scripts/build_industrial_production_per_node.py"
|
2023-03-08 16:29:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
rule build_industrial_energy_demand_per_node:
|
|
|
|
input:
|
2023-08-23 15:14:57 +00:00
|
|
|
industry_sector_ratios=resources("industry_sector_ratios.csv"),
|
|
|
|
industrial_production_per_node=resources(
|
|
|
|
"industrial_production_elec_s{simpl}_{clusters}_{planning_horizons}.csv"
|
|
|
|
),
|
|
|
|
industrial_energy_demand_per_node_today=resources(
|
|
|
|
"industrial_energy_demand_today_elec_s{simpl}_{clusters}.csv"
|
|
|
|
),
|
2023-03-08 16:29:01 +00:00
|
|
|
output:
|
2023-08-23 15:14:57 +00:00
|
|
|
industrial_energy_demand_per_node=resources(
|
|
|
|
"industrial_energy_demand_elec_s{simpl}_{clusters}_{planning_horizons}.csv"
|
|
|
|
),
|
2023-03-08 16:29:01 +00:00
|
|
|
threads: 1
|
|
|
|
resources:
|
|
|
|
mem_mb=1000,
|
2023-03-08 18:22:00 +00:00
|
|
|
log:
|
2023-08-23 15:14:57 +00:00
|
|
|
logs(
|
|
|
|
"build_industrial_energy_demand_per_node_s{simpl}_{clusters}_{planning_horizons}.log"
|
|
|
|
),
|
2023-03-08 16:29:01 +00:00
|
|
|
benchmark:
|
2023-03-08 18:26:41 +00:00
|
|
|
(
|
2023-08-23 15:14:57 +00:00
|
|
|
benchmarks(
|
|
|
|
"build_industrial_energy_demand_per_node/s{simpl}_{clusters}_{planning_horizons}"
|
|
|
|
)
|
2023-03-08 18:26:41 +00:00
|
|
|
)
|
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
2023-03-08 16:29:01 +00:00
|
|
|
script:
|
2023-03-08 16:44:25 +00:00
|
|
|
"../scripts/build_industrial_energy_demand_per_node.py"
|
2023-03-08 16:29:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
rule build_industrial_energy_demand_per_country_today:
|
2023-05-15 08:33:17 +00:00
|
|
|
params:
|
2023-08-15 13:02:41 +00:00
|
|
|
countries=config_provider("countries"),
|
|
|
|
industry=config_provider("industry"),
|
2023-03-08 16:29:01 +00:00
|
|
|
input:
|
2023-08-24 09:11:33 +00:00
|
|
|
jrc="data/bundle-sector/jrc-idees-2015",
|
2023-08-23 15:14:57 +00:00
|
|
|
ammonia_production=resources("ammonia_production.csv"),
|
|
|
|
industrial_production_per_country=resources(
|
|
|
|
"industrial_production_per_country.csv"
|
|
|
|
),
|
2023-03-08 16:29:01 +00:00
|
|
|
output:
|
2023-08-23 15:14:57 +00:00
|
|
|
industrial_energy_demand_per_country_today=resources(
|
|
|
|
"industrial_energy_demand_per_country_today.csv"
|
|
|
|
),
|
2023-03-08 16:29:01 +00:00
|
|
|
threads: 8
|
|
|
|
resources:
|
|
|
|
mem_mb=1000,
|
2023-03-08 18:22:00 +00:00
|
|
|
log:
|
2023-08-23 15:14:57 +00:00
|
|
|
logs("build_industrial_energy_demand_per_country_today.log"),
|
2023-03-08 16:29:01 +00:00
|
|
|
benchmark:
|
2023-08-23 15:14:57 +00:00
|
|
|
benchmarks("build_industrial_energy_demand_per_country_today")
|
2023-03-08 18:26:41 +00:00
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
2023-03-08 16:29:01 +00:00
|
|
|
script:
|
2023-03-08 16:44:25 +00:00
|
|
|
"../scripts/build_industrial_energy_demand_per_country_today.py"
|
2023-03-08 16:29:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
rule build_industrial_energy_demand_per_node_today:
|
|
|
|
input:
|
2023-08-23 15:14:57 +00:00
|
|
|
industrial_distribution_key=resources(
|
|
|
|
"industrial_distribution_key_elec_s{simpl}_{clusters}.csv"
|
|
|
|
),
|
|
|
|
industrial_energy_demand_per_country_today=resources(
|
|
|
|
"industrial_energy_demand_per_country_today.csv"
|
|
|
|
),
|
2023-03-08 16:29:01 +00:00
|
|
|
output:
|
2023-08-23 15:14:57 +00:00
|
|
|
industrial_energy_demand_per_node_today=resources(
|
|
|
|
"industrial_energy_demand_today_elec_s{simpl}_{clusters}.csv"
|
|
|
|
),
|
2023-03-08 16:29:01 +00:00
|
|
|
threads: 1
|
|
|
|
resources:
|
|
|
|
mem_mb=1000,
|
2023-03-08 18:22:00 +00:00
|
|
|
log:
|
2023-08-23 15:14:57 +00:00
|
|
|
logs("build_industrial_energy_demand_per_node_today_s{simpl}_{clusters}.log"),
|
2023-03-08 16:29:01 +00:00
|
|
|
benchmark:
|
2023-08-23 15:14:57 +00:00
|
|
|
benchmarks("build_industrial_energy_demand_per_node_today/s{simpl}_{clusters}")
|
2023-03-08 18:26:41 +00:00
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
2023-03-08 16:29:01 +00:00
|
|
|
script:
|
2023-03-08 16:44:25 +00:00
|
|
|
"../scripts/build_industrial_energy_demand_per_node_today.py"
|
2023-03-08 16:29:01 +00:00
|
|
|
|
|
|
|
|
2024-02-12 15:56:00 +00:00
|
|
|
rule build_retro_cost:
|
|
|
|
params:
|
|
|
|
retrofitting=config_provider("sector", "retrofitting"),
|
|
|
|
countries=config_provider("countries"),
|
|
|
|
input:
|
|
|
|
building_stock="data/retro/data_building_stock.csv",
|
|
|
|
data_tabula="data/bundle-sector/retro/tabula-calculator-calcsetbuilding.csv",
|
|
|
|
air_temperature=resources("temp_air_total_elec_s{simpl}_{clusters}.nc"),
|
|
|
|
u_values_PL="data/retro/u_values_poland.csv",
|
|
|
|
tax_w="data/retro/electricity_taxes_eu.csv",
|
|
|
|
construction_index="data/retro/comparative_level_investment.csv",
|
|
|
|
floor_area_missing="data/retro/floor_area_missing.csv",
|
|
|
|
clustered_pop_layout=resources("pop_layout_elec_s{simpl}_{clusters}.csv"),
|
|
|
|
cost_germany="data/retro/retro_cost_germany.csv",
|
|
|
|
window_assumptions="data/retro/window_assumptions.csv",
|
|
|
|
output:
|
|
|
|
retro_cost=resources("retro_cost_elec_s{simpl}_{clusters}.csv"),
|
|
|
|
floor_area=resources("floor_area_elec_s{simpl}_{clusters}.csv"),
|
|
|
|
resources:
|
|
|
|
mem_mb=1000,
|
|
|
|
log:
|
|
|
|
logs("build_retro_cost_s{simpl}_{clusters}.log"),
|
|
|
|
benchmark:
|
|
|
|
benchmarks("build_retro_cost/s{simpl}_{clusters}")
|
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
|
|
|
script:
|
|
|
|
"../scripts/build_retro_cost.py"
|
2023-03-08 16:29:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
rule build_population_weighted_energy_totals:
|
|
|
|
input:
|
2023-08-23 15:14:57 +00:00
|
|
|
energy_totals=resources("energy_totals.csv"),
|
|
|
|
clustered_pop_layout=resources("pop_layout_elec_s{simpl}_{clusters}.csv"),
|
2023-03-08 16:29:01 +00:00
|
|
|
output:
|
2023-08-23 15:14:57 +00:00
|
|
|
resources("pop_weighted_energy_totals_s{simpl}_{clusters}.csv"),
|
2023-03-08 16:29:01 +00:00
|
|
|
threads: 1
|
|
|
|
resources:
|
|
|
|
mem_mb=2000,
|
2023-03-08 18:22:00 +00:00
|
|
|
log:
|
2023-08-23 15:14:57 +00:00
|
|
|
logs("build_population_weighted_energy_totals_s{simpl}_{clusters}.log"),
|
2023-03-08 18:26:41 +00:00
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
2023-03-08 16:29:01 +00:00
|
|
|
script:
|
2023-03-08 16:44:25 +00:00
|
|
|
"../scripts/build_population_weighted_energy_totals.py"
|
2023-03-08 16:29:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
rule build_shipping_demand:
|
|
|
|
input:
|
|
|
|
ports="data/attributed_ports.json",
|
2023-08-23 15:14:57 +00:00
|
|
|
scope=resources("europe_shape.geojson"),
|
|
|
|
regions=resources("regions_onshore_elec_s{simpl}_{clusters}.geojson"),
|
|
|
|
demand=resources("energy_totals.csv"),
|
2023-03-08 16:29:01 +00:00
|
|
|
output:
|
2023-08-23 15:14:57 +00:00
|
|
|
resources("shipping_demand_s{simpl}_{clusters}.csv"),
|
2023-03-08 16:29:01 +00:00
|
|
|
threads: 1
|
|
|
|
resources:
|
|
|
|
mem_mb=2000,
|
2023-03-08 18:22:00 +00:00
|
|
|
log:
|
2023-08-23 15:14:57 +00:00
|
|
|
logs("build_shipping_demand_s{simpl}_{clusters}.log"),
|
2023-03-08 18:26:41 +00:00
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
2023-03-08 16:29:01 +00:00
|
|
|
script:
|
2023-03-08 16:44:25 +00:00
|
|
|
"../scripts/build_shipping_demand.py"
|
2023-03-08 16:29:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
rule build_transport_demand:
|
2023-05-15 08:33:17 +00:00
|
|
|
params:
|
2024-02-12 15:56:00 +00:00
|
|
|
snapshots=lambda w: {
|
|
|
|
k: config_provider("snapshots", k)(w)
|
|
|
|
for k in ["start", "end", "inclusive"]
|
2024-02-10 17:09:46 +00:00
|
|
|
},
|
2023-08-15 13:02:41 +00:00
|
|
|
sector=config_provider("sector"),
|
2023-03-08 16:29:01 +00:00
|
|
|
input:
|
2023-08-23 15:14:57 +00:00
|
|
|
clustered_pop_layout=resources("pop_layout_elec_s{simpl}_{clusters}.csv"),
|
|
|
|
pop_weighted_energy_totals=resources(
|
|
|
|
"pop_weighted_energy_totals_s{simpl}_{clusters}.csv"
|
|
|
|
),
|
|
|
|
transport_data=resources("transport_data.csv"),
|
2023-08-24 09:11:33 +00:00
|
|
|
traffic_data_KFZ="data/bundle-sector/emobility/KFZ__count",
|
|
|
|
traffic_data_Pkw="data/bundle-sector/emobility/Pkw__count",
|
2023-08-23 15:14:57 +00:00
|
|
|
temp_air_total=resources("temp_air_total_elec_s{simpl}_{clusters}.nc"),
|
2023-03-08 16:29:01 +00:00
|
|
|
output:
|
2023-08-23 15:14:57 +00:00
|
|
|
transport_demand=resources("transport_demand_s{simpl}_{clusters}.csv"),
|
|
|
|
transport_data=resources("transport_data_s{simpl}_{clusters}.csv"),
|
|
|
|
avail_profile=resources("avail_profile_s{simpl}_{clusters}.csv"),
|
|
|
|
dsm_profile=resources("dsm_profile_s{simpl}_{clusters}.csv"),
|
2023-03-08 16:29:01 +00:00
|
|
|
threads: 1
|
|
|
|
resources:
|
|
|
|
mem_mb=2000,
|
2023-03-08 18:22:00 +00:00
|
|
|
log:
|
2023-08-23 15:14:57 +00:00
|
|
|
logs("build_transport_demand_s{simpl}_{clusters}.log"),
|
2023-03-08 18:26:41 +00:00
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
2023-03-08 16:29:01 +00:00
|
|
|
script:
|
2023-03-08 16:44:25 +00:00
|
|
|
"../scripts/build_transport_demand.py"
|
2023-03-08 16:29:01 +00:00
|
|
|
|
|
|
|
|
2024-01-15 17:55:09 +00:00
|
|
|
rule build_district_heat_share:
|
|
|
|
params:
|
2024-02-10 17:09:23 +00:00
|
|
|
sector=config_provider("sector"),
|
2024-01-15 17:55:09 +00:00
|
|
|
input:
|
2024-02-10 17:09:23 +00:00
|
|
|
district_heat_share=resources("district_heat_share.csv"),
|
|
|
|
clustered_pop_layout=resources("pop_layout_elec_s{simpl}_{clusters}.csv"),
|
2024-01-15 17:55:09 +00:00
|
|
|
output:
|
2024-02-10 17:09:46 +00:00
|
|
|
district_heat_share=resources(
|
|
|
|
"district_heat_share_elec_s{simpl}_{clusters}_{planning_horizons}.csv"
|
|
|
|
),
|
2024-01-15 17:55:09 +00:00
|
|
|
threads: 1
|
|
|
|
resources:
|
|
|
|
mem_mb=1000,
|
|
|
|
log:
|
2024-02-10 17:09:23 +00:00
|
|
|
logs("build_district_heat_share_s{simpl}_{clusters}_{planning_horizons}.log"),
|
2024-01-15 17:55:09 +00:00
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
|
|
|
script:
|
|
|
|
"../scripts/build_district_heat_share.py"
|
|
|
|
|
|
|
|
|
2024-01-31 12:45:45 +00:00
|
|
|
rule build_existing_heating_distribution:
|
|
|
|
params:
|
2024-02-10 17:09:23 +00:00
|
|
|
baseyear=config_provider("scenario", "planning_horizons", 0),
|
|
|
|
sector=config_provider("sector"),
|
|
|
|
existing_capacities=config_provider("existing_capacities"),
|
2024-01-31 12:45:45 +00:00
|
|
|
input:
|
|
|
|
existing_heating="data/existing_infrastructure/existing_heating_raw.csv",
|
2024-02-10 17:09:23 +00:00
|
|
|
clustered_pop_layout=resources("pop_layout_elec_s{simpl}_{clusters}.csv"),
|
2024-02-10 17:09:46 +00:00
|
|
|
clustered_pop_energy_layout=resources(
|
|
|
|
"pop_weighted_energy_totals_s{simpl}_{clusters}.csv"
|
|
|
|
),
|
|
|
|
district_heat_share=resources(
|
|
|
|
"district_heat_share_elec_s{simpl}_{clusters}_{planning_horizons}.csv"
|
|
|
|
),
|
2024-01-31 12:45:45 +00:00
|
|
|
output:
|
2024-02-10 17:09:46 +00:00
|
|
|
existing_heating_distribution=resources(
|
|
|
|
"existing_heating_distribution_elec_s{simpl}_{clusters}_{planning_horizons}.csv"
|
|
|
|
),
|
2024-01-31 12:45:45 +00:00
|
|
|
wildcard_constraints:
|
2024-02-10 17:09:23 +00:00
|
|
|
planning_horizons=config_provider("scenario", "planning_horizons", 0), #only applies to baseyear
|
2024-01-31 12:45:45 +00:00
|
|
|
threads: 1
|
|
|
|
resources:
|
|
|
|
mem_mb=2000,
|
|
|
|
log:
|
2024-02-10 17:09:46 +00:00
|
|
|
logs(
|
|
|
|
"build_existing_heating_distribution_elec_s{simpl}_{clusters}_{planning_horizons}.log"
|
|
|
|
),
|
2024-01-31 12:45:45 +00:00
|
|
|
benchmark:
|
2024-02-10 17:09:46 +00:00
|
|
|
benchmarks(
|
|
|
|
"build_existing_heating_distribution/elec_s{simpl}_{clusters}_{planning_horizons}"
|
|
|
|
)
|
2024-01-31 12:45:45 +00:00
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
|
|
|
script:
|
|
|
|
"../scripts/build_existing_heating_distribution.py"
|
|
|
|
|
|
|
|
|
2023-03-08 16:29:01 +00:00
|
|
|
rule prepare_sector_network:
|
|
|
|
params:
|
2023-08-15 13:02:41 +00:00
|
|
|
co2_budget=config_provider("co2_budget"),
|
|
|
|
conventional_carriers=config_provider(
|
|
|
|
"existing_capacities", "conventional_carriers"
|
|
|
|
),
|
|
|
|
foresight=config_provider("foresight"),
|
|
|
|
costs=config_provider("costs"),
|
|
|
|
sector=config_provider("sector"),
|
|
|
|
industry=config_provider("industry"),
|
|
|
|
pypsa_eur=config_provider("pypsa_eur"),
|
|
|
|
length_factor=config_provider("lines", "length_factor"),
|
|
|
|
planning_horizons=config_provider("scenario", "planning_horizons"),
|
|
|
|
countries=config_provider("countries"),
|
|
|
|
emissions_scope=config_provider("energy", "emissions"),
|
|
|
|
eurostat_report_year=config_provider("energy", "eurostat_report_year"),
|
2023-03-08 16:29:01 +00:00
|
|
|
RDIR=RDIR,
|
|
|
|
input:
|
2024-01-04 18:12:04 +00:00
|
|
|
**rules.cluster_gas_network.output,
|
|
|
|
**rules.build_gas_input_locations.output,
|
2024-02-12 15:56:00 +00:00
|
|
|
retro_cost=lambda w: (
|
|
|
|
resources("retro_cost_elec_s{simpl}_{clusters}.csv")
|
|
|
|
if config_provider("sector", "retrofitting", "retro_endogen")(w)
|
|
|
|
else []
|
|
|
|
),
|
|
|
|
floor_area=lambda w: (
|
|
|
|
resources("floor_area_elec_s{simpl}_{clusters}.csv")
|
|
|
|
if config_provider("sector", "retrofitting", "retro_endogen")(w)
|
|
|
|
else []
|
|
|
|
),
|
|
|
|
biomass_transport_costs=lambda w: (
|
|
|
|
resources("biomass_transport_costs.csv")
|
|
|
|
if config_provider("sector", "biomass_transport")(w)
|
|
|
|
or config_provider("sector", "biomass_spatial")(w)
|
|
|
|
else []
|
|
|
|
),
|
|
|
|
sequestration_potential=lambda w: (
|
|
|
|
resources("co2_sequestration_potential_elec_s{simpl}_{clusters}.csv")
|
|
|
|
if config_provider(
|
|
|
|
"sector", "regional_co2_sequestration_potential", "enable"
|
|
|
|
)(w)
|
|
|
|
else []
|
|
|
|
),
|
2023-08-23 15:14:57 +00:00
|
|
|
network=resources("networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc"),
|
|
|
|
energy_totals_name=resources("energy_totals.csv"),
|
2023-03-08 16:29:01 +00:00
|
|
|
eurostat=input_eurostat,
|
2024-02-10 16:22:36 +00:00
|
|
|
pop_weighted_energy_totals=resources(
|
|
|
|
"pop_weighted_energy_totals_s{simpl}_{clusters}.csv"
|
|
|
|
),
|
2023-08-23 15:14:57 +00:00
|
|
|
shipping_demand=resources("shipping_demand_s{simpl}_{clusters}.csv"),
|
|
|
|
transport_demand=resources("transport_demand_s{simpl}_{clusters}.csv"),
|
|
|
|
transport_data=resources("transport_data_s{simpl}_{clusters}.csv"),
|
|
|
|
avail_profile=resources("avail_profile_s{simpl}_{clusters}.csv"),
|
|
|
|
dsm_profile=resources("dsm_profile_s{simpl}_{clusters}.csv"),
|
|
|
|
co2_totals_name=resources("co2_totals.csv"),
|
2023-08-24 09:11:33 +00:00
|
|
|
co2="data/bundle-sector/eea/UNFCCC_v23.csv",
|
2024-02-12 15:56:00 +00:00
|
|
|
biomass_potentials=lambda w: (
|
2024-02-10 16:22:36 +00:00
|
|
|
resources(
|
|
|
|
"biomass_potentials_s{simpl}_{clusters}_"
|
2024-02-16 10:17:00 +00:00
|
|
|
+ "{}.csv".format(config_provider("biomass", "year")(w))
|
2024-02-10 16:22:36 +00:00
|
|
|
)
|
2024-02-12 15:56:00 +00:00
|
|
|
if config_provider("foresight")(w) == "overnight"
|
2024-02-10 16:22:36 +00:00
|
|
|
else resources(
|
|
|
|
"biomass_potentials_s{simpl}_{clusters}_{planning_horizons}.csv"
|
|
|
|
)
|
2024-02-05 18:23:48 +00:00
|
|
|
),
|
2024-02-12 15:54:33 +00:00
|
|
|
costs=lambda w: (
|
2024-02-16 10:17:00 +00:00
|
|
|
resources("costs_{}.csv".format(config_provider("costs", "year")(w)))
|
2024-02-12 15:54:33 +00:00
|
|
|
if config_provider("foresight")(w) == "overnight"
|
2024-02-16 10:17:00 +00:00
|
|
|
else resources("costs_{planning_horizons}.csv")
|
2024-02-05 18:23:48 +00:00
|
|
|
),
|
2023-08-23 15:14:57 +00:00
|
|
|
profile_offwind_ac=resources("profile_offwind-ac.nc"),
|
|
|
|
profile_offwind_dc=resources("profile_offwind-dc.nc"),
|
|
|
|
h2_cavern=resources("salt_cavern_potentials_s{simpl}_{clusters}.csv"),
|
|
|
|
busmap_s=resources("busmap_elec_s{simpl}.csv"),
|
|
|
|
busmap=resources("busmap_elec_s{simpl}_{clusters}.csv"),
|
|
|
|
clustered_pop_layout=resources("pop_layout_elec_s{simpl}_{clusters}.csv"),
|
|
|
|
simplified_pop_layout=resources("pop_layout_elec_s{simpl}.csv"),
|
2024-02-10 16:22:36 +00:00
|
|
|
industrial_demand=resources(
|
|
|
|
"industrial_energy_demand_elec_s{simpl}_{clusters}_{planning_horizons}.csv"
|
|
|
|
),
|
|
|
|
hourly_heat_demand_total=resources(
|
|
|
|
"hourly_heat_demand_total_elec_s{simpl}_{clusters}.nc"
|
|
|
|
),
|
|
|
|
district_heat_share=resources(
|
|
|
|
"district_heat_share_elec_s{simpl}_{clusters}_{planning_horizons}.csv"
|
|
|
|
),
|
2023-08-23 15:14:57 +00:00
|
|
|
temp_soil_total=resources("temp_soil_total_elec_s{simpl}_{clusters}.nc"),
|
|
|
|
temp_soil_rural=resources("temp_soil_rural_elec_s{simpl}_{clusters}.nc"),
|
|
|
|
temp_soil_urban=resources("temp_soil_urban_elec_s{simpl}_{clusters}.nc"),
|
|
|
|
temp_air_total=resources("temp_air_total_elec_s{simpl}_{clusters}.nc"),
|
|
|
|
temp_air_rural=resources("temp_air_rural_elec_s{simpl}_{clusters}.nc"),
|
|
|
|
temp_air_urban=resources("temp_air_urban_elec_s{simpl}_{clusters}.nc"),
|
|
|
|
cop_soil_total=resources("cop_soil_total_elec_s{simpl}_{clusters}.nc"),
|
|
|
|
cop_soil_rural=resources("cop_soil_rural_elec_s{simpl}_{clusters}.nc"),
|
|
|
|
cop_soil_urban=resources("cop_soil_urban_elec_s{simpl}_{clusters}.nc"),
|
|
|
|
cop_air_total=resources("cop_air_total_elec_s{simpl}_{clusters}.nc"),
|
|
|
|
cop_air_rural=resources("cop_air_rural_elec_s{simpl}_{clusters}.nc"),
|
|
|
|
cop_air_urban=resources("cop_air_urban_elec_s{simpl}_{clusters}.nc"),
|
2024-02-12 15:56:00 +00:00
|
|
|
solar_thermal_total=lambda w: (
|
2024-02-10 16:22:01 +00:00
|
|
|
resources("solar_thermal_total_elec_s{simpl}_{clusters}.nc")
|
2024-02-12 15:56:00 +00:00
|
|
|
if config_provider("sector", "solar_thermal")(w)
|
2024-02-05 18:23:48 +00:00
|
|
|
else []
|
|
|
|
),
|
2024-02-12 15:56:00 +00:00
|
|
|
solar_thermal_urban=lambda w: (
|
2024-02-10 16:22:01 +00:00
|
|
|
resources("solar_thermal_urban_elec_s{simpl}_{clusters}.nc")
|
2024-02-12 15:56:00 +00:00
|
|
|
if config_provider("sector", "solar_thermal")(w)
|
2024-02-05 18:23:48 +00:00
|
|
|
else []
|
|
|
|
),
|
2024-02-12 15:56:00 +00:00
|
|
|
solar_thermal_rural=lambda w: (
|
2024-02-10 16:22:01 +00:00
|
|
|
resources("solar_thermal_rural_elec_s{simpl}_{clusters}.nc")
|
2024-02-12 15:56:00 +00:00
|
|
|
if config_provider("sector", "solar_thermal")(w)
|
2024-02-05 18:23:48 +00:00
|
|
|
else []
|
|
|
|
),
|
2023-03-08 16:29:01 +00:00
|
|
|
output:
|
|
|
|
RESULTS
|
|
|
|
+ "prenetworks/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.nc",
|
|
|
|
threads: 1
|
|
|
|
resources:
|
2023-08-02 12:02:25 +00:00
|
|
|
mem_mb=2000,
|
2023-03-08 18:22:00 +00:00
|
|
|
log:
|
2024-02-10 17:09:46 +00:00
|
|
|
logs(
|
|
|
|
"prepare_sector_network_elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.log"
|
|
|
|
),
|
2023-03-08 16:29:01 +00:00
|
|
|
benchmark:
|
2024-02-10 17:09:46 +00:00
|
|
|
benchmarks(
|
|
|
|
"prepare_sector_network/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}"
|
|
|
|
)
|
2023-03-08 18:26:41 +00:00
|
|
|
conda:
|
|
|
|
"../envs/environment.yaml"
|
2023-03-08 16:29:01 +00:00
|
|
|
script:
|
2023-03-08 18:26:41 +00:00
|
|
|
"../scripts/prepare_sector_network.py"
|