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

Last change on this file since 4598 was 4559, checked in by raasch, 11 months ago

files re-formatted to follow the PALM coding standard

  • Property svn:keywords set to Id
File size: 3.3 KB
Line 
1!> @file compute_vpt.f90
2!--------------------------------------------------------------------------------------------------!
3! This file is part of the PALM model system.
4!
5! PALM is free software: you can redistribute it and/or modify it under the terms of the GNU General
6! Public License as published by the Free Software Foundation, either version 3 of the License, or
7! (at your option) any later version.
8!
9! PALM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
10! implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
11! Public License for more details.
12!
13! You should have received a copy of the GNU General Public License along with PALM. If not, see
14! <http://www.gnu.org/licenses/>.
15!
16! Copyright 1997-2020 Leibniz Universitaet Hannover
17!--------------------------------------------------------------------------------------------------!
18!
19! Current revisions:
20! -----------------
21!
22!
23! Former revisions:
24! -----------------
25! $Id: compute_vpt.f90 4559 2020-06-11 08:51:48Z suehring $
26! file re-formatted to follow the PALM coding standard
27!
28! 4521 2020-05-06 11:39:49Z schwenkel
29! Rename variable
30!
31! 4502 2020-04-17 16:14:16Z schwenkel
32! Implementation of ice microphysics
33!
34! 4360 2020-01-07 11:25:50Z suehring
35! Corrected "Former revisions" section
36!
37! 3655 2019-01-07 16:51:22Z knoop
38! Modularization of all bulk cloud physics code components
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 SUBROUTINE compute_vpt
49 
50
51    USE arrays_3d,                                                                                 &
52        ONLY:  d_exner, pt, q, qi, ql, vpt
53
54    USE basic_constants_and_equations_mod,                                                         &
55        ONLY:  ls_d_cp, lv_d_cp
56
57    USE control_parameters,                                                                        &
58        ONLY:  cloud_droplets
59
60    USE indices,                                                                                   &
61        ONLY:  nzb, nzt
62
63    USE kinds
64
65    USE bulk_cloud_model_mod,                                                                      &
66        ONLY:  bulk_cloud_model, microphysics_ice_phase
67
68    IMPLICIT NONE
69
70    INTEGER(iwp) :: k   !<
71
72    IF ( .NOT. bulk_cloud_model  .AND.  .NOT. cloud_droplets )  THEN
73       vpt = pt * ( 1.0_wp + 0.61_wp * q )
74    ELSEIF ( bulk_cloud_model  .AND.  .NOT. microphysics_ice_phase )  THEN
75       DO  k = nzb, nzt+1
76              vpt(k,:,:) = ( pt(k,:,:) + d_exner(k) * lv_d_cp * ql(k,:,:) ) *                      &
77                           ( 1.0_wp + 0.61_wp * q(k,:,:) - 1.61_wp *  ql(k,:,:)  )
78       ENDDO
79    ELSEIF ( bulk_cloud_model  .AND.  microphysics_ice_phase )  THEN
80       DO  k = nzb, nzt+1
81          vpt(k,:,:) = ( pt(k,:,:) + d_exner(k) * lv_d_cp * ql(k,:,:)   +                          &
82                                     d_exner(k) * ls_d_cp * qi(k,:,:) ) *                          &
83                       ( 1.0_wp + 0.61_wp * q(k,:,:) - 1.61_wp * ( ql(k,:,:) + qi(k,:,:) ) )
84       ENDDO
85    ELSE
86       vpt = pt * ( 1.0_wp + 0.61_wp * q - ql ) 
87    ENDIF
88
89 END SUBROUTINE compute_vpt
Note: See TracBrowser for help on using the repository browser.