Volcanism and glaciation during the past 40 millennia