[1] | 1 | MODULE calc_precipitation_mod |
---|
| 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 | ! |
---|
| 17 | ! Copyright 1997-2012 Leibniz University Hannover |
---|
| 18 | !--------------------------------------------------------------------------------! |
---|
| 19 | ! |
---|
[484] | 20 | ! Current revisions: |
---|
[1] | 21 | ! ----------------- |
---|
[482] | 22 | ! |
---|
[1] | 23 | ! |
---|
| 24 | ! Former revisions: |
---|
| 25 | ! ----------------- |
---|
[667] | 26 | ! $Id: calc_precipitation.f90 484 2010-02-05 07:36:54Z raasch |
---|
[39] | 27 | ! |
---|
[482] | 28 | ! 403 2009-10-22 13:57:16Z franke |
---|
| 29 | ! Bugfix in calculation of precipitation_rate(j,i) |
---|
| 30 | ! |
---|
[77] | 31 | ! 73 2007-03-20 08:33:14Z raasch |
---|
| 32 | ! Precipitation rate and amount are calculated/stored, |
---|
| 33 | ! + module control_parameters |
---|
| 34 | ! |
---|
[39] | 35 | ! 19 2007-02-23 04:53:48Z raasch |
---|
| 36 | ! Calculation extended for gridpoint nzt |
---|
| 37 | ! |
---|
[3] | 38 | ! RCS Log replace by Id keyword, revision history cleaned up |
---|
| 39 | ! |
---|
[1] | 40 | ! Revision 1.5 2004/01/30 10:15:57 raasch |
---|
| 41 | ! Scalar lower k index nzb replaced by 2d-array nzb_2d |
---|
| 42 | ! |
---|
| 43 | ! Revision 1.1 2000/04/13 14:45:22 schroeter |
---|
| 44 | ! Initial revision |
---|
| 45 | ! |
---|
| 46 | ! |
---|
| 47 | ! |
---|
| 48 | ! Description: |
---|
| 49 | ! ------------ |
---|
| 50 | ! Calculate the change of total water content due to precipitation |
---|
| 51 | ! (simplified Kessler scheme) |
---|
| 52 | !------------------------------------------------------------------------------! |
---|
| 53 | |
---|
| 54 | PRIVATE |
---|
| 55 | PUBLIC calc_precipitation |
---|
| 56 | |
---|
| 57 | INTERFACE calc_precipitation |
---|
| 58 | MODULE PROCEDURE calc_precipitation |
---|
| 59 | MODULE PROCEDURE calc_precipitation_ij |
---|
| 60 | END INTERFACE calc_precipitation |
---|
[403] | 61 | |
---|
[1] | 62 | CONTAINS |
---|
| 63 | |
---|
| 64 | |
---|
| 65 | !------------------------------------------------------------------------------! |
---|
| 66 | ! Call for all grid points |
---|
| 67 | !------------------------------------------------------------------------------! |
---|
| 68 | SUBROUTINE calc_precipitation |
---|
| 69 | |
---|
| 70 | USE arrays_3d |
---|
| 71 | USE cloud_parameters |
---|
| 72 | USE constants |
---|
[72] | 73 | USE control_parameters |
---|
[1] | 74 | USE indices |
---|
| 75 | |
---|
| 76 | IMPLICIT NONE |
---|
| 77 | |
---|
| 78 | INTEGER :: i, j, k |
---|
[72] | 79 | REAL :: dqdt_precip |
---|
[1] | 80 | |
---|
[403] | 81 | precipitation_rate = 0.0 |
---|
[72] | 82 | |
---|
[1] | 83 | DO i = nxl, nxr |
---|
| 84 | DO j = nys, nyn |
---|
[19] | 85 | DO k = nzb_2d(j,i)+1, nzt |
---|
[1] | 86 | |
---|
| 87 | IF ( ql(k,j,i) > ql_crit ) THEN |
---|
[72] | 88 | dqdt_precip = prec_time_const * ( ql(k,j,i) - ql_crit ) |
---|
[1] | 89 | ELSE |
---|
[72] | 90 | dqdt_precip = 0.0 |
---|
[1] | 91 | ENDIF |
---|
[72] | 92 | tend(k,j,i) = tend(k,j,i) - dqdt_precip |
---|
| 93 | ! |
---|
[73] | 94 | !-- Precipitation rate in kg / m**2 / s (= mm/s) |
---|
[72] | 95 | precipitation_rate(j,i) = precipitation_rate(j,i) + & |
---|
[73] | 96 | dqdt_precip * dzw(k) |
---|
[1] | 97 | |
---|
| 98 | ENDDO |
---|
[72] | 99 | ! |
---|
[73] | 100 | !-- Sum up the precipitation amount, unit kg / m**2 (= mm) |
---|
[72] | 101 | IF ( intermediate_timestep_count == & |
---|
| 102 | intermediate_timestep_count_max .AND. & |
---|
| 103 | ( dt_do2d_xy-time_do2d_xy ) < precipitation_amount_interval )& |
---|
| 104 | THEN |
---|
| 105 | precipitation_amount(j,i) = precipitation_amount(j,i) + & |
---|
| 106 | precipitation_rate(j,i) * dt_3d |
---|
| 107 | ENDIF |
---|
[1] | 108 | ENDDO |
---|
| 109 | ENDDO |
---|
| 110 | |
---|
| 111 | END SUBROUTINE calc_precipitation |
---|
| 112 | |
---|
| 113 | |
---|
| 114 | !------------------------------------------------------------------------------! |
---|
| 115 | ! Call for grid point i,j |
---|
| 116 | !------------------------------------------------------------------------------! |
---|
| 117 | SUBROUTINE calc_precipitation_ij( i, j ) |
---|
| 118 | |
---|
| 119 | USE arrays_3d |
---|
| 120 | USE cloud_parameters |
---|
| 121 | USE constants |
---|
[72] | 122 | USE control_parameters |
---|
[1] | 123 | USE indices |
---|
[403] | 124 | |
---|
[1] | 125 | IMPLICIT NONE |
---|
| 126 | |
---|
[72] | 127 | INTEGER :: i, j, k |
---|
| 128 | REAL :: dqdt_precip |
---|
[1] | 129 | |
---|
[403] | 130 | precipitation_rate(j,i) = 0.0 |
---|
[1] | 131 | |
---|
[72] | 132 | ! |
---|
| 133 | !-- Ghostpoints are included (although not needed for tend) to avoid a later |
---|
| 134 | !-- exchange of these data for the precipitation amount/rate arrays |
---|
[19] | 135 | DO k = nzb_2d(j,i)+1, nzt |
---|
[1] | 136 | |
---|
| 137 | IF ( ql(k,j,i) > ql_crit ) THEN |
---|
[72] | 138 | dqdt_precip = prec_time_const * ( ql(k,j,i) - ql_crit ) |
---|
[1] | 139 | ELSE |
---|
[72] | 140 | dqdt_precip = 0.0 |
---|
[1] | 141 | ENDIF |
---|
[72] | 142 | tend(k,j,i) = tend(k,j,i) - dqdt_precip |
---|
[1] | 143 | |
---|
[72] | 144 | ! |
---|
[403] | 145 | !-- Precipitation rate in kg / m**2 / s (= mm/s) |
---|
| 146 | precipitation_rate(j,i) = precipitation_rate(j,i) + dqdt_precip * & |
---|
| 147 | dzw(k) |
---|
[72] | 148 | |
---|
[1] | 149 | ENDDO |
---|
| 150 | |
---|
[72] | 151 | ! |
---|
[403] | 152 | !-- Sum up the precipitation amount , unit kg / m**2 (= mm) |
---|
[72] | 153 | IF ( intermediate_timestep_count == intermediate_timestep_count_max & |
---|
| 154 | .AND. ( dt_do2d_xy-time_do2d_xy ) < precipitation_amount_interval )& |
---|
| 155 | THEN |
---|
| 156 | precipitation_amount(j,i) = precipitation_amount(j,i) + & |
---|
| 157 | precipitation_rate(j,i) * dt_3d |
---|
| 158 | ENDIF |
---|
| 159 | |
---|
[1] | 160 | END SUBROUTINE calc_precipitation_ij |
---|
| 161 | |
---|
| 162 | END MODULE calc_precipitation_mod |
---|