Diabatic Heating

Azar Zarrin azarzarrin at YAHOO.COM
Fri Aug 3 03:20:11 EDT 2007


Dear GrADS-users,
I am trying to write a script for calculating diabatic heating.
Actually, it can be computed from the thermodynamic equation.
It is consist of three following terms:
''(dtheta/dt)+(u*dtheta/dx+v*dtheta/dy)-(omega*dtheta/dp)''
I have written a script and it seems that I have succeeded to compute terms 1 and 2 but somthing is wrong with term3.
  As I am not sure about their accuracy, would somebody please help me and check if the script is correct for terms 1 and 2?
and also,
I have really appreciate any help to make a correction of term3.
  Sorry for long note and thank you very much for your time.
Azar Zarrin

'reinit'
*****opening four files (NCEP/NCAR DAILY MEAN) of air temprature,u,v and omega.
'sdfopen airtemp.nc'
'sdfopen uwind.nc'
'sdfopen vwind.nc'
'sdfopen omega.nc'
  'PP = lev'
'set lat 0 50'
'set lon 400 480'
'set lev 1000 100'
'set t 2'
  "define Term1 = (air(t-1)*pow(1000/PP(t-1),0.286)-air*pow(1000/PP,0.286)))/24"
'set lat 32.5'
'set zlog on'
'd Term1'
  say 'hit return to continue and plot'
pull cmd
'c'
  'set lat 0 50'
'set lon 400 480'
'set lev 1000 100'
'set t 2'
'define pt=air+273.15*pow(1000/PP,0.286)'
"dptx =(cdiff(pt,x))"
"dpty =(cdiff(pt,y))"
'set dfile 2'
'u = uwnd'
"dux =(cdiff(u,x))"
'set dfile 3'
'v=vwnd'
"dvy =(cdiff(v,y))"
'dx = cdiff(lon,x)*cos(lat*3.14/180)*111325'
"dy =cdiff(lat,y)*55445"
'define Term2 = (pt*(dux/dx))+(pt*(dvy/dy))'
'set lat 32.5'
'set zlog on'
'd Term2'

say 'hit return to continue and plot'
pull cmd
'c'
  'set lat 0 50'
'set lon 400 480'
'set lev 1000 100'
'set t 2'
'set dfile 1'
"define Term3=(air(z-1)*pow(1000/PP(z-1),0.286)-air(z+1)*pow(1000/PP(z+1),0.286)))/(PP(z-1)-PP(z+1))"
'set lat 32.5'
'set zlog on'
'd Term3'
say error.....
Cannot plot data - all undefined values.
  ----------------------------------------------------------------
Azar Zarrin
Geography Dept.
Tarbiat Modares University
Tehran, Iran



---------------------------------
Need a vacation? Get great deals to amazing places on Yahoo! Travel.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20070803/7243cea2/attachment.html 


More information about the gradsusr mailing list