source: palm/trunk/SOURCE/calc_precipitation.f90 @ 73

Last change on this file since 73 was 73, checked in by raasch, 14 years ago

preliminary changes for radiation conditions

  • Property svn:keywords set to Id
File size: 4.1 KB
Line 
1 MODULE calc_precipitation_mod
2
3!------------------------------------------------------------------------------!
4! Actual revisions:
5! -----------------
6! Precipitation rate and amount are calculated/stored,
7! + module control_parameters
8!
9! Former revisions:
10! -----------------
11! $Id: calc_precipitation.f90 73 2007-03-20 08:33:14Z raasch $
12!
13! 19 2007-02-23 04:53:48Z raasch
14! Calculation extended for gridpoint nzt
15!
16! RCS Log replace by Id keyword, revision history cleaned up
17!
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
51       USE control_parameters
52       USE indices
53
54       IMPLICIT NONE
55
56       INTEGER ::  i, j, k
57       REAL    ::  dqdt_precip
58
59
60       precipitation_rate = 0.0
61 
62       DO  i = nxl, nxr
63          DO  j = nys, nyn
64             DO  k = nzb_2d(j,i)+1, nzt
65
66                IF ( ql(k,j,i) > ql_crit )  THEN
67                   dqdt_precip = prec_time_const * ( ql(k,j,i) - ql_crit )
68                ELSE
69                   dqdt_precip = 0.0
70                ENDIF
71                tend(k,j,i) = tend(k,j,i) - dqdt_precip
72!
73!--             Precipitation rate in kg / m**2 / s (= mm/s)
74                precipitation_rate(j,i) = precipitation_rate(j,i) + &
75                                          dqdt_precip * dzw(k)
76
77             ENDDO
78!
79!--          Sum up the precipitation amount, unit kg / m**2 (= mm)
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
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
101       USE control_parameters
102       USE indices
103   
104       IMPLICIT NONE
105
106       INTEGER ::  i, j, k
107       REAL    ::  dqdt_precip
108
109
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
115       DO  k = nzb_2d(j,i)+1, nzt
116
117          IF ( ql(k,j,i) > ql_crit )  THEN
118             dqdt_precip = prec_time_const * ( ql(k,j,i) - ql_crit )
119          ELSE
120             dqdt_precip = 0.0
121          ENDIF
122          tend(k,j,i) = tend(k,j,i) - dqdt_precip
123
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
130       ENDDO
131
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
141    END SUBROUTINE calc_precipitation_ij
142
143 END MODULE calc_precipitation_mod
Note: See TracBrowser for help on using the repository browser.