Carbon dioxide and climate over the past 300 Myr