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

Add tracking keyword support for cutout.irradiation #340

Merged
merged 5 commits into from
Jul 8, 2024

Conversation

Tasqu
Copy link
Contributor

@Tasqu Tasqu commented Feb 21, 2024

Change proposed in this Pull Request

Add tracking keywords to cutout.irradiation functions similar to cutout.pv.

Description

The underlying SurfaceOrientation and TiltedIrradiation functions already have support for solar tracking options. However, there was no way of accessing this functionality through the cutout.irradiation method.

Motivation and Context

Allows access to the irradiation quantities of surfaces with solar tracking. Admittedly, this is a pretty niche use case, but easy to implement and still useful for some applications.

How Has This Been Tested?

Not very thoroughly. I used the building_stock_weather_aggregation.ipynb example to briefly test that the tracking="vertical" keyword in cutout.irradiation impacts the output irradiation quantities as expected. Other than that, I'm relying on the underlying SurfaceOrientation and TiltedIrradiation functions.

I tried running pytest, but it seems the current master has some issues, and the tests seem to get stuck at test/test_preparation_and_conversion.py::TestERA5::test_data_module_arguments_era5. I'm guessing this might be related to the Copernicus CDS undergoing maintenance?

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I tested my contribution locally and it seems to work fine.
  • I locally ran pytest inside the repository and no unexpected problems came up.
  • I have adjusted the docstrings in the code appropriately.
  • I have documented the effects of my code changes in the documentation doc/. (No changes to the documentation needed as far as I can tell)
  • I have added newly introduced dependencies to environment.yaml file. (No new dependencies)
  • I have added a note to release notes doc/release_notes.rst.
  • I have used pre-commit run --all to lint/format/check my contribution

@euronion
Copy link
Collaborator

Thanks @Tasqu

@FabianHofmann do you have time to review?

Copy link
Member

@fneum fneum left a comment

Choose a reason for hiding this comment

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

This looks good to me.

atlite/convert.py Outdated Show resolved Hide resolved
@fneum fneum merged commit de82cfe into PyPSA:master Jul 8, 2024
1 of 2 checks passed
@Tasqu Tasqu deleted the irradiation_tracking branch July 11, 2024 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants