Depth anomalies and the bobbing motion of drifting islands