<div dir="ltr">Hi Toni,<div>See example #3 in the dim_numrun_n documentation:</div><div><a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/dim_numrun_n.shtml">http://www.ncl.ucar.edu/Document/Functions/Built-in/dim_numrun_n.shtml</a><br></div><div>Adam</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 9, 2019 at 10:22 AM Toni Klemm <<a href="mailto:toni-klemm@tamu.edu">toni-klemm@tamu.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;">Hello NCL community,<div><br></div><div>I have a dataset of de-trended precipitation and temperature projections from 2020 to 2099, and I’m trying to count the number of consecutive years with above and below zero data, in other words the length of wet/dry or warm/cool periods, for 20-year periods (2020-2039, 2040-2059, …) on a grid cell basis (241 latitudes, 457 longitudes = 110,137 grid cells). Is there a function in NCL that can do that somehow? It seems really cumbersome trying to do this through if and do loops.</div><div><br></div><div>Thank you very much for your help!</div><div><br></div><div>Toni<br><div>
<div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="color:rgb(0,0,0);font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><font face="Calibri"><br class="gmail-m_-5986762203821397988Apple-interchange-newline"><br></font></div><div style="color:rgb(0,0,0);font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><font face="Calibri"><b>Toni Klemm, Ph.D.<br></b>Postdoctoral Research Associate</font></div><div style="color:rgb(0,0,0);font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Department of Ecosystem Science and Management</div><div style="color:rgb(0,0,0);font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">College of Agriculture and Life Sciences</div><div style="color:rgb(0,0,0);font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Texas A&M University, College Station, TX</div><div style="color:rgb(0,0,0);font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div><font face="Calibri"><a href="http://www.toni-klemm.de/" target="_blank">www.toni-klemm.de</a> | <a href="http://twitter.com/toniklemm" target="_blank">@toniklemm</a></font></div><div>Editorial Board member<font face="Calibri">, <a href="http://www.eccforum.org/" target="_blank">Early Career Climate Forum</a></font></div></div></div></div><br class="gmail-m_-5986762203821397988Apple-interchange-newline"></div><br class="gmail-m_-5986762203821397988Apple-interchange-newline"></div><br class="gmail-m_-5986762203821397988Apple-interchange-newline"></div><br class="gmail-m_-5986762203821397988Apple-interchange-newline"></div><br class="gmail-m_-5986762203821397988Apple-interchange-newline"></div><br class="gmail-m_-5986762203821397988Apple-interchange-newline"><br class="gmail-m_-5986762203821397988Apple-interchange-newline">
</div>
<br></div></div>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">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/mailman/listinfo/ncl-talk</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist,  </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a>   </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>