Meanwhile, the cost of desalinated water has been coming down as the technology evolves and the cost of other sources increases. In the last three decades, the cost of desalination has dropped by more than half.

A boom in desal, though, doesn’t mean that everywhere with access to the sea has found a new source of fresh water. Circumstances play a large role. “As populations increase and existing surface water supplies are being tapped out or groundwater is depleted or polluted, then the problems are acute and there are choices to be made” about desal, said Michael Kiparsky of the Wheeler Water Institute at the UC Berkeley School of Law. “There are places around the world where desal makes economic sense, where there is high pressure on the water resources plus a lot of available energy resources,” such as the Middle East.

Desal proponents acknowledge the industry must confront and solve some serious environmental issues if it is to continue to grow. Desalination requires vast amounts of energy, which in some places is currently provided by fossil fuels. Kiparsky warns of a feedback loop where more desal is needed as the planet warms, which leads to more greenhouse gas emissions. In addition, there are serious concerns about the damage to marine life from the plant’s intake systems and extra-salty wastewater.

The first large-scale desal plants were built in the 1960s, and there are now some 20,000 facilities globally that turn sea water into fresh. The kingdom of Saudi Arabia, with very little fresh water and cheap energy costs for the fossil fuels it uses in its desal plants, produces the most fresh water of any nation, a fifth of the world’s total.

Australia and Israel are also major players. When the Millennium Drought gripped southeastern Australia from the late 1990s until 2009 water systems in the region dropped to small fractions of their storage capacity. Facing a crisis, Perth, Melbourne, and other cities embarked on a large desalination plant spree. The plant in Melbourne, which provided its first water in 2017, cost $3.5 billion to build and provides a third of the city’s supply. It’s critical because the region has had below-average rainfall for 18 of the last 20 years.

Israel, too, is all in on desalination. It has five large plants in operation, and plans for five more. Chronic water shortages there are now a thing of the past, as more than half of the country’s domestic needs are met with water from the Mediterranean.

Globally, more than 300 million people now get their water from desalination plants, according to the International Desalination Association.

A worker at the opening of a desalination plant in Deir el-Balah in central Gaza in 2017. SAID KHATIB/Getty Images

But despite the need, desal plants will not be built on every coastline. Foremost among the barriers is the cost of constructing a plant and the cost of processing the water. The San Diego County Water Authority pays about $1,200 for an acre-foot of water sourced from the Colorado River and the Sacramento San Joaquin River Delta and pumped hundreds of miles to Southern California. The same amount from the Carlsbad plant—enough to supply a family of five for a year—costs about $2,200. As Lake Mead—the reservoir of Colorado River water on the Nevada-Arizona border that supplies San Diego—drops precipitously, it may someday, perhaps in the next several years, no longer be able to supply San Diego. Certainty is paramount.

Desal, however, is plagued by some serious environmental problems. There are two types of desalination—thermal, which heats up water and then captures the condensation, and reverse osmosis, which forces sea water through the pores of a membrane that are many times smaller than the diameter of a human hair. This traps salt molecules, but allows the smaller water molecules to go through. Both require a great deal of energy, and greenhouse gas emissions created by the power needed—especially in the Middle East, where fossil fuels generate electricity—are a significant contributor to global warming.