1 | !---------------------------------------------------------------------------- |
---|
2 | SUBROUTINE RRTM_TAUMOL6 (KIDIA,KFDIA,KLEV,P_TAU,P_WX,& |
---|
3 | & P_TAUAERL,P_FAC00,P_FAC01,P_FAC10,P_FAC11,P_FORFAC,P_FORFRAC,K_INDFOR,K_JP,K_JT,K_JT1,& |
---|
4 | & P_COLH2O,P_COLCO2,P_COLDRY,K_LAYTROP,P_SELFFAC,P_SELFFRAC,K_INDSELF,PFRAC,PMINORFRAC,KINDMINOR) |
---|
5 | |
---|
6 | ! BAND 6: 820-980 cm-1 (low - H2O; high - nothing) |
---|
7 | |
---|
8 | ! AUTHOR. |
---|
9 | ! ------- |
---|
10 | ! JJMorcrette, ECMWF |
---|
11 | |
---|
12 | ! MODIFICATIONS. |
---|
13 | ! -------------- |
---|
14 | ! M.Hamrud 01-Oct-2003 CY28 Cleaning |
---|
15 | ! NEC 25-Oct-2007 Optimisations |
---|
16 | ! JJMorcrette 20110613 flexible number of g-points |
---|
17 | ! ABozzo 201306 updated to rrtmg v4.85 |
---|
18 | ! band 6: 820-980 cm-1 (low key - h2o; low minor - co2) |
---|
19 | ! (high key - nothing; high minor - cfc11, cfc12) |
---|
20 | ! --------------------------------------------------------------------------- |
---|
21 | |
---|
22 | USE PARKIND1 ,ONLY : JPIM ,JPRB |
---|
23 | USE YOMHOOK ,ONLY : LHOOK, DR_HOOK, JPHOOK |
---|
24 | |
---|
25 | USE PARRRTM , ONLY : JPBAND ,JPXSEC |
---|
26 | USE YOERRTM , ONLY : JPGPT ,NG6 ,NGS5 |
---|
27 | USE YOERRTWN , ONLY : NSPA |
---|
28 | USE YOERRTA6 , ONLY : ABSA ,KA_MCO2 ,CFC11ADJ , CFC12 ,& |
---|
29 | & FRACREFA,SELFREF,FORREF |
---|
30 | USE YOERRTRF, ONLY : CHI_MLS |
---|
31 | |
---|
32 | IMPLICIT NONE |
---|
33 | |
---|
34 | INTEGER(KIND=JPIM),INTENT(IN) :: KIDIA |
---|
35 | INTEGER(KIND=JPIM),INTENT(IN) :: KFDIA |
---|
36 | INTEGER(KIND=JPIM),INTENT(IN) :: KLEV |
---|
37 | REAL(KIND=JPRB) ,INTENT(OUT) :: P_TAU(KIDIA:KFDIA,JPGPT,KLEV) |
---|
38 | REAL(KIND=JPRB) ,INTENT(IN) :: P_WX(KIDIA:KFDIA,JPXSEC,KLEV) ! Amount of trace gases |
---|
39 | REAL(KIND=JPRB) ,INTENT(IN) :: P_TAUAERL(KIDIA:KFDIA,KLEV,JPBAND) |
---|
40 | REAL(KIND=JPRB) ,INTENT(IN) :: P_FAC00(KIDIA:KFDIA,KLEV) |
---|
41 | REAL(KIND=JPRB) ,INTENT(IN) :: P_FAC01(KIDIA:KFDIA,KLEV) |
---|
42 | REAL(KIND=JPRB) ,INTENT(IN) :: P_FAC10(KIDIA:KFDIA,KLEV) |
---|
43 | REAL(KIND=JPRB) ,INTENT(IN) :: P_FAC11(KIDIA:KFDIA,KLEV) |
---|
44 | INTEGER(KIND=JPIM),INTENT(IN) :: K_JP(KIDIA:KFDIA,KLEV) |
---|
45 | INTEGER(KIND=JPIM),INTENT(IN) :: K_JT(KIDIA:KFDIA,KLEV) |
---|
46 | INTEGER(KIND=JPIM),INTENT(IN) :: K_JT1(KIDIA:KFDIA,KLEV) |
---|
47 | REAL(KIND=JPRB) ,INTENT(IN) :: P_COLH2O(KIDIA:KFDIA,KLEV) |
---|
48 | REAL(KIND=JPRB) ,INTENT(IN) :: P_COLCO2(KIDIA:KFDIA,KLEV) |
---|
49 | REAL(KIND=JPRB) ,INTENT(IN) :: P_COLDRY(KIDIA:KFDIA,KLEV) |
---|
50 | INTEGER(KIND=JPIM),INTENT(IN) :: K_LAYTROP(KIDIA:KFDIA) |
---|
51 | REAL(KIND=JPRB) ,INTENT(IN) :: P_SELFFAC(KIDIA:KFDIA,KLEV) |
---|
52 | REAL(KIND=JPRB) ,INTENT(IN) :: P_SELFFRAC(KIDIA:KFDIA,KLEV) |
---|
53 | INTEGER(KIND=JPIM),INTENT(IN) :: K_INDSELF(KIDIA:KFDIA,KLEV) |
---|
54 | REAL(KIND=JPRB) ,INTENT(OUT) :: PFRAC(KIDIA:KFDIA,JPGPT,KLEV) |
---|
55 | |
---|
56 | INTEGER(KIND=JPIM),INTENT(IN) :: K_INDFOR(KIDIA:KFDIA,KLEV) |
---|
57 | REAL(KIND=JPRB) ,INTENT(IN) :: P_FORFAC(KIDIA:KFDIA,KLEV) |
---|
58 | REAL(KIND=JPRB) ,INTENT(IN) :: P_FORFRAC(KIDIA:KFDIA,KLEV) |
---|
59 | REAL(KIND=JPRB) ,INTENT(IN) :: PMINORFRAC(KIDIA:KFDIA,KLEV) |
---|
60 | INTEGER(KIND=JPIM),INTENT(IN) :: KINDMINOR(KIDIA:KFDIA,KLEV) |
---|
61 | |
---|
62 | ! --------------------------------------------------------------------------- |
---|
63 | |
---|
64 | INTEGER(KIND=JPIM) :: IND0(KLEV),IND1(KLEV),INDS(KLEV),INDF(KLEV),INDM(KLEV) |
---|
65 | |
---|
66 | INTEGER(KIND=JPIM) :: IG, JLAY |
---|
67 | INTEGER(KIND=JPIM) :: JLON |
---|
68 | |
---|
69 | REAL(KIND=JPRB) :: ZADJFAC,ZADJCOLCO2(KIDIA:KFDIA,KLEV),ZRATCO2,ZCHI_CO2 |
---|
70 | REAL(KIND=JPRB) :: ZTAUFOR,ZTAUSELF,ZABSCO2 |
---|
71 | REAL(KIND=JPHOOK) :: ZHOOK_HANDLE |
---|
72 | |
---|
73 | ! Minor gas mapping level: |
---|
74 | ! lower - co2, p = 706.2720 mb, t = 294.2 k |
---|
75 | ! upper - cfc11, cfc12 |
---|
76 | |
---|
77 | |
---|
78 | ! Compute the optical depth by interpolating in ln(pressure) and |
---|
79 | ! temperature. The water vapor self- and foreign- continuum is interpolated |
---|
80 | ! (in temperature) separately. |
---|
81 | |
---|
82 | ASSOCIATE(NFLEVG=>KLEV) |
---|
83 | IF (LHOOK) CALL DR_HOOK('RRTM_TAUMOL6',0,ZHOOK_HANDLE) |
---|
84 | |
---|
85 | DO JLAY = 1, KLEV |
---|
86 | DO JLON = KIDIA, KFDIA |
---|
87 | IF (JLAY <= K_LAYTROP(JLON)) THEN |
---|
88 | ! In atmospheres where the amount of CO2 is too great to be considered |
---|
89 | ! a minor species, adjust the column amount of CO2 by an empirical factor |
---|
90 | ! to obtain the proper contribution. |
---|
91 | ZCHI_CO2 = P_COLCO2(JLON,JLAY)/P_COLDRY(JLON,JLAY) |
---|
92 | ZRATCO2 = 1.E20_JPRB*ZCHI_CO2/CHI_MLS(2,K_JP(JLON,JLAY)+1) |
---|
93 | IF (ZRATCO2 > 3.0_JPRB) THEN |
---|
94 | ZADJFAC = 2.0_JPRB+(ZRATCO2-2.0_JPRB)**0.77_JPRB |
---|
95 | ZADJCOLCO2(JLON,JLAY) = ZADJFAC*CHI_MLS(2,K_JP(JLON,JLAY)+1)*P_COLDRY(JLON,JLAY)*1.E-20_JPRB |
---|
96 | ELSE |
---|
97 | ZADJCOLCO2(JLON,JLAY) = P_COLCO2(JLON,JLAY) |
---|
98 | ENDIF |
---|
99 | |
---|
100 | IND0(JLAY) = ((K_JP(JLON,JLAY)-1)*5+(K_JT(JLON,JLAY)-1))*NSPA(6) + 1 |
---|
101 | IND1(JLAY) = (K_JP(JLON,JLAY)*5+(K_JT1(JLON,JLAY)-1))*NSPA(6) + 1 |
---|
102 | INDS(JLAY) = K_INDSELF(JLON,JLAY) |
---|
103 | INDF(JLAY) = K_INDFOR(JLON,JLAY) |
---|
104 | INDM(JLAY) = KINDMINOR(JLON,JLAY) |
---|
105 | |
---|
106 | !-- DS_000515 |
---|
107 | !CDIR UNROLL=NG6 |
---|
108 | DO IG = 1, NG6 |
---|
109 | !-- DS_000515 |
---|
110 | ZTAUSELF = P_SELFFAC(JLON,JLAY)* (SELFREF(INDS(JLAY),IG) + P_SELFFRAC(JLON,JLAY) * & |
---|
111 | & (SELFREF(INDS(JLAY)+1,IG) - SELFREF(INDS(JLAY),IG))) |
---|
112 | ZTAUFOR = P_FORFAC(JLON,JLAY) * (FORREF(INDF(JLAY),IG) + P_FORFRAC(JLON,JLAY) * & |
---|
113 | & (FORREF(INDF(JLAY)+1,IG) - FORREF(INDF(JLAY),IG))) |
---|
114 | ZABSCO2 = KA_MCO2(INDM(JLAY),IG) + PMINORFRAC(JLON,JLAY) * & |
---|
115 | & (KA_MCO2(INDM(JLAY)+1,IG) - KA_MCO2(INDM(JLAY),IG)) |
---|
116 | |
---|
117 | P_TAU(JLON,NGS5+IG,JLAY) = P_COLH2O(JLON,JLAY) *& |
---|
118 | & (P_FAC00(JLON,JLAY) * ABSA(IND0(JLAY) ,IG) +& |
---|
119 | & P_FAC10(JLON,JLAY) * ABSA(IND0(JLAY)+1,IG) +& |
---|
120 | & P_FAC01(JLON,JLAY) * ABSA(IND1(JLAY) ,IG) +& |
---|
121 | & P_FAC11(JLON,JLAY) * ABSA(IND1(JLAY)+1,IG)) +& |
---|
122 | & ZTAUSELF + ZTAUFOR & |
---|
123 | & + P_WX(JLON,2,JLAY) * CFC11ADJ(IG)& |
---|
124 | & + P_WX(JLON,3,JLAY) * CFC12(IG)& |
---|
125 | & + ZADJCOLCO2(JLON,JLAY) * ZABSCO2 & |
---|
126 | & + P_TAUAERL(JLON,JLAY,6) |
---|
127 | PFRAC(JLON,NGS5+IG,JLAY) = FRACREFA(IG) |
---|
128 | ENDDO |
---|
129 | ENDIF |
---|
130 | |
---|
131 | ! Nothing important goes on above LAYTROP in this band. |
---|
132 | !-- JJM_000517 |
---|
133 | IF (JLAY > K_LAYTROP(JLON)) THEN |
---|
134 | !CDIR UNROLL=NG6 |
---|
135 | DO IG = 1, NG6 |
---|
136 | !-- JJM_000517 |
---|
137 | P_TAU(JLON,NGS5+IG,JLAY) = 0.0_JPRB & |
---|
138 | & + P_WX(JLON,2,JLAY) * CFC11ADJ(IG)& |
---|
139 | & + P_WX(JLON,3,JLAY) * CFC12(IG)& |
---|
140 | & + P_TAUAERL(JLON,JLAY,6) |
---|
141 | PFRAC(JLON,NGS5+IG,JLAY) = FRACREFA(IG) |
---|
142 | ENDDO |
---|
143 | ENDIF |
---|
144 | ENDDO |
---|
145 | ENDDO |
---|
146 | |
---|
147 | IF (LHOOK) CALL DR_HOOK('RRTM_TAUMOL6',1,ZHOOK_HANDLE) |
---|
148 | |
---|
149 | END ASSOCIATE |
---|
150 | END SUBROUTINE RRTM_TAUMOL6 |
---|