Explore the City of Tomorrow, Saturday, July 26 at 2 p.m. ET on CNN.
(CNN) -- It's been a cruel irony for ancient mariners and any thirsty person who has ever gazed upon a sparkling blue ocean: Water, water everywhere, and not a drop to drink.
But imagine a coastal city of the future, say in 2035. Along with basic infrastructure such as a port, roads, sewer lines and an electrical grid, it's increasingly likely this city by the sea will contain a newer feature.
A desalination plant.
Thanks to improved technology, turning ocean water into freshwater is becoming more economically feasible. And a looming global water crisis may make it crucial to the planet's future.
The United Nations predicts that by 2025, two-thirds of the world's population will suffer water shortages, especially in the developing world and the parched Middle East. Scientists say climate change is making the problem worse. Even in the United States, demand for water in drought-ravaged California and the desert Southwest is outpacing supply.
This is why a huge desalination plant is under construction in Carlsbad, California, some 30 miles north of San Diego. When completed in 2016, it will be the largest such facility in the Western Hemisphere and create 50 million gallons of freshwater a day.
"Whenever a drought exacerbates freshwater supplies in California, people tend to look toward the ocean for an answer," said Jennifer Bowles, executive director of the California-based Water Education Foundation. "It is, after all, a seemingly inexhaustible supply."
A growing trend
Most desalination technology follows one of two methods: distillation through thermal energy or the use of membranes to filter salt from water.
In the distillation process, saltwater is heated to produce water vapor, which is then condensed and collected as freshwater. The other method employs reverse osmosis to pump seawater through semi-permeable membranes -- paper-like filters with microscopic holes -- that trap the salt while allowing freshwater molecules to pass through. The remaining salty water is then pumped back into the ocean.
Officials at the Carlsbad plant say they can covert two gallons of seawater into one gallon of freshwater by filtering out 99.9% of the salt.
There are some 16,000 desalination plants on the planet, and their numbers are rising. The amount of desalted water produced around the world has more than tripled since 2000, according to the Center for Inland Desalination Systems at the University of Texas at El Paso.
"Desalination is growing in arid regions," said Tom Davis, director of the center. "We are making progress in the USA, but the countries around the Persian Gulf are way ahead in the use of desalination, primarily because they have no alternative supplies of freshwater."
Israel, in an arid region with a coastline on the Mediterranean, meets half its freshwater needs through desalination. Australia, Algeria, Oman, Saudi Arabia and the United Arab Emirates also rely heavily on the ocean for their municipal water.
In the United States, desalination projects are concentrated in coastal states such as California, Florida and Texas.
Some environmentalists are wary of desalination, which consumes large amounts of energy, produces greenhouse gases and kills vital marine organisms that are sucked into intake pipes.
But proponents believe the technology offers a long-term, sustainable solution to the globe's water shortages. One entrepreneur has even built an experimental solar desalination plant in California's San Joaquin Valley.
"When other freshwater sources are depleted, desalination will be our best choice," said Davis, a UTEP professor of engineering.
Within the United States, the water crisis is especially severe in California, which has been stricken by drought over the last three years.
California's biggest source of freshwater is the snow that falls in the Sierras and other mountains, where it slowly melts into creeks and makes its way into aquifers and reservoirs. But if the planet continues to grow warmer, snow will increasingly fall as rain and will be harder to collect because it will swell creeks faster and create more flooding, said Bowles of the Water Education Foundation.
Seventeen desalination plants are being built or planned along the state's 840-mile coastline. City officials in Santa Barbara recently voted to reactivate their desalination plant, which was built in 1991 but shut after heavy rains filled nearby reservoirs in the early 1990s. Another $200 million facility has been proposed for the Bay Area, although construction won't likely begin for several years.
"The key question with ocean desalination is how much are you willing to pay for it? The amount of energy required to desalt ocean water can be daunting," said Bowles, adding that operating costs at the Santa Barbara plant alone are estimated at $5 million per year.
But advocates believe the price of desalination will continue to decrease as the process improves. This will be true of the massive Carlsbad plant, said Bob Yamada, water resources manager with the San Diego County Water Authority.
"The cost for this water will be about double what it costs us to import water into San Diego," Yamada said. "However, over time we expect that the cost of desalinated water will equal, and be less than, the cost of imported water. That may take 15 or 20 years, but we expect that to occur."
Ultimately, experts say, municipalities will need to balance desalination projects with conservation and water from more traditional sources, such as rivers, reservoirs and recycled wastewater.
"You can't get all your water from one source and have that source be hundreds of miles away," said Peter MacLaggan, senior vice president at Poseidon Resources Corporation, which is leading development of the Carlsbad plant.
"When and if the drought does come, and you don't have enough snowpack in the Sierras -- after 12 dry years the Rockies are seeing the impact of that today -- you've got (water) sources here within the boundaries of San Diego County," he said.
"We have a $190 billion economy in this region. It's dependent on water to sustain that economy. So the question you need to consider, is 'What's the cost of not having enough water?'"