There are two approaches here.
First:
x&lat = where(lat.gt.180,lat+360,lat)
x = lonFlip(x)
Secondly, you could perform a similar operation manually:
lat_new = x&lat
lat_new(0:180) = x&lat(181:361)
lat_new(181:361) = x&lat(0:180)
and code a similar shift/switch for the data in variable 'x' itself. This
would be a bit extra work, considering the first method should result in
the exact same result.
Hope this helps.
Kyle
----------------------------------------
Kyle S. Griffin
Department of Atmospheric and Oceanic Sciences
University of Wisconsin - Madison
1225 W Dayton St, Madison, WI 53706
Email: ksgriffin2@wisc.edu
On Tue, Feb 19, 2013 at 5:34 PM, Jiang, Lifen <lfjiang@ou.edu> wrote:
> **
> Hello all,
>
> I have a data file in which the lon layout like: 0, ..., 180, -179, ...,
> -1.
>
> How can I change the order of lon to: -179, ..., 0, ..., 180?
>
> Thank you in advance for your help!
>
> Lifen
>
>
>
>
> 2013-02-19
> ------------------------------
> Jiang, Lifen
>
> _______________________________________________
> 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 Tue Feb 19 19:29:40 2013
This archive was generated by hypermail 2.1.8 : Thu Feb 21 2013 - 11:26:43 MST