Predicting coral dynamics through climate change