[1] | 1 | SUBROUTINE compute_vpt |
---|
| 2 | |
---|
[1036] | 3 | !--------------------------------------------------------------------------------! |
---|
| 4 | ! This file is part of PALM. |
---|
| 5 | ! |
---|
| 6 | ! PALM is free software: you can redistribute it and/or modify it under the terms |
---|
| 7 | ! of the GNU General Public License as published by the Free Software Foundation, |
---|
| 8 | ! either version 3 of the License, or (at your option) any later 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 | ! |
---|
[1310] | 17 | ! Copyright 1997-2014 Leibniz Universitaet Hannover |
---|
[1036] | 18 | !--------------------------------------------------------------------------------! |
---|
| 19 | ! |
---|
[484] | 20 | ! Current revisions: |
---|
[1] | 21 | ! ----------------- |
---|
[1354] | 22 | ! |
---|
| 23 | ! |
---|
[1321] | 24 | ! Former revisions: |
---|
| 25 | ! ----------------- |
---|
| 26 | ! $Id: compute_vpt.f90 1354 2014-04-08 15:22:57Z gronemeier $ |
---|
| 27 | ! |
---|
[1354] | 28 | ! 1353 2014-04-08 15:21:23Z heinze |
---|
| 29 | ! REAL constants provided with KIND-attribute |
---|
| 30 | ! |
---|
[1321] | 31 | ! 1320 2014-03-20 08:40:49Z raasch |
---|
[1320] | 32 | ! ONLY-attribute added to USE-statements, |
---|
| 33 | ! kind-parameters added to all INTEGER and REAL declaration statements, |
---|
| 34 | ! kinds are defined in new module kinds, |
---|
| 35 | ! revision history before 2012 removed, |
---|
| 36 | ! comment fields (!:) to be used for variable explanations added to |
---|
| 37 | ! all variable declaration statements |
---|
[1321] | 38 | ! |
---|
[1037] | 39 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
| 40 | ! code put under GPL (PALM 3.9) |
---|
| 41 | ! |
---|
[804] | 42 | ! 803 2012-01-16 15:48:46Z franke |
---|
| 43 | ! Bugfix: wrong factor in calculation of vpt in case of cloud droplets |
---|
| 44 | ! |
---|
[1] | 45 | ! Revision 1.1 2000/04/13 14:40:53 schroeter |
---|
| 46 | ! Initial revision |
---|
| 47 | ! |
---|
| 48 | ! |
---|
| 49 | ! Description: |
---|
| 50 | ! ------------- |
---|
| 51 | ! Computation of the virtual potential temperature |
---|
[1320] | 52 | !------------------------------------------------------------------------------! |
---|
[1] | 53 | |
---|
[1320] | 54 | USE arrays_3d, & |
---|
| 55 | ONLY: pt, q, ql, vpt |
---|
| 56 | |
---|
| 57 | USE indices, & |
---|
| 58 | ONLY: nzb, nzt |
---|
| 59 | |
---|
| 60 | USE cloud_parameters, & |
---|
| 61 | ONLY: l_d_cp, pt_d_t |
---|
| 62 | |
---|
| 63 | USE control_parameters, & |
---|
| 64 | ONLY: cloud_droplets, cloud_physics |
---|
| 65 | |
---|
| 66 | USE kinds |
---|
[1] | 67 | |
---|
| 68 | IMPLICIT NONE |
---|
| 69 | |
---|
[1320] | 70 | INTEGER(iwp) :: k !: |
---|
[1] | 71 | |
---|
[1320] | 72 | IF ( .NOT. cloud_physics .AND. .NOT. cloud_droplets ) THEN |
---|
[1353] | 73 | vpt = pt * ( 1.0_wp + 0.61_wp * q ) |
---|
[1320] | 74 | ELSE IF (cloud_physics) THEN |
---|
[1] | 75 | DO k = nzb, nzt+1 |
---|
[1320] | 76 | vpt(k,:,:) = ( pt(k,:,:) + pt_d_t(k) * l_d_cp * ql(k,:,:) ) * & |
---|
[1353] | 77 | ( 1.0_wp + 0.61_wp * q(k,:,:) - 1.61_wp * ql(k,:,:) ) |
---|
[1] | 78 | ENDDO |
---|
[799] | 79 | ELSE |
---|
[1353] | 80 | vpt = pt * ( 1.0_wp + 0.61_wp * q - ql ) |
---|
[1] | 81 | ENDIF |
---|
| 82 | |
---|
| 83 | END SUBROUTINE compute_vpt |
---|