<div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Debasish,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">The linint2 routine requires that your lat/lon arrays be monotonically increasing. In the icecvr7 variable, the latitudes are decreasing:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><div class="gmail_default"><font face="monospace, monospace">Variable: icecvr7</font></div><div class="gmail_default"><font face="monospace, monospace">Type: float</font></div><div class="gmail_default"><font face="monospace, monospace">Total Size: 260640 bytes</font></div><div class="gmail_default"><font face="monospace, monospace"> 65160 values</font></div><div class="gmail_default"><font face="monospace, monospace">Number of Dimensions: 2</font></div><div class="gmail_default"><font face="monospace, monospace">Dimensions and sizes:<span style="white-space:pre"> </span>[lat_0 | 181] x [lon_0 | 360]</font></div><div class="gmail_default"><font face="monospace, monospace">Coordinates: </font></div><div class="gmail_default"><font face="monospace, monospace"> lat_0: [-90..90] <---------------------------------</font></div><div class="gmail_default"><font face="monospace, monospace"> lon_0: [ 0..359]</font></div><div class="gmail_default"><br></div><div class="gmail_default">I see that you went through some trouble to reverse the latitude array by creating a new one, but the problem is that only the latitude array was reversed, and not the lat dimension of the icecvr7 variable, which is also required.</div><div class="gmail_default"><br></div><div class="gmail_default">To reverse a dimension, you can simply use the ::-1 syntax:</div><div class="gmail_default">
<p class="gmail-p1"><font face="monospace, monospace"><span class="gmail-s1"><span class="gmail-Apple-converted-space"> </span>icecvr7 = e1</span><span class="gmail-s2">-></span><span class="gmail-s1">ICEC_P0_L1_GLL0(::-1,:) </span><span class="gmail-s3">; reverse the latitudes <span class="gmail-Apple-converted-space"> </span></span></font></p><p class="gmail-p1">This will have the effect of reversing both the latitude coordinate array, *and* the leftmost dimension of icecvr7 at the same time.</p><p class="gmail-p1">When using linint2, you also need to create the output latitudes as increasing as well:</p><p class="gmail-p1">
</p><p class="gmail-p1"><font face="monospace, monospace"><span class="gmail-s1"><span class="gmail-Apple-converted-space"> </span>newlat = </span><span class="gmail-s2">fspan</span><span class="gmail-s1">(-89.75,89.75,360)</span></font></p><p class="gmail-p1">Your linint2 section will now look like this:</p><p class="gmail-p1"><font face="monospace, monospace"> icecvr7 = e1->ICEC_P0_L1_GLL0(::-1,:) ; reverse the latitudes </font></p><p class="gmail-p1"><font face="monospace, monospace"> newlat = fspan(-89.75,89.75,360)<br> newlon = fspan(0.25, 359.75, 720)<br> newlat@units = "degrees_north"<br> newlon@units = "degrees_east"<br></font></p><p class="gmail-p1"><font face="monospace, monospace"> new_icecvr7 = linint2(icecvr7&lon_0,icecvr7&lat_0,icecvr7,True,newlon,newlat,0)</font></p><p class="gmail-p1">If you need for new_icecv7 to be north-to-south in the latitude dimension, then use ::-1 again. For plotting, however, it doesn't matter which direction the latitudes are going:</p><font face="monospace, monospace">new_icecvr7 = new_icecvr7(::-1,:)</font>
</div><br>The rest of the code should be fine and you should get the attached plot.<br><br>-Mary<div class="gmail_default"><font face="monospace, monospace"><br></font></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 26, 2017 at 8:40 AM, Debasish Hazra <span dir="ltr"><<a href="mailto:debasish.hazra5@gmail.com" target="_blank">debasish.hazra5@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div><div>I am trying to interpolate ice cover from 1 degree to 0.5 degree using "<span lang="EN">linint2", but the attached plot shows near empty field after interpolation. Do I need to use different interpolations for the data set. Attached is ncl plot and resulting figure. I have uploaded data file "ocnf2015040900.grb2" in ftp server. Any help.</span></div><div><span lang="EN"></span><br></div><div><span lang="EN">Thanks.</span></div><span class="HOEnZb"><font color="#888888"><div><span lang="EN">Debasish</span></div></font></span></div>
<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">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/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>