[gradsusr] summing
Jennifer Adams
jma at cola.iges.org
Tue Oct 30 17:26:09 EDT 2012
Further clarification:
The asum() function does not weight the area of a grid box by latitude. It only weights the partial grid boxes at the edges of the boundary if the domain does not line up exactly with the grid box edge. There is a new function coming in version 2.0.2 called atot() that does the same as asum, except it also weights the grid box areas by the difference in the sine of the latitude at the north and south edges. The documentation pages for these functions have been updated. --Jennifer
On Oct 30, 2012, at 3:11 PM, Mike NOAA imap wrote:
> hi Sagar,
>
> the reason why asum and asumg give the same answer is that world coordinates (e.g., lat/lon) bounds were on the grid boundary. I wrote asumg to ignore if a the world coordinate bound was in the middle of a grid box. If it was, then asum would only add half the value of that grid box to the sum whereas asumg would add the whole value.
>
> best /r Mike
>
> On 2012-10-16 19:35 , Sagar Parajuli wrote:
>> Thank you, I just used asumg and it seems that both give the same result.
>>
>>
>>
>> Sincerely,
>>
>> Sagar Prasad Parajuli
>> Graduate Student/Research Assistant
>> University of Texas at Austin
>> Jackson School of Geosciences
>> 1 University Station C1100, JGB 5.322
>> Austin, TX 78712
>> Contact: psagar at utexas.edu
>> Cell: 512 965 4093
>> <Mail Attachment.jpeg>
>>
>> From: gradsusr-bounces at gradsusr.org [mailto:gradsusr-bounces at gradsusr.org] On Behalf Of Jeff Duda
>> Sent: Tuesday, October 16, 2012 2:27 PM
>> To: GrADS Users Forum
>> Subject: Re: [gradsusr] summing
>>
>> Sagar,
>> Note that asum uses weighting by latitude to account for projected grids. If you want to ignore that, use asumg.
>>
>> Jeff
>>
>> On Tue, Oct 16, 2012 at 2:25 PM, Sagar Parajuli <psagar at utexas.edu> wrote:
>> Thank you, I didn’t realize the asum function.
>>
>>
>>
>> Sincerely,
>>
>> Sagar Prasad Parajuli
>> Graduate Student/Research Assistant
>> University of Texas at Austin
>> Jackson School of Geosciences
>> 1 University Station C1100, JGB 5.322
>> Austin, TX 78712
>> Contact: psagar at utexas.edu
>> Cell: 512 965 4093
>>
>> From: gradsusr-bounces at gradsusr.org [mailto:gradsusr-bounces at gradsusr.org] On Behalf Of Jeff Duda
>> Sent: Tuesday, October 16, 2012 2:16 PM
>> To: GrADS Users Forum
>> Subject: Re: [gradsusr] summing
>>
>> Sagar,
>> Either nest the sum functions or use the asum function for areal sums.
>>
>> Jeff Duda
>>
>> On Tue, Oct 16, 2012 at 2:11 PM, Sagar Parajuli <psagar at utexas.edu> wrote:
>> Hi, can anyone suggest how to sum the values in a grid. I have to first in t-direction and then in x and y direction.
>>
>> define a=sum(dstflxt*area, t=1, t=365) (summing in t-direction, this works fine)
>>
>> define b= sum(a,x=1,x=288,y=1,y=192) (summing in x and y direction, this doesn’t work)
>> d b
>>
>> It displays error in sum options.
>>
>> Please help.
>>
>>
>>
>> Sincerely,
>>
>> Sagar Prasad Parajuli
>> Graduate Student/Research Assistant
>> University of Texas at Austin
>> Jackson School of Geosciences
>> 1 University Station C1100, JGB 5.322
>> Austin, TX 78712
>> Contact: psagar at utexas.edu
>> Cell: 512 965 4093
>>
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>>
>>
>>
>> --
>> Jeff Duda
>> Graduate research assistant
>> University of Oklahoma School of Meteorology
>> Center for Analysis and Prediction of Storms
>>
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>>
>>
>>
>> --
>> Jeff Duda
>> Graduate research assistant
>> University of Oklahoma School of Meteorology
>> Center for Analysis and Prediction of Storms
>>
>>
>>
>> _______________________________________________
>> 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
--
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/20121030/edee8292/attachment-0003.html
More information about the gradsusr
mailing list