As I fly home over the San Francisco Bay, the familiar shape, curving in a graceful C, suddenly appears beneath the clouds, holding out the promise of vibrant life below. Its back arches toward the Pacific Ocean. Its upper arm stretches inland to the delta that links it to two great rivers that carve out California’s Central Valley before they rush on to the sea. The bay’s lower arm, also freshened by the rivers, stays shallow enough to walk across as it curls south.

There is a beauty in the way the whole natural system fits together, keyed to times and tides, seasons and cycles. The millions of us clustered around the bay may not know we owe the sweet scent of the wind, the call of the birds, and the platefuls of local salmon and crab to this elegant connectedness.

The gleaming metropolis of San Francisco towers on the edge of the largest estuary on North America’s Pacific Coast. A signature vermillion bridge, as famous as Big Ben and the Eiffel Tower, marks the ocean’s mighty sweep through the Golden Gate to form the bay. Its configuration illustrates the very character of an estuary: A partly enclosed coastal body of brackish water, fed by a river, open to the ocean’s rhythmic tides. The mix of fresh and salt water is symbiotic, and particularly dramatic here. Over time, the upheaval and subsidence of the Earth’s crust created a cavity between the coastal San Andreas Fault and the inland Hayward Fault. The invading ocean encountered the force of the two rivers, the San Joaquin and the Sacramento, fed by the melting snows of the Sierra Nevada. And San Francisco Bay was born.

View Images A member of the Dolphin Club goes for an early morning swim in the San Francisco Bay. The water quality in the bay has increased significantly in the last 50 years making recreational swimming in the bay more feasible. This was the result of the Save the Bay movement started in the 1960s Photograph by Peter Essick, National Geographic

This shifting, intricate blend of winds, currents, salinity, and temperature creates subtle gradations of habitat that offer something for all, from the early peoples who created coastal settlements, to the wild harbor seals and river otters seeking shelter on hidden islands, to the smallest plankton at the base of the food web. Native Americans scraped shellfish off rocks here 7,000 years ago and found abundant fresh water, fish, and fowl. Salmon connect the estuary, hatching in cold rivers, growing in the bay, swimming in the ocean for years before they return to the rivers to spawn and die. Half a million wintering and migratory shorebirds, and millions more ducks and geese, stop for days, weeks, months to eat and rest on the Pacific Flyway, one of four continental migration routes.

Here in San Francisco Bay, the catchall name for the estuary, humans have changed the shoreline and ecology since the Spanish explorer Portola set eyes on it in 1769 and brash chancers swarmed to the Gold Rush in 1849. As the population grew, newcomers from around the world brought a diversity of lifestyles, filled the tidal marshes, dumped mine tailings, and brought exotic species by railroad and ship. Later came dams, sewage, oil refineries, and plastic pollution.

And now, rising sea levels and competing demands for fresh water are threatening to change the bay again. Over a year’s time, I stopped along the 1,000-mile water’s edge of nine counties via 1995 Subaru, light rail, and a slew of motor boats and kayaks to see how people are trying to restore the balance of this bay I love.

View Images San Francisco's Crissy Field was a U.S. Army airfield and dumping ground for hazardous waste until 1994, when the National Park Service took control of the area. A massive cleanup effort included 3,000 volunteers planting 100,000 plants. Here, plants thrive in restored sand dunes.

When I arrived 30 years ago from the desert town of Tucson to work as an environment reporter at the San Francisco Examiner, only a few voices were warning against shoreline development, rising tides and excess river water diversions to cities and farms. Two decades ago, spurred by declining numbers of dozens of bird and fish species, scientists and others launched efforts to bring back tidal marsh, the bread and butter of an estuary. The marsh acts as a nursery for microalgae that feed invertebrates eaten by larger fish, shrimp and crabs. At low tide, migratory birds forage by the millions on tidal flats.

The marsh now has the new role of edging the bay and absorbing the shock of storm surges as oceans rise, a challenge that hard structures can’t easily meet. And to function as an ecologically working water body free of stagnation, the estuary needs fresh river water flows as much as it needs ocean tides. But agricultural and municipal interests are demanding increased pumping of rivers that would otherwise mix and freshen the delta and bay on their way to the sea.

Thousands here now speak of restoration and resiliency, and they are making real changes. Instead of depending on walls alone to resist crashing waves, scientists are looking at more welcoming natural buffers of eelgrass, which lure water bugs, fish and birds, and shell reefs that support native oysters. Dikes and levees on thousands of acres of pastures, hayfields and salt-making ponds ringing the bay are coming down to bring back tidal marsh.

A competition, Resilient by Design, inspired by work on the New York and New Jersey coasts, aims to attract international architects and engineers who will figure out how the region can deal with the higher tides that are forecast as the Earth warms. People living inside the Gate have been reminded that San Francisco Bay is the goose laying its golden eggs. Gorgeous gray fog would still pour through the Golden Gate if the bay were a dead, stinking, stagnant pond, but we wouldn’t want to live here. Bay Area residents recognize that sustaining life in the bay means protecting the special ecological system that evolved to survive cycles of drought and deluge.

View Images Arrowhead Marsh, formed in the late 1860s, is one of the few original salt marshes remaining in the San Francisco Bay. After the Port of Oakland was caught dumping fill into the marsh in the 1980s, environmental groups filed a lawsuit and won $2.5 million to restore the wetland.

Preparing for Higher Water

Here where the city meets the bay, on the Embarcadero at the Port of San Francisco, on a bright, blustery Thanksgiving weekend morning, the Beaux-Arts clock atop the Ferry Building chimes 12 somber bongs. Residents and tourists alike have come to see the 6-foot, 7.2-inch king tide that rolls over the puny sea wall near the end of Market Street as a dramatic manifestation of sea level rise. It’s an El Nino year with a stronger surge than usual, and the sight snaps us back to the reality that the ocean can come and take back the bay.

During the past century, the ocean has risen eight inches at the San Francisco gauge set up in 1854 by the United States Coast Survey, the longest continually operating tide observation station in the Americas. Around the world, high tides peak higher and extend farther inland than in the past. U.S. scientists say that as time goes by, the water level reached now during a king tide will be the level reached at high tide on an average day. By the time the two-year-old toddler splashing through nearby puddles turns 85, high tide on the bay may have risen by another 5 feet, 7 inches, the scientists say.

View Images Migratory shorebirds fly over a restored former salt pond in Menlo Park, California. The San Francisco Bay is a critical habitat for more than one million shorebirds and waterfowl along the Pacific migration route.

Farther along the Embarcadero on a winter’s evening, experts are addressing about 200 citizens who’ve come to the Exploratorium museum to hear about our climate future. Urban planner Gil Kelley, who will leave San Francisco to take another planning director job in the port city of Vancouver, B.C., has advised on runaway storm surges in New Orleans, too. He cites predictions that if nothing is done, highways, hospitals, the Google and Facebook campuses, and the San Francisco and Oakland airports will be inundated by 2100. The dollar value of private and public property on the San Francisco shoreline alone is estimated to be roughly $75 billion. Without preventive action, daily tides could cover 6 percent of San Francisco’s 49 square miles by the end of the century, scientists say.

The crowd is full of questions. Corwin Bell, a young, bearded, shaggy-haired man, asks about “managed retreat,” the buzzword for an exodus of low-lying communities. Relocating development is something we’ve never done before, although there are willing sellers and light industry doesn’t have to be by the bay, Kelley responds. Moving people from their homes was not a conversation even New Orleans wanted to have after Hurricane Katrina in 2005. Low-lying Foster City, California, built on fill along the bay, is doing studies necessary to raise its dikes. Around the bay, there are other ways to temper storm surge and wave energy, he says. “The nice thing is, we actually have some time,” Kelley says.

View Images These tidal wetlands were once salt ponds, their dulled colors a far cry from the vibrant rust, green and turquoise blue that once signaled their salt content. It's the work of the South Bay Salt Pond Restoration Project, which converts commercial salt ponds to a mix of tidal marshes and mudflats.

Protecting the Shore, Naturally

During a 30-minute ferry ride from the Embarcadero across the bay to Marin County, the golden light of dawn casts a rosy glow on the water. The Golden Gate Bridge looms to the west, a reminder of the vast ocean beyond. The big sky flares deep pink and blue, riffled with puffy rows of high clouds.

Down on a narrow beach, I spy the blonde, fit biologist Katharyn Boyer, a force in a global movement to restore shoreline resiliency, the phrase encompassing techniques that resist rising tides while at the same time provide ecological benefits. The low tide exposes the craggy tops of oyster reefs and the waving tips of eelgrass. She’s looking out at the black-and-white terns skimming the swarms of oysters and mussels affixed to the reefs. Snowy egrets and great blue herons stand to feed, and the morning quiet is broken only by the plop of brown pelicans diving down to grab fish. Reefs like this, thickly encrusted with native Olympia oysters, haven’t been seen in decades –– since Jack London and his sloop Reindeer joined the Fish Patrol in 1892 to guard against illegal nets in the bay. Eelgrass had succumbed to shoreline development or hydraulic mining waste, or perhaps had never grown in this particular spot.

View Images More than 80% of Bay Area's wetlands were developed for salt mining in the mid-1800s. The Cargill Corporation once owned the majority of the region's 16,000 acres of salt ponds, and has since sold and donated the vast majority back to the government and nonprofit organizations. Cargill still operates a small number of commercial mines, such as this one in the South Bay.

In an attempt at restoration, Boyer and teammates from San Francisco State University ’s Romberg Tiburon Center and other institutions started planting eelgrass and building an acre of reefs on the bay bottom with shells discarded by oyster farms about 10 years ago. The Olympia larvae floating around the bay attached to the reefs; now there are 2 million oysters there. “Eelgrass is a fascinating habitat. It’s below the water, and it’s mysterious. Fish come to eat the invertebrates that live on it, and birds come to eat the fish,” Boyer tells me.

The reefs and the eelgrass are the first line of defense against the strong wave action predicted in global warming scenarios. Chesapeake Bay, the Gulf of Mexico, and the Carolina and Virginia coasts are also creating soft shores, called “living shorelines.” New York, New Jersey, Washington, and British Columbia also are trying these techniques, along with sea walls. Tidal marshes, pools, and sloughs ringing the land’s edges once buffered the tides at the same time they filtered pollution and fostered fish and birds. That was before humans drained and diked estuaries to build cities, grow crops, and make salt.

View Images Biologists examine artificial nesting islands built at Ravenswood Open Space Preserve, part of the South Bay Salt Pond Restoration Project. The islands have been a success: Colonies of Caspian terns have hunkered down here, building nests on the open ground.

A Restoration Success Story

To the north, under a Sonoma Coast blue sky, a crowd gathers on the water’s edge of 1,000 acres of dried-up hayfield to see a little miracle. For a century, an earthen levee has blocked the bay. Today, in a return to the way it was before the Gold Rush, the onlookers have come to see the rebirth of tidal marsh and its age-old functions of quelling high tides, filtering pollutants and enriching aquatic life. An excavator bites away at the levee. The last of the barrier disappears, and waves roll over the dry land for the first time in more than 100 years. We can almost hear the baked earth suck up the bay. Cheering and clapping is the little band of residents, some with the nonprofit Sonoma Land Trust, and the government dignitaries who worked to make it happen. Onlookers wipe away tears, and some shout out names of deceased environmentalists who fought for the project over a dozen years. In a tip of the wing from the avian community, a murmuration of sandpipers swirls and dips above the rushing tide. Water slowly snakes inland to flood the ground peppered with plugs of native pickleweed seeds, and ducks dive for emerging aquatic bugs. Tidal marsh is revived on ecological treasures such as Bair Island, which might have been paved for office buildings. I ponder what a baby born today will see here in 30 years.

In the 1990s, San Francisco Bay had the rare chance to reclaim some of the more than 80 percent of its tidal marsh that had been lost over the previous 160 years. Of the original 200,000 acres of marsh that ringed the bay, only about 40,000 were left by 1999, when a group of scientists produced studies showing that another 60,000 acres had to be put back over the next 50 years to maintain a healthy estuary. At the time, they weren’t thinking so much of providing the margin for sea level rise but rather returning the ecological benefits of living marsh. The first big chunk came in 2003, when the giant food conglomerate Cargill, Inc. decided to sell some of its vast holdings of salt-making ponds, and the rest followed. So far about $310 million in state, federal and private money has secured 40,806 acres of ponds and hayfields, and about one-tenth of it has been restored. A core of scientists and agency land managers gathers once a month to thrash out the restoration trade-offs: which species need tidal marsh, which need freshened salt ponds.

View Images Birds soar over the Cosumnes Preserve south of Sacramento, California. The American Bird Conservancy and the Aububon Society have designated the preserve an Important Bird Area. It's a critical stopover point for over 250 species of birds.

Now, Cargill’s remaining working salt ponds, made iridescent red, orange, and green by colorful brine shrimp, algae, and bacteria, are hardly noticeable to those flying into San Francisco and Oakland. And the biggest wetland restoration experiment in the country is working.

On the eastern shoreline 15 miles south of Oakland at Hayward, John Krause, a biologist with the California Department of Fish and Wildlife, is twisting the hand wheels on gates that control the bay flow at former salt ponds now named Eden Landing Ecological Reserve. Calls and murmurs of birds fill the air scented with native cordgrass, marsh gumplant, and alkali heath, all planted and naturalized in the 10 years since these salt ponds were opened to the bay.

“Harbor seals are foraging here in the sloughs of the tidal marsh, which means the big fish are here, which means the little fish are here. So it’s the whole food web. Harbor seals haven’t been in these marshes since they were marshes 100 years ago,” Krause says. A visitor stops to ask him about the new bird-viewing stage and kayak launch, part of a four-mile extension to the 350-mile ring of Bay Trail. Policymakers and engineers are coming from China, Taiwan, Japan, the Netherlands, and Canada to learn how to replicate the design to transform most ponds to open tidal marsh and leave some freshened with bay water. “There’s a renaissance of restoration going on in the bay,” Krause says. “We need to speed along these restorations to keep pace with the rising tides.”

View Images A father and his son stake out ducks at Suisun Marsh. The 600-acre protected marsh, made up of public and private lands, produces the vast majority of California's mallards. Photograph by Peter Essick, National Geographic

So far, in the infancy of restoration, the U.S. Geological Survey has seen a doubling of water birds in winter, including 93 species of shorebirds, ducks, geese and waders, from about 98,000 in 2002 to about 236,000 in 2014.

“Osprey are out there ripping apart fish and building nests. With cleaner water, you get clearer water, and the birds can see the fish. Ten or 20 years ago, osprey weren’t nesting around the bay,” federal biologist Cheryl Strong tells me when I stop to visit the Don Edwards San Francisco National Wildlife Refuge. At 30,000 acres, it’s the first urban wildlife refuge in the country, born in 1972 of citizen activism. “The black rail had been wiped out for nesting in the 1970s. About six years ago, we started getting reports of the ‘kee-kee-deer.’ Now they’re spreading all over the south bay.” Leopard sharks come to feed on fish moving in and out of the breached ponds, Strong says.

At the peak of migration on a crispy sunny fall day, I can see this for myself in the southern bay at the new Ravenswood Open Space Preserve. Thirty years ago I walked the earthen berms around salt ponds seeing desolation with eyes burning from salt. Now the air is fresh. The fish are jumping. I’m gaping at thousands of western sandpipers and dunlins twisting and turning against the sky creating an undulating kaleidoscope of color. Brown backs twist in unison to expose white breasts in a jaw-dropping exhibition of avian team acrobatics. Feeding peacefully in a restored pond freshened with bay water, one thousand marbled godwits fluff butterscotch feathers. They poke 4-inch beaks into shallow water, its depth managed to match the length of their legs, and come up comically with mud on their heads.

View Images A Salt Marsh Harvest Mouse perches in a pickleweed bush at the Don Edwards San Francisco Bay National Wildlife Refuge. The federally endangered, three-inch long mouse has lost almost 90% its historic habitat because of extensive development of bayside marshland. Only a few thousand remain.

These are the sights beheld by Richard Dana in his 1840 account, Two Years Before the Mast. Yet, here it is again under muffled traffic tearing over the Dumbarton Bridge, within a mile of Facebook’s Menlo Park campus. When I first moved here I had to search for spots on the bay that weren’t fenced-off private property or dumps. Now I see more wildlife than I would in wilderness.

San Francisco Bay advocates have complained for years that their bay is getting shortchanged of its federal dollars for wetland restoration, and according to the Environmental Protection Agency, they’re right. While Puget Sound received $28 million in 2013, Chesapeake, $73 million and the Great Lakes, $300 million, San Francisco Bay received $4.8 million. With a plan in place, the bay needs more than $1.43 billion to restore the land it has already secured, the Greening the Bay report says. However, the region is facing the prospect that Washington could drop federal aid altogether. As part of the Trump administration’s 2018 preliminary budget proposal to cut the EPA staff by 25 percent, the bay’s $4.8 million would be eliminated, as would funding for similar waterways across the nation.

View Images Sea lions lounge on the docks at San Francisco's Pier 39. It's become a popular tourist attraction for its hundreds of sea lions, who arrive in droves every spring.

Save the Bay, an organization founded in 1961 by visionary Berkeley women whose push for protective state laws predated the federal Clean Water Act by a decade, led a coalition to put a measure on the June 2016 ballot to raise $500 million. Seventy percent of the voters in nine counties favored paying the parcel tax of $12 a year for 20 years. Palo Alto bay warrior Florence LaRiviere, at 93, was “thrilled and surprised” at the vote when I checked in with her. She and her husband, Philip, fell in love with tidal marsh when they moved here in the 1950s. She’s grown armor over fights to secure parcels jumps ahead of developers to piece together that urban wildlife refuge. In the decades I’ve known her, she always had her eye on the Cargill salt ponds. Today, what was once a salt crystallizer pond is now named LaRiviere Marsh, home to the imperiled Ridgway’s rail and salt marsh harvest mouse.

The win for the bay didn’t surprise me. Residents here hardly question the urgent global warming forecasts. In the past decades, I’ve seen a surge of recreation on the water with new beaches and fishing piers. Sylvia McLaughlin, one of the late founders of Save the Bay, has a new 8.5-mile shoreline state park named after her. Nearby at the Berkeley Marina, boat captains, kayakers, and windsurfers know the bay up close. Alameda Island draws families to tide pools and park picnic tables. People don’t have to be on the bay to love it, polls show. Drivers, as they speed across five bridges, gaze out car windows at sailboats, imagining the winds and currents on the water.

View Images Baseball fans stand for the national anthem at the beginning of a San Francisco Giants game. The stadium, AT&T Park, offers an expansive view of the bay. On game days, fans in kayaks and fishing boats take to the water beyond right field––an area known as McCovey Cove, after a former Giants slugger––hoping to catching a home-run ball.

Why Water Flow Is Crucial

The nation’s second-largest estuary was virtually unstudied until about 50 years ago. Except for the pioneer post-Gold Rush scientist G.K. Gilbert, who stationed himself for 30 hours at the swift-flowing Golden Gate to measure velocity of a tidal cycle and the effects of sediment from gold mining smothering the bay floor, little academic attention was given to water circulation and quality, and communities of species. Compared with the well-studied Chesapeake Bay, more than seven times its size (4,480 square miles to 613 square miles) and 160 years earlier in European discovery (1608 to 1769), the San Francisco Bay was the remote Amazon Rainforest.

Fifty miles to the south of the Marin oyster reefs -- one hour’s drive with no traffic, three hours’ drive during rush hour commutes -- retired USGS oceanographer John Conomos meets me at the Palo Alto Baylands. Lunchtime is filled with coworkers on benches munching sandwiches and riding bicycles. Conomos is watching black-necked stilts on skinny hot pink legs poking well-tailored bills into the bay mud. The spicy, salty scent from the marsh and the breeze off the bay drench the spot like honeysuckle on a warm southern night. “I love that smell,” says Conomos.

“Nothing much was known about water movement here” when Conomos arrived in the late 1960s with the first group of scientists from the University of Washington to USGS in Menlo Park. He proposed a circulation study showing how river water mixed with the ocean. Sea drifters, which are plastic discs thrown in at the Golden Gate, moved into the bay along the bottom; the delta’s sea drifters moved out toward the ocean along the lighter, less salty surface. “We measured estuarine flow in an estuary. We knew for years about the Chesapeake and other estuaries. Nobody on San Francisco Bay knew diddly about anything. It was the most basic thing in the world. I was embarrassed. Everyone thought I was a genius.”

View Images A statue of legendary Giants player Willie McCovey flanks the cove named for him. A promenade alongside the stadium offers pedestrians peeks of baseball games through the archways in the wall.

The findings of USGS scientists served as a screwdriver in the spokes of Gov. Edmund G. “Pat” Brown’s pet project to build a Peripheral Canal, which would take water directly from the Sacramento River and ship it to Central Valley growers and Los Angeles. The former governor’s argument, and that of his son, present Gov. Edmund G. “Jerry” Brown, is that canals or tunnels would efficiently move water and spare fish in the delta. Powerful agricultural districts lobbied for the plan, saying the fresh water that runs through the delta and the bay and out to the ocean is wasted. But the USGS had shown that river flow is a necessary force in circulation, and helping to flush the south bay of sewage waste. Biologists, too, connect the loss of species with the 50 percent loss of natural river flow since the construction of dams and water projects.

In a downtown café on the way to a San Francisco Giants game, USGS senior research scientist James Cloern talks of current topics with me. Nothing much matches the drama of the recent drought years, when hatcheries had to truck Chinook salmon fingerlings down to the bay and ocean for release because there wasn’t enough water in the Sacramento River. In 2014 and 2015, too much dammed cold water was sent to farms and cities, leaving the river too warm for salmon eggs to survive. And selenium from a combination of sources, including oil refineries, sewage treatment plants, agricultural runoff and natural geologic formations, is turning up in Sacramento splittail, white sturgeon, and diving ducks.

Cloern worries about treated sewage from 6.5 million flushed toilets fertilizing phytoplankton blooms, which can deplete oxygen and kill aquatic life, a problem that has plagued other estuaries. Here, perhaps because of stronger circulation, nitrogen doesn’t turn into food for phytoplankton. Or maybe clams and mussels eat up the phytoplankton. He notes the irony of not enough bay mud in the estuary to build up reclaimed marshes when a century ago, a billion cubic yards raised the bay 12 feet in some places. Over time, as forecast, river flows and ocean tides swept the sediment from the bay.

View Images Tourists snap photos of the Golden Gate Bridge on the ferry from Sausalito to San Francisco. San Francisco is known as "the city by the bay."

Around the world “estuaries are changing at a breath-taking pace,” Cloern says. Most of the world’s largest cities –– including New York, Rio de Janeiro, London, Paris, Tokyo, Shanghai, Calcutta, and Cairo –– are built near rivers that flow to oceans. The St. Lawrence River connects the Great Lakes to the Atlantic. Chesapeake Bay catches rivers and runoff from three states and the District of Columbia, and in Europe the Danube River flows through 10 countries before it forms a rich delta where it meets the Black Sea.

As human population and economies grow and climate change accelerates, the ecosystem shifts will be even faster, Cloern tells me, ticking off some dramatic examples. Since the 1950s the Chesapeake Bay has had a 10-fold increase in chlorophyll, an indicator of phytoplankton growth. Dead zones appeared off Danish coastal waters and in the Baltic Sea. Green tides disrupted sailing competition during the 2008 Olympic games in the Southern Yellow Sea, the northern part of the East China Sea. Egypt’s coastal fishery collapsed in he mid-1960s after the Aswan Dam disconnected rivers from the Mediterranean. And the Bohai Sea lost rich fish life after damming reduced by nearly three-quarters the flow of the Huang He, or Yellow River.

Everything is connected, Cloern says, and lessons from the past cannot be ignored.

One summer night, at a Giants baseball game at AT&T Park, I sit high in the nosebleed seats, eating a homegrown Dungeness crab sandwich and eyeing the bay below, waiting for a hometown homer to splash into McCovey Cove. I have to catch my breath at the beauty of it all.