[AstroPy] Effect of observer elevation on sunset time

Eric Jensen ejensen1 at swarthmore.edu
Sat May 9 18:31:32 EDT 2020


Hi all, 

Thanks for everyone’s comments.  To be clear, I’m not talking about refraction effects, but rather about the position of the “true horizon” due to the curvature of the Earth.  It’s the same effect as when you look up in the sky after sunset and see a cloud or an airplane directly overhead (so at the same geodetic latitude and longitude that you are) that is still lit by the sun.  Something higher up can see to a more distant horizon than something at sea level.  

I had noticed the github issue that Wilfred mentioned (thanks!), but I hadn’t read it carefully enough - now I see that it does indeed discuss this, though the person raising the issue ultimately gets around it by calculating the correction for the true horizon himself, and applying that correction by using the true horizon’s elevation (-2 degrees relative to the uncorrected horizon) to find the true time of sunset. 

So it’s clear that that correction isn’t applied.  So I guess my question now is, why not?  It seems more practical to me, at least for the sun, since it’s the elevation relative to the true horizon that determines how dark it is. 

I could see this being added as an option to sun_set_time (and I can look into making a PR if others think it’s useful), but I’d still be interested in hearing any thoughts about why it isn’t the default behavior.  Is the altitude in the alt-az coordinate system formally defined as being that for an observer at zero elevation?  

Thanks again, 

Eric


