The more sedentary dolphins and porpoises seldom run into these difficulties. They presumably become familiar with all the small local anomalies and so build up a much more detailed magnetic map of the area in which they live. How toothed whales detect and respond to such minute local variations in geomagnetism remains a mystery, but Klinowska's magnetic highway theory is the best model we have to explain why these whales mass strand. Dozens or even hundreds of apparently healthy Pilot Whales simultaneously beach themselves and die. Certain beaches around the world are repeatedly witness to these mysterious events.
Recent evidence suggests that toothed whales have a built-in compass sense.