Scientists have learned a lot about Mars in recent years, and based on observations from the fancy hardware NASA has sent to the Red Planet we know that it once held far more water than we see today. But knowing there was lots of water (or at least abundant ice) on Mars long ago doesn’t necessarily tell us what the climate was like.

Without a time machine, we can’t know exactly what ancient Mars looked like, but researchers have come up with a pretty solid guess. Using data from NASA’s CRISM spectrometer and the Curiosity rover, scientists have a good idea of what kinds of minerals are present in the Martian soil. Using various areas of Earth as analogs, they can observe the conditions that caused similar mineral deposition patterns on our planet and assume that similar climates were responsible for their formation on Mars as well.

At the Goldschmidt Geochemistry Conference in Barcelona this week, Purdue University professor Briony Horgan announced the findings of a new research effort that draws comparisons between the climate of present-day Earth with that of ancient Mars.

“Our study of weathering in radically different climate conditions such as the Oregon Cascades, Hawaii, Iceland, and other places on Earth, can show us how climate affects pattern of mineral deposition, like we see on Mars,” Horgan said. “This leads us to believe that on Mars 3 to 4 billion years ago, we had a general slow trend from warm to cold, with periods of thawing and freezing.”

The study dives deep into the nuances of various mineral deposits such as silica, which the scientists believe hints at melting ice. This suggests that the planet had some ups and downs with regard to temperature, with warm periods characterized by occasional rains and then colder periods where everything was frozen.

Mars today is frigid compared to Earth, and that’s largely owed to the fact that the planet’s atmosphere has been almost entirely stripped away. Billions of years ago, the planet is thought to have had a much more robust atmosphere which would have aided in it retaining heat. A temperate climate with rain and flowing water certainly sounds like a recipe for life as we know it, but we may have to wait and see what the Mars 2020 rover has to say about that once it arrives in early 2021.