Redwood trees may shed light on coastal conditions thousands of years ago.

According to new research by University of Washington climatologist Jim Johnstone, molecules in a redwood tree trunk reflect climate changes experienced throughout the tree’s lifetime.

“This is really the first time that climate reconstruction has ever been done with redwoods,” Johnstone said in a statement about the study published in the Journal of Geophysical Research-Biogeosciences.

Redwoods, one of the world’s tallest trees, are native to California and Oregon. They suck up moisture caused by the oceans and atmosphere that surrounds them. Johnstone played on this feature by tracing back climate patterns in the past 50 years.

“Redwoods are restricted to a very narrow strip along the coastline,” Johnstone said. “They’re tied to the coastline, and they’re sensitive to marine conditions, so they actually may tell you more about what’s happening over the ocean than they do about what’s happening over land.”

He found that the proportions of oxygen and carbon in the wood correlated with weather data from five decades ago, which led him to the theory that the same method could be used to determine climate changes that took place thousands of years ago, since some redwoods can have 2,000-year lifespans, Discovery News reports.

“These trees have just been sitting there, recording information about the year-to-year climate,” Johnstone told NPR. “And it gives us hope that these trees can tell us things about the climate going back maybe a thousand years or more.”

Rather than counting the rings around the redwood’s trunk -- which would yield inaccurate results since the rings on redwoods are uneven --  the new method allows scientists to measure how much oxygen is trapped in the wood from both rain and fog.

Two different forms of oxygen were measured: O-16 and O-18. Johnstone and his team looked at spring growth between April to June as well as fall growth from August to October. The results showed that the proportion of both kinds of oxygen matched with weather data during the past 50 years.

“We actually have two indicators that we can use in combination to determine if a particular summer was foggy with a little rain, foggy with a lot of rain, and various combinations of the two,” Johnstone explained.

Since fog is related to ocean surface temperature, the method could reveal long-term ocean change patterns and distinguish between manmade and natural climate change.

“It’s possible that the redwoods could give us direct indication of how that’s worked over longer periods,” Johnstone said. “This is just a piece that contributes to that understanding in a pretty unique place.”