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 4182 2019-08-22 15:20:23Z gronemeier $ |
---|
27 | ! Corrected "Former revisions" section |
---|
28 | ! |
---|
29 | ! 3655 2019-01-07 16:51:22Z knoop |
---|
30 | ! Modularization of all bulk cloud physics code components |
---|
31 | ! |
---|
32 | ! Revision 1.1 2000/04/13 14:40:53 schroeter |
---|
33 | ! Initial revision |
---|
34 | ! |
---|
35 | ! |
---|
36 | ! Description: |
---|
37 | ! ------------- |
---|
38 | !> Computation of the virtual potential temperature |
---|
39 | !------------------------------------------------------------------------------! |
---|
40 | SUBROUTINE compute_vpt |
---|
41 | |
---|
42 | |
---|
43 | USE arrays_3d, & |
---|
44 | ONLY: pt, q, ql, vpt, d_exner |
---|
45 | |
---|
46 | USE basic_constants_and_equations_mod, & |
---|
47 | ONLY: lv_d_cp |
---|
48 | |
---|
49 | USE control_parameters, & |
---|
50 | ONLY: cloud_droplets |
---|
51 | |
---|
52 | USE indices, & |
---|
53 | ONLY: nzb, nzt |
---|
54 | |
---|
55 | USE kinds |
---|
56 | |
---|
57 | USE bulk_cloud_model_mod, & |
---|
58 | ONLY: bulk_cloud_model |
---|
59 | |
---|
60 | IMPLICIT NONE |
---|
61 | |
---|
62 | INTEGER(iwp) :: k !< |
---|
63 | |
---|
64 | IF ( .NOT. bulk_cloud_model .AND. .NOT. cloud_droplets ) THEN |
---|
65 | vpt = pt * ( 1.0_wp + 0.61_wp * q ) |
---|
66 | ELSE IF (bulk_cloud_model) THEN |
---|
67 | DO k = nzb, nzt+1 |
---|
68 | vpt(k,:,:) = ( pt(k,:,:) + d_exner(k) * lv_d_cp * ql(k,:,:) ) * & |
---|
69 | ( 1.0_wp + 0.61_wp * q(k,:,:) - 1.61_wp * ql(k,:,:) ) |
---|
70 | ENDDO |
---|
71 | ELSE |
---|
72 | vpt = pt * ( 1.0_wp + 0.61_wp * q - ql ) |
---|
73 | ENDIF |
---|
74 | |
---|
75 | END SUBROUTINE compute_vpt |
---|