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

Last change on this file since 1850 was 1850, checked in by maronga, 6 years ago

added _mod string to several filenames to meet the naming convection for modules

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