Typically, air temperatures near the earth’s surface are warmer and decrease higher above the surface. Sometimes, however, this flips when air temperatures higher up are actually warmer than air temperatures closer to the surface. This flip is known as a temperature inversion.
Off Southern California’s coastline, cold water flows southward from the Gulf of Alaska, making California coastal waters cooler than waters off the U.S. east coast (warmed by the Gulf Stream from the Gulf of Mexico). Because of the colder water, air temperatures above the water surface are also cooler. The cooler air then collides with the warmer air above and is held down (or “capped”) from rising and dissipating. The cooler and denser air becomes a “marine layer.” Because the marine layer contains moisture, clouds and fog form (although not always). When the downward pressure of the upper warmer air is high, the marine layer (and any associated clouds and fog) is held back from expanding inland for more than a mile or two from the coastline. When the downward pressure of the upper warmer air is lower, the marine layer (and any associated clouds and fog) is able to expand further inland, sometimes reaching into Southern California’s inland valleys and even spilling over mountain ranges (reaching as far as Palmdale). By midday, however, the marine layer’s moisture-produced clouds or fog often evaporate under the heat of the sun.
Southern California’s winters do not typically experience the gloom because upper air temperatures are usually not as warm and may be broken-up by storms. In the summer, water temperature tends to be warmer, therefore not creating the gloomy conditions of a cool marine layer. Nevertheless, it is not unknown for June Gloom to continue into “No-Sky-July” and even “Fogust.”
The conditions of Southern California's May Gray and June Gloom are found only in a few other locations on the globe. These are all on the west coasts of their respective continents. Similar May Gray and June Gloom conditions occur on the Peruvian west coast, the Canary Islands, the Moroccan west coast and Namibia in southern Africa.
Strong downward motion from upper level high pressure squashes the marine layer and keeps it confined to the the coast. Inland temperatures are high.
A weakening of the downward motion of upper atmospheric pressure allows the marine layer to move further inland and slightly lower inland temperatures.
Slight upward motion of upper atmospheric pressure allows the marine layer to move well inland, but, tall coastal mountains inhibit further penetration. Inland valley temperatures continue to decrease slightly due the overall upward motion of air.
Strong upward motion of upper atmospheric pressure upwards deepens the marine layer considerably, allowing cooled marine air to spill over coastal mountains into the inland valleys.
Source: Information and marine layer images from the National Weather Service