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