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

Raise helpful exceptions for irradiance.gti_dirint #2347

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

cwhanse
Copy link
Member

@cwhanse cwhanse commented Dec 31, 2024

gti_dirint could fail for a number of not-well-defined conditions. One known condition is reported in #1342, where all inputs have AOI >= 90.

I could not determine exactly how much data is "required" by gti_dirint. For instance, if there are insufficient daily data with 60 < AOI < 85 (see these lines), the function will proceed with kt_prime_gte_90= np.nan and will basically assume that the day is entirely clear at this line. I can't say that's a failure of the code, but I'm skeptical that gti_dirint will return anything meaningful. I don't know if we want to check, or what exception or warning to raise.

In any case, the check added in this PR closes the issue reported in #1342, and sets up gti_dirint to have additional checks added, should that be desired.

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.

gti_dirint raises 'UnboundLocalError: local variable 'best_ghi' referenced before assignment'
2 participants