prepare_sectors: make biomass transport costs conditional again
This commit is contained in:
parent
b2ab4bbe56
commit
f205ff9536
@ -295,6 +295,8 @@ rule build_biomass_potentials:
|
||||
"../scripts/build_biomass_potentials.py"
|
||||
|
||||
|
||||
if config["sector"]["biomass_transport"] or config["sector"]["biomass_spatial"]:
|
||||
|
||||
rule build_biomass_transport_costs:
|
||||
input:
|
||||
transport_cost_data=HTTP.remote(
|
||||
@ -315,6 +317,13 @@ rule build_biomass_transport_costs:
|
||||
script:
|
||||
"../scripts/build_biomass_transport_costs.py"
|
||||
|
||||
build_biomass_transport_costs_output = rules.build_biomass_transport_costs.output
|
||||
|
||||
|
||||
if not (config["sector"]["biomass_transport"] or config["sector"]["biomass_spatial"]):
|
||||
# this is effecively an `else` statement which is however not liked by snakefmt
|
||||
build_biomass_transport_costs_output = {}
|
||||
|
||||
|
||||
if config["sector"]["regional_co2_sequestration_potential"]["enable"]:
|
||||
|
||||
@ -711,7 +720,7 @@ rule prepare_sector_network:
|
||||
RDIR=RDIR,
|
||||
input:
|
||||
**build_retro_cost_output,
|
||||
**rules.build_biomass_transport_costs.output,
|
||||
**build_biomass_transport_costs_output,
|
||||
**gas_infrastructure,
|
||||
**build_sequestration_potentials_output,
|
||||
network=RESOURCES + "networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc",
|
||||
@ -772,7 +781,7 @@ rule prepare_sector_network:
|
||||
+ "prenetworks/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.nc",
|
||||
threads: 1
|
||||
resources:
|
||||
mem_mb=20000,
|
||||
mem_mb=2000,
|
||||
log:
|
||||
LOGS
|
||||
+ "prepare_sector_network_elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.log",
|
||||
|
Loading…
Reference in New Issue
Block a user