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

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

last commit documented

  • Property svn:keywords set to Id
File size: 4.3 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!
[1310]17! Copyright 1997-2014 Leibniz Universitaet Hannover
[1036]18!--------------------------------------------------------------------------------!
19!
[484]20! Current revisions:
[1]21! -----------------
[1321]22!
23!
24! Former revisions:
25! -----------------
26! $Id: impact_of_latent_heat.f90 1321 2014-03-20 09:40:40Z maronga $
27!
28! 1320 2014-03-20 08:40:49Z raasch
[1320]29! ONLY-attribute added to USE-statements,
30! kind-parameters added to all INTEGER and REAL declaration statements,
31! kinds are defined in new module kinds,
32! revision history before 2012 removed,
33! comment fields (!:) to be used for variable explanations added to
34! all variable declaration statements
[1321]35!
[1037]36! 1036 2012-10-22 13:43:42Z raasch
37! code put under GPL (PALM 3.9)
38!
[1]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
[1320]65       USE arrays_3d,                                                          &
66           ONLY:  ql, tend
67           
68       USE cloud_parameters,                                                   &
69           ONLY:  l_d_cp, prec_time_const, pt_d_t, ql_crit
70           
71       USE indices,                                                            &
72           ONLY:  nxl, nxr, nyn, nys, nzb_2d, nzt
73           
74       USE kinds
[1]75
76       IMPLICIT NONE
77
[1320]78       INTEGER(iwp) ::  i  !:
79       INTEGER(iwp) ::  j  !:
80       INTEGER(iwp) ::  k  !:
81       
82       REAL(wp) ::  dqdt_precip  !:
[1]83
84 
85       DO  i = nxl, nxr
86          DO  j = nys, nyn
[19]87             DO  k = nzb_2d(j,i)+1, nzt
[1]88
89                IF ( ql(k,j,i) > ql_crit )  THEN
[72]90                   dqdt_precip = prec_time_const * ( ql(k,j,i) - ql_crit )
[1]91                ELSE
[72]92                   dqdt_precip = 0.0
[1]93                ENDIF
[72]94                tend(k,j,i) = tend(k,j,i) + dqdt_precip * l_d_cp * pt_d_t(k)
[1]95
96             ENDDO
97          ENDDO
98       ENDDO
99
100    END SUBROUTINE impact_of_latent_heat
101
102
103!------------------------------------------------------------------------------!
104! Call for grid point i,j
105!------------------------------------------------------------------------------!
106    SUBROUTINE impact_of_latent_heat_ij( i, j )
107
[1320]108       USE arrays_3d,                                                          &
109           ONLY:  ql, tend
110           
111       USE cloud_parameters,                                                   &
112           ONLY:  l_d_cp, prec_time_const, pt_d_t, ql_crit
113           
114       USE indices,                                                            &
115           ONLY:  nzb_2d, nzt
116           
117       USE kinds                                                               
[1]118   
119       IMPLICIT NONE
120
[1320]121       INTEGER(iwp) ::  i  !:
122       INTEGER(iwp) ::  j  !:
123       INTEGER(iwp) ::  k  !:
124       
125       REAL(wp) ::  dqdt_precip  !:
[1]126
127
[19]128       DO  k = nzb_2d(j,i)+1, nzt
[1]129
130          IF ( ql(k,j,i) > ql_crit )  THEN
[72]131             dqdt_precip = prec_time_const * ( ql(k,j,i) - ql_crit )
[1]132          ELSE
[72]133             dqdt_precip = 0.0
[1]134          ENDIF
[72]135          tend(k,j,i) = tend(k,j,i) + dqdt_precip * l_d_cp * pt_d_t(k)
[1]136
137       ENDDO
138
139    END SUBROUTINE impact_of_latent_heat_ij
140
141 END MODULE impact_of_latent_heat_mod
Note: See TracBrowser for help on using the repository browser.