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

music piano musicpianoljy at gmail.com
Thu Nov 23 21:59:57 MST 2017


Hi, Rashed

I am not sure I understand your question.

You can assign a at _FillValue to a different value, then the function will
recognize -9.0

Best
Richard

On Thu, Nov 23, 2017 at 7:49 PM, Rashed Mahmood <rashidcomsis at gmail.com>
wrote:

> 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
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171123/8357ea38/attachment.html>


More information about the ncl-talk mailing list