Skip to content

Add diffuse components support: get_sky_diffuse, poa_components, and get_total_irradiance#2800

Open
cbcrespo wants to merge 8 commits into
pvlib:mainfrom
cbcrespo:diffuse-components-support
Open

Add diffuse components support: get_sky_diffuse, poa_components, and get_total_irradiance#2800
cbcrespo wants to merge 8 commits into
pvlib:mainfrom
cbcrespo:diffuse-components-support

Conversation

@cbcrespo

@cbcrespo cbcrespo commented Jul 1, 2026

Copy link
Copy Markdown
Contributor
  • Closes #xxxx
  • I am familiar with the contributing guidelines
  • I attest that all AI-generated material has been vetted for accuracy and is in compliance with the pvlib license
  • Tests added
  • Updates entries in docs/sphinx/source/reference for API changes.
  • Adds description and name entries in the appropriate "what's new" file in docs/sphinx/source/whatsnew for all changes. Includes link to the GitHub Issue with :issue:`num` or this Pull Request with :pull:`num`. Includes contributor name and/or GitHub username (link with :ghuser:`user`).
  • New code is fully documented. Includes numpydoc compliant docstrings, examples, and comments where necessary.
  • Pull request is nearly complete and ready for detailed review.
  • Maintainer: Appropriate GitHub Labels (including remote-data) and Milestone are assigned to the Pull Request and linked Issue.

This PR is part of my GSoC 2026 project (#2750). One of the goals is to add support for return_components to all diffuse transposition models in pvlib, which currently is supported by some models (e.g. perez) but not others. This parameter allows the user to choose whether they want only the total diffuse irradiance, or are interested in the split between different diffuse components (sky diffuse, circumsolar, horizon brightening).

I have previously been working on adding component support to the existing transposition models. The present PR extends support for return_components from the model functions themselves to the wrapper functions within pvlib.irradiance: get_sky_diffuse, poa_components, and get_total_irradiance.

Previous related PRs and issues:

As of this moment, none of the previous PRs have been merged. However, due to GSoC, this is on a timeline and must keep moving forward. This PR assumes that changes in reindl and isotropic will eventually be merged. It also assumes that klucher will not support return_components; nor will king, which is set for deprecation anyway (#2783). For these two, trying to use return_components on the wrapper functions will throw an error.

This branch is based on the branch in #2787 for isotropic. This was done in order to ensure that everything works fine with a function that supports return_components but not all three components (in this case, only one).

Due to the previous PRs not having been merged, this one is currently failing tests - specifically due to reindl not yet actually supporting return_components.

If necessary, I will make changes here after the previous PRs are merged, but I believe it may be useful to kickstart the discussion now.

Merging the isotropic and reindl changes would allow this PR to be fully validated.

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.

1 participant