<div dir="ltr"><div><div><div>Hi all, I am trying to calculate potential temperature as follows<br><br>h = addfile("<a href="http://air.mon.mean.nc">air.mon.mean.nc</a>","r")<br>lat = h->lat<br>lon = h->lon<br>time = h->time<br>temp = h->air<br>l = h->level*10<br><br><br>a = temp(:,:,0,0) ;tim,lv,lat,lon,<br>do i = 0,time-1<br>        do j = 0,l-1<br>                theta(i,j) = a*(10000/l(j))^0.286<br>        end do<br>end do<br><br>fatal:Loop end must be scalar, can't execute loop<br><br></div>Any help?<br><br></div>Regards<br></div>Arijeet<br></div>