I am seeing NaNs when I try to generate a restart and OBCs from CMEMS data. I suspect they arise here. The function is quite hard to follow, and there are some bits that don't look right. For example, xv and yv here go unused.
I suspect my issue arises when trying to interpolate onto points that lie within masked grid cells on the coarser CMEMS grid. There is code that looks like it is trying to handle these "internal points", but perhaps something is going wrong. As an alternative, it might be better to fill all masked points on the coarse grid in advance (or within PyFVCOM). One could do this fairly easily using various interpolation methods. One could also consider using PyLag to handle the interpolation. One possible advantage here is that one could interpolate on the sphere in geographic coordinates, although it would introduce a new package dependency.