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

Last change on this file since 4515 was 4502, checked in by schwenkel, 5 years ago

Implementation of ice microphysics

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