PyPSA / pypsa-ariadne

High resolution, sector-coupled model of the German Energy System
https://ariadneprojekt.de/en/model-documentation-pypsa/
MIT License
6 stars 4 forks source link

missing keyword argument for H2 Kernnet #38

Closed lindnemi closed 3 months ago

lindnemi commented 3 months ago

I ran the hydrogen scenario in its very prelimary definition, but got an error:

TypeError: lossy_bidirectional_links() got an unexpected keyword argument 'subset'

And that's exactly what happens. The keyword subset is used here https://github.com/PyPSA/pypsa-ariadne/blob/4bdc0bab5b5c970c55c6ae5edb5f7d3984b193a3/workflow/scripts/modify_prenetwork.py#L191 but not defined here https://github.com/PyPSA/pypsa-eur/blob/0a0a35e4a4d8f891be81a05648145a9d14c86dae/scripts/prepare_sector_network.py#L3513

lindnemi commented 3 months ago

ok, probably this did not happen before, because i changed the logic of build_year assignment in this test run :thinking:

lindnemi commented 3 months ago

it occurs in 2040 and i am seeing it in the master (with this PR added, but i haven't checked without: https://github.com/PyPSA/pypsa-eur/pull/967)

JulianGeis commented 3 months ago

which submodules branch are you using at the moment? In the current ariadne2 branch the function has the subset argument: https://github.com/PyPSA/pypsa-eur/blob/ariadne2/scripts/prepare_sector_network.py

''' def lossy_bidirectional_links(n, carrier, efficiencies={}, subset=None): "Split bidirectional links into two unidirectional links to include transmission losses."

if subset is None:
    subset = n.links.index
carrier_i = n.links.query("carrier == @carrier").index.intersection(subset)

'''