You can reference the time of a variable when you use it in a statement. For example, you could do<br><br>'d var.2(time=12Z01JAN1996) - var.3(time=18Z13AUG2010)'<br><br>This should help you do what you want to do.<br>
<br>Jeff Duda<br><br><div class="gmail_quote">On Sat, Sep 10, 2011 at 3:30 AM, Becker, Bernd <span dir="ltr"><<a href="mailto:bernd.becker@metoffice.gov.uk">bernd.becker@metoffice.gov.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<u></u>
<div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Thanks Arlindo,</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">That would be nice for single numbers.</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">It as one notch more elaborate:</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"> 'set dfile 2'<br> 'set t 2 33'<br>
'define obs = 'var'.2'<br></font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"> 'set dfile 3'<br> 'set t 2 33'<br>
'define fx = 'var'.3'<br></font></span></div>
<div><font color="#0000ff" face="Arial" size="2"><span>file 2
and 3 have different time frames.</span></font></div>
<div><font color="#0000ff" face="Arial" size="2"><span></span></font> </div>
<div><font color="#0000ff" face="Arial" size="2"><span>d
fx-obs </span></font></div>
<div><font color="#0000ff" face="Arial" size="2"><span></span></font> </div>
<div><font color="#0000ff" face="Arial" size="2"><span>fails.
</span></font></div>
<div><font color="#0000ff" face="Arial" size="2"><span>And it
would be a real bummer to have to calculate the times from one file
relative</span></font></div>
<div><font color="#0000ff" face="Arial" size="2"><span>to the
other file.</span></font></div>
<div><font color="#0000ff" face="Arial" size="2"><span></span></font> </div>
<div><font color="#0000ff" face="Arial" size="2"><span>Compositing in this way would be really hard.
</span></font></div>
<div><font color="#0000ff" face="Arial" size="2"><span></span></font> </div>
<div><font color="#0000ff" face="Arial" size="2"><span>Enjoy
the weekend!<br>Bernd.</span></font></div>
<div><font color="#0000ff" face="Arial" size="2"><span></span></font> </div>
<p><font size="2">--<br>Bernd Becker Climate Impacts Product
Development<br>Met Office Hadley Centre FitzRoy Road
Exeter Devon EX1 3PB United Kingdom<br>Tel.: +44 (0) 1392
884511 Fax: <a href="tel:%2B44%20%280%29870%20900%205050" value="+448709005050" target="_blank">+44 (0)870 900 5050</a><br><a href="mailto:E-mail%3Abernd.becker@metoffice.gov.uk" target="_blank">E-mail:bernd.becker@metoffice.gov.uk</a> - <a href="http://www.metoffice.gov.uk/research/our-scientists/seasonal-to-decadal/bernd-becker" target="_blank">http://www.metoffice.gov.uk/research/our-scientists/seasonal-to-decadal/bernd-becker</a><br>
<a href="http://www.metoffice.gov.uk/news/releases/archive/2011/weather-game" target="_blank">http://www.metoffice.gov.uk/news/releases/archive/2011/weather-game</a><br></font></p>
<div> </div><br>
<div dir="ltr" align="left" lang="en-us">
<hr>
<font face="Tahoma" size="2"><b>From:</b> <a href="mailto:gradsusr-bounces@gradsusr.org" target="_blank">gradsusr-bounces@gradsusr.org</a>
[mailto:<a href="mailto:gradsusr-bounces@gradsusr.org" target="_blank">gradsusr-bounces@gradsusr.org</a>] <b>On Behalf Of </b>Arlindo da
Silva<br><b>Sent:</b> 09 September 2011 17:40<br><b>To:</b> GrADS Users
Forum<br><b>Subject:</b> Re: [gradsusr] define variable independent of
time<br></font><br></div>
<div></div>On Fri, Sep 9, 2011 at 12:05 PM, Becker, Bernd <span dir="ltr"><<a href="mailto:bernd.becker@metoffice.gov.uk" target="_blank">bernd.becker@metoffice.gov.uk</a>></span>
wrote:<br>
<div class="gmail_quote">
<blockquote style="border-left:#ccc 1px solid;margin:0px 0px 0px 0.8ex;padding-left:1ex" class="gmail_quote"><br>Simple question,<br>complicated answer:<br><br>I would
like to composite stuff from several files.<br><br>Each file has its own
time and date info in its own .ctl file.<br><br>How can I add elements from
different such files?<br><br>How can I break away from the strict treatment of
the time dimension in<br>grads?<br><br>open file1.ctl<br>define
a=ave(b,t=1,t=34)<br>close 1<br>open file2.ctl<br>define c=
ave(b,t=3,t=9)<br>close 2<br>etc.<br><br>d a+c<br>Cannot contour grid - all
undefined values<br><br></blockquote>
<div><br></div>
<div>Try:</div>
<div><br></div>
<div>d a(t=1)+c(t=1)</div>
<div><br></div>
<div><br></div></div><font color="#888888">-- <br>Arlindo da Silva<br><a href="mailto:dasilva@alum.mit.edu" target="_blank">dasilva@alum.mit.edu</a><br></font></div>
<br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Jeff Duda<br>Iowa State University<br>Meteorology Graduate Student<br><a href="http://www.meteor.iastate.edu/%7Ejdduda" target="_blank">www.meteor.iastate.edu/~jdduda</a><br>