[ncl-talk] "sum" and "avg" functions without ignoring missing values

Rashed Mahmood rashidcomsis at gmail.com
Thu Nov 23 17:49:29 MST 2017


Hello all,
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:

ncl 0> a = (/(/-9.,2,-9./),(/1,-9.,2./)/)
ncl 1> a at _FillValue = -9.
ncl 2> c = (a(0,:)+a(1,:))
ncl 3> d = dim_sum_n(a,0)
ncl 4> print("  "+c+ " ... "+d)
(0)       -9 ... 1
(1)       -9 ... 2
(2)       -9 ... 2

Thanks,
Rashed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171123/995d643f/attachment.html>


More information about the ncl-talk mailing list