1 | !> @file interaction_droplets_ptq.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-2014 Leibniz Universitaet Hannover |
---|
17 | !--------------------------------------------------------------------------------! |
---|
18 | ! |
---|
19 | ! Current revisions: |
---|
20 | ! ----------------- |
---|
21 | ! |
---|
22 | ! |
---|
23 | ! Former revisions: |
---|
24 | ! ----------------- |
---|
25 | ! $Id: interaction_droplets_ptq.f90 1780 2016-03-03 08:39:40Z knoop $ |
---|
26 | ! |
---|
27 | ! 1779 2016-03-03 08:01:28Z raasch |
---|
28 | ! bugfix: module procedure names shortened to avoid Intel compiler warnings |
---|
29 | ! about too long names |
---|
30 | ! |
---|
31 | ! 1682 2015-10-07 23:56:08Z knoop |
---|
32 | ! Code annotations made doxygen readable |
---|
33 | ! |
---|
34 | ! 1320 2014-03-20 08:40:49Z raasch |
---|
35 | ! ONLY-attribute added to USE-statements, |
---|
36 | ! kind-parameters added to all INTEGER and REAL declaration statements, |
---|
37 | ! kinds are defined in new module kinds, |
---|
38 | ! revision history before 2012 removed, |
---|
39 | ! comment fields (!:) to be used for variable explanations added to |
---|
40 | ! all variable declaration statements |
---|
41 | ! |
---|
42 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
43 | ! code put under GPL (PALM 3.9) |
---|
44 | ! |
---|
45 | ! 799 2011-12-21 17:48:03Z franke |
---|
46 | ! Bugfix: pt_d_t(k) was missing in calculation of pt_p |
---|
47 | ! |
---|
48 | ! RCS Log replace by Id keyword, revision history cleaned up |
---|
49 | ! |
---|
50 | ! Revision 1.1 2005/06/26 19:57:47 raasch |
---|
51 | ! Initial revision |
---|
52 | ! |
---|
53 | ! |
---|
54 | ! Description: |
---|
55 | ! ------------ |
---|
56 | !> Release of latent heat and change of specific humidity due to condensation / |
---|
57 | !> evaporation of droplets. |
---|
58 | !------------------------------------------------------------------------------! |
---|
59 | MODULE interaction_droplets_ptq_mod |
---|
60 | |
---|
61 | |
---|
62 | PRIVATE |
---|
63 | PUBLIC interaction_droplets_ptq |
---|
64 | |
---|
65 | INTERFACE interaction_droplets_ptq |
---|
66 | ! |
---|
67 | !-- Internal names shortened in order ro avoid Intel compiler messages |
---|
68 | !-- about too long names |
---|
69 | MODULE PROCEDURE i_droplets_ptq |
---|
70 | MODULE PROCEDURE i_droplets_ptq_ij |
---|
71 | END INTERFACE interaction_droplets_ptq |
---|
72 | |
---|
73 | CONTAINS |
---|
74 | |
---|
75 | |
---|
76 | !------------------------------------------------------------------------------! |
---|
77 | ! Description: |
---|
78 | ! ------------ |
---|
79 | !> Call for all grid points |
---|
80 | !------------------------------------------------------------------------------! |
---|
81 | SUBROUTINE i_droplets_ptq |
---|
82 | |
---|
83 | USE arrays_3d, & |
---|
84 | ONLY: pt_p, ql_c, q_p |
---|
85 | |
---|
86 | USE cloud_parameters, & |
---|
87 | ONLY: l_d_cp, pt_d_t |
---|
88 | |
---|
89 | USE indices, & |
---|
90 | ONLY: nxl, nxr, nyn, nys, nzb_2d, nzt |
---|
91 | |
---|
92 | USE kinds |
---|
93 | |
---|
94 | USE pegrid |
---|
95 | |
---|
96 | IMPLICIT NONE |
---|
97 | |
---|
98 | INTEGER(iwp) :: i !< |
---|
99 | INTEGER(iwp) :: j !< |
---|
100 | INTEGER(iwp) :: k !< |
---|
101 | |
---|
102 | |
---|
103 | DO i = nxl, nxr |
---|
104 | DO j = nys, nyn |
---|
105 | DO k = nzb_2d(j,i)+1, nzt |
---|
106 | q_p(k,j,i) = q_p(k,j,i) - ql_c(k,j,i) |
---|
107 | pt_p(k,j,i) = pt_p(k,j,i) + l_d_cp * ql_c(k,j,i) * pt_d_t(k) |
---|
108 | ENDDO |
---|
109 | ENDDO |
---|
110 | ENDDO |
---|
111 | |
---|
112 | END SUBROUTINE i_droplets_ptq |
---|
113 | |
---|
114 | |
---|
115 | !------------------------------------------------------------------------------! |
---|
116 | ! Description: |
---|
117 | ! ------------ |
---|
118 | !> Call for grid point i,j |
---|
119 | !------------------------------------------------------------------------------! |
---|
120 | SUBROUTINE i_droplets_ptq_ij( i, j ) |
---|
121 | |
---|
122 | USE arrays_3d, & |
---|
123 | ONLY: pt_p, ql_c, q_p |
---|
124 | |
---|
125 | USE cloud_parameters, & |
---|
126 | ONLY: l_d_cp, pt_d_t |
---|
127 | |
---|
128 | USE indices, & |
---|
129 | ONLY: nxl, nxr, nyn, nys, nzb_2d, nzt |
---|
130 | |
---|
131 | USE kinds, & |
---|
132 | ONLY: iwp, wp |
---|
133 | |
---|
134 | USE pegrid |
---|
135 | |
---|
136 | IMPLICIT NONE |
---|
137 | |
---|
138 | INTEGER(iwp) :: i !< |
---|
139 | INTEGER(iwp) :: j !< |
---|
140 | INTEGER(iwp) :: k !< |
---|
141 | |
---|
142 | |
---|
143 | DO k = nzb_2d(j,i)+1, nzt |
---|
144 | q_p(k,j,i) = q_p(k,j,i) - ql_c(k,j,i) |
---|
145 | pt_p(k,j,i) = pt_p(k,j,i) + l_d_cp * ql_c(k,j,i) * pt_d_t(k) |
---|
146 | ENDDO |
---|
147 | |
---|
148 | END SUBROUTINE i_droplets_ptq_ij |
---|
149 | |
---|
150 | END MODULE interaction_droplets_ptq_mod |
---|