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

Last change on this file since 1320 was 1320, checked in by raasch, 7 years ago

ONLY-attribute added to USE-statements,
kind-parameters added to all INTEGER and REAL declaration statements,
kinds are defined in new module kinds,
old module precision_kind is removed,
revision history before 2012 removed,
comment fields (!:) to be used for variable explanations added to all variable declaration statements

  • Property svn:keywords set to Id
File size: 2.6 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!
[1310]17! Copyright 1997-2014 Leibniz Universitaet Hannover
[1036]18!--------------------------------------------------------------------------------!
19!
[484]20! Current revisions:
[1]21! -----------------
[1320]22! ONLY-attribute added to USE-statements,
23! kind-parameters added to all INTEGER and REAL declaration statements,
24! kinds are defined in new module kinds,
25! old module precision_kind is removed,
26! revision history before 2012 removed,
27! comment fields (!:) to be used for variable explanations added to
28! all variable declaration statements
[1]29!
30! Former revisions:
31! -----------------
[3]32! $Id: compute_vpt.f90 1320 2014-03-20 08:40:49Z raasch $
[800]33!
[1037]34! 1036 2012-10-22 13:43:42Z raasch
35! code put under GPL (PALM 3.9)
36!
[804]37! 803 2012-01-16 15:48:46Z franke
38! Bugfix: wrong factor in calculation of vpt in case of cloud droplets
39!
[1]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
[1320]47!------------------------------------------------------------------------------!
[1]48
[1320]49    USE arrays_3d,                                                             &
50        ONLY:  pt, q, ql, vpt
51       
52    USE indices,                                                               &
53        ONLY:  nzb, nzt
54       
55    USE cloud_parameters,                                                      &
56        ONLY:  l_d_cp, pt_d_t
57       
58    USE control_parameters,                                                    &
59        ONLY:  cloud_droplets, cloud_physics
60       
61    USE kinds
[1]62
63    IMPLICIT NONE
64
[1320]65    INTEGER(iwp) :: k   !:
[1]66
[1320]67    IF ( .NOT. cloud_physics  .AND.  .NOT. cloud_droplets )  THEN
[1]68       vpt = pt * ( 1.0 + 0.61 * q )
[1320]69    ELSE IF (cloud_physics)  THEN
[1]70       DO  k = nzb, nzt+1
[1320]71          vpt(k,:,:) = ( pt(k,:,:) + pt_d_t(k) * l_d_cp * ql(k,:,:) ) *        &
[1]72                       ( 1.0 + 0.61 * q(k,:,:) - 1.61 * ql(k,:,:) ) 
73       ENDDO
[799]74    ELSE
[803]75       vpt = pt * ( 1.0 + 0.61 * q - ql ) 
[1]76    ENDIF
77
78 END SUBROUTINE compute_vpt
Note: See TracBrowser for help on using the repository browser.