2

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.

4
  • Just go in your interpolation output and manually change the boundary regions to whatever behavior you want (apparently not a gradient)?
    – Vlo
    May 20, 2015 at 20:10
  • @Vlo Thanks for the response. Changing the output of the interpolation wouldn't help, as the values near the boundary have already been calculated according to my choice of NA value.
    – Dan
    May 20, 2015 at 20:15
  • I'm saying that you can change those calculated values to whatever you desire.
    – Vlo
    May 20, 2015 at 20:18
  • But I don't know what those values should be. Indeed, I'm performing an interpolation to calculate what values on my grid should be, including those at the boundary.
    – Dan
    May 20, 2015 at 20:24

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.