pypsa-meets-earth / pypsa-earth

PyPSA-Earth: A flexible Python-based open optimisation model to study energy system futures around the world.
https://pypsa-earth.readthedocs.io/en/latest/
225 stars 176 forks source link

Powerplant matching: DateOut filter does not work #940

Open AlexanderMeisinger opened 9 months ago

AlexanderMeisinger commented 9 months ago

Checklist

Describe the Bug

It seems that the ppm dateout filter is not working.

Please provide a description of what the bug is and add a minimal example/command for reproducing the bug.

NC-and-CSV-Difference-PPM-DateOut-2022 NC-and-CSV-Difference-PPM-DateOut-2017

davide-f commented 7 months ago

Hello @AlexanderMeisinger Many thanks for the comment and notification. As a follow-up, have you found a solution? Verifying this and proposing a PR would be highly interesting.

ekatef commented 7 months ago

I can confirm that powerplants.csv can actually contain data for the powerplants which are only planned but not built yet, e.g. with DateIn being 2025 or 2027. Moreover, it may be the case that the installed generation capacity at the current year differs significantly as compared with the year for which reference data are available.

My feeling is that it could probably make sense to add filtering by DateIn into build_powerplants and include DateIn as a configuration parameter. What do you think @AlexanderMeisinger @davide-f?

RogerKwak commented 4 months ago

This issue is also happening in the Korean version.

Power plants are not being retired according to the dateout period.

Have you found a solution?

ekatef commented 4 months ago

This issue is also happening in the Korean version.

Power plants are not being retired according to the dateout period.

Have you found a solution?

Hello @RogerKwak, thanks a lot for reporting.

As a quick technical comment: there has been a bug fix in poweplantmatching package (used to find the power plants to be fed into the model) which has improved filtering by status. That has given pronounced improvements, especially for coal plants. This fix has been included into v0.5.12 release of poweplantmatching. So, it's worth to check that you are using this latest version in your pypsa-earth environment.