Add diffuse components support: get_sky_diffuse, poa_components, and get_total_irradiance#2800
Open
cbcrespo wants to merge 8 commits into
Open
Add diffuse components support: get_sky_diffuse, poa_components, and get_total_irradiance#2800cbcrespo wants to merge 8 commits into
get_sky_diffuse, poa_components, and get_total_irradiance#2800cbcrespo wants to merge 8 commits into
Conversation
…tropic_components
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #xxxxUpdates entries indocs/sphinx/source/referencefor API changes.docs/sphinx/source/whatsnewfor 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`).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_componentsto all diffuse transposition models inpvlib, 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_componentsfrom the model functions themselves to the wrapper functions withinpvlib.irradiance:get_sky_diffuse,poa_components, andget_total_irradiance.Previous related PRs and issues:
return_componentssupport toirradiance.reindlreturn_componentssupport toirradiance.isotropicirradiance.haydavies#2788 - Removes empty horizon component fromirradiance.haydaviesirradiance.klucherAs 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
reindlandisotropicwill eventually be merged. It also assumes thatklucherwill not supportreturn_components; nor willking, which is set for deprecation anyway (#2783). For these two, trying to usereturn_componentson 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 supportsreturn_componentsbut 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
reindlnot yet actually supportingreturn_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
isotropicandreindlchanges would allow this PR to be fully validated.