source: palm/trunk/SOURCE/lpm_droplet_condensation.f90 @ 2000

Last change on this file since 2000 was 2000, checked in by knoop, 8 years ago

Forced header and separation lines into 80 columns

  • Property svn:keywords set to Id
File size: 22.5 KB
Line 
1!> @file lpm_droplet_condensation.f90
2!------------------------------------------------------------------------------!
3! This file is part of PALM.
4!
5! PALM is free software: you can redistribute it and/or modify it under the
6! terms of the GNU General Public License as published by the Free Software
7! Foundation, either version 3 of the License, or (at your option) any later
8! version.
9!
10! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
11! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
13!
14! You should have received a copy of the GNU General Public License along with
15! PALM. If not, see <http://www.gnu.org/licenses/>.
16!
17! Copyright 1997-2016 Leibniz Universitaet Hannover
18!------------------------------------------------------------------------------!
19!
20! Current revisions:
21! ------------------
22! Forced header and separation lines into 80 columns
23!
24! Former revisions:
25! -----------------
26! $Id: lpm_droplet_condensation.f90 2000 2016-08-20 18:09:15Z knoop $
27!
28! 1890 2016-04-22 08:52:11Z hoffmann
29! Some improvements of the Rosenbrock method. If the Rosenbrock method needs more
30! than 40 iterations to find a sufficient time setp, the model is not aborted.
31! This might lead to small erros. But they can be assumend as negligible, since
32! the maximum timesetp of the Rosenbrock method after 40 iterations will be
33! smaller than 10^-16 s. 
34!
35! 1871 2016-04-15 11:46:09Z hoffmann
36! Initialization of aerosols added.
37!
38! 1849 2016-04-08 11:33:18Z hoffmann
39! Interpolation of supersaturation has been removed because it is not in
40! accordance with the release/depletion of latent heat/water vapor in
41! interaction_droplets_ptq.
42! Calculation of particle Reynolds number has been corrected.
43! eps_ros added from modules.
44!
45! 1831 2016-04-07 13:15:51Z hoffmann
46! curvature_solution_effects moved to particle_attributes
47!
48! 1822 2016-04-07 07:49:42Z hoffmann
49! Unused variables removed.
50!
51! 1682 2015-10-07 23:56:08Z knoop
52! Code annotations made doxygen readable
53!
54! 1359 2014-04-11 17:15:14Z hoffmann
55! New particle structure integrated.
56! Kind definition added to all floating point numbers.
57!
58! 1346 2014-03-27 13:18:20Z heinze
59! Bugfix: REAL constants provided with KIND-attribute especially in call of
60! intrinsic function like MAX, MIN, SIGN
61!
62! 1322 2014-03-20 16:38:49Z raasch
63! REAL constants defined as wp-kind
64!
65! 1320 2014-03-20 08:40:49Z raasch
66! ONLY-attribute added to USE-statements,
67! kind-parameters added to all INTEGER and REAL declaration statements,
68! kinds are defined in new module kinds,
69! comment fields (!:) to be used for variable explanations added to
70! all variable declaration statements
71!
72! 1318 2014-03-17 13:35:16Z raasch
73! module interfaces removed
74!
75! 1092 2013-02-02 11:24:22Z raasch
76! unused variables removed
77!
78! 1071 2012-11-29 16:54:55Z franke
79! Ventilation effect for evaporation of large droplets included
80! Check for unreasonable results included in calculation of Rosenbrock method
81! since physically unlikely results were observed and for the same
82! reason the first internal time step in Rosenbrock method should be < 1.0E02 in
83! case of evaporation
84! Unnecessary calculation of ql_int removed
85! Unnecessary calculations in Rosenbrock method (d2rdt2, drdt_m, dt_ros_last)
86! removed
87! Bugfix: factor in calculation of surface tension changed from 0.00155 to
88! 0.000155
89!
90! 1036 2012-10-22 13:43:42Z raasch
91! code put under GPL (PALM 3.9)
92!
93! 849 2012-03-15 10:35:09Z raasch
94! initial revision (former part of advec_particles)
95!
96!
97! Description:
98! ------------
99!> Calculates change in droplet radius by condensation/evaporation, using
100!> either an analytic formula or by numerically integrating the radius growth
101!> equation including curvature and solution effects using Rosenbrocks method
102!> (see Numerical recipes in FORTRAN, 2nd edition, p. 731).
103!> The analytical formula and growth equation follow those given in
104!> Rogers and Yau (A short course in cloud physics, 3rd edition, p. 102/103).
105!------------------------------------------------------------------------------!
106 SUBROUTINE lpm_droplet_condensation (ip,jp,kp)
107 
108
109    USE arrays_3d,                                                             &
110        ONLY:  hyp, pt, q,  ql_c, ql_v
111
112    USE cloud_parameters,                                                      &
113        ONLY:  l_d_rv, l_v, rho_l, r_v
114
115    USE constants,                                                             &
116        ONLY:  pi
117
118    USE control_parameters,                                                    &
119        ONLY:  dt_3d, dz, message_string, molecular_viscosity, rho_surface
120
121    USE cpulog,                                                                &
122        ONLY:  cpu_log, log_point_s
123
124    USE grid_variables,                                                        &
125        ONLY:  dx, dy
126
127    USE lpm_collision_kernels_mod,                                             &
128        ONLY:  rclass_lbound, rclass_ubound
129
130    USE kinds
131
132    USE particle_attributes,                                                   &
133        ONLY:  curvature_solution_effects, hall_kernel,                        &
134               molecular_weight_of_solute, molecular_weight_of_water,          &
135               number_of_particles, particles, radius_classes, rho_s,          &
136               use_kernel_tables, vanthoff, wang_kernel
137
138
139    IMPLICIT NONE
140
141    INTEGER(iwp) :: ip                         !<
142    INTEGER(iwp) :: internal_timestep_count    !<
143    INTEGER(iwp) :: jp                         !<
144    INTEGER(iwp) :: jtry                       !<
145    INTEGER(iwp) :: kp                         !<
146    INTEGER(iwp) :: n                          !<
147    INTEGER(iwp) :: ros_count                  !<
148 
149    INTEGER(iwp), PARAMETER ::  maxtry = 40    !<
150
151    LOGICAL ::  repeat                         !<
152
153    REAL(wp) ::  aa                            !<
154    REAL(wp) ::  afactor                       !< curvature effects
155    REAL(wp) ::  arg                           !<
156    REAL(wp) ::  bfactor                       !< solute effects
157    REAL(wp) ::  ddenom                        !<
158    REAL(wp) ::  delta_r                       !<
159    REAL(wp) ::  diameter                      !< diameter of cloud droplets
160    REAL(wp) ::  diff_coeff_v                  !< diffusivity for water vapor
161    REAL(wp) ::  drdt                          !<
162    REAL(wp) ::  drdt_ini                      !<
163    REAL(wp) ::  dt_ros                        !<
164    REAL(wp) ::  dt_ros_next                   !<
165    REAL(wp) ::  dt_ros_sum                    !<
166    REAL(wp) ::  dt_ros_sum_ini                !<
167    REAL(wp) ::  d2rdtdr                       !<
168    REAL(wp) ::  errmax                        !<
169    REAL(wp) ::  e_a                           !< current vapor pressure
170    REAL(wp) ::  e_s                           !< current saturation vapor pressure
171    REAL(wp) ::  err_ros                       !<
172    REAL(wp) ::  g1                            !<
173    REAL(wp) ::  g2                            !<
174    REAL(wp) ::  g3                            !<
175    REAL(wp) ::  g4                            !<
176    REAL(wp) ::  r_ros                         !<
177    REAL(wp) ::  r_ros_ini                     !<
178    REAL(wp) ::  sigma                         !<
179    REAL(wp) ::  thermal_conductivity_v        !< thermal conductivity for water
180    REAL(wp) ::  t_int                         !< temperature
181    REAL(wp) ::  w_s                           !< terminal velocity of droplets
182    REAL(wp) ::  re_p                          !<
183
184!
185!-- Parameters for Rosenbrock method
186    REAL(wp), PARAMETER ::  a21 = 2.0_wp               !<
187    REAL(wp), PARAMETER ::  a31 = 48.0_wp / 25.0_wp    !<
188    REAL(wp), PARAMETER ::  a32 = 6.0_wp / 25.0_wp     !<
189    REAL(wp), PARAMETER ::  b1 = 19.0_wp / 9.0_wp      !<
190    REAL(wp), PARAMETER ::  b2 = 0.5_wp                !<
191    REAL(wp), PARAMETER ::  b3 = 25.0_wp / 108.0_wp    !<
192    REAL(wp), PARAMETER ::  b4 = 125.0_wp / 108.0_wp   !<
193    REAL(wp), PARAMETER ::  c21 = -8.0_wp              !<
194    REAL(wp), PARAMETER ::  c31 = 372.0_wp / 25.0_wp   !<
195    REAL(wp), PARAMETER ::  c32 = 12.0_wp / 5.0_wp     !<
196    REAL(wp), PARAMETER ::  c41 = -112.0_wp / 125.0_wp !<
197    REAL(wp), PARAMETER ::  c42 = -54.0_wp / 125.0_wp  !<
198    REAL(wp), PARAMETER ::  c43 = -2.0_wp / 5.0_wp     !<
199    REAL(wp), PARAMETER ::  errcon = 0.1296_wp         !<
200    REAL(wp), PARAMETER ::  e1 = 17.0_wp / 54.0_wp     !<
201    REAL(wp), PARAMETER ::  e2 = 7.0_wp / 36.0_wp      !<
202    REAL(wp), PARAMETER ::  e3 = 0.0_wp                !<
203    REAL(wp), PARAMETER ::  e4 = 125.0_wp / 108.0_wp   !<
204    REAL(wp), PARAMETER ::  eps_ros = 1.0E-3_wp        !< accuracy of Rosenbrock method
205    REAL(wp), PARAMETER ::  gam = 0.5_wp               !<
206    REAL(wp), PARAMETER ::  grow = 1.5_wp              !<
207    REAL(wp), PARAMETER ::  pgrow = -0.25_wp           !<
208    REAL(wp), PARAMETER ::  pshrnk = -1.0_wp /3.0_wp   !<
209    REAL(wp), PARAMETER ::  shrnk = 0.5_wp             !<
210
211!
212!-- Parameters for terminal velocity
213    REAL(wp), PARAMETER ::  a_rog = 9.65_wp      !< parameter for fall velocity
214    REAL(wp), PARAMETER ::  b_rog = 10.43_wp     !< parameter for fall velocity
215    REAL(wp), PARAMETER ::  c_rog = 0.6_wp       !< parameter for fall velocity
216    REAL(wp), PARAMETER ::  k_cap_rog = 4.0_wp   !< parameter for fall velocity
217    REAL(wp), PARAMETER ::  k_low_rog = 12.0_wp  !< parameter for fall velocity
218    REAL(wp), PARAMETER ::  d0_rog = 0.745_wp    !< separation diameter
219
220    REAL(wp), DIMENSION(number_of_particles) ::  ventilation_effect     !<
221    REAL(wp), DIMENSION(number_of_particles) ::  new_r                  !<
222
223
224
225    CALL cpu_log( log_point_s(42), 'lpm_droplet_condens', 'start' )
226
227!
228!-- Calculate temperature, saturation vapor pressure and current vapor pressure
229    t_int = pt(kp,jp,ip) * ( hyp(kp) / 100000.0_wp )**0.286_wp
230    e_s   = 611.0_wp * EXP( l_d_rv * ( 3.6609E-3_wp - 1.0_wp / t_int ) )
231    e_a   = q(kp,jp,ip) * hyp(kp) / ( 0.378_wp * q(kp,jp,ip) + 0.622_wp )
232!
233!-- Thermal conductivity for water (from Rogers and Yau, Table 7.1),
234!-- diffusivity for water vapor (after Hall und Pruppacher, 1976)
235    thermal_conductivity_v = 7.94048E-05_wp * t_int + 0.00227011_wp
236    diff_coeff_v           = 0.211E-4_wp * ( t_int / 273.15_wp )**1.94_wp * &
237                             ( 101325.0_wp / hyp(kp) )
238!
239!-- Calculate effects of heat conductivity and diffusion of water vapor on the
240!-- condensation/evaporation process (typically known as 1.0 / (F_k + F_d) )
241    ddenom  = 1.0_wp / ( rho_l * r_v * t_int / ( e_s * diff_coeff_v ) +        &
242                         ( l_v / ( r_v * t_int ) - 1.0_wp ) * rho_l *          &
243                         l_v / ( thermal_conductivity_v * t_int )              &
244                       )
245
246    new_r = 0.0_wp
247
248!
249!-- Determine ventilation effect on evaporation of large drops
250    DO  n = 1, number_of_particles
251
252       IF ( particles(n)%radius >= 4.0E-5_wp  .AND.  e_a / e_s < 1.0_wp )  THEN
253!
254!--       Terminal velocity is computed for vertical direction (Rogers et al.,
255!--       1993, J. Appl. Meteorol.)
256          diameter = particles(n)%radius * 2000.0_wp !diameter in mm
257          IF ( diameter <= d0_rog )  THEN
258             w_s = k_cap_rog * diameter * ( 1.0_wp - EXP( -k_low_rog * diameter ) )
259          ELSE
260             w_s = a_rog - b_rog * EXP( -c_rog * diameter )
261          ENDIF
262!
263!--       First calculate droplet's Reynolds number
264          re_p = 2.0_wp * particles(n)%radius * w_s / molecular_viscosity
265!
266!--       Ventilation coefficient (Rogers and Yau, 1989):
267          IF ( re_p > 2.5_wp )  THEN
268             ventilation_effect(n) = 0.78_wp + 0.28_wp * SQRT( re_p )
269          ELSE
270             ventilation_effect(n) = 1.0_wp + 0.09_wp * re_p
271          ENDIF
272       ELSE
273!
274!--       For small droplets or in supersaturated environments, the ventilation
275!--       effect does not play a role
276          ventilation_effect(n) = 1.0_wp
277       ENDIF
278    ENDDO
279
280!
281!-- Use analytic model for condensational growth
282    IF( .NOT. curvature_solution_effects ) then
283       DO  n = 1, number_of_particles
284          arg = particles(n)%radius**2 + 2.0_wp * dt_3d * ddenom *             &
285                                         ventilation_effect(n) *               &
286                                         ( e_a / e_s - 1.0_wp )
287          arg = MAX( arg, 1.0E-16_wp )
288          new_r(n) = SQRT( arg )
289       ENDDO
290    ENDIF
291
292!
293!-- If selected, use numerical solution of the condensational growth
294!-- equation (e.g., for studying the activation of aerosols).
295!-- Curvature and solutions effects are included in growth equation.
296!-- Change in Radius is calculated with a 4th-order Rosenbrock method
297!-- for stiff o.d.e's with monitoring local truncation error to adjust
298!-- stepsize (see Numerical recipes in FORTRAN, 2nd edition, p. 731).
299    DO  n = 1, number_of_particles
300       IF ( curvature_solution_effects )  THEN
301
302          ros_count = 0
303          repeat = .TRUE.
304!
305!--       Carry out the Rosenbrock algorithm. In case of unreasonable results
306!--       the switch "repeat" will be set true and the algorithm will be carried
307!--       out again with the internal time step set to its initial (small) value.
308!--       Unreasonable results may occur if the external conditions, especially
309!--       the supersaturation, has significantly changed compared to the last
310!--       PALM timestep.
311          DO WHILE ( repeat )
312
313             repeat = .FALSE.
314!
315!--          Curvature effect (afactor) with surface tension parameterization
316!--          by Straka (2009)
317             sigma = 0.0761_wp - 0.000155_wp * ( t_int - 273.15_wp )
318             afactor = 2.0_wp * sigma / ( rho_l * r_v * t_int )
319!
320!--          Solute effect (bfactor)
321             bfactor = vanthoff * rho_s * particles(n)%rvar2**3 *              &
322                       molecular_weight_of_water /                             &
323                       ( rho_l * molecular_weight_of_solute )
324
325             r_ros = particles(n)%radius
326             dt_ros_sum  = 0.0_wp      ! internal integrated time (s)
327             internal_timestep_count = 0
328!
329!--          Take internal time step values from the end of last PALM time step
330             dt_ros_next = particles(n)%rvar1
331
332!
333!--          Internal time step should not be > 1.0E-2 and < 1.0E-6
334             IF ( dt_ros_next > 1.0E-2_wp )  THEN
335                dt_ros_next = 1.0E-2_wp
336             ELSEIF ( dt_ros_next < 1.0E-6_wp )  THEN
337                dt_ros_next = 1.0E-6_wp
338             ENDIF
339
340!
341!--          If calculation of Rosenbrock method is repeated due to unreasonalble
342!--          results during previous try the initial internal time step has to be
343!--          reduced
344             IF ( ros_count > 1 )  THEN
345                dt_ros_next = dt_ros_next * 0.1_wp
346             ELSEIF ( ros_count > 5 )  THEN
347!
348!--             Prevent creation of infinite loop
349                message_string = 'ros_count > 5 in Rosenbrock method'
350                CALL message( 'lpm_droplet_condensation', 'PA0018', 2, 2, &
351                               0, 6, 0 )
352             ENDIF
353
354!
355!--          Internal time step must not be larger than PALM time step
356             dt_ros = MIN( dt_ros_next, dt_3d )
357
358!
359!--          Integrate growth equation in time unless PALM time step is reached
360             DO WHILE ( dt_ros_sum < dt_3d )
361
362                internal_timestep_count = internal_timestep_count + 1
363
364!
365!--             Derivative at starting value
366                drdt = ddenom * ventilation_effect(n) * ( e_a / e_s - 1.0_wp - &
367                                                          afactor / r_ros +    &
368                                                          bfactor / r_ros**3   &
369                                                        ) / r_ros
370
371                drdt_ini       = drdt
372                dt_ros_sum_ini = dt_ros_sum
373                r_ros_ini      = r_ros
374
375!
376!--             Calculate radial derivative of dr/dt
377                d2rdtdr = ddenom * ventilation_effect(n) *                     &
378                                       ( ( 1.0_wp - e_a / e_s ) / r_ros**2 +   &
379                                         2.0_wp * afactor / r_ros**3 -         &
380                                         4.0_wp * bfactor / r_ros**5           &
381                                       )
382!
383!--             Adjust stepsize unless required accuracy is reached
384                DO  jtry = 1, maxtry+1
385
386                   IF ( jtry == maxtry+1 )  THEN
387                      message_string = 'maxtry > 40 in Rosenbrock method'
388                      CALL message( 'lpm_droplet_condensation', 'PA0347', 0,   &
389                                    1, 0, 6, 0 )
390                   ENDIF
391
392                   aa    = 1.0_wp / ( gam * dt_ros ) - d2rdtdr
393                   g1    = drdt_ini / aa
394                   r_ros = r_ros_ini + a21 * g1
395                   drdt  = ddenom * ventilation_effect(n) * ( e_a / e_s - 1.0_wp - &
396                                                              afactor / r_ros +    &
397                                                              bfactor / r_ros**3   &
398                                                            ) / r_ros
399
400                   g2    = ( drdt + c21 * g1 / dt_ros )&
401                           / aa
402                   r_ros = r_ros_ini + a31 * g1 + a32 * g2
403                   drdt  = ddenom * ventilation_effect(n) * ( e_a / e_s - 1.0_wp - &
404                                                              afactor / r_ros +    &
405                                                              bfactor / r_ros**3   &
406                                                            ) / r_ros
407
408                   g3    = ( drdt +  &
409                             ( c31 * g1 + c32 * g2 ) / dt_ros ) / aa
410                   g4    = ( drdt +  &
411                             ( c41 * g1 + c42 * g2 + c43 * g3 ) / dt_ros ) / aa
412                   r_ros = r_ros_ini + b1 * g1 + b2 * g2 + b3 * g3 + b4 * g4
413
414                   dt_ros_sum = dt_ros_sum_ini + dt_ros
415
416                   IF ( dt_ros_sum == dt_ros_sum_ini )  THEN
417                      message_string = 'zero stepsize in Rosenbrock method'
418                      CALL message( 'lpm_droplet_condensation', 'PA0348', 2,   &
419                                    2, 0, 6, 0 )
420                   ENDIF
421!
422!--                Calculate error
423                   err_ros = e1 * g1 + e2 * g2 + e3 * g3 + e4 * g4
424                   errmax  = 0.0_wp
425                   errmax  = MAX( errmax, ABS( err_ros / r_ros_ini ) ) / eps_ros
426!
427!--                Leave loop if accuracy is sufficient, otherwise try again
428!--                with a reduced stepsize
429                   IF ( errmax <= 1.0_wp )  THEN
430                      EXIT
431                   ELSE
432                      dt_ros = MAX( ABS( 0.9_wp * dt_ros * errmax**pshrnk ),   &
433                                    shrnk * ABS( dt_ros ) )
434                   ENDIF
435
436                ENDDO  ! loop for stepsize adjustment
437
438!
439!--             Calculate next internal time step
440                IF ( errmax > errcon )  THEN
441                   dt_ros_next = 0.9_wp * dt_ros * errmax**pgrow
442                ELSE
443                   dt_ros_next = grow * dt_ros
444                ENDIF
445
446!
447!--             Estimated time step is reduced if the PALM time step is exceeded
448                IF ( ( dt_ros_next + dt_ros_sum ) >= dt_3d )  THEN
449                   dt_ros = dt_3d - dt_ros_sum
450                ELSE
451                   dt_ros = dt_ros_next
452                ENDIF
453
454             ENDDO
455!
456!--          Store internal time step value for next PALM step
457             particles(n)%rvar1 = dt_ros_next
458
459!
460!--          Radius should not fall below 1E-8 because Rosenbrock method may
461!--          lead to errors otherwise
462             new_r(n) = MAX( r_ros, particles(n)%rvar2 )
463!
464!--          Check if calculated droplet radius change is reasonable since in
465!--          case of droplet evaporation the Rosenbrock method may lead to
466!--          secondary solutions which are physically unlikely.
467!--          Due to the solution effect the droplets may grow for relative
468!--          humidities below 100%, but change of radius should not be too
469!--          large. In case of unreasonable droplet growth the Rosenbrock
470!--          method is recalculated using a smaller initial time step.
471!--          Limiting values are tested for droplets down to 1.0E-7
472             IF ( new_r(n) - particles(n)%radius >= 3.0E-7_wp  .AND.  &
473                  e_a / e_s < 0.97_wp )  THEN
474                ros_count = ros_count + 1
475                repeat = .TRUE.
476             ENDIF
477
478          ENDDO    ! Rosenbrock method
479
480       ENDIF
481
482       delta_r = new_r(n) - particles(n)%radius
483
484!
485!--    Sum up the change in volume of liquid water for the respective grid
486!--    volume (this is needed later in lpm_calc_liquid_water_content for
487!--    calculating the release of latent heat)
488       ql_c(kp,jp,ip) = ql_c(kp,jp,ip) + particles(n)%weight_factor *          &
489                                   rho_l * 1.33333333_wp * pi *                &
490                                   ( new_r(n)**3 - particles(n)%radius**3 ) /  &
491                                   ( rho_surface * dx * dy * dz )
492       IF ( ql_c(kp,jp,ip) > 100.0_wp )  THEN
493          WRITE( message_string, * ) 'k=',kp,' j=',jp,' i=',ip,      &
494                       ' ql_c=',ql_c(kp,jp,ip), ' &part(',n,')%wf=', &
495                       particles(n)%weight_factor,' delta_r=',delta_r
496          CALL message( 'lpm_droplet_condensation', 'PA0143', 2, 2, -1, 6, 1 )
497       ENDIF
498
499!
500!--    Change the droplet radius
501       IF ( ( new_r(n) - particles(n)%radius ) < 0.0_wp  .AND.        &
502            new_r(n) < 0.0_wp )  THEN
503          WRITE( message_string, * ) '#1 k=',kp,' j=',jp,' i=',ip,    &
504                       ' e_s=',e_s, ' e_a=',e_a,' t_int=',t_int,      &
505                       ' &delta_r=',delta_r,                          &
506                       ' particle_radius=',particles(n)%radius
507          CALL message( 'lpm_droplet_condensation', 'PA0144', 2, 2, -1, 6, 1 )
508       ENDIF
509
510!
511!--    Sum up the total volume of liquid water (needed below for
512!--    re-calculating the weighting factors)
513       ql_v(kp,jp,ip) = ql_v(kp,jp,ip) + particles(n)%weight_factor * new_r(n)**3
514
515       particles(n)%radius = new_r(n)
516
517!
518!--    Determine radius class of the particle needed for collision
519       IF ( ( hall_kernel  .OR.  wang_kernel )  .AND.  use_kernel_tables )     &
520       THEN
521          particles(n)%class = ( LOG( new_r(n) ) - rclass_lbound ) /           &
522                               ( rclass_ubound - rclass_lbound ) *             &
523                               radius_classes
524          particles(n)%class = MIN( particles(n)%class, radius_classes )
525          particles(n)%class = MAX( particles(n)%class, 1 )
526       ENDIF
527
528    ENDDO
529
530    CALL cpu_log( log_point_s(42), 'lpm_droplet_condens', 'stop' )
531
532
533 END SUBROUTINE lpm_droplet_condensation
Note: See TracBrowser for help on using the repository browser.