(KRON) — For many Californians, fog is a common occurrence. But why does fog make such a big impact in certain parts of the state and rarely occur in others?

Fog forms when warmer air containing water vapor is cooled past the “dew point temperature,” explained Dr. Michael Anderson, the state climatologist with the Department of Water Resources. The dew point temperature is the temperature that the air needs to be cooled to in order to hold the maximum amount of water, or hit a humidity of 100%.

“In a stable atmospheric environment, this leads to low stratus clouds, which are called fog when it forms near the surface of the Earth,” Anderson told KRON4.

California has some geographical advantages that create great opportunities for fog, Anderson said. Mountainous areas often help cool air pool down in valleys, which can be the cooling needed to create fog. This is why we often see foggy valleys.

Why don’t you see much fog in deserts? There’s simply not enough moisture in the air. This lack of water vapor is a part of why deserts also see such huge temperature swings, according to Anderson.

Point Reyes, a peninsula north of San Francisco, is known as one of the foggiest cities in the nation, and it has a couple of advantages when it comes to fog generation. The first is that the city is on the West Coast.

“A feature of west coasts of continents (or east sides of ocean basins) is cool water moving from pole towards equator, which creates cooler temperatures and (with the ocean being a great source of moisture) leads to fog preferentially forming on west coasts of continents. This is known as the marine layer,” Anderson said.

Point Reyes is also a peninsula that extends out into the Pacific Ocean. Its peaks and valleys are great at trapping the cold air, helping to create the perfect environment for fog.

The Golden Gate Bridge peeks through the fog on in San Francisco, California. (Photo by Justin Sullivan/Getty Images)

Fog is also a signature part of the San Francisco skyline. The city’s fog is so notorious it has a name: Karl the Fog. San Francisco benefits from many of the same geographical advantages as Point Reyes when it comes to fog, including being on the West Coast and containing plenty of valleys to trap the cool air.