Re: re-ordering variable dimensions

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Mon, 30 Jan 2006 09:00:30 -0700 (MST)

> I have a variable of dimensions (time, longitude, latitude) which I would like
> to re-order to (time, latitude, longitude). I know how to do that with a
> 2-dimensional variable but not with a 3-dimensional one. Can someone help?

Use NCL's dimension reordering syntax:

     x(time, longitude, latitude)

     xNew = x(time|:,latitude|:,longitude|:)

Other tidbits:
     xNew = x(time|:,latitude|::-1,longitude|:) ; reorder data

     xNew = x(time|0:2,latitude|8:12:,longitude|::5)

Note that the coordinate data is automatically handled.


ncl-talk mailing list
Received on Mon Jan 30 2006 - 09:00:30 MST

This archive was generated by hypermail 2.2.0 : Mon Jan 30 2006 - 09:36:57 MST