[ncl-talk] reordering an array

Laura Fowler laura at ucar.edu
Fri Dec 8 11:04:09 MST 2017


Hello:

I would like to re-order TRMM 3B42 data from [lon | 1440] x [lat |
400] to [lat| 400] x [lon | 1440], but that does not seem to work?
Before re-ordering, the original precipitation array is:

Variable: precip
Type: float
Total Size: 2304000 bytes
            576000 values
Number of Dimensions: 2
Dimensions and sizes: [lon | 1440] x [lat | 400]
Coordinates:
            lon: [-179.875..179.875]
            lat: [-49.875..49.875]


After applying:

f = addfile("3B42_Daily.20151128.7.nc4","r")
precip   = f->precipitation
precip_r = precip(lon|:,lat|:)

I get the following for precip_r:

Variable: precip_r
Type: float
Total Size: 2304000 bytes
            576000 values
Number of Dimensions: 2
Dimensions and sizes: [lon | 1440] x [lat | 400]
Coordinates:
            lon: [-179.875..179.875]
            lat: [-49.875..49.875]


so it seems that it did not work. I am wondering if it is because the
dimensions of precip are lon and lat which are the same as the
coordinates lat and lon.

I am not sure what to do next? If somebody would like to help me out,
the ncl script and data are in /glade2/scratch2/laura/3B42. I am using
ncl 6.4.0.


Many thanks,
Laura


-- 
!-------------------------------------------------------------------------------------------------------------
Laura D. Fowler
Mesoscale and Microscale Meteorology Division (MMM)
National Center for Atmospheric Research
P.O. Box 3000, Boulder CO 80307-3000

e-mail: laura at ucar.edu
phone: 303-497-1628

!-------------------------------------------------------------------------------------------------------------


More information about the ncl-talk mailing list