Czech and German researchers studied 70 dogs during 1,893 defecations and 5,582 urinations over the course of two years, and found that when the Earth's magnetic field was stable the dogs chose to align themselves with it. When it was unstable, such as during a solar flare, the dogs would become confused.
Their findings, published in the journal Frontiers in Zoology, show that the dogs were sensitive to the polarity of the field, though not as much to its intensity.
Dogs on leashes, however, do not consistently align themselves as such, mainly doing so when they are free to choose. Researchers are yet to figure out why dogs exhibit this preference.
Other animals have been found to exhibit similar behavior. Many of the scientists who worked on this study had previously researched similar behavior seen in common carps. They found that the common carp also used geomagnetic lines to align themselves in a north-south direction. The results of this study were published in PLOS ONE.
[Frontiers in Zoology]