Many rock formations show repeating patterns of strata. For example, clay layers may alternate with sandstone layers; or carbonate layers alternate with shales. This is usually caused by repeating cycles of climate. In warmer times the sea rises, and carbonate rocks are deposited in shallow subtropical seas. Later, ice builds up at the poles and the sea level drops. Then the same area is close to shore, and gets sand and mud washed down by rivers.