No need to check the -periodicity option by hand.
Clean up the Mahaffy surface gradient code.

Both offsets (I and J) need to be taken care of, so we don't need the
o-loop.