Merge branch 'Climact-feature/fix-gas-retrofit'

This commit is contained in:
Fabian Neumann 2024-05-13 18:05:41 +02:00
commit d559ed78dd
2 changed files with 38 additions and 36 deletions

View File

@ -256,6 +256,8 @@ Upcoming Release
* The ``{sector_opts}`` wildcard is now not used by default. All scenario definitions are now done in the ``config.yaml`` file.
* Fix gas network retrofitting in `add_brownfield`.
PyPSA-Eur 0.10.0 (19th February 2024)
=====================================

View File

@ -107,7 +107,7 @@ def add_brownfield(n, n_p, year):
# already retrofitted capacity from gas -> H2
already_retrofitted = (
n.links.loc[h2_retrofitted_fixed_i, "p_nom"]
.rename(lambda x: x.split("-2")[0].replace(fr, to))
.rename(lambda x: x.split("-2")[0].replace(fr, to) + f"-{year}")
.groupby(level=0)
.sum()
)