<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV></DIV>
<DIV>Davide.</DIV>
<DIV>What I typically do is to output GrADS data into an ASCII textfile and then read that directly into Excel. There are many resources on how to export ASCII textfiles from GrADS (cookbooks...), let me know if you can't locate them.</DIV>
<DIV>Good Luck,</DIV>
<DIV>teddy<BR> </DIV>
<P><A href="http://www.teddyallen.com/" target=_blank rel=nofollow>http://www.teddyallen.com</A></P>
<P>"To move quickly, go alone. To move far, go <FONT color=#ff0000><EM><STRONG>together</STRONG></EM></FONT>." </P>
<P>African Proverb</P>
<DIV><BR></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><BR>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT face=Tahoma size=2>
<HR SIZE=1>
<B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Tononi Davide <Ext-Davide.Tononi@VTT.FI><BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> GRADSUSR@LIST.CINECA.IT<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Wed, January 13, 2010 9:31:39 PM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Exporting data from Grads to excel<BR></FONT><BR>
<STYLE><!--.EmailQuote {margin-left:1pt;padding-left:4pt;border-left:#800000 2px solid;}--></STYLE>
<FONT face="Arial, sans-serif" size=2>
<DIV>Dear users.</DIV>
<DIV>I need to export some data reconrd from grads to excel file but i'm not able to do this.</DIV>
<DIV>I have written this command line but doesn't work.</DIV>
<DIV>Say that there is a problems on this command:</DIV>
<DIV> </DIV>
<DIV><FONT face="Courier New">'display rh2m'</FONT></DIV>
<DIV><FONT face="Courier New">filename='test.xls'</FONT></DIV>
<DIV><FONT face="Courier New">'set gxout print'</FONT></DIV>
<DIV><FONT face="Courier New">'d rh2m'</FONT></DIV>
<DIV><FONT face="Courier New">'rc=(test.xls,rh2m)'</FONT></DIV>
<DIV><FONT face="Courier New"> </FONT></DIV>
<DIV>That i've written to export.</DIV>
<DIV>Some of you can suggest to me how can i export the value of this variable rh2m.</DIV>
<DIV>Another question it's about the command IF that in my programme doesn't work.</DIV>
<DIV>I write some like this but says that it is not correct unknow command: </DIV>
<DIV> </DIV>
<DIV><FONT face="Courier New">'if (t2m>273.15)'</FONT></DIV>
<DIV><FONT face="Courier New"> 'define eps1=exp((-6763.6/t2m)-4.9283*log(t2m)+54.23)'</FONT></DIV>
<DIV><FONT face="Courier New">'else'</FONT></DIV>
<DIV><FONT face="Courier New"> 'define eps1=exp((-6141/t2m)+24.3)'</FONT></DIV>
<DIV><FONT face="Courier New">'endif'</FONT></DIV>
<DIV><FONT face="Courier New"> </FONT></DIV>
<DIV><FONT face="Courier New">Thank you so much</FONT></DIV>
<DIV><FONT face="Courier New">davide</FONT></DIV>
<DIV><FONT face="Courier New"> </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Courier New">* Statistics on 2m air temperature and relative humidity in Europe from</FONT></DIV>
<DIV><FONT face="Courier New">* 1/1/1999 to 31/12/2008</FONT></DIV>
<DIV><FONT face="Courier New">* The source data are ECMWF ERA Interim Reanalysis, provided by the European</FONT></DIV>
<DIV><FONT face="Courier New">* Centre for Medium-Range Weather Forecast, in grib format, with spatial</FONT></DIV>
<DIV><FONT face="Courier New">* resolution of 1,5deg x 1,5deg lat/lon, and temporal resolution of 6h (data</FONT></DIV>
<DIV><FONT face="Courier New">* at 00, 06, 12, 18 UTC)</FONT></DIV>
<DIV><FONT face="Courier New">* There are 49x28 grid points (LON from -27 to 45, LAT from 33 to 73.5), and</FONT></DIV>
<DIV><FONT face="Courier New">* 14612 time steps</FONT></DIV>
<DIV><FONT face="Courier New"> </FONT></DIV>
<DIV><FONT face="Courier New">'reinit'</FONT></DIV>
<DIV><FONT face="Courier New">'open temperature_Europe_10y.ctl'</FONT></DIV>
<DIV><FONT face="Courier New">'set grads off'</FONT></DIV>
<DIV><FONT face="Courier New">'set t 1 14612'</FONT></DIV>
<DIV><FONT face="Courier New">'define t2m=no2tsfc.1'</FONT></DIV>
<DIV><FONT face="Courier New"> </FONT></DIV>
<DIV><FONT face="Courier New">'set t 1 1461'</FONT></DIV>
<DIV><FONT face="Courier New">'set lat 45'</FONT></DIV>
<DIV><FONT face="Courier New">'set lon 23'</FONT></DIV>
<DIV><FONT face="Courier New">'draw title 2mT at lat45 lon23'</FONT></DIV>
<DIV><FONT face="Courier New">'draw ylab 2m Temperature'</FONT></DIV>
<DIV><FONT face="Courier New">'set ccolor 2'</FONT></DIV>
<DIV><FONT face="Courier New">'set cmark 0'</FONT></DIV>
<DIV><FONT face="Courier New">*'display (t2m-273.15)'</FONT></DIV>
<DIV><FONT face="Courier New">*'set fwrite t2m_lat45_lon23.gif'</FONT></DIV>
<DIV><FONT face="Courier New">*'printim t2m_lat45_lon23.gif white gif'</FONT></DIV>
<DIV><FONT face="Courier New"> </FONT></DIV>
<DIV><FONT face="Courier New">'open dptemperature_Europe_10y.ctl'</FONT></DIV>
<DIV><FONT face="Courier New">'set t 1 1461'</FONT></DIV>
<DIV><FONT face="Courier New">'define tdp2m=no2dsfc.2'</FONT></DIV>
<DIV><FONT face="Courier New"> </FONT></DIV>
<DIV><FONT face="Courier New">*Calculation of saturated pressure of water vapour</FONT></DIV>
<DIV><FONT face="Courier New"> </FONT></DIV>
<DIV><FONT face="Courier New"> 'define eps1=exp((-6763.6/t2m)-4.9283*log(t2m)+54.23)'</FONT></DIV>
<DIV><FONT face="Courier New"> </FONT></DIV>
<DIV><FONT face="Courier New">*Calculation of water vapour pressure</FONT></DIV>
<DIV><FONT face="Courier New"> </FONT></DIV>
<DIV><FONT face="Courier New"> 'define eps2=exp((-6763.6/tdp2m)-4.9283*log(tdp2m)+54.23)'</FONT></DIV>
<DIV><FONT face="Courier New"> </FONT></DIV>
<DIV><FONT face="Courier New">*Calculation of relative humidity</FONT></DIV>
<DIV><FONT face="Courier New"> </FONT></DIV>
<DIV><FONT face="Courier New">'define rh2m=eps2/eps1'</FONT></DIV>
<DIV><FONT face="Courier New">'display rh2m'</FONT></DIV>
<DIV><FONT face="Courier New">filename='test.xls'</FONT></DIV>
<DIV><FONT face="Courier New">'set gxout print'</FONT></DIV>
<DIV><FONT face="Courier New">'d rh2m'</FONT></DIV>
<DIV><FONT face="Courier New">'rc=(test.xls,rh2m)'</FONT></DIV>
<DIV><FONT face="Courier New"> </FONT></DIV>
<DIV><FONT face="Courier New"> </FONT></DIV>
<DIV> </DIV></FONT></DIV></DIV><!-- cg9.c2.mail.re1.yahoo.com compressed/chunked Tue Jan 12 19:59:57 PST 2010 --></div><br>
</body></html>