<div dir="ltr"><div>Sorry, no. Pretty specialized function ...<br><br></div>: 0 0 0 1 1 0 1 1 1 1 1 0 1 1 1 0 ... input: 1st 1 is a flag<br><div>
: 0 0 0 0 1 0 0 1 2 3 4 0 0 1 2 0<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 7, 2017 at 8:17 PM, Peter Gibson <span dir="ltr"><<a href="mailto:peter.gibson@unsw.edu.au" target="_blank">peter.gibson@unsw.edu.au</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 id="m_-7703457688712157601divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif" dir="ltr">
<p></p>
<div>Hello,<br>
<br>
Is there a function to calculate the running length of 0/1s in a sequence in NCL?<br>
<br>
for example if I had a vector v : 0 0 0 1 1 0 1 1 1 1 1 0 1 1 1 0 ...<br>
the running sequence would be : 0 0 0 0 1 0 0 1 2 3 4 0 0 1 2 0 ...<br>
<br>
I see the function dim_numrun counts the number of unique sequence lengths which is similar but not exactly what I am after .... </div>
<p></p>
<p><br>
</p>
<p>Thanks,</p>
<p>Peter<br>
</p>
</div>
</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>