source: palm/trunk/SOURCE/calc_liquid_water_content.f90 @ 1077

Last change on this file since 1077 was 1054, checked in by hoffmann, 11 years ago

last commit documented

  • Property svn:keywords set to Id
File size: 3.2 KB
Line 
1 SUBROUTINE calc_liquid_water_content
2
3!--------------------------------------------------------------------------------!
4! This file is part of PALM.
5!
6! PALM is free software: you can redistribute it and/or modify it under the terms
7! of the GNU General Public License as published by the Free Software Foundation,
8! either version 3 of the License, or (at your option) any later version.
9!
10! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
11! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
13!
14! You should have received a copy of the GNU General Public License along with
15! PALM. If not, see <http://www.gnu.org/licenses/>.
16!
17! Copyright 1997-2012  Leibniz University Hannover
18!--------------------------------------------------------------------------------!
19!
20! Current revisions:
21! -----------------
22!
23! Former revisions:
24! -----------------
25! $Id: calc_liquid_water_content.f90 1054 2012-11-13 17:30:09Z hoffmann $
26!
27! 1053 2012-11-13 17:11:03Z hoffmann
28! description expanded to the two-moment cloud scheme
29!
30! 1036 2012-10-22 13:43:42Z raasch
31! code put under GPL (PALM 3.9)
32!
33! 667 2010-12-23 12:06:00Z suehring/gyschka
34! nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng
35!
36! 95 2007-06-02 16:48:38Z raasch
37! hydro_press renamed hyp
38!
39! 19 2007-02-23 04:53:48Z raasch
40! Old comment removed
41!
42! RCS Log replace by Id keyword, revision history cleaned up
43!
44! Revision 1.5  2005/03/26 15:22:06  raasch
45! Arguments for non-cyclic boundary conditions added to argument list of
46! routine exchange_horiz,
47! ql calculated for the ghost points, exchange of ghost points removed
48!
49! Revision 1.1  2000/04/13 14:50:45  schroeter
50! Initial revision
51!
52!
53!
54! Description:
55! ------------
56! Calculation of the liquid water content (0%-or-100%-scheme). This scheme is
57! used by the one and the two moment cloud physics scheme. Using the two moment
58! scheme, this calculation results in the cloud water content.
59!------------------------------------------------------------------------------!
60
61
62    USE arrays_3d
63    USE cloud_parameters
64    USE constants
65    USE grid_variables
66    USE indices
67    USE pegrid
68
69    IMPLICIT NONE
70
71    INTEGER :: i, j, k
72
73    REAL :: alpha, e_s, q_s, t_l
74
75    DO  i = nxlg, nxrg
76       DO  j = nysg, nyng
77          DO  k = nzb_2d(j,i)+1, nzt
78
79!
80!--          Compute the liquid water temperature
81             t_l = t_d_pt(k) * pt(k,j,i)
82
83!
84!--          Compute saturation water vapor pressure at t_l
85             e_s = 610.78 * EXP( 17.269 * ( t_l - 273.16 ) / &
86                                          ( t_l - 35.86 ) )
87
88!
89!--          Compute approximation of saturation humidity
90             q_s = 0.622 * e_s / ( hyp(k) - 0.378 * e_s )
91
92!
93!--          Correction factor
94             alpha = 0.622 * l_d_r * l_d_cp / ( t_l * t_l )
95
96!
97!--          Correction of the approximated value
98!--          (see: Cuijpers + Duynkerke, 1993, JAS, 23)
99             q_s = q_s * ( 1.0 + alpha * q(k,j,i) ) / ( 1.0 + alpha * q_s )
100
101!
102!--          Compute the liquid water content
103             IF ( ( q(k,j,i) - q_s ) > 0.0 ) THEN
104                ql(k,j,i) = q(k,j,i) - q_s
105             ELSE
106                ql(k,j,i) = 0.0 
107             ENDIF
108
109          ENDDO
110       ENDDO
111    ENDDO
112   
113 END SUBROUTINE calc_liquid_water_content
Note: See TracBrowser for help on using the repository browser.