Using the sunspot cycle to date ice cores