[ncl-talk] sort multiple 1D vectors with a common timestamp according to one, without a loop

Matthew Fearon Matthew.Fearon at dri.edu
Wed Aug 26 14:32:11 MDT 2015


Does dim_pqsort do this?

In my example, if I did  x = dim_pqsort(precip, -2) , is x the indices of the sorted array (descending) that I could apply to the other variables to order them consistent with precip?

thanks for the help.

________________________________
From: ncl-talk-bounces at ucar.edu [ncl-talk-bounces at ucar.edu] on behalf of Matthew Fearon [Matthew.Fearon at dri.edu]
Sent: Wednesday, August 26, 2015 1:20 PM
To: ncl-talk at ucar.edu
Subject: [ncl-talk] sort multiple 1D vectors with a common timestamp according to one, without a loop

Dear NCL users,

Trying to sort multiple 1D vectors according to one primary vector. For example, I have temp, rh, wind, and precip as 1D vectors of the same length, and they corresponding in time. How can I sort precip descending and attached the corresponding temp, rh, and wind to it, without a loop?

thanks,
Matt

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150826/1da579b0/attachment.html 


More information about the ncl-talk mailing list