Optimized cropping patterns under climate-change conditions