# [ncl-talk] linint2 interpolation

Rick Brownrigg brownrig at ucar.edu
Mon Jul 1 20:18:05 MDT 2019

```Hi Micah,

I don't know why you are seeing this behavior, but I would note that there
is language in the docs to linint2 to the effect that xi/yi and xo/yo need
to be monotonically *increasing*:

newlat = fspan(51.5,6.,274)

http://ncl.ucar.edu/Document/Functions/Built-in/linint2.shtml

Perhaps that might provide some insights.

Rick

On Mon, Jul 1, 2019 at 8:10 PM Micah Sklut via ncl-talk <ncl-talk at ucar.edu>
wrote:

> Hi,
>
> I am having trouble with the linint2 function.
>
> Here is the code I am using:
>
> u = f[:]->UGRD_P0_L103_GLL0(:,154:336,904:1212)
> lat = f[0]->lat_0(154:336)
> lon = f[0]->lon_0(904:1212)
>
> newlat = fspan(51.5,6.,274)
> newlon = fspan(226.,303.,463)
> newu = linint2(lon,lat,u,False,newlon,newlat,0)
>
> if I print u, i get:
> (0,0)   1.502375
> (0,1)   1.112375
> (0,2)   0.8723755
> (0,3)   0.8623755
> ...
>
> if i print newu, i get:
>   _FillValue :  1e+20
> (0,0)   1.502375
> (0,1)   1e+20
> (0,2)   1e+20
> (0,3)   0.8723755
> (0,4)   1e+20
> (0,5)   1e+20
> (0,6)   0.8523754
>
> I haven't been able to figure out why the fill value is being inserted in
> the values that should be interpolated.
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190701/04256e32/attachment.html>
```