> On May 9, 2020, at 2:45 PM, Wilfred Tyler Gee <wtylergee at gmail.com> wrote:
> 
> Hi all,
> 
> This was discussed some back in https://github.com/astropy/astroplan/issues/242 <https://github.com/astropy/astroplan/issues/242>
> 
> Eric, you might want to look at changing your pressure in addition to your elevation.
> 
> On Sat, May 9, 2020 at 8:41 AM Sergio Pascual <sergio.pasra at gmail.com <mailto:sergio.pasra at gmail.com>> wrote:
> Hello,
> 
> I don't have my copy of Green's Spherical Astronomy with me, but I remember there is as section about the effect of height on topocentric coordinates, and hence, in sun set  and rise times. The affect is about a few minutes, depending on height and latitude.
> 
> Regards
> 
> El sáb., 9 may. 2020 a las 20:25, Stuart P Littlefair (<s.littlefair at sheffield.ac.uk <mailto:s.littlefair at sheffield.ac.uk>>) escribió:
> I should probably think about this more before I embarrass myself but - isn’t this right? 
> 
> The sun is 93 million miles away so a tangential movement of a few thousand metres is going to make a negligible angular distance, no?
> 
> Is the apparent difference in sunset times at high altitudes more of a refraction effect?
> 
> Stuart Littlefair
> Dept. of Physics & Astronomy
> Univ. of Sheffield, Sheffield, S3 7RH
> 
> email: s.littlefair at shef.ac.uk <mailto:s.littlefair at shef.ac.uk>
> Phone: +44 114 2224525
> Sent from my iPhone
> 
>> On 9 May 2020, at 19:13, Adrian Price-Whelan <adrianmpw at gmail.com <mailto:adrianmpw at gmail.com>> wrote:
>> 
>> 
>> Hi Eric,
>> 
>> I'm not sure yet what the root of the problem is, but it doesn't seem to be an astroplan issue - see the bottom of this notebook, which computes the difference in Sun altitude for the two elevations with astropy's AltAz frame (used internally by astroplan):
>> https://gist.github.com/628c6ffed4f652d2278e970981f67854 <https://gist.github.com/628c6ffed4f652d2278e970981f67854>
>> 
>> Erik T. might have more thoughts?
>> 
>> best,
>> Adrian
>> 
>> On Sat, May 9, 2020 at 11:31 AM Eric Jensen <ejensen1 at swarthmore.edu <mailto:ejensen1 at swarthmore.edu>> wrote:
>> Hi all, 
>> 
>> I was just working with astroplan to calculate some sunset times (actually nautical twilight in the example below), and I noticed that specifying the observatory elevation doesn’t seem to make any difference in the results, contrary to my expectations. 
>> 
>> Example code: 
>> 
>> from astropy.coordinates import EarthLocation
>> import astroplan
>> from astropy.time import Time
>> import astropy.units as u
>> 
>> location = EarthLocation.from_geodetic(-16.5097*u.deg, 
>>                                        28.3*u.deg, 
>>                                        2390*u.m)
>> # Same location, but zero elevation
>> location_sealevel = EarthLocation.from_geodetic(-16.5097*u.deg, 
>>                                                 28.3*u.deg, 
>>                                                 0*u.m)
>> teide = astroplan.Observer(location=location, 
>>                            name="Teide", 
>>                            timezone="Atlantic/Canary")
>> teide_sealevel = astroplan.Observer(location=location_sealevel, 
>>                                     name="Teide sea level", 
>>                                     timezone="Atlantic/Canary")
>> 
>> now = Time.now()
>> n = 1000
>> sun_set = teide.sun_set_time(now, which="next", 
>>                              horizon=-12*u.deg,
>>                              n_grid_points=n)
>> sun_set_sealevel = teide_sealevel.sun_set_time(now, which="next", 
>>                                                horizon=-12*u.deg,
>>                                                n_grid_points=n)
>> print("Sunset at altitude:  {0.iso}, JD: {0.jd}".format(sun_set))
>> print("Sunset at sea level: {0.iso}, JD: {0.jd}".format(sun_set_sealevel))
>> print("Difference: {}".format((sun_set - sun_set_sealevel).to(u.s)))
>> 
>> This yields the output:
>> 
>> Sunset at altitude:  2020-05-09 20:41:33.933, JD: 2458979.3621982955
>> Sunset at sea level: 2020-05-09 20:41:33.933, JD: 2458979.3621982983
>> Difference: -0.00024139881134033203 s
>> 
>> i.e. basically no difference.   There are three reasons I could think of: 
>> 
>> 1.  The effect of observer elevation simply isn’t implemented in astroplan. 
>> 2.  There’s something wrong with my code. 
>> 3.  There’s something wrong with my thinking that there should be a few minutes difference (later sunset / earlier sunrise) at a few thousand meters elevation vs. at sea level. 
>> 
>> My guess is #1, but I’m curious to hear if others have different thoughts.  I’m using astropy 4.0.1 and astroplan 0.6. 
>> 
>> Thanks, 
>> 
>> Eric
>> 
>> _______________________________________________
>> AstroPy mailing list
>> AstroPy at python.org <mailto:AstroPy at python.org>
>> https://mail.python.org/mailman/listinfo/astropy <https://mail.python.org/mailman/listinfo/astropy>
>> 
>> 
>> -- 
>> Adrian M. Price-Whelan
>> Flatiron Institute, NYC
>> http://adrn.github.io <http://adrn.github.io/>
>> (he / him)
>> _______________________________________________
>> AstroPy mailing list
>> AstroPy at python.org <mailto:AstroPy at python.org>
>> https://mail.python.org/mailman/listinfo/astropy <https://mail.python.org/mailman/listinfo/astropy>
> _______________________________________________
> AstroPy mailing list
> AstroPy at python.org <mailto:AstroPy at python.org>
> https://mail.python.org/mailman/listinfo/astropy <https://mail.python.org/mailman/listinfo/astropy>
> _______________________________________________
> AstroPy mailing list
> AstroPy at python.org <mailto:AstroPy at python.org>
> https://mail.python.org/mailman/listinfo/astropy <https://mail.python.org/mailman/listinfo/astropy>
> 
> 
> -- 
> ~Wilfred Tyler Gee
> _______________________________________________
> AstroPy mailing list
> AstroPy at python.org
> https://mail.python.org/mailman/listinfo/astropy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20200509/99fa41aa/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3946 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/astropy/attachments/20200509/99fa41aa/attachment-0001.bin>


More information about the AstroPy mailing list