Sorts an array (for use with selected TDPACK routines).
Available in version 4.3.1 and later.
function tdsort ( rwrk [*] : float, sort_flag  : integer ) return_val [dimsizes(rwrk)] : float
A float array of length nwrk you want to sort.sort_flag
An integer scalar, that, if set to zero, will cause the sort to go from the smallest to the greatest value. If set to a non-zero value, it will sort from largest to smallest value.
This routine is part of the low-level TDPACK package, which is a group of Fortran and C callable routines for projecting objects from a 3-dimensional coordinate system having U, V, and W axes to a 2-dimensional projection plane having X and Y axes and/or for drawing the projections of those objects. This can be referred to somewhat loosely as "drawing objects in three dimensions".
Given an array of nrwk reals in an array rwrk and a "sorting flag" sort_flag, tdsort returns a permutation vector iwrk of length nwrk such that, for every i and j such that 1 <= i <= j <= nwrk, if sort_flag is zero, then rwrk(iwrk(i)) <= rwrk(iwrk(j)), else rwrk(iwrk(i)) >= rwrk(iwrk(j)).
Please see the documentation on TDSORT for a full description of this function.
No examples are currently available for this function. Please see the documentation on TDSORT for more information about this function.