Image copyright EOS/NTU Image caption The cave retains the deposits washed ashore by huge waves over thousands of years

A cave on the northwestern coast of Sumatra holds a remarkable record of big tsunamis in the Indian Ocean.

The limestone opening, close to Banda Aceh, retains the sandy deposits washed ashore by huge, earthquake-induced waves over thousands of years.

Scientists are using the site to help determine the frequency of catastrophes like the event of 26 December 2004.

This is being done by dating the cave's tsunami-borne sediments, which are easy to see between layers of bat droppings.

Because people thought they had no history of such things, they thought it was impossible Prof Kerry Sieh, Director, Earth Observatory of Singapore

"The tsunami sands just jump right out at you because they're separated by guano layers. There's no confusing the stratigraphy (layering)," explains Dr Jessica Pilarczyk.

"It makes for interesting field work; I'm not going to lie to you. The bats get very excited when people are disrupting their space. But from a geologist's point of view, this cave has the most amazing stratigraphy," she told BBC News.

Dr Pilarczyk was speaking here in San Francisco at the American Geophysical Union (AGU) Fall Meeting, the world's largest annual gathering of Earth scientists.

She is part of a team of researchers - led by Prof Charles Rubin - from the Earth Observatory of Singapore, an institute of Nanyang Technological University that is investigating the coastal history of Indonesia's largest island.

Image copyright EOS/NTU Image caption The tsunami record from about 7,500 to 3,000 years ago is impeccable, say the scientists

Sumatra's proximity to the Indo-Australia and Sunda tectonic plate boundary, and the giant earthquakes that occur there, means its shores are at risk of major inundations.

Understanding how often these occur is important for policy and planning in the region.

Media playback is unsupported on your device Media caption Dr Jessica Pilarczyk: "A complete sequence from about 7,500 years ago up to 3,000 years ago"

The Acehnese cave lies about 100m back from the swash zone at current high-tide. Its entrance is also raised somewhat, and this prevents all waters from getting into the opening - apart from tsunamis and severe storm surges.

Dr Pilarczyk and colleagues have dug trenches through the alternating bands of bat guano and sand to piece together the cave's history.

The scientists know they are looking at tsunami deposits because they can find debris in the sediments of seafloor organisms such as microscopic foraminifera. Only the most energetic waves could have lifted and carried this material into the cave.

Media playback is unsupported on your device Media caption Prof Kerry Sieh: "Earthquakes, tsunamis and volcanic eruptions don’t happen like clockwork"

The investigations are ongoing but the team thinks it can see deposition from perhaps 7-10 tsunamis. The geometry of the cave means these events would likely have been generated by earthquakes of Magnitude 8, or more. By way of comparison, the devastation wrought by 26 December 2004 stemmed from a M9.2 tremor.

Dating the old deposits is obtained by radiocarbon analysis of organic debris caught up in the bands, such as molluscs and pieces of charcoal from old human-lit fires.

Work is under way to date even the insect remains eaten by the bats and now immersed in the guano layers.

Image copyright AP Image caption Scientists say there had probably been nothing like 2004 for at least 500 years

Today, the cave is so full of sand and bat droppings that any new event will essentially overwash and erode the most recent deposits. "The 2004 tsunami completely inundated the cave," comments Prof Rubin.

Nonetheless, the stratigraphy from about 7,500 to 3,000 years ago is impeccable.

"What we think we have is actually a near-complete sequence of late-Holocene deposits. This is amazing because usually the records we have are fragmentary at best. This coastal cave is a unique 'depocentre', and it's giving us a remarkable snapshot of several thousands of years, allowing us to figure out every single tsunami that would have taken place during that time," said Dr Pilarczyk, who is affiliated also to Rutgers University, US.

The team's other investigations along the Acehnese coast are filling in the period from 3,000 years ago to the present.

And the take-home message from all this research is that the biggest tsunamis are not evenly spaced through time. Yes, there can be long periods of quiescence, but you can also get major events that are separated by just a few decades.

Co-investigator Prof Kerry Sieh says this is a cautionary story.

"2004 caught everybody by surprise. And why was that? Because nobody had been looking back to see how often they happen, if they'd ever happened," he told BBC News.

"In fact, because people thought they had no history of such things, they thought it was impossible. Nobody was prepared, nobody had even given it a second thought. So the reason we look back in time is so we can learn how the Earth works and how it might work during our watch."

The cave research also involves scientific input from Syiah Kuala University in Banda Aceh.

Image copyright EOS/NTU Image caption Only the most energetic waves can lift material into the cave

Jonathan.Amos-INTERNET@bbc.co.uk and follow me on Twitter: @BBCAmos