Bakersfield California, located in the Southern San Joaquin Valley is surrounded by mountains on three sides with the only opening located to the northwest. The mountains are responsible for the low annual rainfall amounts each year by blocking the moisture it would otherwise receive (annual rainfall for Bakersfield is 6.49"). These mountains also normally block the cooling effect of the marine layer.
However, there are occasions when the marine layer deepens enough for the cooler air to pass over the mountains and through the passes penetrating into the Southern San Joaquin Valley and Bakersfield. While the cooling effect will not be as much as the coastal sites (the warmth of the ground modifies the marine air), the changes in temperature from day to day can be dramatic.
After a few days, the marine layer becomes suppressed below the mountain passes and the summertime sun gradually reheats the Southern San Joaquin Valley only to be cooled again with the next marine surge.
The graph below is shows the maximum temperature each day for Bakersfield, California in September 2004. The brown arrows indicate when marine air moved passed the coastal mountains in reached the Southern San Joaquin Valley.