<div dir="ltr">Is there a version of runave that will average all nonmissing values? In the current version, if there is even one missing value within a window, the average is set to missing.<div><br></div><div>For example:</div><div><div>ncl 0&gt; x = ispan( 1, 15, 1 )</div><div>ncl 1&gt; x@_FillValue = -99</div><div>ncl 2&gt; x(8) = x@_FillValue</div><div>ncl 3&gt; y = runave( x, 5, 1 )</div><div>ncl 4&gt; print( x + &quot; &quot; + y )</div><div>(0)<span class="" style="white-space:pre">        </span>1 2.2</div><div>(1)<span class="" style="white-space:pre">        </span>2 2.4</div><div>(2)<span class="" style="white-space:pre">        </span>3 3</div><div>(3)<span class="" style="white-space:pre">        </span>4 4</div><div>(4)<span class="" style="white-space:pre">        </span>5 5</div><div>(5)<span class="" style="white-space:pre">        </span>6 6</div><div>(6)<span class="" style="white-space:pre">        </span>7 -99</div><div>(7)<span class="" style="white-space:pre">        </span>8 -99</div><div>(8)<span class="" style="white-space:pre">        </span>-99 -99</div><div>(9)<span class="" style="white-space:pre">        </span>10 -99</div><div>(10)<span class="" style="white-space:pre">        </span>11 -99</div><div>(11)<span class="" style="white-space:pre">        </span>12 12</div><div>(12)<span class="" style="white-space:pre">        </span>13 13</div><div>(13)<span class="" style="white-space:pre">        </span>14 13.6</div><div>(14)<span class="" style="white-space:pre">        </span>15 13.8</div><div><br></div><div>What I&#39;d like to have happen is something like:</div><div><div>(0)<span class="" style="white-space:pre">        </span>1 2.2</div><div>(1)<span class="" style="white-space:pre">        </span>2 2.4</div><div>(2)<span class="" style="white-space:pre">        </span>3 3</div><div>(3)<span class="" style="white-space:pre">        </span>4 4</div><div>(4)<span class="" style="white-space:pre">        </span>5 5</div><div>(5)<span class="" style="white-space:pre">        </span>6 6</div><div>(6)<span class="" style="white-space:pre">        </span>7 6.5   &lt; = = ( 5 + 6 + 7 + 8 ) / 4</div><div>(7)<span class="" style="white-space:pre">        </span>8 7.75   &lt; = = ( 6 + 7 + 8 + 10 ) / 4</div><div>(8)<span class="" style="white-space:pre">        </span>-99 9   &lt; = = ( 7 + 8 + 10 + 11 ) / 4</div><div>(9)<span class="" style="white-space:pre">        </span>10 10.25   &lt; = = ( 8 + 10 + 11 + 12 ) / 4</div><div>(10)<span class="" style="white-space:pre">        </span>11 11.5   &lt; = = ( 10 + 11 + 12 + 13 ) / 4</div><div>(11)<span class="" style="white-space:pre">        </span>12 12</div><div>(12)<span class="" style="white-space:pre">        </span>13 13</div><div>(13)<span class="" style="white-space:pre">        </span>14 13.6</div><div>(14)<span class="" style="white-space:pre">        </span>15 13.8</div></div><div><br></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><br><table border="0" cellpadding="2" cellspacing="2" style="max-width:100%;border-collapse:collapse;border-spacing:0px;color:rgb(51,51,51);font-size:14px;border:3px solid rgb(170,170,170);font-family:Times;line-height:12px;background-color:transparent"><tbody><tr><td align="center" height="71" width="71"><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif"><a href="http://www.cicsnc.org/" style="color:rgb(38,58,143);text-decoration:none;font-weight:bold" target="_blank"><img src="http://www.cicsnc.org/assets/images/cicsnc-logo.png" width="96" height="93"></a>  <a href="http://www.researcherid.com/rid/B-8711-2011" target="_blank"><br></a></span></span><br><font size="4"><b style="text-align:start;color:rgb(38,58,143);font-family:arial,helvetica,sans-serif"> <a href="http://www.cyclonecenter.org/" style="color:rgb(38,58,143);text-decoration:none" target="_blank">Cyclone</a></b><a href="http://www.cyclonecenter.org/" style="text-align:start;color:rgb(38,58,143);font-family:arial,helvetica,sans-serif;text-decoration:none" target="_blank">Center.org</a>  </font></td><td valign="top"><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif"><b>Carl J. Schreck III, PhD</b><br><b>Research Associate</b><br><a href="http://www.cicsnc.org/" style="color:rgb(38,58,143);text-decoration:none;font-weight:bold" target="_blank">Cooperative Institute for Climate and Satellites NC</a> <br><a href="http://ncsu.edu/" style="color:rgb(38,58,143);text-decoration:none;font-weight:bold" target="_blank">North Carolina State University</a><br><a href="http://ncdc.noaa.gov/" style="color:rgb(38,58,143);text-decoration:none;font-weight:bold" target="_blank">NOAA&#39;s National Climatic Data Center</a><br>151 Patton Ave, Asheville, NC 28801<br>e: </span></span><a href="mailto:cjschrec@ncsu.edu" style="color:rgb(38,58,143);font-family:arial,helvetica,sans-serif;font-size:11px;text-decoration:none;font-weight:bold" target="_blank">cjschrec@ncsu.edu</a><br style="font-family:arial,helvetica,sans-serif;font-size:11px"><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif">o: +1 828 257 3140<br></span></span><a href="http://scholar.google.com/citations?hl=en&amp;user=th8ONEcAAAAJ&amp;view_op=list_works&amp;sortby=pubdate" style="color:rgb(38,58,143);font-family:arial,helvetica,sans-serif;font-size:11px;text-decoration:none;font-weight:bold" target="_blank">Publications</a><br><a href="http://monitor.cicsnc.org/mjo/" style="color:rgb(38,58,143);font-family:arial,helvetica,sans-serif;font-size:11px;text-decoration:none;font-weight:bold" target="_blank">monitor.cicsnc.org/mjo</a><br style="font-family:arial,helvetica,sans-serif;font-size:11px"></td></tr></tbody></table></div></div>
</div></div>