[ncl-talk] missing value and index

Xi Chang xi.chang01 at gmail.com
Tue Feb 10 14:14:40 MST 2015


Dear NCL,

How can I change the values which are not associated with list of index to
be missing values, for instance let's say I have set of data in array A,
and list of index in array B,
then I need to get array C where, the values of A which are not associated
with indices in B, will be missing values?

A=(/1,12,3,14,5,26,7,18,9,10/) ;data
B=(/1,3,5/) ;index

then, the result will be:

C=(/-999, 12, -999, 14,-999,26, -999, -999, -999, -999/)

Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150210/d838f584/attachment.html 


More information about the ncl-talk mailing list