[gradsusr] define variable independent of time
Ricardo Hallak
hallak at model.iag.usp.br
Sat Sep 10 07:25:09 EDT 2011
Dear Bernd,
I would use the fwrite command:
For each computation, you can fwrite the new defined fields in a single binary file, if they have the same horizontal dimensions. With an appropriate ctl that describe correctly the new binary file as the defined fields were at the same time, you can do calculations.
Ricardo
On Sat, 10 Sep 2011 09:30:06 +0100, Becker, Bernd 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110910/61de2c96/attachment-0003.html
More information about the gradsusr
mailing list