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

Last change on this file since 2000 was 2000, checked in by knoop, 5 years ago

Forced header and separation lines into 80 columns

  • Property svn:keywords set to Id
File size: 2.9 KB
RevLine 
[1682]1!> @file compute_vpt.f90
[2000]2!------------------------------------------------------------------------------!
[1036]3! This file is part of PALM.
4!
[2000]5! PALM is free software: you can redistribute it and/or modify it under the
6! terms of the GNU General Public License as published by the Free Software
7! Foundation, either version 3 of the License, or (at your option) any later
8! version.
[1036]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!
[1818]17! Copyright 1997-2016 Leibniz Universitaet Hannover
[2000]18!------------------------------------------------------------------------------!
[1036]19!
[484]20! Current revisions:
[1]21! -----------------
[2000]22! Forced header and separation lines into 80 columns
[1354]23!
[1321]24! Former revisions:
25! -----------------
26! $Id: compute_vpt.f90 2000 2016-08-20 18:09:15Z knoop $
27!
[1683]28! 1682 2015-10-07 23:56:08Z knoop
29! Code annotations made doxygen readable
30!
[1354]31! 1353 2014-04-08 15:21:23Z heinze
32! REAL constants provided with KIND-attribute
33!
[1321]34! 1320 2014-03-20 08:40:49Z raasch
[1320]35! ONLY-attribute added to USE-statements,
36! kind-parameters added to all INTEGER and REAL declaration statements,
37! kinds are defined in new module kinds,
38! revision history before 2012 removed,
39! comment fields (!:) to be used for variable explanations added to
40! all variable declaration statements
[1321]41!
[1037]42! 1036 2012-10-22 13:43:42Z raasch
43! code put under GPL (PALM 3.9)
44!
[804]45! 803 2012-01-16 15:48:46Z franke
46! Bugfix: wrong factor in calculation of vpt in case of cloud droplets
47!
[1]48! Revision 1.1  2000/04/13 14:40:53  schroeter
49! Initial revision
50!
51!
52! Description:
53! -------------
[1682]54!> Computation of the virtual potential temperature
[1320]55!------------------------------------------------------------------------------!
[1682]56 SUBROUTINE compute_vpt
57 
[1]58
[1320]59    USE arrays_3d,                                                             &
60        ONLY:  pt, q, ql, vpt
61       
62    USE indices,                                                               &
63        ONLY:  nzb, nzt
64       
65    USE cloud_parameters,                                                      &
66        ONLY:  l_d_cp, pt_d_t
67       
68    USE control_parameters,                                                    &
69        ONLY:  cloud_droplets, cloud_physics
70       
71    USE kinds
[1]72
73    IMPLICIT NONE
74
[1682]75    INTEGER(iwp) :: k   !<
[1]76
[1320]77    IF ( .NOT. cloud_physics  .AND.  .NOT. cloud_droplets )  THEN
[1353]78       vpt = pt * ( 1.0_wp + 0.61_wp * q )
[1320]79    ELSE IF (cloud_physics)  THEN
[1]80       DO  k = nzb, nzt+1
[1320]81          vpt(k,:,:) = ( pt(k,:,:) + pt_d_t(k) * l_d_cp * ql(k,:,:) ) *        &
[1353]82                       ( 1.0_wp + 0.61_wp * q(k,:,:) - 1.61_wp * ql(k,:,:) ) 
[1]83       ENDDO
[799]84    ELSE
[1353]85       vpt = pt * ( 1.0_wp + 0.61_wp * q - ql ) 
[1]86    ENDIF
87
88 END SUBROUTINE compute_vpt
Note: See TracBrowser for help on using the repository browser.