[ncl-talk] calculating annual max values with varying amount of yearly values

Marcella, Marc MMarcella at AIR-WORLDWIDE.COM
Fri Sep 12 10:49:59 MDT 2014


Hi all,

Im having a bit of a problem trying to elegantly script calculating annual max values when I have varying amount of values for each year. For example, I have one text file with the year stamp for each event, and in another I have the corresponding wind value for that event.  Some years there are four measurements, some years one, other years ten. Im trying to use a do loop that goes through each year in the text file to find the beginning and end index (i.e. what index refers to the beginning of that year's values in the wind file and the index that refers to the last value of that year).  I was then going to use that specific year's indices with the max command on the wind value file.  But I'm having not having too much luck and it's getting messy with all the do and if statements.  Any ideas?  Are there simpler functions that Im not aware of built into NCL that can help with this?  Any help would be greatly appreciated.

Thanks,
Marc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140912/8a4c05ec/attachment.html 


More information about the ncl-talk mailing list