# Is there a interpolation method for cyclic data?

From: Xin Xie <xiexin163_at_nyahnyahspammersnyahnyah>
Date: Tue, 17 Mar 2009 20:58:37 +0800

hi,

I need to interpolate a global SST 2D data with some missing_value in
some grids into a global full distributed gird.
(Yes, to fill in the missing_value on land!) After walking around the
NCL web, I found that linint2 won't give me the solution,
because it generates a missing_value if the input data have
missing_value. I soon figured out a 1D
method to do this ------ choosing a row, picking out all data that are
not missing, and use linint1 to interpolate them onto the
chosen grid.

For example:
u = (-999, -999, 1, 2, -999, -999, 3, 1, 2, -999)
with
lon = (1, 10, 40, 80, 120, 160, 200, 250, 280, 300 )
and -999 is missing_value

I picked up
notmissu = (1, 2, 3, 1, 2)
with
notmisslon=(40, 80, 200, 250, 280)

then I use linint( notmisslon, notmissu, True, lon, 0) to interpolate
the data to a full zonal loop (turn on cyclic).
It now gives me the two missing values on lon 120 and 160 althought
the values on lon 1, 10 and 300
are still missing.

It is obvious that we can use the values on 40 and 280 to interpolate
the value on those three grids.
I wonder if there is a way to do this?