Skip to content

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

@mikofski

Description

@mikofski

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions