<div dir="ltr"><div><div><div><div><div><div>Hello Mattia,<br><br></div>You are correct. There does appear to be a bug in dim_sum_wgt [*and* dim_sum_wgt_n<br></div><div>and dim_avg_wgt_n]. Not sure what has happened.<br></div><div><br></div>Thx for the simple test to illustrate the problem. <br>A *slightly* more elaborate test is attached.<br><br></div>A JIRA ticket has been opened: <a href="https://vets.development.ucar.edu/jira/browse/NCL-2065" target="_blank">NCL-2065 </a><br><br></div>This will be fixed in the next release of NCL: 6.3.0<br><br></div>Vielen Dank<br><br></div>D<br><div><div><div><div><br><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 8, 2014 at 2:01 AM, Mattia Righi <span dir="ltr"><<a href="mailto:Mattia.Righi@dlr.de" target="_blank">Mattia.Righi@dlr.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear NCL users,<br>
<br>
I'm writing to report a problem with the built-in function dim_sum_wgt.<br>
<br>
According to the documentation<br>
<br>
<a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/dim_sum_wgt.shtml" target="_blank">http://www.ncl.ucar.edu/<u></u>Document/Functions/Built-in/<u></u>dim_sum_wgt.shtml</a><br>
<br>
this function calculates the weighted sum of an input array only if all values are non-missing (opt=0) OR considering only the non-missing values (opt=1).<br>
<br>
This however seems not to be the case for opt=0.<br>
See the attached test script: the first print statement (opt=0) should return a missing, given that the input array contains 2 missing values.<br>
<br>
Note that the same calculation with the analogous dim_avg_wgt function<br>
provides the expected result, so this seems to be a problem only in dim_sum_wgt.<br>
<br>
NCL version: 6.2.0.<br>
<br>
Thanks for your help!<br>
Best regards,<br>
Mattia<br>
<br>
-- <br>
------------------------------<u></u>------------------------------<u></u>--<br>
Dr. Mattia Righi<br>
Deutsches Zentrum fuer Luft- und Raumfahrt (DLR)<br>
Institut fuer Physik der Atmosphaere<br>
Muenchner Strasse 20<br>
D-82234 Wessling - Germany<br>
<br>
Telephone <a href="tel:%2B49%208153%2028%201813" value="+498153281813" target="_blank">+49 8153 28 1813</a><br>
Telefax <a href="tel:%2B49%208153%2028%201841" value="+498153281841" target="_blank">+49 8153 28 1841</a><br>
E-mail <a href="mailto:Mattia.Righi@dlr.de" target="_blank">Mattia.Righi@dlr.de</a><br>
Internet <a href="http://www.pa.op.dlr.de/~MattiaRighi/" target="_blank">http://www.pa.op.dlr.de/~<u></u>MattiaRighi/</a><br>
------------------------------<u></u>------------------------------<u></u>--<br>
<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>