New mathematical method shows how climate change led to fall of ancient civilization