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