<div dir="ltr"><div class="gmail_default" style="font-size:small">Dear Ipshita,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I don't quite understand all the logic in your code, but I think these lines aren't quite right. For one, your "if" statement has "lat_end.ge.60" which I think you wanted it to be "lat_end.le.60".</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Here are the lines:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><div class="gmail_default"><font face="monospace, monospace">lat_st=lat(y(0))</font></div><div class="gmail_default"><font face="monospace, monospace">lat_end=lat(dimsizes(y))</font></div><div class="gmail_default"><font face="monospace, monospace">lon_st=lon(y(0))</font></div><div class="gmail_default"><font face="monospace, monospace">lon_end=lon(dimsizes(y))</font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="monospace, monospace">if (lat_end.gt.lat_st.and.lat_st.ge.30.and.lat_end.ge.60) then</font></div><div class="gmail_default"><font face="monospace, monospace"> count=count+1</font></div><div class="gmail_default"><font face="monospace, monospace">end if</font></div><div class="gmail_default"><br></div><div class="gmail_default">and what I think the correction should be:</div><div class="gmail_default"><br></div><div class="gmail_default"><div class="gmail_default"><font face="monospace, monospace">ny = dimsizes(y)</font></div><div class="gmail_default"><font face="monospace, monospace">lat_st=lat(y(0))</font></div><div class="gmail_default"><font face="monospace, monospace">lat_end=lat(y(ny-1))</font></div><div class="gmail_default"><font face="monospace, monospace">lon_st=lon(y(0))</font></div><div class="gmail_default"><font face="monospace, monospace">lon_end=lon(</font><span style="font-family:monospace,monospace">y(ny-1))</span></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="monospace, monospace">if (lat_end.gt.lat_st.and.lat_st.ge.30.and.lat_end.le.60) then</font></div><div class="gmail_default"><font face="monospace, monospace"> count=count+1</font></div><div class="gmail_default"><font face="monospace, monospace">end if</font></div><div class="gmail_default"><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 22, 2017 at 12:29 AM, Ipshita Majhi <span dir="ltr"><<a href="mailto:ipmajhi@alaska.edu" target="_blank">ipmajhi@alaska.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">Dear NCL,<div><br></div><div>I want to count number of storms and I have written a code, but the count is zero for all the years and I am not getting any errors. I am attaching the code with this email. I will be grateful if someone could help fix the problem.</div><div><br></div><div>Best Regards</div><span class="HOEnZb"><font color="#888888"><div>Ipshita<br clear="all"><div><br></div>-- <br><div class="m_8468915534528222132gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><div>******************************<wbr>******************************<wbr>******************************<wbr>*************************</div><div><span style="color:rgb(40,40,40);font-family:Georgia,Times,'Times New Roman',serif;line-height:26px"><i><font size="2"><b>"Be who you are and say what you feel because those who mind don't matter and those who matter don't mind."- Dr. Seuss</b></font></i></span><br></div><div><span style="font-size:small">******************************<wbr>******************************<wbr>******************************<wbr>***********************</span></div><div><br></div><div>Ipshita Majhi<br></div>PhD Candidate<br></div>University of Alaska , Fairbanks<br></div>Atmospheric Science Department<br></div><a href="tel:(907)%20978-4220" value="+19079784220" target="_blank">(907)978-4220</a> <a href="mailto:ipmajhi@alaska.edu" target="_blank">ipmajhi@alaska.edu</a><br></div></div></div></div></div></div>
</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>