[ncl-talk] Storm track count

Mary Haley haley at ucar.edu
Thu Jun 22 10:51:13 MDT 2017


Dear Ipshita,

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".

Here are the lines:

lat_st=lat(y(0))
lat_end=lat(dimsizes(y))
lon_st=lon(y(0))
lon_end=lon(dimsizes(y))

if (lat_end.gt.lat_st.and.lat_st.ge.30.and.lat_end.ge.60) then
       count=count+1
end if

and what I think the correction should be:

ny = dimsizes(y)
lat_st=lat(y(0))
lat_end=lat(y(ny-1))
lon_st=lon(y(0))
lon_end=lon(y(ny-1))

if (lat_end.gt.lat_st.and.lat_st.ge.30.and.lat_end.le.60) then
       count=count+1
end if


On Thu, Jun 22, 2017 at 12:29 AM, Ipshita Majhi <ipmajhi at alaska.edu> wrote:

> Dear NCL,
>
> 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.
>
> Best Regards
> Ipshita
>
> --
> ************************************************************
> *******************************************************
> *"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*
> ************************************************************
> *****************************************************
>
> Ipshita Majhi
> PhD Candidate
> University of Alaska , Fairbanks
> Atmospheric Science Department
> (907)978-4220 <(907)%20978-4220> ipmajhi at alaska.edu
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170622/31fb5c12/attachment.html 


More information about the ncl-talk mailing list