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

Last change on this file since 2000 was 2000, checked in by knoop, 8 years ago

Forced header and separation lines into 80 columns

  • Property svn:keywords set to Id
File size: 4.7 KB
Line 
1!> @file calc_liquid_water_content.f90
2!------------------------------------------------------------------------------!
3! This file is part of PALM.
4!
5! PALM is free software: you can redistribute it and/or modify it under the
6! terms of the GNU General Public License as published by the Free Software
7! Foundation, either version 3 of the License, or (at your option) any later
8! 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-2016 Leibniz Universitaet Hannover
18!------------------------------------------------------------------------------!
19!
20! Current revisions:
21! -----------------
22! Forced header and separation lines into 80 columns
23!
24! Former revisions:
25! -----------------
26! $Id: calc_liquid_water_content.f90 2000 2016-08-20 18:09:15Z knoop $
27!
28! 1822 2016-04-07 07:49:42Z hoffmann
29! icloud_scheme removed. microphysics_seifert added.
30!
31! 1682 2015-10-07 23:56:08Z knoop
32! Code annotations made doxygen readable
33!
34! 1353 2014-04-08 15:21:23Z heinze
35! REAL constants provided with KIND-attribute
36!
37! 1320 2014-03-20 08:40:49Z raasch
38! ONLY-attribute added to USE-statements,
39! kind-parameters added to all INTEGER and REAL declaration statements,
40! kinds are defined in new module kinds,
41! revision history before 2012 removed,
42! comment fields (!:) to be used for variable explanations added to
43! all variable declaration statements
44!
45! 1253 2013-11-07 10:48:12Z fricke
46! Bugfix: q is set to qr in case that q is smaller than qr
47!
48! 1115 2013-03-26 18:16:16Z hoffmann
49! drizzle can be used independently from precipitation
50!
51! 1053 2012-11-13 17:11:03Z hoffmann
52! description expanded to the two-moment cloud scheme
53!
54! 1036 2012-10-22 13:43:42Z raasch
55! code put under GPL (PALM 3.9)
56!
57! Revision 1.1  2000/04/13 14:50:45  schroeter
58! Initial revision
59!
60!
61!
62! Description:
63! ------------
64!> Calculation of the liquid water content (0%-or-100%-scheme). This scheme is
65!> used by the one and the two moment cloud physics scheme. Using the two moment
66!> scheme, this calculation results in the cloud water content.
67!------------------------------------------------------------------------------!
68 SUBROUTINE calc_liquid_water_content
69 
70
71
72    USE arrays_3d,                                                             &
73        ONLY:  hyp, pt, q, qc, ql, qr
74
75    USE cloud_parameters,                                                      &
76        ONLY:  l_d_cp, l_d_r, t_d_pt
77
78    USE control_parameters,                                                    &
79        ONLY:  microphysics_seifert
80
81    USE indices,                                                               &
82        ONLY:  nxlg, nxrg, nyng, nysg, nzb_s_inner, nzt
83
84    USE kinds
85
86    USE pegrid
87
88
89    IMPLICIT NONE
90
91    INTEGER(iwp) ::  i !<
92    INTEGER(iwp) ::  j !<
93    INTEGER(iwp) ::  k !<
94
95    REAL(wp) ::  alpha !<
96    REAL(wp) ::  e_s   !<
97    REAL(wp) ::  q_s   !<
98    REAL(wp) ::  t_l   !<
99
100    DO  i = nxlg, nxrg
101       DO  j = nysg, nyng
102          DO  k = nzb_s_inner(j,i)+1, nzt
103
104!
105!--          Compute the liquid water temperature
106             t_l = t_d_pt(k) * pt(k,j,i)
107
108!
109!--          Compute saturation water vapor pressure at t_l
110             e_s = 610.78_wp * EXP( 17.269_wp * ( t_l - 273.16_wp ) /          &
111                                                ( t_l - 35.86_wp ) )
112
113!
114!--          Compute approximation of saturation humidity
115             q_s = 0.622_wp * e_s / ( hyp(k) - 0.378_wp * e_s )
116
117!
118!--          Correction factor
119             alpha = 0.622_wp * l_d_r * l_d_cp / ( t_l * t_l )
120
121!
122!--          Correction of the approximated value
123!--          (see: Cuijpers + Duynkerke, 1993, JAS, 23)
124             q_s = q_s * ( 1.0_wp + alpha * q(k,j,i) ) / ( 1.0_wp + alpha * q_s )
125
126!
127!--          Compute the liquid water content
128             IF ( microphysics_seifert )  THEN
129                IF ( ( q(k,j,i) - q_s - qr(k,j,i) ) > 0.0_wp ) THEN
130                   qc(k,j,i) = q(k,j,i) - q_s - qr(k,j,i)
131                   ql(k,j,i) = qc(k,j,i) + qr(k,j,i)
132                ELSE
133                   IF ( q(k,j,i) < qr(k,j,i) )  q(k,j,i) = qr(k,j,i)
134                   qc(k,j,i) = 0.0_wp 
135                   ql(k,j,i) = qr(k,j,i)
136                ENDIF
137             ELSE
138                IF ( ( q(k,j,i) - q_s ) > 0.0_wp ) THEN
139                   qc(k,j,i) = q(k,j,i) - q_s
140                   ql(k,j,i) = qc(k,j,i)
141                ELSE
142                   qc(k,j,i) = 0.0_wp
143                   ql(k,j,i) = 0.0_wp
144                ENDIF
145             ENDIF
146          ENDDO
147       ENDDO
148    ENDDO
149   
150 END SUBROUTINE calc_liquid_water_content
Note: See TracBrowser for help on using the repository browser.