MODULE impact_of_latent_heat_mod !------------------------------------------------------------------------------! ! Actual revisions: ! ----------------- ! ! ! Former revisions: ! ----------------- ! $Id: impact_of_latent_heat.f90 77 2007-03-29 04:26:56Z franke $ ! ! 72 2007-03-19 08:20:46Z ! precipitation_rate renamed dqdt_precip ! ! 19 2007-02-23 04:53:48Z raasch ! Calculation extended for gridpoint nzt ! ! RCS Log replace by Id keyword, revision history cleaned up ! ! Revision 1.5 2004/01/30 10:25:59 raasch ! Scalar lower k index nzb replaced by 2d-array nzb_2d ! ! Revision 1.1 2000/04/13 14:48:40 schroeter ! Initial revision ! ! ! Description: ! ------------ ! Calculate the impact of latent heat due to precipitation ! (simplified Kessler scheme) !------------------------------------------------------------------------------! PRIVATE PUBLIC impact_of_latent_heat INTERFACE impact_of_latent_heat MODULE PROCEDURE impact_of_latent_heat MODULE PROCEDURE impact_of_latent_heat_ij END INTERFACE impact_of_latent_heat CONTAINS !------------------------------------------------------------------------------! ! Call for all grid points !------------------------------------------------------------------------------! SUBROUTINE impact_of_latent_heat USE arrays_3d USE cloud_parameters USE constants USE indices IMPLICIT NONE INTEGER :: i, j, k REAL :: dqdt_precip DO i = nxl, nxr DO j = nys, nyn DO k = nzb_2d(j,i)+1, nzt IF ( ql(k,j,i) > ql_crit ) THEN dqdt_precip = prec_time_const * ( ql(k,j,i) - ql_crit ) ELSE dqdt_precip = 0.0 ENDIF tend(k,j,i) = tend(k,j,i) + dqdt_precip * l_d_cp * pt_d_t(k) ENDDO ENDDO ENDDO END SUBROUTINE impact_of_latent_heat !------------------------------------------------------------------------------! ! Call for grid point i,j !------------------------------------------------------------------------------! SUBROUTINE impact_of_latent_heat_ij( i, j ) USE arrays_3d USE cloud_parameters USE constants USE indices IMPLICIT NONE INTEGER :: i, j, k REAL :: dqdt_precip DO k = nzb_2d(j,i)+1, nzt IF ( ql(k,j,i) > ql_crit ) THEN dqdt_precip = prec_time_const * ( ql(k,j,i) - ql_crit ) ELSE dqdt_precip = 0.0 ENDIF tend(k,j,i) = tend(k,j,i) + dqdt_precip * l_d_cp * pt_d_t(k) ENDDO END SUBROUTINE impact_of_latent_heat_ij END MODULE impact_of_latent_heat_mod