Costa Rican coffee farmers were once blessed with abundant rains but as precipitation grows fickle they are being forced to innovate to keep producing one of the world's favorite brews.
The country's lush Central Valley has long boasted the ideal climate conditions for growing the arabica coffee beans, its most emblematic export -- but farmers report this is rapidly changing.
Jesus Valverde, who owns a family plantation in the town of Naranjo, is trying to adapt by planting fruit trees that provide shade and maintain humidity around his coffee plants.
"We have increased production" with this "microclimate," the 59-year-old farmer told AFP.
In addition, the dry leaves that fall from the trees fertilize the soil and reduce heat, a kind of "biological technology" that maintains the humidity of the soil.
"I was ahead of climate change," the coffee farmer says proudly.
The Inter-American Development Bank estimates that rising temperatures could wipe out half of the world's coffee crops by 2050.
While the country is one of the world's smaller coffee producers, the bean has been one of Costa Rica's top exports since the 19th century. Last year, the country shipped 60,000 tons at a value of $350 million.
The industry supports more than 25,000 families.
Data from the University of Costa Rica shows that annual rainfall has steadily dropped from 2,907 millimeters (114 inches) in 2010 to 1,759 millimeters in 2023.
However some years stand out as particularly dry, such as 2016, when only 952 millimeters fell.
With climate change "the challenges are constant," as pests and fungi evolve, said Harold Gamboa, a specialist at the Inter-American Institute for Cooperation on Agriculture.
The Coffee Institute of Costa Rica (Icafe) is working on developing coffee plant hybrids that are more resistant.
"By studying the DNA of different plants, we can speed up the development of the best characteristics in a single plant," said biotechnology engineer Erika Mendez, 28.
In the past, farmers like Johel Alvarado needed to do little more than plant and wait for the country's once-consistent rains.
Now he has had to install a drip irrigation system on his four-hectare coffee plantation.
"Each year it gets a bit harder to produce the same amount," but "by innovating, we see that climate change does not affect us as much," the 52-year-old farmer told AFP.
Eduardo Rojas, who manages a 50-hectare coffee plantation in the town of Sarchi, managed to boost production after investing over $200,000 in irrigation systems and other upgrades.
In 2023, he harvested 43.5 bushels of coffee per hectare, more than double the national average.
"I didn't believe it could be done," said Rojas, who has been in the business for more than 40 years.
"People who have farms like this in very harsh climates... need to get involved in these projects," he said.