How to create a model for you region of interest with PyPSA-Earth #505
pz-max
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Context
Recently people ask us how to extend the PyPSA-Earth model to other parts of the world. While the model runs smoothly for Africa extending it to other regions requires some bug fixes/improvments [1] and validation. In [2] we list a few countries and issues that you need to be aware of. Anyways, we can fix and make stuff run around the world in the PyPSA-Earth framework. But how can you get ready to test your country in PyPSA-Earth?
Tutorials to extend the model in your region
First, I can recommend starting with these two tutorial exercises and also reading all the references material (1-8h):
Second, I can recommend going through the hackathon material (link) that we created a while ago (4-8h). The image below lists the file which were part of the hackathon. Don't get irritated by PyPSA-Africa. We only changed the name to PyPSA-Earth and slightly updated the model structure. Most of the content should be still applicable.
Part of the hackathon material is also the notebook 5_how_to_incorporate_new_regions. For the best experience, however, I can recommend finishing the notebooks 1-4 beforehand.
Notebooks that help you with the validation
In our PyPSA-Earth paper created a ton of validation images and tables. Some of it we automatised it to work flexibly in other regions. You can find the validation notebooks here. Currently, these notebooks should work in case you optimize ["Africa"] and or ["Nigeria"]. We intend to share all our compiled validation notebooks in this structure:
Let us know what worked for you well or what caused problems. You are welcome to contribute fixes, maybe even with your first pull request?
Notes:
[1]: This is mainly because we need to improve the robustness of data imports. For instance, to increase the robustness we can just accept a certain standard data format. If inputs fail to conform to this standard they are removed. We can raise a logger to show the number of removed items & also can optionally save the removed files separately for post-run analysis. This can be helpful for reading e.g. OpenStreetMap inputs.
[2]: The countries for which the PyPSA-Earth works are currently: Any country in Africa, Chile, Thailand, Bangladesh, Columbia, Kasachstan, China, India, Vietnam, Malaysia, Indonesia (status not sure). We observed some performance bottlenecks in China and India that lead to long preparation times of 1-2 days because there is a lot of data, not every code is optimized/parallized & some geo task are complex O(n^2)
Beta Was this translation helpful? Give feedback.
All reactions