The air quality in San Francisco isn't all that bad for a major city... all the smog it produces gets blown into the central valley, where it combines with the smog the cities there produce. Then it gets trapped by the mountains and bakes in the 100-degree temperatures.
I was actually asking because of your stay in Sequoia national park. Believe it or not, the air quality there is even worse than in the city of Fresno. That's because all the smog, specifically ozone, gathers up there. Plus, cars, etc. in the city make ozone during the day when it's hot... but help break it down at night when it's cooled off a bit. In Sequoia/Kings Canyon, there are cars to make ozone during the day but none to help break it down at night.
So for your time in the central valley and in Sequoia, make sure your inhalers are handy and well-stocked.