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