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

Last change on this file since 1188 was 1037, checked in by raasch, 12 years ago

last commit documented

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