Elevation often decides whether you spend a summer morning inside the fog or above it looking down. In the Bay Area, the difference between 500 and 1,500 feet can be the difference between a gray, 55-degree morning and a warm, sunny one. That link between height and fog is one of the most distinctive parts of Bay Area life. It even shapes the appeal of some hillside neighborhoods, which can sit in sunshine while the flatlands below stay buried in fog.
The Marine Layer and Its Ceiling
The marine layer is a shallow layer of cool, moist air that flows in from the Pacific and settles over the Bay Area in summer. Its depth changes from day to day, and its top is capped by a temperature inversion. There, warm, dry air sinking from the North Pacific High sits on the cool air and keeps the fog from rising. The height of that cap is the key number for understanding fog and elevation.
When the cap sits at about 800 feet, most of San Francisco, Oakland and the Peninsula flatlands are under fog. The Berkeley hills above about 900 feet are in sunshine. When the cap rises to 1,500 feet or more, the fog is deeper and covers more of the hills. It often breaks up sooner over warm inland ground, though. When the layer is very shallow, only 400 or 500 feet deep, the fog hugs the coast and the bay while most hillside neighborhoods stay clear. A forecast of “fog below 1,000 feet” is effectively a map of who will wake up to sun and who will wake up to gray. Slopes that face the onshore wind get extra fog, because the wind pushes marine air up the hill and cools it further, a process called upslope fog.

Which Elevations Escape Bay Area Fog
In San Francisco, the top of the fog on summer mornings is often near the height of the city's tallest hills. Twin Peaks (922 feet) and Mount Davidson (928 feet) are frequently wrapped in fog, but on mornings with a shallow marine layer their summits poke out above it. Neighborhoods on the east side of those hills, such as the Castro and Noe Valley, are sheltered from the main flow. Their fog tends to be thinner and clears sooner. Some residents in the higher parts of Forest Hill and nearby neighborhoods notice sun at the top of the street while fog sits lower down. On those mornings, standing above the fog with the sun low behind you is the best way to see a fogbow.

In the East Bay, the Berkeley hills rise from the flats to Grizzly Peak at 1,754 feet. On mornings with a shallow or average marine layer, the upper hills above about 1,200 feet are often above the fog. On deep marine layer days, the fog can cover the whole ridge. Orinda, Moraga and Lafayette, on the far side of the hills, are partly shielded from coastal fog and see it much less often. In Marin, the upper slopes of Mount Tamalpais above 2,000 feet are usually above the fog, even when the valleys below are buried on strong marine push days.
Elevation, Temperature, and the Inversion
Normally, air gets cooler with height, by an average of about 3.5°F for every 1,000 feet. That is broadly true inside the marine layer itself. At the inversion, though, the pattern flips, and the air above the cap is warmer than the fog below it. That is why a thermometer on a summit above the marine layer can read warmer than one on the foggy valley floor.
On a typical July morning, a hiker in the Berkeley hills at 1,500 feet can be standing in 70-degree sunshine. Down the hill in downtown Berkeley, near sea level, it can be 58°F and foggy. Temperature rises with height in that situation, the reverse of the usual pattern. Once the sun burns off the fog later in the day, the ground warms and the normal pattern, cooler with height, starts to return.
Deep Dive: Why Does the Top of the Fog Rise and Fall From Day to Day?
The height of the fog top follows the weather thousands of feet overhead. A strong ridge of high pressure aloft squeezes the marine layer down, and an approaching trough lets it deepen. Forecasters watch those patterns, and direct measurements of the inversion, to predict who will wake up above the fog.
How Does High Pressure Aloft Squeeze the Fog?
Under a strong ridge, air sinks faster from high altitude and warms as it is compressed. That pushes the inversion down and makes it stronger, with a sharper jump in temperature from the fog to the clear air above. A 2003 study by John Lewis, Darko Koračin and colleagues found that strong, persistent sinking both lowered the marine layer off California and strengthened the inversion above it.
A shallow, strong inversion is the pattern behind the classic view from the hills. The fog may be only 500 to 1,000 feet deep, so Twin Peaks, the Berkeley hills and Mount Tamalpais all rise above it. The same pattern often brings heat inland, because the sinking air that compresses the marine layer also warms the valleys.
When an upper-level trough approaches, the sinking weakens and the inversion rises and softens. The marine layer can deepen to 2,000 or 3,000 feet. Fog then covers the hills and pushes farther inland, and even the ridgetops sit inside it.
How Do Forecasters Measure the Inversion?
The main measurement comes from weather balloons. The National Weather Service launches one from Oakland twice a day, and its instruments record temperature and humidity as it climbs. The point where temperature starts rising with height marks the base of the inversion, which is close to the top of the fog.
Scientists at the Scripps Institution of Oceanography used decades of Oakland balloon data in a study for the California Air Resources Board. They found that the strength of the inversion over Oakland tracked the pattern of air pressure high in the atmosphere. That link is what lets forecasters predict the marine layer from upper-air maps.
Some measurements come from the ground. MIT Lincoln Laboratory used sodar, an instrument that bounces sound off the air above it, in a forecasting project for San Francisco International Airport. It tracked the height of the inversion base. Forecast discussions from the Bay Area office of the Weather Service usually report the day's marine layer depth. When it says the marine layer is about 1,000 feet deep, the hills above about 1,000 feet should be in sunshine.
Fog Drip and High-Elevation Moisture
The elevations near the top of the marine layer have a special relationship with it. When fog spills over coastal ridges, it brushes against trees and shrubs and delivers water through fog drip. Fog droplets collect on leaves and needles, merge into larger drops and fall to the ground. Fog drip helps explain why coastal ridges can support lush redwood forests and dense brush without summer rain, because the fog is an important source of water.
On Mount Tamalpais, the west-facing slopes between about 1,000 and 2,000 feet sit where the top of the marine layer often meets the mountain. Forests there catch fog as it flows over the ridge, gathering moisture that the drier, sheltered slopes beyond never receive. In summer, the line between fog-fed coastal forest and dry inland chaparral can be as narrow as a single ridge. Elevation and exposure decide which side you are on.















