Find and aggregate duplicates

From: Vladyslav Lyubartsev <lyubartsev_at_nyahnyahspammersnyahnyah>
Date: Mon, 16 Mar 2009 15:31:56 +0100

Hello,

 

We have two huge arrays with the same dimension:

Days = (/19950308,19950314,19950314,:,20081228,20081231,20081231/)

Data = (/ 12.1, 22.5, 32.0, 12.8, 16.0, 32.1/)

There can be several data values for the same day.

Days are irregular. Sure we can sort them, however there will be gaps and
duplicates in this array.

 

Is it possible to carry out the following tasks efficiently, no loops, using
only built-in NCL functions:

1) Construct the list of unique days, no duplicates

2) Calculate amount of duplicates for each unique day

3) Calculate the data average for each unique day

I see no such solution, only loops.

Am I right?

 

Thanks,

Slava

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Mar 16 2009 - 08:31:56 MDT

This archive was generated by hypermail 2.2.0 : Wed Mar 18 2009 - 14:50:21 MDT