array reordering

From: Jim Edwards <jedwards_at_nyahnyahspammersnyahnyah>
Date: Fri, 31 Mar 2006 09:21:37 -0700

I have an array v with dims time,lat,lev,lon and I would like an array x
with dims time,lev,ncol where ncol
represents a collapse of lat x lon , the following gives a fairly
uninformative syntax error. Oh wise and wonderful ncl oracle won't you
suggest a better way?

           dims = getvardims(v)
          do i=0,sizes(1)-1
             do j=0,sizes(3)-1
                n=i*sizes(3)+j
               x($dims(0)$ | :,$dims(2)$ | :,n) = v($dims(0)$ |
:,i,$dims(2)$ | :,j)
             end do
           end do

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Mar 31 2006 - 09:21:37 MST

This archive was generated by hypermail 2.2.0 : Fri Mar 31 2006 - 10:32:28 MST