Re: re-order data to one dimensional array

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Tue Dec 11 2012 - 13:55:42 MST

This is nor clear.

A "one-dimensional array" is q(:); 2d is q(:,:); ....
YYou discuss 3d q(:,:,:)

[1] If you have data sst(time,lat,lon) on separate netCDF files,
     use the netCDF operator called ncrcat

     %> ncrcat file1.nc file2.nc file3.nc FILE.nc

     FILE.nc will contain sst(3285,nlat,nlon)

[2] If you have SST(1095,21,144) and you want a one
     dimensional array use ndtooned

    http://www.ncl.ucar.edu/Document/Functions/Built-in/ndtooned.shtml

     sst1d = ndtooned( SST ) ; sst1d(1095*21*144)>==>sst1(3311280)

On 12/11/12 1:15 PM, Xi Chang wrote:
> Hallo,
>
> I just wonder how can i order all data from all grids to create a single
> array.
> Let say i have 3 years daily datasets SST (time x lat x lon) where
> ntime=1095, nlon=144, nlat=21.
> then i want to oder the data thus then i will have SST_new in one
> dimensional array. something like
>
> SST_new= x( one dimensional array)
>
> SST (1,1,1)
> SST (2,1,1)
> SST (3,1,1)
> ;
> ;
> ;
> SST (ntime, nlat, nlot)
>
> Thanks a lot
> Xi
>
>
>
> _______________________________________________
> 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 Dec 12 05:56:04 2012

This archive was generated by hypermail 2.1.8 : Wed Dec 12 2012 - 19:07:01 MST