If we asked you to picture a mountain, you’d probably imagine something that kind of looks like a pyramid, right? It has a broad bottom with rising slopes that narrow to a tiny peak. But it turns out mountains are a lot more varied than we knew—and that's good news for animals that are shifting their ranges to higher elevations to escape rising temperatures caused by global warming.

A new study by ecologists Paul Elsen and Morgan Tingley finds that mountains are more diverse in shape than we thought, with many having more space at higher elevations. This suggests that some animals may fare better the higher they climb.

On a pyramid-shaped mountain, there's limited space and fewer resources for animals the higher they go. As they climb, their numbers will drop. When they finally reach the peak, they'll have no place left to go, and they may go extinct—figuratively pushed off the top.

But when Elsen and Tingley mapped out the relationships between area and elevation for almost 200 mountain ranges around the world, they found that pyramid-shaped mountains are the exception rather than the rule. The researchers discovered a surprising variety of land patterns and quite a bit of space at the top of some mountains. Only about one-third of the mountains they studied had decreased area as the elevation increased. The rest had other topography patterns that the researchers dubbed “inverse pyramid” (area increases with elevation), “diamond” (less area at the top and bottom, more in the middle) and “hourglass” (more area at the top and bottom, less in the middle).

Depending on the mountain, then, climbing higher may not be a death sentence for a species. For example, animals living in the middle ranges of the Himalayas, which have an hourglass pattern, will have plenty more living space when they head into roomier, higher elevations.

Still, others won’t be so lucky. Animals at the bottom of hourglass ranges or the middle of diamond ranges will be squeezing into tighter spaces as they climb, and species already living at the highest elevations have no place else to turn. Plus, a lack of space isn’t the only issue. Some species may be hurt by moving into new habitat types, leaving food sources behind or running into new predators. Elsen and Tingley hope, though, that their findings will help conservationists predict where and when ascending species will be most vulnerable and target their efforts accordingly.