Modified hdiff.F from swap4d to swap3d