[ncl-talk] Sorting an array depending on first column

Abhik Santra abhiksantra at tropmet.res.in
Mon Dec 5 22:59:51 MST 2016


Hi NCL users

How can I sort an array based on its first column elements?
For example, if 

Ain = (/ (/2,1,3/), (/6,2,4/), (/3,1,5/), (/1,7,4/) /)

then how can I get

Aout = (/ (/1,7,4/), (/2,1,3/), (/3,1,5/), (/6,2,4/) /) ?

Any help would be greatly appreciated.

Thanks,
Abhik

****************************************
Abhik Santra
Postdoctoral Research Fellow
Australian Bureau of Meteorology,
Melbourne, Australia
****************************************



More information about the ncl-talk mailing list