In this Aug. 8, 2016 photo, Geoffrey Hargreaves, curator of the National Ice Core Laboratory, carries an arctic ice core inside the minus-33 degree Fahrenheit environment of the lab's archive warehouse, in Lakewood, Colo. Using a wide range of data, from ice cores to trace gas analysis and other methods, scientists are attempting to measure the past and present so they can better model the near and distant future of our planet. (AP Photo/Brennan Linsley)

Inside a huge walk-in freezer in suburban Denver, a college student in a thick parka shoots a jolt of electricity through a yard-long column of ice extracted from Antarctica.

Just outside the freezer, in a much warmer room, a computer wired to the ice registers a sudden spike in a jagged red line crawling across the screen.

"Hey, we got a volcano," says T.J. Fudge, a University of Washington researcher. The electric current has detected a thin layer of volcanic residue in the ice, deposited by an eruption about 8,000 years ago.

This is the National Ice Core Laboratory in Lakewood, where ice pulled from the depths of Antarctica and Greenland is sliced up, photographed and tested. Most of it is shipped to other labs, where researchers do more experiments looking for clues about Earth's past and future.

Smooth and milky white, the 4- to 5-inch-diameter pieces—called ice cores—provide scientists with a wealth of historical information, from air temperature to greenhouse gases to evidence of cosmic events. The record reaches as far back as 800,000 years.

The ice is the remnant of centuries of snowfall, compressed by the weight of successive years of accumulation.

"You can drill into it, and it's much like looking at tree rings," Fudge said. "It's just year after year after year of climate information that's preserved out in the ice sheet."

This Aug. 8, 2016 photo shows some of the thousands of frozen ice cores stored in canisters inside the minus-33 degree Fahrenheit environment of the archive warehouse at the National Ice Core Laboratory, in Lakewood, Colo. At this facility, ice pulled from the depths of Antarctica and Greenland is sliced up, photographed and tested. (AP Photo/Brennan Linsley)

Specialized drilling rigs pull the cores from as deep as 9,800 feet below the surface of the ice sheets. Crews then tuck them into protective tubes, pack them in chilled containers and ship them to the U.S. Refrigerated trucks haul them to Colorado lab, which is funded by the National Science Foundation.

In a bustling, white-walled workroom in the Lakewood freezer—kept at about minus 11 Fahrenheit—workers push the cores through a series of saws on metal frame benches, divvying up the ice according to a prearranged pattern for different experiments.

Part of every ice core is archived in another, larger room at about minus 33 degrees, so future researchers can verify old results or try new tests. The archive contains nearly 56,000 feet of ice.

Scientists tease data from the ice in various ways. Differences in the weight of molecules in the frozen water hold clues about the air temperature at the time the snow fell.

Air trapped in bubbles can be analyzed to measure how much carbon dioxide and other gases were in the atmosphere when the ice formed.

A solar flare or other cosmic events can leave distinctive radioactive atoms on the snow. Dust blown in from distant continents offers clues about atmospheric circulation.

This Aug. 8, 2016 photo shows some of the thousands of frozen ice cores stored in canisters inside the minus-33 degree environment of the archive warehouse at the National Ice Core Laboratory, in Lakewood, Colo. Ice cores have led scientists to significant conclusions about climate, including that CO2 levels in the atmosphere today are higher than at any other time recorded in the ice. (AP Photo/Brennan Linsley)

"The ice sheets are in direct contact with the atmosphere," said Mark Twickler, the lab's science director. "Everything that's in the atmosphere we capture as time goes by, and it gets buried in snow."

The depth of the core and evidence of volcanoes help determine how old the ice is.

Scientists already know when major eruptions occurred, so a layer of volcanic residue indicates the year the adjacent ice formed. That becomes a reference point for annual layers above and below.

The record is remarkably precise, even reflecting seasonal changes, scientists say.

"It's as if we're standing on the ice sheet writing down the temperature for the last 800,000 years," said Bruce Vaughn, a University of Colorado-Boulder lab manager who works with the ice. "It's that good."

Without a record of its depth and age, the ice has little research value, said Geoffrey Hargreaves, curator of the Lakewood lab.

In this Aug. 8, 2016 photo, Geoffrey Hargreaves, curator of the National Ice Core Laboratory, gently places an arctic ice core on a table inside the deep freeze work area at the lab, in Lakewood, Colo. A solar flare or other cosmic events can leave distinctive radioactive atoms on the snow. Dust blown in from distant continents offers clues about atmospheric circulation. (AP Photo/Brennan Linsley)

"An ice core without any depth references—I shouldn't say this—it's good for margaritas," he said, poker-faced.

No, Hargreaves said, scientists don't actually do that.

"There's drill fluids in these things that you really don't want to drink," he said.

Some experiments are done only on ice from the core's interior, away from the fluids.

Ice cores have led scientists to significant conclusions about climate, including that CO2 levels in the atmosphere today are higher than at any other time recorded in the ice.

"The only reason we can make that statement is because we have the ice core air archived," said Murat Aydin, a researcher at the University of California-Irvine.

In this Aug. 8, 2016 photo, Geoffrey Hargreaves, curator of the National Ice Core Laboratory, walks from one area to another inside the deep freeze work area at the lab, in Lakewood, Colo. Using a wide range of data, from ice cores to trace gas analysis and other methods, scientists are attempting to measure the past and present so they can better model the near and distant future of our planet. (AP Photo/Brennan Linsley)

Ice cores also help refine computer models used to make climate predictions.

"If we run them backwards with the parameters that we measure in the ice core and we get it right, that gives us a lot more confidence in the climate models going forward," Vaughn said.

As technology improves, researchers find new ways to analyze the ice. A technique called continuous flow analysis lets them slowly melt a one-yard stick of ice and analyze it drop-by-drop, instead of cutting it into small pieces, melting them one-by-one and averaging the results. The new technique gives scientists up to 2,400 measurements per yard instead of 20, Vaughn said.

"There'll be science for dozens of years with researchers who are maybe only now getting their degrees or learning about this," Vaughn said. "It's exciting. How could you not be excited about it?"

© 2016 The Associated Press. All rights reserved.