<div dir="ltr"><div>Hi,</div><div> With the suggestion by Dennis I have modified my script, and the output is coming like:</div><div><br></div><div><div>(0) i=0 levels(i)=0 levels(i+1)=2</div><div>(0) i=0 nii=44</div><div>(0) i=1 levels(i)=2 levels(i+1)=4</div><div>(0) i=1 nii=5</div><div>(0) i=2 levels(i)=4 levels(i+1)=6</div><div>(0) i=2 nii=1</div><div>(0) i=3 levels(i)=6 levels(i+1)=8</div><div>(0) i=3 nii=2</div><div>(0) i=4 levels(i)=8 levels(i+1)=10</div><div>(0) ii has missing values: ii=-2147483647</div><div>(0) i=5 levels(i)=10 levels(i+1)=12</div><div>fatal:Number of dimensions on right hand side do not match number of dimension in left hand side</div><div>fatal:["Execute.c":7743]:Execute: Error occurred at or near line 25 in file IN3_point.ncl</div><div><br></div><div>In my script at line 25,</div><div> ii = ind(apr.ge.levels(i).and.apr.lt.levels(i+1))<br></div><div><br></div><div>Please suggest any solution for this issue.</div><div>Thanks,</div><div>Ipsita</div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 9, 2014 at 11:45 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><div><div>Hi Ipsita,<br><br>offline<br><br></div>Please do no include any salutation (Hi Dennis [, Adam, Mary, ...]) when you respond.<br></div>When you do this, people ignore the question. In essence, your problem is now my or Mary or Adam's problem.<br><br></div>We are not paid to answer ncl-talk questions. We do it to help people but our time is valuable too. <br></div><div>We have our own jobs to do.<br><br></div><div>Please look at the output. What does it say to you?<br><br></div><div><div><br>===<br><br></div><div>THX<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><div>Dennis<br></div><div><br></div></font></span></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 9, 2014 at 11:26 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">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" target="_blank">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><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><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>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><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>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>