Dear Eric,<br><br>Thank you for your answer. It works.<br><br>Best regards,<br><br>Serge<br><br><br><div class="gmail_quote">2011/6/17 Eric Altshuler <span dir="ltr"><<a href="mailto:ela@cola.iges.org">ela@cola.iges.org</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hello Serge,<br>
<br>
You need to do it this way:<br>
<br>
'set t 1 366'<br>
'define c=a+b'<br>
<br>
Best regards,<br>
<br>
Eric L. Altshuler<br>
Assistant Research Scientist<br>
Center for Ocean-Land-Atmosphere Studies<br>
4041 Powder Mill Road, Suite 302<br>
Calverton, MD 20705-3106<br>
USA<br>
<br>
E-mail: <a href="mailto:ela@cola.iges.org">ela@cola.iges.org</a><br>
Phone: (301) 902-1257<br>
Fax: (301) 595-9793<br>
<div><div></div><div class="h5"><br>
----- Original Message -----<br>
From: "Rafanoharana Serge Claudio" <<a href="mailto:rafanoharana@gmail.com">rafanoharana@gmail.com</a>><br>
To: <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
Sent: Friday, June 17, 2011 12:52:24 PM<br>
Subject: [gradsusr] Function Sum for multiple variable within one file for each time t=1 to t=366<br>
<br>
<br>
Dear all,<br>
<br>
I would like to sum two variable within one netcdf file for each time t=1 to t=366.<br>
I have one netcdf file ( <a href="http://file.nc" target="_blank">file.nc</a> ) which contains two variables a and b from t=1 to t=366<br>
What I am trying to do is to sum each value per time, I mean<br>
sum a,b for t=1<br>
sum a,b for t=2<br>
...<br>
sum a,b for t=366<br>
<br>
I tried this command:<br>
<br>
define c=sum(a+b, t=1, t=366)<br>
<br>
but didn't give me what I needed.<br>
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<br>
I hope you get my problem,<br>
<br>
Best Regards,<br>
<br>
Serge<br>
</div></div>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Serge<br>