[2089] | 1 | subroutine PHY_Atm_CM_RUN |
---|
| 2 | |
---|
| 3 | !------------------------------------------------------------------------------+ |
---|
| 4 | ! Sun 9-Jun-2013 MAR | |
---|
| 5 | ! MAR PHY_Atm_CM_RUN | |
---|
| 6 | ! subroutine PHY_Atm_CM_RUN drives Cmoud Microphysical Scheme CMiPhy | |
---|
| 7 | ! | |
---|
| 8 | ! version 3.p.4.1 created by H. Gallee, Thu 21-Mar-2013 | |
---|
| 9 | ! Last Modification by H. Gallee, Sun 9-Jun-2013 | |
---|
| 10 | ! | |
---|
| 11 | !------------------------------------------------------------------------------+ |
---|
| 12 | ! | |
---|
| 13 | ! INPUT: psa_DY : Pressure Thickness [kPa] | |
---|
| 14 | ! ^^^^^^ | |
---|
| 15 | ! qwd_CM : Cloud Droplets Concentr.Var. [kg/kg] | |
---|
| 16 | ! qwi_CM : Ice Crystals Concentr.Var. [kg/kg] | |
---|
| 17 | ! | |
---|
| 18 | ! INPUT / OUTPUT: qv__DY : Air specific Humidity [kg/kg] | |
---|
| 19 | ! ^^^^^^^^^^^^^^^ qw__CM : Cloud Droplets Concentration [kg/kg] | |
---|
| 20 | ! qi__CM : Ice Crystals Concentration [kg/kg] | |
---|
| 21 | ! qs__CM : Snow Particl. Concentration [kg/kg] | |
---|
| 22 | ! qr__CM : Rain Drops Concentration [kg/kg] | |
---|
| 23 | ! CCNiCM : ice crystals number [Nb/m3] | |
---|
| 24 | ! (CCNwCM : Cloud Condens. Nuclei(if #cw) [Nb/m3])| |
---|
| 25 | ! | |
---|
| 26 | ! OUTPUT (CMiPhy) RainCM : rain Precipitation [m] | |
---|
| 27 | ! ^^^^^^^^^^^^^^^ SnowCM : snow Precipitation [m w.e] | |
---|
| 28 | ! Ice_CM : ice Precipitation [m w.e] | |
---|
| 29 | ! | |
---|
| 30 | ! OUTPUT: qwd_CM : Cloud Droplets Concentr.Var. [kg/kg] | |
---|
| 31 | ! ^^^^^^^ qid_CM : Ice Crystals Concentr.Var. [kg/kg] | |
---|
| 32 | ! | |
---|
| 33 | ! HLatCM : Latent Heat Release [K/s] | |
---|
| 34 | ! | |
---|
| 35 | ! REFER. : 1) Ntezimana, unpubl.thes.LLN, 115 pp, 1993 | |
---|
| 36 | ! ^^^^^^^^ 2) Lin et al. JCAM 22, 1065--1092, 1983 | |
---|
| 37 | ! (very similar, except that graupels are represented) | |
---|
| 38 | ! 3) Emde and Kahlig, An.Geo. 7, 405-- 414, 1989 | |
---|
| 39 | ! | |
---|
| 40 | ! # OPTIONS: #qg Graupels (qg) Microphysics Activation | |
---|
| 41 | ! # ^^^^^^^^ #cw Cloud Condensation Nuclei (CCNw) Microphysics Activation | |
---|
| 42 | ! | |
---|
| 43 | ! #qd Variations in Time of qi and qw are stored for OUTPUT | |
---|
| 44 | ! | |
---|
| 45 | ! #WH Additional Output (Each Process is detailed) | |
---|
| 46 | ! #EW Additional Output (Energy and Water Conservation) | |
---|
| 47 | ! | |
---|
| 48 | ! | |
---|
| 49 | !------------------------------------------------------------------------------+ |
---|
| 50 | |
---|
| 51 | use Mod_Real |
---|
| 52 | use Mod_PHY____dat |
---|
| 53 | use Mod_PHY____grd |
---|
| 54 | use Mod_PHY_CM_ctr |
---|
| 55 | use Mod_PHY_CM_dat |
---|
| 56 | use Mod_PHY_CM_grd |
---|
| 57 | use Mod_PHY_CM_kkl |
---|
| 58 | use Mod_PHY_DY_kkl |
---|
| 59 | |
---|
| 60 | |
---|
| 61 | |
---|
| 62 | |
---|
| 63 | ! Local Variables |
---|
| 64 | ! =============== |
---|
| 65 | |
---|
| 66 | use Mod_Atm_CM_RUN |
---|
| 67 | |
---|
| 68 | |
---|
| 69 | IMPLICIT NONE |
---|
| 70 | |
---|
| 71 | |
---|
| 72 | integer :: i ,j ,k ,ikl ! |
---|
| 73 | real(kind=real8) :: Hcd,Hsb,Tcd,Tsb ! |
---|
| 74 | real(kind=real8) :: Zcd,Zsb,facLHR ! |
---|
| 75 | |
---|
| 76 | |
---|
| 77 | |
---|
| 78 | |
---|
| 79 | |
---|
| 80 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 81 | ! ! |
---|
| 82 | ! ALLOCATION ! |
---|
| 83 | ! ========== |
---|
| 84 | |
---|
| 85 | IF (it_RUN.EQ.1 .OR. FlagDALLOC) THEN ! |
---|
| 86 | allocate ( qv__00(kcolp,mzp) ) ! Air Specific Humidity before Cloud Microphys. [kg/kg] |
---|
| 87 | allocate ( qw__00(kcolp,mzp) ) ! Cloud Droplets Concentr. before Cloud Microphys. [kg/kg] |
---|
| 88 | allocate ( qi__00(kcolp,mzp) ) ! Cloud Crystals Concentr. before Cloud Microphys. [kg/kg] |
---|
| 89 | allocate ( qs__00(kcolp,mzp) ) ! Snow Particl. Concentr. before Cloud Microphys. [kg/kg] |
---|
| 90 | ! #qg allocate ( qg__00(kcolp,mzp) ) ! Graupels Concentr. before Cloud Microphys. [kg/kg] |
---|
| 91 | allocate ( qr__00(kcolp,mzp) ) ! Rain Drops Concentr. before Cloud Microphys. [kg/kg] |
---|
| 92 | allocate ( CFra00(kcolp,mzp) ) ! Cloud Fraction before Cloud Microphys. [-] |
---|
| 93 | ! #cw allocate ( CCNw00(kcolp,mzp) ) ! Cloud Condens. Nuclei before Cloud Microphys. [-] |
---|
| 94 | allocate ( CCNi00(kcolp,mzp) ) ! Cloud Ice Nuclei before Cloud Microphys. [-] |
---|
| 95 | END IF ! |
---|
| 96 | ! ! |
---|
| 97 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 98 | |
---|
| 99 | |
---|
| 100 | |
---|
| 101 | |
---|
| 102 | ! Microphysical Variables: from 3D to 2D Arrays |
---|
| 103 | ! ======================= ==================== |
---|
| 104 | |
---|
| 105 | DO ikl = 1,kcolp |
---|
| 106 | |
---|
| 107 | i = ii__AP(ikl) |
---|
| 108 | j = jj__AP(ikl) |
---|
| 109 | |
---|
| 110 | DO k = 1,mzp |
---|
| 111 | qv__00(ikl,k) = qv__DY(ikl,k) |
---|
| 112 | qv__DY(ikl,k) = & |
---|
| 113 | & max(qv__DY(ikl,k) , epsq) |
---|
| 114 | Ta__CM(ikl,k) = pkt_DY(ikl,k) * ExnrDY(ikl,k) |
---|
| 115 | |
---|
| 116 | IF(qw__CM(ikl,k) .LT. qh_MIN) THEN |
---|
| 117 | qw__CM(ikl,k) = max(zer0,qw__CM(ikl,k)) ! Sinon BOUM (possible) |
---|
| 118 | Ta__CM(ikl,k) = Ta__CM(ikl,k) - Lv_Cpd * qw__CM(ikl,k) |
---|
| 119 | qv__DY(ikl,k) = qv__DY(ikl,k) + qw__CM(ikl,k) |
---|
| 120 | qw__CM(ikl,k) = 0. |
---|
| 121 | END IF |
---|
| 122 | qw__00(ikl,k) = qw__CM(ikl,k) |
---|
| 123 | |
---|
| 124 | IF(qi__CM(ikl,k) .LT. qh_MIN) THEN |
---|
| 125 | qi__CM(ikl,k) = max(zer0,qi__CM(ikl,k)) ! Sinon BOUM (possible) |
---|
| 126 | Ta__CM(ikl,k) = Ta__CM(ikl,k) - Ls_Cpd * qi__CM(ikl,k) |
---|
| 127 | qv__DY(ikl,k) = qv__DY(ikl,k) + qi__CM(ikl,k) |
---|
| 128 | qi__CM(ikl,k) = 0. |
---|
| 129 | CCNiCM(ikl,k) = 0. |
---|
| 130 | END IF |
---|
| 131 | qi__00(ikl,k) = qi__CM(ikl,k) |
---|
| 132 | |
---|
| 133 | IF(qw__CM(ikl,k) .LT. qh_MIN .AND. & |
---|
| 134 | & qi__CM(ikl,k) .LT. qh_MIN) THEN |
---|
| 135 | CFraCM(ikl,k) = 0. |
---|
| 136 | ELSE |
---|
| 137 | CFraCM(ikl,k) =max(CFrMIN,CFraCM(ikl,k)) |
---|
| 138 | END IF |
---|
| 139 | CFra00(ikl,k) = CFraCM(ikl,k) |
---|
| 140 | |
---|
| 141 | IF(qr__CM(ikl,k) .LT. qh_MIN) THEN |
---|
| 142 | qr__CM(ikl,k) = max(zer0,qr__CM(ikl,k)) ! Sinon BOUM (possible) |
---|
| 143 | Ta__CM(ikl,k) = Ta__CM(ikl,k) - Lv_Cpd * qr__CM(ikl,k) |
---|
| 144 | qv__DY(ikl,k) = qv__DY(ikl,k) + qr__CM(ikl,k) |
---|
| 145 | qr__CM(ikl,k) = 0. |
---|
| 146 | END IF |
---|
| 147 | qr__00(ikl,k) = qr__CM(ikl,k) |
---|
| 148 | |
---|
| 149 | IF(qs__CM(ikl,k) .LT. qh_MIN) THEN |
---|
| 150 | qs__CM(ikl,k) = max(zer0,qs__CM(ikl,k)) ! Sinon BOUM (possible) |
---|
| 151 | Ta__CM(ikl,k) = Ta__CM(ikl,k) - Ls_Cpd * qs__CM(ikl,k) |
---|
| 152 | qv__DY(ikl,k) = qv__DY(ikl,k) + qs__CM(ikl,k) |
---|
| 153 | qs__CM(ikl,k) = 0. |
---|
| 154 | END IF |
---|
| 155 | qs__00(ikl,k) = qs__CM(ikl,k) |
---|
| 156 | |
---|
| 157 | ! #qg qg__00(ikl,k) = qg__CM(ikl,k) |
---|
| 158 | |
---|
| 159 | ! #cw CCNw00(ikl,k) = CCNwCM(ikl,k) |
---|
| 160 | CCNi00(ikl,k) = CCNiCM(ikl,k) |
---|
| 161 | |
---|
| 162 | qid_CM(ikl,k) = 0. |
---|
| 163 | qwd_CM(ikl,k) = 0. |
---|
| 164 | END DO |
---|
| 165 | |
---|
| 166 | |
---|
| 167 | |
---|
| 168 | |
---|
| 169 | ! Vertical Integrated Energy and Water Content |
---|
| 170 | ! ============================================ |
---|
| 171 | |
---|
| 172 | ! #EW wat01D(ikl) =wat0EW(ikl) |
---|
| 173 | ! #EW wat11D(ikl) =wat1EW(ikl) |
---|
| 174 | ! #EW wat21D(ikl) =wat2EW(ikl) |
---|
| 175 | ! #EW watf1D(ikl) =watfEW(ikl) |
---|
| 176 | ! #EW enr01D(ikl) =enr0EW(ikl) |
---|
| 177 | ! #EW enr11D(ikl) =enr1EW(ikl) |
---|
| 178 | ! #EW enr21D(ikl) =enr2EW(ikl) |
---|
| 179 | ! #EW mphy2D(ikl) =mphyEW(ikl) |
---|
| 180 | |
---|
| 181 | |
---|
| 182 | END DO |
---|
| 183 | ! |
---|
| 184 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 185 | |
---|
| 186 | |
---|
| 187 | |
---|
| 188 | |
---|
| 189 | ! Call Cloud Microphysics |
---|
| 190 | ! ======================= |
---|
| 191 | |
---|
| 192 | ! ****** |
---|
| 193 | call CMiPhy |
---|
| 194 | ! ****** |
---|
| 195 | |
---|
| 196 | |
---|
| 197 | |
---|
| 198 | |
---|
| 199 | ! Microphysical Variables: from 3D to 2D Arrays |
---|
| 200 | ! ======================= ==================== |
---|
| 201 | |
---|
| 202 | DO ikl = 1,kcolp |
---|
| 203 | |
---|
| 204 | i = ii__AP(ikl) |
---|
| 205 | j = jj__AP(ikl) |
---|
| 206 | |
---|
| 207 | DO k = 1,mzp |
---|
| 208 | dpktCM(ikl,k) = (Ta__CM(ikl,k) / ExnrDY(ikl,k) & |
---|
| 209 | & - pkt_DY(ikl,k)) / dt__CM |
---|
| 210 | dqv_CM(ikl,k) = (qv__DY(ikl,k) - qv__00(ikl,k)) / dt__CM |
---|
| 211 | qv__DY(ikl,k) = qv__00(ikl,k) |
---|
| 212 | ! #qd qid_CM(ikl,k) = qid_CM(ikl,k) * psa_DY(ikl) * dsigmi(k) |
---|
| 213 | ! #qd qwd_CM(ikl,k) = qwd_CM(ikl,k) * psa_DY(ikl) * dsigmi(k) |
---|
| 214 | END DO |
---|
| 215 | |
---|
| 216 | |
---|
| 217 | |
---|
| 218 | ! Update of Microphysical Variables: INSIDE PHY_MAR |
---|
| 219 | ! -------------------------------------------------- |
---|
| 220 | |
---|
| 221 | IF (CM_UpD) THEN |
---|
| 222 | DO k = 1,mzp |
---|
| 223 | |
---|
| 224 | dqw_CM(ikl,k) = 0.0000 |
---|
| 225 | dqr_CM(ikl,k) = 0.0000 |
---|
| 226 | dqi_CM(ikl,k) = 0.0000 |
---|
| 227 | dqs_CM(ikl,k) = 0.0000 |
---|
| 228 | ! #qg dqg_CM(ikl,k) = 0.0000 |
---|
| 229 | |
---|
| 230 | dCF_CM(ikl,k) = 0.0000 |
---|
| 231 | ! #cw dCw_CM(ikl,k) = 0.0000 |
---|
| 232 | dCi_CM(ikl,k) = 0.0000 |
---|
| 233 | END DO |
---|
| 234 | |
---|
| 235 | |
---|
| 236 | |
---|
| 237 | ! Update of Microphysical Variables: OUTSIDE PHY_MAR |
---|
| 238 | ! -------------------------------------------------- |
---|
| 239 | |
---|
| 240 | ELSE |
---|
| 241 | DO k = 1,mzp |
---|
| 242 | dqw_CM(ikl,k) = (qw__CM(ikl,k) -qw__00(ikl,k)) / dt__CM |
---|
| 243 | dqr_CM(ikl,k) = (qr__CM(ikl,k) -qr__00(ikl,k)) / dt__CM |
---|
| 244 | dqi_CM(ikl,k) = (qi__CM(ikl,k) -qi__00(ikl,k)) / dt__CM |
---|
| 245 | dqs_CM(ikl,k) = (qs__CM(ikl,k) -qs__00(ikl,k)) / dt__CM |
---|
| 246 | ! #qg dqg_CM(ikl,k) = (qg__CM(ikl,k) -qg__00(ikl,k)) / dt__CM |
---|
| 247 | dCF_CM(ikl,k) = (CFraCM(ikl,k) -CFra00(ikl,k)) / dt__CM |
---|
| 248 | ! #cw dCw_CM(ikl,k) = (CCNwCM(ikl,k) -CCNw00(ikl,k)) / dt__CM |
---|
| 249 | dCi_CM(ikl,k) = (CCNiCM(ikl,k) -CCNi00(ikl,k)) / dt__CM |
---|
| 250 | |
---|
| 251 | qw__CM(ikl,k) = qw__00(ikl,k) |
---|
| 252 | qr__CM(ikl,k) = qr__00(ikl,k) |
---|
| 253 | qi__CM(ikl,k) = qi__00(ikl,k) |
---|
| 254 | qs__CM(ikl,k) = qs__00(ikl,k) |
---|
| 255 | ! #qg qg__CM(ikl,k) = qg__00(ikl,k) |
---|
| 256 | ! Gilles : dCF_CM pas utilise pour mettre a jour CFraCM |
---|
| 257 | ! CFraCM(ikl,k) = CFra00(ikl,k) |
---|
| 258 | ! #cw CCNwCM(ikl,k) = CCNw00(ikl,k) |
---|
| 259 | CCNiCM(ikl,k) = CCNi00(ikl,k) |
---|
| 260 | |
---|
| 261 | END DO |
---|
| 262 | END IF |
---|
| 263 | |
---|
| 264 | |
---|
| 265 | |
---|
| 266 | |
---|
| 267 | |
---|
| 268 | ! Isotopes Proxies: Diagnostics |
---|
| 269 | ! ============================= |
---|
| 270 | |
---|
| 271 | IF (nHL_CM.EQ.0) THEN |
---|
| 272 | Hcd_CM(ikl) = 0. |
---|
| 273 | Hsb_CM(ikl) = 0. |
---|
| 274 | Tcd_CM(ikl) = 0. |
---|
| 275 | Tsb_CM(ikl) = 0. |
---|
| 276 | Zcd_CM(ikl) = 0. |
---|
| 277 | Zsb_CM(ikl) = 0. |
---|
| 278 | END IF |
---|
| 279 | nHL_CM = nHL_CM + 1 |
---|
| 280 | |
---|
| 281 | Hcd = 0.0 |
---|
| 282 | Hsb = 0.0 |
---|
| 283 | Tcd = 0.0 |
---|
| 284 | Tsb = 0.0 |
---|
| 285 | Zcd = 0.0 |
---|
| 286 | Zsb = 0.0 |
---|
| 287 | DO k=2,mzp |
---|
| 288 | HLatCM(ikl,k) = (Ta__CM(ikl,k) & |
---|
| 289 | & -pkt_DY(ikl,k) *ExnrDY(ikl,k)) / dt__CM |
---|
| 290 | |
---|
| 291 | Hcd = Hcd + dsigmi(k)*max(HLatCM(ikl,k),0.) |
---|
| 292 | Hsb = Hsb - dsigmi(k)*min(HLatCM(ikl,k),0.) |
---|
| 293 | Tcd = Tcd + dsigmi(k)*max(HLatCM(ikl,k),0.)*Ta__CM(ikl,k) |
---|
| 294 | Tsb = Tsb - dsigmi(k)*min(HLatCM(ikl,k),0.)*Ta__CM(ikl,k) |
---|
| 295 | Zcd = Zcd + dsigmi(k)*max(HLatCM(ikl,k),0.)*Z___DY(ikl,k) |
---|
| 296 | Zsb = Zsb - dsigmi(k)*min(HLatCM(ikl,k),0.)*Z___DY(ikl,k) |
---|
| 297 | END DO |
---|
| 298 | |
---|
| 299 | facLHR = (CpdAir/LhsH2O)*psa_DY(ikl) *1.e3*Grav_I*dt__CM |
---|
| 300 | |
---|
| 301 | IF (write_Proxy) THEN |
---|
| 302 | Hcd_CM(ikl) =(Hcd_CM(ikl) + Hcd * facLHR) / nHL_CM |
---|
| 303 | Hsb_CM(ikl) =(Hsb_CM(ikl) + Hsb * facLHR) / nHL_CM |
---|
| 304 | Tcd_CM(ikl) =(Tcd_CM(ikl) + Tcd * facLHR) / nHL_CM |
---|
| 305 | Tsb_CM(ikl) =(Tsb_CM(ikl) + Tsb * facLHR) / nHL_CM |
---|
| 306 | Zcd_CM(ikl) =(Zcd_CM(ikl) + Zcd * facLHR) / nHL_CM |
---|
| 307 | Zsb_CM(ikl) =(Zsb_CM(ikl) + Zsb * facLHR) / nHL_CM |
---|
| 308 | ELSE |
---|
| 309 | Hcd_CM(ikl) = Hcd_CM(ikl) + Hcd * facLHR |
---|
| 310 | Hsb_CM(ikl) = Hsb_CM(ikl) + Hsb * facLHR |
---|
| 311 | Tcd_CM(ikl) = Tcd_CM(ikl) + Tcd * facLHR |
---|
| 312 | Tsb_CM(ikl) = Tsb_CM(ikl) + Tsb * facLHR |
---|
| 313 | Zcd_CM(ikl) = Zcd_CM(ikl) + Zcd * facLHR |
---|
| 314 | Zsb_CM(ikl) = Zsb_CM(ikl) + Zsb * facLHR |
---|
| 315 | END IF |
---|
| 316 | |
---|
| 317 | END DO |
---|
| 318 | |
---|
| 319 | IF (write_Proxy) nHL_CM = 0 |
---|
| 320 | |
---|
| 321 | |
---|
| 322 | |
---|
| 323 | |
---|
| 324 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 325 | ! ! |
---|
| 326 | ! DE-ALLOCATION ! |
---|
| 327 | ! ============= ! |
---|
| 328 | |
---|
| 329 | IF (FlagDALLOC) THEN ! |
---|
| 330 | deallocate ( qv__00 ) ! Air Specific Humidity before Cloud Microphys. [kg/kg] |
---|
| 331 | deallocate ( qw__00 ) ! Cloud Droplets Concentr. before Cloud Microphys. [kg/kg] |
---|
| 332 | deallocate ( qi__00 ) ! Cloud Crystals Concentr. before Cloud Microphys. [kg/kg] |
---|
| 333 | deallocate ( qs__00 ) ! Snow Particl. Concentr. before Cloud Microphys. [kg/kg] |
---|
| 334 | ! #qg deallocate ( qg__00 ) ! Graupels Concentr. before Cloud Microphys. [kg/kg] |
---|
| 335 | deallocate ( qr__00 ) ! Rain Drops Concentr. before Cloud Microphys. [kg/kg] |
---|
| 336 | deallocate ( CFra00 ) ! Cloud Fraction before Cloud Microphys. [-] |
---|
| 337 | ! #cw deallocate ( CCNw00 ) ! Cloud Condens. Nuclei before Cloud Microphys. [-] |
---|
| 338 | deallocate ( CCNi00 ) ! Cloud Ice Nuclei before Cloud Microphys. [-] |
---|
| 339 | END IF ! |
---|
| 340 | ! ! |
---|
| 341 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 342 | |
---|
| 343 | |
---|
| 344 | return |
---|
| 345 | |
---|
| 346 | end subroutine PHY_Atm_CM_RUN |
---|