[ncl-talk] sum

Dennis Shea shea at ucar.edu
Mon Dec 11 13:29:15 MST 2017


Try:

i = (/ 0,1,11/)
dsum = sum( data(:,i) )
davg = avg( data(:,i) )

Sent from my iPhone

> On Dec 11, 2017, at 12:40 PM, Vanúcia Schumacher <vanucia-schumacher at hotmail.com> wrote:
> 
> I would like to add (+) three variables that contain missing values, but I need that during the sum disregarding the missing value, in the same way as the sum function.
> Any suggestion?
> 
> 
>         varD = data(:,11) 
>         varD at _FillValue = -999.00
>         varJ = data(:,0) 
>         varJ at _FillValue = -999.00
>         varF = data(:,1) 
>         varF at _FillValue = -999.00
>           
>         xmean = (varD+varJ+varF)
> 
> _______________________________________________
> 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/20171211/6ebc07be/attachment.html>


More information about the ncl-talk mailing list