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

move or replace boilerplate closure tests in irradiance decomposition functions #1685

Open
mikofski opened this issue Mar 6, 2023 · 0 comments

Comments

@mikofski
Copy link
Member

mikofski commented Mar 6, 2023

Is your feature request related to a problem? Please describe.
The following code is repeated in erbs, disc, and other irradiance decomposition functions.

bad_values = (solar_zenith > max_zenith) | (ghi < 0) | (dni < 0)
dni = np.where(bad_values, 0, dni)

Describe the solution you'd like
Consolidate these lines to a private function. Use complete_irradiance() where appropriate. Document and confirm that these checks indeed remove inconsistent or "bad values"

Describe alternatives you've considered
do nothing

Additional context
Related to #1179 (review)

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

No branches or pull requests

1 participant