pvlib-python icon indicating copy to clipboard operation
pvlib-python copied to clipboard

[WIP] Implement the Plataforma Solar de Almerı́a (PSA) solar position algorithm

Open kandersolar opened this issue 1 year ago • 5 comments

  • [x] Related to #1308
  • [x] I am familiar with the contributing guidelines
  • [ ] Tests added
  • [ ] Updates entries in docs/sphinx/source/reference for API changes.
  • [ ] Adds description and name entries in the appropriate "what's new" file in docs/sphinx/source/whatsnew for all changes. Includes link to the GitHub Issue with :issue:`num` or this Pull Request with :pull:`num`. Includes contributor name and/or GitHub username (link with :ghuser:`user`).
  • [ ] New code is fully documented. Includes numpydoc compliant docstrings, examples, and comments where necessary.
  • [ ] Pull request is nearly complete and ready for detailed review.
  • [ ] Maintainer: Appropriate GitHub Labels (including remote-data) and Milestone are assigned to the Pull Request and linked Issue.

The PSA algorithm seems to be as accurate as pvlib's ephemeris method but 3-4 times faster. Here is a brief comparison:

image

kandersolar avatar Aug 05 '24 22:08 kandersolar

Are you implementing the 2001 version or the 2020 version?

AdamRJensen avatar Aug 11 '24 12:08 AdamRJensen

The equations are the same between the two versions; only the coefficients differ. The current function lets the user choose which set of coefficients to use, with 2020 coefficients being the default.

kandersolar avatar Aug 11 '24 12:08 kandersolar

In the equations in the 2020 paper, it seems that the right ascension ra variable isn't used in any calculations - am I missing something?

AdamRJensen avatar Aug 11 '24 14:08 AdamRJensen

Given that the PSA and Michalsky algorithms are almost the same, maybe we should consider only adding Michalsky?

AdamRJensen avatar Oct 11 '24 17:10 AdamRJensen

almost the same

Could you elaborate on the similarities/differences?

I think the main usage of these algorithms will be to verify or replicate published output from other people or software, so even small differences could be relevant.

adriesse avatar Oct 11 '24 19:10 adriesse

Closing, will pursue solar position algorithm improvements in fresh PRs.

kandersolar avatar Jun 04 '25 17:06 kandersolar