Starbucks is buying two new research farms that will test everything from drones to microbes as it seeks to make coffee more resilient to climate change, which has already constricted availability and driven up prices.

A farm in Costa Rica will look at solutions including how technology can help growers. In Guatemala — a key supply region — Starbucks will replicate the challenges facing the small farms that make up 97% of its supply chain. Both locations will also study new coffee varieties as climate change shifts where the crop can thrive.

Bolstering the coffee industry’s climate resilience has taken on fresh urgency this year, as extreme dryness in Brazil sent prices for the arabica beans favored by Starbucks to the highest since 2011 in September. Rising temperatures are leading to issues such as droughts and coffee-leaf rust, a disease caused by a fungus, that are compromising the availability, quality and taste of coffee, while jeopardizing farmers’ livelihoods.