<div dir="ltr">Hi,<div>  I know two methods (as below) to calculate global average, but I don&#39;t know which one is right or better. before, I always use method 1. but I find the results of two methods are not same. </div><div>  by the way, is the method 1 right if the grid is gaussian grid?</div><div><br></div><div><br></div><div>f=addfile(&quot;<a href="http://cru_ts3.23.1901.2014.tmp.dat.nc">cru_ts3.23.1901.2014.tmp.dat.nc</a>&quot;,&quot;r&quot;)</div>tas=f-&gt;tmp(1000,:,:)<br>printVarSummary(tas)<br>clat=doubletofloat(f-&gt;lat)<br>rad=4.0*atan(1.0)/180.<br>clat=sqrt(cos(clat*rad))<br><br>wt=tas<br>wt=tas*conform(tas,clat,0)<br>tave1=avg(wt)   ;;method1<br><br>tave2=wgt_areaave(tas,clat,1.0,1) ;;method2<br><br>print(tave1)<br>print(tave2)</div>