I have an irregularly spaced set of points and values at these coordinates that represent the sea-surface temperature throughout the ocean. I'm using interp
from the akima
package in R to project these onto a regularly space grid.
My code is working just peachy with the exception of NA values that represent land. I could replace these values with a place holder (e.g., -1) or remove them entirely, but either approach causes problems. The former case creates anomalous gradients that throw off the interpolation in the coastal ocean, while the latter smears out values at the shoreline. Is there a standard way of dealing with boundaries when performing interpolations like this? Any suggestions would be appreciated.