<div dir="ltr">Thank you very much Rick and Dennis. This worked. </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 1, 2019 at 10:37 PM Dennis Shea <<a href="mailto:shea@ucar.edu">shea@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Rick is correct.</div><div><br></div><div>Based in the variable name ["UGRD_P0_L103_GLL0"], the source is a GRIB file from (say) NCEP. Typically, these are ordered North->South. linint2 want South-to-North ordering.</div><div><br></div><div>--</div><div>[1] Good programming practice would be to <b>*not* </b>use hard-wired index values.</div><div><br></div><div>I suggest using NCL's coordinate subscripting <b>{...}</b>.<br></div><div><br></div><div>latS = ...</div><div>latN = ...</div><div>lonW = ...</div><div>lonE = ...<br></div><div>u = f[:]->UGRD_P0_L103_GLL0(:,<b>{latS:latN},{lonW:lonE}</b>)<br>lat = u&lat_0<br>lon = u&lon_0</div><div><br></div><div><b>printVarSummary</b>(u) ; look at the output and ordering</div><div> ; the variable will be Sout-to-North<br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 1, 2019 at 8:21 PM Rick Brownrigg via ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Micah,<div><br></div><div>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*:</div><div><br></div><div> newlat = fspan(51.5,6.,274)<br></div><div><br></div><div> <a href="http://ncl.ucar.edu/Document/Functions/Built-in/linint2.shtml" target="_blank">http://ncl.ucar.edu/Document/Functions/Built-in/linint2.shtml</a><br></div><div><br></div><div>Perhaps that might provide some insights.</div><div><br></div><div>Rick</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 1, 2019 at 8:10 PM Micah Sklut via ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi, <div><br></div><div>I am having trouble with the linint2 function. </div><div><br></div><div>Here is the code I am using: </div><div><br></div>u = f[:]->UGRD_P0_L103_GLL0(:,154:336,904:1212)<br>lat = f[0]->lat_0(154:336)<br>lon = f[0]->lon_0(904:1212)<div><br>newlat = fspan(51.5,6.,274)<br>newlon = fspan(226.,303.,463)<br>newu = linint2(lon,lat,u,False,newlon,newlat,0)<div><div><br></div><div>if I print u, i get: </div>(0,0) 1.502375<br>(0,1) 1.112375<br>(0,2) 0.8723755<br>(0,3) 0.8623755<div>...</div><div><br></div><div>if i print newu, i get: </div> _FillValue : 1e+20<br>(0,0) 1.502375<br>(0,1) 1e+20<br>(0,2) 1e+20<br>(0,3) 0.8723755<br>(0,4) 1e+20<br>(0,5) 1e+20<br>(0,6) 0.8523754</div><div><br></div><div>I haven't been able to figure out why the fill value is being inserted in the values that should be interpolated. </div><div><br></div><div>Thanks for your suggestions. <br><div><br></div></div></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Micah Sklut<br><br></div>