Skip to content

Optional output bounding for wvm() clear-sky index output #2660

Closed

Description

@aman-coder03

Is your feature request related to a problem? Please describe.
The wvm() function in pvlib.scaling can produce negative or unrealistically large clear-sky index values as a result of wavelet reconstruction. While this behavior is mathematically expected, such values are physically non-meaningful and can cause issues when the output is used directly in irradiance or PV power modeling workflows. Currently, users must manually post-process the output to enforce physical bounds.

Describe the solution you'd like
Add an optional output bounding (clipping) capability to wvm(), allowing users to constrain the smoothed clear-sky index to physically meaningful limits. For example, optional parameters such as clip, clip_min, and clip_max could be provided, with default behavior remaining unchanged to preserve backward compatibility.

Describe alternatives you've considered
Manually clipping the output of wvm() in user code before passing it to downstream models. While this works, it leads to duplicated logic across projects and inconsistent handling of physical bounds.

Additional context
Wavelet-based reconstruction methods are known to overshoot, and bounding is commonly applied as a post-processing step in PV modeling workflows. Providing this option directly in wvm() would improve usability while maintaining mathematical correctness and backward compatibility.

Activity

  1. Chirag3841 commented on Jan 24, 2026

    @Chirag3841
    Contributor

    @EricDuminil I would like to solve this issue if anyone had not taken it yet.

  2. AdamRJensen commented on Jan 24, 2026

    @AdamRJensen
    Member

    Closing this issue due to doubt about the author having prior knowledge of solar energy. While we strongly encourage new contributors, making meaningful contributions to pvlib requires some knowledge of solar energy.

    If this is incorrect, please tag me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions