source: palm/trunk/SOURCE/impact_of_latent_heat.f90 @ 1682

Last change on this file since 1682 was 1682, checked in by knoop, 9 years ago

Code annotations made doxygen readable

  • Property svn:keywords set to Id
File size: 4.6 KB
Line 
1!> @file impact_of_latent_heat.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! Code annotations made doxygen readable
22!
23! Former revisions:
24! -----------------
25! $Id: impact_of_latent_heat.f90 1682 2015-10-07 23:56:08Z knoop $
26!
27! 1353 2014-04-08 15:21:23Z heinze
28! REAL constants provided with KIND-attribute
29!
30! 1320 2014-03-20 08:40:49Z raasch
31! ONLY-attribute added to USE-statements,
32! kind-parameters added to all INTEGER and REAL declaration statements,
33! kinds are defined in new module kinds,
34! revision history before 2012 removed,
35! comment fields (!:) to be used for variable explanations added to
36! all variable declaration statements
37!
38! 1036 2012-10-22 13:43:42Z raasch
39! code put under GPL (PALM 3.9)
40!
41! Revision 1.1  2000/04/13 14:48:40  schroeter
42! Initial revision
43!
44!
45! Description:
46! ------------
47!> Calculate the impact of latent heat due to precipitation
48!> (simplified Kessler scheme)
49!------------------------------------------------------------------------------!
50 MODULE impact_of_latent_heat_mod
51 
52
53    PRIVATE
54    PUBLIC impact_of_latent_heat
55
56    INTERFACE impact_of_latent_heat
57       MODULE PROCEDURE impact_of_latent_heat
58       MODULE PROCEDURE impact_of_latent_heat_ij
59    END INTERFACE impact_of_latent_heat
60 
61 CONTAINS
62
63
64!------------------------------------------------------------------------------!
65! Description:
66! ------------
67!> Call for all grid points
68!------------------------------------------------------------------------------!
69    SUBROUTINE impact_of_latent_heat
70
71       USE arrays_3d,                                                          &
72           ONLY:  ql, tend
73           
74       USE cloud_parameters,                                                   &
75           ONLY:  l_d_cp, prec_time_const, pt_d_t, ql_crit
76           
77       USE indices,                                                            &
78           ONLY:  nxl, nxr, nyn, nys, nzb_2d, nzt
79           
80       USE kinds
81
82       IMPLICIT NONE
83
84       INTEGER(iwp) ::  i  !<
85       INTEGER(iwp) ::  j  !<
86       INTEGER(iwp) ::  k  !<
87       
88       REAL(wp) ::  dqdt_precip  !<
89
90 
91       DO  i = nxl, nxr
92          DO  j = nys, nyn
93             DO  k = nzb_2d(j,i)+1, nzt
94
95                IF ( ql(k,j,i) > ql_crit )  THEN
96                   dqdt_precip = prec_time_const * ( ql(k,j,i) - ql_crit )
97                ELSE
98                   dqdt_precip = 0.0_wp
99                ENDIF
100                tend(k,j,i) = tend(k,j,i) + dqdt_precip * l_d_cp * pt_d_t(k)
101
102             ENDDO
103          ENDDO
104       ENDDO
105
106    END SUBROUTINE impact_of_latent_heat
107
108
109!------------------------------------------------------------------------------!
110! Description:
111! ------------
112!> Call for grid point i,j
113!------------------------------------------------------------------------------!
114    SUBROUTINE impact_of_latent_heat_ij( i, j )
115
116       USE arrays_3d,                                                          &
117           ONLY:  ql, tend
118           
119       USE cloud_parameters,                                                   &
120           ONLY:  l_d_cp, prec_time_const, pt_d_t, ql_crit
121           
122       USE indices,                                                            &
123           ONLY:  nzb_2d, nzt
124           
125       USE kinds                                                               
126   
127       IMPLICIT NONE
128
129       INTEGER(iwp) ::  i  !<
130       INTEGER(iwp) ::  j  !<
131       INTEGER(iwp) ::  k  !<
132       
133       REAL(wp) ::  dqdt_precip  !<
134
135
136       DO  k = nzb_2d(j,i)+1, nzt
137
138          IF ( ql(k,j,i) > ql_crit )  THEN
139             dqdt_precip = prec_time_const * ( ql(k,j,i) - ql_crit )
140          ELSE
141             dqdt_precip = 0.0_wp
142          ENDIF
143          tend(k,j,i) = tend(k,j,i) + dqdt_precip * l_d_cp * pt_d_t(k)
144
145       ENDDO
146
147    END SUBROUTINE impact_of_latent_heat_ij
148
149 END MODULE impact_of_latent_heat_mod
Note: See TracBrowser for help on using the repository browser.