[1989] | 1 | !OPTIONS XOPT(HSFUN) |
---|
| 2 | SUBROUTINE SWU & |
---|
| 3 | & ( KIDIA, KFDIA , KLON , KLEV,& |
---|
| 4 | & PSCT , PCARDI, PCLDSW, PPMB , PPSOL, PRMU0, PTAVE, PWV,& |
---|
| 5 | & PAKI , PCLD , PCLEAR, PDSIG, PFACT, PRMU , PSEC , PUD & |
---|
| 6 | & ) |
---|
| 7 | |
---|
| 8 | !**** *SWU* - SHORTWAVE RADIATION, ABSORBER AMOUNTS |
---|
| 9 | |
---|
| 10 | ! PURPOSE. |
---|
| 11 | ! -------- |
---|
| 12 | ! COMPUTES THE ABSORBER AMOUNTS USED IN SHORTWAVE RADIATION |
---|
| 13 | ! CALCULATIONS |
---|
| 14 | |
---|
| 15 | !** INTERFACE. |
---|
| 16 | ! ---------- |
---|
| 17 | ! *SWU* IS CALLED BY *SW* |
---|
| 18 | |
---|
| 19 | ! IMPLICIT ARGUMENTS : |
---|
| 20 | ! -------------------- |
---|
| 21 | |
---|
| 22 | ! ==== INPUTS === |
---|
| 23 | ! ==== OUTPUTS === |
---|
| 24 | |
---|
| 25 | ! METHOD. |
---|
| 26 | ! ------- |
---|
| 27 | |
---|
| 28 | ! 1. COMPUTES ABSORBER AMOUNTS WITH TEMPERATURE AND PRESSURE |
---|
| 29 | ! SCALING. |
---|
| 30 | |
---|
| 31 | ! EXTERNALS. |
---|
| 32 | ! ---------- |
---|
| 33 | |
---|
| 34 | ! *SWTT* |
---|
| 35 | |
---|
| 36 | ! REFERENCE. |
---|
| 37 | ! ---------- |
---|
| 38 | |
---|
| 39 | ! SEE RADIATION'S PART OF THE ECMWF RESEARCH DEPARTMENT |
---|
| 40 | ! DOCUMENTATION, AND FOUQUART AND BONNEL (1980) |
---|
| 41 | |
---|
| 42 | ! AUTHOR. |
---|
| 43 | ! ------- |
---|
| 44 | ! JEAN-JACQUES MORCRETTE *ECMWF* |
---|
| 45 | |
---|
| 46 | ! MODIFICATIONS. |
---|
| 47 | ! -------------- |
---|
| 48 | ! ORIGINAL : 89-07-14 |
---|
| 49 | ! 03-03-18 JJMorcrette security on normalized cloud cover |
---|
| 50 | ! M.Hamrud 01-Oct-2003 CY28 Cleaning |
---|
| 51 | ! Y.Seity 06-09-09 : add modset from O.Thouron (MesoNH) under NOVLP tests |
---|
| 52 | |
---|
| 53 | ! ------------------------------------------------------------------ |
---|
| 54 | |
---|
| 55 | USE PARKIND1 ,ONLY : JPIM ,JPRB |
---|
| 56 | USE YOMHOOK ,ONLY : LHOOK, DR_HOOK |
---|
| 57 | |
---|
| 58 | USE YOECLD , ONLY : REPSEC |
---|
| 59 | !USE YOERAD , ONLY : NOVLP ,NSW |
---|
| 60 | ! NSW mis dans .def MPL 20140211 |
---|
| 61 | USE YOERAD , ONLY : NOVLP |
---|
| 62 | USE YOERDU , ONLY : REPSCQ |
---|
| 63 | USE YOESW , ONLY : RPDH1 ,RPDU1 ,RPNH ,RPNU ,& |
---|
| 64 | & RTDH2O ,RTDUMG ,RTH2O ,RTUMG |
---|
| 65 | USE YOEOVLP , ONLY : RA1OVLP |
---|
[5294] | 66 | ! Temporary fix waiting for cleaner interface (or not) |
---|
| 67 | USE clesphys_mod_h, ONLY: NSW |
---|
[1989] | 68 | |
---|
| 69 | IMPLICIT NONE |
---|
| 70 | |
---|
[5294] | 71 | !!include "clesphys.h" |
---|
[1989] | 72 | INTEGER(KIND=JPIM),INTENT(IN) :: KLON |
---|
| 73 | INTEGER(KIND=JPIM),INTENT(IN) :: KLEV |
---|
| 74 | INTEGER(KIND=JPIM),INTENT(IN) :: KIDIA |
---|
| 75 | INTEGER(KIND=JPIM),INTENT(IN) :: KFDIA |
---|
| 76 | REAL(KIND=JPRB) ,INTENT(IN) :: PSCT |
---|
| 77 | REAL(KIND=JPRB) ,INTENT(IN) :: PCARDI |
---|
| 78 | REAL(KIND=JPRB) ,INTENT(IN) :: PCLDSW(KLON,KLEV) |
---|
| 79 | REAL(KIND=JPRB) ,INTENT(IN) :: PPMB(KLON,KLEV+1) |
---|
| 80 | REAL(KIND=JPRB) ,INTENT(IN) :: PPSOL(KLON) |
---|
| 81 | REAL(KIND=JPRB) ,INTENT(IN) :: PRMU0(KLON) |
---|
| 82 | REAL(KIND=JPRB) ,INTENT(IN) :: PTAVE(KLON,KLEV) |
---|
| 83 | REAL(KIND=JPRB) ,INTENT(IN) :: PWV(KLON,KLEV) |
---|
| 84 | REAL(KIND=JPRB) ,INTENT(OUT) :: PAKI(KLON,2,NSW) |
---|
| 85 | REAL(KIND=JPRB) ,INTENT(INOUT) :: PCLD(KLON,KLEV) |
---|
| 86 | REAL(KIND=JPRB) ,INTENT(OUT) :: PCLEAR(KLON) |
---|
| 87 | REAL(KIND=JPRB) ,INTENT(OUT) :: PDSIG(KLON,KLEV) |
---|
| 88 | REAL(KIND=JPRB) ,INTENT(OUT) :: PFACT(KLON) |
---|
| 89 | REAL(KIND=JPRB) ,INTENT(OUT) :: PRMU(KLON) |
---|
| 90 | REAL(KIND=JPRB) ,INTENT(OUT) :: PSEC(KLON) |
---|
| 91 | REAL(KIND=JPRB) ,INTENT(OUT) :: PUD(KLON,5,KLEV+1) |
---|
| 92 | ! ------------------------------------------------------------------ |
---|
| 93 | |
---|
| 94 | !* 0.1 ARGUMENTS |
---|
| 95 | ! --------- |
---|
| 96 | |
---|
| 97 | INTEGER(KIND=JPIM) :: INUIR |
---|
| 98 | |
---|
| 99 | ! ------------------------------------------------------------------ |
---|
| 100 | |
---|
| 101 | ! ------------ |
---|
| 102 | |
---|
| 103 | INTEGER(KIND=JPIM) :: IIND(2) |
---|
| 104 | REAL(KIND=JPRB) :: ZC1J(KLON,KLEV+1),ZCLEAR(KLON),ZCLOUD(KLON)& |
---|
| 105 | & , ZN175(KLON), ZN190(KLON), ZO175(KLON)& |
---|
| 106 | & , ZO190(KLON), ZSIGN(KLON)& |
---|
| 107 | & , ZR(KLON,2) , ZSIGO(KLON), ZUD(KLON,2) |
---|
| 108 | |
---|
| 109 | INTEGER(KIND=JPIM) :: JA, JK, JKL, JKLP1, JKP1, JL, JNU |
---|
| 110 | |
---|
| 111 | REAL(KIND=JPRB) :: ZDSCO2, ZDSH2O, ZFPPW, ZRTH, ZRTU, ZWH2O, ZALPHA1 |
---|
| 112 | REAL(KIND=JPRB) :: ZHOOK_HANDLE |
---|
| 113 | |
---|
| 114 | #include "swtt1.intfb.h" |
---|
| 115 | |
---|
| 116 | ! ------------------------------------------------------------------ |
---|
| 117 | |
---|
| 118 | !* 1. COMPUTES AMOUNTS OF ABSORBERS |
---|
| 119 | ! ----------------------------- |
---|
| 120 | |
---|
| 121 | REPSEC=1.E-12_JPRB !!!!! A REVOIR (MPL) |
---|
| 122 | IF (LHOOK) CALL DR_HOOK('SWU',0,ZHOOK_HANDLE) |
---|
| 123 | IIND(1)=1 |
---|
| 124 | IIND(2)=2 |
---|
| 125 | |
---|
| 126 | !* 1.1 INITIALIZES QUANTITIES |
---|
| 127 | ! ---------------------- |
---|
| 128 | |
---|
| 129 | DO JL = KIDIA,KFDIA |
---|
| 130 | PUD(JL,1,KLEV+1)=0.0_JPRB |
---|
| 131 | PUD(JL,2,KLEV+1)=0.0_JPRB |
---|
| 132 | PUD(JL,3,KLEV+1)=0.0_JPRB |
---|
| 133 | PUD(JL,4,KLEV+1)=0.0_JPRB |
---|
| 134 | PUD(JL,5,KLEV+1)=0.0_JPRB |
---|
| 135 | PFACT(JL)= PRMU0(JL) * PSCT |
---|
| 136 | !- already accounted for in RADINT |
---|
| 137 | ! PRMU(JL)=SQRT(1224.* PRMU0(JL) * PRMU0(JL) + 1.) / 35. |
---|
| 138 | PRMU(JL)=PRMU0(JL) |
---|
| 139 | PSEC(JL)=1.0_JPRB/PRMU(JL) |
---|
| 140 | ZC1J(JL,KLEV+1)=0.0_JPRB |
---|
| 141 | ENDDO |
---|
| 142 | |
---|
| 143 | !* 1.3 AMOUNTS OF ABSORBERS |
---|
| 144 | ! -------------------- |
---|
| 145 | |
---|
| 146 | DO JL= KIDIA,KFDIA |
---|
| 147 | ZUD(JL,1) = 0.0_JPRB |
---|
| 148 | ZUD(JL,2) = 0.0_JPRB |
---|
| 149 | ZO175(JL) = PPSOL(JL)** RPDU1 |
---|
| 150 | ZO190(JL) = PPSOL(JL)** RPDH1 |
---|
| 151 | ZSIGO(JL) = PPSOL(JL) |
---|
| 152 | ZCLEAR(JL)=1.0_JPRB |
---|
| 153 | ZCLOUD(JL)=0.0_JPRB |
---|
| 154 | ENDDO |
---|
| 155 | |
---|
| 156 | DO JK = 1 , KLEV |
---|
| 157 | JKP1 = JK + 1 |
---|
| 158 | JKL = KLEV+1 - JK |
---|
| 159 | JKLP1 = JKL+1 |
---|
| 160 | ZALPHA1=RA1OVLP(KLEV+1-JK) |
---|
| 161 | |
---|
| 162 | DO JL = KIDIA,KFDIA |
---|
| 163 | ZRTH=(RTH2O/PTAVE(JL,JK))**RTDH2O |
---|
| 164 | ZRTU=(RTUMG/PTAVE(JL,JK))**RTDUMG |
---|
| 165 | ZWH2O = MAX (PWV(JL,JKL) , REPSCQ ) |
---|
| 166 | |
---|
| 167 | ZSIGN(JL) = 100._JPRB * PPMB(JL,JKP1) |
---|
| 168 | PDSIG(JL,JK) = (ZSIGO(JL) - ZSIGN(JL))/PPSOL(JL) |
---|
| 169 | ZN175(JL) = ZSIGN(JL) ** RPDU1 |
---|
| 170 | ZN190(JL) = ZSIGN(JL) ** RPDH1 |
---|
| 171 | ZDSCO2 = ZO175(JL) - ZN175(JL) |
---|
| 172 | ZDSH2O = ZO190(JL) - ZN190(JL) |
---|
| 173 | PUD(JL,1,JK) = RPNH * ZDSH2O * ZWH2O * ZRTH |
---|
| 174 | PUD(JL,2,JK) = RPNU * ZDSCO2 * PCARDI * ZRTU |
---|
| 175 | |
---|
| 176 | ZFPPW=1.6078_JPRB*ZWH2O/(1.0_JPRB+0.608_JPRB*ZWH2O) |
---|
| 177 | PUD(JL,4,JK)=PUD(JL,1,JK)*ZFPPW |
---|
| 178 | PUD(JL,5,JK)=PUD(JL,1,JK)*(1.0_JPRB-ZFPPW) |
---|
| 179 | ZUD(JL,1) = ZUD(JL,1) + PUD(JL,1,JK) |
---|
| 180 | ZUD(JL,2) = ZUD(JL,2) + PUD(JL,2,JK) |
---|
| 181 | ZSIGO(JL) = ZSIGN(JL) |
---|
| 182 | ZO175(JL) = ZN175(JL) |
---|
| 183 | ZO190(JL) = ZN190(JL) |
---|
| 184 | !print *,'SWU: RTH2O RTDH2O RTUMG RTDUMG',RTH2O,RTDH2O,RTUMG,RTDUMG |
---|
| 185 | !print *,'SWU: RPNH ZDSH2O ZWH2O ZRTH',RPNH,ZDSH2O,ZWH2O,ZRTH |
---|
| 186 | !print *,'SWU: RPNU ZDSCO2 PCARDI ZRTU',RPNU,ZDSCO2,PCARDI,ZRTU |
---|
| 187 | |
---|
| 188 | !++MODIFCODE |
---|
| 189 | IF ((NOVLP == 1).OR.(NOVLP==6).OR.(NOVLP==8)) THEN |
---|
| 190 | ZCLEAR(JL)=ZCLEAR(JL)& |
---|
| 191 | & *(1.0_JPRB-MAX(PCLDSW(JL,JKL),ZCLOUD(JL)))& |
---|
| 192 | & /(1.0_JPRB-MIN(ZCLOUD(JL),1.0_JPRB-REPSEC)) |
---|
| 193 | ZC1J(JL,JKL)= 1.0_JPRB - ZCLEAR(JL) |
---|
| 194 | ZCLOUD(JL) = PCLDSW(JL,JKL) |
---|
| 195 | ELSEIF ((NOVLP == 2).OR.(NOVLP==7)) THEN |
---|
| 196 | ZCLOUD(JL) = MAX(PCLDSW(JL,JKL),ZCLOUD(JL)) |
---|
| 197 | ZC1J(JL,JKL) = ZCLOUD(JL) |
---|
| 198 | ELSEIF ((NOVLP == 3).OR.(NOVLP==5)) THEN |
---|
| 199 | ZCLEAR(JL) = ZCLEAR(JL)*(1.0_JPRB-PCLDSW(JL,JKL)) |
---|
| 200 | ZCLOUD(JL) = 1.0_JPRB - ZCLEAR(JL) |
---|
| 201 | ZC1J(JL,JKL) = ZCLOUD(JL) |
---|
| 202 | ELSEIF (NOVLP == 4) THEN |
---|
| 203 | !** Hogan & Illingworth (2001) |
---|
| 204 | ZCLEAR(JL)=ZCLEAR(JL)*( & |
---|
| 205 | & ZALPHA1*(1.0_JPRB-MAX(PCLDSW(JL,JKL),ZCLOUD(JL))) & |
---|
| 206 | & /(1.0_JPRB-MIN(ZCLOUD(JL),1.0_JPRB-REPSEC)) & |
---|
| 207 | & +(1.0_JPRB-ZALPHA1)*(1.0_JPRB-PCLDSW(JL,JKL)) ) |
---|
| 208 | ZC1J(JL,JKL) = 1.0_JPRB - ZCLEAR(JL) |
---|
| 209 | ZCLOUD(JL) = PCLDSW(JL,JKL) |
---|
| 210 | ENDIF |
---|
| 211 | !--MODIFCODE |
---|
| 212 | ENDDO |
---|
| 213 | ENDDO |
---|
| 214 | |
---|
| 215 | DO JL=KIDIA,KFDIA |
---|
| 216 | PCLEAR(JL)=1.0_JPRB-ZC1J(JL,1) |
---|
| 217 | ENDDO |
---|
| 218 | DO JK=1,KLEV |
---|
| 219 | DO JL=KIDIA,KFDIA |
---|
| 220 | IF (PCLEAR(JL) < 1.0_JPRB) THEN |
---|
| 221 | PCLD(JL,JK)=PCLDSW(JL,JK)/(1.0_JPRB-PCLEAR(JL)) |
---|
| 222 | ELSE |
---|
| 223 | PCLD(JL,JK)=0.0_JPRB |
---|
| 224 | ENDIF |
---|
| 225 | PCLD(JL,JK)=MAX(0.0_JPRB,MIN(1.0_JPRB,PCLD(JL,JK))) |
---|
| 226 | ENDDO |
---|
| 227 | ENDDO |
---|
| 228 | |
---|
| 229 | !* 1.4 COMPUTES CLEAR-SKY GREY ABSORPTION COEFFICIENTS |
---|
| 230 | ! ----------------------------------------------- |
---|
| 231 | |
---|
| 232 | DO JA = 1,2 |
---|
| 233 | DO JL = KIDIA,KFDIA |
---|
| 234 | ZUD(JL,JA) = ZUD(JL,JA) * PSEC(JL) |
---|
| 235 | ENDDO |
---|
| 236 | ENDDO |
---|
| 237 | |
---|
| 238 | IF (NSW <= 4) THEN |
---|
| 239 | INUIR=2 |
---|
| 240 | ELSEIF (NSW == 6) THEN |
---|
| 241 | INUIR=4 |
---|
| 242 | ENDIF |
---|
| 243 | |
---|
| 244 | DO JNU= INUIR,NSW |
---|
| 245 | |
---|
| 246 | CALL SWTT1 ( KIDIA,KFDIA,KLON, JNU, 2, IIND,& |
---|
| 247 | & ZUD,& |
---|
| 248 | & ZR ) |
---|
| 249 | |
---|
| 250 | DO JA = 1,2 |
---|
| 251 | DO JL = KIDIA,KFDIA |
---|
| 252 | PAKI(JL,JA,JNU) = -LOG( ZR(JL,JA) ) / ZUD(JL,JA) |
---|
| 253 | ENDDO |
---|
| 254 | ENDDO |
---|
| 255 | ENDDO |
---|
| 256 | |
---|
| 257 | ! ------------------------------------------------------------------ |
---|
| 258 | |
---|
| 259 | IF (LHOOK) CALL DR_HOOK('SWU',1,ZHOOK_HANDLE) |
---|
| 260 | END SUBROUTINE SWU |
---|
| 261 | |
---|