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

Last change on this file since 44 was 39, checked in by raasch, 18 years ago

comments prepared for 3.1c

  • Property svn:keywords set to Id
File size: 2.6 KB
Line 
1 MODULE calc_precipitation_mod
2
3!------------------------------------------------------------------------------!
4! Actual revisions:
5! -----------------
6!
7!
8! Former revisions:
9! -----------------
10! $Id: calc_precipitation.f90 39 2007-03-01 12:46:59Z raasch $
11!
12! 19 2007-02-23 04:53:48Z raasch
13! Calculation extended for gridpoint nzt
14!
15! RCS Log replace by Id keyword, revision history cleaned up
16!
17! Revision 1.5  2004/01/30 10:15:57  raasch
18! Scalar lower k index nzb replaced by 2d-array nzb_2d
19!
20! Revision 1.1  2000/04/13 14:45:22  schroeter
21! Initial revision
22!
23!
24!
25! Description:
26! ------------
27! Calculate the change of total water content due to precipitation
28! (simplified Kessler scheme)
29!------------------------------------------------------------------------------!
30
31    PRIVATE
32    PUBLIC calc_precipitation
33
34    INTERFACE calc_precipitation
35       MODULE PROCEDURE calc_precipitation
36       MODULE PROCEDURE calc_precipitation_ij
37    END INTERFACE calc_precipitation
38 
39 CONTAINS
40
41
42!------------------------------------------------------------------------------!
43! Call for all grid points
44!------------------------------------------------------------------------------!
45    SUBROUTINE calc_precipitation
46
47       USE arrays_3d
48       USE cloud_parameters
49       USE constants
50       USE indices
51
52       IMPLICIT NONE
53
54       INTEGER ::  i, j, k
55       REAL    :: precipitation_rate
56
57 
58       DO  i = nxl, nxr
59          DO  j = nys, nyn
60             DO  k = nzb_2d(j,i)+1, nzt
61
62                IF ( ql(k,j,i) > ql_crit )  THEN
63                   precipitation_rate = prec_time_const * &
64                                        ( ql(k,j,i) - ql_crit )
65                ELSE
66                   precipitation_rate = 0.0
67                ENDIF
68                tend(k,j,i) = tend(k,j,i) - precipitation_rate
69
70             ENDDO
71          ENDDO
72       ENDDO
73
74    END SUBROUTINE calc_precipitation
75
76
77!------------------------------------------------------------------------------!
78! Call for grid point i,j
79!------------------------------------------------------------------------------!
80    SUBROUTINE calc_precipitation_ij( i, j )
81
82       USE arrays_3d
83       USE cloud_parameters
84       USE constants
85       USE indices
86   
87       IMPLICIT NONE
88
89       INTEGER :: i, j, k
90       REAL    :: precipitation_rate
91
92
93       DO  k = nzb_2d(j,i)+1, nzt
94
95          IF ( ql(k,j,i) > ql_crit )  THEN
96             precipitation_rate = prec_time_const * ( ql(k,j,i) - ql_crit )
97          ELSE
98             precipitation_rate = 0.0
99          ENDIF
100          tend(k,j,i) = tend(k,j,i) - precipitation_rate
101
102       ENDDO
103
104    END SUBROUTINE calc_precipitation_ij
105
106 END MODULE calc_precipitation_mod
Note: See TracBrowser for help on using the repository browser.