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
RevLine 
[1682]1!> @file impact_of_latent_heat.f90
[1036]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!
[1310]16! Copyright 1997-2014 Leibniz Universitaet Hannover
[1036]17!--------------------------------------------------------------------------------!
18!
[484]19! Current revisions:
[1]20! -----------------
[1682]21! Code annotations made doxygen readable
[1354]22!
[1321]23! Former revisions:
24! -----------------
25! $Id: impact_of_latent_heat.f90 1682 2015-10-07 23:56:08Z knoop $
26!
[1354]27! 1353 2014-04-08 15:21:23Z heinze
28! REAL constants provided with KIND-attribute
29!
[1321]30! 1320 2014-03-20 08:40:49Z raasch
[1320]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
[1321]37!
[1037]38! 1036 2012-10-22 13:43:42Z raasch
39! code put under GPL (PALM 3.9)
40!
[1]41! Revision 1.1  2000/04/13 14:48:40  schroeter
42! Initial revision
43!
44!
45! Description:
46! ------------
[1682]47!> Calculate the impact of latent heat due to precipitation
48!> (simplified Kessler scheme)
[1]49!------------------------------------------------------------------------------!
[1682]50 MODULE impact_of_latent_heat_mod
51 
[1]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!------------------------------------------------------------------------------!
[1682]65! Description:
66! ------------
67!> Call for all grid points
[1]68!------------------------------------------------------------------------------!
69    SUBROUTINE impact_of_latent_heat
70
[1320]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
[1]81
82       IMPLICIT NONE
83
[1682]84       INTEGER(iwp) ::  i  !<
85       INTEGER(iwp) ::  j  !<
86       INTEGER(iwp) ::  k  !<
[1320]87       
[1682]88       REAL(wp) ::  dqdt_precip  !<
[1]89
90 
91       DO  i = nxl, nxr
92          DO  j = nys, nyn
[19]93             DO  k = nzb_2d(j,i)+1, nzt
[1]94
95                IF ( ql(k,j,i) > ql_crit )  THEN
[72]96                   dqdt_precip = prec_time_const * ( ql(k,j,i) - ql_crit )
[1]97                ELSE
[1353]98                   dqdt_precip = 0.0_wp
[1]99                ENDIF
[72]100                tend(k,j,i) = tend(k,j,i) + dqdt_precip * l_d_cp * pt_d_t(k)
[1]101
102             ENDDO
103          ENDDO
104       ENDDO
105
106    END SUBROUTINE impact_of_latent_heat
107
108
109!------------------------------------------------------------------------------!
[1682]110! Description:
111! ------------
112!> Call for grid point i,j
[1]113!------------------------------------------------------------------------------!
114    SUBROUTINE impact_of_latent_heat_ij( i, j )
115
[1320]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                                                               
[1]126   
127       IMPLICIT NONE
128
[1682]129       INTEGER(iwp) ::  i  !<
130       INTEGER(iwp) ::  j  !<
131       INTEGER(iwp) ::  k  !<
[1320]132       
[1682]133       REAL(wp) ::  dqdt_precip  !<
[1]134
135
[19]136       DO  k = nzb_2d(j,i)+1, nzt
[1]137
138          IF ( ql(k,j,i) > ql_crit )  THEN
[72]139             dqdt_precip = prec_time_const * ( ql(k,j,i) - ql_crit )
[1]140          ELSE
[1353]141             dqdt_precip = 0.0_wp
[1]142          ENDIF
[72]143          tend(k,j,i) = tend(k,j,i) + dqdt_precip * l_d_cp * pt_d_t(k)
[1]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.