pypsa-earth
pypsa-earth copied to clipboard
Powerplant matching: DateOut filter does not work
Checklist
- [x] I am using the current
main
branch or the latest release. Please indicate. - [x] I am running on an up-to-date
pypsa-earth
environment. Update viaconda env update -f envs/environment.yaml
.
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.
- I was running Pypsa-Earth for Morocco - config.yaml: powerplants_filter: (DateOut >= 2022 or DateOut != DateOut)
- Analysed base capacity for hard coal, natural gas and oil power plants in the generated nc file (/results/networks/....nc)
- Compared powerplant capacity of nc file and csv file, considering DateOut >= 2022 (powerplants.csv)
- Differences noted, please see attached plot "NC and CSV capacity difference for ppm dateout 2022: Morocco"
- Another run - config.caml: powerplants_filter: (DateOut >= 2017 or DateOut != DateOut)
- Differences noted, please see attached plot "NC and CSV capacity difference for ppm dateout 2017: Morocco" => It seems that the ppm dateout filter is not working.
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.
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?
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?
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.