Farmers everywhere know water means life, and a lack of it can spell ruin.
In Hojancha, a canton that lies about 130 kilometres west of the Costa Rican capital San Jose, cattle farmer Manuel Rojas understands that as well as anyone.
Normally by this time of year, he said, his small herd of 30 cattle would be desperate for water. Not any longer.
"Now they have it there easily," he tells Reuters, pointing to a full drinking trough.
What changed? Last month Mr Rojas installed a rainwater harvest system that, as the name suggests, captures rainwater and stores it in an evaporation-proof, 1,000-cubic-metre tank.
It is one of the country's first such systems. Its inverted pyramid structure stores 1 million litres of water, enough to last four months if used carefully.
"We hope that this system can help us maintain production throughout the whole year, and not only when it rains," Mr Rojas says.
Hojancha lies in Guanacaste province, a region on the Pacific coast that is particularly prone to drought, especially during the intense summer months.
This area has few rivers, says Oscar Vasquez, the provincial director at the ministry of agriculture, who was at Mr Rojas' farm for a ceremony marking the system's installation.
"I do not see another way [than this]. Water comes only from the sky," he said.
Despite the need for it, though, capturing rain is in its infancy in Costa Rica, he said, in part because people do not know about the technology.
But there are other reasons: it is costly to set up, and there is not enough clarity about the law covering rainwater harvesting. Both factors lower the economic incentives for farmers to invest.
A system like the one Mr Rojas installed costs about $12,000, a sum that, in practice, is unaffordable for farmers like him.
It consists of a network of gutters that captures rain from the roof of his barn and directs it to the tank. From there a pump distributes it to the troughs, an irrigation system for grazing, and another that cleans the barn housing the cattle.
Mr Rojas' system was financed through the Mexican Agency for International Development Cooperation, with the United Nations' Food and Agriculture Organisation (FAO) helping to design and install it.
FAO programme assistant Diego Fallas says it is hard for farmers to get financing for green solutions like rainwater harvesting as the existence of such systems is largely unknown.
"Access to green financing is important, for example. These are actions that adapt producers to climate change, and green financing should make this type of technology more accessible to producers," Mr Fallas says.
Of course, Costa Rica is by no means the only, or first, country where farmers harvest the air for water.
Villagers in Morocco’s south-west mountains turned to “fog harvesting” in 2015, a green technology that transforms fog into fresh water straight from the tap and puts an end to exhausting daily treks to distant wells by local woman, AFP reported.
Families in five highland Berber communities benefit from this water collection technique, which was devised in Chile two decades ago and has since been taken up in countries from Peru to Namibia and South Africa.
_______________
Read more:
UK firm targets Middle East with water from the air system
'We have to change': Al Gore warns Dubai forum of climate crisis
_______________
On the summit of a mountain named Boutmezguida, which looms over the villages at 1,225 metres, thick fog shrouds about 40 finely meshed panels designed to trap water and relay it to a network of pipes.
To have water running from a tap at home is a “revolution” for inhabitants of the semi-arid mountains known as the Anti-Atlas, says Aissa Derhem, the chairman of an active regional association called Dar Si Hmad for Development, Education and Culture (DSH).
DSH prides itself on having built “the world’s largest fog-collection and distribution system” and helping locals in the Sidi Ifni region to learn to operate it, after repeated droughts and scarce rain.
“Our rain here is the fog,” Mr Derhem says.
Back in Costa Rica, the FAO wants to encourage more farmers in the drought-prone Guanacaste region to consider rainwater harvesting, Octavio Ramirez, FAO country head, tells Reuters.
Doing so would help farmers deal with the effects of climate change, says Mr Fallas, by creating a water reserve to supply their farm's needs during drought.
The FAO focuses on Guanacaste because it lies in Central America's "Dry Corridor", one of the regions whose agriculture the agency regards as being more vulnerable to rising temperatures.
The area is also exposed to extreme events such as El Nino, says hydrologist Alejandra Rojas (who is not related to Manuel Rojas) from the University of Costa Rica.
The last El Nino, which hit Costa Rica's typically dry northern and central regions in 2015, caused losses of more than $50 million to agriculture and livestock, government figures show.
So while rainwater harvesting will help farmers deal with the effects of climate change and lower the stress on aquifers, it will take much more than that to minimise the effects of extreme weather events, she says.
"What happens a lot of the time is that the system goes into a hydrological drought. In other words, there is a decrease in all water sources - both rain and reservoirs - as well as aquifers," Ms Rojas said.
Dealing successfully with those types of situations needs more, including setting up water-saving habits and using drip irrigation.
And although nature is beyond the government's control, fixing regulations around rainwater harvesting is not. Both Mr Vasquez and Mr Fallas say a lack of clear rules is holding back the spread of rainwater harvesting.
Regulations about water use have long been complex in Costa Rica. Farmers, for instance, must get permits if they want to use rainwater once it has landed on the country's soil.
And until last year, they also needed a permit to capture rainwater from their own roofs. That changed after an executive order was issued allowing farmers to store up to 1,000 cubic metres of rainwater without permission, says Mr Fallas.
"Water that has not touched national soil can still be used without any permits," he says.
That remains true for now. However, as the executive order expires next year, it is unclear what will happen then.
The complications do not end there: regulations around water storage are also complex, Mr Fallas says, as they involve strict construction rules that can take two years to complete - a lengthy, costly process that many farmers cannot afford.
Patricia Quiros, general manager of the government's National Service of Groundwater Irrigation and Drainage, says local authorities could help by including rules on rainwater harvesting in their regulations on land use.
They could do the same by devising local regulations on building storage systems, she said, cutting both the amount of red tape and the time farmers need to spend on securing water.
Mr Fallas says time is of the essence.
"We must take the issues on the table and start working together because the ones suffering right now are the producers. The agriculture and livestock sector is being harmed."