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

Last change on this file since 1846 was 1846, checked in by raasch, 8 years ago

last commit documented

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