<div dir="ltr"><div><div>This is basic debugging. It is not the size of the arrays, rather the subscripts<br></div><div>that are referencing some location out of range.<br></div><div><br>The error message:<br>fatal:Subscript out of range, error in subscript #1<br>fatal:["Execute.c":7743]:<div>Execute: Error occurred at or near line 28 in file<br></div><br><br> 26 do i=0,nlevels-2<br> 27 ii = ind(apr.ge.levels(i).and.apr.lt.levels(i+1))<br> 28 data2d(i,ii) = apr(ii)<br> 29 labels(i) = levels(i) + ":" + levels(i+1)<br> 30 delete(ii)<br> 31 end do<br><br></div>Well ...... Put prints *before* line 28 printing the values of i and ii. <br><br> ii = ind(apr.ge.levels(i).and.apr.lt.levels(i+1))<br></div> print("i="+i+" ii="+ii) ; basic debug approach<br><div> data2d(i,ii) = apr(ii)<br> <br><div>ii could even be missing ... <br> <br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 9, 2014 at 5:01 AM, Ipsita Putatunda <span dir="ltr"><<a href="mailto:ipsita.putatunda@gmail.com" target="_blank">ipsita.putatunda@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><div>In continuation of my previous mail, I have a little query. <a href="http://www.ncl.ucar.edu/Applications/Scripts/scatter_5.ncl" target="_blank">http://www.ncl.ucar.edu/Applications/Scripts/scatter_5.ncl</a> in the same script I simply tried to see how does it works with npts=56 instead of 300 and the same script is giving the similar error (Subscript out of range, error in subscript #1) as am getting in my script. It is working only with some larger number like 200 and above. Why is it happening? can anyone give me some idea?<br><br></div>Thanks,<br></div>Ipsita<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 9, 2014 at 3:31 PM, Ipsita Putatunda <span dir="ltr"><<a href="mailto:ipsita.putatunda@gmail.com" target="_blank">ipsita.putatunda@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><div><div><div><div><div>Hi all,<br></div> Am doing something similar to <a href="http://www.ncl.ucar.edu/Applications/Scripts/scatter_5.ncl" target="_blank">http://www.ncl.ucar.edu/Applications/Scripts/scatter_5.ncl</a><br></div>this scatter plot. While doing this am getting error:<br><br>fatal:Subscript out of range, error in subscript #1<br>fatal:["Execute.c":7743]:Execute: Error occurred at or near line 28 in file<br><br>I have checked the dimension and size of my array at line 28.<br></div>Which gives :<br><br>Variable: data2d<br>Type: float<br>Total Size: 1568 bytes<br> 392 values<br>Number of Dimensions: 2<br>Dimensions and sizes: [7] x [56]<br>Coordinates: <br>Number Of Attributes: 1<br> _FillValue : 9.96921e+36<br><br>Variable: apr<br>Type: float<br>Total Size: 224 bytes<br> 56 values<br>Number of Dimensions: 1<br>Dimensions and sizes: [56]<br>Coordinates: <br>Number Of Attributes: 1<br> _FillValue : 9.96921e+36<br><br></div>But still am getting the same error. Any help will be appreciated.<br>My script is attached herewith.<br><br></div>Thanks in advance,<br></div>Ipsita<br><div><div><div><br><br><br></div></div></div></div>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>