The Pacific Ocean is a major source of moisture for the atmosphere. When this moist air moves over the cooler landmasses of Northern California, it condenses and forms clouds and precipitation. This is why the coastal areas of Northern California are often rainy and foggy, while the inland areas are drier.