|
| 1 | +""" |
| 2 | +Kimber Soiling Model |
| 3 | +==================== |
| 4 | +
|
| 5 | +Examples of soiling using the Kimber model [1]_. |
| 6 | +
|
| 7 | +References |
| 8 | +---------- |
| 9 | +.. [1] "The Effect of Soiling on Large Grid-Connected Photovoltaic Systems |
| 10 | + in California and the Southwest Region of the United States," Adrianne |
| 11 | + Kimber, et al., IEEE 4th World Conference on Photovoltaic Energy |
| 12 | + Conference, 2006, :doi:`10.1109/WCPEC.2006.279690` |
| 13 | +""" |
| 14 | + |
| 15 | +# %% |
| 16 | +# This example shows basic usage of pvlib's Kimber Soiling model with |
| 17 | +# :py:meth:`pvlib.losses.soiling_kimber`. |
| 18 | +# |
| 19 | +# The Kimber Soiling model assumes that soiling builds up at a constant rate |
| 20 | +# until cleaned either manually or by rain. The rain must reach a threshold to |
| 21 | +# clean the panels. When rains exceeds the threshold, it's assumed the earth is |
| 22 | +# damp for a grace period before it begins to soil again. There is a maximum |
| 23 | +# soiling build up that cannot be exceeded even if there's no rain or |
| 24 | +# manual cleaning. |
| 25 | +# |
| 26 | +# Threshold |
| 27 | +# --------- |
| 28 | +# The example shown here demonstrates how the threshold affects soiling. |
| 29 | +# Because soiling depends on rainfall, loading weather data is always the first |
| 30 | +# step. |
| 31 | + |
| 32 | +from datetime import datetime |
| 33 | +from matplotlib import pyplot as plt |
| 34 | +from pvlib.iotools import read_tmy3 |
| 35 | +from pvlib.losses import soiling_kimber |
| 36 | +from pvlib.tests.conftest import DATA_DIR |
| 37 | + |
| 38 | +# get TMY3 data with rain |
| 39 | +greensboro = read_tmy3(DATA_DIR / '723170TYA.CSV', coerce_year=1990) |
| 40 | +# NOTE: can't use Sand Point, AK b/c Lprecipdepth is -9900, ie: missing |
| 41 | +greensboro_rain = greensboro[0].Lprecipdepth |
| 42 | +# calculate soiling with no wash dates |
| 43 | +THRESHOLD = 25.0 |
| 44 | +soiling_no_wash = soiling_kimber( |
| 45 | + greensboro_rain, cleaning_threshold=THRESHOLD, istmy=True) |
| 46 | +soiling_no_wash.name = 'soiling' |
| 47 | +# daily rain totals |
| 48 | +daily_rain = greensboro_rain.iloc[:-1].resample('D').sum() |
| 49 | +plt.plot( |
| 50 | + daily_rain.index.to_pydatetime(), daily_rain.values/25.4, |
| 51 | + soiling_no_wash.index.to_pydatetime(), soiling_no_wash.values*100.0) |
| 52 | +plt.hlines( |
| 53 | + THRESHOLD/25.4, xmin=datetime(1990, 1, 1), xmax=datetime(1990, 12, 31), |
| 54 | + linestyles='--') |
| 55 | +plt.grid() |
| 56 | +plt.title( |
| 57 | + f'Kimber Soiling Model, dashed line shows threshold ({THRESHOLD}[mm])') |
| 58 | +plt.xlabel('timestamp') |
| 59 | +plt.ylabel('soiling build-up fraction [%] and daily rainfall [inches]') |
| 60 | +plt.legend(['daily rainfall [in]', 'soiling [%]']) |
| 61 | +plt.tight_layout() |
| 62 | + |
| 63 | +plt.show() |
0 commit comments