OSeMOSYS / osemosys_global

A global power system model generator for OSeMOSYS
https://osemosys-global.readthedocs.io/
GNU Affero General Public License v3.0
26 stars 15 forks source link

Users can add or remove nodes to the default spatial resolution #143

Closed abhishek0208 closed 1 year ago

abhishek0208 commented 1 year ago

Description

OSeMOSYS Global currently includes a fixed set of 255 nodes across 164 countries. This new feature allows a user to add custom nodes and remove existing nodes for a given country or region. As an example, OSeMOSYS Global currently represents Indonesia (IDN) as a single node. To split it into 7 regional nodes, a user can list the custom regional nodes (IDNJW, IDNSL, IDNSM etc.) under nodes_to_add and the existing single country node for Indonesia (IDNXX) under nodes_to_remove. NOTE: the custom nodes being added must start with the 3-letter code of the country that they are in (IDN in this case). Data specific to the custom node definition - ResidualCapacity, SpecifiedAnnualDemand, SpecifiedDemandProfile - can be added to the resources/data/custom_nodes folder

Issue Ticket Number

n/a

Documentation

Here and in the config/config.yaml file

trevorb1 commented 1 year ago

Hi @abhishek0208! I was just going through this and have a question about the data input format for custom nodes. I remember when you showed the demo the input data was formatted in a specific way, but can't remember if it was otoole formatting or not?

Are you able to attach, make a new commit, or email me, the custom node data for Indonesia so I can test this and add info on how to format custom node data to readthedocs? Thanks!

abhishek0208 commented 1 year ago

Thanks for looking into this @trevorb1. I've made a new commit with examples of residual_capacity.csv, specified_annual_demand.csv, and specified_demand_profile.csv for custom nodes.

trevorb1 commented 1 year ago

Thanks, @abhishek0208! The updates worked good on my side. I tried both with the and without the custom nodes, and everything ran fine and solved.

The only changes I made were to add documentation how to add custom nodes. This exists as a new page on the readthedocs called "Model Modifications" where these more advanced running instructions can live. If you could take a look and see if it looks okay to you, that would be great! To view the changes locally, just run make html from the docs folder then python3 -m http.server --directory 'docs/_build/html' from the root directory.

If it looks okay, feel free to merge everything! Thanks!

abhishek0208 commented 1 year ago

Great, thanks @trevorb1! And good idea to set up a "Model Modifications" section in the docs. Thanks for the instructions to view it locally.