PyPSA / PyPSA/pypsa-eur

Potential misconfiguration in estimating `max_hours` for hydropower plants

Open
#681 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
615
Forks
459
Avg merge
4d 14h
Merged PRs (30d)
6

Description

I am wondering if the configuration here should be swapped?

This is the current code for the two settings for how to estimate max_hours for hydropower plants:

if hydro_max_hours == "energy_capacity_totals_by_country":
    # watch out some p_nom values like IE's are totally underrepresented
    max_hours_country = (
        e_missing / hydro.loc[missing_mh_i].groupby("country").p_nom.sum()
      )

elif hydro_max_hours == "estimate_by_large_installations":
    max_hours_country = (
        hydro_stats["E_store[TWh]"] * 1e3 / hydro_stats["p_nom_discharge[GW]"]
    )

hydro_stats contains data from country totals. So it would make more sense to switch and/or provide some more documentation about this?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in scripts/add_electricity.py around line 523 and compare the two hydro_max_hours branches with the source and meaning of hydro_stats. Verify whether the settings are reversed, then update the configuration or its documentation as appropriate; it is done when each option clearly matches the data it uses and the behavior is unambiguous.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.