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

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

last commit documented

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