MODULE impact_of_latent_heat_mod !--------------------------------------------------------------------------------! ! This file is part of PALM. ! ! PALM is free software: you can redistribute it and/or modify it under the terms ! of the GNU General Public License as published by the Free Software Foundation, ! either version 3 of the License, or (at your option) any later version. ! ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY ! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR ! A PARTICULAR PURPOSE. See the GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License along with ! PALM. If not, see . ! ! Copyright 1997-2012 Leibniz University Hannover !--------------------------------------------------------------------------------! ! ! Current revisions: ! ----------------- ! ! ! Former revisions: ! ----------------- ! $Id: impact_of_latent_heat.f90 1037 2012-10-22 14:10:22Z witha $ ! ! 1036 2012-10-22 13:43:42Z raasch ! code put under GPL (PALM 3.9) ! ! 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