<div><div style="font-family: "lucida Grande", Verdana, "Microsoft YaHei";">Dear Shea,</div><div style="font-family: "lucida Grande", Verdana, "Microsoft YaHei";"><br></div><div style="font-family: "lucida Grande", Verdana, "Microsoft YaHei";">Thanks very much for your help and the example program you sent before!</div><div style="font-family: "lucida Grande", Verdana, "Microsoft YaHei";">I couldn't load "first_occurence_ind" , so I put the two programs together.</div><div style="font-family: "lucida Grande", Verdana, "Microsoft YaHei";">But when I test the last day greater than 0 degree. I found the outcome confusing.</div><div style="font-family: "lucida Grande", Verdana, "Microsoft YaHei";">I found some "last day" is smaller than "first day".</div><div style="font-family: "lucida Grande", Verdana, "Microsoft YaHei";">Here are the three sentences I had changed.</div><div style="font-family: "lucida Grande", Verdana, "Microsoft YaHei";"><div>                   t3= where(t3.ge.testValue, t3@_FillValue, t3);</div><div>                   t3 = where(.not.ismissing(t3),testValue,t3)   </div><div>                   it3(nl,ml) = dim_maxind(t3,0)   </div><div>It would be so nice of you to see””the attached program£®</div></div><div style="font-family: "lucida Grande", Verdana, "Microsoft YaHei";">Thanks for reading again!</div><div style="font-family: "lucida Grande", Verdana, "Microsoft YaHei";"><br></div><div style="font-family: "lucida Grande", Verdana, "Microsoft YaHei";"><div>Sincerely,</div><div>Wind</div></div></div><div><div><br></div><div style="font-size: 12px;font-family: Arial Narrow;padding:2px 0 2px 0;">------------------ Original ------------------</div>Message: 2<br>Date: Sat, 7 Dec 2019 10:34:04 -0700<br>From: Dennis Shea <shea@ucar.edu><br>To: WIND <954051157@qq.com><br>Cc: ncl-talk <ncl-talk@ucar.edu><br>Subject: Re: [ncl-talk] confirm the first day greater than 0 degree<br>Message-ID:<br>  <CAOF1d_4HWTqhPxCpqwmkv-+0oMYKT4sMaTtKxDoUFM0K9em_Jg@mail.gmail.com><br>Content-Type: text/plain; charset="utf-8"<br><br>There is no existing NCL function for what you want. Still, *dim_minind*<br><http://www.ncl.ucar.edu/Document/Functions/Contributed/dim_minind.shtml><br>can be used if the<br>data array is pretreated [tricked].<br><br>See attached.<br><br>%> ncl tst.1st_occurence.ncl<br><br>On Thu, Dec 5, 2019 at 10:15 PM WIND via ncl-talk <ncl-talk@ucar.edu> wrote:<br><br>> Dear all,<br>><br>> Thanks for reading, I'm dealing with the three-dimensional grid<br>> temperature data (ordered by time, lat, lon). I want to confirm the first<br>> day (position in the time dimension) in each lat/lon that the temperature<br>> is greater than 0. It's hard for me to think about how to write the "if"<br>> statement. Are there some relevant statistics function in NCL? It will be<br>> so nice that anyone would provide some advice.<br>> Any help would be appreciated!<br>><br>> Sincerely,<br>> Wind<br><br>End of ncl-talk Digest, Vol 193, Issue 14<br>*****************************************<br></div>