[AstroPy] Is the solar position calculation

Adrian Price-Whelan adrianmpw at gmail.com
Sun Dec 22 09:24:43 EST 2019


Hi Bruce --

This functionality and most of these parameters are available within
Astropy, but they are spread between a few different classes. The relevant
pieces are:
http://docs.astropy.org/en/latest/api/astropy.coordinates.get_sun.html#astropy.coordinates.get_sun
http://docs.astropy.org/en/latest/api/astropy.coordinates.EarthLocation.html#astropy.coordinates.EarthLocation
http://docs.astropy.org/en/latest/api/astropy.coordinates.builtin_frames.AltAz.html#astropy.coordinates.builtin_frames.AltAz

Here is a small demo (as a Jupyter notebook) comparing the azimuth and
altitude values computed on a grid of times in Astropy to the NREL form
output:
https://gist.github.com/9e58e1ba422c1df9b8d1fe28d790071b

There are some small differences in altitude (possibly because of the
approximate refraction estimate we are using from SOFA/ERFA), but otherwise
they agree quite well.

Let me know if you need any help tracking down various parameters and
figuring out where to pass them in to Astropy!

best,
Adrian

On Sat, Dec 21, 2019 at 2:13 PM Bruce Simonson <bruce.simonson at gmail.com>
wrote:

> Greetings,
>
> I'm new to astropy, and the mailing list.  I'm not sure (yet) how to
> search previous posts, or if there's an appropriate forum to use to post
> questions.
>
> I'm wondering if a particular solar position calculator has been
> implemented in astropy.  Here is the reference:
>
> Reda, I.; Andreas, A. (2003). Solar Position Algorithm for Solar Radiation
> Applications. 55 pp.; NREL Report No. TP-560-34302, Revised January 2008.
> <http://www.nrel.gov/docs/fy08osti/34302.pdf>
>
> Here is an implementation, from NREL, online:
>
> https://midcdmz.nrel.gov/solpos/spa.html
>
> I would like to compute solar positions, based on (most of) the parameters
> available in this solar position calculator -- ideally from a python
> module, especially astropy, if the calculator has been implemented.
>
> Sorry for the post, if this has been discussed elsewhere.
>
> Thanks,
> -Bruce
> _______________________________________________
> AstroPy mailing list
> AstroPy at python.org
> https://mail.python.org/mailman/listinfo/astropy
>


-- 
Adrian M. Price-Whelan
Flatiron Institute, NYC
http://adrn.github.io
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20191222/c87eac13/attachment-0001.html>


More information about the AstroPy mailing list