build_sector.smk: simplify gas infrastructure rules
This commit is contained in:
parent
a67c5ea3b7
commit
62bcded800
@ -67,9 +67,7 @@ rule build_simplified_population_layouts:
|
|||||||
"../scripts/build_clustered_population_layouts.py"
|
"../scripts/build_clustered_population_layouts.py"
|
||||||
|
|
||||||
|
|
||||||
if config["sector"]["gas_network"] or config["sector"]["H2_retrofit"]:
|
rule build_gas_network:
|
||||||
|
|
||||||
rule build_gas_network:
|
|
||||||
input:
|
input:
|
||||||
gas_network="data/gas_network/scigrid-gas/data/IGGIELGN_PipeSegments.geojson",
|
gas_network="data/gas_network/scigrid-gas/data/IGGIELGN_PipeSegments.geojson",
|
||||||
output:
|
output:
|
||||||
@ -83,7 +81,8 @@ if config["sector"]["gas_network"] or config["sector"]["H2_retrofit"]:
|
|||||||
script:
|
script:
|
||||||
"../scripts/build_gas_network.py"
|
"../scripts/build_gas_network.py"
|
||||||
|
|
||||||
rule build_gas_input_locations:
|
|
||||||
|
rule build_gas_input_locations:
|
||||||
input:
|
input:
|
||||||
gem=HTTP.remote(
|
gem=HTTP.remote(
|
||||||
"https://globalenergymonitor.org/wp-content/uploads/2023/07/Europe-Gas-Tracker-2023-03-v3.xlsx",
|
"https://globalenergymonitor.org/wp-content/uploads/2023/07/Europe-Gas-Tracker-2023-03-v3.xlsx",
|
||||||
@ -109,7 +108,8 @@ if config["sector"]["gas_network"] or config["sector"]["H2_retrofit"]:
|
|||||||
script:
|
script:
|
||||||
"../scripts/build_gas_input_locations.py"
|
"../scripts/build_gas_input_locations.py"
|
||||||
|
|
||||||
rule cluster_gas_network:
|
|
||||||
|
rule cluster_gas_network:
|
||||||
input:
|
input:
|
||||||
cleaned_gas_network=RESOURCES + "gas_network.csv",
|
cleaned_gas_network=RESOURCES + "gas_network.csv",
|
||||||
regions_onshore=RESOURCES
|
regions_onshore=RESOURCES
|
||||||
@ -127,17 +127,6 @@ if config["sector"]["gas_network"] or config["sector"]["H2_retrofit"]:
|
|||||||
script:
|
script:
|
||||||
"../scripts/cluster_gas_network.py"
|
"../scripts/cluster_gas_network.py"
|
||||||
|
|
||||||
gas_infrastructure = {
|
|
||||||
**rules.cluster_gas_network.output,
|
|
||||||
**rules.build_gas_input_locations.output,
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if not (config["sector"]["gas_network"] or config["sector"]["H2_retrofit"]):
|
|
||||||
# this is effecively an `else` statement which is however not liked by snakefmt
|
|
||||||
|
|
||||||
gas_infrastructure = {}
|
|
||||||
|
|
||||||
|
|
||||||
rule build_heat_demands:
|
rule build_heat_demands:
|
||||||
params:
|
params:
|
||||||
@ -722,7 +711,8 @@ rule prepare_sector_network:
|
|||||||
input:
|
input:
|
||||||
**build_retro_cost_output,
|
**build_retro_cost_output,
|
||||||
**build_biomass_transport_costs_output,
|
**build_biomass_transport_costs_output,
|
||||||
**gas_infrastructure,
|
**rules.cluster_gas_network.output,
|
||||||
|
**rules.build_gas_input_locations.output,
|
||||||
**build_sequestration_potentials_output,
|
**build_sequestration_potentials_output,
|
||||||
network=RESOURCES + "networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc",
|
network=RESOURCES + "networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc",
|
||||||
energy_totals_name=RESOURCES + "energy_totals.csv",
|
energy_totals_name=RESOURCES + "energy_totals.csv",
|
||||||
|
Loading…
Reference in New Issue
Block a user