1 |
|
|
!---------------------------------------------------------------------------- |
2 |
|
71568 |
SUBROUTINE RRTM_TAUMOL5 (KLEV,P_TAU,P_WX,& |
3 |
|
|
& P_TAUAERL,P_FAC00,P_FAC01,P_FAC10,P_FAC11,P_FORFAC,K_JP,K_JT,K_JT1,P_ONEMINUS,& |
4 |
|
|
& P_COLH2O,P_COLCO2, P_COLO3,K_LAYTROP,P_SELFFAC,P_SELFFRAC,K_INDSELF,PFRAC) |
5 |
|
|
|
6 |
|
|
! BAND 5: 700-820 cm-1 (low - H2O,CO2; high - O3,CO2) |
7 |
|
|
|
8 |
|
|
! Modifications |
9 |
|
|
! M.Hamrud 01-Oct-2003 CY28 Cleaning |
10 |
|
|
|
11 |
|
|
! D Salmond 2000-05-15 speed-up |
12 |
|
|
|
13 |
|
|
USE PARKIND1 ,ONLY : JPIM ,JPRB |
14 |
|
|
USE YOMHOOK ,ONLY : LHOOK, DR_HOOK |
15 |
|
|
|
16 |
|
|
USE PARRRTM , ONLY : JPLAY ,JPBAND ,JPGPT ,JPXSEC ,NG5 ,NGS4 |
17 |
|
|
USE YOERRTWN , ONLY : NSPA ,NSPB |
18 |
|
|
USE YOERRTA5 , ONLY : ABSA ,ABSB ,CCL4 , FRACREFA, FRACREFB,SELFREF,STRRAT1, STRRAT2 |
19 |
|
|
|
20 |
|
|
! Input |
21 |
|
|
!#include "yoeratm.h" |
22 |
|
|
|
23 |
|
|
! REAL TAUAER(JPLAY) |
24 |
|
|
|
25 |
|
|
IMPLICIT NONE |
26 |
|
|
|
27 |
|
|
INTEGER(KIND=JPIM),INTENT(IN) :: KLEV |
28 |
|
|
REAL(KIND=JPRB) ,INTENT(OUT) :: P_TAU(JPGPT,JPLAY) |
29 |
|
|
REAL(KIND=JPRB) ,INTENT(IN) :: P_WX(JPXSEC,JPLAY) ! Amount of trace gases |
30 |
|
|
REAL(KIND=JPRB) ,INTENT(IN) :: P_TAUAERL(JPLAY,JPBAND) |
31 |
|
|
REAL(KIND=JPRB) ,INTENT(IN) :: P_FAC00(JPLAY) |
32 |
|
|
REAL(KIND=JPRB) ,INTENT(IN) :: P_FAC01(JPLAY) |
33 |
|
|
REAL(KIND=JPRB) ,INTENT(IN) :: P_FAC10(JPLAY) |
34 |
|
|
REAL(KIND=JPRB) ,INTENT(IN) :: P_FAC11(JPLAY) |
35 |
|
|
REAL(KIND=JPRB) :: P_FORFAC(JPLAY) ! Argument NOT used |
36 |
|
|
INTEGER(KIND=JPIM),INTENT(IN) :: K_JP(JPLAY) |
37 |
|
|
INTEGER(KIND=JPIM),INTENT(IN) :: K_JT(JPLAY) |
38 |
|
|
INTEGER(KIND=JPIM),INTENT(IN) :: K_JT1(JPLAY) |
39 |
|
|
REAL(KIND=JPRB) ,INTENT(IN) :: P_ONEMINUS |
40 |
|
|
REAL(KIND=JPRB) ,INTENT(IN) :: P_COLH2O(JPLAY) |
41 |
|
|
REAL(KIND=JPRB) ,INTENT(IN) :: P_COLCO2(JPLAY) |
42 |
|
|
REAL(KIND=JPRB) ,INTENT(IN) :: P_COLO3(JPLAY) |
43 |
|
|
INTEGER(KIND=JPIM),INTENT(IN) :: K_LAYTROP |
44 |
|
|
REAL(KIND=JPRB) ,INTENT(IN) :: P_SELFFAC(JPLAY) |
45 |
|
|
REAL(KIND=JPRB) ,INTENT(IN) :: P_SELFFRAC(JPLAY) |
46 |
|
|
INTEGER(KIND=JPIM),INTENT(IN) :: K_INDSELF(JPLAY) |
47 |
|
|
REAL(KIND=JPRB) ,INTENT(OUT) :: PFRAC(JPGPT,JPLAY) |
48 |
|
|
! Output |
49 |
|
|
!- from AER |
50 |
|
|
!- from INTFAC |
51 |
|
|
!- from INTIND |
52 |
|
|
!- from PRECISE |
53 |
|
|
!- from PROFDATA |
54 |
|
|
!- from SELF |
55 |
|
|
!- from SP |
56 |
|
|
INTEGER(KIND=JPIM) :: IJS(JPLAY) |
57 |
|
|
REAL(KIND=JPRB) :: ZFS(JPLAY),Z_SPECCOMB(JPLAY) |
58 |
|
|
INTEGER(KIND=JPIM) :: IND0(JPLAY),IND1(JPLAY),INDS(JPLAY) |
59 |
|
|
|
60 |
|
|
INTEGER(KIND=JPIM) :: IG, JS, I_LAY |
61 |
|
|
|
62 |
|
|
REAL(KIND=JPRB) :: Z_FAC000, Z_FAC001, Z_FAC010, Z_FAC011, Z_FAC100, Z_FAC101,& |
63 |
|
|
& Z_FAC110, Z_FAC111, Z_FS, Z_SPECMULT, Z_SPECPARM |
64 |
|
|
REAL(KIND=JPRB) :: ZHOOK_HANDLE |
65 |
|
|
|
66 |
|
|
! EQUIVALENCE (TAUAERL(1,5),TAUAER) |
67 |
|
|
|
68 |
|
|
! Compute the optical depth by interpolating in ln(pressure), |
69 |
|
|
! temperature, and appropriate species. Below LAYTROP, the water |
70 |
|
|
! vapor self-continuum is interpolated (in temperature) separately. |
71 |
|
|
|
72 |
✓✗ |
71568 |
IF (LHOOK) CALL DR_HOOK('RRTM_TAUMOL5',0,ZHOOK_HANDLE) |
73 |
✓✓ |
1574496 |
DO I_LAY = 1, K_LAYTROP |
74 |
|
1502928 |
Z_SPECCOMB(I_LAY) = P_COLH2O(I_LAY) + STRRAT1*P_COLCO2(I_LAY) |
75 |
|
1502928 |
Z_SPECPARM = P_COLH2O(I_LAY)/Z_SPECCOMB(I_LAY) |
76 |
|
1502928 |
Z_SPECPARM=MIN(P_ONEMINUS,Z_SPECPARM) |
77 |
|
1502928 |
Z_SPECMULT = 8._JPRB*(Z_SPECPARM) |
78 |
|
1502928 |
JS = 1 + INT(Z_SPECMULT) |
79 |
|
1502928 |
Z_FS = MOD(Z_SPECMULT,1.0_JPRB) |
80 |
|
1502928 |
IND0(I_LAY) = ((K_JP(I_LAY)-1)*5+(K_JT(I_LAY)-1))*NSPA(5) + JS |
81 |
|
1502928 |
IND1(I_LAY) = (K_JP(I_LAY)*5+(K_JT1(I_LAY)-1))*NSPA(5) + JS |
82 |
|
1502928 |
INDS(I_LAY) = K_INDSELF(I_LAY) |
83 |
|
|
|
84 |
|
1502928 |
ZFS(I_LAY)=Z_FS |
85 |
|
1574496 |
IJS(I_LAY)=JS |
86 |
|
|
|
87 |
|
|
ENDDO |
88 |
|
|
|
89 |
|
|
!-- DS_000515 |
90 |
✓✓ |
1574496 |
DO I_LAY = 1, K_LAYTROP |
91 |
|
|
!-- DS_000515 |
92 |
|
|
|
93 |
|
1502928 |
Z_FS=ZFS(I_LAY) |
94 |
|
1502928 |
JS=IJS(I_LAY) |
95 |
✓✓ |
25621344 |
DO IG = 1, NG5 |
96 |
|
|
!---jjm |
97 |
|
|
! FAC000 = (_ONE_ - FS) * FAC00(LAY) |
98 |
|
|
! FAC010 = (_ONE_ - FS) * FAC10(LAY) |
99 |
|
|
! FAC100 = FS * FAC00(LAY) |
100 |
|
|
! FAC110 = FS * FAC10(LAY) |
101 |
|
|
! FAC001 = (_ONE_ - FS) * FAC01(LAY) |
102 |
|
|
! FAC011 = (_ONE_ - FS) * FAC11(LAY) |
103 |
|
|
! FAC101 = FS * FAC01(LAY) |
104 |
|
|
! FAC111 = FS * FAC11(LAY) |
105 |
|
|
!----- |
106 |
|
|
|
107 |
|
|
P_TAU (NGS4+IG,I_LAY) = Z_SPECCOMB(I_LAY) * & |
108 |
|
|
!-- DS_000515 |
109 |
|
|
& ( (1. - Z_FS) *(P_FAC00(I_LAY) * ABSA(IND0(I_LAY) ,IG) + & |
110 |
|
|
& P_FAC10(I_LAY) * ABSA(IND0(I_LAY)+ 9,IG) + & |
111 |
|
|
& P_FAC01(I_LAY) * ABSA(IND1(I_LAY) ,IG) + & |
112 |
|
|
& P_FAC11(I_LAY) * ABSA(IND1(I_LAY)+ 9,IG))+ & |
113 |
|
|
& Z_FS *(P_FAC00(I_LAY) * ABSA(IND0(I_LAY)+ 1,IG) + & |
114 |
|
|
& P_FAC10(I_LAY) * ABSA(IND0(I_LAY)+10,IG) + & |
115 |
|
|
& P_FAC01(I_LAY) * ABSA(IND1(I_LAY)+ 1,IG) + & |
116 |
|
|
& P_FAC11(I_LAY) * ABSA(IND1(I_LAY)+10,IG))) + & |
117 |
|
|
! &(Z_FAC000 * ABSA(IND0(I_LAY) ,IG) +& |
118 |
|
|
! & Z_FAC100 * ABSA(IND0(I_LAY)+ 1,IG) +& |
119 |
|
|
! & Z_FAC010 * ABSA(IND0(I_LAY)+ 9,IG) +& |
120 |
|
|
! & Z_FAC110 * ABSA(IND0(I_LAY)+10,IG) +& |
121 |
|
|
! & Z_FAC001 * ABSA(IND1(I_LAY) ,IG) +& |
122 |
|
|
! & Z_FAC101 * ABSA(IND1(I_LAY)+ 1,IG) +& |
123 |
|
|
! & Z_FAC011 * ABSA(IND1(I_LAY)+ 9,IG) +& |
124 |
|
|
! & Z_FAC111 * ABSA(IND1(I_LAY)+10,IG))+& |
125 |
|
|
!-- DS_000515 |
126 |
|
|
& P_COLH2O(I_LAY) * & |
127 |
|
|
& P_SELFFAC(I_LAY) * (SELFREF(INDS(I_LAY),IG) + & |
128 |
|
|
& P_SELFFRAC(I_LAY) *& |
129 |
|
|
& (SELFREF(INDS(I_LAY)+1,IG) - SELFREF(INDS(I_LAY),IG)))& |
130 |
|
|
& + P_WX(1,I_LAY) * CCL4(IG)& |
131 |
|
24046848 |
& + P_TAUAERL(I_LAY,5) |
132 |
|
|
PFRAC(NGS4+IG,I_LAY) = FRACREFA(IG,JS) + Z_FS *& |
133 |
|
25549776 |
& (FRACREFA(IG,JS+1) - FRACREFA(IG,JS)) |
134 |
|
|
ENDDO |
135 |
|
|
ENDDO |
136 |
|
|
|
137 |
✓✓ |
1359792 |
DO I_LAY = K_LAYTROP+1, KLEV |
138 |
|
1288224 |
Z_SPECCOMB(I_LAY) = P_COLO3(I_LAY) + STRRAT2*P_COLCO2(I_LAY) |
139 |
|
1288224 |
Z_SPECPARM = P_COLO3(I_LAY)/Z_SPECCOMB(I_LAY) |
140 |
|
1288224 |
Z_SPECPARM=MIN(P_ONEMINUS,Z_SPECPARM) |
141 |
|
1288224 |
Z_SPECMULT = 4._JPRB*(Z_SPECPARM) |
142 |
|
1288224 |
JS = 1 + INT(Z_SPECMULT) |
143 |
|
1288224 |
Z_FS = MOD(Z_SPECMULT,1.0_JPRB) |
144 |
|
1288224 |
IND0(I_LAY) = ((K_JP(I_LAY)-13)*5+(K_JT(I_LAY)-1))*NSPB(5) + JS |
145 |
|
1288224 |
IND1(I_LAY) = ((K_JP(I_LAY)-12)*5+(K_JT1(I_LAY)-1))*NSPB(5) + JS |
146 |
|
1288224 |
ZFS(I_LAY)=Z_FS |
147 |
|
1359792 |
IJS(I_LAY)=JS |
148 |
|
|
ENDDO |
149 |
|
|
|
150 |
|
|
!----jjm |
151 |
|
|
! FAC000 = (_ONE_ - FS) * FAC00(LAY) |
152 |
|
|
! FAC010 = (_ONE_ - FS) * FAC10(LAY) |
153 |
|
|
! FAC100 = FS * FAC00(LAY) |
154 |
|
|
! FAC110 = FS * FAC10(LAY) |
155 |
|
|
! FAC001 = (_ONE_ - FS) * FAC01(LAY) |
156 |
|
|
! FAC011 = (_ONE_ - FS) * FAC11(LAY) |
157 |
|
|
! FAC101 = FS * FAC01(LAY) |
158 |
|
|
! FAC111 = FS * FAC11(LAY) |
159 |
|
|
!---- |
160 |
✓✓ |
1359792 |
DO I_LAY = K_LAYTROP+1, KLEV |
161 |
|
1288224 |
Z_FS=ZFS(I_LAY) |
162 |
|
1288224 |
JS=IJS(I_LAY) |
163 |
✓✓ |
21971376 |
DO IG = 1, NG5 |
164 |
|
|
!-- DS_000515 |
165 |
|
|
P_TAU (NGS4+IG,I_LAY) = Z_SPECCOMB(I_LAY) * & |
166 |
|
|
& ( (1. - Z_FS) *(P_FAC00(I_LAY) * ABSB(IND0(I_LAY) ,IG) + & |
167 |
|
|
& P_FAC10(I_LAY) * ABSB(IND0(I_LAY)+5,IG) + & |
168 |
|
|
& P_FAC01(I_LAY) * ABSB(IND1(I_LAY) ,IG) + & |
169 |
|
|
& P_FAC11(I_LAY) * ABSB(IND1(I_LAY)+5,IG))+ & |
170 |
|
|
& Z_FS *(P_FAC00(I_LAY) * ABSB(IND0(I_LAY)+1,IG) + & |
171 |
|
|
& P_FAC10(I_LAY) * ABSB(IND0(I_LAY)+6,IG) + & |
172 |
|
|
& P_FAC01(I_LAY) * ABSB(IND1(I_LAY)+1,IG) + & |
173 |
|
|
& P_FAC11(I_LAY) * ABSB(IND1(I_LAY)+6,IG))) & |
174 |
|
|
! &(Z_FAC000 * ABSB(IND0(I_LAY) ,IG) +& |
175 |
|
|
! & Z_FAC100 * ABSB(IND0(I_LAY)+1,IG) +& |
176 |
|
|
! & Z_FAC010 * ABSB(IND0(I_LAY)+5,IG) +& |
177 |
|
|
! & Z_FAC110 * ABSB(IND0(I_LAY)+6,IG) +& |
178 |
|
|
! & Z_FAC001 * ABSB(IND1(I_LAY) ,IG) +& |
179 |
|
|
! & Z_FAC101 * ABSB(IND1(I_LAY)+1,IG) +& |
180 |
|
|
! & Z_FAC011 * ABSB(IND1(I_LAY)+5,IG) +& |
181 |
|
|
! & Z_FAC111 * ABSB(IND1(I_LAY)+6,IG))& |
182 |
|
|
!-- DS_000515 |
183 |
|
|
& + P_WX(1,I_LAY) * CCL4(IG)& |
184 |
|
20611584 |
& + P_TAUAERL(I_LAY,5) |
185 |
|
|
PFRAC(NGS4+IG,I_LAY) = FRACREFB(IG,JS) + Z_FS *& |
186 |
|
21899808 |
& (FRACREFB(IG,JS+1) - FRACREFB(IG,JS)) |
187 |
|
|
ENDDO |
188 |
|
|
ENDDO |
189 |
|
|
|
190 |
✓✗ |
71568 |
IF (LHOOK) CALL DR_HOOK('RRTM_TAUMOL5',1,ZHOOK_HANDLE) |
191 |
|
71568 |
END SUBROUTINE RRTM_TAUMOL5 |