According to the NOAA, 2012 will likely set a record for the warmest year recorded in U.S. history.

The highlight of the hot year was undoubtedly the summer's drought, which plagued America's farms.

A new study by the St. Louis Fed details how livestock producers were the big losers during 2012’s drought, while crop producers retained their profitability.

The researchers note that the decline in yields caused prices for these commodities like corn and soy to rise by about 30 percent. These high prices, when coupled with all-important government crop insurance, made 2012 the most profitable year for farmers in four decades, with profits of $122.2 billion.

This flies in the face of the conventional wisdom that farmers were adversely impacted by a drought. Government insurance programs, buoyed by years of strong agricultural performance, have made all the difference in this regard.

Further down the supply chain, producers of livestock were losers this year, partly because they don’t share in the same crop insurance programs offered by the government, and have suffered due to their lack of coverage. One farmer’s corn prices are another farmer’s feed costs, so when the price of the commodity soared, livestock producers were stuck with much higher costs:

In light of these rising costs, livestock producers have had to make some tough decisions. Some have fed their cows candy to cut expenses.

Many have chosen to cut their losses and cull their herds, and the ensuing supply glut has led to depressed prices for livestock. This market surplus of livestock, completely due to the drought of 2012, is temporary and also very likely to be reversed in 2013. The St. Louis Fed reports that consumer food prices are expected to increase by more than 4 percent in 2013, and there have been many reports of a bacon shortage due to the literal ‘overkill’ of livestock.

However, the bleak outlook for livestock producers in 2013 isn't set in stone. The University of Missouri notes that increased acreage and a better growing season for crops could significantly reduce their feed costs.