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 |
---|
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. |
---|
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-2019 Leibniz Universitaet Hannover |
---|
18 | !------------------------------------------------------------------------------! |
---|
19 | ! |
---|
20 | ! Current revisions: |
---|
21 | ! ----------------- |
---|
22 | ! |
---|
23 | ! |
---|
24 | ! Former revisions: |
---|
25 | ! ----------------- |
---|
26 | ! $Id: compute_vpt.f90 4180 2019-08-21 14:37:54Z scharf $ |
---|
27 | ! Modularization of all bulk cloud physics code components |
---|
28 | ! |
---|
29 | ! |
---|
30 | ! Description: |
---|
31 | ! ------------- |
---|
32 | !> Computation of the virtual potential temperature |
---|
33 | !------------------------------------------------------------------------------! |
---|
34 | SUBROUTINE compute_vpt |
---|
35 | |
---|
36 | |
---|
37 | USE arrays_3d, & |
---|
38 | ONLY: pt, q, ql, vpt, d_exner |
---|
39 | |
---|
40 | USE basic_constants_and_equations_mod, & |
---|
41 | ONLY: lv_d_cp |
---|
42 | |
---|
43 | USE control_parameters, & |
---|
44 | ONLY: cloud_droplets |
---|
45 | |
---|
46 | USE indices, & |
---|
47 | ONLY: nzb, nzt |
---|
48 | |
---|
49 | USE kinds |
---|
50 | |
---|
51 | USE bulk_cloud_model_mod, & |
---|
52 | ONLY: bulk_cloud_model |
---|
53 | |
---|
54 | IMPLICIT NONE |
---|
55 | |
---|
56 | INTEGER(iwp) :: k !< |
---|
57 | |
---|
58 | IF ( .NOT. bulk_cloud_model .AND. .NOT. cloud_droplets ) THEN |
---|
59 | vpt = pt * ( 1.0_wp + 0.61_wp * q ) |
---|
60 | ELSE IF (bulk_cloud_model) THEN |
---|
61 | DO k = nzb, nzt+1 |
---|
62 | vpt(k,:,:) = ( pt(k,:,:) + d_exner(k) * lv_d_cp * ql(k,:,:) ) * & |
---|
63 | ( 1.0_wp + 0.61_wp * q(k,:,:) - 1.61_wp * ql(k,:,:) ) |
---|
64 | ENDDO |
---|
65 | ELSE |
---|
66 | vpt = pt * ( 1.0_wp + 0.61_wp * q - ql ) |
---|
67 | ENDIF |
---|
68 | |
---|
69 | END SUBROUTINE compute_vpt |
---|