| 1 |
|
| 2 |
#include "ctrparam.h" |
| 3 |
|
| 4 |
subroutine obsco2(iyearr,nm) |
| 5 |
#include "BD2G04.COM" |
| 6 |
#include "chem_para" |
| 7 |
parameter (nyears=337) |
| 8 |
character * 120 oco2file,co2rfile |
| 9 |
dimension co2rat1990(nlat,12),co2rat1860(nlat,12), |
| 10 |
* co2(nlat,12) |
| 11 |
dimension iyearobs(nyears),anco2obs(nyears) |
| 12 |
common /ATCO2/atm_co2(nlat),oco2file,co2rfile |
| 13 |
data ifirst /1/ |
| 14 |
if(ifirst.eq.1) then |
| 15 |
c open( unit=645,file=oco2file, |
| 16 |
c & status='old',form='formatted') |
| 17 |
open( unit=561,file=oco2file, |
| 18 |
& status='old',form='formatted') |
| 19 |
open( unit=655,file=co2rfile, |
| 20 |
& status='old',form='formatted') |
| 21 |
do n=1,nyears |
| 22 |
c read(645,'(i4,f8.2)') iyearobs(n),anco2obs(n) |
| 23 |
read(561,end=500,*) iyearobs(n),anco2obs(n) |
| 24 |
enddo |
| 25 |
500 continue |
| 26 |
close (561) |
| 27 |
print *,'OBSCO2 from ',iyearobs(1),' to ',iyearobs(n-1) |
| 28 |
read(655,'(i5,f7.2)'),iiyear,cco2 |
| 29 |
do j=1,nlat |
| 30 |
read(655,'(i5,12f7.2)'),ii,(co2rat1990(j,m),m=1,12) |
| 31 |
do m=1,12 |
| 32 |
co2rat1860(j,m)=1.0 |
| 33 |
enddo |
| 34 |
enddo |
| 35 |
dy=1991.-1860. |
| 36 |
ifirst=0 |
| 37 |
print *,'JM from obsco2=',jm |
| 38 |
print *,iiyear,cco2 |
| 39 |
endif |
| 40 |
C End of initialization |
| 41 |
c |
| 42 |
nyear=iyearr-iyearobs(1)+1 |
| 43 |
co2an=anco2obs(nyear) |
| 44 |
c print *,'From obsco2 year=',iyearr,' nm=',nm,' co2an=',co2an |
| 45 |
print *,'From obsco2 year,nm,co2an ',iyearr,nm,co2an |
| 46 |
|
| 47 |
if(iyearr.gt.1860)then |
| 48 |
x=(1991.-iyearr)/dy |
| 49 |
do 30 j=1,nlat |
| 50 |
atm_co2(j)=co2an*(x*co2rat1860(j,nm)+(1.-x)*co2rat1990(j,nm)) |
| 51 |
30 continue |
| 52 |
else |
| 53 |
do j=1,nlat |
| 54 |
atm_co2(j)=anco2obs(nyear) |
| 55 |
enddo |
| 56 |
endif |
| 57 |
if(nm.eq.1)then |
| 58 |
print '12f7.1,/,2(11f7.1,/,),12f7.1',atm_co2 |
| 59 |
endif |
| 60 |
return |
| 61 |
end |