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

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

pmc array management changed from linked list to sequential loop; further small changes and cosmetics for the pmc

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