<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Alan,&nbsp;<div class=""><br class=""></div><div class="">I made some edits to the hidden NCL function which does the work for&nbsp;<span style="font-size: 12.8px;" class=""><font face="InputMono-Regular" class=""><b class="">get_unique_values</b></font>(x) to both speed the function up and also to implement Hoffman Cheungs idea about assigning an index to&nbsp;</span><span style="font-size: 12.800000190734863px;" class="">unsort the unique array. &nbsp; You can load this at the top of your script and it will replace the official functions, &nbsp;<font face="InputMono-Regular" class=""><b class="">get_unique_values</b></font>(x) will be faster and I added a <font face="InputMono-Regular" class=""><b class="">get_unique_values_nosort</b></font>(x) same use as the original but it&nbsp;will return an unsorted array of unique&nbsp;values (i.e. the first instance of each unique value). &nbsp;</span></div><div class=""><span style="font-size: 12.800000190734863px;" class=""><br class=""></span></div><div class=""><span style="font-size: 12.800000190734863px;" class="">I’m not a developer, so this is not an official function and may likely be changed if&nbsp;incorporated in future releases. &nbsp;That said any problems let me know.&nbsp;</span></div><div class=""><span style="font-size: 12.800000190734863px;" class=""><br class=""></span></div><div class=""><span style="font-size: 12.800000190734863px;" class=""><br class=""></span></div><div class=""><span style="font-size: 12.800000190734863px;" class="">Alan.</span></div><div class=""><span style="font-size: 12.800000190734863px;" class=""><br class=""></span></div><div class=""><span style="font-size: 12.800000190734863px;" class=""><br class=""></span></div><div class=""><span style="font-size: 12.800000190734863px;" class=""><br class=""></span></div><div class=""></div></body></html>