#include "ctrparam.h" subroutine stbtrnd(YEAR,mndriver) parameter (nyd=2000,nyd1=nyd+1) C C C For IPCC stabilisation simulations C CO2 concentrations from file co2_data C Concentrations of other GHGs are c those for 1765. C DATA are annual means, but they are C used as a data for the middle of the coresponding year C C #include "TEM.h" #include "RADCOM.COM" common /Garyflux/pC_atm(jm0),wind_amp,fluxco2(jm0) real XGASS(NGAS) dimension xemi(nyd),ighgyr(nyd),xxemi(nyd1) real emisdata(5) dimension NDAYMN(12) data NDAYMN /31,28,31,30,31,30,31,31,30,31,30,31/ common/boxmod/YEAR0 common /bmtrdata/co2_data common/ BACKGRGHG/GHGBGR(5) character * 64 co2_data character * 10 name,scen(5) logical first data first /.true./ data ncall /1/ if(first)then nsc=KTREN-KTREN/10*10 open (unit=561,file=co2_data, * status='OLD',form='formatted') read (561,*)name read (561,*)name,scen print *,' Simulation with emission scenario ',scen(nsc) do 50 i=1,nyd read (561,*,end=500),ighgyr(i),emisdata xemi(i)=emidata(nsc) 50 continue 500 continue close (561) ny=i-2 ny1=ny+1 ny2=ny+2 YEAR0=ighgyr(1)-1 print *,'From FORSET EMISSIPCC' print *,' year=',year print *,'YEAR0=',YEAR0 501 format(i4,2f8.2) xxemi(1)=2.*xemi(1)-xemi(2) do 10 i=1,ny1 xxemi(i+1)=xemi(i) 10 continue first=.false. endif do j=1,jm OCUPT=OCUPT+fluxco2(j) TEMUPTANN=TEMUPTANN+1.e-3*temco2(j)/NDAYMN(mndriver) enddo call ghgint(xx,xxemi,ny2,YEAR) yy0=FULGAS(2)*GHGBGR(1) if(ncall.eq.2)then print *,'IPPCCEMIS ' print *,' year=',year print *,'YEAR0=',YEAR0 print *,'XGASS' print *,XGASS endif if(ncall.lt.3)ncall=ncall+1 return end #include "ctrparam.h" C SUBROUTINE emissipcc_mn(nepmn,ocumn,xco2ann,nemis) C |==========================================================| C | This is moved out of the main driver code - uses BD2G04 | C | Called only at end-of-month period | C \==========================================================/ IMPLICIT NONE #include "BD2G04.COM" C !INPUT/OUTPUT PARAMETERS: C == Routine arguments == REAL*4 nepmn REAL*4 ocumn REAL*4 xco2ann INTEGER nemis C LOCAL VARIABLES REAL*4 tnow tnow= jyear + (jday-.5)/365. CALL emissipcc(tnow,nepmn,ocumn,co2,xco2ann,nemis) RETURN END C #include "ctrparam.h" SUBROUTINE emissipcc_yr C |==========================================================| C | This is moved out of the main driver code - uses BD2G04 | C | Called only at end-of-year period. | C \==========================================================/ IMPLICIT NONE #include "BD2G04.COM" COMMON/ BACKGRGHG/ghgbgr REAL*4 ghgbgr(5) REWIND 861 WRITE (861,*)co2*ghgbgr(1) RETURN END