source: palm/trunk/SOURCE/interaction_droplets_ptq_mod.f90 @ 1851

Last change on this file since 1851 was 1851, checked in by maronga, 9 years ago

last commit documented

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