There must be a simple answer for this, but how do they calculate sunset for any given zip code?
As an example, for my zip code sunset was 8:05 this evening, however I live in the Rocky Mountains so ‘perceived sunset’ will vary greatly based on whether you are at the bottom of a valley or at the top of a high mountain.
Does the sunset time on weather websites mean anything in the real world?
They’re based on the horizon, and don’t take into account if your view of said horizon is blocked by mountains or buildings (I suppose “perceived sunset” happens quite early on a Manhattan avenue!) or anything else.
If you want to calculate the actual annual sun coverage at your specific location, taking into account shading, you can use a Solar Pathfinder: http://www.solarpathfinder.com/
It’s basically a sun chart under a fish-eye dome, and you use it trace an outline of your surroundings to figure out whether that tree or that building will shade this spot after a certain time at a certain month.
I guess to be more clear, I should have said they are calculated to determine when the sun falls below the “true” horizon at a given earth location at a given date - see here.
Pretty much. The horizon is a certain distance in any direction from any given point on the Earth. The sun only sets exactly west twice a year because the Earth is tilted (which is what creates our seasons.) At any time other than the equinox the sun is setting some way north or south of local “west”
This may help to visualise it, particularly at the poles, though the animation is a bit floored in that it doesn’t show the daily rotation of the Earth.
In this context the horizon is how far you can see, assuming sea level, before the curve of the Earth bends the ground away from your line of sight (ignoring atmospheric refraction and the like). From the height of an average adult male, it’s about 3 miles in every direction:
Sunset, then, is when the Earth rotates out of direct view of the sun (when the sun “sets” below the visible horizon):
But the specific time of sunset changes both depending on where you are and which day of the year it is. The Earth’s axis of rotation is tilted relative to the sun (https://www.nc-climate.ncsu.edu/secc_edu/images/Latitude3.jpg) and this, combined with our orbit around the sun, determines the lengths of days (and also the seasons) at any given location and time.
If you go North enough, past the Arctic Circle the sun doesn’t set at all in the summer and doesn’t rise at all in the winter, and spring/fall have nearly as long/short days. There’s a similar Antarctic Circle in the south.