Plate motions and the geomagnetic field -- I. Quaternary and late Tertiary