Hello,<br><br>I used a script to pull out the altitude/pressure level of a variable. It was the location of the altitude of a maximum variable value over a volume box. The main part of the scrip is as below. I also did the same for the maximum value of the variable, longitude and latitude as well. So the altitude became a variable data of pressure level against time, the same as others.<br>
<br>ti=1
<br>while (ti <=360)<br>'d maxloc(max(max(var1,lon=40,lon=270),lat=-40,lat=-20),lev=100, lev=300)'
<br>maxloc=sublin(result,114)
<br>zloc=subwrd(maxloc,4)
<br>'set z 'zloc
<br> v4.n=subwrd(result,4)<br>'reset'<br>n=n+1<br>ti=ti+1<br>endwhile<br><br>The question is how do I define the variable of altitude in a control file? For others, I use:<br>tv 0 99 1 variable maximum value (K)
<br>lonv 0 99 1 longitude(degree)
<br>latv 0 99 1 latitude(degree)
<br><br>I tried "altv 0 99 1 altitude(hPa)", but I'm not sure its correct, because I can't pull out the altitude data into a text file using the script below. The script works just fine for other variables (the variable, latitude and longitude), perhaps because the are linear. the altitude is no however.<br>
tt=1<br>while(tt<=360)<br>'set t 'tt<br>'d altv'<br>res1=subwrd(result,4)<br>rec=write('ua_ERA-altv-mnthly.txt',res1,append)<br>tt=tt+1<br>endwhile<br><br>Originally the altitude or the z level is defined as ZDEF 37 LEVELS 1 2 3 5 7 10 20 30 50 70 100 125 150 175 200 225 250 300 350 400 450 500 550 600 650 700 750 775 800 825 850 875 900 925 950 975 1000. I hope this information helps. So, how do I define a nonlinear variable in the control file?<br>