<div dir="ltr">Hi!<div>Since 'music piano' replied, I thought I might chime in ;)<br><div>I'm pretty sure that no option(s) to functions allow you to do what you want.</div><div>So you'll need to write alternative functions yourself (perhaps not what you consider 'an easy way'...)</div><div>You may use something like</div><div><br></div><div><div>aDim = dimsizes(a)</div><div>orgFill = a@_FillValue</div><div>newFill = -min(abs(a)) - 1 ; make sure newFill is out of range and <0 </div><div>if (newFill .eq. orgFill) then ; newFill must be different from orgFill</div><div> newFill = newFill - 1</div><div>end if</div><div>newVar = ndtooned(a)</div><div>newVar@_FillValue = newFill</div><div>indx = ind(ismissing(newVar))</div><div>newVar(indx) = orgFill</div><div>newa = onedtond(newVar,aDim)</div><div><br></div><div>...and, if you later want to restore:</div><div>a = newa</div><div>a@_FillValue = orgFill</div></div><div><br></div><div>Hope this helps/clarifies!</div><div>Best regards,</div><div>Arne</div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-11-24 1:49 GMT+01:00 Rashed Mahmood <span dir="ltr"><<a href="mailto:rashidcomsis@gmail.com" target="_blank">rashidcomsis@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hello all,<br></div>I am just wondering if there is an easy way to tell the "sum" and "avg" functions NOT ignore the missing values. Below lines clarify my question where I would like to see same values for c and d:<br><br>ncl 0> a = (/(/-9.,2,-9./),(/1,-9.,2./)/)<br>ncl 1> a@_FillValue = -9. <br>ncl 2> c = (a(0,:)+a(1,:))<br>ncl 3> d = dim_sum_n(a,0)<br>ncl 4> print(" "+c+ " ... "+d)<br>(0) -9 ... 1<br>(1) -9 ... 2<br>(2) -9 ... 2<br><br></div>Thanks,<br></div>Rashed<br><div><div><div><br></div></div></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>