Skip to content

Commit 431e83c

Browse files
committed
fix: fix input_gas_network conditions when no carriers
1 parent ba3ce9b commit 431e83c

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

rules/build_sector.smk

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1658,10 +1658,12 @@ def input_gas_network(w):
16581658
if gas_network or h2_retrofit:
16591659
inputs["clustered_gas_network"] = resources("gas_network_base_s_{clusters}.csv")
16601660

1661-
gas_imports = "gas" in import_carriers
1662-
h2_imports_not_tyndp = "H2" in import_carriers and not h2_topology_tyndp
1661+
gas_imports = imports_enabled and "gas" in import_carriers
1662+
h2_imports_not_tyndp = (
1663+
imports_enabled and "H2" in import_carriers and not h2_topology_tyndp
1664+
)
16631665

1664-
if gas_network or (imports_enabled and (gas_imports or h2_imports_not_tyndp)):
1666+
if gas_network or gas_imports or h2_imports_not_tyndp:
16651667
inputs["gas_input_nodes_simplified"] = resources(
16661668
"gas_input_locations_s_{clusters}_simplified.csv"
16671669
)

0 commit comments

Comments
 (0)