[gradsusr] Function Sum for multiple variable for each time t=1 to t=366
Rafanoharana Serge Claudio
rafanoharana at gmail.com
Mon Jun 27 04:49:44 EDT 2011
Dear H.L.,
Thank you for your answer. I have already fixed it using the tips from Eric
L. Altshuler. Here is the script:
'set t 1 366'
'define c=a+b'
Anyway, Thank you very much.
Best regards,
Serge
On Fri, Jun 24, 2011 at 5:30 PM, H.L <biometeorology at gmail.com> wrote:
> 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
>>
>>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
--
Serge
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110627/231e3dc5/attachment-0003.html
More information about the gradsusr
mailing list