[gradsusr] Grads basic stats

Carlos Frederico fredericorama at gmail.com
Fri Nov 13 08:34:39 EST 2020


Hello folks,

I have a question regarding the grads basic stats issued by the ‘set stat on’ or ‘set gxout stat’.

In the documentation page for the ‘stat’ function http://cola.gmu.edu/grads/gadoc/gradcomdsetstat.html <http://cola.gmu.edu/grads/gadoc/gradcomdsetstat.html>, I see that the ‘sum' of the grid point values (I supposed) gives an integer value (in bold)? Why is it an integer value?

See: 
Data Type = grid
Dimensions = 0 1
I Dimension = 1 to 73 Linear 0 5
J Dimension = 1 to 46 Linear -90 4
Sizes = 73 46 3358
Undef value = -2.56e+33
Undef count = 1763  Valid count = 1595
Min, Max = 243.008 302.818
Cmin, cmax, cint = 245 300 5
Stats[sum,sumsqr,root(sumsqr),n]:     452778 1.29046e+08 11359.8 1595
Stats[(sum,sumsqr,root(sumsqr))/n]:     283.874 80906.7 284.441
Stats[(sum,sumsqr,root(sumsqr))/(n-1)]: 284.052 80957.4 284.53
Stats[(sigma,var)(n)]:     17.9565 322.437
Stats[(sigma,var)(n-1)]:   17.9622 322.64
Contouring: 245 to 300 interval 5 
I grab the grads source code and took a look at the source ‘gagx.c' and found the snippet attached. I get what 'sum += dum’ is (which should be the same as ‘sum = sum + dum’, but I’m not sure what ‘dum = *(gr+i)’ does. Can someone clarify exactly what the ‘sum’ is about?

Thank you!



Carlos

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20201113/719e0817/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2020-11-13 at 10.21.54.png
Type: image/png
Size: 137442 bytes
Desc: not available
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20201113/719e0817/attachment-0001.png>


More information about the gradsusr mailing list