[gradsusr] define variable independent of time
Jeffrey Duda
jdduda at iastate.edu
Sat Sep 10 13:40:56 EDT 2011
You can reference the time of a variable when you use it in a statement.
For example, you could do
'd var.2(time=12Z01JAN1996) - var.3(time=18Z13AUG2010)'
This should help you do what you want to do.
Jeff Duda
On Sat, Sep 10, 2011 at 3:30 AM, Becker, Bernd <
bernd.becker at metoffice.gov.uk> wrote:
> **
> Thanks Arlindo,
>
> That would be nice for single numbers.
>
> It as one notch more elaborate:
>
> 'set dfile 2'
> 'set t 2 33'
> 'define obs = 'var'.2'
> 'set dfile 3'
> 'set t 2 33'
> 'define fx = 'var'.3'
> file 2 and 3 have different time frames.
>
> d fx-obs
>
> fails.
> And it would be a real bummer to have to calculate the times from one file
> relative
> to the other file.
>
> Compositing in this way would be really hard.
>
> Enjoy the weekend!
> Bernd.
>
>
> --
> Bernd Becker Climate Impacts Product Development
> Met Office Hadley Centre FitzRoy Road Exeter Devon EX1 3PB United
> Kingdom
> Tel.: +44 (0) 1392 884511 Fax: +44 (0)870 900 5050
> E-mail:bernd.becker at metoffice.gov.uk -
> http://www.metoffice.gov.uk/research/our-scientists/seasonal-to-decadal/bernd-becker
> http://www.metoffice.gov.uk/news/releases/archive/2011/weather-game
>
>
> ------------------------------
> *From:* gradsusr-bounces at gradsusr.org [mailto:
> gradsusr-bounces at gradsusr.org] *On Behalf Of *Arlindo da Silva
> *Sent:* 09 September 2011 17:40
> *To:* GrADS Users Forum
> *Subject:* Re: [gradsusr] define variable independent of time
>
> On Fri, Sep 9, 2011 at 12:05 PM, Becker, Bernd <
> bernd.becker at metoffice.gov.uk> wrote:
>
>>
>> Simple question,
>> complicated answer:
>>
>> I would like to composite stuff from several files.
>>
>> Each file has its own time and date info in its own .ctl file.
>>
>> How can I add elements from different such files?
>>
>> How can I break away from the strict treatment of the time dimension in
>> grads?
>>
>> open file1.ctl
>> define a=ave(b,t=1,t=34)
>> close 1
>> open file2.ctl
>> define c= ave(b,t=3,t=9)
>> close 2
>> etc.
>>
>> d a+c
>> Cannot contour grid - all undefined values
>>
>>
> Try:
>
> d a(t=1)+c(t=1)
>
>
> --
> Arlindo da Silva
> dasilva at alum.mit.edu
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
--
Jeff Duda
Iowa State University
Meteorology Graduate Student
www.meteor.iastate.edu/~jdduda <http://www.meteor.iastate.edu/%7Ejdduda>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110910/acae5974/attachment-0003.html
More information about the gradsusr
mailing list