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

Last change on this file since 1053 was 1053, checked in by hoffmann, 9 years ago

two-moment cloud physics implemented

  • 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! description expanded to the two-moment cloud scheme
23!
24! Former revisions:
25! -----------------
26! $Id: calc_liquid_water_content.f90 1053 2012-11-13 17:11:03Z hoffmann $
27!
28! 1036 2012-10-22 13:43:42Z raasch
29! code put under GPL (PALM 3.9)
30!
31! 667 2010-12-23 12:06:00Z suehring/gyschka
32! nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng
33!
34! 95 2007-06-02 16:48:38Z raasch
35! hydro_press renamed hyp
36!
37! 19 2007-02-23 04:53:48Z raasch
38! Old comment removed
39!
40! RCS Log replace by Id keyword, revision history cleaned up
41!
42! Revision 1.5  2005/03/26 15:22:06  raasch
43! Arguments for non-cyclic boundary conditions added to argument list of
44! routine exchange_horiz,
45! ql calculated for the ghost points, exchange of ghost points removed
46!
47! Revision 1.1  2000/04/13 14:50:45  schroeter
48! Initial revision
49!
50!
51!
52! Description:
53! ------------
54! Calculation of the liquid water content (0%-or-100%-scheme). This scheme is
55! used by the one and the two moment cloud physics scheme. Using the two moment
56! scheme, this calculation results in the cloud water content.
57!------------------------------------------------------------------------------!
58
59
60    USE arrays_3d
61    USE cloud_parameters
62    USE constants
63    USE grid_variables
64    USE indices
65    USE pegrid
66
67    IMPLICIT NONE
68
69    INTEGER :: i, j, k
70
71    REAL :: alpha, e_s, q_s, t_l
72
73    DO  i = nxlg, nxrg
74       DO  j = nysg, nyng
75          DO  k = nzb_2d(j,i)+1, nzt
76
77!
78!--          Compute the liquid water temperature
79             t_l = t_d_pt(k) * pt(k,j,i)
80
81!
82!--          Compute saturation water vapor pressure at t_l
83             e_s = 610.78 * EXP( 17.269 * ( t_l - 273.16 ) / &
84                                          ( t_l - 35.86 ) )
85
86!
87!--          Compute approximation of saturation humidity
88             q_s = 0.622 * e_s / ( hyp(k) - 0.378 * e_s )
89
90!
91!--          Correction factor
92             alpha = 0.622 * l_d_r * l_d_cp / ( t_l * t_l )
93
94!
95!--          Correction of the approximated value
96!--          (see: Cuijpers + Duynkerke, 1993, JAS, 23)
97             q_s = q_s * ( 1.0 + alpha * q(k,j,i) ) / ( 1.0 + alpha * q_s )
98
99!
100!--          Compute the liquid water content
101             IF ( ( q(k,j,i) - q_s ) > 0.0 ) THEN
102                ql(k,j,i) = q(k,j,i) - q_s
103             ELSE
104                ql(k,j,i) = 0.0 
105             ENDIF
106
107          ENDDO
108       ENDDO
109    ENDDO
110   
111 END SUBROUTINE calc_liquid_water_content
Note: See TracBrowser for help on using the repository browser.