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

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

last commit documented

  • Property svn:keywords set to Id
File size: 3.4 KB
RevLine 
[1]1 MODULE impact_of_latent_heat_mod
2
[1036]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!
[484]20! Current revisions:
[1]21! -----------------
[77]22!
[1]23!
24! Former revisions:
25! -----------------
[3]26! $Id: impact_of_latent_heat.f90 1037 2012-10-22 14:10:22Z maronga $
[39]27!
[1037]28! 1036 2012-10-22 13:43:42Z raasch
29! code put under GPL (PALM 3.9)
30!
[77]31! 72 2007-03-19 08:20:46Z
32! precipitation_rate renamed dqdt_precip
33!
[39]34! 19 2007-02-23 04:53:48Z raasch
[77]35! Calculation extended for gridpoint nzt
[39]36!
[3]37! RCS Log replace by Id keyword, revision history cleaned up
38!
[1]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
[72]76       REAL    ::  dqdt_precip
[1]77
78 
79       DO  i = nxl, nxr
80          DO  j = nys, nyn
[19]81             DO  k = nzb_2d(j,i)+1, nzt
[1]82
83                IF ( ql(k,j,i) > ql_crit )  THEN
[72]84                   dqdt_precip = prec_time_const * ( ql(k,j,i) - ql_crit )
[1]85                ELSE
[72]86                   dqdt_precip = 0.0
[1]87                ENDIF
[72]88                tend(k,j,i) = tend(k,j,i) + dqdt_precip * l_d_cp * pt_d_t(k)
[1]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
[72]109       INTEGER ::  i, j, k
110       REAL    ::  dqdt_precip
[1]111
112
[19]113       DO  k = nzb_2d(j,i)+1, nzt
[1]114
115          IF ( ql(k,j,i) > ql_crit )  THEN
[72]116             dqdt_precip = prec_time_const * ( ql(k,j,i) - ql_crit )
[1]117          ELSE
[72]118             dqdt_precip = 0.0
[1]119          ENDIF
[72]120          tend(k,j,i) = tend(k,j,i) + dqdt_precip * l_d_cp * pt_d_t(k)
[1]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.