From 85aeaf4857a2877c01bc38a3055d715d292e94f8 Mon Sep 17 00:00:00 2001 From: daniel-rdt Date: Mon, 27 Jul 2026 15:55:37 +0200 Subject: [PATCH 1/2] fix: remove deprecated dim parameter from linopy `LinearExpression.groupby(...).sum()` for compatibility with linopy > v0.9.0 --- scripts/solve_network.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/solve_network.py b/scripts/solve_network.py index 94025f74f9..8aded0cb56 100644 --- a/scripts/solve_network.py +++ b/scripts/solve_network.py @@ -1393,7 +1393,7 @@ def constrain_dsr_daily_dispatch(n: pypsa.Network, snapshots: pd.DatetimeIndex) ) # calculate weighted daily energy - daily_energy = (p * weightings).groupby(day).sum(dim="snapshot") + daily_energy = (p * weightings).groupby(day).sum() # calculate daily energy limit using p_nom and pemmdb_hours rhs = xr.DataArray( From 88ebe877163c75602c7ca74936dc17288a519e8d Mon Sep 17 00:00:00 2001 From: daniel-rdt Date: Mon, 27 Jul 2026 16:10:43 +0200 Subject: [PATCH 2/2] doc: add release note --- doc/release_notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/release_notes.md b/doc/release_notes.md index bce8a454b3..b62176fd7f 100644 --- a/doc/release_notes.md +++ b/doc/release_notes.md @@ -43,6 +43,7 @@ * Restore correct assigned countries for virtual TYNDP nodes ([#794](https://github.com/open-energy-transition/open-tyndp/pull/794)). +* Remove `dim` argument from `.groupby(...).sum()` call in DSR daily dispatch constraint as it is no longer accepted by linopy >= 0.9.0 and no longer needed since groupby-sum always reduces the grouped dimension ([#811](https://github.com/open-energy-transition/open-tyndp/pull/811)). **Documentation**