[gradsusr] Function Sum for multiple variable within one file for each time t=1 to t=366

Eric Altshuler ela at cola.iges.org
Fri Jun 17 16:30:30 EDT 2011


Hello Serge,

You need to do it this way:

'set t 1 366'
'define c=a+b'

Best regards,

Eric L. Altshuler
Assistant Research Scientist
Center for Ocean-Land-Atmosphere Studies
4041 Powder Mill Road, Suite 302
Calverton, MD 20705-3106
USA

E-mail: ela at cola.iges.org
Phone: (301) 902-1257
Fax: (301) 595-9793

----- Original Message -----
From: "Rafanoharana Serge Claudio" <rafanoharana at gmail.com>
To: gradsusr at gradsusr.org
Sent: Friday, June 17, 2011 12:52:24 PM
Subject: [gradsusr] Function Sum for multiple variable within one file for each time t=1 to t=366


Dear all, 

I would like to sum two variable within one netcdf file for each time t=1 to t=366. 
I have one netcdf file ( file.nc ) which contains two variables a and b from t=1 to t=366 
What I am trying to do is to sum each value per time, I mean 
sum a,b for t=1 
sum a,b for t=2 
... 
sum a,b for t=366 

I tried this command: 

define c=sum(a+b, t=1, t=366) 

but didn't give me what I needed. 
What I expect to obtain is that the variable c will contain the SUM of the two variables a and b from each t=1 to t=366 
I hope you get my problem, 

Best Regards, 

Serge 
_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org
http://gradsusr.org/mailman/listinfo/gradsusr



More information about the gradsusr mailing list