Changeset 3274 for palm/trunk/SOURCE/calc_radiation.f90
- Timestamp:
- Sep 24, 2018 3:42:55 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/calc_radiation.f90
r2718 r3274 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Modularization of all bulk cloud physics code components 28 ! 29 ! 2718 2018-01-02 08:49:38Z maronga 27 30 ! Corrected "Former revisions" section 28 31 ! … … 77 80 MODULE calc_radiation_mod 78 81 82 83 USE arrays_3d, & 84 ONLY: dzw, pt, ql, tend, d_exner, exner 85 86 USE basic_constants_and_equations_mod, & 87 ONLY: c_p, lv_d_cp, sigma_sb 88 89 USE control_parameters, & 90 ONLY: rho_surface 91 92 USE indices, & 93 ONLY: nxl, nxr, nyn, nys, nzb, nzt, wall_flags_0 94 79 95 USE kinds 80 96 97 USE pegrid 98 81 99 PRIVATE 82 100 PUBLIC calc_radiation 83 101 84 102 LOGICAL, SAVE :: first_call = .TRUE. !< 85 REAL(wp), SAVE :: sigma = 5.67E-08_wp !<86 103 87 104 REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE :: lwp_ground !< … … 103 120 !------------------------------------------------------------------------------! 104 121 SUBROUTINE calc_radiation 105 106 USE arrays_3d, &107 ONLY: dzw, pt, ql, tend108 109 USE cloud_parameters, &110 ONLY: cp, l_d_cp, pt_d_t, t_d_pt111 112 USE control_parameters, &113 ONLY: rho_surface114 115 USE indices, &116 ONLY: nxl, nxr, nyn, nys, nzb, nzt, wall_flags_0117 118 USE kinds119 120 USE pegrid121 122 122 123 123 IMPLICIT NONE … … 159 159 lwp_top(nzt+1) = rho_surface * ql(nzt+1,j,i) * dzw(nzt+1) 160 160 161 temperature = pt(nzb,j,i) * t_d_pt(nzb) + l_d_cp * ql(nzb,j,i)162 blackbody_emission(nzb) = sigma * temperature**4161 temperature = pt(nzb,j,i) * exner(nzb) + lv_d_cp * ql(nzb,j,i) 162 blackbody_emission(nzb) = sigma_sb * temperature**4 163 163 164 164 DO k = nzb+1, nzt … … 171 171 rho_surface * ql(k_help,j,i) * dzw(k_help) 172 172 173 temperature = pt(k,j,i) * t_d_pt(k) + l_d_cp * ql(k,j,i)174 blackbody_emission(k) = sigma * temperature**4&173 temperature = pt(k,j,i) * exner(k) + lv_d_cp * ql(k,j,i) 174 blackbody_emission(k) = sigma_sb * temperature**4 & 175 175 * MERGE( 1.0_wp, 0.0_wp, & 176 176 BTEST( wall_flags_0(k,j,i), 0 ) ) … … 182 182 lwp_top(nzb) = lwp_top(nzb+1) 183 183 184 temperature = pt(nzt+1,j,i) * t_d_pt(nzt+1) + l_d_cp * &184 temperature = pt(nzt+1,j,i) * exner(nzt+1) + lv_d_cp * & 185 185 ql(nzt+1,j,i) 186 blackbody_emission(nzt+1) = sigma * temperature**4186 blackbody_emission(nzt+1) = sigma_sb * temperature**4 187 187 188 188 ! … … 232 232 !-- Compute tendency term 233 233 tend(k,j,i) = tend(k,j,i) - & 234 ( pt_d_t(k) / ( rho_surface * cp ) *&234 ( d_exner(k) / ( rho_surface * c_p ) * & 235 235 ( df_p - df_m ) / dzw(k) ) & 236 236 * MERGE( 1.0_wp, 0.0_wp, & … … 253 253 SUBROUTINE calc_radiation_ij( i, j ) 254 254 255 USE arrays_3d, &256 ONLY: dzw, pt, ql, tend257 258 USE cloud_parameters, &259 ONLY: cp, l_d_cp, pt_d_t, t_d_pt260 261 USE control_parameters, &262 ONLY: rho_surface263 264 USE indices, &265 ONLY: nzb, nzt, wall_flags_0266 267 USE kinds268 269 USE pegrid270 271 272 255 IMPLICIT NONE 273 256 … … 305 288 lwp_top(nzt+1) = rho_surface * ql(nzt+1,j,i) * dzw(nzt+1) 306 289 307 temperature = pt(nzb,j,i) * t_d_pt(nzb) + l_d_cp * ql(nzb,j,i)308 blackbody_emission(nzb) = sigma * temperature**4290 temperature = pt(nzb,j,i) * exner(nzb) + lv_d_cp * ql(nzb,j,i) 291 blackbody_emission(nzb) = sigma_sb * temperature**4 309 292 310 293 DO k = nzb+1, nzt … … 315 298 rho_surface * ql(k_help,j,i) * dzw(k_help) 316 299 317 temperature = pt(k,j,i) * t_d_pt(k) + l_d_cp * ql(k,j,i)318 blackbody_emission(k) = sigma * temperature**4&300 temperature = pt(k,j,i) * exner(k) + lv_d_cp * ql(k,j,i) 301 blackbody_emission(k) = sigma_sb * temperature**4 & 319 302 * MERGE( 1.0_wp, 0.0_wp, & 320 303 BTEST( wall_flags_0(k,j,i), 0 ) ) … … 325 308 lwp_top(nzb) = lwp_top(nzb+1) 326 309 327 temperature = pt(nzt+1,j,i) * t_d_pt(nzt+1) + l_d_cp * &310 temperature = pt(nzt+1,j,i) * exner(nzt+1) + lv_d_cp * & 328 311 ql(nzt+1,j,i) 329 blackbody_emission(nzt+1) = sigma * temperature**4312 blackbody_emission(nzt+1) = sigma_sb * temperature**4 330 313 331 314 ! … … 370 353 ! 371 354 !-- Compute tendency term 372 tend(k,j,i) = tend(k,j,i) - ( pt_d_t(k) / ( rho_surface * cp ) *&373 355 tend(k,j,i) = tend(k,j,i) - ( d_exner(k) / ( rho_surface * c_p ) & 356 * ( df_p - df_m ) / dzw(k) ) & 374 357 * MERGE( 1.0_wp, 0.0_wp, & 375 358 BTEST( wall_flags_0(k,j,i), 0 ) )
Note: See TracChangeset
for help on using the changeset viewer.