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

Last change on this file since 1036 was 1036, checked in by raasch, 9 years ago

code has been put under the GNU General Public License (v3)

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