Hi,
I was wondering if there are some faster ways to calculate globally total
emissions. I used the following code and it looped over each grid cell to
calculate total values. It takes so long to finish the calculation.
--------------------------
totalfch4=0.0d
do i =0, natime-1
do j=0,nalat-1
rlat2= (alat(j)+1.429)*3.14159265/180.0 ; convert degree to radians
rlat1= (alat(j)-1.429)*3.14159265/180.0
temp1 = sin(rlat2)
temp2 = sin(rlat1)
temp = temp1-temp2
do k=0,nalon-1
if(.not.ismissing(aFCH4(i,j,k)))
then
diff_lon = 2.8152d*3.14159265d/180.0d
R=6371.0d*1000.0d ; unit is meterncd
area=R*R*diff_lon*temp
if(area.lt.0) then
area=0.0
end if
totalfch4=aFCH4(i,j,k)*area ; convert from
kgC/m2/s to kgC/s by multiplying area
afch4(i) = afch4(i)+totalfch4
end if
end do
end do
end do
------------------------------------
Any suggestions would be appreciated. Thanks,
Lei
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Dec 15 13:34:45 2009
This archive was generated by hypermail 2.1.8 : Thu Dec 17 2009 - 17:15:52 MST