You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pvlib.soiling.hsu model implementation errors #970
Describe the bug
I ran an example run using the Matlab version of the HSU soiling function and found that the python version did not give anywhere near the same results. The Matlab results matched the results in the original JPV paper. As a result of this test, I found two errors in the python implementation, which are listed below:
depo_veloc = {'2_5': 0.004, '10': 0.0009} has the wrong default values. They are reversed.
The proper dictionary should be: {'2_5': 0.0009, '10': 0.004}. This is confirmed in the JPV paper and the Matlab version of the function.
The horiz_mass_rate is in g/(m^2hr) but should be in g/(m^2s). The line needs to be multiplied by 60x60 or 3600.
The proper line of code should be:
horiz_mass_rate = (pm2_5 * depo_veloc['2_5']+ np.maximum(pm10 - pm2_5, 0.) * depo_veloc['10'])*3600
When I made these changes I was able to match the validation dataset from the JPV paper, as shown below.
-Josh
From: Mark Mikofski <notifications@github.com>
Reply-To: pvlib/pvlib-python <reply@reply.github.com>
Date: Tuesday, May 19, 2020 at 3:51 PM
To: pvlib/pvlib-python <pvlib-python@noreply.github.com>
Cc: Joshua Stein <jsstein@sandia.gov>, Author <author@noreply.github.com>
Subject: [EXTERNAL] Re: [pvlib/pvlib-python] pvlib.soiling.hsu model implementation errors (#970)
nice sleuthing Josh! Is a PR forthcoming? 🎉
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#970 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABJES5C2CRTZFF7ROT2EPOTRSL5ORANCNFSM4NFL4K3Q>.
Now I need to go back and figure out where I missed these errors in the review.
Nah, IMHO this right here is why I ❤️ open science. Everyone makes a mistake, even the best, and it may go unnoticed perhaps for a long time, but when used in earnest by many, important issues are caught & fixed more quickly. This right here is the proof!
Activity
mikofski commentedon May 19, 2020
nice sleuthing Josh! Is a PR forthcoming? 🎉
jsstein commentedon May 19, 2020
cwhanse commentedon May 19, 2020
Now I need to go back and figure out where I missed these errors in the review.
mikofski commentedon May 19, 2020
Nah, IMHO this right here is why I ❤️ open science. Everyone makes a mistake, even the best, and it may go unnoticed perhaps for a long time, but when used in earnest by many, important issues are caught & fixed more quickly. This right here is the proof!
bug fixes to hsu soiling function. Addresses (pvlib#970)
Made changes to the soiling tests Addresses (pvlib#970)
bug fixes to hsu soiling function. Addresses (pvlib#970)
Made changes to the soiling tests Addresses (pvlib#970)
Fixed errors in soiling.hsu function and tests (#977)
cwhanse commentedon Jun 12, 2020
Some improvements are needed in #977
Adds ability for soiling.Hsu to accept arbitrary time intervals (othe…