To do masked interpolation correctly, you will need a field that defines the landmask of the input data. If you look at any of the Vtables, we name the landmask field from the incoming data LANDSEA. You need a pair of these landmask fields to do masked interpolation properly. If you do not yet have a landmask field from your data, you should create one and call it LANDSEA. You can use this as a constant input for metgrid (use the namelist variable constants_name). Then in your METGRID.TBL, you should set (using SST as an example):
name=SST
interp_option=nearest_neighbor
masked=land
#masked=both
#interp_land_mask=LANDMASK(1)
interp_mask = LANDSEA(1)
fill_missing=273.
flag_in_output=FLAG_SST
In addition, if your SST is masked by some unique value over land (such as e-30), then having a landmask field is important. Having a matching landmask field for the SST is properly interpolated along water/land boundaries.
name=SST
interp_option=nearest_neighbor
masked=land
#masked=both
#interp_land_mask=LANDMASK(1)
interp_mask = LANDSEA(1)
fill_missing=273.
flag_in_output=FLAG_SST
In addition, if your SST is masked by some unique value over land (such as e-30), then having a landmask field is important. Having a matching landmask field for the SST is properly interpolated along water/land boundaries.