<span style="color: rgb(0, 0, 0); font-family: Tahoma,sans-serif; font-size:
13px;">Hi everybody<br>
<br>
I'd done some calculations using both GRADS and Fortran, and I realised
that the spatial average using GRADS (aave) differs by a ratio of
approximately 0.787 from the spatial average using Fortran. By this I
mean that if I multiply the Fortran's values by 0.787, they ALWAYS
match with the GRADS' values (with small errors).<br>
<br>
Can anyone explain the reason for this "magic number" (0.787)?<br>
<br>
A part of the program using GRADS and Fortran respectively are given bellow.
<br>
<br>
I would appreciate any kind of commentaries.<br>
<br>
Sandra Saad<br>
<br>
<br>
### Spatial Average using GRADS ########<br>
<br>
set t 1 last<br>
d aave(h,x=26,x=35,y=43,y=50)<br>
<br>
<br>
### Spatial Average using Fortran (90) ########<br>
<br>
do i=1,it<br>
do ny=43,50<br>
do nx=26,35<br>
mh(i)=mh(i)+h(i,nx,ny)<br>
enddo<br>
enddo<br>
mh(i)=mh(i)/((35-26)*(50-43))<br>
enddo<br>
<br>
do i=1,it <br>
write(3,*)i,mh(i)<br>
enddo<br>
<br>
</span>