source: palm/trunk/SOURCE/compute_vpt.f90 @ 1330

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

last commit documented

  • Property svn:keywords set to Id
File size: 2.6 KB
Line 
1 SUBROUTINE compute_vpt
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-2014 Leibniz Universitaet Hannover
18!--------------------------------------------------------------------------------!
19!
20! Current revisions:
21! -----------------
22!
23!
24! Former revisions:
25! -----------------
26! $Id: compute_vpt.f90 1321 2014-03-20 09:40:40Z suehring $
27!
28! 1320 2014-03-20 08:40:49Z raasch
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
35!
36! 1036 2012-10-22 13:43:42Z raasch
37! code put under GPL (PALM 3.9)
38!
39! 803 2012-01-16 15:48:46Z franke
40! Bugfix: wrong factor in calculation of vpt in case of cloud droplets
41!
42! Revision 1.1  2000/04/13 14:40:53  schroeter
43! Initial revision
44!
45!
46! Description:
47! -------------
48! Computation of the virtual potential temperature
49!------------------------------------------------------------------------------!
50
51    USE arrays_3d,                                                             &
52        ONLY:  pt, q, ql, vpt
53       
54    USE indices,                                                               &
55        ONLY:  nzb, nzt
56       
57    USE cloud_parameters,                                                      &
58        ONLY:  l_d_cp, pt_d_t
59       
60    USE control_parameters,                                                    &
61        ONLY:  cloud_droplets, cloud_physics
62       
63    USE kinds
64
65    IMPLICIT NONE
66
67    INTEGER(iwp) :: k   !:
68
69    IF ( .NOT. cloud_physics  .AND.  .NOT. cloud_droplets )  THEN
70       vpt = pt * ( 1.0 + 0.61 * q )
71    ELSE IF (cloud_physics)  THEN
72       DO  k = nzb, nzt+1
73          vpt(k,:,:) = ( pt(k,:,:) + pt_d_t(k) * l_d_cp * ql(k,:,:) ) *        &
74                       ( 1.0 + 0.61 * q(k,:,:) - 1.61 * ql(k,:,:) ) 
75       ENDDO
76    ELSE
77       vpt = pt * ( 1.0 + 0.61 * q - ql ) 
78    ENDIF
79
80 END SUBROUTINE compute_vpt
Note: See TracBrowser for help on using the repository browser.