on the behaviour of dim_pqsort

From: Will Hobbs <Will.Hobbs_at_nyahnyahspammersnyahnyah>
Date: Sun Jan 20 2013 - 21:22:15 MST

All

I stumbled over an interesting 'feature' of the dim_pqsort() function, basically that it tries to sort a constant series (see below). I'm not sure if this counts as a bug, a warning or just evidence that I should pay more attention to what I'm doing, but it might be of use to other NCL users.

Will

> begin

> x=new(10, "float")
> x = 15.5 ; x is a series of all constant numbers, so nothing to sort

>pv = dim_pqsort(x, 1) ; try and sort in ascending order, but don't sort x)

>print(pv)

Variable: pv
Type: integer
Total Size: 40 bytes
            10 values
Number of Dimensions: 1
Dimensions and sizes: [10]
Coordinates:
(0) 0
(1) 6
(2) 7
(3) 8
(4) 5
(5) 4
(6) 1
(7) 2
(8) 3
(9) 9

> end

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sun Jan 20 21:22:29 2013

This archive was generated by hypermail 2.1.8 : Wed Jan 23 2013 - 20:38:31 MST