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

Last change on this file since 1823 was 1823, checked in by hoffmann, 8 years ago

last commit documented

  • Property svn:keywords set to Id
File size: 4.7 KB
RevLine 
[1682]1!> @file calc_liquid_water_content.f90
[1036]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!
[1818]16! Copyright 1997-2016 Leibniz Universitaet Hannover
[1036]17!--------------------------------------------------------------------------------!
18!
[484]19! Current revisions:
[1]20! -----------------
[1823]21!
[1354]22!
[1321]23! Former revisions:
24! -----------------
25! $Id: calc_liquid_water_content.f90 1823 2016-04-07 08:57:52Z hoffmann $
26!
[1823]27! 1822 2016-04-07 07:49:42Z hoffmann
28! icloud_scheme removed. microphysics_seifert added.
29!
[1683]30! 1682 2015-10-07 23:56:08Z knoop
31! Code annotations made doxygen readable
32!
[1354]33! 1353 2014-04-08 15:21:23Z heinze
34! REAL constants provided with KIND-attribute
35!
[1321]36! 1320 2014-03-20 08:40:49Z raasch
[1320]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
[1]43!
[1254]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!
[1116]47! 1115 2013-03-26 18:16:16Z hoffmann
48! drizzle can be used independently from precipitation
49!
[1054]50! 1053 2012-11-13 17:11:03Z hoffmann
51! description expanded to the two-moment cloud scheme
52!
[1037]53! 1036 2012-10-22 13:43:42Z raasch
54! code put under GPL (PALM 3.9)
55!
[1]56! Revision 1.1  2000/04/13 14:50:45  schroeter
57! Initial revision
58!
59!
60!
61! Description:
62! ------------
[1682]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.
[1]66!------------------------------------------------------------------------------!
[1682]67 SUBROUTINE calc_liquid_water_content
68 
[1]69
70
[1320]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,                                                    &
[1822]78        ONLY:  microphysics_seifert
[1320]79
80    USE indices,                                                               &
81        ONLY:  nxlg, nxrg, nyng, nysg, nzb_s_inner, nzt
82
83    USE kinds
84
[1]85    USE pegrid
86
[1320]87
[1]88    IMPLICIT NONE
89
[1682]90    INTEGER(iwp) ::  i !<
91    INTEGER(iwp) ::  j !<
92    INTEGER(iwp) ::  k !<
[1]93
[1682]94    REAL(wp) ::  alpha !<
95    REAL(wp) ::  e_s   !<
96    REAL(wp) ::  q_s   !<
97    REAL(wp) ::  t_l   !<
[1]98
[667]99    DO  i = nxlg, nxrg
100       DO  j = nysg, nyng
[1115]101          DO  k = nzb_s_inner(j,i)+1, nzt
[1]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
[1353]109             e_s = 610.78_wp * EXP( 17.269_wp * ( t_l - 273.16_wp ) /          &
110                                                ( t_l - 35.86_wp ) )
[1]111
112!
113!--          Compute approximation of saturation humidity
[1353]114             q_s = 0.622_wp * e_s / ( hyp(k) - 0.378_wp * e_s )
[1]115
116!
117!--          Correction factor
[1353]118             alpha = 0.622_wp * l_d_r * l_d_cp / ( t_l * t_l )
[1]119
120!
121!--          Correction of the approximated value
122!--          (see: Cuijpers + Duynkerke, 1993, JAS, 23)
[1353]123             q_s = q_s * ( 1.0_wp + alpha * q(k,j,i) ) / ( 1.0_wp + alpha * q_s )
[1]124
125!
126!--          Compute the liquid water content
[1822]127             IF ( microphysics_seifert )  THEN
[1353]128                IF ( ( q(k,j,i) - q_s - qr(k,j,i) ) > 0.0_wp ) THEN
[1115]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
[1253]132                   IF ( q(k,j,i) < qr(k,j,i) )  q(k,j,i) = qr(k,j,i)
[1353]133                   qc(k,j,i) = 0.0_wp 
[1115]134                   ql(k,j,i) = qr(k,j,i)
135                ENDIF
[1822]136             ELSE
[1353]137                IF ( ( q(k,j,i) - q_s ) > 0.0_wp ) THEN
[1115]138                   qc(k,j,i) = q(k,j,i) - q_s
139                   ql(k,j,i) = qc(k,j,i)
140                ELSE
[1822]141                   qc(k,j,i) = 0.0_wp
[1353]142                   ql(k,j,i) = 0.0_wp
[1115]143                ENDIF
[1]144             ENDIF
145          ENDDO
146       ENDDO
147    ENDDO
148   
149 END SUBROUTINE calc_liquid_water_content
Note: See TracBrowser for help on using the repository browser.