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

Last change on this file since 4901 was 4828, checked in by Giersch, 4 years ago

Copyright updated to year 2021, interface pmc_sort removed to accelarate the nesting code

  • Property svn:keywords set to Id
File size: 3.4 KB
RevLine 
[1682]1!> @file compute_vpt.f90
[4559]2!--------------------------------------------------------------------------------------------------!
[2696]3! This file is part of the PALM model system.
[1036]4!
[4559]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.
[1036]8!
[4559]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.
[1036]12!
[4559]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/>.
[1036]15!
[4828]16! Copyright 1997-2021 Leibniz Universitaet Hannover
[4559]17!--------------------------------------------------------------------------------------------------!
[1036]18!
[484]19! Current revisions:
[1]20! -----------------
[4742]21!
22!
[1321]23! Former revisions:
24! -----------------
25! $Id: compute_vpt.f90 4828 2021-01-05 11:21:41Z banzhafs $
[4742]26! Implement snow and graupel (bulk microphysics)
27!
28! 4559 2020-06-11 08:51:48Z raasch
[4559]29! file re-formatted to follow the PALM coding standard
30!
31! 4521 2020-05-06 11:39:49Z schwenkel
[4521]32! Rename variable
33!
34! 4502 2020-04-17 16:14:16Z schwenkel
[4502]35! Implementation of ice microphysics
36!
37! 4360 2020-01-07 11:25:50Z suehring
[4182]38! Corrected "Former revisions" section
39!
40! 3655 2019-01-07 16:51:22Z knoop
[3274]41! Modularization of all bulk cloud physics code components
[1321]42!
[4182]43! Revision 1.1  2000/04/13 14:40:53  schroeter
44! Initial revision
45!
46!
[1]47! Description:
48! -------------
[1682]49!> Computation of the virtual potential temperature
[4559]50!--------------------------------------------------------------------------------------------------!
[1682]51 SUBROUTINE compute_vpt
52 
[1]53
[4559]54    USE arrays_3d,                                                                                 &
[4742]55        ONLY:  d_exner, pt, q, qf, ql, vpt
[3274]56
[4559]57    USE basic_constants_and_equations_mod,                                                         &
58        ONLY:  ls_d_cp, lv_d_cp
[3274]59
[4559]60    USE control_parameters,                                                                        &
[3274]61        ONLY:  cloud_droplets
62
[4559]63    USE indices,                                                                                   &
[1320]64        ONLY:  nzb, nzt
[3274]65
[1320]66    USE kinds
[1]67
[4559]68    USE bulk_cloud_model_mod,                                                                      &
[4521]69        ONLY:  bulk_cloud_model, microphysics_ice_phase
[3274]70
[1]71    IMPLICIT NONE
72
[1682]73    INTEGER(iwp) :: k   !<
[1]74
[3274]75    IF ( .NOT. bulk_cloud_model  .AND.  .NOT. cloud_droplets )  THEN
[1353]76       vpt = pt * ( 1.0_wp + 0.61_wp * q )
[4521]77    ELSEIF ( bulk_cloud_model  .AND.  .NOT. microphysics_ice_phase )  THEN
[1]78       DO  k = nzb, nzt+1
[4559]79              vpt(k,:,:) = ( pt(k,:,:) + d_exner(k) * lv_d_cp * ql(k,:,:) ) *                      &
80                           ( 1.0_wp + 0.61_wp * q(k,:,:) - 1.61_wp *  ql(k,:,:)  )
[1]81       ENDDO
[4559]82    ELSEIF ( bulk_cloud_model  .AND.  microphysics_ice_phase )  THEN
[4502]83       DO  k = nzb, nzt+1
[4559]84          vpt(k,:,:) = ( pt(k,:,:) + d_exner(k) * lv_d_cp * ql(k,:,:)   +                          &
[4742]85                                     d_exner(k) * ls_d_cp * qf(k,:,:) ) *                          &
86                       ( 1.0_wp + 0.61_wp * q(k,:,:) - 1.61_wp * ( ql(k,:,:) + qf(k,:,:) ) )
[4502]87       ENDDO
[799]88    ELSE
[1353]89       vpt = pt * ( 1.0_wp + 0.61_wp * q - ql ) 
[1]90    ENDIF
91
[4742]92 END SUBROUTINE compute_vpt
Note: See TracBrowser for help on using the repository browser.