Skip to content

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

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant