Re: Sort data/reduce to 1D

From: Tracy Emerson <temerson_at_nyahnyahspammersnyahnyah>
Date: Thu Jan 23 2014 - 12:07:19 MST

Thanks Dennis,

I tried to make it clear, but this is exactly what I was trying to do,
so you guessed correctly. :)

On 1/23/2014 12:01 PM, Dennis Shea wrote:
> The question is not clear to me so take the answer with a grain of salt.
>
> h1d = ndtooned(hgt)
>
> opt = 1 or 2 ; not sure what you want
> iph1d = dim_pqsort_n(h1d,opt)
>
> ; q([lv_ISBL0 | 26] x [lat_0 | 361] x [lon_0 | 720])
>
> q1d = ndtooned(q)
>
> q1dsort = qid(iph1d) ; sort based oh hgt sort
> Q = onedtond(q1dsort, dimsizes(q))
>
> On 1/23/14, 10:59 AM, Tracy Emerson wrote:
>> Hello,
>>
>> I have 3D variables (example below) that I would like to sort in
>> increasing order into a 1D array and then sort the other variables using
>> the same permutation. I have not been able to figure this out using the
>> many sort functions available, so any help will be greatly appreciated.
>>
>> Variable: hgt
>> Type: float
>> Total Size: 27031680 bytes
>> 6757920 values
>> Number of Dimensions: 3
>> Dimensions and sizes: [lv_ISBL0 | 26] x [lat_0 | 361] x [lon_0 | 720]
>>
>> Thank you,
>> Tracy
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Jan 23 12:07:36 2014

This archive was generated by hypermail 2.1.8 : Fri Feb 07 2014 - 16:39:11 MST