fix writing domain offsets in hdf5