Scientists are turning to a new source to better understand the life of a whale: its earwax.

Called "the tree rings of the ocean," whales' earplugs are sealed off from the external environment and remain in place, slowly accumulating over the years, throughout the entirety of the animal's life.

Knowing this, a team of researchers led by Baylor University's Sascha Usenko began to wonder if whale earwax could possibly contain a history of its environment, among other things.

Seeking an answer, the scientists analyzed carefully analyzed the waxy buildup lodged inside the ear of a deceased blue whale, carefully slicing each layer using an ultrafine-toothed band saw, ABC Science reported. Because whales produce two new layers of wax every year, the discovery of 24 distinct layers suggested the whale was 12 years old when it died.

Sampling each layer, the researchers found fluctuating levels of testosterone and the stress hormone cortisol. The wax further revealed that, during the first year of its life, the whale accumulated substantial levels of long-lasting organic pollutants, including pesticides and flame retardants, many of which have been banned for at least a decade. Mercury levels in the animal spiked twice during the animal's life.

And while the whale under examination lived a relatively short life, Usenko hypothesizes that by examining earplugs going back further in time, scientists can gain access into a never-before-seen record not only of many whales' personal story, but the story of the ocean itself going back decades in time.

"We are able to go back in time and [analyze] archived museum earplug samples that were harvested in the 1950s and examine critical issues such as the effects of pollution, use of sonar in the oceans and the introduction of specific chemicals and pesticides in the environment over long periods of time," he said.

There is one drawback to this method, Usenko admits.

"It doesn't necessarily smell great," he told the Los Angeles Times. "When we were pulling it out, some of the crew actually just left."

The study was published in the Proceedings of the National Academy of Sciences.