Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use powerplantmatching IRENASTAT for renewable capacities in add_existing_baseyear #1018

Merged
merged 7 commits into from
Apr 30, 2024

Conversation

koen-vg
Copy link
Contributor

@koen-vg koen-vg commented Apr 11, 2024

Changes proposed in this Pull Request

I wanted to update existing renewable capacities to 2023 values recently made available by IRENA. But there seems to be some duplicated effort on this front within the PyPSA umbrella: powerplantmatching has information of renewable capacities from IRENA, and the same data is downloaded through a separate path in retrieve_irena.py.

As nice of an improvement #756 is, I would propose cutting out retrieve_irena.py altogether and using the IRENA data retrieved by powerplantmatching directly. This is implemented in the current PR, achieving the same functionality as before with much less code all in all.

To avoid a regression in terms of data for recent years, this PR should only be merged once PyPSA/powerplantmatching#157 is merged, and then should be combined with a version bump of the powerplantmatching dependency.

In the future, data on existing renewable capacities can be updated simply by updating powerplantmatching and bumping the version in pypsa-eur. This will then transparently filter through to both places where existing renewable capacities are added to network in pypsa-eur, namely in add_electricity.py and in add_existing_baseyear.py. Having these two scripts depend on different sources for the same data seems like a source of confusion and potential problems.

Checklist

  • I tested my contribution locally and it seems to work fine.
  • Code and workflow changes are sufficiently documented.
  • Changed dependencies are added to envs/environment.yaml.
  • Changes in configuration options are added in all of config.default.yaml.
  • Changes in configuration options are also documented in doc/configtables/*.csv.
  • A release note doc/release_notes.rst is added.

@fneum
Copy link
Member

fneum commented Apr 12, 2024

I agree, @koen-vg. The link in retrieve_irena.py also seems to be broken, so this is actually quite timely.

@fneum
Copy link
Member

fneum commented Apr 25, 2024

PyPSA/powerplantmatching#157 is merged and included in v0.5.13 of powerplantmatching

Copy link
Member

@fneum fneum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, only requires powerplantmatching version bump in environment.yaml

Needed in order to get renewable capacities from pm.IRENA newer than
2020; updated to 2023 in version 0.5.13
@koen-vg
Copy link
Contributor Author

koen-vg commented Apr 25, 2024

Great, easy enough to bump the version :)

@koen-vg
Copy link
Contributor Author

koen-vg commented Apr 25, 2024

Guess it wasn't that easy, haha, powerplantmatching 0.5.13 will need a little bit of time until it's installable.

@koen-vg
Copy link
Contributor Author

koen-vg commented Apr 26, 2024

It does now seem to work.

@fneum fneum merged commit 03fd9bf into PyPSA:master Apr 30, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants