PyPSA / PyPSA/powerplantmatching
Duplicating generation assets
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 227
- Forks
- 74
- Avg merge
- 6d 17h
- Merged PRs (30d)
- 4
Description
Version Checks (indicate both or one)
-
I have confirmed this bug exists on the lastest release of powerplantmatching.
-
I have confirmed this bug exists on the current
masterbranch of powerplantmatching.
Issue Description
When using powerplantmatching for some non-European countries in PyPSA-Earth, we have observed some duplication, as mentioned in this old issue. For example, such duplicating appears when running build_powerplants rule of PyPSA-Earth 0.8.0 for Colombia. After some investigation, the reason is the way GEM datasets are being treated if taken in combination with other databases.
Reproducible Example
## basic code
import powerplantmatching as pm
import yaml
config = {
'matching_sources':
[
'GEO', 'GPD',
'GBPT', 'GGPT', 'GCPT', 'GGTPT', 'GNPT', 'GSPT', 'GWPT', 'GHPT'
],
'fully_included_sources':
[
'GEO', 'GPD',
'GBPT', 'GGPT', 'GCPT', 'GGTPT', 'GNPT', 'GSPT', 'GWPT', 'GHPT'
],
'target_countries': 'Colombia',
'main_query': '(DateOut >= 2022 or DateOut != DateOut)'
}
ppl = (
pm.powerplants(
from_url=False,
update=True,
config_update=config,
)
.query('Fueltype not in ["Solar", "Wind"]')
)
ppl.to_csv("test_ppm_co_minimal.csv")
Expected Behavior
A modelling-ready dataset of power plants for Colombia. Instead, a dataset is produced with multiple duplicates which require manual cleaning-up ("test_ppm_co_minimal.csv"). E.g. Termosierra power plant present in two versions: as Termosierra Ccgt Colombia (426 MWe) and Termosierra (460 MWe).
This duplication can be removed if GEM-sources datasets ('GEO', 'GPD') are excluded or if only they are kept (the output files are test_ppm_co_minimal_without_gem.csv and test_ppm_co_minimal_gem_only.csv, respectively).
Installed Versions
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided powerplantmatching example for Colombia and compare the three output cases: all sources, no GEM sources, and GEM-only sources. Trace how GEO and GPD are combined with the other matching sources during pm.powerplants, especially for the build_powerplants workflow. Done means the resulting modelling-ready dataset no longer contains duplicate plants such as the two Termosierra records.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-engineering
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100