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

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

last commit documented

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