 The formula also neglects the effect of atmospheric refraction.Sunset and sunrise occur (approximately) when the zenith angle is 90°, where the hour angle "h"0 satisfies

Precise times of sunset and sunrise occur when the upper limb of the Sun appears, as refracted by the atmosphere, to be on the horizon.A weighted daily average zenith angle, used in computing the local albedo of the Earth, is given by
where "Q" is the instantaneous irradiance.