California and the rest of the American West are facing the worst drought in over 1,200 years. This drought is devastating the agricultural industry and creating conditions that lead to massive wildfires. According to the IPCC, climate change makes it likely that droughts will only continue to get worse. To maintain an adequate supply of fresh water, the region needs to develop technological solutions to dwindling water levels.

Fortunately, a decent chunk of California is on the coast, meaning one solution to the drought is utilizing desalination technologies to turn seawater into fresh water. However, large desalination plants take years to become operational and are expensive to operate (nearly $3,000 per acre-foot of seawater). Additionally, many places experiencing drought in the West, such as Arizona and New Mexico, are not on the coast.

But desalination isn’t just an option for freshening up seawater, says Brent Haddad, a professor of environmental studies at the University of California, Santa Cruz. “[Desalination] can improve not just brackish groundwater but also agricultural groundwater that’s been harmed by chemicals and even some industrial wastes,” Haddad says.

[Related: 40 million Americans depend on two reservoirs that just hit record lows.]

Brackish groundwater is salty water that’s found hundreds of feet underground, and it is naturally occurring. It can be found throughout the United States. There’s roughly 800 times more brackish groundwater in the U.S. than the groundwater we currently pull from wells.

The main method used in desalination is called reverse osmosis. High levels of pressure are used to push the water through membranes that capture the salt and other minerals while allowing the water to pass through. 

Despite desalination’s potential, Haddad says the building up of plants has been slow. California currently has 12 seawater desalination plants. But, he thinks it’s going to be necessary to build more to deal with the drought. “There are other options, but in some cases, desalination will turn out to be the best option,” Haddad says. “We really need to keep every option open to deal with these challenges.”

One researcher, Peter Fiske, may have the solution. Fiske is the director of the National Alliance for Water Innovation (NAWI) and Water-Energy Resilience Research Institute (WERRI) at the Lawrence Berkeley National Laboratory in California. He says that it can take many years to get a desalination plant built due to permitting issues, and moving so much water across long distances can add up financially. He thinks we should be thinking about a more distributed plan—meaning more, smaller desalination plants.

“One of the things we’re going to find is there are a lot of little water sources. We’re going to need smaller scale desalination,” Fiske says. “We’re going to need it to be very compact and, in a way, rather than making a large treatment plant, we’re going to need lots of little treatment packages.”

Fiske says that the groundwater and other water sources aren’t as salty as seawater, so they’re less difficult to desalinate. He says we could have small water “washing machines” all over the West that would be easy to permit, quick to build, and wouldn’t have to move water out of the area they operate in. Most desalination plants run on fossil fuels, but in recent years nuclear has appeared as an alternative power source. Fisk is researching how future small desalination machines could run on solar power (a group of Chinese and American scientists previously figured out how to power a small desalination plant using passive solar power in 2020).

“There’s lots of dirty water around that we could reuse over and over again. Brackish groundwater is extensive throughout the state of California,” Fiske says.

[Related: Groundwater is an incredible resource. It’s time to treat it like one.]

Not only is this process more affordable than current desalination plants, but it could actually become lucrative, Fiske adds. Elements like lithium, a resource needed in batteries for cell phones and electric vehicles, can be found in much of this groundwater, which could be extracted and then sold. The USGS claims lithium can be found in drinking water sources throughout the country, especially places in the West that rely on aquifers like the High Plains and Rio Grande. 

Technological improvements in reverse osmosis techniques could also drive costs down, he says. “The reverse osmosis membranes that we make today are so much better than the membranes that existed 20 years ago,” Fiske says. “They’re just getting better and better. Each increment of performance improvement in these membranes lowers the cost, lowers the energy and makes the water easier to make.”

One day, Fiske adds, individual farms and others who need better access to fresh water may be able to produce their own desalinated water from a mini plant, creating much more sustainable access to local water sources. As climate change rages on, ideas that allow communities to thrive on their own—be it in the middle of the country or on the coast—may help keep more places habitable.