<div dir="ltr">Hi Dennis,<div> Thanks for your reply. But instead of my own script I have tried the ncl script <a href="http://www.ncl.ucar.edu/Applications/Scripts/scatter_5.ncl">http://www.ncl.ucar.edu/Applications/Scripts/scatter_5.ncl</a>,</div><div>where I didn't change anything except the npts from 300 to 56,and then run the script which is also giving similar error message.Why is it so? I didn't even change a single letter in the script scatter_5.ncl except the array size. Though may be am wrong but this seems to me it is depending upon the array size.</div><div><br></div><div>In my own script if I am debugging as per your suggestion it is giving</div><div><br></div><div> "warning:Argument 0 of the current function or procedure was coerced to the appropriate type and thus will not change if the function or procedure modifies its value</div><div>fatal:Dimension size mismatch on subscript #1, left-hand and right-hand side dimensions do not match"</div><div>it is clear that data2d(i,ii) and apr(ii) have different dimensions, but I need to make a two dimensional array data2d as per the scatter_5.ncl script using apr(ii). Could you please suggest if there is some way to do it.</div><div><br></div><div>Thanks in advance,</div><div>Ipsita</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 9, 2014 at 6:10 PM, Dennis Shea <span dir="ltr"><<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</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>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:<span class=""><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></span> 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"><div><div class="h5">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></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><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><div><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></div></div>_______________________________________________<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>
</blockquote></div><br></div>