[ncl-talk] get index

Michael Notaro mnotaro at wisc.edu
Thu Aug 21 14:40:47 MDT 2014


I think this should work.


Say, the daily time series is x(0:364).

indices=ind(x.lt.0.)
first=indices(0)




On 08/21/14, Xi Chang  wrote:
> Hallo NCL people,
> 
> I have a question, i have a daily data 1D (point),, i'd like to get the index which has the first negative value and save the index per year. if i have 20 years, then i'll have 20 indices which are associated with first negative value each year.
> 
> 
> Thank you.


More information about the ncl-talk mailing list