Changeset 1849 for palm/trunk/SOURCE/microphysics.f90
- Timestamp:
- Apr 8, 2016 11:33:18 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/microphysics.f90
r1846 r1849 19 19 ! Current revisions: 20 20 ! ------------------ 21 ! 22 ! 21 ! Adapted for modularization of microphysics. 22 ! 23 23 ! Former revisions: 24 24 ! ----------------- … … 98 98 ! Description: 99 99 ! ------------ 100 !> Calculate cloud microphysics according to the two moment bulk 101 !> scheme by Seifert and Beheng (2006). 100 !> Calculate bilk cloud microphysics. 102 101 !------------------------------------------------------------------------------! 103 102 MODULE microphysics_mod 104 103 104 USE kinds 105 106 IMPLICIT NONE 107 108 LOGICAL :: cloud_water_sedimentation = .FALSE. !< cloud water sedimentation 109 LOGICAL :: limiter_sedimentation = .TRUE. !< sedimentation limiter 110 LOGICAL :: collision_turbulence = .FALSE. !< turbulence effects 111 LOGICAL :: ventilation_effect = .TRUE. !< ventilation effect 112 113 REAL(wp) :: a_1 = 8.69E-4_wp !< coef. in turb. parametrization (cm-2 s3) 114 REAL(wp) :: a_2 = -7.38E-5_wp !< coef. in turb. parametrization (cm-2 s3) 115 REAL(wp) :: a_3 = -1.40E-2_wp !< coef. in turb. parametrization 116 REAL(wp) :: a_term = 9.65_wp !< coef. for terminal velocity (m s-1) 117 REAL(wp) :: a_vent = 0.78_wp !< coef. for ventilation effect 118 REAL(wp) :: b_1 = 11.45E-6_wp !< coef. in turb. parametrization (m) 119 REAL(wp) :: b_2 = 9.68E-6_wp !< coef. in turb. parametrization (m) 120 REAL(wp) :: b_3 = 0.62_wp !< coef. in turb. parametrization 121 REAL(wp) :: b_term = 9.8_wp !< coef. for terminal velocity (m s-1) 122 REAL(wp) :: b_vent = 0.308_wp !< coef. for ventilation effect 123 REAL(wp) :: beta_cc = 3.09E-4_wp !< coef. in turb. parametrization (cm-2 s3) 124 REAL(wp) :: c_1 = 4.82E-6_wp !< coef. in turb. parametrization (m) 125 REAL(wp) :: c_2 = 4.8E-6_wp !< coef. in turb. parametrization (m) 126 REAL(wp) :: c_3 = 0.76_wp !< coef. in turb. parametrization 127 REAL(wp) :: c_const = 0.93_wp !< const. in Taylor-microscale Reynolds number 128 REAL(wp) :: c_evap = 0.7_wp !< constant in evaporation 129 REAL(wp) :: c_term = 600.0_wp !< coef. for terminal velocity (m-1) 130 REAL(wp) :: diff_coeff_l = 0.23E-4_wp !< diffusivity of water vapor (m2 s-1) 131 REAL(wp) :: eps_sb = 1.0E-20_wp !< threshold in two-moments scheme 132 REAL(wp) :: k_cc = 9.44E09_wp !< const. cloud-cloud kernel (m3 kg-2 s-1) 133 REAL(wp) :: k_cr0 = 4.33_wp !< const. cloud-rain kernel (m3 kg-1 s-1) 134 REAL(wp) :: k_rr = 7.12_wp !< const. rain-rain kernel (m3 kg-1 s-1) 135 REAL(wp) :: k_br = 1000.0_wp !< const. in breakup parametrization (m-1) 136 REAL(wp) :: k_st = 1.2E8_wp !< const. in drizzle parametrization (m-1 s-1) 137 REAL(wp) :: kappa_rr = 60.7_wp !< const. in collision kernel (kg-1/3) 138 REAL(wp) :: kin_vis_air = 1.4086E-5_wp !< kin. viscosity of air (m2 s-1) 139 REAL(wp) :: prec_time_const = 0.001_wp !< coef. in Kessler scheme (s-1) 140 REAL(wp) :: ql_crit = 0.0005_wp !< coef. in Kessler scheme (kg kg-1) 141 REAL(wp) :: schmidt_p_1d3=0.8921121_wp !< Schmidt number**0.33333, 0.71**0.33333 142 REAL(wp) :: sigma_gc = 1.3_wp !< geometric standard deviation cloud droplets 143 REAL(wp) :: thermal_conductivity_l = 2.43E-2_wp !< therm. cond. air (J m-1 s-1 K-1) 144 REAL(wp) :: w_precipitation = 9.65_wp !< maximum terminal velocity (m s-1) 145 REAL(wp) :: x0 = 2.6E-10_wp !< separating drop mass (kg) 146 REAL(wp) :: xrmin = 2.6E-10_wp !< minimum rain drop size (kg) 147 REAL(wp) :: xrmax = 5.0E-6_wp !< maximum rain drop site (kg) 148 149 REAL(wp) :: c_sedimentation = 2.0_wp !< Courant number of sedimentation process 150 REAL(wp) :: dpirho_l !< 6.0 / ( pi * rho_l ) 151 REAL(wp) :: dt_micro !< microphysics time step 152 REAL(wp) :: nc_const = 70.0E6_wp !< cloud droplet concentration 153 REAL(wp) :: dt_precipitation = 100.0_wp !< timestep precipitation (s) 154 REAL(wp) :: sed_qc_const !< const. for sedimentation of cloud water 155 REAL(wp) :: pirho_l !< pi * rho_l / 6.0; 156 157 REAL(wp), DIMENSION(:), ALLOCATABLE :: nc_1d !< 158 REAL(wp), DIMENSION(:), ALLOCATABLE :: nr_1d !< 159 REAL(wp), DIMENSION(:), ALLOCATABLE :: pt_1d !< 160 REAL(wp), DIMENSION(:), ALLOCATABLE :: qc_1d !< 161 REAL(wp), DIMENSION(:), ALLOCATABLE :: qr_1d !< 162 REAL(wp), DIMENSION(:), ALLOCATABLE :: q_1d !< 163 164 SAVE 105 165 106 166 PRIVATE 107 PUBLIC microphysics_control 167 PUBLIC microphysics_control, microphysics_init 168 169 PUBLIC cloud_water_sedimentation, collision_turbulence, c_sedimentation, & 170 dt_precipitation, limiter_sedimentation, nc_const, sigma_gc, & 171 ventilation_effect 108 172 109 173 INTERFACE microphysics_control … … 157 221 END INTERFACE calc_precipitation_amount 158 222 159 160 223 CONTAINS 161 162 163 224 !------------------------------------------------------------------------------! 164 225 ! Description: 165 226 ! ------------ 166 !> Call for all grid points 227 !> Initialization of bulk microphysics 228 !------------------------------------------------------------------------------! 229 SUBROUTINE microphysics_init 230 231 USE arrays_3d, & 232 ONLY: dzu 233 234 USE constants, & 235 ONLY: pi 236 237 USE cloud_parameters, & 238 ONLY: rho_l 239 240 USE control_parameters, & 241 ONLY: microphysics_seifert 242 243 USE indices, & 244 ONLY: nzb, nzt 245 246 IMPLICIT NONE 247 248 ! 249 !-- constant for the sedimentation of cloud water (2-moment cloud physics) 250 sed_qc_const = k_st * ( 3.0_wp / ( 4.0_wp * pi * rho_l ) & 251 )**( 2.0_wp / 3.0_wp ) * & 252 EXP( 5.0_wp * LOG( sigma_gc )**2 ) 253 254 ! 255 !-- Calculate timestep according to precipitation 256 IF ( microphysics_seifert ) THEN 257 dt_precipitation = c_sedimentation * MINVAL( dzu(nzb+2:nzt) ) / & 258 w_precipitation 259 ENDIF 260 261 ! 262 !-- Pre-calculate frequently calculated fractions of pi and rho_l 263 pirho_l = pi * rho_l / 6.0_wp 264 dpirho_l = 1.0_wp / pirho_l 265 266 ! 267 !-- Allocate 1D microphysics arrays 268 ALLOCATE ( nc_1d(nzb:nzt+1), pt_1d(nzb:nzt+1), q_1d(nzb:nzt+1), & 269 qc_1d(nzb:nzt+1) ) 270 271 IF ( microphysics_seifert ) THEN 272 ALLOCATE ( nr_1d(nzb:nzt+1), qr_1d(nzb:nzt+1) ) 273 ENDIF 274 275 ! 276 !-- Initialze nc_1d with nc_const 277 nc_1d = nc_const 278 279 END SUBROUTINE microphysics_init 280 281 282 !------------------------------------------------------------------------------! 283 ! Description: 284 ! ------------ 285 !> Control of microphysics for all grid points 167 286 !------------------------------------------------------------------------------! 168 287 SUBROUTINE microphysics_control 169 288 170 289 USE arrays_3d, & 171 ONLY: hyp, pt_init, zu290 ONLY: hyp, pt_init, prr, zu 172 291 173 292 USE cloud_parameters, & 174 ONLY: c loud_water_sedimentation, cp, hyrho, prr, pt_d_t, r_d, t_d_pt293 ONLY: cp, hyrho, pt_d_t, r_d, t_d_pt 175 294 176 295 USE control_parameters, & 177 ONLY: call_microphysics_at_all_substeps, dt_3d, dt_micro,&178 g, intermediate_timestep_count, large_scale_forcing,&296 ONLY: call_microphysics_at_all_substeps, dt_3d, g, & 297 intermediate_timestep_count, large_scale_forcing, & 179 298 lsf_surf, microphysics_kessler, microphysics_seifert, & 180 299 pt_surface, rho_surface,surface_pressure … … 263 382 264 383 USE cloud_parameters, & 265 ONLY: eps_sb, xrmin, xrmax,hyrho384 ONLY: hyrho 266 385 267 386 USE cpulog, & … … 314 433 315 434 USE cloud_parameters, & 316 ONLY: a_1, a_2, a_3, b_1, b_2, b_3, beta_cc, c_1, c_2, c_3, & 317 c_const, collision_turbulence, dpirho_l, eps_sb, hyrho, & 318 k_cc, kin_vis_air, nc_const, x0 435 ONLY: hyrho 319 436 320 437 USE control_parameters, & 321 ONLY: dt_micro,rho_surface438 ONLY: rho_surface 322 439 323 440 USE cpulog, & … … 446 563 447 564 USE arrays_3d, & 448 ONLY: dzw, pt, q, qc565 ONLY: dzw, pt, prr, q, qc 449 566 450 567 USE cloud_parameters, & 451 ONLY: l_d_cp, pt_d_t, prec_time_const, prr, ql_crit 452 453 USE control_parameters, & 454 ONLY: dt_micro 568 ONLY: l_d_cp, pt_d_t 455 569 456 570 USE indices, & … … 506 620 507 621 USE cloud_parameters, & 508 ONLY: collision_turbulence, eps_sb, hyrho, k_cr0622 ONLY: hyrho 509 623 510 624 USE control_parameters, & 511 ONLY: dt_micro,rho_surface625 ONLY: rho_surface 512 626 513 627 USE cpulog, & … … 587 701 588 702 USE cloud_parameters, & 589 ONLY: dpirho_l, eps_sb, hyrho, k_br, k_rr703 ONLY: hyrho 590 704 591 705 USE control_parameters, & 592 ONLY: dt_micro,rho_surface706 ONLY: rho_surface 593 707 594 708 USE cpulog, & … … 659 773 660 774 USE cloud_parameters, & 661 ONLY: a_term, a_vent, b_term, b_vent, c_evap, c_term, & 662 diff_coeff_l, dpirho_l, eps_sb, hyrho, kin_vis_air, & 663 l_d_cp, l_d_r, l_v, r_v, schmidt_p_1d3, & 664 thermal_conductivity_l, t_d_pt, ventilation_effect 775 ONLY: hyrho, l_d_cp, l_d_r, l_v, r_v, t_d_pt 665 776 666 777 USE constants, & 667 778 ONLY: pi 668 669 USE control_parameters, &670 ONLY: dt_micro671 779 672 780 USE cpulog, & … … 817 925 818 926 USE arrays_3d, & 819 ONLY: ddzu, dzu, pt, q, qc927 ONLY: ddzu, dzu, pt, prr, q, qc 820 928 821 929 USE cloud_parameters, & 822 ONLY: eps_sb, hyrho, l_d_cp, nc_const, prr, pt_d_t, sed_qc_const930 ONLY: hyrho, l_d_cp, pt_d_t 823 931 824 932 USE control_parameters, & 825 ONLY: call_microphysics_at_all_substeps, dt_micro, & 826 intermediate_timestep_count 933 ONLY: call_microphysics_at_all_substeps, intermediate_timestep_count 827 934 828 935 USE cpulog, & … … 840 947 IMPLICIT NONE 841 948 842 INTEGER(iwp) :: i 843 INTEGER(iwp) :: j 844 INTEGER(iwp) :: k 949 INTEGER(iwp) :: i !< 950 INTEGER(iwp) :: j !< 951 INTEGER(iwp) :: k !< 845 952 846 953 REAL(wp), DIMENSION(nzb:nzt+1) :: sed_qc !< … … 900 1007 901 1008 USE arrays_3d, & 902 ONLY: ddzu, dzu, nr, pt, q, qr1009 ONLY: ddzu, dzu, nr, pt, prr, q, qr 903 1010 904 1011 USE cloud_parameters, & 905 ONLY: a_term, b_term, c_term, dpirho_l, eps_sb, hyrho, & 906 limiter_sedimentation, l_d_cp, prr, pt_d_t 1012 ONLY: hyrho, l_d_cp, pt_d_t 907 1013 908 1014 USE control_parameters, & 909 ONLY: call_microphysics_at_all_substeps, dt_micro, & 910 intermediate_timestep_count 1015 ONLY: call_microphysics_at_all_substeps, intermediate_timestep_count 911 1016 USE cpulog, & 912 1017 ONLY: cpu_log, log_point_s … … 1125 1230 SUBROUTINE calc_precipitation_amount 1126 1231 1232 USE arrays_3d, & 1233 ONLY: precipitation_amount, prr 1234 1127 1235 USE cloud_parameters, & 1128 ONLY: hyrho , precipitation_amount, prr1236 ONLY: hyrho 1129 1237 1130 1238 USE control_parameters, & … … 1166 1274 ! Description: 1167 1275 ! ------------ 1168 !> C all for grid pointi,j1276 !> Control of microphysics for grid points i,j 1169 1277 !------------------------------------------------------------------------------! 1170 1278 … … 1172 1280 1173 1281 USE arrays_3d, & 1174 ONLY: hyp, nc_1d, nr, nr_1d, pt, pt_init, pt_1d, q, q_1d, qc, & 1175 qc_1d, qr, qr_1d, zu 1282 ONLY: hyp, nr, pt, pt_init, prr, q, qc, qr, zu 1176 1283 1177 1284 USE cloud_parameters, & 1178 ONLY: cloud_water_sedimentation, cp, hyrho, nc_const, prr, pt_d_t, & 1179 r_d, t_d_pt 1285 ONLY: cp, hyrho, pt_d_t, r_d, t_d_pt 1180 1286 1181 1287 USE control_parameters, & 1182 ONLY: call_microphysics_at_all_substeps, dt_3d, dt_micro,&1183 g, intermediate_timestep_count, large_scale_forcing,&1288 ONLY: call_microphysics_at_all_substeps, dt_3d, g, & 1289 intermediate_timestep_count, large_scale_forcing, & 1184 1290 lsf_surf, microphysics_seifert, microphysics_kessler, & 1185 1291 pt_surface, rho_surface, surface_pressure … … 1286 1392 SUBROUTINE adjust_cloud_ij( i, j ) 1287 1393 1288 USE arrays_3d, &1289 ONLY: qr_1d, nr_1d1290 1291 1394 USE cloud_parameters, & 1292 ONLY: eps_sb, xrmin, xrmax,hyrho1395 ONLY: hyrho 1293 1396 1294 1397 USE indices, & … … 1334 1437 1335 1438 USE arrays_3d, & 1336 ONLY: diss, dzu , nc_1d, nr_1d, qc_1d, qr_1d1439 ONLY: diss, dzu 1337 1440 1338 1441 USE cloud_parameters, & 1339 ONLY: a_1, a_2, a_3, b_1, b_2, b_3, beta_cc, c_1, c_2, c_3, & 1340 c_const, collision_turbulence, dpirho_l, eps_sb, hyrho, & 1341 kin_vis_air, k_cc, x0 1442 ONLY: hyrho 1342 1443 1343 1444 USE control_parameters, & 1344 ONLY: dt_micro,rho_surface1445 ONLY: rho_surface 1345 1446 1346 1447 USE grid_variables, & … … 1454 1555 1455 1556 USE arrays_3d, & 1456 ONLY: dzw, p t_1d, q_1d, qc_1d1557 ONLY: dzw, prr 1457 1558 1458 1559 USE cloud_parameters, & 1459 ONLY: l_d_cp, pt_d_t, prec_time_const, prr, ql_crit 1460 1461 USE control_parameters, & 1462 ONLY: dt_micro 1560 ONLY: l_d_cp, pt_d_t 1463 1561 1464 1562 USE indices, & … … 1505 1603 1506 1604 USE arrays_3d, & 1507 ONLY: diss , qc_1d, qr_1d1605 ONLY: diss 1508 1606 1509 1607 USE cloud_parameters, & 1510 ONLY: collision_turbulence, eps_sb, hyrho, k_cr01608 ONLY: hyrho 1511 1609 1512 1610 USE control_parameters, & 1513 ONLY: dt_micro,rho_surface1611 ONLY: rho_surface 1514 1612 1515 1613 USE indices, & … … 1572 1670 SUBROUTINE selfcollection_breakup_ij( i, j ) 1573 1671 1574 USE arrays_3d, &1575 ONLY: nr_1d, qr_1d1576 1577 1672 USE cloud_parameters, & 1578 ONLY: dpirho_l, eps_sb, hyrho, k_br, k_rr1673 ONLY: hyrho 1579 1674 1580 1675 USE control_parameters, & 1581 ONLY: dt_micro,rho_surface1676 ONLY: rho_surface 1582 1677 1583 1678 USE indices, & … … 1632 1727 1633 1728 USE arrays_3d, & 1634 ONLY: hyp , nr_1d, pt_1d, q_1d, qc_1d, qr_1d1729 ONLY: hyp 1635 1730 1636 1731 USE cloud_parameters, & 1637 ONLY: a_term, a_vent, b_term, b_vent, c_evap, c_term, diff_coeff_l,& 1638 dpirho_l, eps_sb, hyrho, kin_vis_air, l_d_cp, l_d_r, & 1639 l_v, r_v, schmidt_p_1d3, thermal_conductivity_l, & 1640 t_d_pt, ventilation_effect 1732 ONLY: hyrho, l_d_cp, l_d_r, l_v, r_v, t_d_pt 1641 1733 1642 1734 USE constants, & 1643 1735 ONLY: pi 1644 1645 USE control_parameters, &1646 ONLY: dt_micro1647 1736 1648 1737 USE indices, & … … 1779 1868 1780 1869 USE arrays_3d, & 1781 ONLY: ddzu, dzu, nc_1d, pt_1d, q_1d, qc_1d1870 ONLY: ddzu, dzu, prr 1782 1871 1783 1872 USE cloud_parameters, & 1784 ONLY: eps_sb, hyrho, l_d_cp, prr, pt_d_t, sed_qc_const1873 ONLY: hyrho, l_d_cp, pt_d_t 1785 1874 1786 1875 USE control_parameters, & 1787 ONLY: call_microphysics_at_all_substeps, dt_micro, & 1788 intermediate_timestep_count 1876 ONLY: call_microphysics_at_all_substeps, intermediate_timestep_count 1789 1877 1790 1878 USE indices, & … … 1798 1886 IMPLICIT NONE 1799 1887 1800 INTEGER(iwp) :: i 1801 INTEGER(iwp) :: j 1802 INTEGER(iwp) :: k 1888 INTEGER(iwp) :: i !< 1889 INTEGER(iwp) :: j !< 1890 INTEGER(iwp) :: k !< 1803 1891 1804 1892 REAL(wp), DIMENSION(nzb:nzt+1) :: sed_qc !< … … 1848 1936 1849 1937 USE arrays_3d, & 1850 ONLY: ddzu, dzu, nr_1d, pt_1d, q_1d, qr_1d1938 ONLY: ddzu, dzu, prr 1851 1939 1852 1940 USE cloud_parameters, & 1853 ONLY: a_term, b_term, c_term, dpirho_l, eps_sb, hyrho, & 1854 limiter_sedimentation, l_d_cp, prr, pt_d_t 1941 ONLY: hyrho, l_d_cp, pt_d_t 1855 1942 1856 1943 USE control_parameters, & 1857 ONLY: call_microphysics_at_all_substeps, dt_micro, & 1858 intermediate_timestep_count 1944 ONLY: call_microphysics_at_all_substeps, intermediate_timestep_count 1859 1945 1860 1946 USE indices, & … … 2050 2136 SUBROUTINE calc_precipitation_amount_ij( i, j ) 2051 2137 2138 USE arrays_3d, & 2139 ONLY: precipitation_amount, prr 2140 2052 2141 USE cloud_parameters, & 2053 ONLY: hyrho , precipitation_amount, prr2142 ONLY: hyrho 2054 2143 2055 2144 USE control_parameters, & … … 2089 2178 !------------------------------------------------------------------------------! 2090 2179 FUNCTION gamm( xx ) 2091 2092 USE cloud_parameters, &2093 ONLY: cof, stp2094 2180 2095 2181 USE kinds … … 2106 2192 REAL(wp) :: y_gamm !< 2107 2193 2108 x_gamm = xx 2109 y_gamm = x_gamm 2194 2195 REAL(wp), PARAMETER :: stp = 2.5066282746310005_wp !< 2196 REAL(wp), PARAMETER :: cof(6) = (/ 76.18009172947146_wp, & 2197 -86.50532032941677_wp, & 2198 24.01409824083091_wp, & 2199 -1.231739572450155_wp, & 2200 0.1208650973866179E-2_wp, & 2201 -0.5395239384953E-5_wp /) !< 2202 2203 x_gamm = xx 2204 y_gamm = x_gamm 2110 2205 tmp = x_gamm + 5.5_wp 2111 tmp = ( x_gamm + 0.5_wp ) * LOG( tmp ) - tmp 2206 tmp = ( x_gamm + 0.5_wp ) * LOG( tmp ) - tmp 2112 2207 ser = 1.000000000190015_wp 2113 2208
Note: See TracChangeset
for help on using the changeset viewer.