<DIV class="msgbody clearfix" id=message56111317385312936031540061004754446026123 style="VISIBILITY: visible"><!-- type = text --> <SCRIPT defer type=text/javascript> YAHOO.Shortcuts.hasSensitiveText = false; YAHOO.Shortcuts.doUlt = false; YAHOO.Shortcuts.location = "us"; YAHOO.Shortcuts.lang = "us"; YAHOO.Shortcuts.document_id = 0; YAHOO.Shortcuts.document_type = ""; YAHOO.Shortcuts.document_title = ""; YAHOO.Shortcuts.document_publish_date = ""; YAHOO.Shortcuts.document_author = ""; YAHOO.Shortcuts.annotationSet = { "lw_1186204683_0": { "text": "airtemp.nc", "extended": 0, "startchar": 856, "endchar": 865, "start": 856, "end": 865, "extendedFrom": "", "weight": 1, "type": ["shortcuts:/us/place/virtual/web_site"], "category": ["IDENTIFIER"] ,"context": " MEAN) of air temprature,u,v and omega. \x27sdfopen airtemp.nc\x27 \x27sdfopen uwind.nc\x27 \x27sdfopen vwind.nc\x27 \x27sdfopen"}, "lw_1186204683_1": { "text": "uwind.nc", "extended": 0, "startchar": 888, "endchar": 895,
"start": 888, "end": 895, "extendedFrom": "", "weight": 1, "type": ["shortcuts:/us/place/virtual/web_site"], "category": ["IDENTIFIER"] ,"context": " and omega. \x27sdfopen airtemp.nc\x27 \x27sdfopen uwind.nc\x27 \x27sdfopen vwind.nc\x27 \x27sdfopen omega.nc\x27 \x27PP ="}, "lw_1186204683_2": { "text": "vwind.nc", "extended": 0, "startchar": 918, "endchar": 925, "start": 918, "end": 925, "extendedFrom": "", "weight": 1, "type": ["shortcuts:/us/place/virtual/web_site"], "category": ["IDENTIFIER"] ,"context": " airtemp.nc\x27 \x27sdfopen uwind.nc\x27 \x27sdfopen vwind.nc\x27 \x27sdfopen omega.nc\x27 \x27PP = lev\x27 \x27set lat 0"}, "lw_1186204683_3": { "text": "omega.nc", "extended": 0, "startchar": 948, "endchar": 955, "start": 948, "end": 955, "extendedFrom": "", "weight": 1, "type": ["shortcuts:/us/place/virtual/web_site"], "category": ["IDENTIFIER"] ,"context": " uwind.nc\x27 \x27sdfopen vwind.nc\x27 \x27sdfopen omega.nc\x27 \x27PP = lev\x27 \x27set lat 0 50\x27
\x27set lon 400"}, "lw_1186204683_4": { "text": "Tehran, Iran", "extended": 0, "startchar": 2599, "endchar": 2610, "start": 2599, "end": 2610, "extendedFrom": "", "weight": 0.999122, "type": ["shortcuts:/us/instance/place/ir/town"], "category": ["PLACE"] ,"context": " Dept. Tarbiat Modares University Tehran, Iran Need a vacation? Get great deals to" , "metaData": { "geoArea": "85.9871", "geoCountry": "Iran", "geoIsoCountryCode": "IR", "geoLocation": "(51.408829, 35.702591)", "geoName": "Tehran", "geoPlaceType": "Town", "geoState": "Tehran", "geoTown": "Tehran", "type": "shortcuts:/us/instance/place/ir/town" } }, "lw_1186204683_5": { "text": "Get great deals to amazing places ", "extended": 0, "startchar": 2863, "endchar": 2897, "start": 2863, "end": 2897, "extendedFrom": "", "weight": 1, "type": ["shortcuts:/us/instance/identifier/hyperlink/http"], "category": ["IDENTIFIER"] ,"context": " University Tehran, Iran Need a vacation? Get great deals to amazing
places on Yahoo! Travel." , "metaData": { "linkHref": "http://us.rd.yahoo.com/evt=48256/*http://travel.yahoo.com/;_ylc=X3oDMTFhN2hucjlpBF9TAzk3NDA3NTg5BHBvcwM1BHNlYwNncm91cHMEc2xrA2VtYWlsLW5jbQ--", "linkProtocol": "http", "linkRel": "nofollow", "linkTarget": "_blank" } }, "lw_1186204683_6": { "text": "Yahoo! Travel", "extended": 0, "startchar": 2905, "endchar": 2917, "start": 2905, "end": 2917, "extendedFrom": "", "weight": 0.462173, "type": ["shortcuts:/us/instance/organization/company/yahoo_property"], "category": ["ORGANIZATION"] ,"context": " a vacation? Get great deals to amazing places on Yahoo! Travel." , "metaData": { "yprop_name": "Yahoo! Travel", "yprop_url": "http://travel.yahoo.com/" } } }; YAHOO.Shortcuts.overlaySpaceId = "97546169"; YAHOO.Shortcuts.hostSpaceId = "97546168"; </SCRIPT> <DIV id=yiv108421770> <DIV>Dear GrADS-users,<BR>I am trying to write a script for calculating diabatic heating.<BR>Actually, it can be computed from the thermodynamic
equation.<BR>It is consist of three following terms: <BR>''(dtheta/dt)+(u*dtheta/dx+v*dtheta/dy)-(omega*dtheta/dp)''<BR>I have written a script and it seems that I have succeeded to compute terms 1 and 2 but somthing is wrong with term3.</DIV> <DIV>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? <BR>and also,<BR>I have really appreciate any help to make a correction of term3.</DIV> <DIV>Sorry for long note and thank you very much for your time.<BR>Azar Zarrin</DIV> <DIV><BR>'reinit'<BR>*****opening four files (NCEP/NCAR DAILY MEAN) of air temprature,u,v and omega. <BR>'sdfopen <A href="http://airtemp.nc/" target=_blank><SPAN id=lw_1186204683_0 style="BACKGROUND: none transparent scroll repeat 0% 0%"><FONT color=#003399>airtemp.nc</FONT></SPAN></A>'<BR>'sdfopen <A href="http://uwind.nc/" target=_blank><SPAN id=lw_1186204683_1 style="BACKGROUND: none transparent scroll repeat 0% 0%"><FONT
color=#003399>uwind.nc</FONT></SPAN></A>'<BR>'sdfopen <A href="http://vwind.nc/" target=_blank><SPAN id=lw_1186204683_2 style="BACKGROUND: none transparent scroll repeat 0% 0%"><FONT color=#003399>vwind.nc</FONT></SPAN></A>'<BR>'sdfopen <A href="http://omega.nc/" target=_blank><SPAN id=lw_1186204683_3 style="BACKGROUND: none transparent scroll repeat 0% 0%"><FONT color=#003399>omega.nc</FONT></SPAN></A>'</DIV> <DIV>'PP = lev'<BR>'set lat 0 50'<BR>'set lon 400 480'<BR>'set lev 1000 100'<BR>'set t 2'</DIV> <DIV>"define Term1 = (air(t-1)*pow(1000/PP(t-1),0.286)-air*pow(1000/PP,0.286)))/24"<BR>'set lat 32.5'<BR>'set zlog on'<BR>'d Term1'</DIV> <DIV>say 'hit return to continue and plot'<BR>pull cmd<BR>'c'</DIV> <DIV>'set lat 0 50'<BR>'set lon 400 480'<BR>'set lev 1000 100'<BR>'set t 2'<BR>'define pt=air+273.15*pow(1000/PP,0.286)'<BR>"dptx =(cdiff(pt,x))"<BR>"dpty =(cdiff(pt,y))"<BR>'set dfile 2'<BR>'u = uwnd'<BR>"dux =(cdiff(u,x))"<BR>'set dfile 3'<BR>'v=vwnd'<BR>"dvy
=(cdiff(v,y))"<BR>'dx = cdiff(lon,x)*cos(lat*3.14/180)*111325'<BR>"dy =cdiff(lat,y)*55445"<BR>'define Term2 = (pt*(dux/dx))+(pt*(dvy/dy))'<BR>'set lat 32.5'<BR>'set zlog on'<BR>'d Term2'</DIV> <DIV><BR>say 'hit return to continue and plot'<BR>pull cmd<BR>'c'</DIV> <DIV>'set lat 0 50'<BR>'set lon 400 480'<BR>'set lev 1000 100'<BR>'set t 2'<BR>'set dfile 1'<BR>"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))"<BR>'set lat 32.5'<BR>'set zlog on'<BR>'d Term3'<BR>say error.....<BR>Cannot plot data - all undefined values.</DIV> <DIV>----------------------------------------------------------------<BR>Azar Zarrin<BR>Geography Dept.<BR>Tarbiat Modares University<BR><SPAN id=lw_1186204683_4 style="CURSOR: hand; BORDER-BOTTOM: #0066cc 1px dashed; HEIGHT: 1em">Tehran, Iran</SPAN></DIV></DIV></DIV><p> 
<hr size=1>Ready for the edge of your seat?
<a href="http://us.rd.yahoo.com/evt=48220/*http://tv.yahoo.com/">Check out tonight's top picks</a> on Yahoo! TV.