One of the most famous phrases about San Francisco’s weather - “The coldest winter I ever spent was a summer in San Francisco." - is incorrectly attributed to Mark Twain. Searches of Twain writings, private letters, and other publications fail to locate it. The closest resemblance to it appears in an 1879 letter in which Twain quoted a person who, when asked if he'd ever seen such a cold winter, replied, "Yes, last summer." Twain then added his own comment, "I judge he spent his summer in Paris."
In fact, San Francisco weather is rather temperate with mild winters and dry summers. The city lays in an area of diversified topography which creates numerous microclimates within its boundaries. Winds are channeled over and around San Francisco by the terrain, resulting in significant differences in the weather across relatively small areas.
The highest terrain is toward the south, where the elevations rise to over 900 feet, with Mount Davidson's peak of 938 feet the tallest, followed closely by Mount Sutro at 920 feet and both North and South Twin at 919 feet. In addition to the primary north- northwest to south-southeast ridgeline, a number of significant hills dominate the San Francisco horizon.
San Francisco's climate is further modified by the location of the City on the northern end of a peninsula, surrounded on three sides by the relatively cool waters of the Pacific Ocean and San Francisco Bay. In addition to the normal cool temperatures of the mid-latitude Pacific Ocean, the water temperatures are modified by the upwelling of cold water along the California coast. This phenomenon is caused by the persistence of the Pacific High and the northwest winds that are constrained by the Coast Range to blow parallel to the coastline. The effects of these winds cause a net transport of surface waters away from the shore. Consequently, as the surface waters drift away from the coast, they are replaced by the upwelling of colder waters from below.
Summertime in San Francisco is characterized by cool marine air and persistent coastal stratus and fog, with average maximum temperatures between 60F and 70F, and minimal between 50F and 55F. The mornings will typically find the entire city overcast followed by clearing on the warmer bay side, but only partial clearing on the cooler ocean side.
Rainfall from May through September is relatively rare, with an aggregate of only about 5 percent of the yearly average total of approximately 21.5 inches. Off-season rains which do occur are usually the result of weak early or late season occluded fronts, or surges of subtropical moisture from the south that result in brief showers or thundershowers spreading into the area. Over 80 percent of San Francisco's seasonal rain falls between November and March, occurring over about 10 days per month. Winter rains on the California coast are primarily due to occluded fronts on a trajectory from the west-northwest, and an occasional cold front from the Gulf of Alaska.
Winter temperatures in San Francisco are quite temperate, with highs between 55F and 60F and lows in the 45F to 50F range. The main source region of wintertime fog in San Francisco is the Great Valley. Snow is extremely rare, with only 10 documented instances of measurable snow at the official observing site in the past 143 seasons.
Spring and fall are transition periods for San Francisco. These seasons usually produce the most cloud-free and hot days when high pressure builds into the Pacific Northwest and Great Basin, and dry offshore winds replace the Pacific sea breeze.
The content displayed above was partially derived from https://en.wikipedia.org/wiki/San_Francisco.