The sparkling seas that lap the miles of sand along Diani beach have made this corner of southeastern Kenya one of the country's main tourist attractions.
Yet few visitors would know that all the water in their taps comes from boreholes sunk into aquifers – underground reservoirs of freshwater that are also used by residents, businesses, and agriculture.
Well-water means life, said Mary Wanjiru, who manages the Rongai Roasting House, a restaurant in nearby Ukunda town, about 19 miles south of Mombasa, Kenya's second largest city.
"Without it, life will be totally unbearable in this town given that there are no permanent rivers or freshwater springs," Ms. Wanjiru said.
But until recently, water users – and experts – had little idea how sustainable that water supply might be, a particular worry as climate change brings worsening droughts.
The problem is a widespread one across Africa, where little is understood about groundwater supplies, said Daniel Olago, a geology professor at the University of Nairobi.
Even basic information – how much water they hold, how their supply replenishes, and how they respond under different climatic conditions – is sparse.
"We do not know what we have, because we have not done adequate studies on groundwater," he said.
But over the past two years that has started to change.
Scientists from the University of Nairobi, the University of Barcelona, Oxford University, and the Jomo Kenyatta University of Agriculture and Technology have been studying the groundwater system in Kwale County, with the Msambweni aquifer that supplies Ukunda as their main focus.
That has allowed them to determine the aquifer's size and depth, as well as the geochemistry of its water. A computer program then flags risks linked to water quality, quantity, and demand, as well as the area's economic and social conditions.
They can then model projections for different scenarios based on aspects such as climate or how much water is extracted.
"Lack of adequate information is a common problem throughout the country," said Mr. Olago, one of the lead researchers in the study known as Unlocking the Potential of Groundwater for the poor (UpGro).
"We need to know how much of the rainwater is being recharged through rainfall and infiltrations, how much of it is stored, and so how much of it can be sustainably used," he said.
The findings mean they also know whether aquifer water is suitable for drinking – as the study showed the Msambweni aquifer is – or whether it should be used for industry or irrigation.
Two of the largest users of water in Kwale County are mining company Base Titanium and the Kwale International Sugar Company, which has about 19,700 acres of sugarcane under irrigation.
Both have dams – and are building more – and both draw from the Msambweni aquifer during times of low rainfall; the study shows their use has not had a big impact on groundwater levels.
The scientists worked closely with the two companies, not least as they have extensive knowledge of Kwale's groundwater, said Calvince Wara, research operations manager for Rural Focus, a local water consultancy that is involved in the study.
Mr. Wara said once the system was well understood it would be possible to identify the best way to use the water sustainably.
Currently, the government simply issues borehole licenses to companies that want them, but it typically does not know an aquifer's size, its replenishment rate or its response to climate, he said – all key indicators of how long the water might last.
The tool would provide those answers and allow the government to better understand the impact of issuing a new license.
"Through this tool, the regulator can easily tell when water levels in the aquifers are going down, and that way it will be easier to control the amount of water that can be extracted for industrial use at any given time," he said.
Ahmed Mbarak of the Water Resources Authority in Mombasa said the new information would prove useful to his office's ability to monitor groundwater levels and decide about licenses.
"With the changing climatic conditions, such information will be a golden resource, as it will supplement some of the data we already have," Mr. Mbarak told the Thomson Reuters Foundation by phone.
It could "help us fine-tune our rules that govern the issuance of licenses for groundwater extraction," he said.
Olago from the University of Nairobi said the tool developed would prove useful elsewhere in the country, too – not least in the capital Nairobi, which is struggling to meet water demand.
Nairobi's main water source is the Ndakaini dam, which lies about 30 miles north of the capital. It supplies about 85 percent of the 130 million gallons of water the city uses each day. Demand, though, is around 185 million gallons.
The level of the dam has dropped considerably and, despite recent heavy rains, the government said water rationing in the capital would continue until 2026.
As a result, households and companies are sinking boreholes.
Mike Lane, a hydrologist with Rural Focus, said that in the 1980s boreholes in Nairobi were drilled to a depth of 262 feet. Today, they need to go down 1,300 feet.
"We are chasing the water down, and that is not sustainable," he said.
That is happening elsewhere, too, Mr. Lane said. The water table has retreated both in the flower-growing area of Naivasha, which lies 62 miles northwest of the capital, and in Nanyuki, about 100 miles north of Nairobi.
Meantime the study also revealed a key risk to the Msambweni aquifer, Wara said. If too much water is extracted, saltwater from the same sparkling seas that draw the tourists to Diani Beach could leak in, destroying the aquifer.
"It is therefore absolutely paramount that these water resources need to be protected," he said.
This story was reported by the Thomson Reuters Foundation.