fixing some bugs with lon/lat in space gridding