source: palm/trunk/SOURCE/interaction_droplets_ptq.f90 @ 1927

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

last commit documented

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