Scientists have used 'tree rings' in coral to identify centuries of stress.