There wasn’t just water on Mars in the planet’s past; there was rain — heavy rain. Researchers say downpours played a huge role in shaping the Martian surface. A study in the journal Icarus found craters on Mars changed over time as rainfall hit the surface harder and harder, and wore away at the ground.

For their analysis, the researchers calculated how fast and hard the raindrops hit the surface based on factors like gravity and atmospheric pressure. Those factors also determine how large the raindrops were. When the data are taken together, the study says, they show at a certain point in Martian history, the atmosphere would have been just the right pressure for stormwater runoff to erode craters and change the topography of the surface.

Read: How Much Air Has Mars Lost to Space with Climate Change?

“Early on in the planet’s existence, water droplets would have been very small, producing something like fog rather than rain,” journal publisher Elsevier explained. That’s because of its thicker atmosphere, which it had when it formed about 4.5 billion years ago. That fog would not have done much on the planet’s surface.

But as the atmosphere slowly disappeared, the raindrops got bigger and heavier, the study found. Eventually, the water saturated the soil in such a way that it could channel through the surface and create the valleys that look like rivers of red dirt on its surface, the ones we see in satellite images of the planet.

It does not rain on Mars anymore, but the marks from past rainstorms remain.

Elsevier noted scientists on the project, geologists from the Smithsonian Institution and Johns Hopkins University, used what they know about how rain falls on Earth and carves out the landscape and applied that to our neighboring planet.

“By using basic physical principles to understand the relationship between the atmosphere, raindrop size and rainfall intensity, we have shown that Mars would have seen some pretty big raindrops that would have been able to make more drastic changes to the surface than the earlier fog-like droplets,” John Hopkins University’s Ralph Lorenz said in the statement. He has also studied rain on Titan, a moon of Saturn that is the only place in the solar system other than Earth where rain still falls, although the rain there is liquid methane rather than water.

Read: NASA Rover Studies Wind and Sand Dunes on Mars

It might be hard to imagine Mars with a thick atmosphere, but it used to look a lot different from what it is today. Scientists have estimated the current thin atmosphere on Mars, which is mostly carbon dioxide, is only about a third of what it used to be. The loss of atmospheric gas to space would have transformed Mars from a possibly wet and warm planet — which could have hosted life — into the cold, dry one it is now.

When it comes to investigating Mars’ past, “there will always be some unknowns, of course, such as how high a storm cloud may have risen into the Martian atmosphere, but we made efforts to apply the range of published variables for rainfall on Earth,” the Smithsonian Institution’s Robert Craddock said. “It’s unlikely that rainfall on early Mars would have been dramatically different than what’s described.”