Store spacing with scalar and gradient grids.