Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/sphinx/source/whatsnew/v0.15.3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ Deprecations

Bug fixes
~~~~~~~~~
* Fixed :py:func:`pvlib.soiling.kimber` so that rainfall equal to
``cleaning_threshold`` triggers cleaning, and fixed an off-by-one
error in the grace period window. (:issue:`2796`)


Enhancements
Expand Down Expand Up @@ -50,3 +53,4 @@ Contributors
* Eesh Saxena (:ghuser:`eeshsaxena`)
* Karl Hill (:ghuser:`karlhillx`)
* Yonry Zhu (:ghuser:`yonryzhu`)
* Darshan Gowda (:ghuser:`dgowdaan-cmyk`)
4 changes: 2 additions & 2 deletions pvlib/soiling.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,10 @@ def kimber(rainfall, cleaning_threshold=6, soiling_loss_rate=0.0015,
soiling = pd.Series(soiling, index=rainfall.index, name='soiling')

# rainfall events that clean the panels
rain_events = accumulated_rainfall > cleaning_threshold
rain_events = accumulated_rainfall >= cleaning_threshold

# grace periods windows during which ground is assumed damp, so no soiling
grace_windows = rain_events.rolling(grace_period, closed='right').sum() > 0
grace_windows = rain_events.rolling(grace_period, closed='both').sum() > 0

# clean panels by subtracting soiling for indices in grace period windows
cleaning = pd.Series(float('NaN'), index=rainfall.index)
Expand Down
Loading
Loading