Climate change effects on agricultural yields will be uneven over the world. A few countries, mostly in high latitudes, may experience gains, while most will see average yield decrease. This paper aims to quantify the role of market-mediated adjustments in attenuating the effects of climate change by allowing the expression of the new climate-induced pattern of comparative advantages within and between countries. To do this, we develop a quantitative general equilibrium trade model where the representation of land use choice is inspired from modern Ricardian trade models. We use spatially explicit information from the agronomic literature about potential yields before and after climate change for calibration and counterfactual simulations. The results show that the climate-induced yield changes generate large price movements that incentivize adjustments in production and trade. Both production and trade adjustments contribute to reducing welfare losses globally, with production adjustments making the larger contribution.