1 | MODULE impact_of_latent_heat_mod |
---|
2 | |
---|
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 | ! |
---|
17 | ! Copyright 1997-2014 Leibniz Universitaet Hannover |
---|
18 | !--------------------------------------------------------------------------------! |
---|
19 | ! |
---|
20 | ! Current revisions: |
---|
21 | ! ----------------- |
---|
22 | ! |
---|
23 | ! |
---|
24 | ! Former revisions: |
---|
25 | ! ----------------- |
---|
26 | ! $Id: impact_of_latent_heat.f90 1321 2014-03-20 09:40:40Z heinze $ |
---|
27 | ! |
---|
28 | ! 1320 2014-03-20 08:40:49Z raasch |
---|
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 |
---|
35 | ! |
---|
36 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
37 | ! code put under GPL (PALM 3.9) |
---|
38 | ! |
---|
39 | ! Revision 1.1 2000/04/13 14:48:40 schroeter |
---|
40 | ! Initial revision |
---|
41 | ! |
---|
42 | ! |
---|
43 | ! Description: |
---|
44 | ! ------------ |
---|
45 | ! Calculate the impact of latent heat due to precipitation |
---|
46 | ! (simplified Kessler scheme) |
---|
47 | !------------------------------------------------------------------------------! |
---|
48 | |
---|
49 | PRIVATE |
---|
50 | PUBLIC impact_of_latent_heat |
---|
51 | |
---|
52 | INTERFACE impact_of_latent_heat |
---|
53 | MODULE PROCEDURE impact_of_latent_heat |
---|
54 | MODULE PROCEDURE impact_of_latent_heat_ij |
---|
55 | END INTERFACE impact_of_latent_heat |
---|
56 | |
---|
57 | CONTAINS |
---|
58 | |
---|
59 | |
---|
60 | !------------------------------------------------------------------------------! |
---|
61 | ! Call for all grid points |
---|
62 | !------------------------------------------------------------------------------! |
---|
63 | SUBROUTINE impact_of_latent_heat |
---|
64 | |
---|
65 | USE arrays_3d, & |
---|
66 | ONLY: ql, tend |
---|
67 | |
---|
68 | USE cloud_parameters, & |
---|
69 | ONLY: l_d_cp, prec_time_const, pt_d_t, ql_crit |
---|
70 | |
---|
71 | USE indices, & |
---|
72 | ONLY: nxl, nxr, nyn, nys, nzb_2d, nzt |
---|
73 | |
---|
74 | USE kinds |
---|
75 | |
---|
76 | IMPLICIT NONE |
---|
77 | |
---|
78 | INTEGER(iwp) :: i !: |
---|
79 | INTEGER(iwp) :: j !: |
---|
80 | INTEGER(iwp) :: k !: |
---|
81 | |
---|
82 | REAL(wp) :: dqdt_precip !: |
---|
83 | |
---|
84 | |
---|
85 | DO i = nxl, nxr |
---|
86 | DO j = nys, nyn |
---|
87 | DO k = nzb_2d(j,i)+1, nzt |
---|
88 | |
---|
89 | IF ( ql(k,j,i) > ql_crit ) THEN |
---|
90 | dqdt_precip = prec_time_const * ( ql(k,j,i) - ql_crit ) |
---|
91 | ELSE |
---|
92 | dqdt_precip = 0.0 |
---|
93 | ENDIF |
---|
94 | tend(k,j,i) = tend(k,j,i) + dqdt_precip * l_d_cp * pt_d_t(k) |
---|
95 | |
---|
96 | ENDDO |
---|
97 | ENDDO |
---|
98 | ENDDO |
---|
99 | |
---|
100 | END SUBROUTINE impact_of_latent_heat |
---|
101 | |
---|
102 | |
---|
103 | !------------------------------------------------------------------------------! |
---|
104 | ! Call for grid point i,j |
---|
105 | !------------------------------------------------------------------------------! |
---|
106 | SUBROUTINE impact_of_latent_heat_ij( i, j ) |
---|
107 | |
---|
108 | USE arrays_3d, & |
---|
109 | ONLY: ql, tend |
---|
110 | |
---|
111 | USE cloud_parameters, & |
---|
112 | ONLY: l_d_cp, prec_time_const, pt_d_t, ql_crit |
---|
113 | |
---|
114 | USE indices, & |
---|
115 | ONLY: nzb_2d, nzt |
---|
116 | |
---|
117 | USE kinds |
---|
118 | |
---|
119 | IMPLICIT NONE |
---|
120 | |
---|
121 | INTEGER(iwp) :: i !: |
---|
122 | INTEGER(iwp) :: j !: |
---|
123 | INTEGER(iwp) :: k !: |
---|
124 | |
---|
125 | REAL(wp) :: dqdt_precip !: |
---|
126 | |
---|
127 | |
---|
128 | DO k = nzb_2d(j,i)+1, nzt |
---|
129 | |
---|
130 | IF ( ql(k,j,i) > ql_crit ) THEN |
---|
131 | dqdt_precip = prec_time_const * ( ql(k,j,i) - ql_crit ) |
---|
132 | ELSE |
---|
133 | dqdt_precip = 0.0 |
---|
134 | ENDIF |
---|
135 | tend(k,j,i) = tend(k,j,i) + dqdt_precip * l_d_cp * pt_d_t(k) |
---|
136 | |
---|
137 | ENDDO |
---|
138 | |
---|
139 | END SUBROUTINE impact_of_latent_heat_ij |
---|
140 | |
---|
141 | END MODULE impact_of_latent_heat_mod |
---|