Ice cores drilled from the ice sheets of Greenland and Antarctica are among the most valuable records of the Earth's past climate. As snow accumulates year after year and is compressed into ice, it traps tiny bubbles of air. By analysing the gases in these bubbles, scientists can measure the concentration of carbon dioxide and methane in the atmosphere at the time the snow fell. The chemical composition of the ice itself, in particular the ratio of different forms of oxygen, also reveals the temperature at which the snow formed. The longest Antarctic cores extend back about eight hundred thousand years, covering several cycles of ice ages and warmer periods. These records show a close relationship between greenhouse gas levels and temperature over that time. They also show that current carbon dioxide concentrations are far higher than at any point in the record. Ice cores contain other information as well: layers of volcanic ash can be matched to known eruptions, which helps to date the ice, and dust levels indicate how dry and windy the climate was. However, the method has limits. In areas where little snow falls, individual years cannot be distinguished, and the deepest ice can be distorted as it flows over the bedrock.