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

H.L biometeorology at gmail.com
Fri Jun 24 20:30:07 EDT 2011


Hi
use this command
'set x 1'
'set y 1'
'set t 1 366'
'define newvar=a+b'
'd sum(newvar,lat=10,lat=20)'   ==> for sum of your data at latitude
 'd sum(newvar,lev=1,lev=5)'     ==> for level

good luck;


H.L.
Atmospheric and Ocean  Research Center
Shiraz University



On Fri, Jun 17, 2011 at 8:54 PM, Rafanoharana Serge Claudio <
rafanoharana at gmail.com> wrote:

> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110625/5ced3d8a/attachment-0003.html 


More information about the gradsusr mailing list