[ncl-talk] get first index of each sequence
Xi Chang
xi.chang01 at gmail.com
Mon Feb 6 17:17:48 MST 2023
Hi NCL community,
Is there anyone who can help me on how to return the first index of each
sequence in 1D data?
For example,
x = (/-999,-999,-999,-999,1,1,1,1,1,-999,-999,-999,1,1,1,-999,1,1,1/)
x at _FillValue=-999
There are 3 sequences of data in that 1D time series, how could I get the
first index of each sequence, so that the answer would be:
(0) 4
(1) 12
(2) 16
Thanks
Chang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20230206/501fc984/attachment.htm>
More information about the ncl-talk
mailing list