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
The refraction correction used in the ephemeris solar position algorithm has a cutoff at -1 degree, which is not mentioned in the original publication or the provided Fortran code:
It doesn't mention correction below -0.575 degrees, that I can find.
My guess is that the -1 degree limit was added to the Matlab code because we didn't think refraction correction was meaningful when the sun's disc was below the horizon.
I have no objection to removing the limit, or adding a comment pointing back to the Matlab code. I also have no objection to removing the ephemeris function as long as there is an equally fast solar position algorithm in the library.
+1 to removing ephemeris eventually, and leaving it as-is in the meantime. But good to document the issue regardless.
A bit of context: @AdamRJensen, @IoannisSifnaios, and I have a project underway comparing solar position algorithms. We plan to contribute implementations of one or more algorithms to pvlib-python, depending on the results of the comparison. We expect some of them to be better than ephemeris in all respects (speed, accuracy, period of validity, clear reference).
The refraction correction used in the ephemeris solar position algorithm has a cutoff at -1 degree, which is not mentioned in the original publication or the provided Fortran code:
pvlib-python/pvlib/solarposition.py
Line 839 in 6d886dc
To be consistent with the publication I suggest that we remove the lower limit and apply refraction correction to all negative solar elevation angles.
The text was updated successfully, but these errors were encountered: