A green flash is a meteorological optical phenomena that sometimes occurs transiently around the moment of sunset or sunrise. The brief flash of green light is seen more often at sunset than at sunrise. When the conditions are right, a distinct green spot is briefly visible above the upper rim of the Sun's disk; the green appearance usually lasts for no more than two seconds. Rarely, the green flash can resemble a green ray shooting up from the sunset or sunrise point.
Green flashes occur because the Earth's atmosphere can cause the light from the Sun to separate out into different colors.
Refraction of sunset seen from San Francisco in 2008 (source: wiki commons). this image also shows a Green Flash
Green flashes may be observed from any altitude. They usually are seen at an unobstructed horizon, such as over the ocean, but are possible over cloud tops and mountain tops as well. They may occur at any latitude, although at the equator the flash rarely lasts longer than a second.
A green flash also may be observed in association with the Moon and bright planets at the horizon, including Venus and Jupiter. With an unrestricted view of the horizon, green flashes are regularly seen by pilots, particularly when flying westwards as the sunset is slowed. If the atmosphere is layered, the green flash may appear as a series of flashes.
The various colors of light bend different amounts based on their wavelengths; shorter wavelengths (blue, violet and green) refract more strongly than longer wavelengths (yellow, orange and red). As such, blue and violet light are scattered by the atmosphere while red, orange and yellow are absorbed, leaving the green light the most visible during the few seconds when the sun sets below or rises above the horizon.
Green flashes are enhanced by mirages, which increase refraction. A green flash is more likely to be seen in stable, clear air, when more of the light from the setting sun reaches the observer without being scattered. Sometimes, when the air is especially clear, enough of the blue or violet light rays make it through the atmosphere and create a blue flash instead of a green one.
There are four categories of green flashes: inferior mirage, mock mirage, subduct flash and green ray. Nearly all green-flash sightings fall into the first two categories.
Inferior mirage flashes are oval and flat and occur close to sea level when the surface of the water is warmer than the air above it.
Inferior-mirage Green Flash. Image taken by Brocken Inaglory, Santa Cruz, California, January 2006. Source: wiki commons.
Mock mirage flashes, on the other hand, occur higher up in the sky and when conditions on the surface are colder than the air above. The flashes appear to be thin, pointy strips being sliced from the sun, and they last about 1 to 2 seconds. These are the types of green flash most commonly seen by pilots.
Subduct flashes are created when the sun appears to form an hourglass shape due to a phenomenon called atmospheric inversion, which occurs when a layer of warm air traps cool air and moisture close to the ground. In this rare circumstance, the upper section of the sun may appear green for up to 15 seconds.
The rarest type of green flash is known as a green ray. In this instance, a beam of green light shoots straight up a few degrees from the green flash immediately after the sun sets for about a second. It's caused by the combination of hazy air and an unusually bright inferior, mock or subduct green flash.