When they came to Marah, they could not drink the water of Marah because it was bitter; therefore it was named Marah. And the people grumbled against Moses, saying, "What shall we drink?" And he cried to the Lord, and the Lord showed him a log, and he threw it into the water, and the water became sweet.

Even the Greek philosopher Aristotle once observed that "salt water, when it turns into vapor, becomes sweet and the vapor does not form salt water again when it condenses." Yet, despite the continued accelerating pace of technological advancement since we switched from BC to AD, turning salt water into fresh has remained more expensive than transforming it into wine. But as climate change continues to ravage the world's watersheds, we may soon have little choice other than to turn to the sea's bounty of H2O to keep our growing global population from getting parched.

Roughly 40 percent of the world's population -- 2.3 billion people -- lives in water-stressed areas, with that figure predicted to rise to a full two-thirds by 2025. Per the World Health Organization, another billion don't have access to clean, piped water. So unless we want to try our luck with a Mad Max-style dystopia, we're going to need to find new sources of drinking water, so why not the ocean? It does contain over 97.2 percent of the planet's water resources, and given that desalination supplies only about 1 percent of the world's drinking water, there's plenty of room to expand.

"The sea is the unlimited source from which we can create new freshwater through desalination," Leon Awerbuch Director, International Desalination Association, told Filtration Separation, "and seawater desalination offers the potential for an abundant and steady source of fresh water purified from the vast oceans.

"Desalination has decisively proven, during the last 40 years, its reliability to deliver large quantities of freshwater from the sea," he continued, "so we can no longer view freshwater as an infinitely renewable resource because, unlike oil, fresh water has no viable substitute."

Large-scale desalination efforts began in the 1930s, though they relied on the ancient principle that Aristotle described: a condensing dome sandwiched between a saltwater boiler and a coolant tank. Water vapor would rise from the boiler, collect in the dome and be diverted for human consumption. The entire process was highly inefficient and energy intensive, though it did eventually evolve into a process known as multi-stage flash distillation (MSF).

It wasn't until the late 1950s that the modern membrane-based reverse osmosis (RO) technology came into existence. In 1959, researchers C.E. Reid and E.J. Breton first described the use of polymeric cellulose films for desalination and built the first working RO prototype. Four years later, a team from UCLA devised the first asymmetric cellulose acetate membrane. It would take nearly four decades for RO to overtake MSF. Currently, state-of-the-art research is exploring the use of water-channeling proteins called aquaporins (AQPs), which the human body uses to ferry water across cellular membranes, as well as carbon nanotubes (CNTs) for incorporation into RO applications.

As of 2015, roughly 18,000 desalination plants were in operation worldwide, 44 percent of them being located in the Middle East and North Africa. All told, they produce 22,870 million gallons of drinking water a day.

"I don't see [the demand for desalination] slowing down any," Michelle Chapman, a physical scientist at the US Bureau of Reclamation in Denver, Colorado, told Science Magazine.

Today, RO is the most efficient and widely accessible means of desalination at our disposal, capable of sifting the salt molecules and chloride ions out of both seawater (30,000-50,000 total dissolved solids mg/L) and brackish water (1,500 - 15,000 TDS mg/L). While it is still a resource-heavy operation -- it takes a lot of energy to push salt water through these membranes at a sufficient rate -- modern RO systems consume around a third of the power required by older MSF plants.

These two distillation technologies are not mutually exclusive and have been combined into hybrid MSF/RO systems numerous times in the past two decades. These hybrid systems work much the same way combined-cycle natural gas turbines do, with the MSF system generating low-pressure steam that can be used to drive a mechanical RO distillation process. Hybrid plants can also be combined with conventional power plants and renewable energy sources, using excess electrical power generated by those systems to drive the distillation.

Take the soon-to-be-completed Al Khafji desalination plant in Saudi Arabia, for example. It will produce 60,000 cubic meters of water per day while drawing power from a grid-connected solar-power plant spanning more than 119 hectares and generating up to 45.7MW of power.

Not only do these hybrid systems reduce the plant's carbon footprint but up to 40 percent, they drastically reduce fuel costs. "In the base case for a 455,000 cubic meters per day MSF desalination and 400 MW of electric power generation plant, the fuel consumption is 191 tons/hr and the annual cost requirement will exceed US$735 million," Awerbuch writes in Water and Wastewater International, "By comparison, a hybrid 455,000 m3/day desalination plant based on 60 percent thermal and 40 percent RO will operate at reduced fuel consumption of only 115 tons/hr. This equates to a cost of US$443 million per year." That's an annual saving of $292 million.

Of course, cost and power consumption aren't the only hurdles desalination must overcome; there are a number of environmental impacts that need to be addressed as the technology becomes more common -- the first being, what do we do with all this brine?

Brine is the high-salinity leftovers from the desalination process. It is produced at the same rate as freshwater in that for every 2 gallons of seawater that come in, 1 gallon of fresh and 1 gallon of brine go out. Coastal desalination plants often simply dump the brine back into the ocean, however, that can wreak havoc on the local wildlife population. Because brine is denser than the seawater around it, the brine will quickly sink and spread out along the seafloor, shrouding it in a low-oxygen film that suffocates any marine life caught the area.

Beyond the brine, desalination plants may also pose a risk to the local ecosystem. These plants suck up massive amounts of water and, along with it, fish fry, eggs, plankton and numerous other organisms that make up the base layer of the food web. Data on the long-term impacts of these plants' effects on their local environments remain scarce.

One potential solution to the intake issue is to suck the water in from underground. "Subsurface intakes are being used in a growing number of plants around the world, as new drilling technologies -- like the directional drilling that has made hydraulic fracturing possible -- have made subsurface intakes possible in more locations," Heather Cooley, co-director of the Pacific Institute Water Program said in a 2013 statement. "Now, even where the site is surrounded by generally unfavorable conditions, it may be possible to find a pocket with the right ones."

Unfortunately, installing these sorts of intakes is very expensive -- especially in cases like the proposed Poseidon Resources desalination plant in Huntington Beach in Orange County, California, where the entire seabed above the intakes would have to be dredged and excavated then replaced with a different kind of soil more amenable to the saltwater incursion. The company also estimates the intakes' construction costs would tack on an extra $1 billion-$1.5 billion to the $2 billion plant itself. What's more, the environmental costs of doing that could be astronomical.

So where do we go from here? Unfortunately, there doesn't appear to be any magic-bullet solution to desalination technology's growing pains; there is no revolutionary membrane technology just around the corner. Instead, the state of the art is likely to continue plodding along, making iterative improvement after iterative improvement, steadily driving costs down and efficiencies up as it has since the development of RO technology began.

That's not to say that commercial scale (and commercially viable) desalination plants are unobtainable. Just look at what Israel has managed to do. In 2004, the country pulled all its potable water from the ground or collected it from the rain. Today, five desalination plants provide two-thirds of the nation's drinking water, nearly 582 million cubic meters of water annually. The Sobek plant, the country's latest and largest, churns out 627,000 cubic meters of water per day alone.

However, even in places like Israel and the UAE, where the governments have made concerted efforts to adopt the technology, there are still some fundamental technical limitations that must be addressed. And addressed they will be, because on our rapidly warming planet, we no longer have the choice not to.