[3908] | 1 | SUBROUTINE SRTM_TAUMOL21 & |
---|
| 2 | & ( KIDIA , KFDIA , KLEV,& |
---|
| 3 | & P_FAC00 , P_FAC01 , P_FAC10 , P_FAC11,& |
---|
| 4 | & K_JP , K_JT , K_JT1 , P_ONEMINUS,& |
---|
| 5 | & P_COLH2O , P_COLCO2 , P_COLMOL,& |
---|
| 6 | & K_LAYTROP , P_SELFFAC, P_SELFFRAC, K_INDSELF , P_FORFAC, P_FORFRAC, K_INDFOR,& |
---|
| 7 | & P_SFLUXZEN, P_TAUG , P_TAUR , PRMU0 & |
---|
| 8 | & ) |
---|
| 9 | |
---|
| 10 | ! Written by Eli J. Mlawer, Atmospheric & Environmental Research. |
---|
| 11 | |
---|
| 12 | ! BAND 21: 6150-7700 cm-1 (low - H2O,CO2; high - H2O,CO2) |
---|
| 13 | |
---|
| 14 | ! Modifications |
---|
| 15 | ! M.Hamrud 01-Oct-2003 CY28 Cleaning |
---|
| 16 | |
---|
| 17 | ! JJMorcrette 2003-02-24 adapted to ECMWF environment |
---|
| 18 | ! D.Salmond 31-Oct-2007 Vector version in the style of RRTM from Meteo France & NEC |
---|
| 19 | ! JJMorcrette 20110610 Flexible configuration for number of g-points |
---|
| 20 | |
---|
| 21 | USE PARKIND1 , ONLY : JPIM, JPRB |
---|
| 22 | USE YOMHOOK , ONLY : LHOOK, DR_HOOK |
---|
| 23 | USE PARSRTM , ONLY : JPG |
---|
| 24 | USE YOESRTM , ONLY : NG21 |
---|
| 25 | USE YOESRTA21, ONLY : ABSA, ABSB, FORREFC, SELFREFC, SFLUXREFC, RAYL, LAYREFFR, STRRAT |
---|
| 26 | USE YOESRTWN , ONLY : NSPA, NSPB |
---|
| 27 | |
---|
| 28 | IMPLICIT NONE |
---|
| 29 | |
---|
| 30 | !-- Output |
---|
| 31 | INTEGER(KIND=JPIM),INTENT(IN) :: KIDIA, KFDIA |
---|
| 32 | INTEGER(KIND=JPIM),INTENT(IN) :: KLEV |
---|
| 33 | REAL(KIND=JPRB) ,INTENT(IN) :: P_FAC00(KIDIA:KFDIA,KLEV) |
---|
| 34 | REAL(KIND=JPRB) ,INTENT(IN) :: P_FAC01(KIDIA:KFDIA,KLEV) |
---|
| 35 | REAL(KIND=JPRB) ,INTENT(IN) :: P_FAC10(KIDIA:KFDIA,KLEV) |
---|
| 36 | REAL(KIND=JPRB) ,INTENT(IN) :: P_FAC11(KIDIA:KFDIA,KLEV) |
---|
| 37 | INTEGER(KIND=JPIM),INTENT(IN) :: K_JP(KIDIA:KFDIA,KLEV) |
---|
| 38 | INTEGER(KIND=JPIM),INTENT(IN) :: K_JT(KIDIA:KFDIA,KLEV) |
---|
| 39 | INTEGER(KIND=JPIM),INTENT(IN) :: K_JT1(KIDIA:KFDIA,KLEV) |
---|
| 40 | REAL(KIND=JPRB) ,INTENT(IN) :: P_ONEMINUS(KIDIA:KFDIA) |
---|
| 41 | REAL(KIND=JPRB) ,INTENT(IN) :: P_COLH2O(KIDIA:KFDIA,KLEV) |
---|
| 42 | REAL(KIND=JPRB) ,INTENT(IN) :: P_COLCO2(KIDIA:KFDIA,KLEV) |
---|
| 43 | REAL(KIND=JPRB) ,INTENT(IN) :: P_COLMOL(KIDIA:KFDIA,KLEV) |
---|
| 44 | INTEGER(KIND=JPIM),INTENT(IN) :: K_LAYTROP(KIDIA:KFDIA) |
---|
| 45 | REAL(KIND=JPRB) ,INTENT(IN) :: P_SELFFAC(KIDIA:KFDIA,KLEV) |
---|
| 46 | REAL(KIND=JPRB) ,INTENT(IN) :: P_SELFFRAC(KIDIA:KFDIA,KLEV) |
---|
| 47 | INTEGER(KIND=JPIM),INTENT(IN) :: K_INDSELF(KIDIA:KFDIA,KLEV) |
---|
| 48 | REAL(KIND=JPRB) ,INTENT(IN) :: P_FORFAC(KIDIA:KFDIA,KLEV) |
---|
| 49 | REAL(KIND=JPRB) ,INTENT(IN) :: P_FORFRAC(KIDIA:KFDIA,KLEV) |
---|
| 50 | INTEGER(KIND=JPIM),INTENT(IN) :: K_INDFOR(KIDIA:KFDIA,KLEV) |
---|
| 51 | |
---|
| 52 | REAL(KIND=JPRB) ,INTENT(OUT) :: P_SFLUXZEN(KIDIA:KFDIA,JPG) |
---|
| 53 | REAL(KIND=JPRB) ,INTENT(OUT) :: P_TAUG(KIDIA:KFDIA,KLEV,JPG) |
---|
| 54 | REAL(KIND=JPRB) ,INTENT(OUT) :: P_TAUR(KIDIA:KFDIA,KLEV,JPG) |
---|
| 55 | REAL(KIND=JPRB) ,INTENT(IN) :: PRMU0(KIDIA:KFDIA) |
---|
| 56 | !- from INTFAC |
---|
| 57 | !- from INTIND |
---|
| 58 | !- from PRECISE |
---|
| 59 | !- from PROFDATA |
---|
| 60 | !- from SELF |
---|
| 61 | INTEGER(KIND=JPIM) :: IG, IND0, IND1, INDS, INDF, JS, I_LAY, I_LAYSOLFR(KIDIA:KFDIA), I_NLAYERS, IPLON |
---|
| 62 | |
---|
| 63 | INTEGER(KIND=JPIM) :: I_LAY_NEXT |
---|
| 64 | |
---|
| 65 | REAL(KIND=JPRB) :: Z_FAC000, Z_FAC001, Z_FAC010, Z_FAC011, Z_FAC100, Z_FAC101,& |
---|
| 66 | & Z_FAC110, Z_FAC111, Z_FS, Z_SPECCOMB, Z_SPECMULT, Z_SPECPARM, & |
---|
| 67 | & Z_TAURAY |
---|
| 68 | REAL(KIND=JPRB) :: ZHOOK_HANDLE |
---|
| 69 | |
---|
| 70 | ASSOCIATE(NFLEVG=>KLEV) |
---|
| 71 | IF (LHOOK) CALL DR_HOOK('SRTM_TAUMOL21',0,ZHOOK_HANDLE) |
---|
| 72 | |
---|
| 73 | I_NLAYERS = KLEV |
---|
| 74 | |
---|
| 75 | ! Compute the optical depth by interpolating in ln(pressure), |
---|
| 76 | ! temperature, and appropriate species. Below LAYTROP, the water |
---|
| 77 | ! vapor self-continuum is interpolated (in temperature) separately. |
---|
| 78 | |
---|
| 79 | I_LAYSOLFR(KIDIA:KFDIA) = K_LAYTROP(KIDIA:KFDIA) |
---|
| 80 | |
---|
| 81 | DO I_LAY = 1, I_NLAYERS |
---|
| 82 | I_LAY_NEXT = MIN(I_NLAYERS, I_LAY+1) |
---|
| 83 | DO IPLON = KIDIA, KFDIA |
---|
| 84 | IF (PRMU0(IPLON) > 0.0_JPRB) THEN |
---|
| 85 | IF (I_LAY <= K_LAYTROP(IPLON)) THEN |
---|
| 86 | IF (K_JP(IPLON,I_LAY) < LAYREFFR .AND. K_JP(IPLON,I_LAY_NEXT) >= LAYREFFR) & |
---|
| 87 | & I_LAYSOLFR(IPLON) = MIN(I_LAY+1,K_LAYTROP(IPLON)) |
---|
| 88 | Z_SPECCOMB = P_COLH2O(IPLON,I_LAY) + STRRAT*P_COLCO2(IPLON,I_LAY) |
---|
| 89 | Z_SPECPARM = P_COLH2O(IPLON,I_LAY)/Z_SPECCOMB |
---|
| 90 | IF (Z_SPECPARM >= P_ONEMINUS(IPLON)) Z_SPECPARM = P_ONEMINUS(IPLON) |
---|
| 91 | Z_SPECMULT = 8.*(Z_SPECPARM) |
---|
| 92 | JS = 1 + INT(Z_SPECMULT) |
---|
| 93 | Z_FS = MOD(Z_SPECMULT, 1.0_JPRB ) |
---|
| 94 | ! Z_FAC000 = (1. - Z_FS) * P_FAC00(I_LAY) |
---|
| 95 | ! Z_FAC010 = (1. - Z_FS) * P_FAC10(I_LAY) |
---|
| 96 | ! Z_FAC100 = Z_FS * P_FAC00(I_LAY) |
---|
| 97 | ! Z_FAC110 = Z_FS * P_FAC10(I_LAY) |
---|
| 98 | ! Z_FAC001 = (1. - Z_FS) * P_FAC01(I_LAY) |
---|
| 99 | ! Z_FAC011 = (1. - Z_FS) * P_FAC11(I_LAY) |
---|
| 100 | ! Z_FAC101 = Z_FS * P_FAC01(I_LAY) |
---|
| 101 | ! Z_FAC111 = Z_FS * P_FAC11(I_LAY) |
---|
| 102 | IND0 = ((K_JP(IPLON,I_LAY)-1)*5+(K_JT(IPLON,I_LAY)-1))*NSPA(21) + JS |
---|
| 103 | IND1 = (K_JP(IPLON,I_LAY)*5+(K_JT1(IPLON,I_LAY)-1))*NSPA(21) + JS |
---|
| 104 | INDS = K_INDSELF(IPLON,I_LAY) |
---|
| 105 | INDF = K_INDFOR(IPLON,I_LAY) |
---|
| 106 | Z_TAURAY = P_COLMOL(IPLON,I_LAY) * RAYL |
---|
| 107 | |
---|
| 108 | ! DO IG = 1, NG(21) |
---|
| 109 | !CDIR UNROLL=NG21 |
---|
| 110 | DO IG = 1 , NG21 |
---|
| 111 | P_TAUG(IPLON,I_LAY,IG) = Z_SPECCOMB * & |
---|
| 112 | ! & (Z_FAC000 * ABSA(IND0,IG) + & |
---|
| 113 | ! & Z_FAC100 * ABSA(IND0+1,IG) + & |
---|
| 114 | ! & Z_FAC010 * ABSA(IND0+9,IG) + & |
---|
| 115 | ! & Z_FAC110 * ABSA(IND0+10,IG) + & |
---|
| 116 | ! & Z_FAC001 * ABSA(IND1,IG) + & |
---|
| 117 | ! & Z_FAC101 * ABSA(IND1+1,IG) + & |
---|
| 118 | ! & Z_FAC011 * ABSA(IND1+9,IG) + & |
---|
| 119 | ! & Z_FAC111 * ABSA(IND1+10,IG)) + & |
---|
| 120 | & (& |
---|
| 121 | & (1. - Z_FS) * ( ABSA(IND0,IG) * P_FAC00(IPLON,I_LAY) + & |
---|
| 122 | & ABSA(IND0+9,IG) * P_FAC10(IPLON,I_LAY) + & |
---|
| 123 | & ABSA(IND1,IG) * P_FAC01(IPLON,I_LAY) + & |
---|
| 124 | & ABSA(IND1+9,IG) * P_FAC11(IPLON,I_LAY) ) + & |
---|
| 125 | & Z_FS * ( ABSA(IND0+1,IG) * P_FAC00(IPLON,I_LAY) + & |
---|
| 126 | & ABSA(IND0+10,IG) * P_FAC10(IPLON,I_LAY) + & |
---|
| 127 | & ABSA(IND1+1,IG) * P_FAC01(IPLON,I_LAY) + & |
---|
| 128 | & ABSA(IND1+10,IG) * P_FAC11(IPLON,I_LAY) ) & |
---|
| 129 | & ) + & |
---|
| 130 | & P_COLH2O(IPLON,I_LAY) * & |
---|
| 131 | & (P_SELFFAC(IPLON,I_LAY) * (SELFREFC(INDS,IG) + & |
---|
| 132 | & P_SELFFRAC(IPLON,I_LAY) * & |
---|
| 133 | & (SELFREFC(INDS+1,IG) - SELFREFC(INDS,IG))) + & |
---|
| 134 | & P_FORFAC(IPLON,I_LAY) * (FORREFC(INDF,IG) + & |
---|
| 135 | & P_FORFRAC(IPLON,I_LAY) * & |
---|
| 136 | & (FORREFC(INDF+1,IG) - FORREFC(INDF,IG)))) |
---|
| 137 | ! & + TAURAY |
---|
| 138 | ! SSA(LAY,IG) = TAURAY/TAUG(LAY,IG) |
---|
| 139 | IF (I_LAY == I_LAYSOLFR(IPLON)) P_SFLUXZEN(IPLON,IG) = SFLUXREFC(IG,JS) & |
---|
| 140 | & + Z_FS * (SFLUXREFC(IG,JS+1) - SFLUXREFC(IG,JS)) |
---|
| 141 | P_TAUR(IPLON,I_LAY,IG) = Z_TAURAY |
---|
| 142 | ENDDO |
---|
| 143 | ENDIF |
---|
| 144 | ENDIF |
---|
| 145 | ENDDO |
---|
| 146 | ENDDO |
---|
| 147 | |
---|
| 148 | DO I_LAY = 1, I_NLAYERS |
---|
| 149 | DO IPLON = KIDIA, KFDIA |
---|
| 150 | IF (PRMU0(IPLON) > 0.0_JPRB) THEN |
---|
| 151 | IF (I_LAY >= K_LAYTROP(IPLON)+1) THEN |
---|
| 152 | Z_SPECCOMB = P_COLH2O(IPLON,I_LAY) + STRRAT*P_COLCO2(IPLON,I_LAY) |
---|
| 153 | Z_SPECPARM = P_COLH2O(IPLON,I_LAY)/Z_SPECCOMB |
---|
| 154 | IF (Z_SPECPARM >= P_ONEMINUS(IPLON)) Z_SPECPARM = P_ONEMINUS(IPLON) |
---|
| 155 | Z_SPECMULT = 4.*(Z_SPECPARM) |
---|
| 156 | JS = 1 + INT(Z_SPECMULT) |
---|
| 157 | Z_FS = MOD(Z_SPECMULT, 1.0_JPRB ) |
---|
| 158 | ! Z_FAC000 = (1. - Z_FS) * P_FAC00(I_LAY) |
---|
| 159 | ! Z_FAC010 = (1. - Z_FS) * P_FAC10(I_LAY) |
---|
| 160 | ! Z_FAC100 = Z_FS * P_FAC00(I_LAY) |
---|
| 161 | ! Z_FAC110 = Z_FS * P_FAC10(I_LAY) |
---|
| 162 | ! Z_FAC001 = (1. - Z_FS) * P_FAC01(I_LAY) |
---|
| 163 | ! Z_FAC011 = (1. - Z_FS) * P_FAC11(I_LAY) |
---|
| 164 | ! Z_FAC101 = Z_FS * P_FAC01(I_LAY) |
---|
| 165 | ! Z_FAC111 = Z_FS * P_FAC11(I_LAY) |
---|
| 166 | IND0 = ((K_JP(IPLON,I_LAY)-13)*5+(K_JT(IPLON,I_LAY)-1))*NSPB(21) + JS |
---|
| 167 | IND1 = ((K_JP(IPLON,I_LAY)-12)*5+(K_JT1(IPLON,I_LAY)-1))*NSPB(21) + JS |
---|
| 168 | INDF = K_INDFOR(IPLON,I_LAY) |
---|
| 169 | Z_TAURAY = P_COLMOL(IPLON,I_LAY) * RAYL |
---|
| 170 | |
---|
| 171 | ! DO IG = 1, NG(21) |
---|
| 172 | !CDIR UNROLL=NG21 |
---|
| 173 | DO IG = 1 , NG21 |
---|
| 174 | P_TAUG(IPLON,I_LAY,IG) = Z_SPECCOMB * & |
---|
| 175 | ! & (Z_FAC000 * ABSB(IND0,IG) + & |
---|
| 176 | ! & Z_FAC100 * ABSB(IND0+1,IG) + & |
---|
| 177 | ! & Z_FAC010 * ABSB(IND0+5,IG) + & |
---|
| 178 | ! & Z_FAC110 * ABSB(IND0+6,IG) + & |
---|
| 179 | ! & Z_FAC001 * ABSB(IND1,IG) + & |
---|
| 180 | ! & Z_FAC101 * ABSB(IND1+1,IG) + & |
---|
| 181 | ! & Z_FAC011 * ABSB(IND1+5,IG) + & |
---|
| 182 | ! & Z_FAC111 * ABSB(IND1+6,IG)) + & |
---|
| 183 | & (& |
---|
| 184 | & (1. - Z_FS) * ( ABSB(IND0,IG) * P_FAC00(IPLON,I_LAY) + & |
---|
| 185 | & ABSB(IND0+5,IG) * P_FAC10(IPLON,I_LAY) + & |
---|
| 186 | & ABSB(IND1,IG) * P_FAC01(IPLON,I_LAY) + & |
---|
| 187 | & ABSB(IND1+5,IG) * P_FAC11(IPLON,I_LAY) ) + & |
---|
| 188 | & Z_FS * ( ABSB(IND0+1,IG) * P_FAC00(IPLON,I_LAY) + & |
---|
| 189 | & ABSB(IND0+6,IG) * P_FAC10(IPLON,I_LAY) + & |
---|
| 190 | & ABSB(IND1+1,IG) * P_FAC01(IPLON,I_LAY) + & |
---|
| 191 | & ABSB(IND1+6,IG) * P_FAC11(IPLON,I_LAY) ) & |
---|
| 192 | & ) + & |
---|
| 193 | & P_COLH2O(IPLON,I_LAY) * & |
---|
| 194 | & P_FORFAC(IPLON,I_LAY) * (FORREFC(INDF,IG) + & |
---|
| 195 | & P_FORFRAC(IPLON,I_LAY) * & |
---|
| 196 | & (FORREFC(INDF+1,IG) - FORREFC(INDF,IG))) |
---|
| 197 | ! & + TAURAY |
---|
| 198 | ! SSA(LAY,IG) = TAURAY/TAUG(LAY,IG) |
---|
| 199 | P_TAUR(IPLON,I_LAY,IG) = Z_TAURAY |
---|
| 200 | ENDDO |
---|
| 201 | ENDIF |
---|
| 202 | ENDIF |
---|
| 203 | ENDDO |
---|
| 204 | ENDDO |
---|
| 205 | |
---|
| 206 | !----------------------------------------------------------------------- |
---|
| 207 | IF (LHOOK) CALL DR_HOOK('SRTM_TAUMOL21',1,ZHOOK_HANDLE) |
---|
| 208 | END ASSOCIATE |
---|
| 209 | END SUBROUTINE SRTM_TAUMOL21 |
---|