[ncl-talk] Interpolation error using linint1_n

Dennis Shea shea at ucar.edu
Fri Jun 7 10:43:05 MDT 2019


The documentation has been altered:

https://www.ncl.ucar.edu/Document/Functions/Contributed/linint1_n.shtml

THX
D

On Fri, Jun 7, 2019 at 10:15 AM Giorgio Graffino <g.graffino at tim.it> wrote:

>
> Sorry Dennis, I messed up with the link and didn't check it before
> clicking "send"...
>
> I checked my arrays with the function you suggested. It turns out that
> both are monotonic, one decreasing and the other increasing.
>
> (0)    xi=1
> (0)    xo=-1
>
> Perhaps this is the problem: both xi and xo must be either increasing or
> decreasing. In a mixed case, the function fails. To confirm that, I ran the
> script with reversed xi (so both xi and xo are monotonically decreasing)
> and it went through with no problems.
>
> Thanks for your help,
> Giorgio
>
> ----Messaggio originale----
> Da: shea at ucar.edu
> Data: 5-giu-2019 18.41
> A: "Giorgio Graffino"<g.graffino at tim.it>
> Cc: "Ncl-talk"<ncl-talk at ucar.edu>
> Ogg: Re: [ncl-talk] Interpolation error using linint1_n
>
> [1] linint1_n is a *Built-In* library function. It is not in the
> Contributed library as you indicated:
> *http://www.ncl.ucar.edu/Document/Functions/Built-in/linint1_n.shtml*
> <http://www.ncl.ucar.edu/Document/Functions/Built-in/linint1_n.shtml>
>
> [2] Both xi and xo must monotonic:
>
> h
> *ttp://www.ncl.ucar.edu/Document/Functions/Contributed/isMonotonic.shtml*
> <http://invalidurl.gif>
>
> print("xi="+ *isMonotonic*(xi))
> print("xo="+ *sMonotonic*(xo))
>
>
>
>
> On Wed, Jun 5, 2019 at 9:26 AM Giorgio Graffino < g.graffino at tim.it>
> wrote:
>
>> Dear NCL people,
>> I want to report a (potential) error in the documentation.
>>
>> While looking at how to interpolate a monotonically decreasing dimension
>> from a 2D variable onto another, I found the linint1 functions (
>> https://www.ncl.ucar.edu/Document/Functions/Contributed/linint1_n.shtml).
>> It is said that the relevant dimension "must be strictly monotonically
>> increasing or decreasing". However, when I run the function no output
>> variable is created and the following warning appears
>>
>> warning:linint1_n: xi and xo must be monotonically increasing
>>
>> I'm using NCL 6.3.0 (quite old, I know) on a Linux cluster. Could it be
>> the reason why a monotonically decreasing dimension is not accepted? Or is
>> the documentation wrong?
>>
>> Cheers,
>> Giorgio
>> _______________________________________________
>> 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/20190607/88d53924/attachment.html>


More information about the ncl-talk mailing list