change order of coordinates of a variable

From: H.Dang <danghy_at_nyahnyahspammersnyahnyah>
Date: Sat Dec 29 2012 - 12:47:12 MST

Hi dear all,

I have a 2-D variable from a netCDF file, var(144,96), which has 144
longitudes and 96 latitudes. These latitudes and longitudes are saved in
variables "lat" and "lon". I named the dimensions by myself, now it's like:

Variable: var
Type: double
Total Size: 110592 bytes
            13824 values
Number of Dimensions: 2
Dimensions and sizes: [lon | 144] x [lat | 96]
Coordinates:
            lon: [ 0..357.5]
            lat: [ -90..89.99999999999999]
Number Of Attributes: 1
  _FillValue : 9.969209968386869e+36

I thought the order of "lat" and "lon" should be reversed, otherwise the
data of northern hemisphere are plotted on eastern hemisphere. I just
wonder how to change var([lon | 144] x [lat | 96]) to var2([lat | 96] X [lon
| 144]) to let NCL recognize the longitudes (from 0 to 360) automatically.
 Thank you!

Best
Hongyan

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sat Dec 29 12:48:04 2012

This archive was generated by hypermail 2.1.8 : Fri Jan 04 2013 - 15:32:29 MST