[1000] | 1 | MODULE microphysics_mod |
---|
| 2 | |
---|
[1093] | 3 | !--------------------------------------------------------------------------------! |
---|
| 4 | ! This file is part of PALM. |
---|
| 5 | ! |
---|
| 6 | ! PALM is free software: you can redistribute it and/or modify it under the terms |
---|
| 7 | ! of the GNU General Public License as published by the Free Software Foundation, |
---|
| 8 | ! either version 3 of the License, or (at your option) any later version. |
---|
| 9 | ! |
---|
| 10 | ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY |
---|
| 11 | ! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
---|
| 12 | ! A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
---|
| 13 | ! |
---|
| 14 | ! You should have received a copy of the GNU General Public License along with |
---|
| 15 | ! PALM. If not, see <http://www.gnu.org/licenses/>. |
---|
| 16 | ! |
---|
| 17 | ! Copyright 1997-2012 Leibniz University Hannover |
---|
| 18 | !--------------------------------------------------------------------------------! |
---|
| 19 | ! |
---|
[1000] | 20 | ! Current revisions: |
---|
[1092] | 21 | ! ------------------ |
---|
[1107] | 22 | ! |
---|
[1000] | 23 | ! |
---|
| 24 | ! Former revisions: |
---|
| 25 | ! ----------------- |
---|
[1052] | 26 | ! $Id: microphysics.f90 1107 2013-03-04 06:23:14Z raasch $ |
---|
[1054] | 27 | ! |
---|
[1107] | 28 | ! 1106 2013-03-04 05:31:38Z raasch |
---|
| 29 | ! small changes in code formatting |
---|
| 30 | ! |
---|
[1093] | 31 | ! 1092 2013-02-02 11:24:22Z raasch |
---|
| 32 | ! unused variables removed |
---|
| 33 | ! file put under GPL |
---|
| 34 | ! |
---|
[1066] | 35 | ! 1065 2012-11-22 17:42:36Z hoffmann |
---|
| 36 | ! Sedimentation process implemented according to Stevens and Seifert (2008). |
---|
| 37 | ! Turbulence effects on autoconversion and accretion added (Seifert, Nuijens |
---|
| 38 | ! and Stevens, 2010). |
---|
| 39 | ! |
---|
[1054] | 40 | ! 1053 2012-11-13 17:11:03Z hoffmann |
---|
| 41 | ! initial revision |
---|
[1000] | 42 | ! |
---|
| 43 | ! Description: |
---|
| 44 | ! ------------ |
---|
| 45 | ! Calculate cloud microphysics according to the two moment bulk |
---|
| 46 | ! scheme by Seifert and Beheng (2006). |
---|
| 47 | !------------------------------------------------------------------------------! |
---|
| 48 | |
---|
| 49 | PRIVATE |
---|
[1022] | 50 | PUBLIC dsd_properties, autoconversion, accretion, selfcollection_breakup, & |
---|
[1012] | 51 | evaporation_rain, sedimentation_cloud, sedimentation_rain |
---|
[1000] | 52 | |
---|
[1022] | 53 | INTERFACE dsd_properties |
---|
| 54 | MODULE PROCEDURE dsd_properties |
---|
| 55 | MODULE PROCEDURE dsd_properties_ij |
---|
| 56 | END INTERFACE dsd_properties |
---|
| 57 | |
---|
[1000] | 58 | INTERFACE autoconversion |
---|
| 59 | MODULE PROCEDURE autoconversion |
---|
| 60 | MODULE PROCEDURE autoconversion_ij |
---|
| 61 | END INTERFACE autoconversion |
---|
| 62 | |
---|
| 63 | INTERFACE accretion |
---|
| 64 | MODULE PROCEDURE accretion |
---|
| 65 | MODULE PROCEDURE accretion_ij |
---|
| 66 | END INTERFACE accretion |
---|
[1005] | 67 | |
---|
| 68 | INTERFACE selfcollection_breakup |
---|
| 69 | MODULE PROCEDURE selfcollection_breakup |
---|
| 70 | MODULE PROCEDURE selfcollection_breakup_ij |
---|
| 71 | END INTERFACE selfcollection_breakup |
---|
[1012] | 72 | |
---|
| 73 | INTERFACE evaporation_rain |
---|
| 74 | MODULE PROCEDURE evaporation_rain |
---|
| 75 | MODULE PROCEDURE evaporation_rain_ij |
---|
| 76 | END INTERFACE evaporation_rain |
---|
| 77 | |
---|
| 78 | INTERFACE sedimentation_cloud |
---|
| 79 | MODULE PROCEDURE sedimentation_cloud |
---|
| 80 | MODULE PROCEDURE sedimentation_cloud_ij |
---|
| 81 | END INTERFACE sedimentation_cloud |
---|
[1000] | 82 | |
---|
[1012] | 83 | INTERFACE sedimentation_rain |
---|
| 84 | MODULE PROCEDURE sedimentation_rain |
---|
| 85 | MODULE PROCEDURE sedimentation_rain_ij |
---|
| 86 | END INTERFACE sedimentation_rain |
---|
| 87 | |
---|
[1000] | 88 | CONTAINS |
---|
| 89 | |
---|
| 90 | |
---|
| 91 | !------------------------------------------------------------------------------! |
---|
| 92 | ! Call for all grid points |
---|
| 93 | !------------------------------------------------------------------------------! |
---|
[1022] | 94 | SUBROUTINE dsd_properties |
---|
| 95 | |
---|
| 96 | USE arrays_3d |
---|
| 97 | USE cloud_parameters |
---|
| 98 | USE constants |
---|
| 99 | USE indices |
---|
| 100 | |
---|
| 101 | IMPLICIT NONE |
---|
| 102 | |
---|
| 103 | INTEGER :: i, j, k |
---|
| 104 | |
---|
| 105 | |
---|
| 106 | DO i = nxl, nxr |
---|
| 107 | DO j = nys, nyn |
---|
| 108 | DO k = nzb_2d(j,i)+1, nzt |
---|
| 109 | |
---|
| 110 | ENDDO |
---|
| 111 | ENDDO |
---|
| 112 | ENDDO |
---|
| 113 | |
---|
| 114 | END SUBROUTINE dsd_properties |
---|
| 115 | |
---|
[1106] | 116 | |
---|
[1000] | 117 | SUBROUTINE autoconversion |
---|
| 118 | |
---|
| 119 | USE arrays_3d |
---|
| 120 | USE cloud_parameters |
---|
| 121 | USE constants |
---|
| 122 | USE indices |
---|
| 123 | |
---|
| 124 | IMPLICIT NONE |
---|
| 125 | |
---|
| 126 | INTEGER :: i, j, k |
---|
| 127 | |
---|
| 128 | |
---|
| 129 | DO i = nxl, nxr |
---|
| 130 | DO j = nys, nyn |
---|
| 131 | DO k = nzb_2d(j,i)+1, nzt |
---|
| 132 | |
---|
| 133 | ENDDO |
---|
| 134 | ENDDO |
---|
| 135 | ENDDO |
---|
| 136 | |
---|
| 137 | END SUBROUTINE autoconversion |
---|
| 138 | |
---|
[1106] | 139 | |
---|
[1005] | 140 | SUBROUTINE accretion |
---|
[1000] | 141 | |
---|
| 142 | USE arrays_3d |
---|
| 143 | USE cloud_parameters |
---|
| 144 | USE constants |
---|
| 145 | USE indices |
---|
[1005] | 146 | |
---|
[1000] | 147 | IMPLICIT NONE |
---|
| 148 | |
---|
| 149 | INTEGER :: i, j, k |
---|
| 150 | |
---|
[1005] | 151 | |
---|
| 152 | DO i = nxl, nxr |
---|
| 153 | DO j = nys, nyn |
---|
| 154 | DO k = nzb_2d(j,i)+1, nzt |
---|
[1000] | 155 | |
---|
[1005] | 156 | ENDDO |
---|
| 157 | ENDDO |
---|
[1000] | 158 | ENDDO |
---|
| 159 | |
---|
[1005] | 160 | END SUBROUTINE accretion |
---|
[1000] | 161 | |
---|
[1106] | 162 | |
---|
[1005] | 163 | SUBROUTINE selfcollection_breakup |
---|
[1000] | 164 | |
---|
| 165 | USE arrays_3d |
---|
| 166 | USE cloud_parameters |
---|
| 167 | USE constants |
---|
| 168 | USE indices |
---|
| 169 | |
---|
| 170 | IMPLICIT NONE |
---|
| 171 | |
---|
| 172 | INTEGER :: i, j, k |
---|
| 173 | |
---|
| 174 | |
---|
| 175 | DO i = nxl, nxr |
---|
| 176 | DO j = nys, nyn |
---|
| 177 | DO k = nzb_2d(j,i)+1, nzt |
---|
| 178 | |
---|
| 179 | ENDDO |
---|
| 180 | ENDDO |
---|
| 181 | ENDDO |
---|
| 182 | |
---|
[1005] | 183 | END SUBROUTINE selfcollection_breakup |
---|
[1000] | 184 | |
---|
[1106] | 185 | |
---|
[1012] | 186 | SUBROUTINE evaporation_rain |
---|
[1000] | 187 | |
---|
[1012] | 188 | USE arrays_3d |
---|
| 189 | USE cloud_parameters |
---|
| 190 | USE constants |
---|
| 191 | USE indices |
---|
| 192 | |
---|
| 193 | IMPLICIT NONE |
---|
| 194 | |
---|
| 195 | INTEGER :: i, j, k |
---|
| 196 | |
---|
| 197 | |
---|
| 198 | DO i = nxl, nxr |
---|
| 199 | DO j = nys, nyn |
---|
| 200 | DO k = nzb_2d(j,i)+1, nzt |
---|
| 201 | |
---|
| 202 | ENDDO |
---|
| 203 | ENDDO |
---|
| 204 | ENDDO |
---|
| 205 | |
---|
| 206 | END SUBROUTINE evaporation_rain |
---|
| 207 | |
---|
[1106] | 208 | |
---|
[1012] | 209 | SUBROUTINE sedimentation_cloud |
---|
| 210 | |
---|
| 211 | USE arrays_3d |
---|
| 212 | USE cloud_parameters |
---|
| 213 | USE constants |
---|
| 214 | USE indices |
---|
| 215 | |
---|
| 216 | IMPLICIT NONE |
---|
| 217 | |
---|
| 218 | INTEGER :: i, j, k |
---|
| 219 | |
---|
| 220 | |
---|
| 221 | DO i = nxl, nxr |
---|
| 222 | DO j = nys, nyn |
---|
| 223 | DO k = nzb_2d(j,i)+1, nzt |
---|
| 224 | |
---|
| 225 | ENDDO |
---|
| 226 | ENDDO |
---|
| 227 | ENDDO |
---|
| 228 | |
---|
| 229 | END SUBROUTINE sedimentation_cloud |
---|
| 230 | |
---|
[1106] | 231 | |
---|
[1012] | 232 | SUBROUTINE sedimentation_rain |
---|
| 233 | |
---|
| 234 | USE arrays_3d |
---|
| 235 | USE cloud_parameters |
---|
| 236 | USE constants |
---|
| 237 | USE indices |
---|
| 238 | |
---|
| 239 | IMPLICIT NONE |
---|
| 240 | |
---|
| 241 | INTEGER :: i, j, k |
---|
| 242 | |
---|
| 243 | |
---|
| 244 | DO i = nxl, nxr |
---|
| 245 | DO j = nys, nyn |
---|
| 246 | DO k = nzb_2d(j,i)+1, nzt |
---|
| 247 | |
---|
| 248 | ENDDO |
---|
| 249 | ENDDO |
---|
| 250 | ENDDO |
---|
| 251 | |
---|
| 252 | END SUBROUTINE sedimentation_rain |
---|
| 253 | |
---|
| 254 | |
---|
[1000] | 255 | !------------------------------------------------------------------------------! |
---|
| 256 | ! Call for grid point i,j |
---|
| 257 | !------------------------------------------------------------------------------! |
---|
[1022] | 258 | SUBROUTINE dsd_properties_ij( i, j ) |
---|
| 259 | |
---|
| 260 | USE arrays_3d |
---|
| 261 | USE cloud_parameters |
---|
| 262 | USE constants |
---|
| 263 | USE indices |
---|
| 264 | USE control_parameters |
---|
[1048] | 265 | USE user |
---|
[1022] | 266 | |
---|
| 267 | IMPLICIT NONE |
---|
| 268 | |
---|
| 269 | INTEGER :: i, j, k |
---|
| 270 | |
---|
| 271 | DO k = nzb_2d(j,i)+1, nzt |
---|
[1065] | 272 | |
---|
| 273 | IF ( qr(k,j,i) <= eps_sb ) THEN |
---|
| 274 | qr(k,j,i) = 0.0 |
---|
| 275 | ELSE |
---|
[1022] | 276 | ! |
---|
[1048] | 277 | !-- Adjust number of raindrops to avoid nonlinear effects in |
---|
| 278 | !-- sedimentation and evaporation of rain drops due to too small or |
---|
[1065] | 279 | !-- too big weights of rain drops (Stevens and Seifert, 2008). |
---|
| 280 | IF ( nr(k,j,i) * xrmin > qr(k,j,i) * hyrho(k) ) THEN |
---|
| 281 | nr(k,j,i) = qr(k,j,i) * hyrho(k) / xrmin |
---|
| 282 | ELSEIF ( nr(k,j,i) * xrmax < qr(k,j,i) * hyrho(k) ) THEN |
---|
| 283 | nr(k,j,i) = qr(k,j,i) * hyrho(k) / xrmax |
---|
[1048] | 284 | ENDIF |
---|
[1065] | 285 | xr(k) = hyrho(k) * qr(k,j,i) / nr(k,j,i) |
---|
[1022] | 286 | ! |
---|
[1065] | 287 | !-- Weight averaged diameter of rain drops: |
---|
| 288 | dr(k) = ( hyrho(k) * qr(k,j,i) / nr(k,j,i) * & |
---|
| 289 | dpirho_l )**( 1.0 / 3.0 ) |
---|
[1048] | 290 | ! |
---|
[1049] | 291 | !-- Shape parameter of gamma distribution (Milbrandt and Yau, 2005; |
---|
| 292 | !-- Stevens and Seifert, 2008): |
---|
[1065] | 293 | mu_r(k) = 10.0 * ( 1.0 + TANH( 1.2E3 * ( dr(k) - 1.4E-3 ) ) ) |
---|
[1049] | 294 | ! |
---|
[1022] | 295 | !-- Slope parameter of gamma distribution (Seifert, 2008): |
---|
[1048] | 296 | lambda_r(k) = ( ( mu_r(k) + 3.0 ) * ( mu_r(k) + 2.0 ) * & |
---|
| 297 | ( mu_r(k) + 1.0 ) )**( 1.0 / 3.0 ) / dr(k) |
---|
[1022] | 298 | ENDIF |
---|
| 299 | ENDDO |
---|
| 300 | |
---|
| 301 | END SUBROUTINE dsd_properties_ij |
---|
| 302 | |
---|
[1106] | 303 | |
---|
[1005] | 304 | SUBROUTINE autoconversion_ij( i, j ) |
---|
[1000] | 305 | |
---|
| 306 | USE arrays_3d |
---|
| 307 | USE cloud_parameters |
---|
| 308 | USE constants |
---|
| 309 | USE indices |
---|
[1005] | 310 | USE control_parameters |
---|
[1048] | 311 | USE statistics |
---|
[1065] | 312 | USE grid_variables |
---|
[1000] | 313 | |
---|
| 314 | IMPLICIT NONE |
---|
| 315 | |
---|
| 316 | INTEGER :: i, j, k |
---|
[1065] | 317 | REAL :: k_au, autocon, phi_au, tau_cloud, xc, nu_c, rc, & |
---|
| 318 | l_mix, re_lambda, alpha_cc, r_cc, sigma_cc, epsilon |
---|
[1000] | 319 | |
---|
[1106] | 320 | |
---|
[1005] | 321 | k_au = k_cc / ( 20.0 * x0 ) |
---|
| 322 | |
---|
[1000] | 323 | DO k = nzb_2d(j,i)+1, nzt |
---|
| 324 | |
---|
[1048] | 325 | IF ( ql(k,j,i) > 0.0 ) THEN |
---|
[1012] | 326 | ! |
---|
[1048] | 327 | !-- Intern time scale of coagulation (Seifert and Beheng, 2006): |
---|
[1012] | 328 | !-- (1.0 - ql(k,j,i) / ( ql(k,j,i) + qr(k,j,i) )) |
---|
[1048] | 329 | tau_cloud = 1.0 - ql(k,j,i) / ( ql(k,j,i) + qr(k,j,i) + 1.0E-20 ) |
---|
[1012] | 330 | ! |
---|
| 331 | !-- Universal function for autoconversion process |
---|
| 332 | !-- (Seifert and Beheng, 2006): |
---|
[1048] | 333 | phi_au = 600.0 * tau_cloud**0.68 * ( 1.0 - tau_cloud**0.68 )**3 |
---|
[1012] | 334 | ! |
---|
| 335 | !-- Shape parameter of gamma distribution (Geoffroy et al., 2010): |
---|
| 336 | !-- (Use constant nu_c = 1.0 instead?) |
---|
[1065] | 337 | nu_c = 1.0 !MAX( 0.0, 1580.0 * hyrho(k) * ql(k,j,i) - 0.28 ) |
---|
[1012] | 338 | ! |
---|
| 339 | !-- Mean weight of cloud droplets: |
---|
[1005] | 340 | xc = hyrho(k) * ql(k,j,i) / nc |
---|
[1012] | 341 | ! |
---|
[1065] | 342 | !-- Parameterized turbulence effects on autoconversion (Seifert, |
---|
| 343 | !-- Nuijens and Stevens, 2010) |
---|
| 344 | IF ( turbulence ) THEN |
---|
| 345 | ! |
---|
| 346 | !-- Weight averaged radius of cloud droplets: |
---|
| 347 | rc = 0.5 * ( xc * dpirho_l )**( 1.0 / 3.0 ) |
---|
| 348 | |
---|
| 349 | alpha_cc = ( a_1 + a_2 * nu_c ) / ( 1.0 + a_3 * nu_c ) |
---|
| 350 | r_cc = ( b_1 + b_2 * nu_c ) / ( 1.0 + b_3 * nu_c ) |
---|
| 351 | sigma_cc = ( c_1 + c_2 * nu_c ) / ( 1.0 + c_3 * nu_c ) |
---|
| 352 | ! |
---|
| 353 | !-- Mixing length (neglecting distance to ground and stratification) |
---|
| 354 | l_mix = ( dx * dy * dzu(k) )**( 1.0 / 3.0 ) |
---|
| 355 | ! |
---|
| 356 | !-- Limit dissipation rate according to Seifert, Nuijens and |
---|
| 357 | !-- Stevens (2010) |
---|
| 358 | epsilon = MIN( 0.06, diss(k,j,i) ) |
---|
| 359 | ! |
---|
| 360 | !-- Compute Taylor-microscale Reynolds number: |
---|
| 361 | re_lambda = 6.0 / 11.0 * ( l_mix / c_const )**( 2.0 / 3.0 ) * & |
---|
| 362 | SQRT( 15.0 / kin_vis_air ) * epsilon**( 1.0 / 6.0 ) |
---|
| 363 | ! |
---|
| 364 | !-- The factor of 1.0E4 is needed to convert the dissipation rate |
---|
| 365 | !-- from m2 s-3 to cm2 s-3. |
---|
| 366 | k_au = k_au * ( 1.0 + & |
---|
| 367 | epsilon * 1.0E4 * ( re_lambda * 1.0E-3 )**0.25 * & |
---|
| 368 | ( alpha_cc * EXP( -1.0 * ( ( rc - r_cc ) / & |
---|
| 369 | sigma_cc )**2 ) + beta_cc ) ) |
---|
| 370 | ENDIF |
---|
| 371 | ! |
---|
[1012] | 372 | !-- Autoconversion rate (Seifert and Beheng, 2006): |
---|
[1065] | 373 | autocon = k_au * ( nu_c + 2.0 ) * ( nu_c + 4.0 ) / & |
---|
| 374 | ( nu_c + 1.0 )**2 * ql(k,j,i)**2 * xc**2 * & |
---|
| 375 | ( 1.0 + phi_au / ( 1.0 - tau_cloud )**2 ) * & |
---|
[1048] | 376 | rho_surface |
---|
[1065] | 377 | autocon = MIN( autocon, ql(k,j,i) / ( dt_3d * & |
---|
[1048] | 378 | weight_substep(intermediate_timestep_count) ) ) |
---|
[1012] | 379 | ! |
---|
[1022] | 380 | !-- Tendencies for q, qr, nr, pt: |
---|
[1005] | 381 | tend_qr(k,j,i) = tend_qr(k,j,i) + autocon |
---|
[1106] | 382 | tend_q(k,j,i) = tend_q(k,j,i) - autocon |
---|
[1005] | 383 | tend_nr(k,j,i) = tend_nr(k,j,i) + autocon / x0 * hyrho(k) |
---|
[1106] | 384 | tend_pt(k,j,i) = tend_pt(k,j,i) + autocon * l_d_cp * pt_d_t(k) |
---|
| 385 | |
---|
[1005] | 386 | ENDIF |
---|
[1000] | 387 | |
---|
| 388 | ENDDO |
---|
| 389 | |
---|
[1005] | 390 | END SUBROUTINE autoconversion_ij |
---|
| 391 | |
---|
[1106] | 392 | |
---|
[1005] | 393 | SUBROUTINE accretion_ij( i, j ) |
---|
| 394 | |
---|
| 395 | USE arrays_3d |
---|
| 396 | USE cloud_parameters |
---|
| 397 | USE constants |
---|
| 398 | USE indices |
---|
| 399 | USE control_parameters |
---|
[1048] | 400 | USE statistics |
---|
[1005] | 401 | |
---|
| 402 | IMPLICIT NONE |
---|
| 403 | |
---|
| 404 | INTEGER :: i, j, k |
---|
[1065] | 405 | REAL :: accr, phi_ac, tau_cloud, k_cr |
---|
[1005] | 406 | |
---|
| 407 | DO k = nzb_2d(j,i)+1, nzt |
---|
[1106] | 408 | |
---|
[1048] | 409 | IF ( ( ql(k,j,i) > 0.0 ) .AND. ( qr(k,j,i) > eps_sb ) ) THEN |
---|
[1012] | 410 | ! |
---|
[1048] | 411 | !-- Intern time scale of coagulation (Seifert and Beheng, 2006): |
---|
| 412 | tau_cloud = 1.0 - ql(k,j,i) / ( ql(k,j,i) + qr(k,j,i) + 1.0E-20) |
---|
[1012] | 413 | ! |
---|
| 414 | !-- Universal function for accretion process |
---|
[1048] | 415 | !-- (Seifert and Beheng, 2001): |
---|
[1065] | 416 | phi_ac = tau_cloud / ( tau_cloud + 5.0E-5 ) |
---|
| 417 | phi_ac = ( phi_ac**2 )**2 |
---|
[1012] | 418 | ! |
---|
[1065] | 419 | !-- Parameterized turbulence effects on autoconversion (Seifert, |
---|
| 420 | !-- Nuijens and Stevens, 2010). The factor of 1.0E4 is needed to |
---|
| 421 | !-- convert the dissipation (diss) from m2 s-3 to cm2 s-3. |
---|
| 422 | IF ( turbulence ) THEN |
---|
| 423 | k_cr = k_cr0 * ( 1.0 + 0.05 * & |
---|
| 424 | MIN( 600.0, diss(k,j,i) * 1.0E4 )**0.25 ) |
---|
| 425 | ELSE |
---|
| 426 | k_cr = k_cr0 |
---|
| 427 | ENDIF |
---|
| 428 | ! |
---|
[1012] | 429 | !-- Accretion rate (Seifert and Beheng, 2006): |
---|
[1065] | 430 | accr = k_cr * ql(k,j,i) * qr(k,j,i) * phi_ac * & |
---|
| 431 | SQRT( rho_surface * hyrho(k) ) |
---|
| 432 | accr = MIN( accr, ql(k,j,i) / ( dt_3d * & |
---|
| 433 | weight_substep(intermediate_timestep_count) ) ) |
---|
[1012] | 434 | ! |
---|
[1022] | 435 | !-- Tendencies for q, qr, pt: |
---|
[1005] | 436 | tend_qr(k,j,i) = tend_qr(k,j,i) + accr |
---|
[1106] | 437 | tend_q(k,j,i) = tend_q(k,j,i) - accr |
---|
[1048] | 438 | tend_pt(k,j,i) = tend_pt(k,j,i) + accr * l_d_cp * pt_d_t(k) |
---|
[1106] | 439 | |
---|
[1005] | 440 | ENDIF |
---|
[1106] | 441 | |
---|
[1005] | 442 | ENDDO |
---|
| 443 | |
---|
[1000] | 444 | END SUBROUTINE accretion_ij |
---|
| 445 | |
---|
[1005] | 446 | |
---|
| 447 | SUBROUTINE selfcollection_breakup_ij( i, j ) |
---|
| 448 | |
---|
| 449 | USE arrays_3d |
---|
| 450 | USE cloud_parameters |
---|
| 451 | USE constants |
---|
| 452 | USE indices |
---|
| 453 | USE control_parameters |
---|
[1048] | 454 | USE statistics |
---|
[1005] | 455 | |
---|
| 456 | IMPLICIT NONE |
---|
| 457 | |
---|
| 458 | INTEGER :: i, j, k |
---|
[1048] | 459 | REAL :: selfcoll, breakup, phi_br, phi_sc |
---|
[1005] | 460 | |
---|
[1106] | 461 | |
---|
[1005] | 462 | DO k = nzb_2d(j,i)+1, nzt |
---|
[1106] | 463 | |
---|
[1065] | 464 | IF ( qr(k,j,i) > eps_sb ) THEN |
---|
[1012] | 465 | ! |
---|
| 466 | !-- Selfcollection rate (Seifert and Beheng, 2006): |
---|
[1048] | 467 | !-- pirho_l**( 1.0 / 3.0 ) is necessary to convert [lambda_r] = m-1 to |
---|
| 468 | !-- kg**( 1.0 / 3.0 ). |
---|
[1065] | 469 | phi_sc = 1.0 !( 1.0 + kappa_rr / lambda_r(k) * & |
---|
| 470 | !pirho_l**( 1.0 / 3.0 ) )**( -9 ) |
---|
[1048] | 471 | |
---|
| 472 | selfcoll = k_rr * nr(k,j,i) * qr(k,j,i) * phi_sc * & |
---|
[1005] | 473 | SQRT( hyrho(k) * rho_surface ) |
---|
[1012] | 474 | ! |
---|
[1048] | 475 | !-- Collisional breakup rate (Seifert, 2008): |
---|
| 476 | IF ( dr(k) >= 0.3E-3 ) THEN |
---|
| 477 | phi_br = k_br * ( dr(k) - 1.1E-3 ) |
---|
[1005] | 478 | breakup = selfcoll * ( phi_br + 1.0 ) |
---|
| 479 | ELSE |
---|
| 480 | breakup = 0.0 |
---|
| 481 | ENDIF |
---|
[1048] | 482 | |
---|
| 483 | selfcoll = MAX( breakup - selfcoll, -nr(k,j,i) / ( dt_3d * & |
---|
| 484 | weight_substep(intermediate_timestep_count) ) ) |
---|
[1012] | 485 | ! |
---|
| 486 | !-- Tendency for nr: |
---|
[1048] | 487 | tend_nr(k,j,i) = tend_nr(k,j,i) + selfcoll |
---|
[1106] | 488 | |
---|
[1005] | 489 | ENDIF |
---|
[1106] | 490 | |
---|
[1005] | 491 | ENDDO |
---|
| 492 | |
---|
| 493 | END SUBROUTINE selfcollection_breakup_ij |
---|
| 494 | |
---|
[1106] | 495 | |
---|
[1012] | 496 | SUBROUTINE evaporation_rain_ij( i, j ) |
---|
[1022] | 497 | ! |
---|
| 498 | !-- Evaporation of precipitable water. Condensation is neglected for |
---|
| 499 | !-- precipitable water. |
---|
[1012] | 500 | |
---|
| 501 | USE arrays_3d |
---|
| 502 | USE cloud_parameters |
---|
| 503 | USE constants |
---|
| 504 | USE indices |
---|
| 505 | USE control_parameters |
---|
[1048] | 506 | USE statistics |
---|
| 507 | |
---|
[1012] | 508 | IMPLICIT NONE |
---|
| 509 | |
---|
| 510 | INTEGER :: i, j, k |
---|
| 511 | REAL :: evap, alpha, e_s, q_s, t_l, sat, temp, g_evap, f_vent, & |
---|
[1049] | 512 | mu_r_2, mu_r_5d2, nr_0 |
---|
[1012] | 513 | |
---|
[1106] | 514 | |
---|
[1012] | 515 | DO k = nzb_2d(j,i)+1, nzt |
---|
[1106] | 516 | |
---|
[1065] | 517 | IF ( qr(k,j,i) > eps_sb ) THEN |
---|
[1012] | 518 | ! |
---|
| 519 | !-- Actual liquid water temperature: |
---|
| 520 | t_l = t_d_pt(k) * pt(k,j,i) |
---|
| 521 | ! |
---|
| 522 | !-- Saturation vapor pressure at t_l: |
---|
| 523 | e_s = 610.78 * EXP( 17.269 * ( t_l - 273.16 ) / ( t_l - 35.86 ) ) |
---|
| 524 | ! |
---|
| 525 | !-- Computation of saturation humidity: |
---|
| 526 | q_s = 0.622 * e_s / ( hyp(k) - 0.378 * e_s ) |
---|
| 527 | alpha = 0.622 * l_d_r * l_d_cp / ( t_l * t_l ) |
---|
| 528 | q_s = q_s * ( 1.0 + alpha * q(k,j,i) ) / ( 1.0 + alpha * q_s ) |
---|
| 529 | ! |
---|
[1106] | 530 | !-- Supersaturation: |
---|
[1012] | 531 | sat = MIN( 0.0, ( q(k,j,i) - ql(k,j,i) ) / q_s - 1.0 ) |
---|
| 532 | ! |
---|
| 533 | !-- Actual temperature: |
---|
[1048] | 534 | temp = t_l + l_d_cp * ql(k,j,i) |
---|
[1012] | 535 | ! |
---|
| 536 | !-- |
---|
| 537 | g_evap = ( l_v / ( r_v * temp ) - 1.0 ) * l_v / & |
---|
[1048] | 538 | ( thermal_conductivity_l * temp ) + rho_l * r_v * temp /& |
---|
[1022] | 539 | ( diff_coeff_l * e_s ) |
---|
[1012] | 540 | g_evap = 1.0 / g_evap |
---|
| 541 | ! |
---|
[1049] | 542 | !-- Compute ventilation factor and intercept parameter |
---|
| 543 | !-- (Seifert and Beheng, 2006; Seifert, 2008): |
---|
[1048] | 544 | IF ( ventilation_effect ) THEN |
---|
| 545 | mu_r_2 = mu_r(k) + 2.0 |
---|
| 546 | mu_r_5d2 = mu_r(k) + 2.5 |
---|
| 547 | f_vent = a_vent * gamm( mu_r_2 ) * & |
---|
| 548 | lambda_r(k)**( -mu_r_2 ) + & |
---|
| 549 | b_vent * schmidt_p_1d3 * & |
---|
| 550 | SQRT( a_term / kin_vis_air ) * gamm( mu_r_5d2 ) * & |
---|
| 551 | lambda_r(k)**( -mu_r_5d2 ) * & |
---|
| 552 | ( 1.0 - 0.5 * ( b_term / a_term ) * & |
---|
| 553 | ( lambda_r(k) / & |
---|
| 554 | ( c_term + lambda_r(k) ) )**mu_r_5d2 - & |
---|
| 555 | 0.125 * ( b_term / a_term )**2 * & |
---|
| 556 | ( lambda_r(k) / & |
---|
| 557 | ( 2.0 * c_term + lambda_r(k) ) )**mu_r_5d2 - & |
---|
| 558 | 0.0625 * ( b_term / a_term )**3 * & |
---|
| 559 | ( lambda_r(k) / & |
---|
| 560 | ( 3.0 * c_term + lambda_r(k) ) )**mu_r_5d2 - & |
---|
| 561 | 0.0390625 * ( b_term / a_term )**4 * & |
---|
| 562 | ( lambda_r(k) / & |
---|
| 563 | ( 4.0 * c_term + lambda_r(k) ) )**mu_r_5d2 ) |
---|
[1049] | 564 | nr_0 = nr(k,j,i) * lambda_r(k)**( mu_r(k) + 1.0 ) / & |
---|
| 565 | gamm( mu_r(k) + 1.0 ) |
---|
[1048] | 566 | ELSE |
---|
| 567 | f_vent = 1.0 |
---|
[1049] | 568 | nr_0 = nr(k,j,i) * dr(k) |
---|
[1048] | 569 | ENDIF |
---|
[1012] | 570 | ! |
---|
[1048] | 571 | !-- Evaporation rate of rain water content (Seifert and Beheng, 2006): |
---|
[1049] | 572 | evap = 2.0 * pi * nr_0 * g_evap * f_vent * sat / & |
---|
[1048] | 573 | hyrho(k) |
---|
[1106] | 574 | evap = MAX( evap, -qr(k,j,i) / ( dt_3d * & |
---|
[1048] | 575 | weight_substep(intermediate_timestep_count) ) ) |
---|
[1012] | 576 | ! |
---|
[1022] | 577 | !-- Tendencies for q, qr, nr, pt: |
---|
[1012] | 578 | tend_qr(k,j,i) = tend_qr(k,j,i) + evap |
---|
[1106] | 579 | tend_q(k,j,i) = tend_q(k,j,i) - evap |
---|
[1049] | 580 | tend_nr(k,j,i) = tend_nr(k,j,i) + c_evap * evap / xr(k) * hyrho(k) |
---|
[1048] | 581 | tend_pt(k,j,i) = tend_pt(k,j,i) + evap * l_d_cp * pt_d_t(k) |
---|
[1106] | 582 | |
---|
[1012] | 583 | ENDIF |
---|
[1106] | 584 | |
---|
[1012] | 585 | ENDDO |
---|
| 586 | |
---|
| 587 | END SUBROUTINE evaporation_rain_ij |
---|
| 588 | |
---|
[1106] | 589 | |
---|
[1012] | 590 | SUBROUTINE sedimentation_cloud_ij( i, j ) |
---|
| 591 | |
---|
| 592 | USE arrays_3d |
---|
| 593 | USE cloud_parameters |
---|
| 594 | USE constants |
---|
| 595 | USE indices |
---|
| 596 | USE control_parameters |
---|
| 597 | |
---|
| 598 | IMPLICIT NONE |
---|
| 599 | |
---|
| 600 | INTEGER :: i, j, k |
---|
[1022] | 601 | REAL :: sed_q_const, sigma_gc = 1.3, k_st = 1.2E8 |
---|
[1106] | 602 | |
---|
[1012] | 603 | ! |
---|
| 604 | !-- Sedimentation of cloud droplets (Heus et al., 2010): |
---|
[1022] | 605 | sed_q_const = k_st * ( 3.0 / ( 4.0 * pi * rho_l ))**( 2.0 / 3.0 ) * & |
---|
[1048] | 606 | EXP( 5.0 * LOG( sigma_gc )**2 ) |
---|
[1012] | 607 | |
---|
[1022] | 608 | sed_q = 0.0 |
---|
[1012] | 609 | |
---|
| 610 | DO k = nzb_2d(j,i)+1, nzt |
---|
[1048] | 611 | IF ( ql(k,j,i) > 0.0 ) THEN |
---|
[1022] | 612 | sed_q(k) = sed_q_const * nc**( -2.0 / 3.0 ) * & |
---|
[1012] | 613 | ( ql(k,j,i) * hyrho(k) )**( 5.0 / 3.0 ) |
---|
| 614 | ENDIF |
---|
| 615 | ENDDO |
---|
| 616 | ! |
---|
[1106] | 617 | !-- Tendency for q, pt: |
---|
[1012] | 618 | DO k = nzb_2d(j,i)+1, nzt |
---|
[1048] | 619 | tend_q(k,j,i) = tend_q(k,j,i) + ( sed_q(k+1) - sed_q(k) ) * & |
---|
| 620 | ddzu(k+1) / hyrho(k) |
---|
[1022] | 621 | tend_pt(k,j,i) = tend_pt(k,j,i) - ( sed_q(k+1) - sed_q(k) ) * & |
---|
[1048] | 622 | ddzu(k+1) / hyrho(k) * l_d_cp * pt_d_t(k) |
---|
[1012] | 623 | ENDDO |
---|
| 624 | |
---|
| 625 | END SUBROUTINE sedimentation_cloud_ij |
---|
| 626 | |
---|
[1106] | 627 | |
---|
[1012] | 628 | SUBROUTINE sedimentation_rain_ij( i, j ) |
---|
| 629 | |
---|
| 630 | USE arrays_3d |
---|
| 631 | USE cloud_parameters |
---|
| 632 | USE constants |
---|
| 633 | USE indices |
---|
| 634 | USE control_parameters |
---|
[1048] | 635 | USE statistics |
---|
[1012] | 636 | |
---|
| 637 | IMPLICIT NONE |
---|
| 638 | |
---|
[1092] | 639 | INTEGER :: i, j, k, k_run |
---|
| 640 | REAL :: c_run, d_max, d_mean, d_min, dt_sedi, flux, z_run |
---|
[1012] | 641 | |
---|
[1092] | 642 | REAL, DIMENSION(nzb:nzt) :: c_nr, c_qr, nr_slope, qr_slope, w_nr, w_qr |
---|
| 643 | |
---|
[1065] | 644 | ! |
---|
| 645 | !-- Computation of sedimentation flux. Implementation according to Stevens |
---|
| 646 | !-- and Seifert (2008). |
---|
[1048] | 647 | IF ( intermediate_timestep_count == 1 ) prr(:,j,i) = 0.0 |
---|
[1012] | 648 | |
---|
[1065] | 649 | dt_sedi = dt_3d * weight_substep(intermediate_timestep_count) |
---|
[1022] | 650 | |
---|
[1065] | 651 | w_nr = 0.0 |
---|
| 652 | w_qr = 0.0 |
---|
[1012] | 653 | ! |
---|
[1065] | 654 | !-- Compute velocities |
---|
| 655 | DO k = nzb_s_inner(j,i)+1, nzt |
---|
| 656 | IF ( qr(k,j,i) > eps_sb ) THEN |
---|
| 657 | w_nr(k) = MAX( 0.1, MIN( 20.0, a_term - b_term * ( 1.0 + & |
---|
| 658 | c_term / lambda_r(k) )**( -1.0 * ( mu_r(k) + 1.0 ) ) ) ) |
---|
| 659 | w_qr(k) = MAX( 0.1, MIN( 20.0, a_term - b_term * ( 1.0 + & |
---|
| 660 | c_term / lambda_r(k) )**( -1.0 * ( mu_r(k) + 4.0 ) ) ) ) |
---|
| 661 | ELSE |
---|
| 662 | w_nr(k) = 0.0 |
---|
| 663 | w_qr(k) = 0.0 |
---|
| 664 | ENDIF |
---|
| 665 | ENDDO |
---|
[1048] | 666 | ! |
---|
[1065] | 667 | !-- Adjust boundary values |
---|
| 668 | w_nr(nzb_2d(j,i)) = w_nr(nzb_2d(j,i)+1) |
---|
| 669 | w_qr(nzb_2d(j,i)) = w_qr(nzb_2d(j,i)+1) |
---|
| 670 | w_nr(nzt) = w_nr(nzt-1) |
---|
| 671 | w_qr(nzt) = w_qr(nzt-1) |
---|
| 672 | ! |
---|
| 673 | !-- Compute Courant number |
---|
| 674 | DO k = nzb_s_inner(j,i)+1, nzt-1 |
---|
| 675 | c_nr(k) = 0.25 * ( w_nr(k-1) + 2.0 * w_nr(k) + w_nr(k+1) ) * & |
---|
| 676 | dt_sedi * ddzu(k) |
---|
| 677 | c_qr(k) = 0.25 * ( w_qr(k-1) + 2.0 * w_qr(k) + w_qr(k+1) ) * & |
---|
| 678 | dt_sedi * ddzu(k) |
---|
| 679 | ENDDO |
---|
| 680 | ! |
---|
| 681 | !-- Limit slopes with monotonized centered (MC) limiter (van Leer, 1977): |
---|
| 682 | IF ( limiter_sedimentation ) THEN |
---|
| 683 | |
---|
| 684 | qr(nzb_s_inner(j,i),j,i) = 0.0 |
---|
| 685 | nr(nzb_s_inner(j,i),j,i) = 0.0 |
---|
| 686 | qr(nzt,j,i) = 0.0 |
---|
| 687 | nr(nzt,j,i) = 0.0 |
---|
| 688 | |
---|
| 689 | DO k = nzb_s_inner(j,i)+1, nzt-1 |
---|
| 690 | d_mean = 0.5 * ( qr(k+1,j,i) + qr(k-1,j,i) ) |
---|
| 691 | d_min = qr(k,j,i) - MIN( qr(k+1,j,i), qr(k,j,i), qr(k-1,j,i) ) |
---|
| 692 | d_max = MAX( qr(k+1,j,i), qr(k,j,i), qr(k-1,j,i) ) - qr(k,j,i) |
---|
| 693 | |
---|
| 694 | qr_slope(k) = SIGN(1.0, d_mean) * MIN ( 2.0 * d_min, 2.0 * d_max, & |
---|
| 695 | ABS( d_mean ) ) |
---|
| 696 | |
---|
| 697 | d_mean = 0.5 * ( nr(k+1,j,i) + nr(k-1,j,i) ) |
---|
| 698 | d_min = nr(k,j,i) - MIN( nr(k+1,j,i), nr(k,j,i), nr(k-1,j,i) ) |
---|
| 699 | d_max = MAX( nr(k+1,j,i), nr(k,j,i), nr(k-1,j,i) ) - nr(k,j,i) |
---|
| 700 | |
---|
| 701 | nr_slope(k) = SIGN(1.0, d_mean) * MIN ( 2.0 * d_min, 2.0 * d_max, & |
---|
| 702 | ABS( d_mean ) ) |
---|
[1022] | 703 | ENDDO |
---|
[1048] | 704 | |
---|
[1065] | 705 | ELSE |
---|
[1106] | 706 | |
---|
[1065] | 707 | nr_slope = 0.0 |
---|
| 708 | qr_slope = 0.0 |
---|
[1106] | 709 | |
---|
[1065] | 710 | ENDIF |
---|
| 711 | ! |
---|
| 712 | !-- Compute sedimentation flux |
---|
| 713 | DO k = nzt-2, nzb_s_inner(j,i)+1, -1 |
---|
| 714 | ! |
---|
| 715 | !-- Sum up all rain drop number densities which contribute to the flux |
---|
| 716 | !-- through k-1/2 |
---|
| 717 | flux = 0.0 |
---|
| 718 | z_run = 0.0 ! height above z(k) |
---|
| 719 | k_run = k |
---|
| 720 | c_run = MIN( 1.0, c_nr(k) ) |
---|
| 721 | DO WHILE ( c_run > 0.0 .AND. k_run <= nzt-1 ) |
---|
| 722 | flux = flux + hyrho(k_run) * & |
---|
| 723 | ( nr(k_run,j,i) + nr_slope(k_run) * ( 1.0 - c_run ) * & |
---|
| 724 | 0.5 ) * c_run * dzu(k_run) |
---|
| 725 | z_run = z_run + dzu(k_run) |
---|
| 726 | k_run = k_run + 1 |
---|
| 727 | c_run = MIN( 1.0, c_nr(k_run) - z_run * ddzu(k_run) ) |
---|
[1022] | 728 | ENDDO |
---|
| 729 | ! |
---|
[1065] | 730 | !-- It is not allowed to sediment more rain drop number density than |
---|
| 731 | !-- available |
---|
| 732 | flux = MIN( flux, & |
---|
| 733 | hyrho(k) * dzu(k) * nr(k,j,i) + sed_nr(k+1) * dt_sedi ) |
---|
| 734 | |
---|
| 735 | sed_nr(k) = flux / dt_sedi |
---|
| 736 | tend_nr(k,j,i) = tend_nr(k,j,i) + ( sed_nr(k+1) - sed_nr(k) ) * & |
---|
| 737 | ddzu(k+1) / hyrho(k) |
---|
| 738 | ! |
---|
| 739 | !-- Sum up all rain water content which contributes to the flux |
---|
| 740 | !-- through k-1/2 |
---|
| 741 | flux = 0.0 |
---|
| 742 | z_run = 0.0 ! height above z(k) |
---|
| 743 | k_run = k |
---|
| 744 | c_run = MIN( 1.0, c_qr(k) ) |
---|
[1106] | 745 | |
---|
[1065] | 746 | DO WHILE ( c_run > 0.0 .AND. k_run <= nzt-1 ) |
---|
[1106] | 747 | |
---|
[1065] | 748 | flux = flux + hyrho(k_run) * & |
---|
| 749 | ( qr(k_run,j,i) + qr_slope(k_run) * ( 1.0 - c_run ) * & |
---|
| 750 | 0.5 ) * c_run * dzu(k_run) |
---|
| 751 | z_run = z_run + dzu(k_run) |
---|
| 752 | k_run = k_run + 1 |
---|
| 753 | c_run = MIN( 1.0, c_qr(k_run) - z_run * ddzu(k_run) ) |
---|
[1106] | 754 | |
---|
[1065] | 755 | ENDDO |
---|
| 756 | ! |
---|
| 757 | !-- It is not allowed to sediment more rain water content than available |
---|
| 758 | flux = MIN( flux, & |
---|
| 759 | hyrho(k) * dzu(k) * qr(k,j,i) + sed_qr(k+1) * dt_sedi ) |
---|
| 760 | |
---|
| 761 | sed_qr(k) = flux / dt_sedi |
---|
| 762 | tend_qr(k,j,i) = tend_qr(k,j,i) + ( sed_qr(k+1) - sed_qr(k) ) * & |
---|
| 763 | ddzu(k+1) / hyrho(k) |
---|
| 764 | ! |
---|
| 765 | !-- Compute the rain rate |
---|
| 766 | prr(k,j,i) = prr(k,j,i) + sed_qr(k) / hyrho(k) * & |
---|
| 767 | weight_substep(intermediate_timestep_count) |
---|
| 768 | ENDDO |
---|
| 769 | ! |
---|
[1048] | 770 | !-- Precipitation amount |
---|
| 771 | IF ( intermediate_timestep_count == intermediate_timestep_count_max & |
---|
| 772 | .AND. ( dt_do2d_xy - time_do2d_xy ) < & |
---|
| 773 | precipitation_amount_interval ) THEN |
---|
[1012] | 774 | |
---|
[1048] | 775 | precipitation_amount(j,i) = precipitation_amount(j,i) + & |
---|
| 776 | prr(nzb_2d(j,i)+1,j,i) * & |
---|
| 777 | hyrho(nzb_2d(j,i)+1) * dt_3d |
---|
| 778 | ENDIF |
---|
| 779 | |
---|
[1012] | 780 | END SUBROUTINE sedimentation_rain_ij |
---|
| 781 | |
---|
[1106] | 782 | |
---|
[1012] | 783 | ! |
---|
| 784 | !-- This function computes the gamma function (Press et al., 1992). |
---|
| 785 | !-- The gamma function is needed for the calculation of the evaporation |
---|
| 786 | !-- of rain drops. |
---|
| 787 | FUNCTION gamm( xx ) |
---|
[1048] | 788 | |
---|
| 789 | USE cloud_parameters |
---|
[1012] | 790 | |
---|
| 791 | IMPLICIT NONE |
---|
| 792 | |
---|
[1065] | 793 | REAL :: gamm, ser, tmp, x_gamm, xx, y_gamm |
---|
[1012] | 794 | INTEGER :: j |
---|
[1106] | 795 | |
---|
[1012] | 796 | |
---|
| 797 | x_gamm = xx |
---|
| 798 | y_gamm = x_gamm |
---|
| 799 | tmp = x_gamm + 5.5 |
---|
| 800 | tmp = ( x_gamm + 0.5 ) * LOG( tmp ) - tmp |
---|
| 801 | ser = 1.000000000190015 |
---|
[1106] | 802 | |
---|
| 803 | DO j = 1, 6 |
---|
[1012] | 804 | y_gamm = y_gamm + 1.0 |
---|
| 805 | ser = ser + cof( j ) / y_gamm |
---|
[1106] | 806 | ENDDO |
---|
| 807 | |
---|
[1012] | 808 | ! |
---|
| 809 | !-- Until this point the algorithm computes the logarithm of the gamma |
---|
| 810 | !-- function. Hence, the exponential function is used. |
---|
| 811 | ! gamm = EXP( tmp + LOG( stp * ser / x_gamm ) ) |
---|
| 812 | gamm = EXP( tmp ) * stp * ser / x_gamm |
---|
[1106] | 813 | |
---|
[1012] | 814 | RETURN |
---|
| 815 | |
---|
| 816 | END FUNCTION gamm |
---|
| 817 | |
---|
| 818 | END MODULE microphysics_mod |
---|