<br><div>
Sorry Dennis, I messed up with the link and didn't check it before clicking "send"...</div><div><br></div><div>I checked my arrays with the function you suggested. It turns out that both are monotonic, one decreasing and the other increasing.</div><div><br></div><div>(0) xi=1<br>(0) xo=-1<br></div><div><br></div><div>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. <br></div><div><br></div><div>Thanks for your help,</div><div>Giorgio<br></div>
<blockquote>
----Messaggio originale----
<br> Da: shea@ucar.edu
<br> Data: 5-giu-2019 18.41
<br> A: "Giorgio Graffino"<g.graffino@tim.it>
<br> Cc: "Ncl-talk"<ncl-talk@ucar.edu>
<br> Ogg: Re: [ncl-talk] Interpolation error using linint1_n
<br>
<br>
<div dir="ltr">
<div>
[1] linint1_n is a
<b>Built-In</b> library function. It is not in the Contributed library as you indicated:
<br>
</div>
<div>
<a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/linint1_n.shtml"><b>http://www.ncl.ucar.edu/Document/Functions/Built-in/linint1_n.shtml</b></a>
</div>
<div>
<br>
</div>
<div>
[2] Both xi and xo must monotonic:
</div>
<div>
<br>
</div>
<div>
h
<a href="invalidurl.gif"><b>ttp://www.ncl.ucar.edu/Document/Functions/Contributed/isMonotonic.shtml</b></a>
</div>
<div>
<br>
</div>
<div>
print("xi="+
<b>isMonotonic</b>(xi))
</div>
<div>
print("xo="+
<b>sMonotonic</b>(xo))
</div>
<div>
<br>
</div>
<div>
<br>
</div>
<div>
<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">
On Wed, Jun 5, 2019 at 9:26 AM Giorgio Graffino <
<a href="javascript:handleMailto('mailto:g.graffino@tim.it');return false;">g.graffino@tim.it</a>> wrote:
<br>
</div>
<blockquote class="gmail_quote" style="margin: 0.0px 0.0px 0.0px 0.8ex;border-left: 1.0px solid rgb(204,204,204);padding-left: 1.0ex;">
<div>
Dear NCL people,
</div>
<div>
I want to report a (potential) error in the documentation.
</div>
<div>
<br>
</div>
<div>
While looking at how to interpolate a monotonically decreasing dimension from a 2D variable onto another, I found the linint1 functions (
<a href="https://www.ncl.ucar.edu/Document/Functions/Contributed/linint1_n.shtml">https://www.ncl.ucar.edu/Document/Functions/Contributed/linint1_n.shtml</a>). 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
</div>
<div>
<br>
</div>
<div>
warning:linint1_n: xi and xo must be monotonically increasing
</div>
<div>
<br>
</div>
<div>
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?
<br>
</div>
<div>
<br>
</div>
<div>
Cheers,
</div>
<div>
Giorgio
<br>
</div>_______________________________________________
<br> ncl-talk mailing list
<br>
<a href="javascript:handleMailto('mailto:ncl-talk@ucar.edu');return false;">ncl-talk@ucar.edu</a>
<br> List instructions, subscriber options, unsubscribe:
<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a>
<br>
</blockquote>
</div>
<br>
</blockquote>
<br>