Re: Reorder data

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Wed, 30 Sep 2009 13:11:26 -0600

 
   psl = onedtond( ndtooned(PSL) , (/40,12,64,128/)

Gina Henderson wrote:
> Hi there,
>
> I was wondering if there is a quicker way to do reorder arrays as I
> have been doing it in do loops which are not very efficient. I have
> been reading in 480 monthly history tapes as follows:
>
> inputpath_a = "datapath"
> allfiles_a = systemfunc("ls "+inputpath_a+"filenames*")
> a = addfiles(allfiles_a,"r")
> PSL= addfiles_GetVar(a,allfiles_a,"PSL")
>
> This gives me a PSL array of shape (480, 64, 128), where the 480 is 40
> years * 12 months. Is there a function in ncl that can reorder this
> data to (year, month, lat, lon)?
>
> Thanks, Gina.
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>

-- 
======================================================
Dennis J. Shea                  tel: 303-497-1361    |
P.O. Box 3000                   fax: 303-497-1333    |
Climate Analysis Section                             |
Climate & Global Dynamics Div.                       |
National Center for Atmospheric Research             |
Boulder, CO  80307                                   |
USA                        email: shea 'at' ucar.edu |
======================================================
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Sep 30 2009 - 13:11:26 MDT

This archive was generated by hypermail 2.2.0 : Thu Oct 01 2009 - 13:55:31 MDT