Sydneyside Southerly Sunset

12 AM January 1, 2007

Julian has an astronomical puzzle. He claimed:

If you are located further South than the Tropic of Capricorn, then the Sun will never be directly overhead, and furthermore will only appear in the Northern half of the sky.

I predicted that – this far South – the Sun would always set somewhat North of due West.

Makes sense to me. But then Julian’s father observed, in direct contraction to Julian’s well-constructed argument, that the Sun was setting to the south of west. Interesting.

I searched a bit and found PyEphem, a Python library for calculating the position of heavenly bodies. It is based on a C library and required a bit of huffing and puffing to get it to compile on Windows. I hacked the code just the teeniest bit to get rid compile errors, then ignored several pagefuls of warnings. But it seems to work.

This little script calculates where the Sun sets in late December, 2006, asssuming “this far South” means Sydney airport, or thereabouts:

import ephem 

# Late December
when =, 12, 30))

# Driving near Sydney Airport
julian = ephem.Observer() = when, julian.long = '-33.932109', '151.1652'

# Compute the sun for that day
sun = ephem.Sun()

# Find where sun set, relative to West
deg = ephem.degrees
answer = deg(deg(sun.set_az) - deg('270'))
print "The sun will set %s degress north of west" % answer

And the answer is:

The sun will set -28:43:55.43 degress north of west

In other words, this script supports Julian’s father’s observation that the sun sets significantly to the south of west this time of year in Sydney. (Assuming, of course, that PyEphem is accurate, that my mangled compile of PyEphem didn’t affect anything serious, and that the above script is bug free.)

For a more concrete confirmation, I’d suggest using a ball as the Earth – rather than a fist – and then put on a lamp at the other end of of the room to represent the Sun. Tilt the ball back on its axis so that the noon day sun falls on the southern end of the ball. Now, look for sunrise and sunset down the side of the ball, and check the direction of the lamp, relative to east and west on the ball.

By alang | # | Comments (1)
(Posted to Python, javablogs and Tall Tales)


At 02:48, 01 Jan 2007 Julian wrote:

Thanks, Alan. I always appreciate a solid, well-constructed effort to take the news of my mistakes to an even wider audience :-)

I have proposed a visual description of this still-weird scenario in the comments of the original post.

My only comment on your code is to note with bemusement that isn't actually a Julian Date! (see


Add Comment

(Not displayed)

(Leave blank line between paragraphs. URLs converted to links. HTML stripped. Indented source code will be formatted with <pre> tags.)

© 2003-2006 Alan Green