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

Last change on this file since 565 was 484, checked in by raasch, 15 years ago

typo in file headers removed

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