<div dir="ltr"><div><div><div><div><div>Like Alan wrote .... did you try it? That is the best way to learn a language.<br><br> A = 1e20<br> A@_FillValue = 1e20<br> B = 10<br> C = 20<br><br></div> X = A+B+C ; A=A@_FillValue will return X=A@ _FillValue<br></div><div> print(X)<br></div><div><br></div> X = sum( (/A,B,C/) ) <br></div> print(X) ; X=30<br><br></div> X = avg(/A,B,C/) ) <br></div> print(X) ; X=15<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 29, 2014 at 9:04 AM, Alan Brammer <span dir="ltr"><<a href="mailto:abrammer@albany.edu" target="_blank">abrammer@albany.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Did you try it?</p>
<p dir="ltr">I just quickly tested it and if any one variable is _Fillvalue then the return is a fillvalue. </p>
<p dir="ltr">If that's not what you want and it's just addition you want you could build an array from a,b,c and use dim_sum which will ignore fillvalues I believe. </p>
<p dir="ltr">Good luck,<br>
Alan. </p>
<div class="gmail_quote"><div><div class="h5">On 28 Sep 2014 17:20, "Xi Chang" <<a href="mailto:xi.chang01@gmail.com" target="_blank">xi.chang01@gmail.com</a>> wrote:<br type="attribution"></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hallo,<div><br></div><div>How does NCL treat the missing value in a simple arithmetic calculation, e.g.;</div><div><b>X= A + B +C</b></div><div>if A is a missing value and B, and C is <b>non</b> missing value, so what's the result of X?</div><div>is it missing value or is it equal to the value of B+C?</div><div><br></div><div>Thanks</div><div><br></div></div>
<br></div></div>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>