Skip to content

Incorrect refraction elevation cutoff in ephemeris solar position algorithm #2323

Closed

Description

@AdamRJensen

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:

Refract[(Elevation > -1) & (Elevation <= -0.575)] = -20.774 / TanEl

To be consistent with the publication I suggest that we remove the lower limit and apply refraction correction to all negative solar elevation angles.

image

Activity

  1. AdamRJensen commented on Dec 4, 2024

    @AdamRJensen
    MemberAuthor
  2. added this to the v0.11.2 milestone on Dec 4, 2024
  3. cwhanse commented on Dec 4, 2024

    @cwhanse
    Member

    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 ephemeris function as long as there is an equally fast solar position algorithm in the library.

  4. kandersolar commented on Dec 4, 2024

    @kandersolar
    Member

    +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).

  5. removed this from the v0.11.2 milestone on Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions