sorting

From: Michelle Cipullo <mlcipull_at_nyahnyahspammersnyahnyah>
Date: Tue Aug 14 2012 - 09:17:18 MDT

Hello,

I am working on a script and I'm having issues sorting correctly. It may
be my confusion on the function. I am looking at dim_pqsort_n, and from
that I want it listed in increasing order (min_wind.....max_wind) at each
individual lat an lon. I'm attaching some of the relevant code. I am
confused on if I want to sort "x" or not from the documentation (I think I
do want to sort x).
Also, using the dim_max_n I sort across time, so there is only two
components in the array I want to sort (lat,lon). I want the max at each
individual lat & lon so I'm not sure what dimension I should sort across,
or if there is a better function.

Thanks so much for your help,

Michelle

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"

.
.
.

 maxwind = dim_max_n(speed,0) ;Find max over 0 dim. (time) , new dims =
(lat, lon)

*
sorted_maxes = new((/nj,ni/),float)

sorted_maxes(j,i) = dim_pqsort_n(* *maxwind**(j,i),2,0) ;Sorting not
working the way I want... want speeds in order at each individual lat and
lon point. *
*
*
*.*
*.*
*.*
*end*
* *

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Aug 14 09:17:28 2012

This archive was generated by hypermail 2.1.8 : Wed Aug 15 2012 - 08:12:08 MDT