Research could help to predict approaching ecological catastrophes.