Northern California in January? Why not?

Sure, on a recent new year jaunt to the Bay Area, it rained five out of seven days, as an extraordinary weather phenomenon known as an “atmospheric river” soaked the northern half of the state out of its five-year drought. But San Francisco is mild year-round, and as a traveler fleeing Minnesota in midwinter, I felt like I was in the tropics — and there was just enough sunshine to work with.

My visit was timed to my friend’s winter break from grad school, and I was compelled this time to explore to the north. So while nights were spent eating Korean food and attending comedy shows and a David Bowie tribute in the city, we also made a series of rain-or-shine day trips across the Golden Gate Bridge — up the coasts of Marin and Sonoma counties, from Sausalito to Bodega Bay.

Bonus: The California gray whale undertakes its epic 10,000-mile migration from Alaska to Mexico and back from January through April — and I’d heard it was possible to see these beasts from shore. Without trying too hard or paying for a tour, maybe I’d get lucky and spot a whale along the way.

For our first rainy Wednesday outing, we headed over the bridge into Marin County, through the recently dedicated Robin Williams Tunnel, exiting in the boutique suburb of Sausalito. Only we somehow stumbled upon the froufrou town’s gritty waterfront. A wrong turn led us into a vintage shipyard, where a “Visitors welcome” sign beckoned us inside. There, we toured the work of modern boatbuilding students, a warehouse of antique marine artifacts and the star attraction — the 1885 schooner Freda, billed as the oldest/first yacht in the Bay Area.

The nautical theme continued at the nearby Bay Model, a massive, 2-acre indoor re-creation of the entire San Francisco Bay system that has to be seen to be believed. Created in 1957 by the Army Corps of Engineers, the Bay Model is not just an enormous science project — it’s an accurate representation of how the tides flow through the bay, with water constantly shifting around. Although it’s a gratifying visit for science and geography nerds, highlighting the Bay Area’s sensitivity to California’s water shortage, I enjoyed it even more as a midcentury cultural oddity.

For lunch, we tried out Sausalito’s critically acclaimed, literally named Fish for a steamed seafood basket ($30), and although the restaurant’s sustainability focus is admirable, our trout steak was swimming in salt and soy sauce. I was done for now with the indoor, suburban side of Marin County.

Indeed, the eastern bay side of the Marin Peninsula has become increasingly sprawling and upscale, with attractive homes perched on every hillside. But the western Pacific half is all winding mountain roads, sleepy villages and “Keep Marin Wild” bumper stickers. To get to the coast from Hwy. 101, you have to take any number of fun-to-drive back roads, revealing everything from windswept peaks to the occasional remnant of redwood forest. Bike lanes are everywhere, and even where there are none, Spandexed riders boldly cling to the narrow shoulders of mountain passes, even at night.

We set out for the Marin Headlands, the southernmost point of the county that looks back upon San Francisco. Hiking trails crisscross the area, and scenic drives rise and fall dramatically. In the rain, we had a virtually private walk down to the Point Bonita Lighthouse, flanked by volcanic geology as the Pacific Ocean came into view. At dusk, we arrived at the high overlooks at Hawk Hill, just in time to capture eerie images of the Golden Gate obscured by mist.

Birds and Bodega

In search of the gray whale, I had heard that the seaside town of Bodega Bay was a prime location for spotting. But the area held another point of interest for me: Alfred Hitchcock used it as a location for his 1963 classic “The Birds,” about an avian apocalypse. In this unassuming Sonoma County fishing village and tourism town, the gulls do seem to fly about with more menace and authority.

It was 5 miles inland from Bodega Bay, in the hamlet of Bodega, where on Thursday we found perhaps the most iconic location in the film: an 1873 schoolhouse, virtually unchanged in 50 years but now a private residence. (Last fall, “The Birds” star Tippi Hedren, who shares my birthplace of New Ulm, Minn., came out with the revelation that the blonde-obsessed Hitchcock had sexually assaulted her, a not entirely surprising claim that lent a bitter edge to the discovery.) Behind the schoolhouse, a familiar white church is the subject of a famous Ansel Adams photograph.

For our next Sonoma diversion, we visited the Goat Head promontory by the mouth of the wine-famous Russian River, on a tip that seals were sunning there. We arrived too late for low tide, but did hike to the nearby “Sunset Rocks,” a set of 60-foot-tall, Stonehenge-like glacial deposits that one archaeologist thinks were rubbed smooth by woolly mammoths 12,000 years ago. In places, the giant boulders were smooth to the touch.

But we came to Bodega Bay for whales, so we drove to the top of Bodega Head, a large, rocky promontory that juts out into the Pacific, creating a famous whale-watching vista. Dozens of people had come for the same thing, and while a grand California sunset was in store (the sun was out this day), there were no whales to be found. I was striking out with the marine mammals of California.

Point Reyes

Everywhere you go on this coast, there are oysters for sale — from roadside seafood shacks to finer sit-down restaurants. And apparently from the signage, “BBQ oysters” are the sought-after local novelty. On Friday night while exploring solo, I ducked into the Station House Cafe, a neighborhood restaurant in the charming Hwy. 1 village of Point Reyes Station.

The oysters (six for $18, or 13 for $36), grilled in the half-shell and doused in a tangy sauce, had a satisfying kick, though obviously not the briny sensuality of raw oysters. I backed them up with the restaurant’s Brussels sprouts, fries and a Belgian tripel, because I was celebrating. Hours earlier, I had spotted my great gray whale.

Point Reyes Station is the entry and exit point for Point Reyes National Seashore — a 111-square-mile triangular slab of land, separated from mainland Marin by the San Andreas Fault. On the map, Point Reyes looks like an island slamming into our continent — and when you cross the fault line into the park, you feel like you’re entering another country, complete with its own mini mountain range.

I drove across the barren hills of the national seashore, past historic ranches and grazing cattle, on hairpin turns that tested my rental Mazda. When I finally arrived at the parking area for the Point Reyes Lighthouse, people were pointing down to the ocean. There it was, hundreds of feet below me: a black barnacled mass, periodically windmilling out of the water, followed by a distinctive two-pronged tail. “An orca!” someone declared. Not likely — this was the migrating gray whale.

I hiked a considerable distance down to the very edge of the cliff, on a hillside thick with tufts of wild grass, to get a closer look and a photo. Two hundred feet below me, sea lions crawled around on a sprawling, isolated beach. But the whale had moved on.

Far above me, humans were mostly oblivious, making their way to the 1870 lighthouse — a half-mile walk down 308 concrete steps. There, a dry-erase board recorded 15 whale sightings that day, compared with 25 on Monday. It seemed I had gotten lucky.

From the lighthouse’s perch over the water, there were no more whales to be seen — only cliffs, beaches and sea. To the north, what resembled an ancient volcano sat on the Sonoma horizon. To the south, a park ranger surprised me by pointing out the tips of the Golden Gate Bridge, somehow scantly visible over the Headlands.

It hit me that I was just 35 miles from one of the world’s great cities, and I could see nothing but wild, unspoiled coast.