Skip to content

Commit 0848432

Browse files
authored
Merge branch 'main' into eu-co2-pipes
2 parents f11cd9d + 627c153 commit 0848432

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

Snakefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,8 @@ rule build_existing_chp_de:
670670
),
671671
output:
672672
german_chp=resources("german_chp_base_s_{clusters}.csv"),
673+
resources:
674+
mem_mb=4000,
673675
log:
674676
logs("build_existing_chp_de_{clusters}.log"),
675677
script:

scripts/prepare_sector_network.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,13 @@ def create_network_topology(
412412
lk_attrs = n.links.columns.intersection(lk_attrs)
413413

414414
candidates = pd.concat(
415-
[n.lines[ln_attrs], n.links.loc[n.links.carrier.isin(carriers), lk_attrs]]
415+
[
416+
n.lines[ln_attrs],
417+
n.links.loc[
418+
(n.links.carrier.isin(carriers)) & (n.links.underwater_fraction > 0.1),
419+
lk_attrs,
420+
],
421+
]
416422
).fillna(0)
417423

418424
# base network topology purely on location not carrier
@@ -4255,7 +4261,7 @@ def add_biomass(
42554261
transport_costs = pd.read_csv(biomass_transport_costs_file, index_col=0)
42564262
transport_costs = transport_costs.squeeze()
42574263
biomass_transport = create_network_topology(
4258-
n, "biomass transport ", bidirectional=False
4264+
n, "biomass transport ", carriers=[""], bidirectional=False
42594265
)
42604266

42614267
# costs

scripts/pypsa-de/additional_functionality.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ def add_capacity_limits(n, investment_year, limits_capacity, sense="maximum"):
3737
valid_components & ~c.static[attr + "_nom_extendable"]
3838
]
3939
extendable_index = c.static.index[
40-
valid_components & c.static[attr + "_nom_extendable"] & c.static.active
40+
valid_components
41+
& c.static[attr + "_nom_extendable"]
42+
& c.static.active
4143
]
4244

4345
existing_capacity = c.static.loc[existing_index, attr + "_nom"].sum()

0 commit comments

Comments
 (0)