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-2020 Leibniz Universitaet Hannover |
---|
18 | !------------------------------------------------------------------------------! |
---|
19 | ! |
---|
20 | ! Current revisions: |
---|
21 | ! ----------------- |
---|
22 | ! |
---|
23 | ! |
---|
24 | ! Former revisions: |
---|
25 | ! ----------------- |
---|
26 | ! $Id: compute_vpt.f90 4521 2020-05-06 11:39:49Z schwenkel $ |
---|
27 | ! Rename variable |
---|
28 | ! |
---|
29 | ! 4502 2020-04-17 16:14:16Z schwenkel |
---|
30 | ! Implementation of ice microphysics |
---|
31 | ! |
---|
32 | ! 4360 2020-01-07 11:25:50Z suehring |
---|
33 | ! Corrected "Former revisions" section |
---|
34 | ! |
---|
35 | ! 3655 2019-01-07 16:51:22Z knoop |
---|
36 | ! Modularization of all bulk cloud physics code components |
---|
37 | ! |
---|
38 | ! Revision 1.1 2000/04/13 14:40:53 schroeter |
---|
39 | ! Initial revision |
---|
40 | ! |
---|
41 | ! |
---|
42 | ! Description: |
---|
43 | ! ------------- |
---|
44 | !> Computation of the virtual potential temperature |
---|
45 | !------------------------------------------------------------------------------! |
---|
46 | SUBROUTINE compute_vpt |
---|
47 | |
---|
48 | |
---|
49 | USE arrays_3d, & |
---|
50 | ONLY: pt, q, ql, vpt, d_exner, qi |
---|
51 | |
---|
52 | USE basic_constants_and_equations_mod, & |
---|
53 | ONLY: lv_d_cp, ls_d_cp |
---|
54 | |
---|
55 | USE control_parameters, & |
---|
56 | ONLY: cloud_droplets |
---|
57 | |
---|
58 | USE indices, & |
---|
59 | ONLY: nzb, nzt |
---|
60 | |
---|
61 | USE kinds |
---|
62 | |
---|
63 | USE bulk_cloud_model_mod, & |
---|
64 | ONLY: bulk_cloud_model, microphysics_ice_phase |
---|
65 | |
---|
66 | IMPLICIT NONE |
---|
67 | |
---|
68 | INTEGER(iwp) :: k !< |
---|
69 | |
---|
70 | IF ( .NOT. bulk_cloud_model .AND. .NOT. cloud_droplets ) THEN |
---|
71 | vpt = pt * ( 1.0_wp + 0.61_wp * q ) |
---|
72 | ELSEIF ( bulk_cloud_model .AND. .NOT. microphysics_ice_phase ) THEN |
---|
73 | DO k = nzb, nzt+1 |
---|
74 | vpt(k,:,:) = ( pt(k,:,:) + d_exner(k) * lv_d_cp * ql(k,:,:) ) * & |
---|
75 | ( 1.0_wp + 0.61_wp * q(k,:,:) - 1.61_wp * ql(k,:,:) ) |
---|
76 | ENDDO |
---|
77 | ELSEIF ( bulk_cloud_model .AND. microphysics_ice_phase ) THEN |
---|
78 | DO k = nzb, nzt+1 |
---|
79 | vpt(k,:,:) = ( pt(k,:,:) + d_exner(k) * lv_d_cp * ql(k,:,:) + & |
---|
80 | d_exner(k) * ls_d_cp * qi(k,:,:) ) * & |
---|
81 | ( 1.0_wp + 0.61_wp * q(k,:,:) - 1.61_wp * & |
---|
82 | ( ql(k,:,:) + qi(k,:,:) ) ) |
---|
83 | ENDDO |
---|
84 | ELSE |
---|
85 | vpt = pt * ( 1.0_wp + 0.61_wp * q - ql ) |
---|
86 | ENDIF |
---|
87 | |
---|
88 | END SUBROUTINE compute_vpt |
---|