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

Last change on this file since 1320 was 1320, checked in by raasch, 11 years ago

ONLY-attribute added to USE-statements,
kind-parameters added to all INTEGER and REAL declaration statements,
kinds are defined in new module kinds,
old module precision_kind is removed,
revision history before 2012 removed,
comment fields (!:) to be used for variable explanations added to all variable declaration statements

  • Property svn:keywords set to Id
File size: 3.8 KB
Line 
1 MODULE interaction_droplets_ptq_mod
2
3!--------------------------------------------------------------------------------!
4! This file is part of PALM.
5!
6! PALM is free software: you can redistribute it and/or modify it under the terms
7! of the GNU General Public License as published by the Free Software Foundation,
8! either version 3 of the License, or (at your option) any later version.
9!
10! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
11! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
13!
14! You should have received a copy of the GNU General Public License along with
15! PALM. If not, see <http://www.gnu.org/licenses/>.
16!
17! Copyright 1997-2014 Leibniz Universitaet Hannover
18!--------------------------------------------------------------------------------!
19!
20! Current revisions:
21! -----------------
22!
23!
24! Former revisions:
25! -----------------
26! $Id: interaction_droplets_ptq.f90 1320 2014-03-20 08:40:49Z raasch $
27!
28! 1036 2012-10-22 13:43:42Z raasch
29! code put under GPL (PALM 3.9)
30!
31! 799 2011-12-21 17:48:03Z franke
32! Bugfix: pt_d_t(k) was missing in calculation of pt_p
33!
34! RCS Log replace by Id keyword, revision history cleaned up
35!
36! Revision 1.1  2005/06/26 19:57:47  raasch
37! Initial revision
38!
39!
40! Description:
41! ------------
42! Release of latent heat and change of specific humidity due to condensation /
43! evaporation of droplets.
44!------------------------------------------------------------------------------!
45
46    PRIVATE
47    PUBLIC interaction_droplets_ptq
48
49    INTERFACE interaction_droplets_ptq
50       MODULE PROCEDURE interaction_droplets_ptq
51       MODULE PROCEDURE interaction_droplets_ptq_ij
52    END INTERFACE interaction_droplets_ptq
53 
54 CONTAINS
55
56
57!------------------------------------------------------------------------------!
58! Call for all grid points
59!------------------------------------------------------------------------------!
60    SUBROUTINE interaction_droplets_ptq
61
62       USE arrays_3d,                                                          &
63           ONLY:  pt_p, ql_c, q_p
64           
65       USE cloud_parameters,                                                   &
66           ONLY:  l_d_cp, pt_d_t
67           
68       USE indices,                                                            &
69           ONLY:  nxl, nxr, nyn, nys, nzb_2d, nzt
70           
71       USE kinds
72
73       USE pegrid
74
75       IMPLICIT NONE
76
77       INTEGER(iwp) ::  i !:
78       INTEGER(iwp) ::  j !:
79       INTEGER(iwp) ::  k !:
80
81 
82       DO  i = nxl, nxr
83          DO  j = nys, nyn
84             DO  k = nzb_2d(j,i)+1, nzt
85                q_p(k,j,i)  = q_p(k,j,i)  - ql_c(k,j,i)
86                pt_p(k,j,i) = pt_p(k,j,i) + l_d_cp * ql_c(k,j,i) * pt_d_t(k)
87             ENDDO
88          ENDDO
89       ENDDO
90
91    END SUBROUTINE interaction_droplets_ptq
92
93
94!------------------------------------------------------------------------------!
95! Call for grid point i,j
96!------------------------------------------------------------------------------!
97    SUBROUTINE interaction_droplets_ptq_ij( i, j )
98
99       USE arrays_3d,                                                          &
100           ONLY:  pt_p, ql_c, q_p
101
102       USE cloud_parameters,                                                   &
103           ONLY:  l_d_cp, pt_d_t
104
105       USE indices,                                                            &
106           ONLY:  nxl, nxr, nyn, nys, nzb_2d, nzt
107
108       USE kinds,                                                              &
109           ONLY:  iwp, wp
110
111       USE pegrid
112
113       IMPLICIT NONE
114
115       INTEGER(iwp) ::  i !:
116       INTEGER(iwp) ::  j !:
117       INTEGER(iwp) ::  k !:
118
119
120       DO  k = nzb_2d(j,i)+1, nzt
121          q_p(k,j,i)  = q_p(k,j,i)  - ql_c(k,j,i)
122          pt_p(k,j,i) = pt_p(k,j,i) + l_d_cp * ql_c(k,j,i) * pt_d_t(k)
123       ENDDO
124
125    END SUBROUTINE interaction_droplets_ptq_ij
126
127 END MODULE interaction_droplets_ptq_mod
Note: See TracBrowser for help on using the repository browser.