PyPSA / powerplantmatching

Set of tools to combine multiple power plant databases
https://powerplantmatching.readthedocs.io/en/latest/
GNU General Public License v3.0
157 stars 54 forks source link

Matching error when using GEM datasets outside EU. #117

Closed Tomkourou closed 1 year ago

Tomkourou commented 1 year ago

Running

import powerplantmatching as pm 

pm.powerplants(from_url=False,update=True,config=config)

Where the config takes the GEM, GEO and GPD as matching and fully included sources for countries in South East Asia ( I tested Vietnam and Indonesia) returns a ValueError due to no matches found for the datasources.

Running it as below will still return a dataframe with powerplants.

pm.powerplants(from_url=False,update=True,config=config).csv("Path")

Is there a reason to use the ValueError? Is there a critical problem I am missing? If not I would suggest we downgrade it to a warning. You can see the responsible line below:

https://github.com/PyPSA/powerplantmatching/blob/97e3172b4aeabf09b42c68118c5e55a0242ffa8e/powerplantmatching/matching.py#LL153C69-L153C69

@FabianHofmann for pypsa-earth to use the GEM dataset we will also need a new version of powerplantmatching on Conda. Perhaps we can do this after resolving this issue. If you are happy with my offered solution then I will open a PR to address it.

Tagging @davide-f as we worked on this together.

davide-f commented 1 year ago

@Tomkourou thanks for the issue :) Would you mind adding the simple PR to fix that issue we discussed? I think discussing on the PR would be much easier. Personally, I think that fix is something we want to have and release a new release right after to include all the features that have been included