source: palm/trunk/SOURCE/lpm_calc_liquid_water_content.f90 @ 849

Last change on this file since 849 was 849, checked in by raasch, 10 years ago

Changed:


Original routine advec_particles split into several new subroutines and renamed
lpm.
init_particles renamed lpm_init
user_advec_particles renamed user_lpm_advec,
particle_boundary_conds renamed lpm_boundary_conds,
set_particle_attributes renamed lpm_set_attributes,
user_init_particles renamed user_lpm_init,
user_particle_attributes renamed user_lpm_set_attributes
(Makefile, lpm_droplet_collision, lpm_droplet_condensation, init_3d_model, modules, palm, read_var_list, time_integration, write_var_list, deleted: advec_particles, init_particles, particle_boundary_conds, set_particle_attributes, user_advec_particles, user_init_particles, user_particle_attributes, new: lpm, lpm_advec, lpm_boundary_conds, lpm_calc_liquid_water_content, lpm_data_output_particles, lpm_droplet_collision, lpm_drollet_condensation, lpm_exchange_horiz, lpm_extend_particle_array, lpm_extend_tails, lpm_extend_tail_array, lpm_init, lpm_init_sgs_tke, lpm_pack_arrays, lpm_read_restart_file, lpm_release_set, lpm_set_attributes, lpm_sort_arrays, lpm_write_exchange_statistics, lpm_write_restart_file, user_lpm_advec, user_lpm_init, user_lpm_set_attributes

  • Property svn:keywords set to Id
File size: 2.1 KB
Line 
1 SUBROUTINE lpm_calc_liquid_water_content
2
3!------------------------------------------------------------------------------!
4! Current revisions:
5! ------------------
6!
7!
8! Former revisions:
9! -----------------
10! $Id: lpm_calc_liquid_water_content.f90 849 2012-03-15 10:35:09Z raasch $
11!
12!
13! Description:
14! ------------
15! Calculate the liquid water content for each grid box.
16!------------------------------------------------------------------------------!
17
18    USE arrays_3d
19    USE cloud_parameters
20    USE constants
21    USE control_parameters
22    USE cpulog
23    USE grid_variables
24    USE indices
25    USE interfaces
26    USE particle_attributes
27
28    IMPLICIT NONE
29
30    INTEGER ::  i, j, k, n, psi
31
32
33    CALL cpu_log( log_point_s(45), 'lpm_calc_ql', 'start' )
34
35!
36!-- Set water content initially to zero
37    ql = 0.0;  ql_v = 0.0;  ql_vp = 0.0
38
39!
40!-- Calculate for each grid box
41    DO  i = nxl, nxr
42       DO  j = nys, nyn
43          DO  k = nzb, nzt+1
44
45!
46!--          Calculate the total volume in the boxes (ql_v, weighting factor
47!--          has to beincluded)
48             psi = prt_start_index(k,j,i)
49             DO  n = psi, psi+prt_count(k,j,i)-1
50                ql_v(k,j,i)  = ql_v(k,j,i)  + particles(n)%weight_factor *  &
51                                              particles(n)%radius**3
52             ENDDO
53
54!
55!--          Calculate the liquid water content
56             IF ( ql_v(k,j,i) /= 0.0 )  THEN
57                ql(k,j,i) = ql(k,j,i) + rho_l * 1.33333333 * pi *           &
58                                        ql_v(k,j,i) /                       &
59                                        ( rho_surface * dx * dy * dz )
60
61                IF ( ql(k,j,i) < 0.0 ) THEN
62                   WRITE( message_string, * )  'LWC out of range: ' , &
63                                               ql(k,j,i)
64                   CALL message( 'lpm_calc_liquid_water_content', '', 2, 2, &
65                                 -1, 6, 1 )
66                ENDIF
67
68             ELSE
69
70                ql(k,j,i) = 0.0
71
72             ENDIF
73
74          ENDDO
75       ENDDO
76    ENDDO
77
78    CALL cpu_log( log_point_s(45), 'lpm_calc_ql', 'stop' )
79
80
81 END SUBROUTINE lpm_calc_liquid_water_content
Note: See TracBrowser for help on using the repository browser.