[gradsusr] define variable independent of time

Becker, Bernd bernd.becker at metoffice.gov.uk
Fri Sep 16 09:46:34 EDT 2011


Jenni et al. 
 
Many thanks, writing out and reading back in with a bespoke ctl file is
the way to go. 
 
Unless someone writes a function to temporarily ignore one of the
dimension settings
 
set dfile 1
set t 3 56
define a=aave(T,lon=10,lon=30,lat=20,lat=60), 
define b=ignore(a,"time")
 
so that b holds 52 area averages of T and is independent of time. 
 
repeat with another file (different time domain) and combine/composite
the two.
 
Thanks!
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 Jennifer Adams
Sent: 12 September 2011 18:57
To: GrADS Users Forum
Subject: Re: [gradsusr] define variable independent of time


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.  
--Jennifer




On Sep 12, 2011, at 4:03 AM, Becker, Bernd wrote:


	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> 
	
	_______________________________________________
	gradsusr mailing list
	gradsusr at gradsusr.org
	http://gradsusr.org/mailman/listinfo/gradsusr
	


--
Jennifer M. Adams
IGES/COLA
4041 Powder Mill Road, Suite 302
Calverton, MD 20705
jma at cola.iges.org



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110916/86d3e351/attachment-0003.html 


More information about the gradsusr mailing list