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

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

code has been put under the GNU General Public License (v3)

  • Property svn:keywords set to Id
File size: 2.1 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-2012  Leibniz University Hannover
18!--------------------------------------------------------------------------------!
19!
20! Current revisions:
21! -----------------
22!
23!
24! Former revisions:
25! -----------------
26! $Id: compute_vpt.f90 1036 2012-10-22 13:43:42Z raasch $
27!
28! 803 2012-01-16 15:48:46Z franke
29! Bugfix: wrong factor in calculation of vpt in case of cloud droplets
30!
31! 799 2011-12-21 17:48:03Z franke
32! Bugfix: ql is now included in calculation of vpt in case of
33!         cloud droplets
34!
35! RCS Log replace by Id keyword, revision history cleaned up
36!
37! Revision 1.5  2001/03/30 06:58:52  raasch
38! Translation of remaining German identifiers (variables, subroutines, etc.)
39!
40! Revision 1.1  2000/04/13 14:40:53  schroeter
41! Initial revision
42!
43!
44! Description:
45! -------------
46! Computation of the virtual potential temperature
47!-------------------------------------------------------------------------------!
48
49    USE arrays_3d
50    USE indices
51    USE cloud_parameters
52    USE control_parameters
53
54    IMPLICIT NONE
55
56    INTEGER :: k
57
58    IF ( .NOT. cloud_physics .AND. .NOT. cloud_droplets ) THEN
59       vpt = pt * ( 1.0 + 0.61 * q )
60    ELSE IF (cloud_physics) THEN
61       DO  k = nzb, nzt+1
62          vpt(k,:,:) = ( pt(k,:,:) + pt_d_t(k) * l_d_cp * ql(k,:,:) ) * &
63                       ( 1.0 + 0.61 * q(k,:,:) - 1.61 * ql(k,:,:) ) 
64       ENDDO
65    ELSE
66       vpt = pt * ( 1.0 + 0.61 * q - ql ) 
67    ENDIF
68
69 END SUBROUTINE compute_vpt
Note: See TracBrowser for help on using the repository browser.