/[MITgcm]/MITgcm_contrib/jscott/igsm/src/emissipcc.F
ViewVC logotype

Contents of /MITgcm_contrib/jscott/igsm/src/emissipcc.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Mon Apr 23 21:20:18 2007 UTC (18 years, 3 months ago) by jscott
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
Error occurred while calculating annotation data.
bring igsm atmos code up to date

1
2 #include "ctrparam.h"
3
4 subroutine stbtrnd(YEAR,mndriver)
5 parameter (nyd=2000,nyd1=nyd+1)
6 C
7 C
8 C For IPCC stabilisation simulations
9 C CO2 concentrations from file co2_data
10 C Concentrations of other GHGs are
11 c those for 1765.
12 C DATA are annual means, but they are
13 C used as a data for the middle of the coresponding year
14 C
15 C
16 #include "TEM.h"
17 #include "RADCOM.COM"
18 common /Garyflux/pC_atm(jm0),wind_amp,fluxco2(jm0)
19 real XGASS(NGAS)
20 dimension xemi(nyd),ighgyr(nyd),xxemi(nyd1)
21 real emisdata(5)
22 dimension NDAYMN(12)
23 data NDAYMN /31,28,31,30,31,30,31,31,30,31,30,31/
24
25 common/boxmod/YEAR0
26 common /bmtrdata/co2_data
27 common/ BACKGRGHG/GHGBGR(5)
28 character * 64 co2_data
29 character * 10 name,scen(5)
30 logical first
31 data first /.true./
32 data ncall /1/
33 if(first)then
34 nsc=KTREN-KTREN/10*10
35 open (unit=561,file=co2_data,
36 * status='OLD',form='formatted')
37 read (561,*)name
38 read (561,*)name,scen
39 print *,' Simulation with emission scenario ',scen(nsc)
40 do 50 i=1,nyd
41 read (561,*,end=500),ighgyr(i),emisdata
42 xemi(i)=emidata(nsc)
43 50 continue
44 500 continue
45 close (561)
46 ny=i-2
47 ny1=ny+1
48 ny2=ny+2
49 YEAR0=ighgyr(1)-1
50 print *,'From FORSET EMISSIPCC'
51 print *,' year=',year
52 print *,'YEAR0=',YEAR0
53 501 format(i4,2f8.2)
54 xxemi(1)=2.*xemi(1)-xemi(2)
55 do 10 i=1,ny1
56 xxemi(i+1)=xemi(i)
57 10 continue
58 first=.false.
59 endif
60 do j=1,jm
61 OCUPT=OCUPT+fluxco2(j)
62 TEMUPTANN=TEMUPTANN+1.e-3*temco2(j)/NDAYMN(mndriver)
63 enddo
64
65 call ghgint(xx,xxemi,ny2,YEAR)
66 yy0=FULGAS(2)*GHGBGR(1)
67 if(ncall.eq.2)then
68 print *,'IPPCCEMIS '
69 print *,' year=',year
70 print *,'YEAR0=',YEAR0
71 print *,'XGASS'
72 print *,XGASS
73 endif
74 if(ncall.lt.3)ncall=ncall+1
75 return
76 end
77
78 #include "ctrparam.h"
79 C
80 SUBROUTINE emissipcc_mn(nepmn,ocumn,xco2ann,nemis)
81 C |==========================================================|
82 C | This is moved out of the main driver code - uses BD2G04 |
83 C | Called only at end-of-month period |
84 C \==========================================================/
85 IMPLICIT NONE
86
87 #include "BD2G04.COM"
88
89 C !INPUT/OUTPUT PARAMETERS:
90 C == Routine arguments ==
91 REAL*4 nepmn
92 REAL*4 ocumn
93 REAL*4 xco2ann
94 INTEGER nemis
95
96 C LOCAL VARIABLES
97 REAL*4 tnow
98
99 tnow= jyear + (jday-.5)/365.
100 CALL emissipcc(tnow,nepmn,ocumn,co2,xco2ann,nemis)
101
102 RETURN
103 END
104 C
105
106 #include "ctrparam.h"
107 SUBROUTINE emissipcc_yr
108 C |==========================================================|
109 C | This is moved out of the main driver code - uses BD2G04 |
110 C | Called only at end-of-year period. |
111 C \==========================================================/
112 IMPLICIT NONE
113
114 #include "BD2G04.COM"
115
116 COMMON/ BACKGRGHG/ghgbgr
117 REAL*4 ghgbgr(5)
118
119 REWIND 861
120 WRITE (861,*)co2*ghgbgr(1)
121
122 RETURN
123 END
124

  ViewVC Help
Powered by ViewVC 1.1.22