Re: Multidimensional array sort

From: Wei Huang <huangwei_at_nyahnyahspammersnyahnyah>
Date: Wed, 9 Sep 2009 10:49:01 -0600

James,

One of our experts also suggest another approach, see:
http://www.ncl.ucar.edu/Document/Functions/Built-in/triple2grid2d.shtml

-------------------------------
  nrow = 85000 ; or use functions
  ncol = 14 ; or use functions

  x = asciiread( "foo,txt", (/nrow,ncol/), "float")

  LON= ... RCM grid LON ; (NLAT,MLON)
  LAT = ... RCM grid LAT

  grid = new ( (12,NLAT,MLON/), typeof(x), getFillValue(x) )

   opt = True ;or False
  ;opt....

  do nt=0,11
       grid(nt,:,:) = *triple2grid2d*(x(:,1),x(:,0),x(:,2), LON,LAT,
opt)
  end do

Wei Huang
huangwei_at_ucar.edu
VETS/CISL
National Center for Atmospheric Research
P.O. Box 3000 (1850 Table Mesa Dr.)
Boulder, CO 80307-3000 USA
(303) 497-8924

On Sep 9, 2009, at 10:37 AM, Correia, James wrote:

> Hi-
> This is the U Delaware climate data set (terrestrial air temp and
> precip
> V4.01). It is in ascii text. I should probably just use sort in linux.
> jimmyc
>
>
> On 9/9/09 9:34 AM, "Ian Harris" <i.harris_at_uea.ac.uk> wrote:
>
>> James,
>>
>> Is this the CRU CL 2.0 dataset, or similar?
>>
>> I had a recent query for this to be in a more human-friendly format
>> but I've mislaid it.
>>
>> I knocked up a Fortran 77 program that seems to do the trick, if you
>> want to give it a go..
>>
>> Cheers
>>
>> Harry
>>
>>
>> On 9 Sep 2009, at 17:19, Correia, James wrote:
>>
>>> Hi-
>>> I need to sort a multidimensional array. I need to sort a gridded
>>> dataset
>>> which is jumbled up, so I can regrid to an RCM model domain. The
>>> array is
>>> 85000 lines by 14 columns ( lat and lon followed by 12 monthly
>>> values).
>>>
>>> My options are tdsort, or dim_pqsort. Will either of these work for
>>> this
>>> kind of problem?
>>>
>>> jimmyc
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>> Ian "Harry" Harris
>> Climatic Research Unit
>> School of Environmental Sciences
>> University of East Anglia
>> Norwich NR4 7TJ
>> United Kingdom
>>
>>
>
> _______________________________________________
> 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 Wed Sep 09 2009 - 10:49:01 MDT

This archive was generated by hypermail 2.2.0 : Tue Sep 15 2009 - 16:03:21 MDT