functions for interpolating from and to staggered grid