SUBROUTINE calc_liquid_water_content !--------------------------------------------------------------------------------! ! 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: calc_liquid_water_content.f90 1037 2012-10-22 14:10:22Z hoffmann $ ! ! 1036 2012-10-22 13:43:42Z raasch ! code put under GPL (PALM 3.9) ! ! 667 2010-12-23 12:06:00Z suehring/gyschka ! nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng ! ! 95 2007-06-02 16:48:38Z raasch ! hydro_press renamed hyp ! ! 19 2007-02-23 04:53:48Z raasch ! Old comment removed ! ! RCS Log replace by Id keyword, revision history cleaned up ! ! Revision 1.5 2005/03/26 15:22:06 raasch ! Arguments for non-cyclic boundary conditions added to argument list of ! routine exchange_horiz, ! ql calculated for the ghost points, exchange of ghost points removed ! ! Revision 1.1 2000/04/13 14:50:45 schroeter ! Initial revision ! ! ! ! Description: ! ------------ ! Calculation of the liquid water content (0%-or-100%-scheme) !------------------------------------------------------------------------------! USE arrays_3d USE cloud_parameters USE constants USE grid_variables USE indices USE pegrid IMPLICIT NONE INTEGER :: i, j, k REAL :: alpha, e_s, q_s, t_l DO i = nxlg, nxrg DO j = nysg, nyng DO k = nzb_2d(j,i)+1, nzt ! !-- Compute the liquid water temperature t_l = t_d_pt(k) * pt(k,j,i) ! !-- Compute saturation water vapor pressure at t_l e_s = 610.78 * EXP( 17.269 * ( t_l - 273.16 ) / & ( t_l - 35.86 ) ) ! !-- Compute approximation of saturation humidity q_s = 0.622 * e_s / ( hyp(k) - 0.378 * e_s ) ! !-- Correction factor alpha = 0.622 * l_d_r * l_d_cp / ( t_l * t_l ) ! !-- Correction of the approximated value !-- (see: Cuijpers + Duynkerke, 1993, JAS, 23) q_s = q_s * ( 1.0 + alpha * q(k,j,i) ) / ( 1.0 + alpha * q_s ) ! !-- Compute the liquid water content IF ( ( q(k,j,i) - q_s ) > 0.0 ) THEN ql(k,j,i) = q(k,j,i) - q_s ELSE ql(k,j,i) = 0.0 ENDIF ENDDO ENDDO ENDDO END SUBROUTINE calc_liquid_water_content