SUBROUTINE lpm_calc_liquid_water_content !------------------------------------------------------------------------------! ! Current revisions: ! ------------------ ! ! ! Former revisions: ! ----------------- ! $Id: lpm_calc_liquid_water_content.f90 850 2012-03-15 12:09:25Z gryschka $ ! ! 849 2012-03-15 10:35:09Z raasch ! initial revision (former part of advec_particles) ! ! ! Description: ! ------------ ! Calculate the liquid water content for each grid box. !------------------------------------------------------------------------------! USE arrays_3d USE cloud_parameters USE constants USE control_parameters USE cpulog USE grid_variables USE indices USE interfaces USE particle_attributes IMPLICIT NONE INTEGER :: i, j, k, n, psi CALL cpu_log( log_point_s(45), 'lpm_calc_ql', 'start' ) ! !-- Set water content initially to zero ql = 0.0; ql_v = 0.0; ql_vp = 0.0 ! !-- Calculate for each grid box DO i = nxl, nxr DO j = nys, nyn DO k = nzb, nzt+1 ! !-- Calculate the total volume in the boxes (ql_v, weighting factor !-- has to beincluded) psi = prt_start_index(k,j,i) DO n = psi, psi+prt_count(k,j,i)-1 ql_v(k,j,i) = ql_v(k,j,i) + particles(n)%weight_factor * & particles(n)%radius**3 ENDDO ! !-- Calculate the liquid water content IF ( ql_v(k,j,i) /= 0.0 ) THEN ql(k,j,i) = ql(k,j,i) + rho_l * 1.33333333 * pi * & ql_v(k,j,i) / & ( rho_surface * dx * dy * dz ) IF ( ql(k,j,i) < 0.0 ) THEN WRITE( message_string, * ) 'LWC out of range: ' , & ql(k,j,i) CALL message( 'lpm_calc_liquid_water_content', '', 2, 2, & -1, 6, 1 ) ENDIF ELSE ql(k,j,i) = 0.0 ENDIF ENDDO ENDDO ENDDO CALL cpu_log( log_point_s(45), 'lpm_calc_ql', 'stop' ) END SUBROUTINE lpm_calc_liquid_water_content