new array

From: Xiaoyan Ma <xiaoyan.ma_at_nyahnyahspammersnyahnyah>
Date: Sat Nov 26 2011 - 13:17:40 MST
Hi,

I read in an array ( z30(time, lev, lat, lon) ) from nc file, and then I want to define a new array ( dz(lev, lat, lon) ), which is calculated from z3. 
below is what I did

 z30  = in[:]->Z3
 z3   = dim_avg_n_Wrap(z30, 0)
;;;;
 jz  = dimsizes( z3 )
 dz     = new ( jz, typeof(z3))

 do l = 1,lev-1
 dz(l,:,:) = z3(l,:,:) - z3(l+1,:,:)
 end do

The erroe is : "fatal:Loop end must be scalar, can't execute loop, error occurred at or near line "end do".

Anyone help me to fix the problem? Thanks,

Xiaoyan

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sat Nov 26 13:17:47 2011

This archive was generated by hypermail 2.1.8 : Wed Nov 30 2011 - 19:52:47 MST