[gradsusr] define variable independent of time
Becker, Bernd
bernd.becker at metoffice.gov.uk
Mon Sep 12 04:03:26 EDT 2011
Jeff,
That is is the really hard part.
Each item fx and obs describes a chunk of a time series.
One would have to manually calculate the start and end dates
with respect to the reference dfile.
If only (and I think Mike explained it a long time ago, and I cannot
find the
email) one could
set file 1
set t 2 34
define whatever
set dfile 2
set t 6 39
define theother
and happily combine whatever with theother.
Think about multimodel ensemble hindcast analysis, trying to composit
observed phenomena with modelled phenomena that simply
don't happen simultaneously.
All the best,
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 Jeffrey Duda
Sent: 10 September 2011 18:41
To: GrADS Users Forum
Subject: Re: [gradsusr] define variable independent of time
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
<tel:%2B44%20%280%29870%20900%205050>
E-mail:bernd.becker at metoffice.gov.uk
<mailto:E-mail%3Abernd.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/20110912/44da6546/attachment-0003.html
More information about the gradsusr
mailing list