source: trunk/LMDZ.TITAN/libf/chimtitan/disso.c @ 3529

Last change on this file since 3529 was 3340, checked in by slebonnois, 6 months ago

SL: Lucie's modifications to run without clouds and still get good tropospheric T profile

File size: 25.0 KB
Line 
1/* disso: photodissociation rates */
2/* GCCM */
3/* correspond a chimie_simpnit (version 301105) */
4/* !!! ATTENTION !!! */
5/* Doit etre mis a jour en fonction de la chimie utilisee ! */
6
7#include "titan.h"
8
9void disso_( double KRPD[][15][NLRT][RDISS+1], int *NLAT )
10{
11   static double sCH4[62] = {
12          2.852e-19,7.816e-19,1.534e-18,2.069e-18,2.795e-18,4.088e-18,4.543e-18,
13          4.223e-18,3.314e-18,1.565e-18,8.892e-19,8.760e-19,8.792e-19,9.163e-19,
14          2.069e-18,9.378e-18,2.543e-17,3.785e-17,4.066e-17,3.302e-17,2.840e-17,
15          1.800e-17,1.920e-17,1.820e-17,1.840e-17,1.140e-17,2.656e-18,1.256e-19,
16          7.988e-22,1.366e-23,6.740e-24 };
17   static double sCH3[62] = { /* Absorb really little so we can touch this without recomputing flux */
18          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
19          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
20          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
21          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
22          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
23          0.000e+00,0.000e+00,0.000e+00,0.000e+00,5.000e-18,1.000e-17,5.000e-18,
24          3.700e-17,5.000e-18,
25          };
26   static double sCH3CN[62] = {
27          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
28          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
29          0.000e+00,0.000e+00,0.000e+00,0.000e+00,8.000e-17,8.000e-17,7.500e-17,
30          4.800e-17,3.700e-17,2.700e-17,4.100e-17,1.000e-17,8.600e-18,4.000e-18,
31          1.800e-18,1.100e-18,6.400e-19,3.600e-19,2.000e-19,1.200e-19,5.200e-20};
32   static double sC2H2[62] = {
33          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
34          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
35          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,3.000e-17,
36          3.000e-17,3.200e-17,3.640e-17,4.260e-17,1.040e-16,9.900e-18,4.800e-18,
37          1.720e-17,1.782e-17,9.040e-19,9.600e-19,1.294e-18,1.352e-18,1.130e-18,
38          6.680e-19,3.700e-19,3.900e-19,1.660e-19,5.400e-20 };
39   static double sC2H4[62] = {
40          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
41          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
42          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
43          0.000e+00,.1992E-16,.2734E-16,.2594E-16,.1690E-16,.2258E-16,.8507E-17,
44          .1583E-16,.2227E-16,.3056E-16,.3743E-16,.3788E-16,.2737E-16,.3171E-17,
45          .6033E-18,.1223E-18,.7247E-19,1.000e-20 };
46   static double sC2H3CN[62] = { 
47          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
48          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
49          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e-00,0.000e-00,0.000e-00,
50          0.000e-00,0.000e-00,1.000e-17,6.600e-18,5.600e-18,3.600e-18,4.300e-18,
51          4.000e-18,3.000e-18,2.900e-18,2.700e-18,2.700e-18,3.300e-18,4.500e-18,
52          6.000e-18,7.100e-18,7.000e-18,5.000e-18,2.500e-18,6.600e-19,1.000e-19,
53          1.500e-20,1.000e-21};
54   static double sC2H6[62] = {
55          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
56          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
57          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,2.000e-17,
58          2.000e-17,2.000e-17,2.060e-17,2.160e-17,1.540e-17,8.060e-18,3.860e-18,
59          1.484e-18,3.060e-19,9.600e-21 };
60   static double sCH3C2H[62] = {
61          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
62          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
63          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,1.000e-17,
64          2.000e-17,4.580e-17,6.240e-17,5.880e-17,5.920e-17,1.940e-17,2.200e-17,
65          2.820e-17,3.380e-17,1.142e-17,6.600e-18,8.100e-18,7.000e-18,2.800e-18,
66          1.600e-18,2.300e-19,4.411e-19,2.119e-19,1.004e-19,2.934e-20,4.157e-21 };
67   static double sCH2CCH2[62] = {
68          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
69          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
70          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
71          0.000e+00,0.000e+00,2.200e-17,2.200e-17,1.700e-17,1.700e-17,1.800e-17,
72          1.200e-17,1.500e-17,1.000e-17,2.100e-17,3.300e-17,4.000e-17,1.300e-17,
73          5.000e-18,2.900e-18,2.601e-18,1.037e-18,9.046e-19,6.565e-19,4.672e-19,
74          3.047e-19,1.579e-19,5.943e-20,2.261e-20 };
75   static double sC3H3[62] = { /* Absorb really little so we can touch this without recomputing flux */
76          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
77          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
78          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
79          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
80          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
81          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
82          0.000e+00,0.000e+00,0.000e+00,6.000e-18,1.000e-17,9.700e-18,5.000e-18,
83          2.500e-18,1.800e-18,1.100e-18,8.000e-19,6.000e-19,5.000e-19,3.200e-19,
84          2.500e-19,1.800e-19,1.100e-19,5.000e-19,2.000e-18 };
85   static double sC3H6[62] = {
86          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
87          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
88          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,3.400e-17,
89          3.300e-17,2.400e-17,2.500e-17,4.000e-17,3.700e-17,2.300e-17,1.900e-17,
90          2.000e-17,1.500e-17,2.200e-17,2.500e-17,4.400e-17,4.200e-17,2.700e-17,
91          1.200e-17,5.800e-18,1.400e-19,9.100e-21 };
92   static double sC3H8[62] = {
93          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
94          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
95          0.000e+00,0.000e+00,0.000e+00,0.000e+00,4.000e-17,4.000e-17,4.000e-17,
96          4.000e-17,4.000e-17,3.280e-17,3.100e-17,2.680e-17,2.200e-17,1.760e-17,
97          6.440e-18,3.000e-18,9.140e-19,7.000e-20 };
98   static double sC4H2[62] = {
99          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
100          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
101          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
102          0.000e+00,0.000e+00,2.500e-17,6.100e-17,4.780e-17,5.780e-17,1.014e-16,
103          5.200e-17,4.200e-17,1.030e-16,1.770e-16,9.100e-17,1.290e-17,2.380e-18,
104          3.400e-19,2.800e-19,2.600e-19,1.513e-19,2.583e-19,3.353e-19,4.115e-19,
105          4.755e-19,4.990e-19,4.399e-19,5.358e-19,2.485e-19,3.931e-19,1.067e-19,
106          3.761e-20,2.370e-20,2.277e-20 };
107   static double sC4H4[62] = {
108          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
109          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
110          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
111          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
112          0.000e+00,0.000e+00,0.000e+00,4.200e-17,5.000e-17,2.000e-17,6.700e-18,
113          6.100e-18,8.000e-18,1.000e-17,1.400e-17,1.900e-17,2.200e-17,2.600e-17,
114          1.600e-17,1.600e-17,4.000e-18,5.700e-19,1.400e-19 };
115   static double sC4H6[62] = {
116          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
117          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
118          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
119          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
120          0.000e+00,0.000e+00,0.000e+00,6.000e-18,1.200e-17,1.500e-17,1.300e-17,
121          1.800e-17,3.100e-17,3.800e-17,6.600e-17,9.600e-17,1.060e-16,8.500e-17,
122          6.700e-17,1.100e-17,1.700e-18,3.300e-19,6.500e-20 };
123   static double sC4H10[62] = {
124          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
125          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
126          0.000e+00,0.000e+00,0.000e+00,0.000e+00,6.000e-17,6.000e-17,6.000e-17,
127          6.000e-17,6.000e-17,5.500e-17,4.400e-17,4.400e-17,3.800e-17,3.100e-17,
128          1.900e-17,4.000e-18,1.300e-18,3.200e-19,2.000e-20 };
129   static double sC6H6[62] = { 
130          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
131          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
132          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,7.000e-17,
133          8.000e-17,5.000e-17,3.500e-17,3.500e-17,3.500e-17,2.000e-17,1.500e-17,
134          1.500e-17,1.500e-17,2.000e-17,2.500e-17,4.000e-17,9.500e-17,2.200e-16,
135          1.000e-16,2.000e-17,2.000e-17,2.000e-17,2.000e-17,5.000e-18,1.000e-20,
136          1.000e-20,1.000e-20,1.000e-20,1.000e-20,1.000e-19,2.000e-19,2.500e-19,
137          4.000e-19,2.000e-19,2.000e-19,1.000e-19 };
138   static double sN2[62] = {
139          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
140          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,4.898e-18,1.097e-17,
141          2.192e-17,2.214e-17,2.336e-17,1.679e-17,1.893e-17 };
142   static double sHCN[62] = {
143          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
144          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
145          0.000e+00,0.000e+00,0.000e+00,2.800e-17,3.300e-17,2.800e-17,3.500e-17,
146          4.800e-17,2.800e-17,1.700e-17,3.600e-18,2.500e-18,4.700e-18,2.700e-18,
147          8.600e-19,4.400e-19,2.000e-19,1.429e-19,1.145e-19,7.482e-20,3.852e-20,
148          1.009e-20 };
149   static double sHC3N[62] = {
150          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
151          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
152          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,3.402e-17,
153          3.647e-17,4.317e-17,3.759e-17,7.927e-17,3.796e-17,9.565e-17,1.716e-16,
154          1.247e-16,2.360e-17,8.411e-18,4.400e-18,8.600e-19,7.400e-19,6.200e-19,
155          4.899e-19,3.307e-19,2.128e-19,2.561e-19,2.621e-19,2.737e-19,3.601e-19,
156          1.564e-19,1.816e-19,8.427e-20 };
157   static double sC2N2[62] = {
158          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
159          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
160          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,2.635e-17,
161          3.126e-17,4.392e-17,9.788e-17,1.682e-16,1.064e-16,6.513e-18,2.039e-18,
162          2.828e-18,5.136e-18,8.188e-18,8.857e-18,1.489e-18,9.000e-20,6.200e-20,
163          3.800e-20,4.483e-20,8.618e-20,1.008e-19,7.579e-20,6.666e-20,2.907e-20,
164          2.476e-20,1.142e-20 };
165   static double sH2O[62] = {
166          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
167          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
168          0.000e+00,0.000e+00,0.000e+00,0.000e+00,1.927e-17,9.633e-18,7.440e-18,
169          1.087e-18,8.600e-18,8.850e-18,7.300e-18,4.100e-18,1.240e-18,5.600e-19,
170          7.977e-19,1.888e-18,3.333e-18,4.729e-18,4.963e-18,3.513e-18,1.440e-18,
171          1.563e-19 };
172   static double sCO[62] = {
173          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
174          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
175          0.000e+00,0.000e+00,7.300e-17,2.050e-16,9.000e-17,7.180e-18,3.700e-17};
176   static double sCO2[62] = {
177          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
178          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
179          0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,0.000e+00,
180          0.000e+00,1.022e-19,1.070e-19,4.220e-19,8.220e-19,6.640e-19,5.650e-19,
181          5.850e-19,4.400e-19,2.100e-19,8.700e-20,4.000e-20,2.130e-20,3.700e-21,
182          6.930e-22,4.040e-22,2.470e-23,4.800e-24,9.500e-25 };
183   static double sol[62] = {
184          9.45e+08,2.84e+08,4.24e+09,3.11e+09,1.22e+10,6.83e+09,2.54e+09,8.20e+08,
185          1.82e+09,1.30e+09,1.05e+09,1.37e+09,3.87e+08,4.29e+08,2.45e+09,4.09e+09,
186          1.06e+10,1.03e+10,4.08e+09,2.98e+10,7.00e+09,1.94e+09,7.40e+09,4.12e+11,
187          1.36e+10,4.92e+10,3.04e+10,3.81e+10,5.49e+10,1.00e+11,1.26e+11,1.67e+11,
188          2.97e+11,4.92e+11,7.17e+11,9.43e+11,1.34e+12,1.96e+12,2.96e+12,4.34e+12,
189          7.25e+12,1.76e+13,2.21e+13,3.10e+13,2.80e+13,2.97e+13,3.03e+13,3.77e+13,
190          3.44e+13,3.42e+13,7.08e+13,9.58e+13,1.63e+14,1.38e+14,1.26e+14,1.60e+14,
191          2.23e+14,3.70e+14,3.31e+14,3.26e+14,3.59e+14,4.05e+14};
192
193   int   i,j,l,s,lat,x;
194   double f,**flux;
195   double flact;
196   char   name[60],dir[27];
197   FILE   *fp,*out;
198
199   flux = dm2d(0,NLRT,0,14);
200
201/* lecture des flux actiniques:
202   - suppose la presence d'un lien au même niveau que l'executable
203   pointant vers le repertoire datagcm (ou qu'il soit...)
204   - et les moyennes dans datagcm/PHOT(NLAT)/Moy_(lat:1 a NLAT)
205*/
206   strcpy( dir, "datagcm/PHOT" );
207   if( (*NLAT) < 10 )
208   {
209     strcat( dir, "0"  );
210     strcat( dir, (const char *)ecvt((float)(*NLAT),1,&x,&x) );
211   }
212   else 
213     strcat( dir, (const char *)ecvt((float)(*NLAT),2,&x,&x) );
214   strcat( dir, "x/Moy_"  );
215   printf( "Directories for actinic fluxes: %s \n", dir );
216 
217   for( lat = 0; lat <= (*NLAT)-1; lat++ )   /* Old array is set equal to 0. */
218     for( s = 0; s <= 14; s++ )
219       for( j = 0; j <= NLRT-1; j++ )
220         for( i = 0; i <= RDISS; i++ )                 
221            KRPD[lat][s][j][i] = 0.0e0;
222           
223   for( i = 0; i <= 13; i++ ) sCH4[i]  = 0.0e0;
224   for( i = 0; i <= 13; i++ ) sC2H2[i] = 0.0e0;
225   for( i = 0; i <= 16; i++ ) sC2H4[i] = 0.0e0;
226   for( i = 0; i <= 16; i++ ) sC2H6[i] = 0.0e0;
227
228   for( lat = 0; lat <= (*NLAT)-1; lat++ ) /*     Main loop on latitude */
229   for( i = 10; i <= 310; i += 5 )             /* Main loop on wavelength. */
230   {
231      strcpy( name, dir ); 
232      if( (lat+1) < 10 )
233      {
234       strcat( name, "0"  );
235       strcat( name, (const char *)ecvt((float)(lat+1),1,&x,&x) );
236      }
237      else 
238       strcat( name, (const char *)ecvt((float)(lat+1),2,&x,&x) );
239      if( i < 160 ) strcat( name, "/photmoy3a" );
240      else          strcat( name, "/photmoy3a" );
241      if( i < 100 )
242      {
243         strcat( name, ".0" );
244         strcat( name, (const char *)ecvt((float)i,2,&x,&x) );
245      }
246      else
247      {
248         strcat( name, "." );
249         strcat( name, (const char *)ecvt((float)i,3,&x,&x) );
250      }
251      if( !( fp = fopen( name, "r" ) ) )
252      {
253         out = fopen( "err.log", "a" );
254         fprintf( out, "I cannot open %s\n", name );
255         fclose( out );
256         exit(0);
257      }
258      for( j = 0; j <= NLRT-1; j++ )
259      {
260         fscanf( fp,"%d ",&l );
261         for( s = 0; s < 15; s++ )
262         {
263           fscanf( fp,"%lg ", &flact );
264           flux[j][s] = flact;
265         }
266      }
267      fclose(fp);
268
269      l = i / 5 - 2;                  /* Pointer on wavelength. */
270     
271/* taux de photodissociations */
272/* JVO 19 - The photodissociation branching ratio below have been updated so make sure you use chimie_2019_43spc_vuitton file as input in titan.h */
273      for( s = 0; s <= 14; s++ )
274       for( j = 0; j <= NLRT-1; j++ )
275       {
276         f = flux[j][s] * sol[l] / ( 9.5e0 * 9.5e0 );   /* !! # de reac de 0 a RDISS-1 !! */
277
278/* Radicals*/
279         if( (i > 200) && (i <= 240) )
280         {
281           KRPD[lat][s][j][0] += sCH3[l] * f;  /* CH3 -> 1CH2 + H */
282         }
283
284         if( (i > 230) && (i <= 300) )
285         {
286           KRPD[lat][s][j][13] += sC3H3[l] * f * 0.97;   /* C3H3 -> C3H2 + H */
287         }
288
289/* Compounds */
290
291         if( i != 125 )          /* Not Lyman alpha */
292         {
293            if ( i < 125 )
294            {
295              KRPD[lat][s][j][ 1] += sCH4[l]  * f * 0.17;   /* CH4 -> 1CH2 + H2 */
296              KRPD[lat][s][j][ 2] += sCH4[l]  * f * 0.48;   /* CH4 -> 3CH2 + H + H */
297              KRPD[lat][s][j][ 3] += sCH4[l]  * f * 0.09;   /* CH4 -> CH + H2 + H */
298              KRPD[lat][s][j][ 4] += sCH4[l]  * f * 0.26;   /* CH4 -> CH3 + H */
299            }
300            else
301            {
302              KRPD[lat][s][j][ 1] += sCH4[l]  * f * 0.50;   /* CH4 -> 1CH2 + H2 */
303              KRPD[lat][s][j][ 4] += sCH4[l]  * f * 0.50;   /* CH4 -> CH3 + H */
304            }
305         }
306         else                       /* Lyman alpha */
307         {
308            KRPD[lat][s][j][ 1] += sCH4[l]  * f * 0.48;     /* CH4 -> 1CH2 + H2 */
309            KRPD[lat][s][j][ 2] += sCH4[l]  * f * 0.03;     /* CH4 -> 3CH2 + H + H */
310            KRPD[lat][s][j][ 3] += sCH4[l]  * f * 0.07;     /* CH4 -> CH + H2 + H */
311            KRPD[lat][s][j][ 4] += sCH4[l]  * f * 0.42;     /* CH4 -> CH3 + H */
312         }
313
314         if( i > 110 )
315         {
316            KRPD[lat][s][j][ 5] += sC2H2[l] * f ;     /* C2H2 -> C2H + H */
317         }
318         if( i > 120 )
319         {
320            KRPD[lat][s][j][ 6] += sC2H4[l]   * f * 0.50;   /* C2H4 -> C2H2 + H2 */
321            KRPD[lat][s][j][ 7] += sC2H4[l]   * f * 0.50;   /* C2H4 -> C2H2 + H + H */
322            KRPD[lat][s][j][17] += sCH3C2H[l] * f * 0.89;   /* CH3CCH -> C3H3 + H */
323            KRPD[lat][s][j][18] += sCH3C2H[l] * f * 0.01;   /* CH3CCH -> C3H2 + H2 */
324            KRPD[lat][s][j][19] += sCH3C2H[l] * f * 0.10;   /* CH3CCH -> C2H2 + 1CH2 */
325         }
326         if( i > 220 )
327         {
328            KRPD[lat][s][j][14] += sCH2CCH2[l] * f * 0.90;  /* CH2CCH2 -> C3H3 + H */
329            KRPD[lat][s][j][15] += sCH2CCH2[l] * f * 0.10;  /* CH2CCH2 -> C3H2 + H2 */
330         }
331         else if( i > 155 )
332         {
333            KRPD[lat][s][j][14] += sCH2CCH2[l] * f * 0.89;  /* CH2CCH2 -> C3H3 + H */
334            KRPD[lat][s][j][15] += sCH2CCH2[l] * f * 0.11;  /* CH2CCH2 -> C3H2 + H2 */
335            KRPD[lat][s][j][16] += sCH2CCH2[l] * f * 0.01;  /* CH2CCH2 -> C2H2 + 1CH2 */
336         }
337         else if( i > 125 )
338         {
339            KRPD[lat][s][j][14] += sCH2CCH2[l] * f * 0.70;  /* CH2CCH2 -> C3H3 + H */
340            KRPD[lat][s][j][15] += sCH2CCH2[l] * f * 0.11;  /* CH2CCH2 -> C3H2 + H2 */
341            KRPD[lat][s][j][16] += sCH2CCH2[l] * f * 0.19;  /* CH2CCH2 -> C2H2 + 1CH2 */
342         }
343         if( i > 140 )
344         {
345            KRPD[lat][s][j][ 8] += sC2H6[l] * f * 0.56;     /* C2H6 -> C2H4 + H2 */
346            KRPD[lat][s][j][ 9] += sC2H6[l] * f * 0.13;     /* C2H6 -> C2H4 + H + H */
347            KRPD[lat][s][j][10] += sC2H6[l] * f * 0.29;     /* C2H6 -> C2H2 + H2 + H2 */
348            KRPD[lat][s][j][11] += sC2H6[l] * f * 0.02;     /* C2H6 -> CH4 + 1CH2 */
349            KRPD[lat][s][j][20] += sC3H6[l] * f * 0.10;     /* C3H6 -> CH2CCH2 + H + H */
350            KRPD[lat][s][j][21] += sC3H6[l] * f * 0.07;     /* C3H6 -> CH3CCH + H + H */
351            KRPD[lat][s][j][22] += sC3H6[l] * f * 0.03;     /* C3H6 -> C2H4 + CH2 */
352            KRPD[lat][s][j][23] += sC3H6[l] * f * 0.35;     /* C3H6 -> C2H3 + CH3 */
353            KRPD[lat][s][j][24] += sC3H6[l] * f * 0.05;     /* C3H6 -> C2H2 + CH4 */
354            KRPD[lat][s][j][25] += sC3H6[l] * f * 0.40;     /* C3H6 -> C3H5 + H */
355            KRPD[lat][s][j][26] += sC3H8[l] * f * 0.94;     /* C3H8 -> C3H6 + H2 */
356            KRPD[lat][s][j][29] += sC3H8[l] * f * 0.06;     /* C3H8 -> C2H4 + CH4 */
357            if ( i <= 160 )
358            {
359               KRPD[lat][s][j][41] += sC4H10[l] * f * 0.01;  /* C4H10 -> C3H6 + CH4 */
360               KRPD[lat][s][j][42] += sC4H10[l] * f * 0.04;  /* C4H10 -> C3H6 + CH3 + H */
361               KRPD[lat][s][j][43] += sC4H10[l] * f * 0.12;  /* C4H10 -> C2H4 + C2H6 */
362               KRPD[lat][s][j][44] += sC4H10[l] * f * 0.03;  /* C4H10 -> C2H4 + CH3 + CH3 */
363               KRPD[lat][s][j][45] += sC4H10[l] * f * 0.10;  /* C4H10 -> C2H5 + C2H5 */
364               KRPD[lat][s][j][46] += sC4H10[l] * f * 0.70;  /* C4H10 -> prod(C4H8) + H2 */
365            }
366         }
367         else
368         {
369            if( i > 110 )
370            {
371               KRPD[lat][s][j][ 8] += sC2H6[l] * f * 0.14;   /* C2H6 -> C2H4 + H2 */
372               KRPD[lat][s][j][ 9] += sC2H6[l] * f * 0.31;   /* C2H6 -> C2H4 + H + H */
373               KRPD[lat][s][j][10] += sC2H6[l] * f * 0.27;   /* C2H6 -> C2H2 + H2 + H2 */
374               KRPD[lat][s][j][11] += sC2H6[l] * f * 0.22;   /* C2H6 -> CH4 + 1CH2 */
375               KRPD[lat][s][j][12] += sC2H6[l] * f * 0.06;   /* C2H6 -> CH3 + CH3 */
376            }
377            if( i > 115 ) 
378            {
379               KRPD[lat][s][j][26] += sC3H8[l]  * f * 0.33;  /* C3H8  -> C3H6 + H2 */
380               KRPD[lat][s][j][27] += sC3H8[l]  * f * 0.09;  /* C3H8  -> C2H6 + 1CH2 */
381               KRPD[lat][s][j][28] += sC3H8[l]  * f * 0.38;  /* C3H8  -> C2H5 + CH3 */
382               KRPD[lat][s][j][29] += sC3H8[l]  * f * 0.20;  /* C3H8  -> C2H4 + CH4 */
383               KRPD[lat][s][j][41] += sC4H10[l] * f * 0.05;  /* C4H10 -> C3H6 + CH4 */
384               KRPD[lat][s][j][42] += sC4H10[l] * f * 0.10;  /* C4H10 -> C3H6 + CH3 + H */
385               KRPD[lat][s][j][43] += sC4H10[l] * f * 0.20;  /* C4H10 -> C2H4 + C2H6 */
386               KRPD[lat][s][j][44] += sC4H10[l] * f * 0.10;  /* C4H10 -> C2H4 + CH3 + CH3 */
387               KRPD[lat][s][j][45] += sC4H10[l] * f * 0.15;  /* C4H10 -> C2H5 + C2H5 */
388               KRPD[lat][s][j][46] += sC4H10[l] * f * 0.40;  /* C4H10 -> prod(C4H8) + H2 */
389            }
390            if( i > 125 ) 
391            {
392               KRPD[lat][s][j][20] += sC3H6[l] * f * 0.21;   /* C3H6 -> CH2CCH2 + H + H */
393               KRPD[lat][s][j][21] += sC3H6[l] * f * 0.14;   /* C3H6 -> CH3CCH + H + H */
394               KRPD[lat][s][j][22] += sC3H6[l] * f * 0.05;   /* C3H6 -> C2H4 + CH2 */
395               KRPD[lat][s][j][23] += sC3H6[l] * f * 0.25;   /* C3H6 -> C2H3 + CH3 */
396               KRPD[lat][s][j][24] += sC3H6[l] * f * 0.05;   /* C3H6 -> C2H2 + CH4 */
397               KRPD[lat][s][j][25] += sC3H6[l] * f * 0.30;   /* C3H6 -> C3H5 + H */
398            }
399         }
400         if ( i > 205 )
401         {
402            KRPD[lat][s][j][30] += sC4H2[l] * f * 1.00;     /* C4H2 -> C4H + H */
403         }
404         else if ( i > 180 )
405         {
406            KRPD[lat][s][j][30] += sC4H2[l] * f * 0.88;     /* C4H2 -> C4H + H */
407            KRPD[lat][s][j][32] += sC4H2[l] * f * 0.12;     /* C4H2 -> C2H2 + C2 */
408         }
409         else if ( i > 150 )
410         {
411            KRPD[lat][s][j][30] += sC4H2[l] * f * 0.80;     /* C4H2 -> C4H + H */
412            KRPD[lat][s][j][31] += sC4H2[l] * f * 0.01;     /* C4H2 -> C2H + C2H */
413            KRPD[lat][s][j][32] += sC4H2[l] * f * 0.16;     /* C4H2 -> C2H2 + C2 */
414         }
415         else if ( i > 120 )
416         {
417            KRPD[lat][s][j][30] += sC4H2[l] * f * 0.75;     /* C4H2 -> C4H + H */
418            KRPD[lat][s][j][31] += sC4H2[l] * f * 0.05;     /* C4H2 -> C2H + C2H */
419            KRPD[lat][s][j][32] += sC4H2[l] * f * 0.06;     /* C4H2 -> C2H2 + C2 */
420         }
421         if ( i > 130 )
422         {
423            KRPD[lat][s][j][33] += sC4H4[l] * f * 0.07;     /* C4H4 -> C4H2 + H2 */
424            KRPD[lat][s][j][34] += sC4H4[l] * f * 0.66;     /* C4H4 -> C2H2 + C2H2 */
425            KRPD[lat][s][j][35] += sC4H4[l] * f * 0.27;     /* C4H4 -> C4H3 + H */
426         }
427         if ( i > 135 )
428         {
429            KRPD[lat][s][j][36] += sC4H6[l] * f * 0.02;     /* C4H6 -> C4H4 + H2 */
430            KRPD[lat][s][j][37] += sC4H6[l] * f * 0.20;     /* C4H6 -> C2H4 + C2H2 */
431            KRPD[lat][s][j][38] += sC4H6[l] * f * 0.50;     /* C4H6 -> CH3 + C3H3 */
432            KRPD[lat][s][j][39] += sC4H6[l] * f * 0.20;     /* C4H6 -> C4H5 + H */
433            KRPD[lat][s][j][40] += sC4H6[l] * f * 0.08;     /* C4H6 -> C2H3 + C2H3 */
434            KRPD[lat][s][j][47] += sC6H6[l] * f;            /* C6H6 -> C6H5 + H */
435         }
436
437         KRPD[lat][s][j][48] += sN2[l] * f;  /* N2   -> 2N ( regroup N2D and N4S ) */
438
439         if( i > 190 )
440         {
441            KRPD[lat][s][j][50] += sHC3N[l]   * f;   /* HC3N -> C2H + CN */
442         }
443         else if( i > 105 )
444         {
445            KRPD[lat][s][j][50] += sHC3N[l]   * f * 0.43;   /* HC3N -> C2H + CN */
446            KRPD[lat][s][j][51] += sHC3N[l]   * f * 0.57;   /* HC3N -> C3N + H */
447         }
448         if( i > 100 )
449         {
450            KRPD[lat][s][j][49] += sHCN[l]   * f;   /* HCN -> CN + H */
451            KRPD[lat][s][j][52] += sC2N2[l]  * f;   /* NCCN -> CN + CN */
452            KRPD[lat][s][j][53] += sCH3CN[l] * f;   /* CH3CN -> CH3 + CN */
453         }
454         if( i > 105 )
455         {
456            KRPD[lat][s][j][54] += sC2N2[l] * f ;   /* C4N2 -> C3N + CN !! should be sC4N2[l] !!  */
457         }
458      }
459   }
460
461/* taux de dissociation de N2 ( e- et GCR ) */
462
463   for( lat = 0; lat <= (*NLAT)-1; lat++ ) 
464    for( s = 0; s <= 14; s++ )
465    {
466     for( j = 99; j <= NLRT-1; j++ )  /* level 100 = 200 km */
467      KRPD[lat][s][j][RDISS] = 1.0e-16;
468     for( j = 49; j <= 98; j++ )      /* level 50 = 100 km */
469      KRPD[lat][s][j][RDISS] = 1.0e-17+1.8e-18*(j-49);
470     for( j = 34; j <= 48; j++ )      /* level 35 = 70 km */
471      KRPD[lat][s][j][RDISS] = pow(10.,(-23+0.4*(j-34)));
472     for( j = 0; j <= 33; j++ )
473      KRPD[lat][s][j][RDISS] = 0.0e0;
474    }
475
476   fdm2d( flux, 0, NLEV, 0 );
477}
Note: See TracBrowser for help on using the repository browser.