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

fix build_powerplants FuelType #754

Merged
merged 5 commits into from
Jun 6, 2023

Conversation

Tomkourou
Copy link
Contributor

@Tomkourou Tomkourou commented Jun 6, 2023

Closes # (if applicable).

Changes proposed in this Pull Request

Removes the Gas transformations in build_powerplants as they don't seem necessary any longer. Tested on Egypt and tutorial countries and works well.

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.

@Tomkourou
Copy link
Contributor Author

Also tested #753. Works with individual countries but not with the tutorial config. Leaving the changes out until #744 is merged.

scripts/build_powerplants.py Show resolved Hide resolved
scripts/build_powerplants.py Show resolved Hide resolved
@pz-max
Copy link
Member

pz-max commented Jun 6, 2023

Thanks Tom, I think we should not remove the not working part but fix the original logic... see above comments

Copy link
Contributor Author

@Tomkourou Tomkourou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have made the changes necessary to the functions so that when Natural Gas is the fuel it will apply OCGT or CCGT instead of steam turbine or combustion engine and when OCGT or CCGT is the tech it will turn the fuel into Natural Gas.

@Tomkourou Tomkourou requested a review from pz-max June 6, 2023 16:09
@pz-max
Copy link
Member

pz-max commented Jun 6, 2023

Also tested #753. Works with individual countries but not with the tutorial config. Leaving the changes out until #744 is merged.

#744 is already merged. Can you clarify?
Let's tackle issue 753 in an separate PR

Copy link
Member

@pz-max pz-max left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edited.
It looks good. Please consider the mask vs where replacement. This whole != and working principle of .where is a bit confusing. Not sure how you felt.

Can you share a screenshot of how the data looks now with the fixes?

scripts/build_powerplants.py Show resolved Hide resolved
@Tomkourou
Copy link
Contributor Author

Tomkourou commented Jun 6, 2023

It looks good. Please consider the mask vs where replacement. This whole != and working principle of .where is a bit confusing. Not sure how you felt.

Can you share a screenshot of how it looks now with the fixes?

Before

image

After

image

@pz-max
Copy link
Member

pz-max commented Jun 6, 2023

@Tomkourou thanks. Will be merged after it runs through

@pz-max pz-max merged commit 4f772c1 into pypsa-meets-earth:main Jun 6, 2023
@Tomkourou Tomkourou deleted the use-gem-for-wind-solar branch June 7, 2023 08:10
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.

2 participants