atlite icon indicating copy to clipboard operation
atlite copied to clipboard

Add `tracking` keyword support for `cutout.irradiation`

Open Tasqu opened this issue 1 year ago • 1 comments

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)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • [x] I tested my contribution locally and it seems to work fine.
  • [x] I locally ran pytest inside the repository and no unexpected problems came up.
  • [x] I have adjusted the docstrings in the code appropriately.
  • [x] 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)
  • [x] I have added newly introduced dependencies to environment.yaml file. (No new dependencies)
  • [x] I have added a note to release notes doc/release_notes.rst.
  • [x] I have used pre-commit run --all to lint/format/check my contribution

Tasqu avatar Feb 21 '24 06:02 Tasqu

Thanks @Tasqu

@FabianHofmann do you have time to review?

euronion avatar Mar 11 '24 22:03 euronion