1 | SUBROUTINE RRTM_SETCOEF_140GP (KIDIA,KFDIA,KLEV,P_COLDRY,P_WBROAD,P_WKL,& |
---|
2 | & P_FAC00,P_FAC01,P_FAC10,P_FAC11,P_FORFAC,P_FORFRAC,K_INDFOR,K_JP,K_JT,K_JT1,& |
---|
3 | & P_COLH2O,P_COLCO2,P_COLO3,P_COLN2O,P_COLCH4, P_COLO2,P_CO2MULT, P_COLBRD, & |
---|
4 | & K_LAYTROP,K_LAYSWTCH,K_LAYLOW,PAVEL,P_TAVEL,P_SELFFAC,P_SELFFRAC,K_INDSELF,& |
---|
5 | & K_INDMINOR,P_SCALEMINOR,P_SCALEMINORN2,P_MINORFRAC,& |
---|
6 | & PRAT_H2OCO2, PRAT_H2OCO2_1, PRAT_H2OO3, PRAT_H2OO3_1, & |
---|
7 | & PRAT_H2ON2O, PRAT_H2ON2O_1, PRAT_H2OCH4, PRAT_H2OCH4_1, & |
---|
8 | & PRAT_N2OCO2, PRAT_N2OCO2_1, PRAT_O3CO2, PRAT_O3CO2_1) |
---|
9 | |
---|
10 | ! Reformatted for F90 by JJMorcrette, ECMWF, 980714 |
---|
11 | ! NEC 25-Oct-2007 Optimisations |
---|
12 | ! 201305 ABozzo updated to rrtmg_lw_v4.85 |
---|
13 | ! 201507 RHogan Bug fix: swapped P_COLO2 & P_CO2MULT in argument list |
---|
14 | |
---|
15 | |
---|
16 | ! Purpose: For a given atmosphere, calculate the indices and |
---|
17 | ! fractions related to the pressure and temperature interpolations. |
---|
18 | ! Also calculate the values of the integrated Planck functions |
---|
19 | ! for each band at the level and layer temperatures. |
---|
20 | |
---|
21 | USE PARKIND1 , ONLY : JPIM, JPRB |
---|
22 | USE YOMHOOK , ONLY : LHOOK, DR_HOOK, JPHOOK |
---|
23 | USE PARRRTM , ONLY : JPINPX |
---|
24 | USE YOERRTRF , ONLY : PREFLOG ,TREF, CHI_MLS |
---|
25 | |
---|
26 | IMPLICIT NONE |
---|
27 | |
---|
28 | INTEGER(KIND=JPIM),INTENT(IN) :: KIDIA |
---|
29 | INTEGER(KIND=JPIM),INTENT(IN) :: KFDIA |
---|
30 | INTEGER(KIND=JPIM),INTENT(IN) :: KLEV |
---|
31 | REAL(KIND=JPRB) ,INTENT(IN) :: P_COLDRY(KIDIA:KFDIA,KLEV) |
---|
32 | REAL(KIND=JPRB) ,INTENT(IN) :: P_WBROAD(KIDIA:KFDIA,KLEV) |
---|
33 | REAL(KIND=JPRB) ,INTENT(OUT) :: P_COLBRD(KIDIA:KFDIA,KLEV) |
---|
34 | REAL(KIND=JPRB) ,INTENT(IN) :: P_WKL(KIDIA:KFDIA,JPINPX,KLEV) |
---|
35 | REAL(KIND=JPRB) ,INTENT(OUT) :: P_FAC00(KIDIA:KFDIA,KLEV) |
---|
36 | REAL(KIND=JPRB) ,INTENT(OUT) :: P_FAC01(KIDIA:KFDIA,KLEV) |
---|
37 | REAL(KIND=JPRB) ,INTENT(OUT) :: P_FAC10(KIDIA:KFDIA,KLEV) |
---|
38 | REAL(KIND=JPRB) ,INTENT(OUT) :: P_FAC11(KIDIA:KFDIA,KLEV) |
---|
39 | REAL(KIND=JPRB) ,INTENT(OUT) :: P_FORFAC(KIDIA:KFDIA,KLEV) |
---|
40 | REAL(KIND=JPRB) ,INTENT(OUT) :: P_FORFRAC(KIDIA:KFDIA,KLEV) |
---|
41 | INTEGER(KIND=JPIM),INTENT(OUT) :: K_JP(KIDIA:KFDIA,KLEV) |
---|
42 | INTEGER(KIND=JPIM),INTENT(OUT) :: K_JT(KIDIA:KFDIA,KLEV) |
---|
43 | INTEGER(KIND=JPIM),INTENT(OUT) :: K_JT1(KIDIA:KFDIA,KLEV) |
---|
44 | REAL(KIND=JPRB) ,INTENT(OUT) :: P_COLH2O(KIDIA:KFDIA,KLEV) |
---|
45 | REAL(KIND=JPRB) ,INTENT(OUT) :: P_COLCO2(KIDIA:KFDIA,KLEV) |
---|
46 | REAL(KIND=JPRB) ,INTENT(OUT) :: P_COLO3(KIDIA:KFDIA,KLEV) |
---|
47 | REAL(KIND=JPRB) ,INTENT(OUT) :: P_COLN2O(KIDIA:KFDIA,KLEV) |
---|
48 | REAL(KIND=JPRB) ,INTENT(OUT) :: P_COLCH4(KIDIA:KFDIA,KLEV) |
---|
49 | REAL(KIND=JPRB) ,INTENT(OUT) :: P_COLO2(KIDIA:KFDIA,KLEV) |
---|
50 | REAL(KIND=JPRB) ,INTENT(OUT) :: P_CO2MULT(KIDIA:KFDIA,KLEV) |
---|
51 | INTEGER(KIND=JPIM),INTENT(OUT) :: K_LAYTROP(KIDIA:KFDIA) |
---|
52 | INTEGER(KIND=JPIM),INTENT(OUT) :: K_LAYSWTCH(KIDIA:KFDIA) |
---|
53 | INTEGER(KIND=JPIM),INTENT(OUT) :: K_LAYLOW(KIDIA:KFDIA) |
---|
54 | REAL(KIND=JPRB) ,INTENT(IN) :: PAVEL(KIDIA:KFDIA,KLEV) |
---|
55 | REAL(KIND=JPRB) ,INTENT(IN) :: P_TAVEL(KIDIA:KFDIA,KLEV) |
---|
56 | REAL(KIND=JPRB) ,INTENT(OUT) :: P_SELFFAC(KIDIA:KFDIA,KLEV) |
---|
57 | REAL(KIND=JPRB) ,INTENT(OUT) :: P_SELFFRAC(KIDIA:KFDIA,KLEV) |
---|
58 | INTEGER(KIND=JPIM),INTENT(OUT) :: K_INDSELF(KIDIA:KFDIA,KLEV) |
---|
59 | INTEGER(KIND=JPIM),INTENT(OUT) :: K_INDFOR(KIDIA:KFDIA,KLEV) |
---|
60 | INTEGER(KIND=JPIM),INTENT(OUT) :: K_INDMINOR(KIDIA:KFDIA,KLEV) |
---|
61 | REAL(KIND=JPRB) ,INTENT(OUT) :: P_SCALEMINOR(KIDIA:KFDIA,KLEV) |
---|
62 | REAL(KIND=JPRB) ,INTENT(OUT) :: P_SCALEMINORN2(KIDIA:KFDIA,KLEV) |
---|
63 | REAL(KIND=JPRB) ,INTENT(OUT) :: P_MINORFRAC(KIDIA:KFDIA,KLEV) |
---|
64 | REAL(KIND=JPRB) ,INTENT(OUT) :: & ! |
---|
65 | & PRAT_H2OCO2(KIDIA:KFDIA,KLEV),PRAT_H2OCO2_1(KIDIA:KFDIA,KLEV), & |
---|
66 | & PRAT_H2OO3(KIDIA:KFDIA,KLEV) ,PRAT_H2OO3_1(KIDIA:KFDIA,KLEV), & |
---|
67 | & PRAT_H2ON2O(KIDIA:KFDIA,KLEV),PRAT_H2ON2O_1(KIDIA:KFDIA,KLEV), & |
---|
68 | & PRAT_H2OCH4(KIDIA:KFDIA,KLEV),PRAT_H2OCH4_1(KIDIA:KFDIA,KLEV), & |
---|
69 | & PRAT_N2OCO2(KIDIA:KFDIA,KLEV),PRAT_N2OCO2_1(KIDIA:KFDIA,KLEV), & |
---|
70 | & PRAT_O3CO2(KIDIA:KFDIA,KLEV) ,PRAT_O3CO2_1(KIDIA:KFDIA,KLEV) |
---|
71 | !- from INTFAC |
---|
72 | !- from INTIND |
---|
73 | !- from PROFDATA |
---|
74 | !- from PROFILE |
---|
75 | !- from SELF |
---|
76 | INTEGER(KIND=JPIM) :: JP1, JLAY |
---|
77 | INTEGER(KIND=JPIM) :: JLON |
---|
78 | |
---|
79 | REAL(KIND=JPRB) :: Z_CO2REG, Z_COMPFP, Z_FACTOR, Z_FP, Z_FT, Z_FT1, Z_PLOG, Z_SCALEFAC, Z_STPFAC, Z_WATER |
---|
80 | REAL(KIND=JPHOOK) :: ZHOOK_HANDLE |
---|
81 | |
---|
82 | IF (LHOOK) CALL DR_HOOK('RRTM_SETCOEF_140GP',0,ZHOOK_HANDLE) |
---|
83 | |
---|
84 | DO JLON = KIDIA, KFDIA |
---|
85 | Z_STPFAC = 296._JPRB/1013._JPRB |
---|
86 | |
---|
87 | K_LAYTROP(JLON) = 0 |
---|
88 | K_LAYSWTCH(JLON) = 0 |
---|
89 | K_LAYLOW(JLON) = 0 |
---|
90 | DO JLAY = 1, KLEV |
---|
91 | ! Find the two reference pressures on either side of the |
---|
92 | ! layer pressure. Store them in JP and JP1. Store in FP the |
---|
93 | ! fraction of the difference (in ln(pressure)) between these |
---|
94 | ! two values that the layer pressure lies. |
---|
95 | Z_PLOG = LOG(PAVEL(JLON,JLAY)) |
---|
96 | K_JP(JLON,JLAY) = INT(36._JPRB - 5*(Z_PLOG+0.04_JPRB)) |
---|
97 | IF (K_JP(JLON,JLAY) < 1) THEN |
---|
98 | K_JP(JLON,JLAY) = 1 |
---|
99 | ELSEIF (K_JP(JLON,JLAY) > 58) THEN |
---|
100 | K_JP(JLON,JLAY) = 58 |
---|
101 | ENDIF |
---|
102 | JP1 = K_JP(JLON,JLAY) + 1 |
---|
103 | Z_FP = 5._JPRB * (PREFLOG(K_JP(JLON,JLAY)) - Z_PLOG) |
---|
104 | ! bound Z_FP in case Z_PLOG is outside range of ref. pressure PREFLOG |
---|
105 | ! (in LVERTFE, pressure at last full level is known, but not in finite diff (NH) |
---|
106 | Z_FP = MAX(-1.0_JPRB, MIN(1.0_JPRB, Z_FP)) |
---|
107 | ! Determine, for each reference pressure (JP and JP1), which |
---|
108 | ! reference temperature (these are different for each |
---|
109 | ! reference pressure) is nearest the layer temperature but does |
---|
110 | ! not exceed it. Store these indices in JT and JT1, resp. |
---|
111 | ! Store in FT (resp. FT1) the fraction of the way between JT |
---|
112 | ! (JT1) and the next highest reference temperature that the |
---|
113 | ! layer temperature falls. |
---|
114 | |
---|
115 | K_JT(JLON,JLAY) = INT(3._JPRB + (P_TAVEL(JLON,JLAY)-TREF(K_JP(JLON,JLAY)))/15._JPRB) |
---|
116 | IF (K_JT(JLON,JLAY) < 1) THEN |
---|
117 | K_JT(JLON,JLAY) = 1 |
---|
118 | ELSEIF (K_JT(JLON,JLAY) > 4) THEN |
---|
119 | K_JT(JLON,JLAY) = 4 |
---|
120 | ENDIF |
---|
121 | Z_FT = ((P_TAVEL(JLON,JLAY)-TREF(K_JP(JLON,JLAY)))/15._JPRB) - REAL(K_JT(JLON,JLAY)-3) |
---|
122 | K_JT1(JLON,JLAY) = INT(3._JPRB + (P_TAVEL(JLON,JLAY)-TREF(JP1))/15._JPRB) |
---|
123 | IF (K_JT1(JLON,JLAY) < 1) THEN |
---|
124 | K_JT1(JLON,JLAY) = 1 |
---|
125 | ELSEIF (K_JT1(JLON,JLAY) > 4) THEN |
---|
126 | K_JT1(JLON,JLAY) = 4 |
---|
127 | ENDIF |
---|
128 | Z_FT1 = ((P_TAVEL(JLON,JLAY)-TREF(JP1))/15._JPRB) - REAL(K_JT1(JLON,JLAY)-3) |
---|
129 | |
---|
130 | Z_WATER = P_WKL(JLON,1,JLAY)/P_COLDRY(JLON,JLAY) |
---|
131 | Z_SCALEFAC = PAVEL(JLON,JLAY) * Z_STPFAC / P_TAVEL(JLON,JLAY) |
---|
132 | |
---|
133 | ! If the pressure is less than ~100mb, perform a different |
---|
134 | ! set of species interpolations. |
---|
135 | ! IF (PLOG .LE. 4.56) GO TO 5300 |
---|
136 | !-------------------------------------- |
---|
137 | IF (Z_PLOG > 4.56_JPRB) THEN |
---|
138 | K_LAYTROP(JLON) = K_LAYTROP(JLON) + 1 |
---|
139 | ! For one band, the "switch" occurs at ~300 mb. |
---|
140 | ! IF (Z_PLOG >= 5.76_JPRB) K_LAYSWTCH(JLON) = K_LAYSWTCH(JLON) + 1 |
---|
141 | ! IF (Z_PLOG >= 6.62_JPRB) K_LAYLOW(JLON) = K_LAYLOW(JLON) + 1 |
---|
142 | |
---|
143 | |
---|
144 | ! water vapor foreign continuum |
---|
145 | P_FORFAC(JLON,JLAY) = Z_SCALEFAC / (1.0_JPRB+Z_WATER) |
---|
146 | Z_FACTOR = (332.0_JPRB-P_TAVEL(JLON,JLAY))/36.0_JPRB |
---|
147 | K_INDFOR(JLON,JLAY) = MIN(2, MAX(1, INT(Z_FACTOR))) |
---|
148 | P_FORFRAC(JLON,JLAY) = Z_FACTOR - REAL(K_INDFOR(JLON,JLAY)) |
---|
149 | |
---|
150 | ! Set up factors needed to separately include the water vapor |
---|
151 | ! self-continuum in the calculation of absorption coefficient. |
---|
152 | !C SELFFAC(LAY) = WATER * SCALEFAC / (1.+WATER) |
---|
153 | P_SELFFAC(JLON,JLAY) = Z_WATER * P_FORFAC(JLON,JLAY) |
---|
154 | Z_FACTOR = (P_TAVEL(JLON,JLAY)-188.0_JPRB)/7.2_JPRB |
---|
155 | K_INDSELF(JLON,JLAY) = MIN(9, MAX(1, INT(Z_FACTOR)-7)) |
---|
156 | P_SELFFRAC(JLON,JLAY) = Z_FACTOR - REAL(K_INDSELF(JLON,JLAY) + 7) |
---|
157 | |
---|
158 | ! Set up factors needed to separately include the minor gases |
---|
159 | ! in the calculation of absorption coefficient |
---|
160 | P_SCALEMINOR(JLON,JLAY) = PAVEL(JLON,JLAY)/P_TAVEL(JLON,JLAY) |
---|
161 | P_SCALEMINORN2(JLON,JLAY) = (PAVEL(JLON,JLAY)/P_TAVEL(JLON,JLAY)) & |
---|
162 | & *(P_WBROAD(JLON,JLAY)/(P_COLDRY(JLON,JLAY)+P_WKL(JLON,1,JLAY))) |
---|
163 | Z_FACTOR = (P_TAVEL(JLON,JLAY)-180.8_JPRB)/7.2_JPRB |
---|
164 | K_INDMINOR(JLON,JLAY) = MIN(18, MAX(1, INT(Z_FACTOR))) |
---|
165 | P_MINORFRAC(JLON,JLAY) = Z_FACTOR - REAL(K_INDMINOR(JLON,JLAY)) |
---|
166 | |
---|
167 | ! Setup reference ratio to be used in calculation of binary |
---|
168 | ! species parameter in lower atmosphere. |
---|
169 | PRAT_H2OCO2(JLON,JLAY)=CHI_MLS(1,K_JP(JLON,JLAY))/CHI_MLS(2,K_JP(JLON,JLAY)) |
---|
170 | PRAT_H2OCO2_1(JLON,JLAY)=CHI_MLS(1,K_JP(JLON,JLAY)+1)/CHI_MLS(2,K_JP(JLON,JLAY)+1) |
---|
171 | |
---|
172 | PRAT_H2OO3(JLON,JLAY)=CHI_MLS(1,K_JP(JLON,JLAY))/CHI_MLS(3,K_JP(JLON,JLAY)) |
---|
173 | PRAT_H2OO3_1(JLON,JLAY)=CHI_MLS(1,K_JP(JLON,JLAY)+1)/CHI_MLS(3,K_JP(JLON,JLAY)+1) |
---|
174 | |
---|
175 | PRAT_H2ON2O(JLON,JLAY)=CHI_MLS(1,K_JP(JLON,JLAY))/CHI_MLS(4,K_JP(JLON,JLAY)) |
---|
176 | PRAT_H2ON2O_1(JLON,JLAY)=CHI_MLS(1,K_JP(JLON,JLAY)+1)/CHI_MLS(4,K_JP(JLON,JLAY)+1) |
---|
177 | |
---|
178 | PRAT_H2OCH4(JLON,JLAY)=CHI_MLS(1,K_JP(JLON,JLAY))/CHI_MLS(6,K_JP(JLON,JLAY)) |
---|
179 | PRAT_H2OCH4_1(JLON,JLAY)=CHI_MLS(1,K_JP(JLON,JLAY)+1)/CHI_MLS(6,K_JP(JLON,JLAY)+1) |
---|
180 | |
---|
181 | PRAT_N2OCO2(JLON,JLAY)=CHI_MLS(4,K_JP(JLON,JLAY))/CHI_MLS(2,K_JP(JLON,JLAY)) |
---|
182 | PRAT_N2OCO2_1(JLON,JLAY)=CHI_MLS(4,K_JP(JLON,JLAY)+1)/CHI_MLS(2,K_JP(JLON,JLAY)+1) |
---|
183 | |
---|
184 | |
---|
185 | |
---|
186 | ! Calculate needed column amounts. |
---|
187 | P_COLH2O(JLON,JLAY) = 1.E-20_JPRB * P_WKL(JLON,1,JLAY) |
---|
188 | P_COLCO2(JLON,JLAY) = 1.E-20_JPRB * P_WKL(JLON,2,JLAY) |
---|
189 | P_COLO3(JLON,JLAY) = 1.E-20_JPRB * P_WKL(JLON,3,JLAY) |
---|
190 | P_COLN2O(JLON,JLAY) = 1.E-20_JPRB * P_WKL(JLON,4,JLAY) |
---|
191 | P_COLCH4(JLON,JLAY) = 1.E-20_JPRB * P_WKL(JLON,6,JLAY) |
---|
192 | P_COLO2(JLON,JLAY) = 1.E-20_JPRB * P_WKL(JLON,7,JLAY) |
---|
193 | P_COLBRD(JLON,JLAY) = 1.E-20_JPRB * P_WBROAD(JLON,JLAY) |
---|
194 | IF (P_COLCO2(JLON,JLAY) == 0.0_JPRB) P_COLCO2(JLON,JLAY) = 1.E-32_JPRB * P_COLDRY(JLON,JLAY) |
---|
195 | IF (P_COLN2O(JLON,JLAY) == 0.0_JPRB) P_COLN2O(JLON,JLAY) = 1.E-32_JPRB * P_COLDRY(JLON,JLAY) |
---|
196 | IF (P_COLCH4(JLON,JLAY) == 0.0_JPRB) P_COLCH4(JLON,JLAY) = 1.E-32_JPRB * P_COLDRY(JLON,JLAY) |
---|
197 | ! Using E = 1334.2 cm-1. |
---|
198 | Z_CO2REG = 3.55E-24_JPRB * P_COLDRY(JLON,JLAY) |
---|
199 | P_CO2MULT(JLON,JLAY)= (P_COLCO2(JLON,JLAY) - Z_CO2REG) *& |
---|
200 | & 272.63_JPRB*EXP(-1919.4_JPRB/P_TAVEL(JLON,JLAY))/(8.7604E-4_JPRB*P_TAVEL(JLON,JLAY)) |
---|
201 | ! GO TO 5400 |
---|
202 | !------------------ |
---|
203 | ELSE |
---|
204 | ! Above LAYTROP. |
---|
205 | ! 5300 CONTINUE |
---|
206 | |
---|
207 | ! Calculate needed column amounts. |
---|
208 | P_FORFAC(JLON,JLAY) = Z_SCALEFAC / (1.0_JPRB+Z_WATER) |
---|
209 | Z_FACTOR = (P_TAVEL(JLON,JLAY)-188.0_JPRB)/36.0_JPRB |
---|
210 | K_INDFOR(JLON,JLAY) = 3 |
---|
211 | P_FORFRAC(JLON,JLAY) = Z_FACTOR - 1.0_JPRB |
---|
212 | |
---|
213 | ! Set up factors needed to separately include the water vapor |
---|
214 | ! self-continuum in the calculation of absorption coefficient. |
---|
215 | P_SELFFAC(JLON,JLAY) = Z_WATER * P_FORFAC(JLON,JLAY) |
---|
216 | |
---|
217 | ! Set up factors needed to separately include the minor gases |
---|
218 | ! in the calculation of absorption coefficient |
---|
219 | P_SCALEMINOR(JLON,JLAY) = PAVEL(JLON,JLAY)/P_TAVEL(JLON,JLAY) |
---|
220 | P_SCALEMINORN2(JLON,JLAY) = (PAVEL(JLON,JLAY)/P_TAVEL(JLON,JLAY)) & |
---|
221 | & * (P_WBROAD(JLON,JLAY)/(P_COLDRY(JLON,JLAY)+P_WKL(JLON,1,JLAY))) |
---|
222 | Z_FACTOR = (P_TAVEL(JLON,JLAY)-180.8_JPRB)/7.2_JPRB |
---|
223 | K_INDMINOR(JLON,JLAY) = MIN(18, MAX(1, INT(Z_FACTOR))) |
---|
224 | P_MINORFRAC(JLON,JLAY) = Z_FACTOR - REAL(K_INDMINOR(JLON,JLAY)) |
---|
225 | |
---|
226 | ! Setup reference ratio to be used in calculation of binary |
---|
227 | ! species parameter in upper atmosphere. |
---|
228 | PRAT_H2OCO2(JLON,JLAY)=CHI_MLS(1,K_JP(JLON,JLAY))/CHI_MLS(2,K_JP(JLON,JLAY)) |
---|
229 | PRAT_H2OCO2_1(JLON,JLAY)=CHI_MLS(1,K_JP(JLON,JLAY)+1)/CHI_MLS(2,K_JP(JLON,JLAY)+1) |
---|
230 | |
---|
231 | PRAT_O3CO2(JLON,JLAY)=CHI_MLS(3,K_JP(JLON,JLAY))/CHI_MLS(2,K_JP(JLON,JLAY)) |
---|
232 | PRAT_O3CO2_1(JLON,JLAY)=CHI_MLS(3,K_JP(JLON,JLAY)+1)/CHI_MLS(2,K_JP(JLON,JLAY)+1) |
---|
233 | |
---|
234 | |
---|
235 | ! Calculate needed column amounts. |
---|
236 | P_COLH2O(JLON,JLAY) = 1.E-20_JPRB * P_WKL(JLON,1,JLAY) |
---|
237 | P_COLCO2(JLON,JLAY) = 1.E-20_JPRB * P_WKL(JLON,2,JLAY) |
---|
238 | P_COLO3(JLON,JLAY) = 1.E-20_JPRB * P_WKL(JLON,3,JLAY) |
---|
239 | P_COLN2O(JLON,JLAY) = 1.E-20_JPRB * P_WKL(JLON,4,JLAY) |
---|
240 | P_COLCH4(JLON,JLAY) = 1.E-20_JPRB * P_WKL(JLON,6,JLAY) |
---|
241 | P_COLO2(JLON,JLAY) = 1.E-20_JPRB * P_WKL(JLON,7,JLAY) |
---|
242 | P_COLBRD(JLON,JLAY) = 1.E-20_JPRB * P_WBROAD(JLON,JLAY) |
---|
243 | IF (P_COLCO2(JLON,JLAY) == 0.0_JPRB) P_COLCO2(JLON,JLAY) = 1.E-32_JPRB * P_COLDRY(JLON,JLAY) |
---|
244 | IF (P_COLN2O(JLON,JLAY) == 0.0_JPRB) P_COLN2O(JLON,JLAY) = 1.E-32_JPRB * P_COLDRY(JLON,JLAY) |
---|
245 | IF (P_COLCH4(JLON,JLAY) == 0.0_JPRB) P_COLCH4(JLON,JLAY) = 1.E-32_JPRB * P_COLDRY(JLON,JLAY) |
---|
246 | Z_CO2REG = 3.55E-24_JPRB * P_COLDRY(JLON,JLAY) |
---|
247 | P_CO2MULT(JLON,JLAY)= (P_COLCO2(JLON,JLAY) - Z_CO2REG) *& |
---|
248 | & 272.63_JPRB*EXP(-1919.4_JPRB/P_TAVEL(JLON,JLAY))/(8.7604E-4_JPRB*P_TAVEL(JLON,JLAY)) |
---|
249 | !---------------- |
---|
250 | ENDIF |
---|
251 | ! 5400 CONTINUE |
---|
252 | |
---|
253 | ! We have now isolated the layer ln pressure and temperature, |
---|
254 | ! between two reference pressures and two reference temperatures |
---|
255 | ! (for each reference pressure). We multiply the pressure |
---|
256 | ! fraction FP with the appropriate temperature fractions to get |
---|
257 | ! the factors that will be needed for the interpolation that yields |
---|
258 | ! the optical depths (performed in routines TAUGBn for band n). |
---|
259 | |
---|
260 | Z_COMPFP = 1.0_JPRB - Z_FP |
---|
261 | P_FAC10(JLON,JLAY) = Z_COMPFP * Z_FT |
---|
262 | P_FAC00(JLON,JLAY) = Z_COMPFP * (1.0_JPRB - Z_FT) |
---|
263 | P_FAC11(JLON,JLAY) = Z_FP * Z_FT1 |
---|
264 | P_FAC01(JLON,JLAY) = Z_FP * (1.0_JPRB - Z_FT1) |
---|
265 | |
---|
266 | ! Rescale selffac and forfac for use in taumol |
---|
267 | P_SELFFAC(JLON,JLAY) = P_COLH2O(JLON,JLAY)*P_SELFFAC(JLON,JLAY) |
---|
268 | P_FORFAC(JLON,JLAY) = P_COLH2O(JLON,JLAY)*P_FORFAC(JLON,JLAY) |
---|
269 | |
---|
270 | |
---|
271 | ENDDO |
---|
272 | |
---|
273 | ! MT 981104 |
---|
274 | !-- Set LAYLOW for profiles with surface pressure less than 750 hPa. |
---|
275 | IF (K_LAYLOW(JLON) == 0) K_LAYLOW(JLON)=1 |
---|
276 | ENDDO |
---|
277 | |
---|
278 | IF (LHOOK) CALL DR_HOOK('RRTM_SETCOEF_140GP',1,ZHOOK_HANDLE) |
---|
279 | |
---|
280 | END SUBROUTINE RRTM_SETCOEF_140GP |
---|