Line data Source code
1 : module mo_indprd
2 : use shr_kind_mod, only : r8 => shr_kind_r8
3 : private
4 : public :: indprd
5 : contains
6 145920 : subroutine indprd( class, prod, nprod, y, extfrc, rxt, chnkpnts )
7 : use chem_mods, only : gas_pcnst, extcnt, rxntot
8 : implicit none
9 : !--------------------------------------------------------------------
10 : ! ... dummy arguments
11 : !--------------------------------------------------------------------
12 : integer, intent(in) :: class
13 : integer, intent(in) :: chnkpnts
14 : integer, intent(in) :: nprod
15 : real(r8), intent(in) :: y(chnkpnts,gas_pcnst)
16 : real(r8), intent(in) :: rxt(chnkpnts,rxntot)
17 : real(r8), intent(in) :: extfrc(chnkpnts,extcnt)
18 : real(r8), intent(inout) :: prod(chnkpnts,nprod)
19 : !--------------------------------------------------------------------
20 : ! ... "independent" production for Explicit species
21 : !--------------------------------------------------------------------
22 145920 : if( class == 1 ) then
23 73689600 : prod(:,1) = 0._r8
24 73616640 : prod(:,2) = 0._r8
25 73616640 : prod(:,3) = 0._r8
26 73616640 : prod(:,4) = 0._r8
27 73616640 : prod(:,5) = 0._r8
28 73616640 : prod(:,6) = 0._r8
29 73616640 : prod(:,7) = 0._r8
30 73616640 : prod(:,8) = 0._r8
31 73616640 : prod(:,9) = 0._r8
32 73616640 : prod(:,10) = 0._r8
33 73616640 : prod(:,11) = 0._r8
34 73616640 : prod(:,12) = 0._r8
35 73616640 : prod(:,13) = 0._r8
36 73616640 : prod(:,14) = 0._r8
37 73616640 : prod(:,15) = 0._r8
38 73616640 : prod(:,16) = 0._r8
39 73616640 : prod(:,17) = (rxt(:,242)*y(:,77) +rxt(:,246)*y(:,77))*y(:,29)
40 73616640 : prod(:,18) = 0._r8
41 73616640 : prod(:,19) = 0._r8
42 73616640 : prod(:,20) = 0._r8
43 73616640 : prod(:,21) = 0._r8
44 73616640 : prod(:,22) =rxt(:,132)*y(:,54)*y(:,50)
45 73616640 : prod(:,23) = 0._r8
46 : !--------------------------------------------------------------------
47 : ! ... "independent" production for Implicit species
48 : !--------------------------------------------------------------------
49 72960 : else if( class == 4 ) then
50 0 : prod(:,41) =rxt(:,31)*y(:,7) +rxt(:,32)*y(:,8) +2.000_r8*rxt(:,38)*y(:,14) &
51 : +rxt(:,39)*y(:,16) +3.000_r8*rxt(:,42)*y(:,22) +2.000_r8*rxt(:,50) &
52 73616640 : *y(:,37)
53 73616640 : prod(:,9) = 0._r8
54 73616640 : prod(:,57) = 0._r8
55 73616640 : prod(:,20) = 0._r8
56 73616640 : prod(:,51) =.180_r8*rxt(:,24)*y(:,21)
57 73616640 : prod(:,43) =rxt(:,39)*y(:,16) +rxt(:,41)*y(:,18) +rxt(:,23)*y(:,21)
58 73689600 : prod(:,16) = 0._r8
59 0 : prod(:,48) =4.000_r8*rxt(:,30)*y(:,6) +rxt(:,31)*y(:,7) +2.000_r8*rxt(:,33) &
60 : *y(:,9) +2.000_r8*rxt(:,34)*y(:,10) +2.000_r8*rxt(:,35)*y(:,11) &
61 : +rxt(:,36)*y(:,12) +2.000_r8*rxt(:,37)*y(:,13) +3.000_r8*rxt(:,40) &
62 : *y(:,17) +rxt(:,41)*y(:,18) +rxt(:,52)*y(:,41) +rxt(:,53)*y(:,42) &
63 73616640 : +rxt(:,54)*y(:,43)
64 73689600 : prod(:,7) = 0._r8
65 73616640 : prod(:,2) = 0._r8
66 73616640 : prod(:,47) = 0._r8
67 73689600 : prod(:,37) = 0._r8
68 0 : prod(:,21) = (rxt(:,25) +rxt(:,61))*y(:,30) +.380_r8*rxt(:,24)*y(:,21) &
69 73689600 : + extfrc(:,2)
70 72960 : prod(:,3) =rxt(:,31)*y(:,7) +rxt(:,32)*y(:,8) +rxt(:,34)*y(:,10) &
71 : +2.000_r8*rxt(:,35)*y(:,11) +2.000_r8*rxt(:,36)*y(:,12) +rxt(:,37) &
72 : *y(:,13) +2.000_r8*rxt(:,50)*y(:,37) +rxt(:,53)*y(:,42) +rxt(:,54) &
73 73616640 : *y(:,43)
74 73689600 : prod(:,8) =rxt(:,33)*y(:,9) +rxt(:,34)*y(:,10) +rxt(:,52)*y(:,41)
75 73689600 : prod(:,12) = + extfrc(:,1)
76 73616640 : prod(:,26) =rxt(:,32)*y(:,8) +rxt(:,36)*y(:,12)
77 73689600 : prod(:,40) = (rxt(:,23) +.330_r8*rxt(:,24))*y(:,21)
78 73616640 : prod(:,56) =1.440_r8*rxt(:,24)*y(:,21)
79 73689600 : prod(:,22) = 0._r8
80 73616640 : prod(:,4) = 0._r8
81 73616640 : prod(:,29) = 0._r8
82 73689600 : prod(:,42) = 0._r8
83 73689600 : prod(:,10) = 0._r8
84 73689600 : prod(:,38) = 0._r8
85 73689600 : prod(:,17) = 0._r8
86 73616640 : prod(:,27) = 0._r8
87 73616640 : prod(:,28) = 0._r8
88 0 : prod(:,35) = (rxt(:,64) +.800_r8*rxt(:,66) +.800_r8*rxt(:,68) +rxt(:,70)) &
89 73689600 : + extfrc(:,6)
90 73689600 : prod(:,13) = 0._r8
91 73616640 : prod(:,55) = + extfrc(:,3)
92 73689600 : prod(:,53) = + extfrc(:,4)
93 73616640 : prod(:,44) = 0._r8
94 73616640 : prod(:,46) = (rxt(:,25) +rxt(:,61))*y(:,30) +.180_r8*rxt(:,24)*y(:,21)
95 73616640 : prod(:,49) = 0._r8
96 73689600 : prod(:,52) = 0._r8
97 73689600 : prod(:,14) = 0._r8
98 73616640 : prod(:,15) = 0._r8
99 73689600 : prod(:,24) = 0._r8
100 73689600 : prod(:,39) = 0._r8
101 73689600 : prod(:,36) = + extfrc(:,5)
102 73689600 : prod(:,11) = 0._r8
103 73689600 : prod(:,1) = 0._r8
104 0 : prod(:,33) = (rxt(:,63) +rxt(:,64) +rxt(:,65) +rxt(:,67) +rxt(:,69) + &
105 73689600 : rxt(:,70)) + extfrc(:,10)
106 73616640 : prod(:,45) = 0._r8
107 72960 : prod(:,34) = (rxt(:,65) +1.200_r8*rxt(:,66) +1.200_r8*rxt(:,68) +rxt(:,69)) &
108 73616640 : + extfrc(:,7)
109 73689600 : prod(:,23) = (rxt(:,63) +rxt(:,67)) + extfrc(:,8)
110 73689600 : prod(:,25) = 0._r8
111 73689600 : prod(:,30) = (rxt(:,64) +rxt(:,65) +rxt(:,69) +rxt(:,70)) + extfrc(:,11)
112 73689600 : prod(:,50) =rxt(:,12)*y(:,51)
113 73689600 : prod(:,5) = 0._r8
114 73689600 : prod(:,6) = 0._r8
115 73689600 : prod(:,32) = + extfrc(:,12)
116 73689600 : prod(:,54) =.330_r8*rxt(:,24)*y(:,21) + extfrc(:,13)
117 73689600 : prod(:,31) = + extfrc(:,9)
118 73616640 : prod(:,19) = 0._r8
119 73689600 : prod(:,18) = 0._r8
120 73616640 : prod(:,58) =.050_r8*rxt(:,24)*y(:,21)
121 : end if
122 145920 : end subroutine indprd
123 : end module mo_indprd
|