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

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

code has been put under the GNU General Public License (v3)

  • Property svn:keywords set to Id
File size: 3.4 KB
Line 
1 MODULE impact_of_latent_heat_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-2012  Leibniz University Hannover
18!--------------------------------------------------------------------------------!
19!
20! Current revisions:
21! -----------------
22!
23!
24! Former revisions:
25! -----------------
26! $Id: impact_of_latent_heat.f90 1036 2012-10-22 13:43:42Z raasch $
27!
28! 72 2007-03-19 08:20:46Z
29! precipitation_rate renamed dqdt_precip
30!
31! 19 2007-02-23 04:53:48Z raasch
32! Calculation extended for gridpoint nzt
33!
34! RCS Log replace by Id keyword, revision history cleaned up
35!
36! Revision 1.5  2004/01/30 10:25:59  raasch
37! Scalar lower k index nzb replaced by 2d-array nzb_2d
38!
39! Revision 1.1  2000/04/13 14:48:40  schroeter
40! Initial revision
41!
42!
43! Description:
44! ------------
45! Calculate the impact of latent heat due to precipitation
46! (simplified Kessler scheme)
47!------------------------------------------------------------------------------!
48
49    PRIVATE
50    PUBLIC impact_of_latent_heat
51
52    INTERFACE impact_of_latent_heat
53       MODULE PROCEDURE impact_of_latent_heat
54       MODULE PROCEDURE impact_of_latent_heat_ij
55    END INTERFACE impact_of_latent_heat
56 
57 CONTAINS
58
59
60!------------------------------------------------------------------------------!
61! Call for all grid points
62!------------------------------------------------------------------------------!
63    SUBROUTINE impact_of_latent_heat
64
65       USE arrays_3d
66       USE cloud_parameters
67       USE constants
68       USE indices
69
70       IMPLICIT NONE
71
72       INTEGER ::  i, j, k
73       REAL    ::  dqdt_precip
74
75 
76       DO  i = nxl, nxr
77          DO  j = nys, nyn
78             DO  k = nzb_2d(j,i)+1, nzt
79
80                IF ( ql(k,j,i) > ql_crit )  THEN
81                   dqdt_precip = prec_time_const * ( ql(k,j,i) - ql_crit )
82                ELSE
83                   dqdt_precip = 0.0
84                ENDIF
85                tend(k,j,i) = tend(k,j,i) + dqdt_precip * l_d_cp * pt_d_t(k)
86
87             ENDDO
88          ENDDO
89       ENDDO
90
91    END SUBROUTINE impact_of_latent_heat
92
93
94!------------------------------------------------------------------------------!
95! Call for grid point i,j
96!------------------------------------------------------------------------------!
97    SUBROUTINE impact_of_latent_heat_ij( i, j )
98
99       USE arrays_3d
100       USE cloud_parameters
101       USE constants
102       USE indices
103   
104       IMPLICIT NONE
105
106       INTEGER ::  i, j, k
107       REAL    ::  dqdt_precip
108
109
110       DO  k = nzb_2d(j,i)+1, nzt
111
112          IF ( ql(k,j,i) > ql_crit )  THEN
113             dqdt_precip = prec_time_const * ( ql(k,j,i) - ql_crit )
114          ELSE
115             dqdt_precip = 0.0
116          ENDIF
117          tend(k,j,i) = tend(k,j,i) + dqdt_precip * l_d_cp * pt_d_t(k)
118
119       ENDDO
120
121    END SUBROUTINE impact_of_latent_heat_ij
122
123 END MODULE impact_of_latent_heat_mod
Note: See TracBrowser for help on using the repository browser.