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
One way to remove the artifacts while introducing less bias is to clip the airmass_absolute values to the point where the exponential correction becomes problematic. Something like:
airmass_critical is a minimum for the combined exponential terms, which shoot up afterwards. Loosely: airmass_critical = argmin(f(x)), for f = exp(-cg2*x*(fh1 + fh2*(tl - 1)) + 0.01*x^1.8))
This threshold starts at AM = 2.6 (for turbidity = 1 and altitude = 0), equivalent to ~22.5° solar elevation, and goes up to O(10) for higher turbidities and altitudes. For most cases, it corresponds to solar elevation angles below the 4° cutting threshold of the CIE 1994 quality control guidelines that Ineichen & Perez seem to have used, i.e. they probably didn't see beyond it.
Clipping at the minimum makes the adjustment smooth (C1), and leaves the results of the model untouched for most operating conditions.
@mikofski, there is no reference for this fix, and I also had no plans of publishing it. I take comfort in the fact that the proposed correction falls between the two (already published) versions of the model, but @adriesse is right to point out that actually none of the models is validated for very low solar elevations.
See #435 and #459 for context.
One way to remove the artifacts while introducing less bias is to clip the
airmass_absolute
values to the point where the exponential correction becomes problematic. Something like:airmass_critical = (cg2*(fh1+fh2*(tl-1))/0.018).^1.25
airmass_clipped = np.fmin(airmass_absolute, airmass_critical)
ghi = (np.exp(-cg2*airmass_clipped*(fh1 + fh2*(tl - 1)) + 0.01*airmass_clipped**1.8))
...
ghi = cg1 * dni_extra * cos_zenith * tl / tl * np.fmax(ghi, 0)
airmass_critical
is a minimum for the combined exponential terms, which shoot up afterwards. Loosely:airmass_critical = argmin(f(x)), for f = exp(-cg2*x*(fh1 + fh2*(tl - 1)) + 0.01*x^1.8))
This threshold starts at AM = 2.6 (for turbidity = 1 and altitude = 0), equivalent to ~22.5° solar elevation, and goes up to O(10) for higher turbidities and altitudes. For most cases, it corresponds to solar elevation angles below the 4° cutting threshold of the CIE 1994 quality control guidelines that Ineichen & Perez seem to have used, i.e. they probably didn't see beyond it.
Clipping at the minimum makes the adjustment smooth (C1), and leaves the results of the model untouched for most operating conditions.
Originally posted by @martinherrerias in #435 (comment)
The text was updated successfully, but these errors were encountered: