A hundred million gallons of ocean water will be pumped through the Carlsbad Desalination Project each day. Photograph by Gregory Bull/File/AP

The waves of the Pacific seem to taunt the thirsty landscape of California. The state has eight hundred and forty miles of coastline adjoining the world’s largest ocean—an oversupply of brine at a time when drought has left fallow more than half a million acres of farmland, claimed some twenty thousand jobs, and cost the economy billions of dollars. To Mark Lambert, though, the state’s water-rich coast is the overwhelming answer to its problems.

“Thirty-five thousand gallons a minute!” Lambert shouted recently, over the sound of water gushing from a fat pipe into a lagoon at the edge of the Pacific. He was showing me the discharge site of a billion-dollar desalination plant now under construction in Carlsbad, California. “Desal,” as it’s known in industry vernacular, converts ocean water into pure, delicious tap water. The fat pipe, also known as the brine pit, is where the salt that’s been removed from the drinking water is returned to the ocean.

Lambert heads up the North American division of IDE Technologies, an Israeli company that designs and operates mega-scale desalination plants worldwide. IDE’s Carlsbad facility will be the largest desalination plant in the Western Hemisphere. Built in collaboration with the San Diego County Water Authority and Poseidon, a private developer of water infrastructure, the plant will come online in early fall, and is currently in the early stages of startup. Nearly a tenth of the San Diego County’s total water supply—enough for about four hundred thousand county residents—will come from this facility. A hundred million gallons of ocean water will be pumped through the plant per day; half will become drinking water, the other half will flow back into the ocean carrying the removed salt.

Twelve years in the making, the project is now uncannily well timed. “This is as good an entry into the U.S. market as we could have hoped for,” Avshalom Felber, the C.E.O. of IDE, told me.

But desal has a troubled history in the United States. Engineering problems at a Tampa Bay, Florida, plant reduced the facility’s operating capacity by eighty per cent for years, costing the city millions more than it had budgeted. A plant in Santa Barbara, California, has been mothballed for more than two decades, after a devastating drought in the nineteen-nineties. It just became too expensive to operate after rainfall returned and filled local reservoirs. Today, the total volume of desal production from seawater in the U.S. doesn’t amount to much—less than the Carlsbad plant will yield on its own.

Still, the technology has gained traction in other parts of the world. Roughly fourteen billion gallons of desalinated drinking water are produced each day, by thousands of plants scattered along the coastlines of China, India, Australia, Spain, and other countries with scarce freshwater supplies. According to the International Desalination Association, Ras Al-Khair, in Saudi Arabia, is the largest desal plant in the world, producing two hundred and seventy-three million gallons of drinking water per day, more than five times the capacity of Carlsbad. In Israel, the technology produces about a quarter of the nation’s water supply.

Part of the problem in the United States has been that we just haven’t needed it. The land where Israel is situated has been dealing with chronic water scarcity since the Iron Age, but the U.S. is filled with rivers and lakes—and some regions of the country still get plenty of rain. Average water prices in United States cities are notably (and, many argue, ludicrously) low: on average, about ten dollars per thousand gallons, less than half of the prices in Australia and European nations. Another part of the problem is that, in the U.S., environmental groups generally don’t like desalination, citing concerns about utilities and customers not conserving if they perceive there being an endless supply of clean water from the ocean. Furthermore, according to Sara Aminzadeh, the executive director of the California Coastkeeper Alliance, “It’s just not a good option from a cost and energy standpoint.” She went on, “Desalination may seem like a panacea, but it’s the worst deal out there.”

Environmental groups in California have filed fourteen legal challenges against the Carlsbad plant; all have been denied, but many Californians still wonder about the impact of the technology on both marine life and the atmosphere. It would be counterproductive, after all, to try to solve problems created by drought with a technology that would contribute to climate change—and, arguably, drive more drought.

Desal has been around for millennia if you count the evaporation techniques pioneered by Greek sailors in the fourth century B.C. They boiled saltwater and then captured the steam. When cooled, steam condenses into distilled water that’s free of virtually all contaminants. This same basic technology—known as thermal desalination—is still used today in many of the world’s desalination plants, but more efficient methods have emerged. Most new plants, including Carlsbad, use reverse osmosis, a method that simulates the biological process that happens within our cells as fluids flow across semi-permeable membranes.

“Let’s say a hole in the membrane was the width of a tennis-ball can; on that same scale, a water molecule will be the size of a tennis ball, and the salt molecule is about the size of a softball—it can’t move through,” Lambert explained. He offered me a sample of the polymer membrane, no thicker than a sheet of tracing paper, that’s used at the Carlsbad plant. “Nothing gets by but pure water.”

First, the ocean water moves through a filter of gravel, sand, and carbon that pulls out suspended matter, then it enters a process that removes smaller particles, viruses, and bacteria. The third phase of filtration, which removes salt, is the trickiest, because salt isn’t suspended in water—it dissolves. Enormous pressure must be applied to blast the saltwater through that discerning filter. Lambert showed me a series of pumps at the Carlsbad plant that collectively exert seven thousand horsepower of energy (eleven hundred pounds per square inch of pressure), night and day. (A NASCAR vehicle does about seven hundred horsepower at full throttle.)

The whole ordeal does consume a lot of energy, but advances in reverse-osmosis technology have cut the total amount of energy used in desalination by about half in the past two decades. Add to that the fact that almost all of the freshwater consumed by the twenty-two million people of Southern California is imported, much of it pumped long distances, over mountains, from Northern California—a process that also burns lots of energy. All told, it takes about 3460 kilowatts per acre-foot to pump water from Northern California to San Diego; Carlsbad will use about thirty per cent more energy, five thousand kilowatts per acre-foot, to desalinate ocean water and deliver it to households, according to Poseidon’s report to the Department of Water Resources. That’s a notable but not prohibitive difference, especially given that there’s less and less water available for import. The Carlsbad plant will add five to seven dollars a month to the average household bill, but the San Diego Water Authority expects that, within about a decade, the desalinated water will become less expensive than imported water: as fresh supplies dwindle, the cost of water imported to Southern Californian cities has been climbing more than seven per cent a year.