Coffee commodity prices climbed 9.1% on Tuesday, marking their biggest one-day percentage gain in nearly a decade. The move comes after futures traders drove up raw coffee prices this week because of concerns that supply could become crimped due to unfavorable weather conditions in Brazil. The question on many investors' minds now is whether this will drive up costs for Starbucks (SBUX -2.07%), particularly as Brazil accounts for as much as one-third of the world's total coffee supply today.

Coffee needs very specific amounts of rainfall to flourish, particularly arabica beans, which make up the majority of what's sold in the U.S. by upscale coffee retailers, including Starbucks and Dunkin' Brands' Dunkin Donuts. Arabica is one of two coffee species that control the $100 billion-plus global coffee market today, according to Bloomberg. Bad weather conditions in Brazil could be extra-damaging to Starbucks' bottom line because the upscale coffee retailer only buys arabica beans.

In 2012, Starbucks saved around $100 million amid favorable commodity costs thanks to a record arabica coffee harvest in Brazil that year. But the opposite may be true in 2014 as Brazil struggles with the worst drought in decades. As coffee commodity costs go up, it could burn Starbucks' profitability, but not in the near term.

Coffee retailers such as Starbucks typically purchase their raw materials months in advance and are therefore often able to lock in lower prices. Also, coffee beans account for just 8% to 10% of cafe operating costs for Starbucks, according to The Wall Street Journal. This means that even as coffee commodity expenses increase, it will still take some time before customers see a spike in the cost of a Starbucks latte.

Looking to the future, Starbucks plans to test 30 new arabica strains in a coffee farm in Costa Rica that the coffee giant purchased last year, Bloomberg reported. Still, experimenting with growing its own beans is a waiting game for Starbucks because it will take years before the crop is ready for commercial use. If things go well at this farm, Starbucks said it would consider buying more farms in the region. For now, Starbucks should be able to weather volatile coffee prices. But longer term, climate change and erratic weather in the world's top coffee-producing countries could take its toll on Starbucks.