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

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

last commit documented

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