Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split inflow in ppl units + same hydro profile in alt. clustering #1119

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

danielelerede-oet
Copy link

@danielelerede-oet danielelerede-oet commented Sep 27, 2024

Closes #759 .

Changes proposed in this Pull Request

build_renewable_profiles: the computation of hydro_profile.nc is not distinguished whether alternative clustering is applied or not.
add_electricity: the indexing of the different power plants is performed according to the bus either in case alternative clustering is applied or not and a hydro_inflow_factor is computed prior to the computation of inflow_t to split the inflow according to the capacity of each different unit of each power plant (beforehand, the same inflow value was assigned to all the units of a single power plant possibly causing an overestimation of the total generation).

Checklist

  • I consent to the release of this PR's code under the AGPLv3 license and non-code contributions under CC0-1.0 and CC-BY-4.0.
  • I tested my contribution locally and it seems to work fine.
  • Code and workflow changes are sufficiently documented.
  • Newly introduced dependencies are added to envs/environment.yaml and doc/requirements.txt.
  • Changes in configuration options are added in all of config.default.yaml and config.tutorial.yaml.
  • Add a test config or line additions to test/ (note tests are changing the config.tutorial.yaml)
  • Changes in configuration options are also documented in doc/configtables/*.csv and line references are adjusted in doc/configuration.rst and doc/tutorial.rst.
  • A note for the release notes doc/release_notes.rst is amended in the format of previous release notes, including reference to the requested PR.

@danielelerede-oet
Copy link
Author

Sorry @davide-f I had some issues locally and had to re-open the PR. I'm reporting your comments here:

Great contribution @danielelerede-oet !
The functionality is neat and it improves the status quo.
Personally, I'd be curious on the implementation by powerplant.

Few comments:

  • Have you checked that the indexing with and without alternative clustering is appropriate?
    The fact that the model works may not be sufficient as the index of the regions and powerplants are both numeric and they can be exchanged easily without noticing well
  • Have you also checked that by dropping the customized "regions" override the regions are still the same? FYI: I checked the build bus region and it seems consistent and to confirm a numerical check would be great. [if you open the geojson file with vscode you can easily check that; you can install the Geo Data Viewer extension to do so if you don't have it]
    I'd like a comment by @cpschau , @hazemakhalek or @energyLS as they have also worked on this.

My perspective is the following:

  • this PR improves the status quo by (a) fixing the inflow bug, (b) dropping if/else of alternative clustering and (c) reducing the number of lines of code.
  • the improved version would aim to estimate the inflow by powerplant as although this formulation fixes the inflow total, the numeric values are still affected quite a bit especially for large regions, however, the current implementation is worse.
    As the above comments are addressed, we could merge this PR

@danielelerede-oet
Copy link
Author

Hi @davide-f , I performed the additional checks you requested on both USA and Nigeria (which is not actually affected by the changes in add_electricity.py) and everything seems to work fine!

@davide-f
Copy link
Member

davide-f commented Oct 4, 2024

Hi @davide-f , I performed the additional checks you requested on both USA and Nigeria (which is not actually affected by the changes in add_electricity.py) and everything seems to work fine!

Great :D
Would you mind adding a release_note?

@danielelerede-oet
Copy link
Author

Hi @davide-f , I performed the additional checks you requested on both USA and Nigeria (which is not actually affected by the changes in add_electricity.py) and everything seems to work fine!

Great :D Would you mind adding a release_note?

Sure! Of course I also forgot to mention that Nigeria is not affected by the changes in add_electricity only because I was fetching powerplants.csv from powerplantmatching (which aggregates the different units of a plant into a single plant), while for the US I'm using a custom_powerplants.csv file.

@davide-f
Copy link
Member

davide-f commented Oct 4, 2024

@danielelerede-oet weren't you using the default configurations for the tests?

@danielelerede-oet
Copy link
Author

@danielelerede-oet weren't you using the default configurations for the tests?

Yes, I was, but I also performed an additional check on the US model!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Normalization issue when computing hydro resources
2 participants