Line data Source code
1 : #include "carma_globaer.h"
2 :
3 : !! This routine calculates coagulation loss rates <coaglgg>.
4 : !! See [Jacobson, et al., Atmos. Env., 28, 1327, 1994] for details
5 : !! on the coagulation algorithm.
6 : !!
7 : !! The loss rates for all particle elements in a particle group are equal.
8 : !!
9 : !! @author Eric Jensen
10 : !! @version Oct-1995
11 1050624 : subroutine coagl(carma, cstate, rc)
12 :
13 : ! types
14 : use carma_precision_mod
15 : use carma_enums_mod
16 : use carma_constants_mod
17 : use carma_types_mod
18 : use carmastate_mod
19 : use carma_mod
20 :
21 : implicit none
22 :
23 : type(carma_type), intent(in) :: carma !! the carma object
24 : type(carmastate_type), intent(inout) :: cstate !! the carma state object
25 : integer, intent(inout) :: rc !! return code, negative indicates failure
26 :
27 : ! Local Variables
28 : integer :: ig
29 : integer :: jg
30 : integer :: je
31 : integer :: igrp
32 : integer :: iz
33 : integer :: i
34 : integer :: j
35 :
36 :
37 : ! Loop over particle groups for which coagulation loss is being
38 : ! calculated.
39 3151872 : do ig = 1,NGROUP
40 :
41 : ! Loop over particle groups that particle in group ig might
42 : ! collide with.
43 7354368 : do jg = 1,NGROUP
44 :
45 : ! Element corresponding to particle number concentration
46 4202496 : je = ienconc(jg)
47 :
48 : ! Particle resulting from coagulation between groups <ig> and <jg> goes
49 : ! to group <igrp>
50 4202496 : igrp = icoag(ig,jg)
51 :
52 : ! Resulting particle is in same group as particle under consideration --
53 : ! partial loss (muliplies <volx>).
54 6303744 : if( igrp .eq. ig )then
55 :
56 : ! Loop over the column
57 104011776 : do iz = 1, NZ
58 :
59 100859904 : if( pconmax(iz,jg) .gt. FEW_PC .and. &
60 3151872 : pconmax(iz,ig) .gt. FEW_PC )then
61 :
62 1811762840 : do i = 1, NBIN-1
63 36235256800 : do j = 1, NBIN
64 :
65 0 : coaglg(iz,i,ig) = coaglg(iz,i,ig) &
66 0 : + ckernel(iz,i,j,ig,jg) * &
67 36144668658 : pcl(iz,j,je) * volx(igrp,ig,jg,i,j)
68 : enddo
69 : enddo
70 : endif
71 : enddo ! iz
72 :
73 : ! Resulting particle is in a different group -- complete loss (no <volx>).
74 1050624 : else if( igrp .ne. ig .and. igrp .ne. 0 )then
75 :
76 : ! Loop over the column
77 34670592 : do iz = 1, NZ
78 :
79 : ! Bypass calculation if few particles present
80 :
81 33619968 : if( pconmax(iz,jg) .gt. FEW_PC .and. &
82 1050624 : pconmax(iz,ig) .gt. FEW_PC )then
83 :
84 607175877 : do i = 1, NBIN
85 12172430677 : do j = 1, NBIN
86 :
87 0 : coaglg(iz,i,ig) = coaglg(iz,i,ig) &
88 0 : + ckernel(iz,i,j,ig,jg) * &
89 12143517540 : pcl(iz,j,je)
90 :
91 : enddo
92 : enddo
93 : endif ! pconmax(ig) * pconmax(jg) > FEW_PC ** 2
94 : enddo ! iz
95 : endif ! igrp .eq. ig ?
96 : enddo ! jg
97 : enddo ! ig
98 :
99 : ! Boundary condition: Particles from bin <NBIN> are only lost by
100 : ! coagulating into other elements. (This is taken care of by <NBIN>-1
101 : ! limit above)
102 :
103 : ! Return to caller with particle loss rates due to coagulation evaluated.
104 1050624 : return
105 1050624 : end
|