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
Incorrect refraction elevation cutoff in ephemeris solar position algorithm #2323
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).
Activity
AdamRJensen commentedon Dec 4, 2024
ICYMI @IoannisSifnaios @kandersolar
cwhanse commentedon Dec 4, 2024
The reference publication is here: https://pvpmc.sandia.gov/app/uploads/sites/243/2022/10/Engineering-Astronomy.pdf
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
ephemerisfunction as long as there is an equally fast solar position algorithm in the library.kandersolar commentedon Dec 4, 2024
+1 to removing
ephemeriseventually, 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
ephemerisin all respects (speed, accuracy, period of validity, clear reference).