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

Last change on this file since 2834 was 2718, checked in by maronga, 7 years ago

deleting of deprecated files; headers updated where needed

  • Property svn:keywords set to Id
File size: 5.8 KB
RevLine 
[1873]1!> @file interaction_droplets_ptq.f90
[2000]2!------------------------------------------------------------------------------!
[2696]3! This file is part of the PALM model system.
[1036]4!
[2000]5! PALM is free software: you can redistribute it and/or modify it under the
6! terms of the GNU General Public License as published by the Free Software
7! Foundation, either version 3 of the License, or (at your option) any later
8! version.
[1036]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!
[2718]17! Copyright 1997-2018 Leibniz Universitaet Hannover
[2000]18!------------------------------------------------------------------------------!
[1036]19!
[484]20! Current revisions:
[1]21! -----------------
[1846]22!
[2233]23!
[1]24! Former revisions:
25! -----------------
[3]26! $Id: interaction_droplets_ptq.f90 2718 2018-01-02 08:49:38Z raasch $
[2716]27! Corrected "Former revisions" section
28!
29! 2696 2017-12-14 17:12:51Z kanani
30! Change in file header (GPL part)
[800]31!
[2716]32! 2233 2017-05-30 18:08:54Z suehring
33!
[2233]34! 2232 2017-05-30 17:47:52Z suehring
35! Adjustments to new topography concept
36!
[2001]37! 2000 2016-08-20 18:09:15Z knoop
38! Forced header and separation lines into 80 columns
39!
[1874]40! 1873 2016-04-18 14:50:06Z maronga
41! Module renamed (removed _mod)
42!
43!
[1851]44! 1850 2016-04-08 13:29:27Z maronga
45! Module renamed
46!
47!
[1846]48! 1845 2016-04-08 08:29:13Z raasch
49! nzb_2d replaced by nzb_s_inner
50!
[1823]51! 1822 2016-04-07 07:49:42Z hoffmann
52! Unused variables removed.
53!
[1780]54! 1779 2016-03-03 08:01:28Z raasch
55! bugfix: module procedure names shortened to avoid Intel compiler warnings
56! about too long names
57!
[1683]58! 1682 2015-10-07 23:56:08Z knoop
59! Code annotations made doxygen readable
60!
[1321]61! 1320 2014-03-20 08:40:49Z raasch
62! ONLY-attribute added to USE-statements,
63! kind-parameters added to all INTEGER and REAL declaration statements,
64! kinds are defined in new module kinds,
65! revision history before 2012 removed,
66! comment fields (!:) to be used for variable explanations added to
67! all variable declaration statements
68!
[1037]69! 1036 2012-10-22 13:43:42Z raasch
70! code put under GPL (PALM 3.9)
71!
[800]72! 799 2011-12-21 17:48:03Z franke
73! Bugfix: pt_d_t(k) was missing in calculation of pt_p
74!
[3]75! RCS Log replace by Id keyword, revision history cleaned up
76!
[1]77! Revision 1.1  2005/06/26 19:57:47  raasch
78! Initial revision
79!
80!
81! Description:
82! ------------
[1682]83!> Release of latent heat and change of specific humidity due to condensation /
84!> evaporation of droplets.
[1]85!------------------------------------------------------------------------------!
[1682]86 MODULE interaction_droplets_ptq_mod
87 
[1]88
89    PRIVATE
90    PUBLIC interaction_droplets_ptq
91
92    INTERFACE interaction_droplets_ptq
[1779]93!
94!--    Internal names shortened in order ro avoid Intel compiler messages
95!--    about too long names
96       MODULE PROCEDURE i_droplets_ptq
97       MODULE PROCEDURE i_droplets_ptq_ij
[1]98    END INTERFACE interaction_droplets_ptq
99 
100 CONTAINS
101
102
103!------------------------------------------------------------------------------!
[1682]104! Description:
105! ------------
106!> Call for all grid points
[1]107!------------------------------------------------------------------------------!
[1779]108    SUBROUTINE i_droplets_ptq
[1]109
[1320]110       USE arrays_3d,                                                          &
111           ONLY:  pt_p, ql_c, q_p
112           
113       USE cloud_parameters,                                                   &
114           ONLY:  l_d_cp, pt_d_t
115           
116       USE indices,                                                            &
[2232]117           ONLY:  nxl, nxr, nyn, nys, nzb, nzt, wall_flags_0
[1320]118           
119       USE kinds
[1]120
121       USE pegrid
122
123       IMPLICIT NONE
124
[2232]125       INTEGER(iwp) ::  i    !< running index x direction
126       INTEGER(iwp) ::  j    !< running index y direction
127       INTEGER(iwp) ::  k    !< running index z direction
[1]128
[2232]129       REAL(wp) ::  flag     !< flag to mask topography grid points
[1]130 
131       DO  i = nxl, nxr
132          DO  j = nys, nyn
[2232]133             DO  k = nzb+1, nzt
134!
135!--             Predetermine flag to mask topography
136                flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
137
138                q_p(k,j,i)  = q_p(k,j,i)  - ql_c(k,j,i) * flag
139                pt_p(k,j,i) = pt_p(k,j,i) + l_d_cp * ql_c(k,j,i) * pt_d_t(k)   &
140                                                        * flag
[1]141             ENDDO
142          ENDDO
143       ENDDO
144
[1779]145    END SUBROUTINE i_droplets_ptq
[1]146
147
148!------------------------------------------------------------------------------!
[1682]149! Description:
150! ------------
151!> Call for grid point i,j
[1]152!------------------------------------------------------------------------------!
[1779]153    SUBROUTINE i_droplets_ptq_ij( i, j )
[1]154
[1320]155       USE arrays_3d,                                                          &
156           ONLY:  pt_p, ql_c, q_p
[1]157
[1320]158       USE cloud_parameters,                                                   &
159           ONLY:  l_d_cp, pt_d_t
160
161       USE indices,                                                            &
[2232]162           ONLY:  nzb, nzt, wall_flags_0
[1320]163
164       USE kinds,                                                              &
165           ONLY:  iwp, wp
166
[1]167       USE pegrid
168
169       IMPLICIT NONE
170
[2232]171       INTEGER(iwp) ::  i    !< running index x direction
172       INTEGER(iwp) ::  j    !< running index y direction
173       INTEGER(iwp) ::  k    !< running index z direction
[1]174
[2232]175       REAL(wp) ::  flag     !< flag to mask topography grid points
[1]176
[2232]177
178       DO  k = nzb+1, nzt
179!
180!--       Predetermine flag to mask topography
181          flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
182
183          q_p(k,j,i)  = q_p(k,j,i)  - ql_c(k,j,i) * flag
184          pt_p(k,j,i) = pt_p(k,j,i) + l_d_cp * ql_c(k,j,i) * pt_d_t(k) * flag
[1]185       ENDDO
186
[1779]187    END SUBROUTINE i_droplets_ptq_ij
[1]188
189 END MODULE interaction_droplets_ptq_mod
Note: See TracBrowser for help on using the repository browser.