<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Happily combining 'whatever' with 'theother' requires a metadata override for one of the two defined variables. The best way to do this is not with define but by using fwrite and writing a new descriptor file that has a TDEF that matches one of the variables (or it could be completely abstract, maybe this would be better to avoid confusion later on). If the variables 'whatever' and 'theother' do not vary in E, you can use the E dimension to collect them into the same data set -- this might make the subsequent comparison a little easier. <div>--Jennifer</div><div><br></div><div><br><div><div><br><div><div><br></div><div>On Sep 12, 2011, at 4:03 AM, Becker, Bernd wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"> <meta content="text/html; charset=us-ascii" http-equiv="Content-Type"> <meta name="GENERATOR" content="MSHTML 8.00.6001.19120"> <div> <div dir="ltr" align="left"><span class="558105707-12092011"><font color="#0000ff" size="2" face="Arial">Jeff,</font></span></div> <div dir="ltr" align="left"><span class="558105707-12092011"><font color="#0000ff" size="2" face="Arial"></font></span> </div> <div dir="ltr" align="left"><span class="558105707-12092011"><font color="#0000ff" size="2" face="Arial">That is is the really hard part. </font></span></div> <div dir="ltr" align="left"><span class="558105707-12092011"><font color="#0000ff" size="2" face="Arial">Each item fx and obs describes a chunk of a time series.</font></span></div> <div dir="ltr" align="left"><span class="558105707-12092011"><font color="#0000ff" size="2" face="Arial">One would have to manually calculate the start and end dates</font></span></div> <div dir="ltr" align="left"><span class="558105707-12092011"><font color="#0000ff" size="2" face="Arial">with respect to the reference dfile. </font></span></div> <div dir="ltr" align="left"><span class="558105707-12092011"><font color="#0000ff" size="2" face="Arial"></font></span> </div> <div dir="ltr" align="left"><span class="558105707-12092011"><font color="#0000ff" size="2" face="Arial">If only (and I think Mike explained it a long time ago, and I cannot find the</font></span></div> <div dir="ltr" align="left"><span class="558105707-12092011"><font color="#0000ff" size="2" face="Arial">email) one could</font></span></div> <div dir="ltr" align="left"><span class="558105707-12092011"><font color="#0000ff" size="2" face="Arial">set file 1</font></span></div> <div dir="ltr" align="left"><span class="558105707-12092011"><font color="#0000ff" size="2" face="Arial">set t 2 34</font></span></div> <div dir="ltr" align="left"><span class="558105707-12092011"><font color="#0000ff" size="2" face="Arial">define whatever</font></span></div> <div dir="ltr" align="left"><span class="558105707-12092011"><font color="#0000ff" size="2" face="Arial">set dfile 2</font></span></div> <div dir="ltr" align="left"><span class="558105707-12092011"><font color="#0000ff" size="2" face="Arial">set t 6 39</font></span></div> <div dir="ltr" align="left"><span class="558105707-12092011"><font color="#0000ff" size="2" face="Arial">define theother</font></span></div> <div dir="ltr" align="left"><span class="558105707-12092011"><font color="#0000ff" size="2" face="Arial"></font></span> </div> <div dir="ltr" align="left"><span class="558105707-12092011"><font color="#0000ff" size="2" face="Arial">and happily combine whatever with theother.</font></span></div> <div dir="ltr" align="left"><span class="558105707-12092011"><font color="#0000ff" size="2" face="Arial"></font></span> </div> <div dir="ltr" align="left"><span class="558105707-12092011"><font color="#0000ff" size="2" face="Arial">Think about multimodel ensemble hindcast analysis, trying to composit</font></span></div> <div dir="ltr" align="left"><span class="558105707-12092011"><font color="#0000ff" size="2" face="Arial">observed phenomena with modelled phenomena that simply </font></span></div> <div dir="ltr" align="left"><span class="558105707-12092011"><font color="#0000ff" size="2" face="Arial">don't happen simultaneously. </font></span></div> <div dir="ltr" align="left"><span class="558105707-12092011"><font color="#0000ff" size="2" face="Arial"></font></span> </div> <div dir="ltr" align="left"><span class="558105707-12092011"><font color="#0000ff" size="2" face="Arial">All the best,</font></span></div> <div dir="ltr" align="left"><span class="558105707-12092011"><font color="#0000ff" size="2" face="Arial">Bernd.</font></span></div> <div dir="ltr" align="left"><span class="558105707-12092011"></span> </div> <div><font color="#0000ff" size="2" face="Arial"></font> </div><!-- Converted from text/plain format --><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: +44 (0)870 900 5050<br>E-mail:<a href="mailto:bernd.becker@metoffice.gov.uk">bernd.becker@metoffice.gov.uk</a> - <a href="http://www.metoffice.gov.uk/research/our-scientists/seasonal-to-decadal/bernd-becker">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">http://www.metoffice.gov.uk/news/releases/archive/2011/weather-game</a><br></font></p> <div> </div><br> <div dir="ltr" lang="en-us" class="OutlookMessageHeader" align="left"> <hr tabindex="-1"> <font size="2" face="Tahoma"><b>From:</b> gradsusr-bounces@gradsusr.org [<a href="mailto:gradsusr-bounces@gradsusr.org">mailto:gradsusr-bounces@gradsusr.org</a>] <b>On Behalf Of </b>Jeffrey Duda<br><b>Sent:</b> 10 September 2011 18:41<br><b>To:</b> GrADS Users Forum<br><b>Subject:</b> Re: [gradsusr] define variable independent of time<br></font><br></div> <div></div>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 style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote"><u></u> <div> <div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">Thanks Arlindo,</font></span></div> <div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial"></font></span> </div> <div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">That would be nice for single numbers.</font></span></div> <div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial"></font></span> </div> <div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">It as one notch more elaborate:</font></span></div> <div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial"></font></span> </div> <div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial"> '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" size="2" face="Arial"> 'set dfile 3'<br> 'set t 2 33'<br> 'define fx = 'var'.3'<br></font></span></div> <div><font color="#0000ff" size="2" face="Arial"><span>file 2 and 3 have different time frames.</span></font></div> <div><font color="#0000ff" size="2" face="Arial"><span></span></font> </div> <div><font color="#0000ff" size="2" face="Arial"><span>d fx-obs </span></font></div> <div><font color="#0000ff" size="2" face="Arial"><span></span></font> </div> <div><font color="#0000ff" size="2" face="Arial"><span>fails. </span></font></div> <div><font color="#0000ff" size="2" face="Arial"><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" size="2" face="Arial"><span>to the other file.</span></font></div> <div><font color="#0000ff" size="2" face="Arial"><span></span></font> </div> <div><font color="#0000ff" size="2" face="Arial"><span>Compositing in this way would be really hard. </span></font></div> <div><font color="#0000ff" size="2" face="Arial"><span></span></font> </div> <div><font color="#0000ff" size="2" face="Arial"><span>Enjoy the weekend!<br>Bernd.</span></font></div> <div><font color="#0000ff" size="2" face="Arial"><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" target="_blank" value="+448709005050">+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" lang="en-us" align="left"> <hr> <font size="2" face="Tahoma"><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></div> _______________________________________________<br>gradsusr mailing list<br><a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>http://gradsusr.org/mailman/listinfo/gradsusr<br></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>--</div><div>Jennifer M. Adams</div><div>IGES/COLA</div><div>4041 Powder Mill Road, Suite 302</div><div>Calverton, MD 20705</div><div><a href="mailto:jma@cola.iges.org">jma@cola.iges.org</a></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span></div></span> </div><br></div></div></div></body></html>