JURASSIC
jurassic.c
Go to the documentation of this file.
1/*
2 This file is part of JURASSIC.
3
4 JURASSIC is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
8
9 JURASSIC is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU eneral Public License
15 along with JURASSIC. If not, see <http://www.gnu.org/licenses/>.
16
17 Copyright (C) 2003-2024 Forschungszentrum Juelich GmbH
18*/
19
25#include "jurassic.h"
26
27/*****************************************************************************/
28
29size_t atm2x(
30 const ctl_t * ctl,
31 const atm_t * atm,
32 gsl_vector * x,
33 int *iqa,
34 int *ipa) {
35
36 size_t n = 0;
37
38 /* Add pressure... */
39 for (int ip = 0; ip < atm->np; ip++)
40 if (atm->z[ip] >= ctl->retp_zmin && atm->z[ip] <= ctl->retp_zmax)
41 atm2x_help(atm->p[ip], IDXP, ip, x, iqa, ipa, &n);
42
43 /* Add temperature... */
44 for (int ip = 0; ip < atm->np; ip++)
45 if (atm->z[ip] >= ctl->rett_zmin && atm->z[ip] <= ctl->rett_zmax)
46 atm2x_help(atm->t[ip], IDXT, ip, x, iqa, ipa, &n);
47
48 /* Add volume mixing ratios... */
49 for (int ig = 0; ig < ctl->ng; ig++)
50 for (int ip = 0; ip < atm->np; ip++)
51 if (atm->z[ip] >= ctl->retq_zmin[ig]
52 && atm->z[ip] <= ctl->retq_zmax[ig])
53 atm2x_help(atm->q[ig][ip], IDXQ(ig), ip, x, iqa, ipa, &n);
54
55 /* Add extinction... */
56 for (int iw = 0; iw < ctl->nw; iw++)
57 for (int ip = 0; ip < atm->np; ip++)
58 if (atm->z[ip] >= ctl->retk_zmin[iw]
59 && atm->z[ip] <= ctl->retk_zmax[iw])
60 atm2x_help(atm->k[iw][ip], IDXK(iw), ip, x, iqa, ipa, &n);
61
62 /* Add cloud parameters... */
63 if (ctl->ret_clz)
64 atm2x_help(atm->clz, IDXCLZ, 0, x, iqa, ipa, &n);
65 if (ctl->ret_cldz)
66 atm2x_help(atm->cldz, IDXCLDZ, 0, x, iqa, ipa, &n);
67 if (ctl->ret_clk)
68 for (int icl = 0; icl < ctl->ncl; icl++)
69 atm2x_help(atm->clk[icl], IDXCLK(icl), 0, x, iqa, ipa, &n);
70
71 /* Add surface parameters... */
72 if (ctl->ret_sfz)
73 atm2x_help(atm->sfz, IDXSFZ, 0, x, iqa, ipa, &n);
74 if (ctl->ret_sfp)
75 atm2x_help(atm->sfp, IDXSFP, 0, x, iqa, ipa, &n);
76 if (ctl->ret_sft)
77 atm2x_help(atm->sft, IDXSFT, 0, x, iqa, ipa, &n);
78 if (ctl->ret_sfeps)
79 for (int isf = 0; isf < ctl->nsf; isf++)
80 atm2x_help(atm->sfeps[isf], IDXSFEPS(isf), 0, x, iqa, ipa, &n);
81
82 return n;
83}
84
85/*****************************************************************************/
86
88 const double value,
89 const int value_iqa,
90 const int value_ip,
91 gsl_vector * x,
92 int *iqa,
93 int *ipa,
94 size_t *n) {
95
96 /* Add element to state vector... */
97 if (x != NULL)
98 gsl_vector_set(x, *n, value);
99 if (iqa != NULL)
100 iqa[*n] = value_iqa;
101 if (ipa != NULL)
102 ipa[*n] = value_ip;
103 (*n)++;
104}
105
106/*****************************************************************************/
107
109 const double *x,
110 double *z,
111 double *lon,
112 double *lat) {
113
114 const double radius = NORM(x);
115
116 *lat = RAD2DEG(asin(x[2] / radius));
117 *lon = RAD2DEG(atan2(x[1], x[0]));
118 *z = radius - RE;
119}
120
121/*****************************************************************************/
122
124 const ctl_t * ctl,
125 atm_t * atm) {
126
127 static double z[121] = {
128 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
129 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
130 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
131 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
132 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
133 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107,
134 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120
135 };
136
137 static double pre[121] = {
138 1017, 901.083, 796.45, 702.227, 617.614, 541.644, 473.437, 412.288,
139 357.603, 308.96, 265.994, 228.348, 195.619, 167.351, 143.039, 122.198,
140 104.369, 89.141, 76.1528, 65.0804, 55.641, 47.591, 40.7233, 34.8637,
141 29.8633, 25.5956, 21.9534, 18.8445, 16.1909, 13.9258, 11.9913,
142 10.34, 8.92988, 7.72454, 6.6924, 5.80701, 5.04654, 4.39238, 3.82902,
143 3.34337, 2.92413, 2.56128, 2.2464, 1.97258, 1.73384, 1.52519, 1.34242,
144 1.18197, 1.04086, 0.916546, 0.806832, 0.709875, 0.624101, 0.548176,
145 0.480974, 0.421507, 0.368904, 0.322408, 0.281386, 0.245249, 0.213465,
146 0.185549, 0.161072, 0.139644, 0.120913, 0.104568, 0.0903249, 0.0779269,
147 0.0671493, 0.0577962, 0.0496902, 0.0426736, 0.0366093, 0.0313743,
148 0.0268598, 0.0229699, 0.0196206, 0.0167399, 0.0142646, 0.0121397,
149 0.0103181, 0.00875775, 0.00742226, 0.00628076, 0.00530519, 0.00447183,
150 0.00376124, 0.00315632, 0.00264248, 0.00220738, 0.00184003, 0.00153095,
151 0.00127204, 0.00105608, 0.000876652, 0.00072798, 0.00060492,
152 0.000503201, 0.000419226, 0.000349896, 0.000292659, 0.000245421,
153 0.000206394, 0.000174125, 0.000147441, 0.000125333, 0.000106985,
154 9.173e-05, 7.90172e-05, 6.84172e-05, 5.95574e-05, 5.21183e-05,
155 4.58348e-05, 4.05127e-05, 3.59987e-05, 3.21583e-05, 2.88718e-05,
156 2.60322e-05, 2.35687e-05, 2.14263e-05, 1.95489e-05
157 };
158
159 static double tem[121] = {
160 285.14, 279.34, 273.91, 268.3, 263.24, 256.55, 250.2, 242.82, 236.17,
161 229.87, 225.04, 221.19, 218.85, 217.19, 216.2, 215.68, 215.42, 215.55,
162 215.92, 216.4, 216.93, 217.45, 218, 218.68, 219.39, 220.25, 221.3,
163 222.41, 223.88, 225.42, 227.2, 229.52, 231.89, 234.51, 236.85, 239.42,
164 241.94, 244.57, 247.36, 250.32, 253.34, 255.82, 258.27, 260.39,
165 262.03, 263.45, 264.2, 264.78, 264.67, 264.38, 263.24, 262.03, 260.02,
166 258.09, 255.63, 253.28, 250.43, 247.81, 245.26, 242.77, 240.38,
167 237.94, 235.79, 233.53, 231.5, 229.53, 227.6, 225.62, 223.77, 222.06,
168 220.33, 218.69, 217.18, 215.64, 214.13, 212.52, 210.86, 209.25,
169 207.49, 205.81, 204.11, 202.22, 200.32, 198.39, 195.92, 193.46,
170 190.94, 188.31, 185.82, 183.57, 181.43, 179.74, 178.64, 178.1, 178.25,
171 178.7, 179.41, 180.67, 182.31, 184.18, 186.6, 189.53, 192.66, 196.54,
172 201.13, 205.93, 211.73, 217.86, 225, 233.53, 242.57, 252.14, 261.48,
173 272.97, 285.26, 299.12, 312.2, 324.17, 338.34, 352.56, 365.28
174 };
175
176 static double c2h2[121] = {
177 1.352e-09, 2.83e-10, 1.269e-10, 6.926e-11, 4.346e-11, 2.909e-11,
178 2.014e-11, 1.363e-11, 8.71e-12, 5.237e-12, 2.718e-12, 1.375e-12,
179 5.786e-13, 2.16e-13, 7.317e-14, 2.551e-14, 1.055e-14, 4.758e-15,
180 2.056e-15, 7.703e-16, 2.82e-16, 1.035e-16, 4.382e-17, 1.946e-17,
181 9.638e-18, 5.2e-18, 2.811e-18, 1.494e-18, 7.925e-19, 4.213e-19,
182 1.998e-19, 8.78e-20, 3.877e-20, 1.728e-20, 7.743e-21, 3.536e-21,
183 1.623e-21, 7.508e-22, 3.508e-22, 1.65e-22, 7.837e-23, 3.733e-23,
184 1.808e-23, 8.77e-24, 4.285e-24, 2.095e-24, 1.032e-24, 5.082e-25,
185 2.506e-25, 1.236e-25, 6.088e-26, 2.996e-26, 1.465e-26, 0, 0, 0,
186 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
187 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
188 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
189 };
190
191 static double c2h6[121] = {
192 2.667e-09, 2.02e-09, 1.658e-09, 1.404e-09, 1.234e-09, 1.109e-09,
193 1.012e-09, 9.262e-10, 8.472e-10, 7.71e-10, 6.932e-10, 6.216e-10,
194 5.503e-10, 4.87e-10, 4.342e-10, 3.861e-10, 3.347e-10, 2.772e-10,
195 2.209e-10, 1.672e-10, 1.197e-10, 8.536e-11, 5.783e-11, 3.846e-11,
196 2.495e-11, 1.592e-11, 1.017e-11, 6.327e-12, 3.895e-12, 2.403e-12,
197 1.416e-12, 8.101e-13, 4.649e-13, 2.686e-13, 1.557e-13, 9.14e-14,
198 5.386e-14, 3.19e-14, 1.903e-14, 1.14e-14, 6.875e-15, 4.154e-15,
199 2.538e-15, 1.553e-15, 9.548e-16, 5.872e-16, 3.63e-16, 2.244e-16,
200 1.388e-16, 8.587e-17, 5.308e-17, 3.279e-17, 2.017e-17, 1.238e-17,
201 7.542e-18, 4.585e-18, 2.776e-18, 1.671e-18, 9.985e-19, 5.937e-19,
202 3.518e-19, 2.07e-19, 1.215e-19, 7.06e-20, 4.097e-20, 2.37e-20,
203 1.363e-20, 7.802e-21, 4.441e-21, 2.523e-21, 1.424e-21, 8.015e-22,
204 4.497e-22, 2.505e-22, 1.391e-22, 7.691e-23, 4.238e-23, 2.331e-23,
205 1.274e-23, 6.929e-24, 3.752e-24, 2.02e-24, 1.083e-24, 5.774e-25,
206 3.041e-25, 1.593e-25, 8.308e-26, 4.299e-26, 2.195e-26, 1.112e-26,
207 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
208 0, 0, 0, 0, 0, 0, 0, 0, 0
209 };
210
211 static double ccl4[121] = {
212 1.075e-10, 1.075e-10, 1.075e-10, 1.075e-10, 1.075e-10, 1.075e-10,
213 1.075e-10, 1.075e-10, 1.075e-10, 1.06e-10, 1.024e-10, 9.69e-11,
214 8.93e-11, 8.078e-11, 7.213e-11, 6.307e-11, 5.383e-11, 4.49e-11,
215 3.609e-11, 2.705e-11, 1.935e-11, 1.385e-11, 8.35e-12, 5.485e-12,
216 3.853e-12, 2.22e-12, 5.875e-13, 3.445e-13, 1.015e-13, 6.075e-14,
217 4.383e-14, 2.692e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14,
218 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14,
219 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14,
220 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14,
221 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14,
222 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14,
223 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14,
224 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14,
225 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14, 1e-14,
226 1e-14, 1e-14, 1e-14
227 };
228
229 static double ch4[121] = {
230 1.864e-06, 1.835e-06, 1.819e-06, 1.805e-06, 1.796e-06, 1.788e-06,
231 1.782e-06, 1.776e-06, 1.769e-06, 1.761e-06, 1.749e-06, 1.734e-06,
232 1.716e-06, 1.692e-06, 1.654e-06, 1.61e-06, 1.567e-06, 1.502e-06,
233 1.433e-06, 1.371e-06, 1.323e-06, 1.277e-06, 1.232e-06, 1.188e-06,
234 1.147e-06, 1.108e-06, 1.07e-06, 1.027e-06, 9.854e-07, 9.416e-07,
235 8.933e-07, 8.478e-07, 7.988e-07, 7.515e-07, 7.07e-07, 6.64e-07,
236 6.239e-07, 5.864e-07, 5.512e-07, 5.184e-07, 4.87e-07, 4.571e-07,
237 4.296e-07, 4.04e-07, 3.802e-07, 3.578e-07, 3.383e-07, 3.203e-07,
238 3.032e-07, 2.889e-07, 2.76e-07, 2.635e-07, 2.519e-07, 2.409e-07,
239 2.302e-07, 2.219e-07, 2.144e-07, 2.071e-07, 1.999e-07, 1.93e-07,
240 1.862e-07, 1.795e-07, 1.731e-07, 1.668e-07, 1.607e-07, 1.548e-07,
241 1.49e-07, 1.434e-07, 1.38e-07, 1.328e-07, 1.277e-07, 1.227e-07,
242 1.18e-07, 1.134e-07, 1.089e-07, 1.046e-07, 1.004e-07, 9.635e-08,
243 9.245e-08, 8.867e-08, 8.502e-08, 8.15e-08, 7.809e-08, 7.48e-08,
244 7.159e-08, 6.849e-08, 6.55e-08, 6.262e-08, 5.98e-08, 5.708e-08,
245 5.448e-08, 5.194e-08, 4.951e-08, 4.72e-08, 4.5e-08, 4.291e-08,
246 4.093e-08, 3.905e-08, 3.729e-08, 3.563e-08, 3.408e-08, 3.265e-08,
247 3.128e-08, 2.996e-08, 2.87e-08, 2.76e-08, 2.657e-08, 2.558e-08,
248 2.467e-08, 2.385e-08, 2.307e-08, 2.234e-08, 2.168e-08, 2.108e-08,
249 2.05e-08, 1.998e-08, 1.947e-08, 1.902e-08, 1.86e-08, 1.819e-08,
250 1.782e-08
251 };
252
253 static double clo[121] = {
254 7.419e-15, 1.061e-14, 1.518e-14, 2.195e-14, 3.175e-14, 4.666e-14,
255 6.872e-14, 1.03e-13, 1.553e-13, 2.375e-13, 3.664e-13, 5.684e-13,
256 8.915e-13, 1.402e-12, 2.269e-12, 4.125e-12, 7.501e-12, 1.257e-11,
257 2.048e-11, 3.338e-11, 5.44e-11, 8.846e-11, 1.008e-10, 1.082e-10,
258 1.157e-10, 1.232e-10, 1.312e-10, 1.539e-10, 1.822e-10, 2.118e-10,
259 2.387e-10, 2.687e-10, 2.875e-10, 3.031e-10, 3.23e-10, 3.648e-10,
260 4.117e-10, 4.477e-10, 4.633e-10, 4.794e-10, 4.95e-10, 5.104e-10,
261 5.259e-10, 5.062e-10, 4.742e-10, 4.443e-10, 4.051e-10, 3.659e-10,
262 3.305e-10, 2.911e-10, 2.54e-10, 2.215e-10, 1.927e-10, 1.675e-10,
263 1.452e-10, 1.259e-10, 1.09e-10, 9.416e-11, 8.119e-11, 6.991e-11,
264 6.015e-11, 5.163e-11, 4.43e-11, 3.789e-11, 3.24e-11, 2.769e-11,
265 2.361e-11, 2.011e-11, 1.71e-11, 1.453e-11, 1.233e-11, 1.045e-11,
266 8.851e-12, 7.48e-12, 6.316e-12, 5.326e-12, 4.487e-12, 3.778e-12,
267 3.176e-12, 2.665e-12, 2.234e-12, 1.87e-12, 1.563e-12, 1.304e-12,
268 1.085e-12, 9.007e-13, 7.468e-13, 6.179e-13, 5.092e-13, 4.188e-13,
269 3.442e-13, 2.816e-13, 2.304e-13, 1.885e-13, 1.542e-13, 1.263e-13,
270 1.035e-13, 8.5e-14, 7.004e-14, 5.783e-14, 4.795e-14, 4.007e-14,
271 3.345e-14, 2.792e-14, 2.33e-14, 1.978e-14, 1.686e-14, 1.438e-14,
272 1.234e-14, 1.07e-14, 9.312e-15, 8.131e-15, 7.164e-15, 6.367e-15,
273 5.67e-15, 5.088e-15, 4.565e-15, 4.138e-15, 3.769e-15, 3.432e-15,
274 3.148e-15
275 };
276
277 static double clono2[121] = {
278 1.011e-13, 1.515e-13, 2.272e-13, 3.446e-13, 5.231e-13, 8.085e-13,
279 1.253e-12, 1.979e-12, 3.149e-12, 5.092e-12, 8.312e-12, 1.366e-11,
280 2.272e-11, 3.791e-11, 6.209e-11, 9.101e-11, 1.334e-10, 1.951e-10,
281 2.853e-10, 3.94e-10, 4.771e-10, 5.771e-10, 6.675e-10, 7.665e-10,
282 8.504e-10, 8.924e-10, 9.363e-10, 8.923e-10, 8.411e-10, 7.646e-10,
283 6.525e-10, 5.576e-10, 4.398e-10, 3.403e-10, 2.612e-10, 1.915e-10,
284 1.407e-10, 1.028e-10, 7.455e-11, 5.42e-11, 3.708e-11, 2.438e-11,
285 1.618e-11, 1.075e-11, 7.17e-12, 4.784e-12, 3.205e-12, 2.147e-12,
286 1.44e-12, 9.654e-13, 6.469e-13, 4.332e-13, 2.891e-13, 1.926e-13,
287 1.274e-13, 8.422e-14, 5.547e-14, 3.636e-14, 2.368e-14, 1.536e-14,
288 9.937e-15, 6.39e-15, 4.101e-15, 2.61e-15, 1.659e-15, 1.052e-15,
289 6.638e-16, 4.172e-16, 2.61e-16, 1.63e-16, 1.013e-16, 6.275e-17,
290 3.879e-17, 2.383e-17, 1.461e-17, 8.918e-18, 5.43e-18, 3.301e-18,
291 1.997e-18, 1.203e-18, 7.216e-19, 4.311e-19, 2.564e-19, 1.519e-19,
292 8.911e-20, 5.203e-20, 3.026e-20, 1.748e-20, 9.99e-21, 5.673e-21,
293 3.215e-21, 1.799e-21, 1.006e-21, 5.628e-22, 3.146e-22, 1.766e-22,
294 9.94e-23, 5.614e-23, 3.206e-23, 1.841e-23, 1.071e-23, 6.366e-24,
295 3.776e-24, 2.238e-24, 1.326e-24, 8.253e-25, 5.201e-25, 3.279e-25,
296 2.108e-25, 1.395e-25, 9.326e-26, 6.299e-26, 4.365e-26, 3.104e-26,
297 2.219e-26, 1.621e-26, 1.185e-26, 8.92e-27, 6.804e-27, 5.191e-27,
298 4.041e-27
299 };
300
301 static double co[121] = {
302 1.907e-07, 1.553e-07, 1.362e-07, 1.216e-07, 1.114e-07, 1.036e-07,
303 9.737e-08, 9.152e-08, 8.559e-08, 7.966e-08, 7.277e-08, 6.615e-08,
304 5.884e-08, 5.22e-08, 4.699e-08, 4.284e-08, 3.776e-08, 3.274e-08,
305 2.845e-08, 2.479e-08, 2.246e-08, 2.054e-08, 1.991e-08, 1.951e-08,
306 1.94e-08, 2.009e-08, 2.1e-08, 2.201e-08, 2.322e-08, 2.45e-08,
307 2.602e-08, 2.73e-08, 2.867e-08, 2.998e-08, 3.135e-08, 3.255e-08,
308 3.352e-08, 3.426e-08, 3.484e-08, 3.53e-08, 3.593e-08, 3.671e-08,
309 3.759e-08, 3.945e-08, 4.192e-08, 4.49e-08, 5.03e-08, 5.703e-08,
310 6.538e-08, 7.878e-08, 9.644e-08, 1.196e-07, 1.498e-07, 1.904e-07,
311 2.422e-07, 3.055e-07, 3.804e-07, 4.747e-07, 5.899e-07, 7.272e-07,
312 8.91e-07, 1.071e-06, 1.296e-06, 1.546e-06, 1.823e-06, 2.135e-06,
313 2.44e-06, 2.714e-06, 2.967e-06, 3.189e-06, 3.391e-06, 3.58e-06,
314 3.773e-06, 4.022e-06, 4.346e-06, 4.749e-06, 5.199e-06, 5.668e-06,
315 6.157e-06, 6.688e-06, 7.254e-06, 7.867e-06, 8.539e-06, 9.26e-06,
316 1.009e-05, 1.119e-05, 1.228e-05, 1.365e-05, 1.506e-05, 1.641e-05,
317 1.784e-05, 1.952e-05, 2.132e-05, 2.323e-05, 2.531e-05, 2.754e-05,
318 3.047e-05, 3.459e-05, 3.922e-05, 4.439e-05, 4.825e-05, 5.077e-05,
319 5.34e-05, 5.618e-05, 5.909e-05, 6.207e-05, 6.519e-05, 6.845e-05,
320 6.819e-05, 6.726e-05, 6.622e-05, 6.512e-05, 6.671e-05, 6.862e-05,
321 7.048e-05, 7.264e-05, 7.3e-05, 7.3e-05, 7.3e-05, 7.3e-05, 7.3e-05
322 };
323
324 static double cof2[121] = {
325 7.5e-14, 1.055e-13, 1.485e-13, 2.111e-13, 3.001e-13, 4.333e-13,
326 6.269e-13, 9.221e-13, 1.364e-12, 2.046e-12, 3.093e-12, 4.703e-12,
327 7.225e-12, 1.113e-11, 1.66e-11, 2.088e-11, 2.626e-11, 3.433e-11,
328 4.549e-11, 5.886e-11, 7.21e-11, 8.824e-11, 1.015e-10, 1.155e-10,
329 1.288e-10, 1.388e-10, 1.497e-10, 1.554e-10, 1.606e-10, 1.639e-10,
330 1.64e-10, 1.64e-10, 1.596e-10, 1.542e-10, 1.482e-10, 1.382e-10,
331 1.289e-10, 1.198e-10, 1.109e-10, 1.026e-10, 9.484e-11, 8.75e-11,
332 8.086e-11, 7.49e-11, 6.948e-11, 6.446e-11, 5.961e-11, 5.505e-11,
333 5.085e-11, 4.586e-11, 4.1e-11, 3.665e-11, 3.235e-11, 2.842e-11,
334 2.491e-11, 2.11e-11, 1.769e-11, 1.479e-11, 1.197e-11, 9.631e-12,
335 7.74e-12, 6.201e-12, 4.963e-12, 3.956e-12, 3.151e-12, 2.507e-12,
336 1.99e-12, 1.576e-12, 1.245e-12, 9.83e-13, 7.742e-13, 6.088e-13,
337 4.782e-13, 3.745e-13, 2.929e-13, 2.286e-13, 1.782e-13, 1.388e-13,
338 1.079e-13, 8.362e-14, 6.471e-14, 4.996e-14, 3.85e-14, 2.96e-14,
339 2.265e-14, 1.729e-14, 1.317e-14, 9.998e-15, 7.549e-15, 5.683e-15,
340 4.273e-15, 3.193e-15, 2.385e-15, 1.782e-15, 1.331e-15, 9.957e-16,
341 7.461e-16, 5.601e-16, 4.228e-16, 3.201e-16, 2.438e-16, 1.878e-16,
342 1.445e-16, 1.111e-16, 8.544e-17, 6.734e-17, 5.341e-17, 4.237e-17,
343 3.394e-17, 2.759e-17, 2.254e-17, 1.851e-17, 1.54e-17, 1.297e-17,
344 1.096e-17, 9.365e-18, 8e-18, 6.938e-18, 6.056e-18, 5.287e-18,
345 4.662e-18
346 };
347
348 static double f11[121] = {
349 2.65e-10, 2.65e-10, 2.65e-10, 2.65e-10, 2.65e-10, 2.65e-10, 2.65e-10,
350 2.65e-10, 2.65e-10, 2.65e-10, 2.65e-10, 2.65e-10, 2.635e-10, 2.536e-10,
351 2.44e-10, 2.348e-10, 2.258e-10, 2.153e-10, 2.046e-10, 1.929e-10,
352 1.782e-10, 1.648e-10, 1.463e-10, 1.291e-10, 1.1e-10, 8.874e-11,
353 7.165e-11, 5.201e-11, 3.744e-11, 2.577e-11, 1.64e-11, 1.048e-11,
354 5.993e-12, 3.345e-12, 1.839e-12, 9.264e-13, 4.688e-13, 2.329e-13,
355 1.129e-13, 5.505e-14, 2.825e-14, 1.492e-14, 7.997e-15, 5.384e-15,
356 3.988e-15, 2.955e-15, 2.196e-15, 1.632e-15, 1.214e-15, 9.025e-16,
357 6.708e-16, 4.984e-16, 3.693e-16, 2.733e-16, 2.013e-16, 1.481e-16,
358 1.087e-16, 7.945e-17, 5.782e-17, 4.195e-17, 3.038e-17, 2.19e-17,
359 1.577e-17, 1.128e-17, 8.063e-18, 5.753e-18, 4.09e-18, 2.899e-18,
360 2.048e-18, 1.444e-18, 1.015e-18, 7.12e-19, 4.985e-19, 3.474e-19,
361 2.417e-19, 1.677e-19, 1.161e-19, 8.029e-20, 5.533e-20, 3.799e-20,
362 2.602e-20, 1.776e-20, 1.209e-20, 8.202e-21, 5.522e-21, 3.707e-21,
363 2.48e-21, 1.652e-21, 1.091e-21, 7.174e-22, 4.709e-22, 3.063e-22,
364 1.991e-22, 1.294e-22, 8.412e-23, 5.483e-23, 3.581e-23, 2.345e-23,
365 1.548e-23, 1.027e-23, 6.869e-24, 4.673e-24, 3.173e-24, 2.153e-24,
366 1.461e-24, 1.028e-24, 7.302e-25, 5.188e-25, 3.739e-25, 2.753e-25,
367 2.043e-25, 1.528e-25, 1.164e-25, 9.041e-26, 7.051e-26, 5.587e-26,
368 4.428e-26, 3.588e-26, 2.936e-26, 2.402e-26, 1.995e-26
369 };
370
371 static double f12[121] = {
372 5.45e-10, 5.45e-10, 5.45e-10, 5.45e-10, 5.45e-10, 5.45e-10, 5.45e-10,
373 5.45e-10, 5.45e-10, 5.45e-10, 5.45e-10, 5.45e-10, 5.429e-10, 5.291e-10,
374 5.155e-10, 5.022e-10, 4.893e-10, 4.772e-10, 4.655e-10, 4.497e-10,
375 4.249e-10, 4.015e-10, 3.632e-10, 3.261e-10, 2.858e-10, 2.408e-10,
376 2.03e-10, 1.685e-10, 1.4e-10, 1.163e-10, 9.65e-11, 8.02e-11, 6.705e-11,
377 5.624e-11, 4.764e-11, 4.249e-11, 3.792e-11, 3.315e-11, 2.819e-11,
378 2.4e-11, 1.999e-11, 1.64e-11, 1.352e-11, 1.14e-11, 9.714e-12,
379 8.28e-12, 7.176e-12, 6.251e-12, 5.446e-12, 4.72e-12, 4.081e-12,
380 3.528e-12, 3.08e-12, 2.699e-12, 2.359e-12, 2.111e-12, 1.901e-12,
381 1.709e-12, 1.534e-12, 1.376e-12, 1.233e-12, 1.103e-12, 9.869e-13,
382 8.808e-13, 7.859e-13, 7.008e-13, 6.241e-13, 5.553e-13, 4.935e-13,
383 4.383e-13, 3.889e-13, 3.447e-13, 3.054e-13, 2.702e-13, 2.389e-13,
384 2.11e-13, 1.862e-13, 1.643e-13, 1.448e-13, 1.274e-13, 1.121e-13,
385 9.844e-14, 8.638e-14, 7.572e-14, 6.62e-14, 5.782e-14, 5.045e-14,
386 4.394e-14, 3.817e-14, 3.311e-14, 2.87e-14, 2.48e-14, 2.142e-14,
387 1.851e-14, 1.599e-14, 1.383e-14, 1.196e-14, 1.036e-14, 9e-15,
388 7.828e-15, 6.829e-15, 5.992e-15, 5.254e-15, 4.606e-15, 4.037e-15,
389 3.583e-15, 3.19e-15, 2.841e-15, 2.542e-15, 2.291e-15, 2.07e-15,
390 1.875e-15, 1.71e-15, 1.57e-15, 1.442e-15, 1.333e-15, 1.232e-15,
391 1.147e-15, 1.071e-15, 1.001e-15, 9.396e-16
392 };
393
394 static double f14[121] = {
395 9e-11, 9e-11, 9e-11, 9e-11, 9e-11, 9e-11, 9e-11, 9e-11, 9e-11, 9e-11,
396 9e-11, 9e-11, 9e-11, 9e-11, 9e-11, 8.91e-11, 8.73e-11, 8.46e-11,
397 8.19e-11, 7.92e-11, 7.74e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11,
398 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11,
399 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11,
400 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11,
401 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11,
402 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11,
403 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11,
404 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11,
405 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11,
406 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11,
407 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11,
408 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11,
409 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11,
410 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11,
411 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11, 7.65e-11
412 };
413
414 static double f22[121] = {
415 1.4e-10, 1.4e-10, 1.4e-10, 1.4e-10, 1.4e-10, 1.4e-10, 1.4e-10,
416 1.4e-10, 1.4e-10, 1.4e-10, 1.372e-10, 1.317e-10, 1.235e-10, 1.153e-10,
417 1.075e-10, 1.002e-10, 9.332e-11, 8.738e-11, 8.194e-11, 7.7e-11,
418 7.165e-11, 6.753e-11, 6.341e-11, 5.971e-11, 5.6e-11, 5.229e-11,
419 4.859e-11, 4.488e-11, 4.118e-11, 3.83e-11, 3.568e-11, 3.308e-11,
420 3.047e-11, 2.82e-11, 2.594e-11, 2.409e-11, 2.237e-11, 2.065e-11,
421 1.894e-11, 1.771e-11, 1.647e-11, 1.532e-11, 1.416e-11, 1.332e-11,
422 1.246e-11, 1.161e-11, 1.087e-11, 1.017e-11, 9.471e-12, 8.853e-12,
423 8.235e-12, 7.741e-12, 7.247e-12, 6.836e-12, 6.506e-12, 6.176e-12,
424 5.913e-12, 5.65e-12, 5.419e-12, 5.221e-12, 5.024e-12, 4.859e-12,
425 4.694e-12, 4.546e-12, 4.414e-12, 4.282e-12, 4.15e-12, 4.019e-12,
426 3.903e-12, 3.805e-12, 3.706e-12, 3.607e-12, 3.508e-12, 3.41e-12,
427 3.31e-12, 3.212e-12, 3.129e-12, 3.047e-12, 2.964e-12, 2.882e-12,
428 2.8e-12, 2.734e-12, 2.668e-12, 2.602e-12, 2.537e-12, 2.471e-12,
429 2.421e-12, 2.372e-12, 2.322e-12, 2.273e-12, 2.224e-12, 2.182e-12,
430 2.141e-12, 2.1e-12, 2.059e-12, 2.018e-12, 1.977e-12, 1.935e-12,
431 1.894e-12, 1.853e-12, 1.812e-12, 1.77e-12, 1.73e-12, 1.688e-12,
432 1.647e-12, 1.606e-12, 1.565e-12, 1.524e-12, 1.483e-12, 1.441e-12,
433 1.4e-12, 1.359e-12, 1.317e-12, 1.276e-12, 1.235e-12, 1.194e-12,
434 1.153e-12, 1.112e-12, 1.071e-12, 1.029e-12, 9.883e-13
435 };
436
437 static double h2o[121] = {
438 0.01166, 0.008269, 0.005742, 0.003845, 0.00277, 0.001897, 0.001272,
439 0.000827, 0.000539, 0.0003469, 0.0001579, 3.134e-05, 1.341e-05,
440 6.764e-06, 4.498e-06, 3.703e-06, 3.724e-06, 3.899e-06, 4.002e-06,
441 4.122e-06, 4.277e-06, 4.438e-06, 4.558e-06, 4.673e-06, 4.763e-06,
442 4.809e-06, 4.856e-06, 4.936e-06, 5.021e-06, 5.114e-06, 5.222e-06,
443 5.331e-06, 5.414e-06, 5.488e-06, 5.563e-06, 5.633e-06, 5.704e-06,
444 5.767e-06, 5.819e-06, 5.872e-06, 5.914e-06, 5.949e-06, 5.984e-06,
445 6.015e-06, 6.044e-06, 6.073e-06, 6.104e-06, 6.136e-06, 6.167e-06,
446 6.189e-06, 6.208e-06, 6.226e-06, 6.212e-06, 6.185e-06, 6.158e-06,
447 6.114e-06, 6.066e-06, 6.018e-06, 5.877e-06, 5.728e-06, 5.582e-06,
448 5.437e-06, 5.296e-06, 5.156e-06, 5.02e-06, 4.886e-06, 4.754e-06,
449 4.625e-06, 4.498e-06, 4.374e-06, 4.242e-06, 4.096e-06, 3.955e-06,
450 3.817e-06, 3.683e-06, 3.491e-06, 3.204e-06, 2.94e-06, 2.696e-06,
451 2.47e-06, 2.252e-06, 2.019e-06, 1.808e-06, 1.618e-06, 1.445e-06,
452 1.285e-06, 1.105e-06, 9.489e-07, 8.121e-07, 6.938e-07, 5.924e-07,
453 5.04e-07, 4.288e-07, 3.648e-07, 3.103e-07, 2.642e-07, 2.252e-07,
454 1.921e-07, 1.643e-07, 1.408e-07, 1.211e-07, 1.048e-07, 9.063e-08,
455 7.835e-08, 6.774e-08, 5.936e-08, 5.221e-08, 4.592e-08, 4.061e-08,
456 3.62e-08, 3.236e-08, 2.902e-08, 2.62e-08, 2.383e-08, 2.171e-08,
457 1.989e-08, 1.823e-08, 1.684e-08, 1.562e-08, 1.449e-08, 1.351e-08
458 };
459
460 static double h2o2[121] = {
461 1.779e-10, 7.938e-10, 8.953e-10, 8.032e-10, 6.564e-10, 5.159e-10,
462 4.003e-10, 3.026e-10, 2.222e-10, 1.58e-10, 1.044e-10, 6.605e-11,
463 3.413e-11, 1.453e-11, 1.062e-11, 1.009e-11, 9.597e-12, 1.175e-11,
464 1.572e-11, 2.091e-11, 2.746e-11, 3.603e-11, 4.791e-11, 6.387e-11,
465 8.239e-11, 1.007e-10, 1.23e-10, 1.363e-10, 1.489e-10, 1.585e-10,
466 1.608e-10, 1.632e-10, 1.576e-10, 1.502e-10, 1.423e-10, 1.302e-10,
467 1.192e-10, 1.085e-10, 9.795e-11, 8.854e-11, 8.057e-11, 7.36e-11,
468 6.736e-11, 6.362e-11, 6.087e-11, 5.825e-11, 5.623e-11, 5.443e-11,
469 5.27e-11, 5.098e-11, 4.931e-11, 4.769e-11, 4.611e-11, 4.458e-11,
470 4.308e-11, 4.102e-11, 3.887e-11, 3.682e-11, 3.521e-11, 3.369e-11,
471 3.224e-11, 3.082e-11, 2.946e-11, 2.814e-11, 2.687e-11, 2.566e-11,
472 2.449e-11, 2.336e-11, 2.227e-11, 2.123e-11, 2.023e-11, 1.927e-11,
473 1.835e-11, 1.746e-11, 1.661e-11, 1.58e-11, 1.502e-11, 1.428e-11,
474 1.357e-11, 1.289e-11, 1.224e-11, 1.161e-11, 1.102e-11, 1.045e-11,
475 9.895e-12, 9.369e-12, 8.866e-12, 8.386e-12, 7.922e-12, 7.479e-12,
476 7.06e-12, 6.656e-12, 6.274e-12, 5.914e-12, 5.575e-12, 5.257e-12,
477 4.959e-12, 4.679e-12, 4.42e-12, 4.178e-12, 3.954e-12, 3.75e-12,
478 3.557e-12, 3.372e-12, 3.198e-12, 3.047e-12, 2.908e-12, 2.775e-12,
479 2.653e-12, 2.544e-12, 2.442e-12, 2.346e-12, 2.26e-12, 2.183e-12,
480 2.11e-12, 2.044e-12, 1.98e-12, 1.924e-12, 1.871e-12, 1.821e-12,
481 1.775e-12
482 };
483
484 static double hcn[121] = {
485 5.5e-10, 5.5e-10, 5.5e-10, 5.5e-10, 5.5e-10, 5.5e-10, 5.5e-10,
486 5.5e-10, 5.5e-10, 5.5e-10, 5.5e-10, 5.498e-10, 5.495e-10, 5.493e-10,
487 5.49e-10, 5.488e-10, 4.717e-10, 3.946e-10, 3.174e-10, 2.4e-10,
488 1.626e-10, 1.619e-10, 1.612e-10, 1.602e-10, 1.593e-10, 1.582e-10,
489 1.572e-10, 1.56e-10, 1.549e-10, 1.539e-10, 1.53e-10, 1.519e-10,
490 1.506e-10, 1.487e-10, 1.467e-10, 1.449e-10, 1.43e-10, 1.413e-10,
491 1.397e-10, 1.382e-10, 1.368e-10, 1.354e-10, 1.337e-10, 1.315e-10,
492 1.292e-10, 1.267e-10, 1.241e-10, 1.215e-10, 1.19e-10, 1.165e-10,
493 1.141e-10, 1.118e-10, 1.096e-10, 1.072e-10, 1.047e-10, 1.021e-10,
494 9.968e-11, 9.739e-11, 9.539e-11, 9.339e-11, 9.135e-11, 8.898e-11,
495 8.664e-11, 8.439e-11, 8.249e-11, 8.075e-11, 7.904e-11, 7.735e-11,
496 7.565e-11, 7.399e-11, 7.245e-11, 7.109e-11, 6.982e-11, 6.863e-11,
497 6.755e-11, 6.657e-11, 6.587e-11, 6.527e-11, 6.476e-11, 6.428e-11,
498 6.382e-11, 6.343e-11, 6.307e-11, 6.272e-11, 6.238e-11, 6.205e-11,
499 6.17e-11, 6.137e-11, 6.102e-11, 6.072e-11, 6.046e-11, 6.03e-11,
500 6.018e-11, 6.01e-11, 6.001e-11, 5.992e-11, 5.984e-11, 5.975e-11,
501 5.967e-11, 5.958e-11, 5.95e-11, 5.941e-11, 5.933e-11, 5.925e-11,
502 5.916e-11, 5.908e-11, 5.899e-11, 5.891e-11, 5.883e-11, 5.874e-11,
503 5.866e-11, 5.858e-11, 5.85e-11, 5.841e-11, 5.833e-11, 5.825e-11,
504 5.817e-11, 5.808e-11, 5.8e-11, 5.792e-11, 5.784e-11
505 };
506
507 static double hno3[121] = {
508 1.809e-10, 7.234e-10, 5.899e-10, 4.342e-10, 3.277e-10, 2.661e-10,
509 2.35e-10, 2.267e-10, 2.389e-10, 2.651e-10, 3.255e-10, 4.099e-10,
510 5.42e-10, 6.978e-10, 8.807e-10, 1.112e-09, 1.405e-09, 2.04e-09,
511 3.111e-09, 4.5e-09, 5.762e-09, 7.37e-09, 7.852e-09, 8.109e-09,
512 8.067e-09, 7.554e-09, 7.076e-09, 6.268e-09, 5.524e-09, 4.749e-09,
513 3.909e-09, 3.223e-09, 2.517e-09, 1.942e-09, 1.493e-09, 1.122e-09,
514 8.449e-10, 6.361e-10, 4.787e-10, 3.611e-10, 2.804e-10, 2.215e-10,
515 1.758e-10, 1.441e-10, 1.197e-10, 9.953e-11, 8.505e-11, 7.334e-11,
516 6.325e-11, 5.625e-11, 5.058e-11, 4.548e-11, 4.122e-11, 3.748e-11,
517 3.402e-11, 3.088e-11, 2.8e-11, 2.536e-11, 2.293e-11, 2.072e-11,
518 1.871e-11, 1.687e-11, 1.52e-11, 1.368e-11, 1.23e-11, 1.105e-11,
519 9.922e-12, 8.898e-12, 7.972e-12, 7.139e-12, 6.385e-12, 5.708e-12,
520 5.099e-12, 4.549e-12, 4.056e-12, 3.613e-12, 3.216e-12, 2.862e-12,
521 2.544e-12, 2.259e-12, 2.004e-12, 1.776e-12, 1.572e-12, 1.391e-12,
522 1.227e-12, 1.082e-12, 9.528e-13, 8.379e-13, 7.349e-13, 6.436e-13,
523 5.634e-13, 4.917e-13, 4.291e-13, 3.745e-13, 3.267e-13, 2.854e-13,
524 2.494e-13, 2.181e-13, 1.913e-13, 1.68e-13, 1.479e-13, 1.31e-13,
525 1.159e-13, 1.025e-13, 9.067e-14, 8.113e-14, 7.281e-14, 6.535e-14,
526 5.892e-14, 5.348e-14, 4.867e-14, 4.439e-14, 4.073e-14, 3.76e-14,
527 3.476e-14, 3.229e-14, 3e-14, 2.807e-14, 2.635e-14, 2.473e-14,
528 2.332e-14
529 };
530
531 static double hno4[121] = {
532 6.118e-12, 3.594e-12, 2.807e-12, 3.04e-12, 4.458e-12, 7.986e-12,
533 1.509e-11, 2.661e-11, 3.738e-11, 4.652e-11, 4.429e-11, 3.992e-11,
534 3.347e-11, 3.005e-11, 3.173e-11, 4.055e-11, 5.812e-11, 8.489e-11,
535 1.19e-10, 1.482e-10, 1.766e-10, 2.103e-10, 2.35e-10, 2.598e-10,
536 2.801e-10, 2.899e-10, 3e-10, 2.817e-10, 2.617e-10, 2.332e-10,
537 1.933e-10, 1.605e-10, 1.232e-10, 9.285e-11, 6.941e-11, 4.951e-11,
538 3.539e-11, 2.402e-11, 1.522e-11, 9.676e-12, 6.056e-12, 3.745e-12,
539 2.34e-12, 1.463e-12, 9.186e-13, 5.769e-13, 3.322e-13, 1.853e-13,
540 1.035e-13, 7.173e-14, 5.382e-14, 4.036e-14, 3.401e-14, 2.997e-14,
541 2.635e-14, 2.316e-14, 2.034e-14, 1.783e-14, 1.56e-14, 1.363e-14,
542 1.19e-14, 1.037e-14, 9.032e-15, 7.846e-15, 6.813e-15, 5.912e-15,
543 5.121e-15, 4.431e-15, 3.829e-15, 3.306e-15, 2.851e-15, 2.456e-15,
544 2.114e-15, 1.816e-15, 1.559e-15, 1.337e-15, 1.146e-15, 9.811e-16,
545 8.389e-16, 7.162e-16, 6.109e-16, 5.203e-16, 4.425e-16, 3.76e-16,
546 3.184e-16, 2.692e-16, 2.274e-16, 1.917e-16, 1.61e-16, 1.35e-16,
547 1.131e-16, 9.437e-17, 7.874e-17, 6.57e-17, 5.481e-17, 4.579e-17,
548 3.828e-17, 3.204e-17, 2.691e-17, 2.264e-17, 1.912e-17, 1.626e-17,
549 1.382e-17, 1.174e-17, 9.972e-18, 8.603e-18, 7.45e-18, 6.453e-18,
550 5.623e-18, 4.944e-18, 4.361e-18, 3.859e-18, 3.443e-18, 3.096e-18,
551 2.788e-18, 2.528e-18, 2.293e-18, 2.099e-18, 1.929e-18, 1.773e-18,
552 1.64e-18
553 };
554
555 static double hocl[121] = {
556 1.056e-12, 1.194e-12, 1.35e-12, 1.531e-12, 1.737e-12, 1.982e-12,
557 2.263e-12, 2.599e-12, 2.991e-12, 3.459e-12, 4.012e-12, 4.662e-12,
558 5.438e-12, 6.35e-12, 7.425e-12, 8.686e-12, 1.016e-11, 1.188e-11,
559 1.389e-11, 1.659e-11, 2.087e-11, 2.621e-11, 3.265e-11, 4.064e-11,
560 4.859e-11, 5.441e-11, 6.09e-11, 6.373e-11, 6.611e-11, 6.94e-11,
561 7.44e-11, 7.97e-11, 8.775e-11, 9.722e-11, 1.064e-10, 1.089e-10,
562 1.114e-10, 1.106e-10, 1.053e-10, 1.004e-10, 9.006e-11, 7.778e-11,
563 6.739e-11, 5.636e-11, 4.655e-11, 3.845e-11, 3.042e-11, 2.368e-11,
564 1.845e-11, 1.442e-11, 1.127e-11, 8.814e-12, 6.544e-12, 4.763e-12,
565 3.449e-12, 2.612e-12, 1.999e-12, 1.526e-12, 1.16e-12, 8.793e-13,
566 6.655e-13, 5.017e-13, 3.778e-13, 2.829e-13, 2.117e-13, 1.582e-13,
567 1.178e-13, 8.755e-14, 6.486e-14, 4.799e-14, 3.54e-14, 2.606e-14,
568 1.916e-14, 1.403e-14, 1.026e-14, 7.48e-15, 5.446e-15, 3.961e-15,
569 2.872e-15, 2.076e-15, 1.498e-15, 1.077e-15, 7.726e-16, 5.528e-16,
570 3.929e-16, 2.785e-16, 1.969e-16, 1.386e-16, 9.69e-17, 6.747e-17,
571 4.692e-17, 3.236e-17, 2.232e-17, 1.539e-17, 1.061e-17, 7.332e-18,
572 5.076e-18, 3.522e-18, 2.461e-18, 1.726e-18, 1.22e-18, 8.75e-19,
573 6.264e-19, 4.482e-19, 3.207e-19, 2.368e-19, 1.762e-19, 1.312e-19,
574 9.891e-20, 7.595e-20, 5.87e-20, 4.567e-20, 3.612e-20, 2.904e-20,
575 2.343e-20, 1.917e-20, 1.568e-20, 1.308e-20, 1.1e-20, 9.25e-21,
576 7.881e-21
577 };
578
579 static double n2o[121] = {
580 3.17e-07, 3.17e-07, 3.17e-07, 3.17e-07, 3.17e-07, 3.17e-07, 3.17e-07,
581 3.17e-07, 3.17e-07, 3.17e-07, 3.124e-07, 3.077e-07, 3.03e-07,
582 2.984e-07, 2.938e-07, 2.892e-07, 2.847e-07, 2.779e-07, 2.705e-07,
583 2.631e-07, 2.557e-07, 2.484e-07, 2.345e-07, 2.201e-07, 2.01e-07,
584 1.754e-07, 1.532e-07, 1.329e-07, 1.154e-07, 1.003e-07, 8.735e-08,
585 7.617e-08, 6.512e-08, 5.547e-08, 4.709e-08, 3.915e-08, 3.259e-08,
586 2.738e-08, 2.327e-08, 1.98e-08, 1.711e-08, 1.493e-08, 1.306e-08,
587 1.165e-08, 1.049e-08, 9.439e-09, 8.375e-09, 7.391e-09, 6.525e-09,
588 5.759e-09, 5.083e-09, 4.485e-09, 3.953e-09, 3.601e-09, 3.27e-09,
589 2.975e-09, 2.757e-09, 2.556e-09, 2.37e-09, 2.195e-09, 2.032e-09,
590 1.912e-09, 1.79e-09, 1.679e-09, 1.572e-09, 1.482e-09, 1.402e-09,
591 1.326e-09, 1.254e-09, 1.187e-09, 1.127e-09, 1.071e-09, 1.02e-09,
592 9.673e-10, 9.193e-10, 8.752e-10, 8.379e-10, 8.017e-10, 7.66e-10,
593 7.319e-10, 7.004e-10, 6.721e-10, 6.459e-10, 6.199e-10, 5.942e-10,
594 5.703e-10, 5.488e-10, 5.283e-10, 5.082e-10, 4.877e-10, 4.696e-10,
595 4.52e-10, 4.355e-10, 4.198e-10, 4.039e-10, 3.888e-10, 3.754e-10,
596 3.624e-10, 3.499e-10, 3.381e-10, 3.267e-10, 3.163e-10, 3.058e-10,
597 2.959e-10, 2.864e-10, 2.77e-10, 2.686e-10, 2.604e-10, 2.534e-10,
598 2.462e-10, 2.386e-10, 2.318e-10, 2.247e-10, 2.189e-10, 2.133e-10,
599 2.071e-10, 2.014e-10, 1.955e-10, 1.908e-10, 1.86e-10, 1.817e-10
600 };
601
602 static double n2o5[121] = {
603 1.231e-11, 3.035e-12, 1.702e-12, 9.877e-13, 8.081e-13, 9.039e-13,
604 1.169e-12, 1.474e-12, 1.651e-12, 1.795e-12, 1.998e-12, 2.543e-12,
605 4.398e-12, 7.698e-12, 1.28e-11, 2.131e-11, 3.548e-11, 5.894e-11,
606 7.645e-11, 1.089e-10, 1.391e-10, 1.886e-10, 2.386e-10, 2.986e-10,
607 3.487e-10, 3.994e-10, 4.5e-10, 4.6e-10, 4.591e-10, 4.1e-10, 3.488e-10,
608 2.846e-10, 2.287e-10, 1.696e-10, 1.011e-10, 6.428e-11, 4.324e-11,
609 2.225e-11, 6.214e-12, 3.608e-12, 8.793e-13, 4.491e-13, 1.04e-13,
610 6.1e-14, 3.436e-14, 6.671e-15, 1.171e-15, 5.848e-16, 1.212e-16,
611 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16,
612 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16,
613 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16,
614 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16,
615 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16,
616 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16,
617 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16, 1e-16,
618 1e-16, 1e-16
619 };
620
621 static double nh3[121] = {
622 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10,
623 1e-10, 1e-10, 1e-10, 1e-10, 9.444e-11, 8.488e-11, 7.241e-11, 5.785e-11,
624 4.178e-11, 3.018e-11, 2.18e-11, 1.574e-11, 1.137e-11, 8.211e-12,
625 5.973e-12, 4.327e-12, 3.118e-12, 2.234e-12, 1.573e-12, 1.04e-12,
626 6.762e-13, 4.202e-13, 2.406e-13, 1.335e-13, 6.938e-14, 3.105e-14,
627 1.609e-14, 1.033e-14, 6.432e-15, 4.031e-15, 2.555e-15, 1.656e-15,
628 1.115e-15, 7.904e-16, 5.63e-16, 4.048e-16, 2.876e-16, 2.004e-16,
629 1.356e-16, 9.237e-17, 6.235e-17, 4.223e-17, 3.009e-17, 2.328e-17,
630 2.002e-17, 1.914e-17, 1.914e-17, 1.914e-17, 1.914e-17, 1.914e-17,
631 1.914e-17, 1.914e-17, 1.914e-17, 1.914e-17, 1.914e-17, 1.914e-17,
632 1.914e-17, 1.914e-17, 1.914e-17, 1.914e-17, 1.914e-17, 1.914e-17,
633 1.914e-17, 1.914e-17, 1.914e-17, 1.914e-17, 1.914e-17, 1.914e-17,
634 1.914e-17, 1.914e-17, 1.914e-17, 1.914e-17, 1.914e-17, 1.914e-17,
635 1.914e-17, 1.914e-17, 1.914e-17, 1.914e-17, 1.914e-17, 1.914e-17,
636 1.914e-17, 1.914e-17, 1.914e-17, 1.914e-17, 1.914e-17, 1.914e-17,
637 1.914e-17, 1.914e-17, 1.914e-17, 1.914e-17, 1.914e-17, 1.914e-17,
638 1.914e-17, 1.914e-17, 1.914e-17, 1.914e-17, 1.914e-17, 1.914e-17,
639 1.914e-17, 1.914e-17, 1.914e-17, 1.914e-17, 1.914e-17, 1.914e-17,
640 1.914e-17, 1.914e-17, 1.914e-17, 1.914e-17, 1.914e-17, 1.914e-17,
641 1.914e-17
642 };
643
644 static double no[121] = {
645 2.586e-10, 4.143e-11, 1.566e-11, 9.591e-12, 8.088e-12, 8.462e-12,
646 1.013e-11, 1.328e-11, 1.855e-11, 2.678e-11, 3.926e-11, 5.464e-11,
647 7.012e-11, 8.912e-11, 1.127e-10, 1.347e-10, 1.498e-10, 1.544e-10,
648 1.602e-10, 1.824e-10, 2.078e-10, 2.366e-10, 2.691e-10, 5.141e-10,
649 8.259e-10, 1.254e-09, 1.849e-09, 2.473e-09, 3.294e-09, 4.16e-09,
650 5.095e-09, 6.11e-09, 6.93e-09, 7.888e-09, 8.903e-09, 9.713e-09,
651 1.052e-08, 1.115e-08, 1.173e-08, 1.21e-08, 1.228e-08, 1.239e-08,
652 1.231e-08, 1.213e-08, 1.192e-08, 1.138e-08, 1.085e-08, 1.008e-08,
653 9.224e-09, 8.389e-09, 7.262e-09, 6.278e-09, 5.335e-09, 4.388e-09,
654 3.589e-09, 2.761e-09, 2.129e-09, 1.633e-09, 1.243e-09, 9.681e-10,
655 8.355e-10, 7.665e-10, 7.442e-10, 8.584e-10, 9.732e-10, 1.063e-09,
656 1.163e-09, 1.286e-09, 1.472e-09, 1.707e-09, 2.032e-09, 2.474e-09,
657 2.977e-09, 3.506e-09, 4.102e-09, 5.013e-09, 6.493e-09, 8.414e-09,
658 1.077e-08, 1.367e-08, 1.777e-08, 2.625e-08, 3.926e-08, 5.545e-08,
659 7.195e-08, 9.464e-08, 1.404e-07, 2.183e-07, 3.329e-07, 4.535e-07,
660 6.158e-07, 8.187e-07, 1.075e-06, 1.422e-06, 1.979e-06, 2.71e-06,
661 3.58e-06, 4.573e-06, 5.951e-06, 7.999e-06, 1.072e-05, 1.372e-05,
662 1.697e-05, 2.112e-05, 2.643e-05, 3.288e-05, 3.994e-05, 4.794e-05,
663 5.606e-05, 6.383e-05, 7.286e-05, 8.156e-05, 8.883e-05, 9.469e-05,
664 9.848e-05, 0.0001023, 0.0001066, 0.0001115, 0.0001145, 0.0001142,
665 0.0001133
666 };
667
668 static double no2[121] = {
669 3.036e-09, 2.945e-10, 9.982e-11, 5.069e-11, 3.485e-11, 2.982e-11,
670 2.947e-11, 3.164e-11, 3.714e-11, 4.586e-11, 6.164e-11, 8.041e-11,
671 9.982e-11, 1.283e-10, 1.73e-10, 2.56e-10, 3.909e-10, 5.959e-10,
672 9.081e-10, 1.384e-09, 1.788e-09, 2.189e-09, 2.686e-09, 3.091e-09,
673 3.49e-09, 3.796e-09, 4.2e-09, 5.103e-09, 6.005e-09, 6.3e-09, 6.706e-09,
674 7.07e-09, 7.434e-09, 7.663e-09, 7.788e-09, 7.8e-09, 7.597e-09,
675 7.482e-09, 7.227e-09, 6.403e-09, 5.585e-09, 4.606e-09, 3.703e-09,
676 2.984e-09, 2.183e-09, 1.48e-09, 8.441e-10, 5.994e-10, 3.799e-10,
677 2.751e-10, 1.927e-10, 1.507e-10, 1.102e-10, 6.971e-11, 5.839e-11,
678 3.904e-11, 3.087e-11, 2.176e-11, 1.464e-11, 1.209e-11, 8.497e-12,
679 6.477e-12, 4.371e-12, 2.914e-12, 2.424e-12, 1.753e-12, 1.35e-12,
680 9.417e-13, 6.622e-13, 5.148e-13, 3.841e-13, 3.446e-13, 3.01e-13,
681 2.551e-13, 2.151e-13, 1.829e-13, 1.64e-13, 1.475e-13, 1.352e-13,
682 1.155e-13, 9.963e-14, 9.771e-14, 9.577e-14, 9.384e-14, 9.186e-14,
683 9e-14, 9e-14, 9e-14, 9e-14, 9e-14, 9e-14, 9e-14, 9e-14, 9e-14, 9e-14,
684 9e-14, 9e-14, 9e-14, 9e-14, 9e-14, 9e-14, 9e-14, 9e-14, 9e-14, 9e-14,
685 9e-14, 9e-14, 9e-14, 9e-14, 9e-14, 9e-14, 9e-14, 9e-14, 9e-14, 9e-14,
686 9e-14, 9e-14, 9e-14, 9e-14, 9e-14, 9e-14
687 };
688
689 static double o3[121] = {
690 2.218e-08, 3.394e-08, 3.869e-08, 4.219e-08, 4.501e-08, 4.778e-08,
691 5.067e-08, 5.402e-08, 5.872e-08, 6.521e-08, 7.709e-08, 9.461e-08,
692 1.269e-07, 1.853e-07, 2.723e-07, 3.964e-07, 5.773e-07, 8.2e-07,
693 1.155e-06, 1.59e-06, 2.076e-06, 2.706e-06, 3.249e-06, 3.848e-06,
694 4.459e-06, 4.986e-06, 5.573e-06, 5.958e-06, 6.328e-06, 6.661e-06,
695 6.9e-06, 7.146e-06, 7.276e-06, 7.374e-06, 7.447e-06, 7.383e-06,
696 7.321e-06, 7.161e-06, 6.879e-06, 6.611e-06, 6.216e-06, 5.765e-06,
697 5.355e-06, 4.905e-06, 4.471e-06, 4.075e-06, 3.728e-06, 3.413e-06,
698 3.125e-06, 2.856e-06, 2.607e-06, 2.379e-06, 2.17e-06, 1.978e-06,
699 1.8e-06, 1.646e-06, 1.506e-06, 1.376e-06, 1.233e-06, 1.102e-06,
700 9.839e-07, 8.771e-07, 7.814e-07, 6.947e-07, 6.102e-07, 5.228e-07,
701 4.509e-07, 3.922e-07, 3.501e-07, 3.183e-07, 2.909e-07, 2.686e-07,
702 2.476e-07, 2.284e-07, 2.109e-07, 2.003e-07, 2.013e-07, 2.022e-07,
703 2.032e-07, 2.042e-07, 2.097e-07, 2.361e-07, 2.656e-07, 2.989e-07,
704 3.37e-07, 3.826e-07, 4.489e-07, 5.26e-07, 6.189e-07, 7.312e-07,
705 8.496e-07, 8.444e-07, 8.392e-07, 8.339e-07, 8.286e-07, 8.234e-07,
706 8.181e-07, 8.129e-07, 8.077e-07, 8.026e-07, 6.918e-07, 5.176e-07,
707 3.865e-07, 2.885e-07, 2.156e-07, 1.619e-07, 1.219e-07, 9.161e-08,
708 6.972e-08, 5.399e-08, 3.498e-08, 2.111e-08, 1.322e-08, 8.482e-09,
709 5.527e-09, 3.423e-09, 2.071e-09, 1.314e-09, 8.529e-10, 5.503e-10,
710 3.665e-10
711 };
712
713 static double ocs[121] = {
714 6e-10, 6e-10, 6e-10, 6e-10, 6e-10, 6e-10, 6e-10, 6e-10, 6e-10, 5.997e-10,
715 5.989e-10, 5.881e-10, 5.765e-10, 5.433e-10, 5.074e-10, 4.567e-10,
716 4.067e-10, 3.601e-10, 3.093e-10, 2.619e-10, 2.232e-10, 1.805e-10,
717 1.46e-10, 1.187e-10, 8.03e-11, 5.435e-11, 3.686e-11, 2.217e-11,
718 1.341e-11, 8.756e-12, 4.511e-12, 2.37e-12, 1.264e-12, 8.28e-13,
719 5.263e-13, 3.209e-13, 1.717e-13, 9.068e-14, 4.709e-14, 2.389e-14,
720 1.236e-14, 1.127e-14, 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14,
721 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14,
722 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14,
723 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14,
724 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14,
725 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14,
726 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14,
727 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14,
728 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14,
729 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14,
730 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14,
731 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14,
732 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14, 1.091e-14,
733 1.091e-14, 1.091e-14, 1.091e-14
734 };
735
736 static double sf6[121] = {
737 4.103e-12, 4.103e-12, 4.103e-12, 4.103e-12, 4.103e-12, 4.103e-12,
738 4.103e-12, 4.103e-12, 4.103e-12, 4.087e-12, 4.064e-12, 4.023e-12,
739 3.988e-12, 3.941e-12, 3.884e-12, 3.755e-12, 3.622e-12, 3.484e-12,
740 3.32e-12, 3.144e-12, 2.978e-12, 2.811e-12, 2.653e-12, 2.489e-12,
741 2.332e-12, 2.199e-12, 2.089e-12, 2.013e-12, 1.953e-12, 1.898e-12,
742 1.859e-12, 1.826e-12, 1.798e-12, 1.776e-12, 1.757e-12, 1.742e-12,
743 1.728e-12, 1.717e-12, 1.707e-12, 1.698e-12, 1.691e-12, 1.685e-12,
744 1.679e-12, 1.675e-12, 1.671e-12, 1.668e-12, 1.665e-12, 1.663e-12,
745 1.661e-12, 1.659e-12, 1.658e-12, 1.657e-12, 1.656e-12, 1.655e-12,
746 1.654e-12, 1.653e-12, 1.653e-12, 1.652e-12, 1.652e-12, 1.652e-12,
747 1.651e-12, 1.651e-12, 1.651e-12, 1.651e-12, 1.651e-12, 1.651e-12,
748 1.651e-12, 1.65e-12, 1.65e-12, 1.65e-12, 1.65e-12, 1.65e-12, 1.65e-12,
749 1.65e-12, 1.65e-12, 1.65e-12, 1.65e-12, 1.65e-12, 1.65e-12, 1.65e-12,
750 1.65e-12, 1.65e-12, 1.65e-12, 1.65e-12, 1.65e-12, 1.65e-12, 1.65e-12,
751 1.65e-12, 1.65e-12, 1.65e-12, 1.65e-12, 1.65e-12, 1.65e-12, 1.65e-12,
752 1.65e-12, 1.65e-12, 1.65e-12, 1.65e-12, 1.65e-12, 1.65e-12, 1.65e-12,
753 1.65e-12, 1.65e-12, 1.65e-12, 1.65e-12, 1.65e-12, 1.65e-12, 1.65e-12,
754 1.65e-12, 1.65e-12, 1.65e-12, 1.65e-12, 1.65e-12, 1.65e-12, 1.65e-12,
755 1.65e-12, 1.65e-12, 1.65e-12, 1.65e-12, 1.65e-12, 1.65e-12
756 };
757
758 static double so2[121] = {
759 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10, 1e-10,
760 1e-10, 1e-10, 9.867e-11, 9.537e-11, 9e-11, 8.404e-11, 7.799e-11,
761 7.205e-11, 6.616e-11, 6.036e-11, 5.475e-11, 5.007e-11, 4.638e-11,
762 4.346e-11, 4.055e-11, 3.763e-11, 3.471e-11, 3.186e-11, 2.905e-11,
763 2.631e-11, 2.358e-11, 2.415e-11, 2.949e-11, 3.952e-11, 5.155e-11,
764 6.76e-11, 8.741e-11, 1.099e-10, 1.278e-10, 1.414e-10, 1.512e-10,
765 1.607e-10, 1.699e-10, 1.774e-10, 1.832e-10, 1.871e-10, 1.907e-10,
766 1.943e-10, 1.974e-10, 1.993e-10, 2e-10, 2e-10, 2e-10, 2e-10, 2e-10,
767 2e-10, 2e-10, 2e-10, 2e-10, 2e-10, 2e-10, 2e-10, 2e-10, 2e-10, 2e-10,
768 2e-10, 2e-10, 2e-10, 2e-10, 2e-10, 2e-10, 2e-10, 2e-10, 2e-10, 2e-10,
769 2e-10, 2e-10, 2e-10, 2e-10, 2e-10, 2e-10, 2e-10, 2e-10, 2e-10, 2e-10,
770 2e-10, 2e-10, 2e-10, 2e-10, 2e-10, 2e-10, 2e-10, 2e-10, 2e-10, 2e-10,
771 2e-10, 2e-10, 2e-10, 2e-10, 2e-10, 2e-10, 2e-10, 2e-10, 2e-10, 2e-10,
772 2e-10, 2e-10, 2e-10, 2e-10, 2e-10, 2e-10, 2e-10, 2e-10, 2e-10, 2e-10,
773 2e-10, 2e-10, 2e-10, 2e-10, 2e-10, 2e-10
774 };
775
776 static int ig_co2 = -999;
777
778 double *q[NG] = { NULL };
779
780 /* Find emitter index of CO2... */
781 if (ig_co2 == -999)
782 ig_co2 = find_emitter(ctl, "CO2");
783
784 /* Identify variable... */
785 for (int ig = 0; ig < ctl->ng; ig++) {
786 q[ig] = NULL;
787 if (strcasecmp(ctl->emitter[ig], "C2H2") == 0)
788 q[ig] = c2h2;
789 if (strcasecmp(ctl->emitter[ig], "C2H6") == 0)
790 q[ig] = c2h6;
791 if (strcasecmp(ctl->emitter[ig], "CCl4") == 0)
792 q[ig] = ccl4;
793 if (strcasecmp(ctl->emitter[ig], "CH4") == 0)
794 q[ig] = ch4;
795 if (strcasecmp(ctl->emitter[ig], "ClO") == 0)
796 q[ig] = clo;
797 if (strcasecmp(ctl->emitter[ig], "ClONO2") == 0)
798 q[ig] = clono2;
799 if (strcasecmp(ctl->emitter[ig], "CO") == 0)
800 q[ig] = co;
801 if (strcasecmp(ctl->emitter[ig], "COF2") == 0)
802 q[ig] = cof2;
803 if (strcasecmp(ctl->emitter[ig], "F11") == 0)
804 q[ig] = f11;
805 if (strcasecmp(ctl->emitter[ig], "F12") == 0)
806 q[ig] = f12;
807 if (strcasecmp(ctl->emitter[ig], "F14") == 0)
808 q[ig] = f14;
809 if (strcasecmp(ctl->emitter[ig], "F22") == 0)
810 q[ig] = f22;
811 if (strcasecmp(ctl->emitter[ig], "H2O") == 0)
812 q[ig] = h2o;
813 if (strcasecmp(ctl->emitter[ig], "H2O2") == 0)
814 q[ig] = h2o2;
815 if (strcasecmp(ctl->emitter[ig], "HCN") == 0)
816 q[ig] = hcn;
817 if (strcasecmp(ctl->emitter[ig], "HNO3") == 0)
818 q[ig] = hno3;
819 if (strcasecmp(ctl->emitter[ig], "HNO4") == 0)
820 q[ig] = hno4;
821 if (strcasecmp(ctl->emitter[ig], "HOCl") == 0)
822 q[ig] = hocl;
823 if (strcasecmp(ctl->emitter[ig], "N2O") == 0)
824 q[ig] = n2o;
825 if (strcasecmp(ctl->emitter[ig], "N2O5") == 0)
826 q[ig] = n2o5;
827 if (strcasecmp(ctl->emitter[ig], "NH3") == 0)
828 q[ig] = nh3;
829 if (strcasecmp(ctl->emitter[ig], "NO") == 0)
830 q[ig] = no;
831 if (strcasecmp(ctl->emitter[ig], "NO2") == 0)
832 q[ig] = no2;
833 if (strcasecmp(ctl->emitter[ig], "O3") == 0)
834 q[ig] = o3;
835 if (strcasecmp(ctl->emitter[ig], "OCS") == 0)
836 q[ig] = ocs;
837 if (strcasecmp(ctl->emitter[ig], "SF6") == 0)
838 q[ig] = sf6;
839 if (strcasecmp(ctl->emitter[ig], "SO2") == 0)
840 q[ig] = so2;
841 }
842
843 /* Loop over atmospheric data points... */
844 for (int ip = 0; ip < atm->np; ip++) {
845
846 /* Get altitude index... */
847 int iz = locate_reg(z, 121, atm->z[ip]);
848
849 /* Interpolate pressure... */
850 atm->p[ip] = LOGY(z[iz], pre[iz], z[iz + 1], pre[iz + 1], atm->z[ip]);
851
852 /* Interpolate temperature... */
853 atm->t[ip] = LIN(z[iz], tem[iz], z[iz + 1], tem[iz + 1], atm->z[ip]);
854
855 /* Interpolate trace gases... */
856 for (int ig = 0; ig < ctl->ng; ig++)
857 if (q[ig] != NULL)
858 atm->q[ig][ip] =
859 LIN(z[iz], q[ig][iz], z[iz + 1], q[ig][iz + 1], atm->z[ip]);
860 else
861 atm->q[ig][ip] = 0;
862
863 /* Set CO2... */
864 if (ig_co2 >= 0)
865 atm->q[ig_co2][ip] =
866 371.789948e-6 + 2.026214e-6 * (atm->time[ip] - 63158400.) / 31557600.;
867
868 /* Set extinction to zero... */
869 for (int iw = 0; iw < ctl->nw; iw++)
870 atm->k[iw][ip] = 0;
871
872 /* Set cloud layer... */
873 atm->clz = atm->cldz = 0;
874 for (int icl = 0; icl < ctl->ncl; icl++)
875 atm->clk[icl] = 0;
876
877 /* Set surface layer... */
878 atm->sfz = atm->sfp = atm->sft = 0;
879 for (int isf = 0; isf < ctl->nsf; isf++)
880 atm->sfeps[isf] = 1;
881 }
882}
883
884/*****************************************************************************/
885
886double ctmco2(
887 const double nu,
888 const double p,
889 const double t,
890 const double u) {
891
892 static double co2296[2001] = { 9.3388e-5, 9.7711e-5, 1.0224e-4, 1.0697e-4,
893 1.1193e-4, 1.1712e-4, 1.2255e-4, 1.2824e-4, 1.3419e-4, 1.4043e-4,
894 1.4695e-4, 1.5378e-4, 1.6094e-4, 1.6842e-4, 1.7626e-4, 1.8447e-4,
895 1.9307e-4, 2.0207e-4, 2.1149e-4, 2.2136e-4, 2.3169e-4, 2.4251e-4,
896 2.5384e-4, 2.657e-4, 2.7813e-4, 2.9114e-4, 3.0477e-4, 3.1904e-4,
897 3.3399e-4, 3.4965e-4, 3.6604e-4, 3.8322e-4, 4.0121e-4, 4.2006e-4,
898 4.398e-4, 4.6047e-4, 4.8214e-4, 5.0483e-4, 5.286e-4, 5.535e-4,
899 5.7959e-4, 6.0693e-4, 6.3557e-4, 6.6558e-4, 6.9702e-4, 7.2996e-4,
900 7.6449e-4, 8.0066e-4, 8.3856e-4, 8.7829e-4, 9.1991e-4, 9.6354e-4,
901 .0010093, .0010572, .0011074, .00116, .0012152, .001273,
902 .0013336, .0013972, .0014638, .0015336, .0016068, .0016835,
903 .001764, .0018483, .0019367, .0020295, .0021267, .0022286,
904 .0023355, .0024476, .0025652, .0026885, .0028178, .0029534,
905 .0030956, .0032448, .0034012, .0035654, .0037375, .0039181,
906 .0041076, .0043063, .0045148, .0047336, .0049632, .005204,
907 .0054567, .0057219, .0060002, .0062923, .0065988, .0069204,
908 .007258, .0076123, .0079842, .0083746, .0087844, .0092146,
909 .0096663, .01014, .010638, .011161, .01171, .012286, .012891,
910 .013527, .014194, .014895, .015631, .016404, .017217, .01807,
911 .018966, .019908, .020897, .021936, .023028, .024176, .025382,
912 .026649, .027981, .02938, .030851, .032397, .034023, .035732,
913 .037528, .039416, .041402, .04349, .045685, .047994, .050422,
914 .052975, .055661, .058486, .061458, .064584, .067873, .071334,
915 .074975, .078807, .082839, .087082, .091549, .096249, .1012,
916 .10641, .11189, .11767, .12375, .13015, .13689, .14399, .15147,
917 .15935, .16765, .17639, .18561, .19531, .20554, .21632, .22769,
918 .23967, .25229, .2656, .27964, .29443, .31004, .3265, .34386,
919 .36218, .3815, .40188, .42339, .44609, .47004, .49533, .52202,
920 .5502, .57995, .61137, .64455, .6796, .71663, .75574, .79707,
921 .84075, .88691, .9357, .98728, 1.0418, 1.0995, 1.1605, 1.225,
922 1.2932, 1.3654, 1.4418, 1.5227, 1.6083, 1.6989, 1.7948, 1.8964,
923 2.004, 2.118, 2.2388, 2.3668, 2.5025, 2.6463, 2.7988, 2.9606,
924 3.1321, 3.314, 3.5071, 3.712, 3.9296, 4.1605, 4.4058, 4.6663,
925 4.9431, 5.2374, 5.5501, 5.8818, 6.2353, 6.6114, 7.0115, 7.4372,
926 7.8905, 8.3731, 8.8871, 9.4349, 10.019, 10.641, 11.305, 12.013,
927 12.769, 13.576, 14.437, 15.358, 16.342, 17.39, 18.513, 19.716,
928 21.003, 22.379, 23.854, 25.436, 27.126, 28.942, 30.89, 32.973,
929 35.219, 37.634, 40.224, 43.021, 46.037, 49.29, 52.803, 56.447,
930 60.418, 64.792, 69.526, 74.637, 80.182, 86.193, 92.713, 99.786,
931 107.47, 115.84, 124.94, 134.86, 145.69, 157.49, 170.3, 184.39,
932 199.83, 216.4, 234.55, 254.72, 276.82, 299.85, 326.16, 354.99,
933 386.51, 416.68, 449.89, 490.12, 534.35, 578.25, 632.26, 692.61,
934 756.43, 834.75, 924.11, 1016.9, 996.96, 1102.7, 1219.2, 1351.9,
935 1494.3, 1654.1, 1826.5, 2027.9, 2249., 2453.8, 2714.4, 2999.4,
936 3209.5, 3509., 3840.4, 3907.5, 4190.7, 4533.5, 4648.3, 5059.1,
937 5561.6, 6191.4, 6820.8, 7905.9, 9362.2, 2431.3, 2211.3, 2046.8,
938 2023.8, 1985.9, 1905.9, 1491.1, 1369.8, 1262.2, 1200.7, 887.74,
939 820.25, 885.23, 887.21, 816.73, 1126.9, 1216.2, 1272.4, 1579.5,
940 1634.2, 1656.3, 1657.9, 1789.5, 1670.8, 1509.5, 8474.6, 7489.2,
941 6793.6, 6117., 5574.1, 5141.2, 5084.6, 4745.1, 4413.2, 4102.8,
942 4024.7, 3715., 3398.6, 3100.8, 2900.4, 2629.2, 2374., 2144.7,
943 1955.8, 1760.8, 1591.2, 1435.2, 1296.2, 1174., 1065.1, 967.76,
944 999.48, 897.45, 809.23, 732.77, 670.26, 611.93, 560.11, 518.77,
945 476.84, 438.8, 408.48, 380.21, 349.24, 322.71, 296.65, 272.85,
946 251.96, 232.04, 213.88, 197.69, 182.41, 168.41, 155.79, 144.05,
947 133.31, 123.48, 114.5, 106.21, 98.591, 91.612, 85.156, 79.204,
948 73.719, 68.666, 63.975, 59.637, 56.35, 52.545, 49.042, 45.788,
949 42.78, 39.992, 37.441, 35.037, 32.8, 30.744, 28.801, 26.986,
950 25.297, 23.731, 22.258, 20.883, 19.603, 18.403, 17.295, 16.249,
951 15.271, 14.356, 13.501, 12.701, 11.954, 11.254, 10.6, 9.9864,
952 9.4118, 8.8745, 8.3714, 7.8997, 7.4578, 7.0446, 6.6573, 6.2949,
953 5.9577, 5.6395, 5.3419, 5.063, 4.8037, 4.5608, 4.3452, 4.1364,
954 3.9413, 3.7394, 3.562, 3.3932, 3.2325, 3.0789, 2.9318, 2.7898,
955 2.6537, 2.5225, 2.3958, 2.2305, 2.1215, 2.0245, 1.9427, 1.8795,
956 1.8336, 1.7604, 1.7016, 1.6419, 1.5282, 1.4611, 1.3443, 1.27,
957 1.1675, 1.0824, 1.0534, .99833, .95854, .92981, .90887, .89346,
958 .88113, .87068, .86102, .85096, .88262, .86151, .83565, .80518,
959 .77045, .73736, .74744, .74954, .75773, .82267, .83493, .89402,
960 .89725, .93426, .95564, .94045, .94174, .93404, .92035, .90456,
961 .88621, .86673, .78117, .7515, .72056, .68822, .65658, .62764,
962 .55984, .55598, .57407, .60963, .63763, .66198, .61132, .60972,
963 .52496, .50649, .41872, .3964, .32422, .27276, .24048, .23772,
964 .2286, .22711, .23999, .32038, .34371, .36621, .38561, .39953,
965 .40636, .44913, .42716, .3919, .35477, .33935, .3351, .39746,
966 .40993, .49398, .49956, .56157, .54742, .57295, .57386, .55417,
967 .50745, .471, .43446, .39102, .34993, .31269, .27888, .24912,
968 .22291, .19994, .17972, .16197, .14633, .13252, .12029, .10942,
969 .099745, .091118, .083404, .076494, .070292, .064716, .059697,
970 .055173, .051093, .047411, .044089, .041092, .038392, .035965,
971 .033789, .031846, .030122, .028607, .02729, .026169, .025209,
972 .024405, .023766, .023288, .022925, .022716, .022681, .022685,
973 .022768, .023133, .023325, .023486, .024004, .024126, .024083,
974 .023785, .024023, .023029, .021649, .021108, .019454, .017809,
975 .017292, .016635, .017037, .018068, .018977, .018756, .017847,
976 .016557, .016142, .014459, .012869, .012381, .010875, .0098701,
977 .009285, .0091698, .0091701, .0096145, .010553, .01106, .012613,
978 .014362, .015017, .016507, .017741, .01768, .017784, .0171,
979 .016357, .016172, .017257, .018978, .020935, .021741, .023567,
980 .025183, .025589, .026732, .027648, .028278, .028215, .02856,
981 .029015, .029062, .028851, .028497, .027825, .027801, .026523,
982 .02487, .022967, .022168, .020194, .018605, .017903, .018439,
983 .019697, .020311, .020855, .020057, .018608, .016738, .015963,
984 .013844, .011801, .011134, .0097573, .0086007, .0086226,
985 .0083721, .0090978, .0097616, .0098426, .011317, .012853, .01447,
986 .014657, .015771, .016351, .016079, .014829, .013431, .013185,
987 .013207, .01448, .016176, .017971, .018265, .019526, .020455,
988 .019797, .019802, .0194, .018176, .017505, .016197, .015339,
989 .014401, .013213, .012203, .011186, .010236, .0093288, .0084854,
990 .0076837, .0069375, .0062614, .0056628, .0051153, .0046015,
991 .0041501, .003752, .0033996, .0030865, .0028077, .0025586,
992 .0023355, .0021353, .0019553, .0017931, .0016466, .0015141,
993 .0013941, .0012852, .0011862, .0010962, .0010142, 9.3935e-4,
994 8.71e-4, 8.0851e-4, 7.5132e-4, 6.9894e-4, 6.5093e-4, 6.0689e-4,
995 5.6647e-4, 5.2935e-4, 4.9525e-4, 4.6391e-4, 4.3509e-4, 4.086e-4,
996 3.8424e-4, 3.6185e-4, 3.4126e-4, 3.2235e-4, 3.0498e-4, 2.8904e-4,
997 2.7444e-4, 2.6106e-4, 2.4883e-4, 2.3766e-4, 2.275e-4, 2.1827e-4,
998 2.0992e-4, 2.0239e-4, 1.9563e-4, 1.896e-4, 1.8427e-4, 1.796e-4,
999 1.7555e-4, 1.7209e-4, 1.692e-4, 1.6687e-4, 1.6505e-4, 1.6375e-4,
1000 1.6294e-4, 1.6261e-4, 1.6274e-4, 1.6334e-4, 1.6438e-4, 1.6587e-4,
1001 1.678e-4, 1.7017e-4, 1.7297e-4, 1.762e-4, 1.7988e-4, 1.8399e-4,
1002 1.8855e-4, 1.9355e-4, 1.9902e-4, 2.0494e-4, 2.1134e-4, 2.1823e-4,
1003 2.2561e-4, 2.335e-4, 2.4192e-4, 2.5088e-4, 2.604e-4, 2.705e-4,
1004 2.8119e-4, 2.9251e-4, 3.0447e-4, 3.171e-4, 3.3042e-4, 3.4447e-4,
1005 3.5927e-4, 3.7486e-4, 3.9127e-4, 4.0854e-4, 4.267e-4, 4.4579e-4,
1006 4.6586e-4, 4.8696e-4, 5.0912e-4, 5.324e-4, 5.5685e-4, 5.8253e-4,
1007 6.0949e-4, 6.378e-4, 6.6753e-4, 6.9873e-4, 7.3149e-4, 7.6588e-4,
1008 8.0198e-4, 8.3987e-4, 8.7964e-4, 9.2139e-4, 9.6522e-4, .0010112,
1009 .0010595, .0011102, .0011634, .0012193, .001278, .0013396,
1010 .0014043, .0014722, .0015436, .0016185, .0016972, .0017799,
1011 .0018668, .001958, .0020539, .0021547, .0022606, .0023719,
1012 .002489, .002612, .0027414, .0028775, .0030206, .0031712,
1013 .0033295, .0034962, .0036716, .0038563, .0040506, .0042553,
1014 .0044709, .004698, .0049373, .0051894, .0054552, .0057354,
1015 .006031, .0063427, .0066717, .0070188, .0073854, .0077726,
1016 .0081816, .0086138, .0090709, .0095543, .010066, .010607,
1017 .011181, .011789, .012433, .013116, .013842, .014613, .015432,
1018 .016304, .017233, .018224, .019281, .020394, .021574, .022836,
1019 .024181, .025594, .027088, .028707, .030401, .032245, .034219,
1020 .036262, .038539, .040987, .043578, .04641, .04949, .052726,
1021 .056326, .0602, .064093, .068521, .073278, .077734, .083064,
1022 .088731, .093885, .1003, .1072, .11365, .12187, .13078, .13989,
1023 .15095, .16299, .17634, .19116, .20628, .22419, .24386, .26587,
1024 .28811, .31399, .34321, .36606, .39675, .42742, .44243, .47197,
1025 .49993, .49027, .51147, .52803, .48931, .49729, .5026, .43854,
1026 .441, .44766, .43414, .46151, .50029, .55247, .43855, .32115,
1027 .32607, .3431, .36119, .38029, .41179, .43996, .47144, .51853,
1028 .55362, .59122, .66338, .69877, .74001, .82923, .86907, .90361,
1029 1.0025, 1.031, 1.0559, 1.104, 1.1178, 1.1341, 1.1547, 1.351,
1030 1.4772, 1.4812, 1.4907, 1.512, 1.5442, 1.5853, 1.6358, 1.6963,
1031 1.7674, 1.8474, 1.9353, 2.0335, 2.143, 2.2592, 2.3853, 2.5217,
1032 2.6686, 2.8273, 2.9998, 3.183, 3.3868, 3.6109, 3.8564, 4.1159,
1033 4.4079, 4.7278, 5.0497, 5.3695, 5.758, 6.0834, 6.4976, 6.9312,
1034 7.38, 7.5746, 7.9833, 8.3791, 8.3956, 8.7501, 9.1067, 9.072,
1035 9.4649, 9.9112, 10.402, 10.829, 11.605, 12.54, 12.713, 10.443,
1036 10.825, 11.375, 11.955, 12.623, 13.326, 14.101, 15.041, 15.547,
1037 16.461, 17.439, 18.716, 19.84, 21.036, 22.642, 23.901, 25.244,
1038 27.03, 28.411, 29.871, 31.403, 33.147, 34.744, 36.456, 39.239,
1039 43.605, 45.162, 47.004, 49.093, 51.391, 53.946, 56.673, 59.629,
1040 63.167, 66.576, 70.254, 74.222, 78.477, 83.034, 87.914, 93.18,
1041 98.77, 104.74, 111.15, 117.95, 125.23, 133.01, 141.33, 150.21,
1042 159.71, 169.89, 180.93, 192.54, 204.99, 218.34, 232.65, 248.,
1043 264.47, 282.14, 301.13, 321.53, 343.48, 367.08, 392.5, 419.88,
1044 449.4, 481.26, 515.64, 552.79, 592.99, 636.48, 683.61, 734.65,
1045 789.99, 850.02, 915.14, 985.81, 1062.5, 1147.1, 1237.8, 1336.4,
1046 1443.2, 1558.9, 1684.2, 1819.2, 1965.2, 2122.6, 2291.7, 2470.8,
1047 2665.7, 2874.9, 3099.4, 3337.9, 3541., 3813.3, 4111.9, 4439.3,
1048 4798.9, 5196., 5639.2, 6087.5, 6657.7, 7306.7, 8040.7, 8845.5,
1049 9702.2, 10670., 11739., 12842., 14141., 15498., 17068., 18729.,
1050 20557., 22559., 25248., 27664., 30207., 32915., 35611., 38081.,
1051 40715., 43191., 41651., 42750., 43785., 44353., 44366., 44189.,
1052 43618., 42862., 41878., 35133., 35215., 36383., 39420., 44055.,
1053 44155., 45850., 46853., 39197., 38274., 29942., 28553., 21792.,
1054 21228., 17106., 14955., 18181., 19557., 21427., 23728., 26301.,
1055 28584., 30775., 32536., 33867., 40089., 39204., 37329., 34452.,
1056 31373., 33921., 34800., 36043., 44415., 45162., 52181., 50895.,
1057 54140., 50840., 50468., 48302., 44915., 40910., 36754., 32755.,
1058 29093., 25860., 22962., 20448., 18247., 16326., 14645., 13165.,
1059 11861., 10708., 9686.9, 8779.7, 7971.9, 7250.8, 6605.7, 6027.2,
1060 5507.3, 5039.1, 4616.6, 4234.8, 3889., 3575.4, 3290.5, 3031.3,
1061 2795.2, 2579.9, 2383.1, 2203.3, 2038.6, 1887.6, 1749.1, 1621.9,
1062 1505., 1397.4, 1298.3, 1207., 1122.8, 1045., 973.1, 906.64,
1063 845.16, 788.22, 735.48, 686.57, 641.21, 599.1, 559.99, 523.64,
1064 489.85, 458.42, 429.16, 401.92, 376.54, 352.88, 330.82, 310.24,
1065 291.03, 273.09, 256.34, 240.69, 226.05, 212.37, 199.57, 187.59,
1066 176.37, 165.87, 156.03, 146.82, 138.17, 130.07, 122.47, 115.34,
1067 108.65, 102.37, 96.473, 90.934, 85.73, 80.84, 76.243, 71.922,
1068 67.858, 64.034, 60.438, 57.052, 53.866, 50.866, 48.04, 45.379,
1069 42.872, 40.51, 38.285, 36.188, 34.211, 32.347, 30.588, 28.929,
1070 27.362, 25.884, 24.489, 23.171, 21.929, 20.755, 19.646, 18.599,
1071 17.61, 16.677, 15.795, 14.961, 14.174, 13.43, 12.725, 12.06,
1072 11.431, 10.834, 10.27, 9.7361, 9.2302, 8.7518, 8.2997, 7.8724,
1073 7.4674, 7.0848, 6.7226, 6.3794, 6.054, 5.745, 5.4525, 5.1752,
1074 4.9121, 4.6625, 4.4259, 4.2015, 3.9888, 3.7872, 3.5961, 3.4149,
1075 3.2431, 3.0802, 2.9257, 2.7792, 2.6402, 2.5084, 2.3834, 2.2648,
1076 2.1522, 2.0455, 1.9441, 1.848, 1.7567, 1.6701, 1.5878, 1.5097,
1077 1.4356, 1.3651, 1.2981, 1.2345, 1.174, 1.1167, 1.062, 1.0101,
1078 .96087, .91414, .86986, .82781, .78777, .74971, .71339, .67882,
1079 .64604, .61473, .58507, .55676, .52987, .5044, .48014, .45715,
1080 .43527, .41453, .3948, .37609, .35831, .34142, .32524, .30995,
1081 .29536, .28142, .26807, .25527, .24311, .23166, .22077, .21053,
1082 .20081, .19143, .18261, .17407, .16603, .15833, .15089, .14385,
1083 .13707, .13065, .12449, .11865, .11306, .10774, .10266, .097818,
1084 .093203, .088815, .084641, .080671, .076892, .073296, .069873,
1085 .066613, .06351, .060555, .05774, .055058, .052504, .050071,
1086 .047752, .045543, .043438, .041432, .039521, .037699, .035962,
1087 .034307, .032729, .031225, .029791, .028423, .02712, .025877,
1088 .024692, .023563, .022485, .021458, .020478, .019543, .018652,
1089 .017802, .016992, .016219, .015481, .014778, .014107, .013467,
1090 .012856, .012274, .011718, .011188, .010682, .0102, .0097393,
1091 .0093001, .008881, .0084812, .0080997, .0077358, .0073885,
1092 .0070571, .0067409, .0064393, .0061514, .0058768, .0056147,
1093 .0053647, .0051262, .0048987, .0046816, .0044745, .0042769,
1094 .0040884, .0039088, .0037373, .0035739, .003418, .0032693,
1095 .0031277, .0029926, .0028639, .0027413, .0026245, .0025133,
1096 .0024074, .0023066, .0022108, .0021196, .002033, .0019507,
1097 .0018726, .0017985, .0017282, .0016617, .0015988, .0015394,
1098 .0014834, .0014306, .0013811, .0013346, .0012911, .0012506,
1099 .0012131, .0011784, .0011465, .0011175, .0010912, .0010678,
1100 .0010472, .0010295, .0010147, .001003, 9.9428e-4, 9.8883e-4,
1101 9.8673e-4, 9.8821e-4, 9.9343e-4, .0010027, .0010164, .0010348,
1102 .0010586, .0010882, .0011245, .0011685, .0012145, .0012666,
1103 .0013095, .0013688, .0014048, .0014663, .0015309, .0015499,
1104 .0016144, .0016312, .001705, .0017892, .0018499, .0019715,
1105 .0021102, .0022442, .0024284, .0025893, .0027703, .0029445,
1106 .0031193, .003346, .0034552, .0036906, .0037584, .0040084,
1107 .0041934, .0044587, .0047093, .0049759, .0053421, .0055134,
1108 .0059048, .0058663, .0061036, .0063259, .0059657, .0060653,
1109 .0060972, .0055539, .0055653, .0055772, .005331, .0054953,
1110 .0055919, .0058684, .006183, .0066675, .0069808, .0075142,
1111 .0078536, .0084282, .0089454, .0094625, .0093703, .0095857,
1112 .0099283, .010063, .010521, .0097778, .0098175, .010379, .010447,
1113 .0105, .010617, .010706, .01078, .011177, .011212, .011304,
1114 .011446, .011603, .011816, .012165, .012545, .013069, .013539,
1115 .01411, .014776, .016103, .017016, .017994, .018978, .01998,
1116 .021799, .022745, .023681, .024627, .025562, .026992, .027958,
1117 .029013, .030154, .031402, .03228, .033651, .035272, .037088,
1118 .039021, .041213, .043597, .045977, .04877, .051809, .054943,
1119 .058064, .061528, .06537, .069309, .071928, .075752, .079589,
1120 .083352, .084096, .087497, .090817, .091198, .094966, .099045,
1121 .10429, .10867, .11518, .12269, .13126, .14087, .15161, .16388,
1122 .16423, .1759, .18721, .19994, .21275, .22513, .23041, .24231,
1123 .25299, .25396, .26396, .27696, .27929, .2908, .30595, .31433,
1124 .3282, .3429, .35944, .37467, .39277, .41245, .43326, .45649,
1125 .48152, .51897, .54686, .57877, .61263, .64962, .68983, .73945,
1126 .78619, .83537, .89622, .95002, 1.0067, 1.0742, 1.1355, 1.2007,
1127 1.2738, 1.347, 1.4254, 1.5094, 1.6009, 1.6976, 1.8019, 1.9148,
1128 2.0357, 2.166, 2.3066, 2.4579, 2.6208, 2.7966, 2.986, 3.188,
1129 3.4081, 3.6456, 3.9, 4.1747, 4.4712, 4.7931, 5.1359, 5.5097,
1130 5.9117, 6.3435, 6.8003, 7.3001, 7.8385, 8.3945, 9.011, 9.6869,
1131 10.392, 11.18, 12.036, 12.938, 13.944, 14.881, 16.029, 17.255,
1132 18.574, 19.945, 21.38, 22.9, 24.477, 26.128, 27.87, 29.037,
1133 30.988, 33.145, 35.506, 37.76, 40.885, 44.487, 48.505, 52.911,
1134 57.56, 61.964, 67.217, 72.26, 78.343, 85.08, 91.867, 99.435,
1135 107.68, 116.97, 127.12, 138.32, 150.26, 163.04, 174.81, 189.26,
1136 205.61, 224.68, 240.98, 261.88, 285.1, 307.58, 334.35, 363.53,
1137 394.68, 427.85, 458.85, 489.25, 472.87, 486.93, 496.27, 501.52,
1138 501.57, 497.14, 488.09, 476.32, 393.76, 388.51, 393.42, 414.45,
1139 455.12, 514.62, 520.38, 547.42, 562.6, 487.47, 480.83, 391.06,
1140 376.92, 303.7, 295.91, 256.03, 236.73, 280.38, 310.71, 335.53,
1141 367.88, 401.94, 435.52, 469.13, 497.94, 588.82, 597.94, 597.2,
1142 588.28, 571.2, 555.75, 603.56, 638.15, 680.75, 801.72, 848.01,
1143 962.15, 990.06, 1068.1, 1076.2, 1115.3, 1134.2, 1136.6, 1119.1,
1144 1108.9, 1090.6, 1068.7, 1041.9, 1005.4, 967.98, 927.08, 780.1,
1145 751.41, 733.12, 742.65, 785.56, 855.16, 852.45, 878.1, 784.59,
1146 777.81, 765.13, 622.93, 498.09, 474.89, 386.9, 378.48, 336.17,
1147 322.04, 329.57, 350.5, 383.38, 420.02, 462.39, 499.71, 531.98,
1148 654.99, 653.43, 639.99, 605.16, 554.16, 504.42, 540.64, 552.33,
1149 679.46, 699.51, 713.91, 832.17, 919.91, 884.96, 907.57, 846.56,
1150 818.56, 768.93, 706.71, 642.17, 575.95, 515.38, 459.07, 409.02,
1151 364.61, 325.46, 291.1, 260.89, 234.39, 211.01, 190.38, 172.11,
1152 155.91, 141.49, 128.63, 117.13, 106.84, 97.584, 89.262, 81.756,
1153 74.975, 68.842, 63.28, 58.232, 53.641, 49.46, 45.649, 42.168,
1154 38.991, 36.078, 33.409, 30.96, 28.71, 26.642, 24.737, 22.985,
1155 21.37, 19.882, 18.512, 17.242, 16.073, 14.987, 13.984, 13.05,
1156 12.186, 11.384, 10.637, 9.9436, 9.2988, 8.6991, 8.141, 7.6215,
1157 7.1378, 6.6872, 6.2671, 5.8754, 5.51, 5.1691, 4.851, 4.5539,
1158 4.2764, 4.0169, 3.7742, 3.5472, 3.3348, 3.1359, 2.9495, 2.7749,
1159 2.6113, 2.4578, 2.3139, 2.1789, 2.0523, 1.9334, 1.8219, 1.7171,
1160 1.6188, 1.5263, 1.4395, 1.3579, 1.2812, 1.209, 1.1411, 1.0773,
1161 1.0171, .96048, .90713, .85684, .80959, .76495, .72282, .68309,
1162 .64563, .61035, .57707, .54573, .51622, .48834, .46199, .43709,
1163 .41359, .39129, .37034, .35064, .33198, .31442, .29784, .28218,
1164 .26732, .25337, .24017, .22774, .21601, .20479, .19426
1165 };
1166
1167 static double co2260[2001] = { 5.7971e-5, 6.0733e-5, 6.3628e-5, 6.6662e-5,
1168 6.9843e-5, 7.3176e-5, 7.6671e-5, 8.0334e-5, 8.4175e-5, 8.8201e-5,
1169 9.2421e-5, 9.6846e-5, 1.0149e-4, 1.0635e-4, 1.1145e-4, 1.1679e-4,
1170 1.224e-4, 1.2828e-4, 1.3444e-4, 1.409e-4, 1.4768e-4, 1.5479e-4,
1171 1.6224e-4, 1.7006e-4, 1.7826e-4, 1.8685e-4, 1.9587e-4, 2.0532e-4,
1172 2.1524e-4, 2.2565e-4, 2.3656e-4, 2.48e-4, 2.6001e-4, 2.7261e-4,
1173 2.8582e-4, 2.9968e-4, 3.1422e-4, 3.2948e-4, 3.4548e-4, 3.6228e-4,
1174 3.799e-4, 3.9838e-4, 4.1778e-4, 4.3814e-4, 4.595e-4, 4.8191e-4,
1175 5.0543e-4, 5.3012e-4, 5.5603e-4, 5.8321e-4, 6.1175e-4, 6.417e-4,
1176 6.7314e-4, 7.0614e-4, 7.4078e-4, 7.7714e-4, 8.1531e-4, 8.5538e-4,
1177 8.9745e-4, 9.4162e-4, 9.8798e-4, .0010367, .0010878, .0011415,
1178 .0011978, .001257, .0013191, .0013844, .001453, .0015249,
1179 .0016006, .00168, .0017634, .001851, .001943, .0020397, .0021412,
1180 .0022479, .00236, .0024778, .0026015, .0027316, .0028682,
1181 .0030117, .0031626, .0033211, .0034877, .0036628, .0038469,
1182 .0040403, .0042436, .0044574, .004682, .0049182, .0051665,
1183 .0054276, .0057021, .0059907, .0062942, .0066133, .0069489,
1184 .0073018, .0076729, .0080632, .0084738, .0089056, .0093599,
1185 .0098377, .01034, .010869, .011426, .012011, .012627, .013276,
1186 .013958, .014676, .015431, .016226, .017063, .017944, .018872,
1187 .019848, .020876, .021958, .023098, .024298, .025561, .026892,
1188 .028293, .029769, .031323, .032961, .034686, .036503, .038418,
1189 .040435, .042561, .044801, .047161, .049649, .052271, .055035,
1190 .057948, .061019, .064256, .06767, .07127, .075066, .079069,
1191 .083291, .087744, .092441, .097396, .10262, .10814, .11396,
1192 .1201, .12658, .13342, .14064, .14826, .1563, .1648, .17376,
1193 .18323, .19324, .2038, .21496, .22674, .23919, .25234, .26624,
1194 .28093, .29646, .31287, .33021, .34855, .36794, .38844, .41012,
1195 .43305, .45731, .48297, .51011, .53884, .56924, .60141, .63547,
1196 .67152, .70969, .75012, .79292, .83826, .8863, .93718, .99111,
1197 1.0482, 1.1088, 1.173, 1.2411, 1.3133, 1.3898, 1.471, 1.5571,
1198 1.6485, 1.7455, 1.8485, 1.9577, 2.0737, 2.197, 2.3278, 2.4668,
1199 2.6145, 2.7715, 2.9383, 3.1156, 3.3042, 3.5047, 3.7181, 3.9451,
1200 4.1866, 4.4437, 4.7174, 5.0089, 5.3192, 5.65, 6.0025, 6.3782,
1201 6.7787, 7.206, 7.6617, 8.1479, 8.6669, 9.221, 9.8128, 10.445,
1202 11.12, 11.843, 12.615, 13.441, 14.325, 15.271, 16.283, 17.367,
1203 18.529, 19.776, 21.111, 22.544, 24.082, 25.731, 27.504, 29.409,
1204 31.452, 33.654, 36.024, 38.573, 41.323, 44.29, 47.492, 50.951,
1205 54.608, 58.588, 62.929, 67.629, 72.712, 78.226, 84.207, 90.699,
1206 97.749, 105.42, 113.77, 122.86, 132.78, 143.61, 155.44, 168.33,
1207 182.48, 198.01, 214.87, 233.39, 253.86, 276.34, 300.3, 327.28,
1208 356.89, 389.48, 422.29, 458.99, 501.39, 548.13, 595.62, 652.74,
1209 716.54, 784.57, 866.78, 960.59, 1062.8, 1072.5, 1189.5, 1319.4,
1210 1467.6, 1630.2, 1813.7, 2016.9, 2253., 2515.3, 2773.5, 3092.8,
1211 3444.4, 3720.4, 4104.3, 4527.5, 4645.9, 5021.7, 5462.2, 5597.,
1212 6110.6, 6732.5, 7513.8, 8270.6, 9640.6, 11487., 2796.1, 2680.1,
1213 2441.6, 2404.2, 2334.8, 2215.2, 1642.5, 1477.9, 1328.1, 1223.5,
1214 843.34, 766.96, 831.65, 834.84, 774.85, 1156.3, 1275.6, 1366.1,
1215 1795.6, 1885., 1936.5, 1953.4, 2154.4, 2002.7, 1789.8, 10381.,
1216 9040., 8216.5, 7384.7, 6721.9, 6187.7, 6143.8, 5703.9, 5276.6,
1217 4873.1, 4736., 4325.3, 3927., 3554.1, 3286.1, 2950.1, 2642.4,
1218 2368.7, 2138.9, 1914., 1719.6, 1543.9, 1388.6, 1252.1, 1132.2,
1219 1024.1, 1025.4, 920.58, 829.59, 750.54, 685.01, 624.25, 570.14,
1220 525.81, 481.85, 441.95, 408.71, 377.23, 345.86, 318.51, 292.26,
1221 268.34, 247.04, 227.14, 209.02, 192.69, 177.59, 163.78, 151.26,
1222 139.73, 129.19, 119.53, 110.7, 102.57, 95.109, 88.264, 81.948,
1223 76.13, 70.768, 65.827, 61.251, 57.022, 53.495, 49.824, 46.443,
1224 43.307, 40.405, 37.716, 35.241, 32.923, 30.77, 28.78, 26.915,
1225 25.177, 23.56, 22.059, 20.654, 19.345, 18.126, 16.988, 15.93,
1226 14.939, 14.014, 13.149, 12.343, 11.589, 10.884, 10.225, 9.6093,
1227 9.0327, 8.4934, 7.9889, 7.5166, 7.0744, 6.6604, 6.2727, 5.9098,
1228 5.5701, 5.2529, 4.955, 4.676, 4.4148, 4.171, 3.9426, 3.7332,
1229 3.5347, 3.3493, 3.1677, 3.0025, 2.8466, 2.6994, 2.5601, 2.4277,
1230 2.3016, 2.1814, 2.0664, 1.9564, 1.8279, 1.7311, 1.6427, 1.5645,
1231 1.4982, 1.443, 1.374, 1.3146, 1.2562, 1.17, 1.1105, 1.0272,
1232 .96863, .89718, .83654, .80226, .75908, .72431, .69573, .67174,
1233 .65126, .63315, .61693, .60182, .58715, .59554, .57649, .55526,
1234 .53177, .50622, .48176, .4813, .47642, .47492, .50273, .50293,
1235 .52687, .52239, .53419, .53814, .52626, .52211, .51492, .50622,
1236 .49746, .48841, .4792, .43534, .41999, .40349, .38586, .36799,
1237 .35108, .31089, .30803, .3171, .33599, .35041, .36149, .32924,
1238 .32462, .27309, .25961, .20922, .19504, .15683, .13098, .11588,
1239 .11478, .11204, .11363, .12135, .16423, .17785, .19094, .20236,
1240 .21084, .2154, .24108, .22848, .20871, .18797, .17963, .17834,
1241 .21552, .22284, .26945, .27052, .30108, .28977, .29772, .29224,
1242 .27658, .24956, .22777, .20654, .18392, .16338, .1452, .12916,
1243 .1152, .10304, .092437, .083163, .075031, .067878, .061564,
1244 .055976, .051018, .046609, .042679, .03917, .036032, .033223,
1245 .030706, .02845, .026428, .024617, .022998, .021554, .02027,
1246 .019136, .018141, .017278, .016541, .015926, .015432, .015058,
1247 .014807, .014666, .014635, .014728, .014947, .01527, .015728,
1248 .016345, .017026, .017798, .018839, .019752, .020636, .021886,
1249 .022695, .02327, .023478, .024292, .023544, .022222, .021932,
1250 .020052, .018143, .017722, .017031, .017782, .01938, .020734,
1251 .020476, .019255, .017477, .016878, .014617, .012489, .011765,
1252 .0099077, .0086446, .0079446, .0078644, .0079763, .008671,
1253 .01001, .0108, .012933, .015349, .016341, .018484, .020254,
1254 .020254, .020478, .019591, .018595, .018385, .019913, .022254,
1255 .024847, .025809, .028053, .029924, .030212, .031367, .03222,
1256 .032739, .032537, .03286, .033344, .033507, .033499, .033339,
1257 .032809, .033041, .031723, .029837, .027511, .026603, .024032,
1258 .021914, .020948, .021701, .023425, .024259, .024987, .023818,
1259 .021768, .019223, .018144, .015282, .012604, .01163, .0097907,
1260 .008336, .0082473, .0079582, .0088077, .009779, .010129, .012145,
1261 .014378, .016761, .01726, .018997, .019998, .019809, .01819,
1262 .016358, .016099, .01617, .017939, .020223, .022521, .02277,
1263 .024279, .025247, .024222, .023989, .023224, .021493, .020362,
1264 .018596, .017309, .015975, .014466, .013171, .011921, .01078,
1265 .0097229, .0087612, .0078729, .0070682, .0063494, .0057156,
1266 .0051459, .0046273, .0041712, .0037686, .0034119, .003095,
1267 .0028126, .0025603, .0023342, .0021314, .0019489, .0017845,
1268 .001636, .0015017, .00138, .0012697, .0011694, .0010782,
1269 9.9507e-4, 9.1931e-4, 8.5013e-4, 7.869e-4, 7.2907e-4, 6.7611e-4,
1270 6.2758e-4, 5.8308e-4, 5.4223e-4, 5.0473e-4, 4.7027e-4, 4.3859e-4,
1271 4.0946e-4, 3.8265e-4, 3.5798e-4, 3.3526e-4, 3.1436e-4, 2.9511e-4,
1272 2.7739e-4, 2.6109e-4, 2.4609e-4, 2.3229e-4, 2.1961e-4, 2.0797e-4,
1273 1.9729e-4, 1.875e-4, 1.7855e-4, 1.7038e-4, 1.6294e-4, 1.5619e-4,
1274 1.5007e-4, 1.4456e-4, 1.3961e-4, 1.3521e-4, 1.3131e-4, 1.2789e-4,
1275 1.2494e-4, 1.2242e-4, 1.2032e-4, 1.1863e-4, 1.1733e-4, 1.1641e-4,
1276 1.1585e-4, 1.1565e-4, 1.158e-4, 1.1629e-4, 1.1712e-4, 1.1827e-4,
1277 1.1976e-4, 1.2158e-4, 1.2373e-4, 1.262e-4, 1.2901e-4, 1.3214e-4,
1278 1.3562e-4, 1.3944e-4, 1.4361e-4, 1.4814e-4, 1.5303e-4, 1.5829e-4,
1279 1.6394e-4, 1.6999e-4, 1.7644e-4, 1.8332e-4, 1.9063e-4, 1.984e-4,
1280 2.0663e-4, 2.1536e-4, 2.246e-4, 2.3436e-4, 2.4468e-4, 2.5558e-4,
1281 2.6708e-4, 2.7921e-4, 2.92e-4, 3.0548e-4, 3.1968e-4, 3.3464e-4,
1282 3.5039e-4, 3.6698e-4, 3.8443e-4, 4.0281e-4, 4.2214e-4, 4.4248e-4,
1283 4.6389e-4, 4.864e-4, 5.1009e-4, 5.3501e-4, 5.6123e-4, 5.888e-4,
1284 6.1781e-4, 6.4833e-4, 6.8043e-4, 7.142e-4, 7.4973e-4, 7.8711e-4,
1285 8.2644e-4, 8.6783e-4, 9.1137e-4, 9.5721e-4, .0010054, .0010562,
1286 .0011096, .0011659, .0012251, .0012875, .0013532, .0014224,
1287 .0014953, .001572, .0016529, .0017381, .0018279, .0019226,
1288 .0020224, .0021277, .0022386, .0023557, .0024792, .0026095,
1289 .002747, .0028921, .0030453, .0032071, .003378, .0035586,
1290 .0037494, .003951, .0041642, .0043897, .0046282, .0048805,
1291 .0051476, .0054304, .00573, .0060473, .0063837, .0067404,
1292 .0071188, .0075203, .0079466, .0083994, .0088806, .0093922,
1293 .0099366, .010516, .011134, .011792, .012494, .013244, .014046,
1294 .014898, .015808, .016781, .017822, .018929, .020108, .02138,
1295 .022729, .02419, .02576, .027412, .029233, .031198, .033301,
1296 .035594, .038092, .040767, .04372, .046918, .050246, .053974,
1297 .058009, .061976, .066586, .071537, .076209, .081856, .087998,
1298 .093821, .10113, .10913, .11731, .12724, .13821, .15025, .1639,
1299 .17807, .19472, .21356, .23496, .25758, .28387, .31389, .34104,
1300 .37469, .40989, .43309, .46845, .5042, .5023, .52981, .55275,
1301 .51075, .51976, .52457, .44779, .44721, .4503, .4243, .45244,
1302 .49491, .55399, .39021, .24802, .2501, .2618, .27475, .28879,
1303 .31317, .33643, .36257, .4018, .43275, .46525, .53333, .56599,
1304 .60557, .70142, .74194, .77736, .88567, .91182, .93294, .98407,
1305 .98772, .99176, .9995, 1.2405, 1.3602, 1.338, 1.3255, 1.3267,
1306 1.3404, 1.3634, 1.3967, 1.4407, 1.4961, 1.5603, 1.6328, 1.7153,
1307 1.8094, 1.9091, 2.018, 2.1367, 2.264, 2.4035, 2.5562, 2.7179,
1308 2.9017, 3.1052, 3.3304, 3.5731, 3.8488, 4.1553, 4.4769, 4.7818,
1309 5.1711, 5.5204, 5.9516, 6.4097, 6.8899, 7.1118, 7.5469, 7.9735,
1310 7.9511, 8.3014, 8.6418, 8.4757, 8.8256, 9.2294, 9.6923, 10.033,
1311 10.842, 11.851, 11.78, 8.8435, 9.1381, 9.5956, 10.076, 10.629,
1312 11.22, 11.883, 12.69, 13.163, 13.974, 14.846, 16.027, 17.053,
1313 18.148, 19.715, 20.907, 22.163, 23.956, 25.235, 26.566, 27.94,
1314 29.576, 30.956, 32.432, 35.337, 39.911, 41.128, 42.625, 44.386,
1315 46.369, 48.619, 51.031, 53.674, 56.825, 59.921, 63.286, 66.929,
1316 70.859, 75.081, 79.618, 84.513, 89.739, 95.335, 101.35, 107.76,
1317 114.63, 121.98, 129.87, 138.3, 147.34, 157.04, 167.56, 178.67,
1318 190.61, 203.43, 217.19, 231.99, 247.88, 264.98, 283.37, 303.17,
1319 324.49, 347.47, 372.25, 398.98, 427.85, 459.06, 492.8, 529.31,
1320 568.89, 611.79, 658.35, 708.91, 763.87, 823.65, 888.72, 959.58,
1321 1036.8, 1121.8, 1213.9, 1314.3, 1423.8, 1543., 1672.8, 1813.4,
1322 1966.1, 2131.4, 2309.5, 2499.3, 2705., 2925.7, 3161.6, 3411.3,
1323 3611.5, 3889.2, 4191.1, 4519.3, 4877.9, 5272.9, 5712.9, 6142.7,
1324 6719.6, 7385., 8145., 8977.7, 9831.9, 10827., 11934., 13063.,
1325 14434., 15878., 17591., 19435., 21510., 23835., 26835., 29740.,
1326 32878., 36305., 39830., 43273., 46931., 50499., 49586., 51598.,
1327 53429., 54619., 55081., 55102., 54485., 53487., 52042., 42689.,
1328 42607., 44020., 47994., 54169., 53916., 55808., 56642., 46049.,
1329 44243., 32929., 30658., 21963., 20835., 15962., 13679., 17652.,
1330 19680., 22388., 25625., 29184., 32520., 35720., 38414., 40523.,
1331 49228., 48173., 45678., 41768., 37600., 41313., 42654., 44465.,
1332 55736., 56630., 65409., 63308., 66572., 61845., 60379., 56777.,
1333 51920., 46601., 41367., 36529., 32219., 28470., 25192., 22362.,
1334 19907., 17772., 15907., 14273., 12835., 11567., 10445., 9450.2,
1335 8565.1, 7776., 7070.8, 6439.2, 5872.3, 5362.4, 4903., 4488.3,
1336 4113.4, 3773.8, 3465.8, 3186.1, 2931.7, 2700.1, 2488.8, 2296.,
1337 2119.8, 1958.6, 1810.9, 1675.6, 1551.4, 1437.3, 1332.4, 1236.,
1338 1147.2, 1065.3, 989.86, 920.22, 855.91, 796.48, 741.53, 690.69,
1339 643.62, 600.02, 559.6, 522.13, 487.35, 455.06, 425.08, 397.21,
1340 371.3, 347.2, 324.78, 303.9, 284.46, 266.34, 249.45, 233.7,
1341 219.01, 205.3, 192.5, 180.55, 169.38, 158.95, 149.2, 140.07,
1342 131.54, 123.56, 116.09, 109.09, 102.54, 96.405, 90.655, 85.266,
1343 80.213, 75.475, 71.031, 66.861, 62.948, 59.275, 55.827, 52.587,
1344 49.544, 46.686, 43.998, 41.473, 39.099, 36.867, 34.768, 32.795,
1345 30.939, 29.192, 27.546, 25.998, 24.539, 23.164, 21.869, 20.65,
1346 19.501, 18.419, 17.399, 16.438, 15.532, 14.678, 13.874, 13.115,
1347 12.4, 11.726, 11.088, 10.488, 9.921, 9.3846, 8.8784, 8.3996,
1348 7.9469, 7.5197, 7.1174, 6.738, 6.379, 6.0409, 5.7213, 5.419,
1349 5.1327, 4.8611, 4.6046, 4.3617, 4.1316, 3.9138, 3.7077, 3.5125,
1350 3.3281, 3.1536, 2.9885, 2.8323, 2.6846, 2.5447, 2.4124, 2.2871,
1351 2.1686, 2.0564, 1.9501, 1.8495, 1.7543, 1.6641, 1.5787, 1.4978,
1352 1.4212, 1.3486, 1.2799, 1.2147, 1.1529, 1.0943, 1.0388, .98602,
1353 .93596, .8886, .84352, .80078, .76029, .722, .68585, .65161,
1354 .61901, .58808, .55854, .53044, .5039, .47853, .45459, .43173,
1355 .41008, .38965, .37021, .35186, .33444, .31797, .30234, .28758,
1356 .2736, .26036, .24764, .2357, .22431, .21342, .20295, .19288,
1357 .18334, .17444, .166, .15815, .15072, .14348, .13674, .13015,
1358 .12399, .11807, .11231, .10689, .10164, .096696, .091955,
1359 .087476, .083183, .079113, .075229, .071536, .068026, .064698,
1360 .06154, .058544, .055699, .052997, .050431, .047993, .045676,
1361 .043475, .041382, .039392, .037501, .035702, .033991, .032364,
1362 .030817, .029345, .027945, .026613, .025345, .024139, .022991,
1363 .021899, .02086, .019871, .018929, .018033, .01718, .016368,
1364 .015595, .014859, .014158, .013491, .012856, .012251, .011675,
1365 .011126, .010604, .010107, .0096331, .009182, .0087523, .0083431,
1366 .0079533, .0075821, .0072284, .0068915, .0065706, .0062649,
1367 .0059737, .0056963, .005432, .0051802, .0049404, .0047118,
1368 .0044941, .0042867, .0040891, .0039009, .0037216, .0035507,
1369 .003388, .0032329, .0030852, .0029445, .0028105, .0026829,
1370 .0025613, .0024455, .0023353, .0022303, .0021304, .0020353,
1371 .0019448, .0018587, .0017767, .0016988, .0016247, .0015543,
1372 .0014874, .0014238, .0013635, .0013062, .0012519, .0012005,
1373 .0011517, .0011057, .0010621, .001021, 9.8233e-4, 9.4589e-4,
1374 9.1167e-4, 8.7961e-4, 8.4964e-4, 8.2173e-4, 7.9582e-4, 7.7189e-4,
1375 7.499e-4, 7.2983e-4, 7.1167e-4, 6.9542e-4, 6.8108e-4, 6.6866e-4,
1376 6.5819e-4, 6.4971e-4, 6.4328e-4, 6.3895e-4, 6.3681e-4, 6.3697e-4,
1377 6.3956e-4, 6.4472e-4, 6.5266e-4, 6.6359e-4, 6.778e-4, 6.9563e-4,
1378 7.1749e-4, 7.4392e-4, 7.7556e-4, 8.1028e-4, 8.4994e-4, 8.8709e-4,
1379 9.3413e-4, 9.6953e-4, .0010202, .0010738, .0010976, .0011507,
1380 .0011686, .0012264, .001291, .0013346, .0014246, .0015293,
1381 .0016359, .0017824, .0019255, .0020854, .002247, .0024148,
1382 .0026199, .0027523, .0029704, .0030702, .0033047, .0035013,
1383 .0037576, .0040275, .0043089, .0046927, .0049307, .0053486,
1384 .0053809, .0056699, .0059325, .0055488, .005634, .0056392,
1385 .004946, .0048855, .0048208, .0044386, .0045498, .0046377,
1386 .0048939, .0052396, .0057324, .0060859, .0066906, .0071148,
1387 .0077224, .0082687, .008769, .0084471, .008572, .0087729,
1388 .008775, .0090742, .0080704, .0080288, .0085747, .0086087,
1389 .0086408, .0088752, .0089381, .0089757, .0093532, .0092824,
1390 .0092566, .0092645, .0092735, .009342, .0095806, .0097991,
1391 .010213, .010611, .011129, .011756, .013237, .01412, .015034,
1392 .015936, .01682, .018597, .019315, .019995, .020658, .021289,
1393 .022363, .022996, .023716, .024512, .025434, .026067, .027118,
1394 .028396, .029865, .031442, .033253, .03525, .037296, .039701,
1395 .042356, .045154, .048059, .051294, .054893, .058636, .061407,
1396 .065172, .068974, .072676, .073379, .076547, .079556, .079134,
1397 .082308, .085739, .090192, .09359, .099599, .10669, .11496,
1398 .1244, .13512, .14752, .14494, .15647, .1668, .17863, .19029,
1399 .20124, .20254, .21179, .21982, .21625, .22364, .23405, .23382,
1400 .2434, .25708, .26406, .27621, .28909, .30395, .31717, .33271,
1401 .3496, .36765, .38774, .40949, .446, .46985, .49846, .5287, .562,
1402 .59841, .64598, .68834, .7327, .78978, .8373, .88708, .94744,
1403 1.0006, 1.0574, 1.1215, 1.1856, 1.2546, 1.3292, 1.4107, 1.4974,
1404 1.5913, 1.6931, 1.8028, 1.9212, 2.0492, 2.1874, 2.3365, 2.4978,
1405 2.6718, 2.8588, 3.062, 3.2818, 3.5188, 3.7752, 4.0527, 4.3542,
1406 4.6782, 5.0312, 5.4123, 5.8246, 6.2639, 6.7435, 7.2636, 7.8064,
1407 8.4091, 9.0696, 9.7677, 10.548, 11.4, 12.309, 13.324, 14.284,
1408 15.445, 16.687, 18.019, 19.403, 20.847, 22.366, 23.925, 25.537,
1409 27.213, 28.069, 29.864, 31.829, 33.988, 35.856, 38.829, 42.321,
1410 46.319, 50.606, 55.126, 59.126, 64.162, 68.708, 74.615, 81.176,
1411 87.739, 95.494, 103.83, 113.38, 123.99, 135.8, 148.7, 162.58,
1412 176.32, 192.6, 211.47, 232.7, 252.64, 277.41, 305.38, 333.44,
1413 366.42, 402.66, 442.14, 484.53, 526.42, 568.15, 558.78, 582.6,
1414 600.98, 613.94, 619.44, 618.24, 609.84, 595.96, 484.86, 475.59,
1415 478.49, 501.56, 552.19, 628.44, 630.39, 658.92, 671.96, 562.7,
1416 545.88, 423.43, 400.14, 306.59, 294.13, 246.8, 226.51, 278.21,
1417 314.39, 347.22, 389.13, 433.16, 477.48, 521.67, 560.54, 683.6,
1418 696.37, 695.91, 683.1, 658.24, 634.89, 698.85, 742.87, 796.66,
1419 954.49, 1009.5, 1150.5, 1179.1, 1267.9, 1272.4, 1312.7, 1330.4,
1420 1331.6, 1315.8, 1308.3, 1293.3, 1274.6, 1249.5, 1213.2, 1172.1,
1421 1124.4, 930.33, 893.36, 871.27, 883.54, 940.76, 1036., 1025.6,
1422 1053.1, 914.51, 894.15, 865.03, 670.63, 508.41, 475.15, 370.85,
1423 361.06, 319.38, 312.75, 331.87, 367.13, 415., 467.94, 525.49,
1424 578.41, 624.66, 794.82, 796.97, 780.29, 736.49, 670.18, 603.75,
1425 659.67, 679.8, 857.12, 884.05, 900.65, 1046.1, 1141.9, 1083.,
1426 1089.2, 1e3, 947.08, 872.31, 787.91, 704.75, 624.93, 553.68,
1427 489.91, 434.21, 385.64, 343.3, 306.42, 274.18, 245.94, 221.11,
1428 199.23, 179.88, 162.73, 147.48, 133.88, 121.73, 110.86, 101.1,
1429 92.323, 84.417, 77.281, 70.831, 64.991, 59.694, 54.884, 50.509,
1430 46.526, 42.893, 39.58, 36.549, 33.776, 31.236, 28.907, 26.77,
1431 24.805, 23., 21.339, 19.81, 18.404, 17.105, 15.909, 14.801,
1432 13.778, 12.83, 11.954, 11.142, 10.389, 9.691, 9.0434, 8.4423,
1433 7.8842, 7.3657, 6.8838, 6.4357, 6.0189, 5.6308, 5.2696, 4.9332,
1434 4.6198, 4.3277, 4.0553, 3.8012, 3.5639, 3.3424, 3.1355, 2.9422,
1435 2.7614, 2.5924, 2.4343, 2.2864, 2.148, 2.0184, 1.8971, 1.7835,
1436 1.677, 1.5773, 1.4838, 1.3961, 1.3139, 1.2369, 1.1645, 1.0966,
1437 1.0329, .97309, .91686, .86406, .81439, .76767, .72381, .68252,
1438 .64359, .60695, .57247, .54008, .50957, .48092, .45401, .42862,
1439 .40465, .38202, .36072, .34052, .3216, .30386, .28711, .27135,
1440 .25651, .24252, .2293, .21689, .20517, .19416, .18381, .17396,
1441 .16469
1442 };
1443
1444 static double co2230[2001] = { 2.743e-5, 2.8815e-5, 3.027e-5, 3.1798e-5,
1445 3.3405e-5, 3.5094e-5, 3.6869e-5, 3.8734e-5, 4.0694e-5, 4.2754e-5,
1446 4.492e-5, 4.7196e-5, 4.9588e-5, 5.2103e-5, 5.4747e-5, 5.7525e-5,
1447 6.0446e-5, 6.3516e-5, 6.6744e-5, 7.0137e-5, 7.3704e-5, 7.7455e-5,
1448 8.1397e-5, 8.5543e-5, 8.9901e-5, 9.4484e-5, 9.9302e-5, 1.0437e-4,
1449 1.097e-4, 1.153e-4, 1.2119e-4, 1.2738e-4, 1.3389e-4, 1.4074e-4,
1450 1.4795e-4, 1.5552e-4, 1.6349e-4, 1.7187e-4, 1.8068e-4, 1.8995e-4,
1451 1.997e-4, 2.0996e-4, 2.2075e-4, 2.321e-4, 2.4403e-4, 2.5659e-4,
1452 2.698e-4, 2.837e-4, 2.9832e-4, 3.137e-4, 3.2988e-4, 3.4691e-4,
1453 3.6483e-4, 3.8368e-4, 4.0351e-4, 4.2439e-4, 4.4635e-4, 4.6947e-4,
1454 4.9379e-4, 5.1939e-4, 5.4633e-4, 5.7468e-4, 6.0452e-4, 6.3593e-4,
1455 6.69e-4, 7.038e-4, 7.4043e-4, 7.79e-4, 8.1959e-4, 8.6233e-4,
1456 9.0732e-4, 9.5469e-4, .0010046, .0010571, .0011124, .0011706,
1457 .0012319, .0012964, .0013644, .001436, .0015114, .0015908,
1458 .0016745, .0017625, .0018553, .0019531, .002056, .0021645,
1459 .0022788, .0023992, .002526, .0026596, .0028004, .0029488,
1460 .0031052, .0032699, .0034436, .0036265, .0038194, .0040227,
1461 .0042369, .0044628, .0047008, .0049518, .0052164, .0054953,
1462 .0057894, .0060995, .0064265, .0067713, .007135, .0075184,
1463 .0079228, .0083494, .0087993, .0092738, .0097745, .010303,
1464 .01086, .011448, .012068, .012722, .013413, .014142, .014911,
1465 .015723, .01658, .017484, .018439, .019447, .020511, .021635,
1466 .022821, .024074, .025397, .026794, .02827, .029829, .031475,
1467 .033215, .035052, .036994, .039045, .041213, .043504, .045926,
1468 .048485, .05119, .05405, .057074, .060271, .063651, .067225,
1469 .071006, .075004, .079233, .083708, .088441, .093449, .098749,
1470 .10436, .11029, .11657, .12322, .13026, .13772, .14561, .15397,
1471 .16282, .1722, .18214, .19266, .20381, .21563, .22816, .24143,
1472 .2555, .27043, .28625, .30303, .32082, .3397, .35972, .38097,
1473 .40352, .42746, .45286, .47983, .50847, .53888, .57119, .6055,
1474 .64196, .6807, .72187, .76564, .81217, .86165, .91427, .97025,
1475 1.0298, 1.0932, 1.1606, 1.2324, 1.3088, 1.3902, 1.477, 1.5693,
1476 1.6678, 1.7727, 1.8845, 2.0038, 2.131, 2.2666, 2.4114, 2.5659,
1477 2.7309, 2.907, 3.0951, 3.2961, 3.5109, 3.7405, 3.986, 4.2485,
1478 4.5293, 4.8299, 5.1516, 5.4961, 5.8651, 6.2605, 6.6842, 7.1385,
1479 7.6256, 8.1481, 8.7089, 9.3109, 9.9573, 10.652, 11.398, 12.2,
1480 13.063, 13.992, 14.99, 16.064, 17.222, 18.469, 19.813, 21.263,
1481 22.828, 24.516, 26.34, 28.31, 30.437, 32.738, 35.226, 37.914,
1482 40.824, 43.974, 47.377, 51.061, 55.011, 59.299, 63.961, 69.013,
1483 74.492, 80.444, 86.919, 93.836, 101.23, 109.25, 117.98, 127.47,
1484 137.81, 149.07, 161.35, 174.75, 189.42, 205.49, 223.02, 242.26,
1485 263.45, 286.75, 311.94, 340.01, 370.86, 404.92, 440.44, 480.27,
1486 525.17, 574.71, 626.22, 686.8, 754.38, 827.07, 913.38, 1011.7,
1487 1121.5, 1161.6, 1289.5, 1432.2, 1595.4, 1777., 1983.3, 2216.1,
1488 2485.7, 2788.3, 3101.5, 3481., 3902.1, 4257.1, 4740., 5272.8,
1489 5457.9, 5946.2, 6505.3, 6668.4, 7302.4, 8061.6, 9015.8, 9908.3,
1490 11613., 13956., 3249.6, 3243., 2901.5, 2841.3, 2729.6, 2558.2,
1491 1797.8, 1583.2, 1386., 1233.5, 787.74, 701.46, 761.66, 767.21,
1492 722.83, 1180.6, 1332.1, 1461.6, 2032.9, 2166., 2255.9, 2294.7,
1493 2587.2, 2396.5, 2122.4, 12553., 10784., 9832.5, 8827.3, 8029.1,
1494 7377.9, 7347.1, 6783.8, 6239.1, 5721.1, 5503., 4975.1, 4477.8,
1495 4021.3, 3676.8, 3275.3, 2914.9, 2597.4, 2328.2, 2075.4, 1857.6,
1496 1663.6, 1493.3, 1343.8, 1213.3, 1095.6, 1066.5, 958.91, 865.15,
1497 783.31, 714.35, 650.77, 593.98, 546.2, 499.9, 457.87, 421.75,
1498 387.61, 355.25, 326.62, 299.7, 275.21, 253.17, 232.83, 214.31,
1499 197.5, 182.08, 167.98, 155.12, 143.32, 132.5, 122.58, 113.48,
1500 105.11, 97.415, 90.182, 83.463, 77.281, 71.587, 66.341, 61.493,
1501 57.014, 53.062, 49.21, 45.663, 42.38, 39.348, 36.547, 33.967,
1502 31.573, 29.357, 27.314, 25.415, 23.658, 22.03, 20.524, 19.125,
1503 17.829, 16.627, 15.511, 14.476, 13.514, 12.618, 11.786, 11.013,
1504 10.294, 9.6246, 9.0018, 8.4218, 7.8816, 7.3783, 6.9092, 6.4719,
1505 6.0641, 5.6838, 5.3289, 4.998, 4.6893, 4.4014, 4.1325, 3.8813,
1506 3.6469, 3.4283, 3.2241, 3.035, 2.8576, 2.6922, 2.5348, 2.3896,
1507 2.2535, 2.1258, 2.0059, 1.8929, 1.7862, 1.6854, 1.5898, 1.4992,
1508 1.4017, 1.3218, 1.2479, 1.1809, 1.1215, 1.0693, 1.0116, .96016,
1509 .9105, .84859, .80105, .74381, .69982, .65127, .60899, .57843,
1510 .54592, .51792, .49336, .47155, .45201, .43426, .41807, .40303,
1511 .38876, .3863, .37098, .35492, .33801, .32032, .30341, .29874,
1512 .29193, .28689, .29584, .29155, .29826, .29195, .29287, .2904,
1513 .28199, .27709, .27162, .26622, .26133, .25676, .25235, .23137,
1514 .22365, .21519, .20597, .19636, .18699, .16485, .16262, .16643,
1515 .17542, .18198, .18631, .16759, .16338, .13505, .1267, .10053,
1516 .092554, .074093, .062159, .055523, .054849, .05401, .05528,
1517 .058982, .07952, .08647, .093244, .099285, .10393, .10661,
1518 .12072, .11417, .10396, .093265, .089137, .088909, .10902,
1519 .11277, .13625, .13565, .14907, .14167, .1428, .13744, .12768,
1520 .11382, .10244, .091686, .08109, .071739, .063616, .056579,
1521 .050504, .045251, .040689, .036715, .033237, .030181, .027488,
1522 .025107, .022998, .021125, .01946, .017979, .016661, .015489,
1523 .014448, .013526, .012712, .011998, .011375, .010839, .010384,
1524 .010007, .0097053, .0094783, .0093257, .0092489, .0092504,
1525 .0093346, .0095077, .0097676, .01012, .01058, .011157, .011844,
1526 .012672, .013665, .014766, .015999, .017509, .018972, .020444,
1527 .022311, .023742, .0249, .025599, .026981, .026462, .025143,
1528 .025066, .022814, .020458, .020026, .019142, .020189, .022371,
1529 .024163, .023728, .02199, .019506, .018591, .015576, .012784,
1530 .011744, .0094777, .0079148, .0070652, .006986, .0071758,
1531 .008086, .0098025, .01087, .013609, .016764, .018137, .021061,
1532 .023498, .023576, .023965, .022828, .021519, .021283, .023364,
1533 .026457, .029782, .030856, .033486, .035515, .035543, .036558,
1534 .037198, .037472, .037045, .037284, .03777, .038085, .038366,
1535 .038526, .038282, .038915, .037697, .035667, .032941, .031959,
1536 .028692, .025918, .024596, .025592, .027873, .028935, .02984,
1537 .028148, .025305, .021912, .020454, .016732, .013357, .01205,
1538 .009731, .0079881, .0077704, .0074387, .0083895, .0096776,
1539 .010326, .01293, .015955, .019247, .020145, .02267, .024231,
1540 .024184, .022131, .019784, .01955, .01971, .022119, .025116,
1541 .027978, .028107, .029808, .030701, .029164, .028551, .027286,
1542 .024946, .023259, .020982, .019221, .017471, .015643, .014074,
1543 .01261, .011301, .010116, .0090582, .0081036, .0072542, .0065034,
1544 .0058436, .0052571, .0047321, .0042697, .0038607, .0034977,
1545 .0031747, .0028864, .0026284, .002397, .002189, .0020017,
1546 .0018326, .0016798, .0015414, .0014159, .0013019, .0011983,
1547 .0011039, .0010177, 9.391e-4, 8.6717e-4, 8.0131e-4, 7.4093e-4,
1548 6.8553e-4, 6.3464e-4, 5.8787e-4, 5.4487e-4, 5.0533e-4, 4.69e-4,
1549 4.3556e-4, 4.0474e-4, 3.7629e-4, 3.5e-4, 3.2569e-4, 3.032e-4,
1550 2.8239e-4, 2.6314e-4, 2.4535e-4, 2.2891e-4, 2.1374e-4, 1.9975e-4,
1551 1.8685e-4, 1.7498e-4, 1.6406e-4, 1.5401e-4, 1.4479e-4, 1.3633e-4,
1552 1.2858e-4, 1.2148e-4, 1.1499e-4, 1.0907e-4, 1.0369e-4, 9.8791e-5,
1553 9.4359e-5, 9.0359e-5, 8.6766e-5, 8.3555e-5, 8.0703e-5, 7.8192e-5,
1554 7.6003e-5, 7.4119e-5, 7.2528e-5, 7.1216e-5, 7.0171e-5, 6.9385e-5,
1555 6.8848e-5, 6.8554e-5, 6.8496e-5, 6.8669e-5, 6.9069e-5, 6.9694e-5,
1556 7.054e-5, 7.1608e-5, 7.2896e-5, 7.4406e-5, 7.6139e-5, 7.8097e-5,
1557 8.0283e-5, 8.2702e-5, 8.5357e-5, 8.8255e-5, 9.1402e-5, 9.4806e-5,
1558 9.8473e-5, 1.0241e-4, 1.0664e-4, 1.1115e-4, 1.1598e-4, 1.2112e-4,
1559 1.2659e-4, 1.3241e-4, 1.3859e-4, 1.4515e-4, 1.521e-4, 1.5947e-4,
1560 1.6728e-4, 1.7555e-4, 1.8429e-4, 1.9355e-4, 2.0334e-4, 2.1369e-4,
1561 2.2463e-4, 2.3619e-4, 2.4841e-4, 2.6132e-4, 2.7497e-4, 2.8938e-4,
1562 3.0462e-4, 3.2071e-4, 3.3771e-4, 3.5567e-4, 3.7465e-4, 3.947e-4,
1563 4.1588e-4, 4.3828e-4, 4.6194e-4, 4.8695e-4, 5.1338e-4, 5.4133e-4,
1564 5.7087e-4, 6.0211e-4, 6.3515e-4, 6.701e-4, 7.0706e-4, 7.4617e-4,
1565 7.8756e-4, 8.3136e-4, 8.7772e-4, 9.2681e-4, 9.788e-4, .0010339,
1566 .0010922, .001154, .0012195, .0012889, .0013626, .0014407,
1567 .0015235, .0016114, .0017048, .0018038, .001909, .0020207,
1568 .0021395, .0022657, .0023998, .0025426, .0026944, .002856,
1569 .0030281, .0032114, .0034068, .003615, .0038371, .004074,
1570 .004327, .0045971, .0048857, .0051942, .0055239, .0058766,
1571 .0062538, .0066573, .0070891, .007551, .0080455, .0085747,
1572 .0091412, .0097481, .010397, .011092, .011837, .012638, .013495,
1573 .014415, .01541, .016475, .017621, .018857, .020175, .02162,
1574 .023185, .024876, .02672, .028732, .030916, .033319, .035939,
1575 .038736, .041847, .04524, .048715, .052678, .056977, .061203,
1576 .066184, .07164, .076952, .083477, .090674, .098049, .10697,
1577 .1169, .1277, .14011, .15323, .1684, .18601, .20626, .22831,
1578 .25417, .28407, .31405, .34957, .38823, .41923, .46026, .50409,
1579 .51227, .54805, .57976, .53818, .55056, .557, .46741, .46403,
1580 .4636, .42265, .45166, .49852, .56663, .34306, .17779, .17697,
1581 .18346, .19129, .20014, .21778, .23604, .25649, .28676, .31238,
1582 .33856, .39998, .4288, .46568, .56654, .60786, .64473, .76466,
1583 .7897, .80778, .86443, .85736, .84798, .84157, 1.1385, 1.2446,
1584 1.1923, 1.1552, 1.1338, 1.1266, 1.1292, 1.1431, 1.1683, 1.2059,
1585 1.2521, 1.3069, 1.3712, 1.4471, 1.5275, 1.6165, 1.7145, 1.8189,
1586 1.9359, 2.065, 2.2007, 2.3591, 2.5362, 2.7346, 2.9515, 3.2021,
1587 3.4851, 3.7935, 4.0694, 4.4463, 4.807, 5.2443, 5.7178, 6.2231,
1588 6.4796, 6.9461, 7.4099, 7.3652, 7.7182, 8.048, 7.7373, 8.0363,
1589 8.3855, 8.8044, 9.0257, 9.8574, 10.948, 10.563, 6.8979, 7.0744,
1590 7.4121, 7.7663, 8.1768, 8.6243, 9.1437, 9.7847, 10.182, 10.849,
1591 11.572, 12.602, 13.482, 14.431, 15.907, 16.983, 18.11, 19.884,
1592 21.02, 22.18, 23.355, 24.848, 25.954, 27.13, 30.186, 34.893,
1593 35.682, 36.755, 38.111, 39.703, 41.58, 43.606, 45.868, 48.573,
1594 51.298, 54.291, 57.559, 61.116, 64.964, 69.124, 73.628, 78.471,
1595 83.683, 89.307, 95.341, 101.84, 108.83, 116.36, 124.46, 133.18,
1596 142.57, 152.79, 163.69, 175.43, 188.11, 201.79, 216.55, 232.51,
1597 249.74, 268.38, 288.54, 310.35, 333.97, 359.55, 387.26, 417.3,
1598 449.88, 485.2, 523.54, 565.14, 610.28, 659.31, 712.56, 770.43,
1599 833.36, 901.82, 976.36, 1057.6, 1146.8, 1243.8, 1350., 1466.3,
1600 1593.6, 1732.7, 1884.1, 2049.1, 2228.2, 2421.9, 2629.4, 2853.7,
1601 3094.4, 3351.1, 3622.3, 3829.8, 4123.1, 4438.3, 4777.2, 5144.1,
1602 5545.4, 5990.5, 6404.5, 6996.8, 7687.6, 8482.9, 9349.4, 10203.,
1603 11223., 12358., 13493., 14916., 16416., 18236., 20222., 22501.,
1604 25102., 28358., 31707., 35404., 39538., 43911., 48391., 53193.,
1605 58028., 58082., 61276., 64193., 66294., 67480., 67921., 67423.,
1606 66254., 64341., 51737., 51420., 53072., 58145., 66195., 65358.,
1607 67377., 67869., 53509., 50553., 35737., 32425., 21704., 19974.,
1608 14457., 12142., 16798., 19489., 23049., 27270., 31910., 36457.,
1609 40877., 44748., 47876., 59793., 58626., 55454., 50337., 44893.,
1610 50228., 52216., 54747., 69541., 70455., 81014., 77694., 80533.,
1611 73953., 70927., 65539., 59002., 52281., 45953., 40292., 35360.,
1612 31124., 27478., 24346., 21647., 19308., 17271., 15491., 13927.,
1613 12550., 11331., 10250., 9288.8, 8431.4, 7664.9, 6978.3, 6361.8,
1614 5807.4, 5307.7, 4856.8, 4449., 4079.8, 3744.9, 3440.8, 3164.2,
1615 2912.3, 2682.7, 2473., 2281.4, 2106., 1945.3, 1797.9, 1662.5,
1616 1538.1, 1423.6, 1318.1, 1221., 1131.5, 1049., 972.99, 902.87,
1617 838.01, 777.95, 722.2, 670.44, 622.35, 577.68, 536.21, 497.76,
1618 462.12, 429.13, 398.61, 370.39, 344.29, 320.16, 297.85, 277.2,
1619 258.08, 240.38, 223.97, 208.77, 194.66, 181.58, 169.43, 158.15,
1620 147.67, 137.92, 128.86, 120.44, 112.6, 105.3, 98.499, 92.166,
1621 86.264, 80.763, 75.632, 70.846, 66.381, 62.213, 58.321, 54.685,
1622 51.288, 48.114, 45.145, 42.368, 39.772, 37.341, 35.065, 32.937,
1623 30.943, 29.077, 27.33, 25.693, 24.158, 22.717, 21.367, 20.099,
1624 18.909, 17.792, 16.744, 15.761, 14.838, 13.971, 13.157, 12.393,
1625 11.676, 11.003, 10.369, 9.775, 9.2165, 8.6902, 8.1963, 7.7314,
1626 7.2923, 6.8794, 6.4898, 6.122, 5.7764, 5.4525, 5.1484, 4.8611,
1627 4.5918, 4.3379, 4.0982, 3.8716, 3.6567, 3.4545, 3.2634, 3.0828,
1628 2.9122, 2.7512, 2.5993, 2.4561, 2.3211, 2.1938, 2.0737, 1.9603,
1629 1.8534, 1.7525, 1.6572, 1.5673, 1.4824, 1.4022, 1.3265, 1.2551,
1630 1.1876, 1.1239, 1.0637, 1.0069, .9532, .90248, .85454, .80921,
1631 .76631, .72569, .6872, .65072, .61635, .5836, .55261, .52336,
1632 .49581, .46998, .44559, .42236, .40036, .37929, .35924, .34043,
1633 .32238, .30547, .28931, .27405, .25975, .24616, .23341, .22133,
1634 .20997, .19924, .18917, .17967, .17075, .16211, .15411, .14646,
1635 .13912, .13201, .12509, .11857, .11261, .10698, .10186, .097039,
1636 .092236, .087844, .083443, .07938, .075452, .071564, .067931,
1637 .064389, .061078, .057901, .054921, .052061, .049364, .046789,
1638 .04435, .042044, .039866, .037808, .035863, .034023, .032282,
1639 .030634, .029073, .027595, .026194, .024866, .023608, .022415,
1640 .021283, .02021, .019193, .018228, .017312, .016443, .015619,
1641 .014837, .014094, .01339, .012721, .012086, .011483, .010911,
1642 .010368, .009852, .0093623, .0088972, .0084556, .0080362,
1643 .0076379, .0072596, .0069003, .006559, .0062349, .0059269,
1644 .0056344, .0053565, .0050925, .0048417, .0046034, .004377,
1645 .0041618, .0039575, .0037633, .0035788, .0034034, .0032368,
1646 .0030785, .002928, .0027851, .0026492, .0025201, .0023975,
1647 .0022809, .0021701, .0020649, .0019649, .0018699, .0017796,
1648 .0016938, .0016122, .0015348, .0014612, .0013913, .001325,
1649 .0012619, .0012021, .0011452, .0010913, .0010401, 9.9149e-4,
1650 9.454e-4, 9.0169e-4, 8.6024e-4, 8.2097e-4, 7.8377e-4, 7.4854e-4,
1651 7.1522e-4, 6.8371e-4, 6.5393e-4, 6.2582e-4, 5.9932e-4, 5.7435e-4,
1652 5.5087e-4, 5.2882e-4, 5.0814e-4, 4.8881e-4, 4.7076e-4, 4.5398e-4,
1653 4.3843e-4, 4.2407e-4, 4.109e-4, 3.9888e-4, 3.88e-4, 3.7826e-4,
1654 3.6963e-4, 3.6213e-4, 3.5575e-4, 3.505e-4, 3.464e-4, 3.4346e-4,
1655 3.4173e-4, 3.4125e-4, 3.4206e-4, 3.4424e-4, 3.4787e-4, 3.5303e-4,
1656 3.5986e-4, 3.6847e-4, 3.7903e-4, 3.9174e-4, 4.0681e-4, 4.2455e-4,
1657 4.4527e-4, 4.6942e-4, 4.9637e-4, 5.2698e-4, 5.5808e-4, 5.9514e-4,
1658 6.2757e-4, 6.689e-4, 7.1298e-4, 7.3955e-4, 7.8403e-4, 8.0449e-4,
1659 8.5131e-4, 9.0256e-4, 9.3692e-4, .0010051, .0010846, .0011678,
1660 .001282, .0014016, .0015355, .0016764, .0018272, .0020055,
1661 .0021455, .0023421, .0024615, .0026786, .0028787, .0031259,
1662 .0034046, .0036985, .0040917, .0043902, .0048349, .0049531,
1663 .0052989, .0056148, .0052452, .0053357, .005333, .0045069,
1664 .0043851, .004253, .003738, .0038084, .0039013, .0041505,
1665 .0045372, .0050569, .0054507, .0061267, .0066122, .0072449,
1666 .0078012, .0082651, .0076538, .0076573, .0076806, .0075227,
1667 .0076269, .0063758, .006254, .0067749, .0067909, .0068231,
1668 .0072143, .0072762, .0072954, .007679, .0075107, .0073658,
1669 .0072441, .0071074, .0070378, .007176, .0072472, .0075844,
1670 .0079291, .008412, .0090165, .010688, .011535, .012375, .013166,
1671 .013895, .015567, .016011, .016392, .016737, .017043, .017731,
1672 .018031, .018419, .018877, .019474, .019868, .020604, .021538,
1673 .022653, .023869, .025288, .026879, .028547, .030524, .03274,
1674 .035132, .03769, .040567, .043793, .047188, .049962, .053542,
1675 .057205, .060776, .061489, .064419, .067124, .065945, .068487,
1676 .071209, .074783, .077039, .082444, .08902, .09692, .10617,
1677 .11687, .12952, .12362, .13498, .14412, .15492, .16519, .1744,
1678 .17096, .17714, .18208, .17363, .17813, .18564, .18295, .19045,
1679 .20252, .20815, .21844, .22929, .24229, .25321, .26588, .2797,
1680 .29465, .31136, .32961, .36529, .38486, .41027, .43694, .4667,
1681 .49943, .54542, .58348, .62303, .67633, .71755, .76054, .81371,
1682 .85934, .90841, .96438, 1.0207, 1.0821, 1.1491, 1.2226, 1.3018,
1683 1.388, 1.4818, 1.5835, 1.6939, 1.8137, 1.9435, 2.0843, 2.237,
1684 2.4026, 2.5818, 2.7767, 2.9885, 3.2182, 3.4679, 3.7391, 4.0349,
1685 4.3554, 4.7053, 5.0849, 5.4986, 5.9436, 6.4294, 6.9598, 7.5203,
1686 8.143, 8.8253, 9.5568, 10.371, 11.267, 12.233, 13.31, 14.357,
1687 15.598, 16.93, 18.358, 19.849, 21.408, 23.04, 24.706, 26.409,
1688 28.153, 28.795, 30.549, 32.43, 34.49, 36.027, 38.955, 42.465,
1689 46.565, 50.875, 55.378, 59.002, 63.882, 67.949, 73.693, 80.095,
1690 86.403, 94.264, 102.65, 112.37, 123.3, 135.54, 149.14, 163.83,
1691 179.17, 196.89, 217.91, 240.94, 264.13, 292.39, 324.83, 358.21,
1692 397.16, 440.5, 488.6, 541.04, 595.3, 650.43, 652.03, 688.74,
1693 719.47, 743.54, 757.68, 762.35, 756.43, 741.42, 595.43, 580.97,
1694 580.83, 605.68, 667.88, 764.49, 759.93, 789.12, 798.17, 645.66,
1695 615.65, 455.05, 421.09, 306.45, 289.14, 235.7, 215.52, 274.57,
1696 316.53, 357.73, 409.89, 465.06, 521.84, 579.02, 630.64, 794.46,
1697 813., 813.56, 796.25, 761.57, 727.97, 812.14, 866.75, 932.5,
1698 1132.8, 1194.8, 1362.2, 1387.2, 1482.3, 1479.7, 1517.9, 1533.1,
1699 1534.2, 1523.3, 1522.5, 1515.5, 1505.2, 1486.5, 1454., 1412.,
1700 1358.8, 1107.8, 1060.9, 1033.5, 1048.2, 1122.4, 1248.9, 1227.1,
1701 1255.4, 1058.9, 1020.7, 970.59, 715.24, 512.56, 468.47, 349.3,
1702 338.26, 299.22, 301.26, 332.38, 382.08, 445.49, 515.87, 590.85,
1703 662.3, 726.05, 955.59, 964.11, 945.17, 891.48, 807.11, 720.9,
1704 803.36, 834.46, 1073.9, 1107.1, 1123.6, 1296., 1393.7, 1303.1,
1705 1284.3, 1161.8, 1078.8, 976.13, 868.72, 767.4, 674.72, 593.73,
1706 523.12, 462.24, 409.75, 364.34, 325., 290.73, 260.76, 234.46,
1707 211.28, 190.78, 172.61, 156.44, 142.01, 129.12, 117.57, 107.2,
1708 97.877, 89.47, 81.882, 75.021, 68.807, 63.171, 58.052, 53.396,
1709 49.155, 45.288, 41.759, 38.531, 35.576, 32.868, 30.384, 28.102,
1710 26.003, 24.071, 22.293, 20.655, 19.147, 17.756, 16.476, 15.292,
1711 14.198, 13.183, 12.241, 11.367, 10.554, 9.7989, 9.0978, 8.4475,
1712 7.845, 7.2868, 6.7704, 6.2927, 5.8508, 5.4421, 5.064, 4.714,
1713 4.3902, 4.0902, 3.8121, 3.5543, 3.315, 3.093, 2.8869, 2.6953,
1714 2.5172, 2.3517, 2.1977, 2.0544, 1.9211, 1.7969, 1.6812, 1.5735,
1715 1.4731, 1.3794, 1.2921, 1.2107, 1.1346, 1.0637, .99744, .93554,
1716 .87771, .82368, .77313, .72587, .6816, .64014, .60134, .565,
1717 .53086, .49883, .46881, .44074, .4144, .38979, .36679, .34513,
1718 .32474, .30552, .28751, .27045, .25458, .23976, .22584, .21278,
1719 .20051, .18899, .17815, .16801, .15846, .14954, .14117, .13328,
1720 .12584
1721 };
1722
1723 /* Get CO2 continuum absorption... */
1724 const double xw = nu / 2 + 1;
1725 if (xw >= 1 && xw < 2001) {
1726 const int iw = (int) xw;
1727 const double dw = xw - iw;
1728 const double ew = 1 - dw;
1729 const double cw296 = ew * co2296[iw - 1] + dw * co2296[iw];
1730 const double cw260 = ew * co2260[iw - 1] + dw * co2260[iw];
1731 const double cw230 = ew * co2230[iw - 1] + dw * co2230[iw];
1732 const double dt230 = t - 230;
1733 const double dt260 = t - 260;
1734 const double dt296 = t - 296;
1735 const double ctw =
1736 dt260 * 5.050505e-4 * dt296 * cw230 -
1737 dt230 * 9.259259e-4 * dt296 * cw260 +
1738 dt230 * 4.208754e-4 * dt260 * cw296;
1739 return u / NA / 1000 * p / P0 * ctw;
1740 } else
1741 return 0;
1742}
1743
1744/*****************************************************************************/
1745
1746double ctmh2o(
1747 const double nu,
1748 const double p,
1749 const double t,
1750 const double q,
1751 const double u) {
1752
1753 static double h2o296[2001] = { .17, .1695, .172, .168, .1687, .1624, .1606,
1754 .1508, .1447, .1344, .1214, .1133, .1009, .09217, .08297, .06989,
1755 .06513, .05469, .05056, .04417, .03779, .03484, .02994, .0272,
1756 .02325, .02063, .01818, .01592, .01405, .01251, .0108, .009647,
1757 .008424, .007519, .006555, .00588, .005136, .004511, .003989,
1758 .003509, .003114, .00274, .002446, .002144, .001895, .001676,
1759 .001486, .001312, .001164, .001031, 9.129e-4, 8.106e-4, 7.213e-4,
1760 6.4e-4, 5.687e-4, 5.063e-4, 4.511e-4, 4.029e-4, 3.596e-4,
1761 3.22e-4, 2.889e-4, 2.597e-4, 2.337e-4, 2.108e-4, 1.907e-4,
1762 1.728e-4, 1.57e-4, 1.43e-4, 1.305e-4, 1.195e-4, 1.097e-4,
1763 1.009e-4, 9.307e-5, 8.604e-5, 7.971e-5, 7.407e-5, 6.896e-5,
1764 6.433e-5, 6.013e-5, 5.631e-5, 5.283e-5, 4.963e-5, 4.669e-5,
1765 4.398e-5, 4.148e-5, 3.917e-5, 3.702e-5, 3.502e-5, 3.316e-5,
1766 3.142e-5, 2.978e-5, 2.825e-5, 2.681e-5, 2.546e-5, 2.419e-5,
1767 2.299e-5, 2.186e-5, 2.079e-5, 1.979e-5, 1.884e-5, 1.795e-5,
1768 1.711e-5, 1.633e-5, 1.559e-5, 1.49e-5, 1.426e-5, 1.367e-5,
1769 1.312e-5, 1.263e-5, 1.218e-5, 1.178e-5, 1.143e-5, 1.112e-5,
1770 1.088e-5, 1.07e-5, 1.057e-5, 1.05e-5, 1.051e-5, 1.059e-5,
1771 1.076e-5, 1.1e-5, 1.133e-5, 1.18e-5, 1.237e-5, 1.308e-5,
1772 1.393e-5, 1.483e-5, 1.614e-5, 1.758e-5, 1.93e-5, 2.123e-5,
1773 2.346e-5, 2.647e-5, 2.93e-5, 3.279e-5, 3.745e-5, 4.152e-5,
1774 4.813e-5, 5.477e-5, 6.203e-5, 7.331e-5, 8.056e-5, 9.882e-5,
1775 1.05e-4, 1.21e-4, 1.341e-4, 1.572e-4, 1.698e-4, 1.968e-4,
1776 2.175e-4, 2.431e-4, 2.735e-4, 2.867e-4, 3.19e-4, 3.371e-4,
1777 3.554e-4, 3.726e-4, 3.837e-4, 3.878e-4, 3.864e-4, 3.858e-4,
1778 3.841e-4, 3.852e-4, 3.815e-4, 3.762e-4, 3.618e-4, 3.579e-4,
1779 3.45e-4, 3.202e-4, 3.018e-4, 2.785e-4, 2.602e-4, 2.416e-4,
1780 2.097e-4, 1.939e-4, 1.689e-4, 1.498e-4, 1.308e-4, 1.17e-4,
1781 1.011e-4, 9.237e-5, 7.909e-5, 7.006e-5, 6.112e-5, 5.401e-5,
1782 4.914e-5, 4.266e-5, 3.963e-5, 3.316e-5, 3.037e-5, 2.598e-5,
1783 2.294e-5, 2.066e-5, 1.813e-5, 1.583e-5, 1.423e-5, 1.247e-5,
1784 1.116e-5, 9.76e-6, 8.596e-6, 7.72e-6, 6.825e-6, 6.108e-6,
1785 5.366e-6, 4.733e-6, 4.229e-6, 3.731e-6, 3.346e-6, 2.972e-6,
1786 2.628e-6, 2.356e-6, 2.102e-6, 1.878e-6, 1.678e-6, 1.507e-6,
1787 1.348e-6, 1.21e-6, 1.089e-6, 9.806e-7, 8.857e-7, 8.004e-7,
1788 7.261e-7, 6.599e-7, 6.005e-7, 5.479e-7, 5.011e-7, 4.595e-7,
1789 4.219e-7, 3.885e-7, 3.583e-7, 3.314e-7, 3.071e-7, 2.852e-7,
1790 2.654e-7, 2.474e-7, 2.311e-7, 2.162e-7, 2.026e-7, 1.902e-7,
1791 1.788e-7, 1.683e-7, 1.587e-7, 1.497e-7, 1.415e-7, 1.338e-7,
1792 1.266e-7, 1.2e-7, 1.138e-7, 1.08e-7, 1.027e-7, 9.764e-8,
1793 9.296e-8, 8.862e-8, 8.458e-8, 8.087e-8, 7.744e-8, 7.429e-8,
1794 7.145e-8, 6.893e-8, 6.664e-8, 6.468e-8, 6.322e-8, 6.162e-8,
1795 6.07e-8, 5.992e-8, 5.913e-8, 5.841e-8, 5.796e-8, 5.757e-8,
1796 5.746e-8, 5.731e-8, 5.679e-8, 5.577e-8, 5.671e-8, 5.656e-8,
1797 5.594e-8, 5.593e-8, 5.602e-8, 5.62e-8, 5.693e-8, 5.725e-8,
1798 5.858e-8, 6.037e-8, 6.249e-8, 6.535e-8, 6.899e-8, 7.356e-8,
1799 7.918e-8, 8.618e-8, 9.385e-8, 1.039e-7, 1.158e-7, 1.29e-7,
1800 1.437e-7, 1.65e-7, 1.871e-7, 2.121e-7, 2.427e-7, 2.773e-7,
1801 3.247e-7, 3.677e-7, 4.037e-7, 4.776e-7, 5.101e-7, 6.214e-7,
1802 6.936e-7, 7.581e-7, 8.486e-7, 9.355e-7, 9.942e-7, 1.063e-6,
1803 1.123e-6, 1.191e-6, 1.215e-6, 1.247e-6, 1.26e-6, 1.271e-6,
1804 1.284e-6, 1.317e-6, 1.323e-6, 1.349e-6, 1.353e-6, 1.362e-6,
1805 1.344e-6, 1.329e-6, 1.336e-6, 1.327e-6, 1.325e-6, 1.359e-6,
1806 1.374e-6, 1.415e-6, 1.462e-6, 1.526e-6, 1.619e-6, 1.735e-6,
1807 1.863e-6, 2.034e-6, 2.265e-6, 2.482e-6, 2.756e-6, 3.103e-6,
1808 3.466e-6, 3.832e-6, 4.378e-6, 4.913e-6, 5.651e-6, 6.311e-6,
1809 7.169e-6, 8.057e-6, 9.253e-6, 1.047e-5, 1.212e-5, 1.36e-5,
1810 1.569e-5, 1.776e-5, 2.02e-5, 2.281e-5, 2.683e-5, 2.994e-5,
1811 3.488e-5, 3.896e-5, 4.499e-5, 5.175e-5, 6.035e-5, 6.34e-5,
1812 7.281e-5, 7.923e-5, 8.348e-5, 9.631e-5, 1.044e-4, 1.102e-4,
1813 1.176e-4, 1.244e-4, 1.283e-4, 1.326e-4, 1.4e-4, 1.395e-4,
1814 1.387e-4, 1.363e-4, 1.314e-4, 1.241e-4, 1.228e-4, 1.148e-4,
1815 1.086e-4, 1.018e-4, 8.89e-5, 8.316e-5, 7.292e-5, 6.452e-5,
1816 5.625e-5, 5.045e-5, 4.38e-5, 3.762e-5, 3.29e-5, 2.836e-5,
1817 2.485e-5, 2.168e-5, 1.895e-5, 1.659e-5, 1.453e-5, 1.282e-5,
1818 1.132e-5, 1.001e-5, 8.836e-6, 7.804e-6, 6.922e-6, 6.116e-6,
1819 5.429e-6, 4.824e-6, 4.278e-6, 3.788e-6, 3.371e-6, 2.985e-6,
1820 2.649e-6, 2.357e-6, 2.09e-6, 1.858e-6, 1.647e-6, 1.462e-6,
1821 1.299e-6, 1.155e-6, 1.028e-6, 9.142e-7, 8.132e-7, 7.246e-7,
1822 6.451e-7, 5.764e-7, 5.151e-7, 4.603e-7, 4.121e-7, 3.694e-7,
1823 3.318e-7, 2.985e-7, 2.69e-7, 2.428e-7, 2.197e-7, 1.992e-7,
1824 1.81e-7, 1.649e-7, 1.506e-7, 1.378e-7, 1.265e-7, 1.163e-7,
1825 1.073e-7, 9.918e-8, 9.191e-8, 8.538e-8, 7.949e-8, 7.419e-8,
1826 6.94e-8, 6.508e-8, 6.114e-8, 5.761e-8, 5.437e-8, 5.146e-8,
1827 4.89e-8, 4.636e-8, 4.406e-8, 4.201e-8, 4.015e-8, 3.84e-8,
1828 3.661e-8, 3.51e-8, 3.377e-8, 3.242e-8, 3.13e-8, 3.015e-8,
1829 2.918e-8, 2.83e-8, 2.758e-8, 2.707e-8, 2.656e-8, 2.619e-8,
1830 2.609e-8, 2.615e-8, 2.63e-8, 2.675e-8, 2.745e-8, 2.842e-8,
1831 2.966e-8, 3.125e-8, 3.318e-8, 3.565e-8, 3.85e-8, 4.191e-8,
1832 4.59e-8, 5.059e-8, 5.607e-8, 6.239e-8, 6.958e-8, 7.796e-8,
1833 8.773e-8, 9.88e-8, 1.114e-7, 1.258e-7, 1.422e-7, 1.61e-7,
1834 1.822e-7, 2.06e-7, 2.337e-7, 2.645e-7, 2.996e-7, 3.393e-7,
1835 3.843e-7, 4.363e-7, 4.935e-7, 5.607e-7, 6.363e-7, 7.242e-7,
1836 8.23e-7, 9.411e-7, 1.071e-6, 1.232e-6, 1.402e-6, 1.6e-6, 1.82e-6,
1837 2.128e-6, 2.386e-6, 2.781e-6, 3.242e-6, 3.653e-6, 4.323e-6,
1838 4.747e-6, 5.321e-6, 5.919e-6, 6.681e-6, 7.101e-6, 7.983e-6,
1839 8.342e-6, 8.741e-6, 9.431e-6, 9.952e-6, 1.026e-5, 1.055e-5,
1840 1.095e-5, 1.095e-5, 1.087e-5, 1.056e-5, 1.026e-5, 9.715e-6,
1841 9.252e-6, 8.452e-6, 7.958e-6, 7.268e-6, 6.295e-6, 6.003e-6, 5e-6,
1842 4.591e-6, 3.983e-6, 3.479e-6, 3.058e-6, 2.667e-6, 2.293e-6,
1843 1.995e-6, 1.747e-6, 1.517e-6, 1.335e-6, 1.165e-6, 1.028e-6,
1844 9.007e-7, 7.956e-7, 7.015e-7, 6.192e-7, 5.491e-7, 4.859e-7,
1845 4.297e-7, 3.799e-7, 3.38e-7, 3.002e-7, 2.659e-7, 2.366e-7,
1846 2.103e-7, 1.861e-7, 1.655e-7, 1.469e-7, 1.309e-7, 1.162e-7,
1847 1.032e-7, 9.198e-8, 8.181e-8, 7.294e-8, 6.516e-8, 5.787e-8,
1848 5.163e-8, 4.612e-8, 4.119e-8, 3.695e-8, 3.308e-8, 2.976e-8,
1849 2.67e-8, 2.407e-8, 2.171e-8, 1.965e-8, 1.78e-8, 1.617e-8,
1850 1.47e-8, 1.341e-8, 1.227e-8, 1.125e-8, 1.033e-8, 9.524e-9,
1851 8.797e-9, 8.162e-9, 7.565e-9, 7.04e-9, 6.56e-9, 6.129e-9,
1852 5.733e-9, 5.376e-9, 5.043e-9, 4.75e-9, 4.466e-9, 4.211e-9,
1853 3.977e-9, 3.759e-9, 3.558e-9, 3.373e-9, 3.201e-9, 3.043e-9,
1854 2.895e-9, 2.76e-9, 2.635e-9, 2.518e-9, 2.411e-9, 2.314e-9,
1855 2.23e-9, 2.151e-9, 2.087e-9, 2.035e-9, 1.988e-9, 1.946e-9,
1856 1.927e-9, 1.916e-9, 1.916e-9, 1.933e-9, 1.966e-9, 2.018e-9,
1857 2.09e-9, 2.182e-9, 2.299e-9, 2.442e-9, 2.623e-9, 2.832e-9,
1858 3.079e-9, 3.368e-9, 3.714e-9, 4.104e-9, 4.567e-9, 5.091e-9,
1859 5.701e-9, 6.398e-9, 7.194e-9, 8.127e-9, 9.141e-9, 1.035e-8,
1860 1.177e-8, 1.338e-8, 1.508e-8, 1.711e-8, 1.955e-8, 2.216e-8,
1861 2.534e-8, 2.871e-8, 3.291e-8, 3.711e-8, 4.285e-8, 4.868e-8,
1862 5.509e-8, 6.276e-8, 7.262e-8, 8.252e-8, 9.4e-8, 1.064e-7,
1863 1.247e-7, 1.411e-7, 1.626e-7, 1.827e-7, 2.044e-7, 2.284e-7,
1864 2.452e-7, 2.854e-7, 3.026e-7, 3.278e-7, 3.474e-7, 3.693e-7,
1865 3.93e-7, 4.104e-7, 4.22e-7, 4.439e-7, 4.545e-7, 4.778e-7,
1866 4.812e-7, 5.018e-7, 4.899e-7, 5.075e-7, 5.073e-7, 5.171e-7,
1867 5.131e-7, 5.25e-7, 5.617e-7, 5.846e-7, 6.239e-7, 6.696e-7,
1868 7.398e-7, 8.073e-7, 9.15e-7, 1.009e-6, 1.116e-6, 1.264e-6,
1869 1.439e-6, 1.644e-6, 1.856e-6, 2.147e-6, 2.317e-6, 2.713e-6,
1870 2.882e-6, 2.99e-6, 3.489e-6, 3.581e-6, 4.033e-6, 4.26e-6,
1871 4.543e-6, 4.84e-6, 4.826e-6, 5.013e-6, 5.252e-6, 5.277e-6,
1872 5.306e-6, 5.236e-6, 5.123e-6, 5.171e-6, 4.843e-6, 4.615e-6,
1873 4.385e-6, 3.97e-6, 3.693e-6, 3.231e-6, 2.915e-6, 2.495e-6,
1874 2.144e-6, 1.91e-6, 1.639e-6, 1.417e-6, 1.226e-6, 1.065e-6,
1875 9.29e-7, 8.142e-7, 7.161e-7, 6.318e-7, 5.581e-7, 4.943e-7,
1876 4.376e-7, 3.884e-7, 3.449e-7, 3.06e-7, 2.712e-7, 2.412e-7,
1877 2.139e-7, 1.903e-7, 1.689e-7, 1.499e-7, 1.331e-7, 1.183e-7,
1878 1.05e-7, 9.362e-8, 8.306e-8, 7.403e-8, 6.578e-8, 5.853e-8,
1879 5.216e-8, 4.632e-8, 4.127e-8, 3.678e-8, 3.279e-8, 2.923e-8,
1880 2.612e-8, 2.339e-8, 2.094e-8, 1.877e-8, 1.686e-8, 1.516e-8,
1881 1.366e-8, 1.234e-8, 1.114e-8, 1.012e-8, 9.182e-9, 8.362e-9,
1882 7.634e-9, 6.981e-9, 6.406e-9, 5.888e-9, 5.428e-9, 5.021e-9,
1883 4.65e-9, 4.326e-9, 4.033e-9, 3.77e-9, 3.536e-9, 3.327e-9,
1884 3.141e-9, 2.974e-9, 2.825e-9, 2.697e-9, 2.584e-9, 2.488e-9,
1885 2.406e-9, 2.34e-9, 2.292e-9, 2.259e-9, 2.244e-9, 2.243e-9,
1886 2.272e-9, 2.31e-9, 2.378e-9, 2.454e-9, 2.618e-9, 2.672e-9,
1887 2.831e-9, 3.05e-9, 3.225e-9, 3.425e-9, 3.677e-9, 3.968e-9,
1888 4.221e-9, 4.639e-9, 4.96e-9, 5.359e-9, 5.649e-9, 6.23e-9,
1889 6.716e-9, 7.218e-9, 7.746e-9, 7.988e-9, 8.627e-9, 8.999e-9,
1890 9.442e-9, 9.82e-9, 1.015e-8, 1.06e-8, 1.079e-8, 1.109e-8,
1891 1.137e-8, 1.186e-8, 1.18e-8, 1.187e-8, 1.194e-8, 1.192e-8,
1892 1.224e-8, 1.245e-8, 1.246e-8, 1.318e-8, 1.377e-8, 1.471e-8,
1893 1.582e-8, 1.713e-8, 1.853e-8, 2.063e-8, 2.27e-8, 2.567e-8,
1894 2.891e-8, 3.264e-8, 3.744e-8, 4.286e-8, 4.915e-8, 5.623e-8,
1895 6.336e-8, 7.293e-8, 8.309e-8, 9.319e-8, 1.091e-7, 1.243e-7,
1896 1.348e-7, 1.449e-7, 1.62e-7, 1.846e-7, 1.937e-7, 2.04e-7,
1897 2.179e-7, 2.298e-7, 2.433e-7, 2.439e-7, 2.464e-7, 2.611e-7,
1898 2.617e-7, 2.582e-7, 2.453e-7, 2.401e-7, 2.349e-7, 2.203e-7,
1899 2.066e-7, 1.939e-7, 1.78e-7, 1.558e-7, 1.391e-7, 1.203e-7,
1900 1.048e-7, 9.464e-8, 8.306e-8, 7.239e-8, 6.317e-8, 5.52e-8,
1901 4.847e-8, 4.282e-8, 3.796e-8, 3.377e-8, 2.996e-8, 2.678e-8,
1902 2.4e-8, 2.134e-8, 1.904e-8, 1.705e-8, 1.523e-8, 1.35e-8,
1903 1.204e-8, 1.07e-8, 9.408e-9, 8.476e-9, 7.47e-9, 6.679e-9,
1904 5.929e-9, 5.267e-9, 4.711e-9, 4.172e-9, 3.761e-9, 3.288e-9,
1905 2.929e-9, 2.609e-9, 2.315e-9, 2.042e-9, 1.844e-9, 1.64e-9,
1906 1.47e-9, 1.31e-9, 1.176e-9, 1.049e-9, 9.377e-10, 8.462e-10,
1907 7.616e-10, 6.854e-10, 6.191e-10, 5.596e-10, 5.078e-10, 4.611e-10,
1908 4.197e-10, 3.83e-10, 3.505e-10, 3.215e-10, 2.956e-10, 2.726e-10,
1909 2.521e-10, 2.338e-10, 2.173e-10, 2.026e-10, 1.895e-10, 1.777e-10,
1910 1.672e-10, 1.579e-10, 1.496e-10, 1.423e-10, 1.358e-10, 1.302e-10,
1911 1.254e-10, 1.216e-10, 1.187e-10, 1.163e-10, 1.147e-10, 1.145e-10,
1912 1.15e-10, 1.17e-10, 1.192e-10, 1.25e-10, 1.298e-10, 1.345e-10,
1913 1.405e-10, 1.538e-10, 1.648e-10, 1.721e-10, 1.872e-10, 1.968e-10,
1914 2.089e-10, 2.172e-10, 2.317e-10, 2.389e-10, 2.503e-10, 2.585e-10,
1915 2.686e-10, 2.8e-10, 2.895e-10, 3.019e-10, 3.037e-10, 3.076e-10,
1916 3.146e-10, 3.198e-10, 3.332e-10, 3.397e-10, 3.54e-10, 3.667e-10,
1917 3.895e-10, 4.071e-10, 4.565e-10, 4.983e-10, 5.439e-10, 5.968e-10,
1918 6.676e-10, 7.456e-10, 8.405e-10, 9.478e-10, 1.064e-9, 1.218e-9,
1919 1.386e-9, 1.581e-9, 1.787e-9, 2.032e-9, 2.347e-9, 2.677e-9,
1920 3.008e-9, 3.544e-9, 4.056e-9, 4.687e-9, 5.331e-9, 6.227e-9,
1921 6.854e-9, 8.139e-9, 8.945e-9, 9.865e-9, 1.125e-8, 1.178e-8,
1922 1.364e-8, 1.436e-8, 1.54e-8, 1.672e-8, 1.793e-8, 1.906e-8,
1923 2.036e-8, 2.144e-8, 2.292e-8, 2.371e-8, 2.493e-8, 2.606e-8,
1924 2.706e-8, 2.866e-8, 3.036e-8, 3.136e-8, 3.405e-8, 3.665e-8,
1925 3.837e-8, 4.229e-8, 4.748e-8, 5.32e-8, 5.763e-8, 6.677e-8,
1926 7.216e-8, 7.716e-8, 8.958e-8, 9.419e-8, 1.036e-7, 1.108e-7,
1927 1.189e-7, 1.246e-7, 1.348e-7, 1.31e-7, 1.361e-7, 1.364e-7,
1928 1.363e-7, 1.343e-7, 1.293e-7, 1.254e-7, 1.235e-7, 1.158e-7,
1929 1.107e-7, 9.961e-8, 9.011e-8, 7.91e-8, 6.916e-8, 6.338e-8,
1930 5.564e-8, 4.827e-8, 4.198e-8, 3.695e-8, 3.276e-8, 2.929e-8,
1931 2.633e-8, 2.391e-8, 2.192e-8, 2.021e-8, 1.89e-8, 1.772e-8,
1932 1.667e-8, 1.603e-8, 1.547e-8, 1.537e-8, 1.492e-8, 1.515e-8,
1933 1.479e-8, 1.45e-8, 1.513e-8, 1.495e-8, 1.529e-8, 1.565e-8,
1934 1.564e-8, 1.553e-8, 1.569e-8, 1.584e-8, 1.57e-8, 1.538e-8,
1935 1.513e-8, 1.472e-8, 1.425e-8, 1.349e-8, 1.328e-8, 1.249e-8,
1936 1.17e-8, 1.077e-8, 9.514e-9, 8.614e-9, 7.46e-9, 6.621e-9,
1937 5.775e-9, 5.006e-9, 4.308e-9, 3.747e-9, 3.24e-9, 2.84e-9,
1938 2.481e-9, 2.184e-9, 1.923e-9, 1.71e-9, 1.504e-9, 1.334e-9,
1939 1.187e-9, 1.053e-9, 9.367e-10, 8.306e-10, 7.419e-10, 6.63e-10,
1940 5.918e-10, 5.277e-10, 4.717e-10, 4.222e-10, 3.783e-10, 3.39e-10,
1941 3.036e-10, 2.729e-10, 2.455e-10, 2.211e-10, 1.995e-10, 1.804e-10,
1942 1.635e-10, 1.485e-10, 1.355e-10, 1.24e-10, 1.139e-10, 1.051e-10,
1943 9.757e-11, 9.114e-11, 8.577e-11, 8.139e-11, 7.792e-11, 7.52e-11,
1944 7.39e-11, 7.311e-11, 7.277e-11, 7.482e-11, 7.698e-11, 8.162e-11,
1945 8.517e-11, 8.968e-11, 9.905e-11, 1.075e-10, 1.187e-10, 1.291e-10,
1946 1.426e-10, 1.573e-10, 1.734e-10, 1.905e-10, 2.097e-10, 2.28e-10,
1947 2.473e-10, 2.718e-10, 2.922e-10, 3.128e-10, 3.361e-10, 3.641e-10,
1948 3.91e-10, 4.196e-10, 4.501e-10, 4.932e-10, 5.258e-10, 5.755e-10,
1949 6.253e-10, 6.664e-10, 7.344e-10, 7.985e-10, 8.877e-10, 1.005e-9,
1950 1.118e-9, 1.251e-9, 1.428e-9, 1.61e-9, 1.888e-9, 2.077e-9,
1951 2.331e-9, 2.751e-9, 3.061e-9, 3.522e-9, 3.805e-9, 4.181e-9,
1952 4.575e-9, 5.167e-9, 5.634e-9, 6.007e-9, 6.501e-9, 6.829e-9,
1953 7.211e-9, 7.262e-9, 7.696e-9, 7.832e-9, 7.799e-9, 7.651e-9,
1954 7.304e-9, 7.15e-9, 6.977e-9, 6.603e-9, 6.209e-9, 5.69e-9,
1955 5.432e-9, 4.764e-9, 4.189e-9, 3.64e-9, 3.203e-9, 2.848e-9,
1956 2.51e-9, 2.194e-9, 1.946e-9, 1.75e-9, 1.567e-9, 1.426e-9,
1957 1.302e-9, 1.197e-9, 1.109e-9, 1.035e-9, 9.719e-10, 9.207e-10,
1958 8.957e-10, 8.578e-10, 8.262e-10, 8.117e-10, 7.987e-10, 7.875e-10,
1959 7.741e-10, 7.762e-10, 7.537e-10, 7.424e-10, 7.474e-10, 7.294e-10,
1960 7.216e-10, 7.233e-10, 7.075e-10, 6.892e-10, 6.618e-10, 6.314e-10,
1961 6.208e-10, 5.689e-10, 5.55e-10, 4.984e-10, 4.6e-10, 4.078e-10,
1962 3.879e-10, 3.459e-10, 2.982e-10, 2.626e-10, 2.329e-10, 1.988e-10,
1963 1.735e-10, 1.487e-10, 1.297e-10, 1.133e-10, 9.943e-11, 8.736e-11,
1964 7.726e-11, 6.836e-11, 6.053e-11, 5.384e-11, 4.789e-11, 4.267e-11,
1965 3.804e-11, 3.398e-11, 3.034e-11, 2.71e-11, 2.425e-11, 2.173e-11,
1966 1.95e-11, 1.752e-11, 1.574e-11, 1.418e-11, 1.278e-11, 1.154e-11,
1967 1.044e-11, 9.463e-12, 8.602e-12, 7.841e-12, 7.171e-12, 6.584e-12,
1968 6.073e-12, 5.631e-12, 5.254e-12, 4.937e-12, 4.679e-12, 4.476e-12,
1969 4.328e-12, 4.233e-12, 4.194e-12, 4.211e-12, 4.286e-12, 4.424e-12,
1970 4.628e-12, 4.906e-12, 5.262e-12, 5.708e-12, 6.254e-12, 6.914e-12,
1971 7.714e-12, 8.677e-12, 9.747e-12, 1.101e-11, 1.256e-11, 1.409e-11,
1972 1.597e-11, 1.807e-11, 2.034e-11, 2.316e-11, 2.622e-11, 2.962e-11,
1973 3.369e-11, 3.819e-11, 4.329e-11, 4.932e-11, 5.589e-11, 6.364e-11,
1974 7.284e-11, 8.236e-11, 9.447e-11, 1.078e-10, 1.229e-10, 1.417e-10,
1975 1.614e-10, 1.843e-10, 2.107e-10, 2.406e-10, 2.728e-10, 3.195e-10,
1976 3.595e-10, 4.153e-10, 4.736e-10, 5.41e-10, 6.088e-10, 6.769e-10,
1977 7.691e-10, 8.545e-10, 9.621e-10, 1.047e-9, 1.161e-9, 1.296e-9,
1978 1.424e-9, 1.576e-9, 1.739e-9, 1.893e-9, 2.08e-9, 2.336e-9,
1979 2.604e-9, 2.76e-9, 3.001e-9, 3.365e-9, 3.55e-9, 3.895e-9,
1980 4.183e-9, 4.614e-9, 4.846e-9, 5.068e-9, 5.427e-9, 5.541e-9,
1981 5.864e-9, 5.997e-9, 5.997e-9, 6.061e-9, 5.944e-9, 5.855e-9,
1982 5.661e-9, 5.523e-9, 5.374e-9, 4.94e-9, 4.688e-9, 4.17e-9,
1983 3.913e-9, 3.423e-9, 2.997e-9, 2.598e-9, 2.253e-9, 1.946e-9,
1984 1.71e-9, 1.507e-9, 1.336e-9, 1.19e-9, 1.068e-9, 9.623e-10,
1985 8.772e-10, 8.007e-10, 7.42e-10, 6.884e-10, 6.483e-10, 6.162e-10,
1986 5.922e-10, 5.688e-10, 5.654e-10, 5.637e-10, 5.701e-10, 5.781e-10,
1987 5.874e-10, 6.268e-10, 6.357e-10, 6.525e-10, 7.137e-10, 7.441e-10,
1988 8.024e-10, 8.485e-10, 9.143e-10, 9.536e-10, 9.717e-10, 1.018e-9,
1989 1.042e-9, 1.054e-9, 1.092e-9, 1.079e-9, 1.064e-9, 1.043e-9,
1990 1.02e-9, 9.687e-10, 9.273e-10, 9.208e-10, 9.068e-10, 7.687e-10,
1991 7.385e-10, 6.595e-10, 5.87e-10, 5.144e-10, 4.417e-10, 3.804e-10,
1992 3.301e-10, 2.866e-10, 2.509e-10, 2.202e-10, 1.947e-10, 1.719e-10,
1993 1.525e-10, 1.361e-10, 1.21e-10, 1.084e-10, 9.8e-11, 8.801e-11,
1994 7.954e-11, 7.124e-11, 6.335e-11, 5.76e-11, 5.132e-11, 4.601e-11,
1995 4.096e-11, 3.657e-11, 3.25e-11, 2.909e-11, 2.587e-11, 2.297e-11,
1996 2.05e-11, 1.828e-11, 1.632e-11, 1.462e-11, 1.314e-11, 1.185e-11,
1997 1.073e-11, 9.76e-12, 8.922e-12, 8.206e-12, 7.602e-12, 7.1e-12,
1998 6.694e-12, 6.378e-12, 6.149e-12, 6.004e-12, 5.941e-12, 5.962e-12,
1999 6.069e-12, 6.265e-12, 6.551e-12, 6.935e-12, 7.457e-12, 8.074e-12,
2000 8.811e-12, 9.852e-12, 1.086e-11, 1.207e-11, 1.361e-11, 1.553e-11,
2001 1.737e-11, 1.93e-11, 2.175e-11, 2.41e-11, 2.706e-11, 3.023e-11,
2002 3.313e-11, 3.657e-11, 4.118e-11, 4.569e-11, 5.025e-11, 5.66e-11,
2003 6.231e-11, 6.881e-11, 7.996e-11, 8.526e-11, 9.694e-11, 1.106e-10,
2004 1.222e-10, 1.355e-10, 1.525e-10, 1.775e-10, 1.924e-10, 2.181e-10,
2005 2.379e-10, 2.662e-10, 2.907e-10, 3.154e-10, 3.366e-10, 3.579e-10,
2006 3.858e-10, 4.046e-10, 4.196e-10, 4.166e-10, 4.457e-10, 4.466e-10,
2007 4.404e-10, 4.337e-10, 4.15e-10, 4.083e-10, 3.91e-10, 3.723e-10,
2008 3.514e-10, 3.303e-10, 2.847e-10, 2.546e-10, 2.23e-10, 1.994e-10,
2009 1.733e-10, 1.488e-10, 1.297e-10, 1.144e-10, 1.004e-10, 8.741e-11,
2010 7.928e-11, 7.034e-11, 6.323e-11, 5.754e-11, 5.25e-11, 4.85e-11,
2011 4.502e-11, 4.286e-11, 4.028e-11, 3.899e-11, 3.824e-11, 3.761e-11,
2012 3.804e-11, 3.839e-11, 3.845e-11, 4.244e-11, 4.382e-11, 4.582e-11,
2013 4.847e-11, 5.209e-11, 5.384e-11, 5.887e-11, 6.371e-11, 6.737e-11,
2014 7.168e-11, 7.415e-11, 7.827e-11, 8.037e-11, 8.12e-11, 8.071e-11,
2015 8.008e-11, 7.851e-11, 7.544e-11, 7.377e-11, 7.173e-11, 6.801e-11,
2016 6.267e-11, 5.727e-11, 5.288e-11, 4.853e-11, 4.082e-11, 3.645e-11,
2017 3.136e-11, 2.672e-11, 2.304e-11, 1.986e-11, 1.725e-11, 1.503e-11,
2018 1.315e-11, 1.153e-11, 1.014e-11, 8.942e-12, 7.901e-12, 6.993e-12,
2019 6.199e-12, 5.502e-12, 4.89e-12, 4.351e-12, 3.878e-12, 3.461e-12,
2020 3.094e-12, 2.771e-12, 2.488e-12, 2.241e-12, 2.025e-12, 1.838e-12,
2021 1.677e-12, 1.541e-12, 1.427e-12, 1.335e-12, 1.262e-12, 1.209e-12,
2022 1.176e-12, 1.161e-12, 1.165e-12, 1.189e-12, 1.234e-12, 1.3e-12,
2023 1.389e-12, 1.503e-12, 1.644e-12, 1.814e-12, 2.017e-12, 2.255e-12,
2024 2.534e-12, 2.858e-12, 3.231e-12, 3.661e-12, 4.153e-12, 4.717e-12,
2025 5.36e-12, 6.094e-12, 6.93e-12, 7.882e-12, 8.966e-12, 1.02e-11,
2026 1.162e-11, 1.324e-11, 1.51e-11, 1.72e-11, 1.965e-11, 2.237e-11,
2027 2.56e-11, 2.927e-11, 3.371e-11, 3.842e-11, 4.429e-11, 5.139e-11,
2028 5.798e-11, 6.697e-11, 7.626e-11, 8.647e-11, 1.022e-10, 1.136e-10,
2029 1.3e-10, 1.481e-10, 1.672e-10, 1.871e-10, 2.126e-10, 2.357e-10,
2030 2.583e-10, 2.997e-10, 3.289e-10, 3.702e-10, 4.012e-10, 4.319e-10,
2031 4.527e-10, 5.001e-10, 5.448e-10, 5.611e-10, 5.76e-10, 5.965e-10,
2032 6.079e-10, 6.207e-10, 6.276e-10, 6.222e-10, 6.137e-10, 6e-10,
2033 5.814e-10, 5.393e-10, 5.35e-10, 4.947e-10, 4.629e-10, 4.117e-10,
2034 3.712e-10, 3.372e-10, 2.923e-10, 2.55e-10, 2.232e-10, 1.929e-10,
2035 1.679e-10, 1.46e-10, 1.289e-10, 1.13e-10, 9.953e-11, 8.763e-11,
2036 7.76e-11, 6.9e-11, 6.16e-11, 5.525e-11, 4.958e-11, 4.489e-11,
2037 4.072e-11, 3.728e-11, 3.438e-11, 3.205e-11, 3.006e-11, 2.848e-11,
2038 2.766e-11, 2.688e-11, 2.664e-11, 2.67e-11, 2.696e-11, 2.786e-11,
2039 2.861e-11, 3.009e-11, 3.178e-11, 3.389e-11, 3.587e-11, 3.819e-11,
2040 4.054e-11, 4.417e-11, 4.703e-11, 5.137e-11, 5.46e-11, 6.055e-11,
2041 6.333e-11, 6.773e-11, 7.219e-11, 7.717e-11, 8.131e-11, 8.491e-11,
2042 8.574e-11, 9.01e-11, 9.017e-11, 8.999e-11, 8.959e-11, 8.838e-11,
2043 8.579e-11, 8.162e-11, 8.098e-11, 7.472e-11, 7.108e-11, 6.559e-11,
2044 5.994e-11, 5.172e-11, 4.424e-11, 3.951e-11, 3.34e-11, 2.902e-11,
2045 2.541e-11, 2.215e-11, 1.945e-11, 1.716e-11, 1.503e-11, 1.339e-11,
2046 1.185e-11, 1.05e-11, 9.336e-12, 8.307e-12, 7.312e-12, 6.55e-12,
2047 5.836e-12, 5.178e-12, 4.6e-12, 4.086e-12, 3.639e-12, 3.247e-12,
2048 2.904e-12, 2.604e-12, 2.341e-12, 2.112e-12, 1.914e-12, 1.744e-12,
2049 1.598e-12, 1.476e-12, 1.374e-12, 1.293e-12, 1.23e-12, 1.185e-12,
2050 1.158e-12, 1.147e-12, 1.154e-12, 1.177e-12, 1.219e-12, 1.28e-12,
2051 1.36e-12, 1.463e-12, 1.591e-12, 1.75e-12, 1.94e-12, 2.156e-12,
2052 2.43e-12, 2.748e-12, 3.052e-12, 3.533e-12, 3.967e-12, 4.471e-12,
2053 5.041e-12, 5.86e-12, 6.664e-12, 7.522e-12, 8.342e-12, 9.412e-12,
2054 1.072e-11, 1.213e-11, 1.343e-11, 1.496e-11, 1.664e-11, 1.822e-11,
2055 2.029e-11, 2.233e-11, 2.457e-11, 2.709e-11, 2.928e-11, 3.115e-11,
2056 3.356e-11, 3.592e-11, 3.818e-11, 3.936e-11, 4.061e-11, 4.149e-11,
2057 4.299e-11, 4.223e-11, 4.251e-11, 4.287e-11, 4.177e-11, 4.094e-11,
2058 3.942e-11, 3.772e-11, 3.614e-11, 3.394e-11, 3.222e-11, 2.791e-11,
2059 2.665e-11, 2.309e-11, 2.032e-11, 1.74e-11, 1.535e-11, 1.323e-11,
2060 1.151e-11, 9.803e-12, 8.65e-12, 7.54e-12, 6.619e-12, 5.832e-12,
2061 5.113e-12, 4.503e-12, 3.975e-12, 3.52e-12, 3.112e-12, 2.797e-12,
2062 2.5e-12, 2.24e-12, 2.013e-12, 1.819e-12, 1.653e-12, 1.513e-12,
2063 1.395e-12, 1.299e-12, 1.225e-12, 1.168e-12, 1.124e-12, 1.148e-12,
2064 1.107e-12, 1.128e-12, 1.169e-12, 1.233e-12, 1.307e-12, 1.359e-12,
2065 1.543e-12, 1.686e-12, 1.794e-12, 2.028e-12, 2.21e-12, 2.441e-12,
2066 2.653e-12, 2.828e-12, 3.093e-12, 3.28e-12, 3.551e-12, 3.677e-12,
2067 3.803e-12, 3.844e-12, 4.068e-12, 4.093e-12, 4.002e-12, 3.904e-12,
2068 3.624e-12, 3.633e-12, 3.622e-12, 3.443e-12, 3.184e-12, 2.934e-12,
2069 2.476e-12, 2.212e-12, 1.867e-12, 1.594e-12, 1.37e-12, 1.192e-12,
2070 1.045e-12, 9.211e-13, 8.17e-13, 7.29e-13, 6.55e-13, 5.929e-13,
2071 5.415e-13, 4.995e-13, 4.661e-13, 4.406e-13, 4.225e-13, 4.116e-13,
2072 4.075e-13, 4.102e-13, 4.198e-13, 4.365e-13, 4.606e-13, 4.925e-13,
2073 5.326e-13, 5.818e-13, 6.407e-13, 7.104e-13, 7.92e-13, 8.868e-13,
2074 9.964e-13, 1.123e-12, 1.268e-12, 1.434e-12, 1.626e-12, 1.848e-12,
2075 2.107e-12, 2.422e-12, 2.772e-12, 3.145e-12, 3.704e-12, 4.27e-12,
2076 4.721e-12, 5.361e-12, 6.083e-12, 7.095e-12, 7.968e-12, 9.228e-12,
2077 1.048e-11, 1.187e-11, 1.336e-11, 1.577e-11, 1.772e-11, 2.017e-11,
2078 2.25e-11, 2.63e-11, 2.911e-11, 3.356e-11, 3.82e-11, 4.173e-11,
2079 4.811e-11, 5.254e-11, 5.839e-11, 6.187e-11, 6.805e-11, 7.118e-11,
2080 7.369e-11, 7.664e-11, 7.794e-11, 7.947e-11, 8.036e-11, 7.954e-11,
2081 7.849e-11, 7.518e-11, 7.462e-11, 6.926e-11, 6.531e-11, 6.197e-11,
2082 5.421e-11, 4.777e-11, 4.111e-11, 3.679e-11, 3.166e-11, 2.786e-11,
2083 2.436e-11, 2.144e-11, 1.859e-11, 1.628e-11, 1.414e-11, 1.237e-11,
2084 1.093e-11, 9.558e-12
2085 };
2086
2087 static double h2o260[2001] = { .2752, .2732, .2749, .2676, .2667, .2545,
2088 .2497, .2327, .2218, .2036, .1825, .1694, .1497, .1353, .121,
2089 .1014, .09405, .07848, .07195, .06246, .05306, .04853, .04138,
2090 .03735, .03171, .02785, .02431, .02111, .01845, .0164, .01405,
2091 .01255, .01098, .009797, .008646, .007779, .006898, .006099,
2092 .005453, .004909, .004413, .003959, .003581, .003199, .002871,
2093 .002583, .00233, .002086, .001874, .001684, .001512, .001361,
2094 .001225, .0011, 9.89e-4, 8.916e-4, 8.039e-4, 7.256e-4, 6.545e-4,
2095 5.918e-4, 5.359e-4, 4.867e-4, 4.426e-4, 4.033e-4, 3.682e-4,
2096 3.366e-4, 3.085e-4, 2.833e-4, 2.605e-4, 2.403e-4, 2.221e-4,
2097 2.055e-4, 1.908e-4, 1.774e-4, 1.653e-4, 1.544e-4, 1.443e-4,
2098 1.351e-4, 1.267e-4, 1.19e-4, 1.119e-4, 1.053e-4, 9.922e-5,
2099 9.355e-5, 8.831e-5, 8.339e-5, 7.878e-5, 7.449e-5, 7.043e-5,
2100 6.664e-5, 6.307e-5, 5.969e-5, 5.654e-5, 5.357e-5, 5.075e-5,
2101 4.81e-5, 4.56e-5, 4.322e-5, 4.102e-5, 3.892e-5, 3.696e-5,
2102 3.511e-5, 3.339e-5, 3.177e-5, 3.026e-5, 2.886e-5, 2.756e-5,
2103 2.636e-5, 2.527e-5, 2.427e-5, 2.337e-5, 2.257e-5, 2.185e-5,
2104 2.127e-5, 2.08e-5, 2.041e-5, 2.013e-5, 2e-5, 1.997e-5, 2.009e-5,
2105 2.031e-5, 2.068e-5, 2.124e-5, 2.189e-5, 2.267e-5, 2.364e-5,
2106 2.463e-5, 2.618e-5, 2.774e-5, 2.937e-5, 3.144e-5, 3.359e-5,
2107 3.695e-5, 4.002e-5, 4.374e-5, 4.947e-5, 5.431e-5, 6.281e-5,
2108 7.169e-5, 8.157e-5, 9.728e-5, 1.079e-4, 1.337e-4, 1.442e-4,
2109 1.683e-4, 1.879e-4, 2.223e-4, 2.425e-4, 2.838e-4, 3.143e-4,
2110 3.527e-4, 4.012e-4, 4.237e-4, 4.747e-4, 5.057e-4, 5.409e-4,
2111 5.734e-4, 5.944e-4, 6.077e-4, 6.175e-4, 6.238e-4, 6.226e-4,
2112 6.248e-4, 6.192e-4, 6.098e-4, 5.818e-4, 5.709e-4, 5.465e-4,
2113 5.043e-4, 4.699e-4, 4.294e-4, 3.984e-4, 3.672e-4, 3.152e-4,
2114 2.883e-4, 2.503e-4, 2.211e-4, 1.92e-4, 1.714e-4, 1.485e-4,
2115 1.358e-4, 1.156e-4, 1.021e-4, 8.887e-5, 7.842e-5, 7.12e-5,
2116 6.186e-5, 5.73e-5, 4.792e-5, 4.364e-5, 3.72e-5, 3.28e-5,
2117 2.946e-5, 2.591e-5, 2.261e-5, 2.048e-5, 1.813e-5, 1.63e-5,
2118 1.447e-5, 1.282e-5, 1.167e-5, 1.041e-5, 9.449e-6, 8.51e-6,
2119 7.596e-6, 6.961e-6, 6.272e-6, 5.728e-6, 5.198e-6, 4.667e-6,
2120 4.288e-6, 3.897e-6, 3.551e-6, 3.235e-6, 2.952e-6, 2.688e-6,
2121 2.449e-6, 2.241e-6, 2.05e-6, 1.879e-6, 1.722e-6, 1.582e-6,
2122 1.456e-6, 1.339e-6, 1.236e-6, 1.144e-6, 1.06e-6, 9.83e-7,
2123 9.149e-7, 8.535e-7, 7.973e-7, 7.466e-7, 6.999e-7, 6.574e-7,
2124 6.18e-7, 5.821e-7, 5.487e-7, 5.18e-7, 4.896e-7, 4.631e-7,
2125 4.386e-7, 4.16e-7, 3.945e-7, 3.748e-7, 3.562e-7, 3.385e-7,
2126 3.222e-7, 3.068e-7, 2.922e-7, 2.788e-7, 2.659e-7, 2.539e-7,
2127 2.425e-7, 2.318e-7, 2.219e-7, 2.127e-7, 2.039e-7, 1.958e-7,
2128 1.885e-7, 1.818e-7, 1.758e-7, 1.711e-7, 1.662e-7, 1.63e-7,
2129 1.605e-7, 1.58e-7, 1.559e-7, 1.545e-7, 1.532e-7, 1.522e-7,
2130 1.51e-7, 1.495e-7, 1.465e-7, 1.483e-7, 1.469e-7, 1.448e-7,
2131 1.444e-7, 1.436e-7, 1.426e-7, 1.431e-7, 1.425e-7, 1.445e-7,
2132 1.477e-7, 1.515e-7, 1.567e-7, 1.634e-7, 1.712e-7, 1.802e-7,
2133 1.914e-7, 2.024e-7, 2.159e-7, 2.295e-7, 2.461e-7, 2.621e-7,
2134 2.868e-7, 3.102e-7, 3.394e-7, 3.784e-7, 4.223e-7, 4.864e-7,
2135 5.501e-7, 6.039e-7, 7.193e-7, 7.728e-7, 9.514e-7, 1.073e-6,
2136 1.18e-6, 1.333e-6, 1.472e-6, 1.566e-6, 1.677e-6, 1.784e-6,
2137 1.904e-6, 1.953e-6, 2.02e-6, 2.074e-6, 2.128e-6, 2.162e-6,
2138 2.219e-6, 2.221e-6, 2.249e-6, 2.239e-6, 2.235e-6, 2.185e-6,
2139 2.141e-6, 2.124e-6, 2.09e-6, 2.068e-6, 2.1e-6, 2.104e-6,
2140 2.142e-6, 2.181e-6, 2.257e-6, 2.362e-6, 2.5e-6, 2.664e-6,
2141 2.884e-6, 3.189e-6, 3.48e-6, 3.847e-6, 4.313e-6, 4.79e-6,
2142 5.25e-6, 5.989e-6, 6.692e-6, 7.668e-6, 8.52e-6, 9.606e-6,
2143 1.073e-5, 1.225e-5, 1.377e-5, 1.582e-5, 1.761e-5, 2.029e-5,
2144 2.284e-5, 2.602e-5, 2.94e-5, 3.483e-5, 3.928e-5, 4.618e-5,
2145 5.24e-5, 6.132e-5, 7.183e-5, 8.521e-5, 9.111e-5, 1.07e-4,
2146 1.184e-4, 1.264e-4, 1.475e-4, 1.612e-4, 1.704e-4, 1.818e-4,
2147 1.924e-4, 1.994e-4, 2.061e-4, 2.18e-4, 2.187e-4, 2.2e-4,
2148 2.196e-4, 2.131e-4, 2.015e-4, 1.988e-4, 1.847e-4, 1.729e-4,
2149 1.597e-4, 1.373e-4, 1.262e-4, 1.087e-4, 9.439e-5, 8.061e-5,
2150 7.093e-5, 6.049e-5, 5.12e-5, 4.435e-5, 3.817e-5, 3.34e-5,
2151 2.927e-5, 2.573e-5, 2.291e-5, 2.04e-5, 1.827e-5, 1.636e-5,
2152 1.463e-5, 1.309e-5, 1.17e-5, 1.047e-5, 9.315e-6, 8.328e-6,
2153 7.458e-6, 6.665e-6, 5.94e-6, 5.316e-6, 4.752e-6, 4.252e-6,
2154 3.825e-6, 3.421e-6, 3.064e-6, 2.746e-6, 2.465e-6, 2.216e-6,
2155 1.99e-6, 1.79e-6, 1.609e-6, 1.449e-6, 1.306e-6, 1.177e-6,
2156 1.063e-6, 9.607e-7, 8.672e-7, 7.855e-7, 7.118e-7, 6.46e-7,
2157 5.871e-7, 5.34e-7, 4.868e-7, 4.447e-7, 4.068e-7, 3.729e-7,
2158 3.423e-7, 3.151e-7, 2.905e-7, 2.686e-7, 2.484e-7, 2.306e-7,
2159 2.142e-7, 1.995e-7, 1.86e-7, 1.738e-7, 1.626e-7, 1.522e-7,
2160 1.427e-7, 1.338e-7, 1.258e-7, 1.183e-7, 1.116e-7, 1.056e-7,
2161 9.972e-8, 9.46e-8, 9.007e-8, 8.592e-8, 8.195e-8, 7.816e-8,
2162 7.483e-8, 7.193e-8, 6.892e-8, 6.642e-8, 6.386e-8, 6.154e-8,
2163 5.949e-8, 5.764e-8, 5.622e-8, 5.479e-8, 5.364e-8, 5.301e-8,
2164 5.267e-8, 5.263e-8, 5.313e-8, 5.41e-8, 5.55e-8, 5.745e-8,
2165 6.003e-8, 6.311e-8, 6.713e-8, 7.173e-8, 7.724e-8, 8.368e-8,
2166 9.121e-8, 9.986e-8, 1.097e-7, 1.209e-7, 1.338e-7, 1.486e-7,
2167 1.651e-7, 1.837e-7, 2.048e-7, 2.289e-7, 2.557e-7, 2.857e-7,
2168 3.195e-7, 3.587e-7, 4.015e-7, 4.497e-7, 5.049e-7, 5.665e-7,
2169 6.366e-7, 7.121e-7, 7.996e-7, 8.946e-7, 1.002e-6, 1.117e-6,
2170 1.262e-6, 1.416e-6, 1.611e-6, 1.807e-6, 2.056e-6, 2.351e-6,
2171 2.769e-6, 3.138e-6, 3.699e-6, 4.386e-6, 5.041e-6, 6.074e-6,
2172 6.812e-6, 7.79e-6, 8.855e-6, 1.014e-5, 1.095e-5, 1.245e-5,
2173 1.316e-5, 1.39e-5, 1.504e-5, 1.583e-5, 1.617e-5, 1.652e-5,
2174 1.713e-5, 1.724e-5, 1.715e-5, 1.668e-5, 1.629e-5, 1.552e-5,
2175 1.478e-5, 1.34e-5, 1.245e-5, 1.121e-5, 9.575e-6, 8.956e-6,
2176 7.345e-6, 6.597e-6, 5.612e-6, 4.818e-6, 4.165e-6, 3.579e-6,
2177 3.041e-6, 2.623e-6, 2.29e-6, 1.984e-6, 1.748e-6, 1.534e-6,
2178 1.369e-6, 1.219e-6, 1.092e-6, 9.8e-7, 8.762e-7, 7.896e-7,
2179 7.104e-7, 6.364e-7, 5.691e-7, 5.107e-7, 4.575e-7, 4.09e-7,
2180 3.667e-7, 3.287e-7, 2.931e-7, 2.633e-7, 2.356e-7, 2.111e-7,
2181 1.895e-7, 1.697e-7, 1.525e-7, 1.369e-7, 1.233e-7, 1.114e-7,
2182 9.988e-8, 9.004e-8, 8.149e-8, 7.352e-8, 6.662e-8, 6.03e-8,
2183 5.479e-8, 4.974e-8, 4.532e-8, 4.129e-8, 3.781e-8, 3.462e-8,
2184 3.176e-8, 2.919e-8, 2.687e-8, 2.481e-8, 2.292e-8, 2.119e-8,
2185 1.967e-8, 1.828e-8, 1.706e-8, 1.589e-8, 1.487e-8, 1.393e-8,
2186 1.307e-8, 1.228e-8, 1.156e-8, 1.089e-8, 1.028e-8, 9.696e-9,
2187 9.159e-9, 8.658e-9, 8.187e-9, 7.746e-9, 7.34e-9, 6.953e-9,
2188 6.594e-9, 6.259e-9, 5.948e-9, 5.66e-9, 5.386e-9, 5.135e-9,
2189 4.903e-9, 4.703e-9, 4.515e-9, 4.362e-9, 4.233e-9, 4.117e-9,
2190 4.017e-9, 3.962e-9, 3.924e-9, 3.905e-9, 3.922e-9, 3.967e-9,
2191 4.046e-9, 4.165e-9, 4.32e-9, 4.522e-9, 4.769e-9, 5.083e-9,
2192 5.443e-9, 5.872e-9, 6.366e-9, 6.949e-9, 7.601e-9, 8.371e-9,
2193 9.22e-9, 1.02e-8, 1.129e-8, 1.251e-8, 1.393e-8, 1.542e-8,
2194 1.72e-8, 1.926e-8, 2.152e-8, 2.392e-8, 2.678e-8, 3.028e-8,
2195 3.39e-8, 3.836e-8, 4.309e-8, 4.9e-8, 5.481e-8, 6.252e-8,
2196 7.039e-8, 7.883e-8, 8.849e-8, 1.012e-7, 1.142e-7, 1.3e-7,
2197 1.475e-7, 1.732e-7, 1.978e-7, 2.304e-7, 2.631e-7, 2.988e-7,
2198 3.392e-7, 3.69e-7, 4.355e-7, 4.672e-7, 5.11e-7, 5.461e-7,
2199 5.828e-7, 6.233e-7, 6.509e-7, 6.672e-7, 6.969e-7, 7.104e-7,
2200 7.439e-7, 7.463e-7, 7.708e-7, 7.466e-7, 7.668e-7, 7.549e-7,
2201 7.586e-7, 7.384e-7, 7.439e-7, 7.785e-7, 7.915e-7, 8.31e-7,
2202 8.745e-7, 9.558e-7, 1.038e-6, 1.173e-6, 1.304e-6, 1.452e-6,
2203 1.671e-6, 1.931e-6, 2.239e-6, 2.578e-6, 3.032e-6, 3.334e-6,
2204 3.98e-6, 4.3e-6, 4.518e-6, 5.321e-6, 5.508e-6, 6.211e-6, 6.59e-6,
2205 7.046e-6, 7.555e-6, 7.558e-6, 7.875e-6, 8.319e-6, 8.433e-6,
2206 8.59e-6, 8.503e-6, 8.304e-6, 8.336e-6, 7.739e-6, 7.301e-6,
2207 6.827e-6, 6.078e-6, 5.551e-6, 4.762e-6, 4.224e-6, 3.538e-6,
2208 2.984e-6, 2.619e-6, 2.227e-6, 1.923e-6, 1.669e-6, 1.462e-6,
2209 1.294e-6, 1.155e-6, 1.033e-6, 9.231e-7, 8.238e-7, 7.36e-7,
2210 6.564e-7, 5.869e-7, 5.236e-7, 4.673e-7, 4.174e-7, 3.736e-7,
2211 3.33e-7, 2.976e-7, 2.657e-7, 2.367e-7, 2.106e-7, 1.877e-7,
2212 1.671e-7, 1.494e-7, 1.332e-7, 1.192e-7, 1.065e-7, 9.558e-8,
2213 8.586e-8, 7.717e-8, 6.958e-8, 6.278e-8, 5.666e-8, 5.121e-8,
2214 4.647e-8, 4.213e-8, 3.815e-8, 3.459e-8, 3.146e-8, 2.862e-8,
2215 2.604e-8, 2.375e-8, 2.162e-8, 1.981e-8, 1.817e-8, 1.67e-8,
2216 1.537e-8, 1.417e-8, 1.31e-8, 1.215e-8, 1.128e-8, 1.05e-8,
2217 9.793e-9, 9.158e-9, 8.586e-9, 8.068e-9, 7.595e-9, 7.166e-9,
2218 6.778e-9, 6.427e-9, 6.108e-9, 5.826e-9, 5.571e-9, 5.347e-9,
2219 5.144e-9, 4.968e-9, 4.822e-9, 4.692e-9, 4.589e-9, 4.506e-9,
2220 4.467e-9, 4.44e-9, 4.466e-9, 4.515e-9, 4.718e-9, 4.729e-9,
2221 4.937e-9, 5.249e-9, 5.466e-9, 5.713e-9, 6.03e-9, 6.436e-9,
2222 6.741e-9, 7.33e-9, 7.787e-9, 8.414e-9, 8.908e-9, 9.868e-9,
2223 1.069e-8, 1.158e-8, 1.253e-8, 1.3e-8, 1.409e-8, 1.47e-8,
2224 1.548e-8, 1.612e-8, 1.666e-8, 1.736e-8, 1.763e-8, 1.812e-8,
2225 1.852e-8, 1.923e-8, 1.897e-8, 1.893e-8, 1.888e-8, 1.868e-8,
2226 1.895e-8, 1.899e-8, 1.876e-8, 1.96e-8, 2.02e-8, 2.121e-8,
2227 2.239e-8, 2.379e-8, 2.526e-8, 2.766e-8, 2.994e-8, 3.332e-8,
2228 3.703e-8, 4.158e-8, 4.774e-8, 5.499e-8, 6.355e-8, 7.349e-8,
2229 8.414e-8, 9.846e-8, 1.143e-7, 1.307e-7, 1.562e-7, 1.817e-7,
2230 2.011e-7, 2.192e-7, 2.485e-7, 2.867e-7, 3.035e-7, 3.223e-7,
2231 3.443e-7, 3.617e-7, 3.793e-7, 3.793e-7, 3.839e-7, 4.081e-7,
2232 4.117e-7, 4.085e-7, 3.92e-7, 3.851e-7, 3.754e-7, 3.49e-7,
2233 3.229e-7, 2.978e-7, 2.691e-7, 2.312e-7, 2.029e-7, 1.721e-7,
2234 1.472e-7, 1.308e-7, 1.132e-7, 9.736e-8, 8.458e-8, 7.402e-8,
2235 6.534e-8, 5.811e-8, 5.235e-8, 4.762e-8, 4.293e-8, 3.896e-8,
2236 3.526e-8, 3.165e-8, 2.833e-8, 2.551e-8, 2.288e-8, 2.036e-8,
2237 1.82e-8, 1.626e-8, 1.438e-8, 1.299e-8, 1.149e-8, 1.03e-8,
2238 9.148e-9, 8.122e-9, 7.264e-9, 6.425e-9, 5.777e-9, 5.06e-9,
2239 4.502e-9, 4.013e-9, 3.567e-9, 3.145e-9, 2.864e-9, 2.553e-9,
2240 2.311e-9, 2.087e-9, 1.886e-9, 1.716e-9, 1.556e-9, 1.432e-9,
2241 1.311e-9, 1.202e-9, 1.104e-9, 1.013e-9, 9.293e-10, 8.493e-10,
2242 7.79e-10, 7.185e-10, 6.642e-10, 6.141e-10, 5.684e-10, 5.346e-10,
2243 5.032e-10, 4.725e-10, 4.439e-10, 4.176e-10, 3.93e-10, 3.714e-10,
2244 3.515e-10, 3.332e-10, 3.167e-10, 3.02e-10, 2.887e-10, 2.769e-10,
2245 2.665e-10, 2.578e-10, 2.503e-10, 2.436e-10, 2.377e-10, 2.342e-10,
2246 2.305e-10, 2.296e-10, 2.278e-10, 2.321e-10, 2.355e-10, 2.402e-10,
2247 2.478e-10, 2.67e-10, 2.848e-10, 2.982e-10, 3.263e-10, 3.438e-10,
2248 3.649e-10, 3.829e-10, 4.115e-10, 4.264e-10, 4.473e-10, 4.63e-10,
2249 4.808e-10, 4.995e-10, 5.142e-10, 5.313e-10, 5.318e-10, 5.358e-10,
2250 5.452e-10, 5.507e-10, 5.698e-10, 5.782e-10, 5.983e-10, 6.164e-10,
2251 6.532e-10, 6.811e-10, 7.624e-10, 8.302e-10, 9.067e-10, 9.937e-10,
2252 1.104e-9, 1.221e-9, 1.361e-9, 1.516e-9, 1.675e-9, 1.883e-9,
2253 2.101e-9, 2.349e-9, 2.614e-9, 2.92e-9, 3.305e-9, 3.724e-9,
2254 4.142e-9, 4.887e-9, 5.614e-9, 6.506e-9, 7.463e-9, 8.817e-9,
2255 9.849e-9, 1.187e-8, 1.321e-8, 1.474e-8, 1.698e-8, 1.794e-8,
2256 2.09e-8, 2.211e-8, 2.362e-8, 2.556e-8, 2.729e-8, 2.88e-8,
2257 3.046e-8, 3.167e-8, 3.367e-8, 3.457e-8, 3.59e-8, 3.711e-8,
2258 3.826e-8, 4.001e-8, 4.211e-8, 4.315e-8, 4.661e-8, 5.01e-8,
2259 5.249e-8, 5.84e-8, 6.628e-8, 7.512e-8, 8.253e-8, 9.722e-8,
2260 1.067e-7, 1.153e-7, 1.347e-7, 1.428e-7, 1.577e-7, 1.694e-7,
2261 1.833e-7, 1.938e-7, 2.108e-7, 2.059e-7, 2.157e-7, 2.185e-7,
2262 2.208e-7, 2.182e-7, 2.093e-7, 2.014e-7, 1.962e-7, 1.819e-7,
2263 1.713e-7, 1.51e-7, 1.34e-7, 1.154e-7, 9.89e-8, 8.88e-8, 7.673e-8,
2264 6.599e-8, 5.73e-8, 5.081e-8, 4.567e-8, 4.147e-8, 3.773e-8,
2265 3.46e-8, 3.194e-8, 2.953e-8, 2.759e-8, 2.594e-8, 2.442e-8,
2266 2.355e-8, 2.283e-8, 2.279e-8, 2.231e-8, 2.279e-8, 2.239e-8,
2267 2.21e-8, 2.309e-8, 2.293e-8, 2.352e-8, 2.415e-8, 2.43e-8,
2268 2.426e-8, 2.465e-8, 2.5e-8, 2.496e-8, 2.465e-8, 2.445e-8,
2269 2.383e-8, 2.299e-8, 2.165e-8, 2.113e-8, 1.968e-8, 1.819e-8,
2270 1.644e-8, 1.427e-8, 1.27e-8, 1.082e-8, 9.428e-9, 8.091e-9,
2271 6.958e-9, 5.988e-9, 5.246e-9, 4.601e-9, 4.098e-9, 3.664e-9,
2272 3.287e-9, 2.942e-9, 2.656e-9, 2.364e-9, 2.118e-9, 1.903e-9,
2273 1.703e-9, 1.525e-9, 1.365e-9, 1.229e-9, 1.107e-9, 9.96e-10,
2274 8.945e-10, 8.08e-10, 7.308e-10, 6.616e-10, 5.994e-10, 5.422e-10,
2275 4.929e-10, 4.478e-10, 4.07e-10, 3.707e-10, 3.379e-10, 3.087e-10,
2276 2.823e-10, 2.592e-10, 2.385e-10, 2.201e-10, 2.038e-10, 1.897e-10,
2277 1.774e-10, 1.667e-10, 1.577e-10, 1.502e-10, 1.437e-10, 1.394e-10,
2278 1.358e-10, 1.324e-10, 1.329e-10, 1.324e-10, 1.36e-10, 1.39e-10,
2279 1.424e-10, 1.544e-10, 1.651e-10, 1.817e-10, 1.984e-10, 2.195e-10,
2280 2.438e-10, 2.7e-10, 2.991e-10, 3.322e-10, 3.632e-10, 3.957e-10,
2281 4.36e-10, 4.701e-10, 5.03e-10, 5.381e-10, 5.793e-10, 6.19e-10,
2282 6.596e-10, 7.004e-10, 7.561e-10, 7.934e-10, 8.552e-10, 9.142e-10,
2283 9.57e-10, 1.027e-9, 1.097e-9, 1.193e-9, 1.334e-9, 1.47e-9,
2284 1.636e-9, 1.871e-9, 2.122e-9, 2.519e-9, 2.806e-9, 3.203e-9,
2285 3.846e-9, 4.362e-9, 5.114e-9, 5.643e-9, 6.305e-9, 6.981e-9,
2286 7.983e-9, 8.783e-9, 9.419e-9, 1.017e-8, 1.063e-8, 1.121e-8,
2287 1.13e-8, 1.201e-8, 1.225e-8, 1.232e-8, 1.223e-8, 1.177e-8,
2288 1.151e-8, 1.116e-8, 1.047e-8, 9.698e-9, 8.734e-9, 8.202e-9,
2289 7.041e-9, 6.074e-9, 5.172e-9, 4.468e-9, 3.913e-9, 3.414e-9,
2290 2.975e-9, 2.65e-9, 2.406e-9, 2.173e-9, 2.009e-9, 1.861e-9,
2291 1.727e-9, 1.612e-9, 1.514e-9, 1.43e-9, 1.362e-9, 1.333e-9,
2292 1.288e-9, 1.249e-9, 1.238e-9, 1.228e-9, 1.217e-9, 1.202e-9,
2293 1.209e-9, 1.177e-9, 1.157e-9, 1.165e-9, 1.142e-9, 1.131e-9,
2294 1.138e-9, 1.117e-9, 1.1e-9, 1.069e-9, 1.023e-9, 1.005e-9,
2295 9.159e-10, 8.863e-10, 7.865e-10, 7.153e-10, 6.247e-10, 5.846e-10,
2296 5.133e-10, 4.36e-10, 3.789e-10, 3.335e-10, 2.833e-10, 2.483e-10,
2297 2.155e-10, 1.918e-10, 1.709e-10, 1.529e-10, 1.374e-10, 1.235e-10,
2298 1.108e-10, 9.933e-11, 8.932e-11, 8.022e-11, 7.224e-11, 6.52e-11,
2299 5.896e-11, 5.328e-11, 4.813e-11, 4.365e-11, 3.961e-11, 3.594e-11,
2300 3.266e-11, 2.967e-11, 2.701e-11, 2.464e-11, 2.248e-11, 2.054e-11,
2301 1.878e-11, 1.721e-11, 1.579e-11, 1.453e-11, 1.341e-11, 1.241e-11,
2302 1.154e-11, 1.078e-11, 1.014e-11, 9.601e-12, 9.167e-12, 8.838e-12,
2303 8.614e-12, 8.493e-12, 8.481e-12, 8.581e-12, 8.795e-12, 9.131e-12,
2304 9.601e-12, 1.021e-11, 1.097e-11, 1.191e-11, 1.303e-11, 1.439e-11,
2305 1.601e-11, 1.778e-11, 1.984e-11, 2.234e-11, 2.474e-11, 2.766e-11,
2306 3.085e-11, 3.415e-11, 3.821e-11, 4.261e-11, 4.748e-11, 5.323e-11,
2307 5.935e-11, 6.619e-11, 7.418e-11, 8.294e-11, 9.26e-11, 1.039e-10,
2308 1.156e-10, 1.297e-10, 1.46e-10, 1.641e-10, 1.858e-10, 2.1e-10,
2309 2.383e-10, 2.724e-10, 3.116e-10, 3.538e-10, 4.173e-10, 4.727e-10,
2310 5.503e-10, 6.337e-10, 7.32e-10, 8.298e-10, 9.328e-10, 1.059e-9,
2311 1.176e-9, 1.328e-9, 1.445e-9, 1.593e-9, 1.77e-9, 1.954e-9,
2312 2.175e-9, 2.405e-9, 2.622e-9, 2.906e-9, 3.294e-9, 3.713e-9,
2313 3.98e-9, 4.384e-9, 4.987e-9, 5.311e-9, 5.874e-9, 6.337e-9,
2314 7.027e-9, 7.39e-9, 7.769e-9, 8.374e-9, 8.605e-9, 9.165e-9,
2315 9.415e-9, 9.511e-9, 9.704e-9, 9.588e-9, 9.45e-9, 9.086e-9,
2316 8.798e-9, 8.469e-9, 7.697e-9, 7.168e-9, 6.255e-9, 5.772e-9,
2317 4.97e-9, 4.271e-9, 3.653e-9, 3.154e-9, 2.742e-9, 2.435e-9,
2318 2.166e-9, 1.936e-9, 1.731e-9, 1.556e-9, 1.399e-9, 1.272e-9,
2319 1.157e-9, 1.066e-9, 9.844e-10, 9.258e-10, 8.787e-10, 8.421e-10,
2320 8.083e-10, 8.046e-10, 8.067e-10, 8.181e-10, 8.325e-10, 8.517e-10,
2321 9.151e-10, 9.351e-10, 9.677e-10, 1.071e-9, 1.126e-9, 1.219e-9,
2322 1.297e-9, 1.408e-9, 1.476e-9, 1.517e-9, 1.6e-9, 1.649e-9,
2323 1.678e-9, 1.746e-9, 1.742e-9, 1.728e-9, 1.699e-9, 1.655e-9,
2324 1.561e-9, 1.48e-9, 1.451e-9, 1.411e-9, 1.171e-9, 1.106e-9,
2325 9.714e-10, 8.523e-10, 7.346e-10, 6.241e-10, 5.371e-10, 4.704e-10,
2326 4.144e-10, 3.683e-10, 3.292e-10, 2.942e-10, 2.62e-10, 2.341e-10,
2327 2.104e-10, 1.884e-10, 1.7e-10, 1.546e-10, 1.394e-10, 1.265e-10,
2328 1.14e-10, 1.019e-10, 9.279e-11, 8.283e-11, 7.458e-11, 6.668e-11,
2329 5.976e-11, 5.33e-11, 4.794e-11, 4.289e-11, 3.841e-11, 3.467e-11,
2330 3.13e-11, 2.832e-11, 2.582e-11, 2.356e-11, 2.152e-11, 1.97e-11,
2331 1.808e-11, 1.664e-11, 1.539e-11, 1.434e-11, 1.344e-11, 1.269e-11,
2332 1.209e-11, 1.162e-11, 1.129e-11, 1.108e-11, 1.099e-11, 1.103e-11,
2333 1.119e-11, 1.148e-11, 1.193e-11, 1.252e-11, 1.329e-11, 1.421e-11,
2334 1.555e-11, 1.685e-11, 1.839e-11, 2.054e-11, 2.317e-11, 2.571e-11,
2335 2.839e-11, 3.171e-11, 3.49e-11, 3.886e-11, 4.287e-11, 4.645e-11,
2336 5.047e-11, 5.592e-11, 6.109e-11, 6.628e-11, 7.381e-11, 8.088e-11,
2337 8.966e-11, 1.045e-10, 1.12e-10, 1.287e-10, 1.486e-10, 1.662e-10,
2338 1.866e-10, 2.133e-10, 2.524e-10, 2.776e-10, 3.204e-10, 3.559e-10,
2339 4.028e-10, 4.448e-10, 4.882e-10, 5.244e-10, 5.605e-10, 6.018e-10,
2340 6.328e-10, 6.579e-10, 6.541e-10, 7.024e-10, 7.074e-10, 7.068e-10,
2341 7.009e-10, 6.698e-10, 6.545e-10, 6.209e-10, 5.834e-10, 5.412e-10,
2342 5.001e-10, 4.231e-10, 3.727e-10, 3.211e-10, 2.833e-10, 2.447e-10,
2343 2.097e-10, 1.843e-10, 1.639e-10, 1.449e-10, 1.27e-10, 1.161e-10,
2344 1.033e-10, 9.282e-11, 8.407e-11, 7.639e-11, 7.023e-11, 6.474e-11,
2345 6.142e-11, 5.76e-11, 5.568e-11, 5.472e-11, 5.39e-11, 5.455e-11,
2346 5.54e-11, 5.587e-11, 6.23e-11, 6.49e-11, 6.868e-11, 7.382e-11,
2347 8.022e-11, 8.372e-11, 9.243e-11, 1.004e-10, 1.062e-10, 1.13e-10,
2348 1.176e-10, 1.244e-10, 1.279e-10, 1.298e-10, 1.302e-10, 1.312e-10,
2349 1.295e-10, 1.244e-10, 1.211e-10, 1.167e-10, 1.098e-10, 9.927e-11,
2350 8.854e-11, 8.011e-11, 7.182e-11, 5.923e-11, 5.212e-11, 4.453e-11,
2351 3.832e-11, 3.371e-11, 2.987e-11, 2.651e-11, 2.354e-11, 2.093e-11,
2352 1.863e-11, 1.662e-11, 1.486e-11, 1.331e-11, 1.193e-11, 1.071e-11,
2353 9.628e-12, 8.66e-12, 7.801e-12, 7.031e-12, 6.347e-12, 5.733e-12,
2354 5.182e-12, 4.695e-12, 4.26e-12, 3.874e-12, 3.533e-12, 3.235e-12,
2355 2.979e-12, 2.76e-12, 2.579e-12, 2.432e-12, 2.321e-12, 2.246e-12,
2356 2.205e-12, 2.196e-12, 2.223e-12, 2.288e-12, 2.387e-12, 2.525e-12,
2357 2.704e-12, 2.925e-12, 3.191e-12, 3.508e-12, 3.876e-12, 4.303e-12,
2358 4.793e-12, 5.347e-12, 5.978e-12, 6.682e-12, 7.467e-12, 8.34e-12,
2359 9.293e-12, 1.035e-11, 1.152e-11, 1.285e-11, 1.428e-11, 1.586e-11,
2360 1.764e-11, 1.972e-11, 2.214e-11, 2.478e-11, 2.776e-11, 3.151e-11,
2361 3.591e-11, 4.103e-11, 4.66e-11, 5.395e-11, 6.306e-11, 7.172e-11,
2362 8.358e-11, 9.67e-11, 1.11e-10, 1.325e-10, 1.494e-10, 1.736e-10,
2363 2.007e-10, 2.296e-10, 2.608e-10, 3.004e-10, 3.361e-10, 3.727e-10,
2364 4.373e-10, 4.838e-10, 5.483e-10, 6.006e-10, 6.535e-10, 6.899e-10,
2365 7.687e-10, 8.444e-10, 8.798e-10, 9.135e-10, 9.532e-10, 9.757e-10,
2366 9.968e-10, 1.006e-9, 9.949e-10, 9.789e-10, 9.564e-10, 9.215e-10,
2367 8.51e-10, 8.394e-10, 7.707e-10, 7.152e-10, 6.274e-10, 5.598e-10,
2368 5.028e-10, 4.3e-10, 3.71e-10, 3.245e-10, 2.809e-10, 2.461e-10,
2369 2.154e-10, 1.91e-10, 1.685e-10, 1.487e-10, 1.313e-10, 1.163e-10,
2370 1.031e-10, 9.172e-11, 8.221e-11, 7.382e-11, 6.693e-11, 6.079e-11,
2371 5.581e-11, 5.167e-11, 4.811e-11, 4.506e-11, 4.255e-11, 4.083e-11,
2372 3.949e-11, 3.881e-11, 3.861e-11, 3.858e-11, 3.951e-11, 4.045e-11,
2373 4.24e-11, 4.487e-11, 4.806e-11, 5.133e-11, 5.518e-11, 5.919e-11,
2374 6.533e-11, 7.031e-11, 7.762e-11, 8.305e-11, 9.252e-11, 9.727e-11,
2375 1.045e-10, 1.117e-10, 1.2e-10, 1.275e-10, 1.341e-10, 1.362e-10,
2376 1.438e-10, 1.45e-10, 1.455e-10, 1.455e-10, 1.434e-10, 1.381e-10,
2377 1.301e-10, 1.276e-10, 1.163e-10, 1.089e-10, 9.911e-11, 8.943e-11,
2378 7.618e-11, 6.424e-11, 5.717e-11, 4.866e-11, 4.257e-11, 3.773e-11,
2379 3.331e-11, 2.958e-11, 2.629e-11, 2.316e-11, 2.073e-11, 1.841e-11,
2380 1.635e-11, 1.464e-11, 1.31e-11, 1.16e-11, 1.047e-11, 9.408e-12,
2381 8.414e-12, 7.521e-12, 6.705e-12, 5.993e-12, 5.371e-12, 4.815e-12,
2382 4.338e-12, 3.921e-12, 3.567e-12, 3.265e-12, 3.01e-12, 2.795e-12,
2383 2.613e-12, 2.464e-12, 2.346e-12, 2.256e-12, 2.195e-12, 2.165e-12,
2384 2.166e-12, 2.198e-12, 2.262e-12, 2.364e-12, 2.502e-12, 2.682e-12,
2385 2.908e-12, 3.187e-12, 3.533e-12, 3.946e-12, 4.418e-12, 5.013e-12,
2386 5.708e-12, 6.379e-12, 7.43e-12, 8.39e-12, 9.51e-12, 1.078e-11,
2387 1.259e-11, 1.438e-11, 1.63e-11, 1.814e-11, 2.055e-11, 2.348e-11,
2388 2.664e-11, 2.956e-11, 3.3e-11, 3.677e-11, 4.032e-11, 4.494e-11,
2389 4.951e-11, 5.452e-11, 6.014e-11, 6.5e-11, 6.915e-11, 7.45e-11,
2390 7.971e-11, 8.468e-11, 8.726e-11, 8.995e-11, 9.182e-11, 9.509e-11,
2391 9.333e-11, 9.386e-11, 9.457e-11, 9.21e-11, 9.019e-11, 8.68e-11,
2392 8.298e-11, 7.947e-11, 7.46e-11, 7.082e-11, 6.132e-11, 5.855e-11,
2393 5.073e-11, 4.464e-11, 3.825e-11, 3.375e-11, 2.911e-11, 2.535e-11,
2394 2.16e-11, 1.907e-11, 1.665e-11, 1.463e-11, 1.291e-11, 1.133e-11,
2395 9.997e-12, 8.836e-12, 7.839e-12, 6.943e-12, 6.254e-12, 5.6e-12,
2396 5.029e-12, 4.529e-12, 4.102e-12, 3.737e-12, 3.428e-12, 3.169e-12,
2397 2.959e-12, 2.798e-12, 2.675e-12, 2.582e-12, 2.644e-12, 2.557e-12,
2398 2.614e-12, 2.717e-12, 2.874e-12, 3.056e-12, 3.187e-12, 3.631e-12,
2399 3.979e-12, 4.248e-12, 4.817e-12, 5.266e-12, 5.836e-12, 6.365e-12,
2400 6.807e-12, 7.47e-12, 7.951e-12, 8.636e-12, 8.972e-12, 9.314e-12,
2401 9.445e-12, 1.003e-11, 1.013e-11, 9.937e-12, 9.729e-12, 9.064e-12,
2402 9.119e-12, 9.124e-12, 8.704e-12, 8.078e-12, 7.47e-12, 6.329e-12,
2403 5.674e-12, 4.808e-12, 4.119e-12, 3.554e-12, 3.103e-12, 2.731e-12,
2404 2.415e-12, 2.15e-12, 1.926e-12, 1.737e-12, 1.578e-12, 1.447e-12,
2405 1.34e-12, 1.255e-12, 1.191e-12, 1.146e-12, 1.121e-12, 1.114e-12,
2406 1.126e-12, 1.156e-12, 1.207e-12, 1.278e-12, 1.372e-12, 1.49e-12,
2407 1.633e-12, 1.805e-12, 2.01e-12, 2.249e-12, 2.528e-12, 2.852e-12,
2408 3.228e-12, 3.658e-12, 4.153e-12, 4.728e-12, 5.394e-12, 6.176e-12,
2409 7.126e-12, 8.188e-12, 9.328e-12, 1.103e-11, 1.276e-11, 1.417e-11,
2410 1.615e-11, 1.84e-11, 2.155e-11, 2.429e-11, 2.826e-11, 3.222e-11,
2411 3.664e-11, 4.14e-11, 4.906e-11, 5.536e-11, 6.327e-11, 7.088e-11,
2412 8.316e-11, 9.242e-11, 1.07e-10, 1.223e-10, 1.341e-10, 1.553e-10,
2413 1.703e-10, 1.9e-10, 2.022e-10, 2.233e-10, 2.345e-10, 2.438e-10,
2414 2.546e-10, 2.599e-10, 2.661e-10, 2.703e-10, 2.686e-10, 2.662e-10,
2415 2.56e-10, 2.552e-10, 2.378e-10, 2.252e-10, 2.146e-10, 1.885e-10,
2416 1.668e-10, 1.441e-10, 1.295e-10, 1.119e-10, 9.893e-11, 8.687e-11,
2417 7.678e-11, 6.685e-11, 5.879e-11, 5.127e-11, 4.505e-11, 3.997e-11,
2418 3.511e-11
2419 };
2420
2421 static double h2ofrn[2001] = { .01095, .01126, .01205, .01322, .0143,
2422 .01506, .01548, .01534, .01486, .01373, .01262, .01134, .01001,
2423 .008702, .007475, .006481, .00548, .0046, .003833, .00311,
2424 .002543, .002049, .00168, .001374, .001046, 8.193e-4, 6.267e-4,
2425 4.968e-4, 3.924e-4, 2.983e-4, 2.477e-4, 1.997e-4, 1.596e-4,
2426 1.331e-4, 1.061e-4, 8.942e-5, 7.168e-5, 5.887e-5, 4.848e-5,
2427 3.817e-5, 3.17e-5, 2.579e-5, 2.162e-5, 1.768e-5, 1.49e-5,
2428 1.231e-5, 1.013e-5, 8.555e-6, 7.328e-6, 6.148e-6, 5.207e-6,
2429 4.387e-6, 3.741e-6, 3.22e-6, 2.753e-6, 2.346e-6, 1.985e-6,
2430 1.716e-6, 1.475e-6, 1.286e-6, 1.122e-6, 9.661e-7, 8.284e-7,
2431 7.057e-7, 6.119e-7, 5.29e-7, 4.571e-7, 3.948e-7, 3.432e-7,
2432 2.983e-7, 2.589e-7, 2.265e-7, 1.976e-7, 1.704e-7, 1.456e-7,
2433 1.26e-7, 1.101e-7, 9.648e-8, 8.415e-8, 7.34e-8, 6.441e-8,
2434 5.643e-8, 4.94e-8, 4.276e-8, 3.703e-8, 3.227e-8, 2.825e-8,
2435 2.478e-8, 2.174e-8, 1.898e-8, 1.664e-8, 1.458e-8, 1.278e-8,
2436 1.126e-8, 9.891e-9, 8.709e-9, 7.652e-9, 6.759e-9, 5.975e-9,
2437 5.31e-9, 4.728e-9, 4.214e-9, 3.792e-9, 3.463e-9, 3.226e-9,
2438 2.992e-9, 2.813e-9, 2.749e-9, 2.809e-9, 2.913e-9, 3.037e-9,
2439 3.413e-9, 3.738e-9, 4.189e-9, 4.808e-9, 5.978e-9, 7.088e-9,
2440 8.071e-9, 9.61e-9, 1.21e-8, 1.5e-8, 1.764e-8, 2.221e-8, 2.898e-8,
2441 3.948e-8, 5.068e-8, 6.227e-8, 7.898e-8, 1.033e-7, 1.437e-7,
2442 1.889e-7, 2.589e-7, 3.59e-7, 4.971e-7, 7.156e-7, 9.983e-7,
2443 1.381e-6, 1.929e-6, 2.591e-6, 3.453e-6, 4.57e-6, 5.93e-6,
2444 7.552e-6, 9.556e-6, 1.183e-5, 1.425e-5, 1.681e-5, 1.978e-5,
2445 2.335e-5, 2.668e-5, 3.022e-5, 3.371e-5, 3.715e-5, 3.967e-5,
2446 4.06e-5, 4.01e-5, 3.809e-5, 3.491e-5, 3.155e-5, 2.848e-5,
2447 2.678e-5, 2.66e-5, 2.811e-5, 3.071e-5, 3.294e-5, 3.459e-5,
2448 3.569e-5, 3.56e-5, 3.434e-5, 3.186e-5, 2.916e-5, 2.622e-5,
2449 2.275e-5, 1.918e-5, 1.62e-5, 1.373e-5, 1.182e-5, 1.006e-5,
2450 8.556e-6, 7.26e-6, 6.107e-6, 5.034e-6, 4.211e-6, 3.426e-6,
2451 2.865e-6, 2.446e-6, 1.998e-6, 1.628e-6, 1.242e-6, 1.005e-6,
2452 7.853e-7, 6.21e-7, 5.071e-7, 4.156e-7, 3.548e-7, 2.825e-7,
2453 2.261e-7, 1.916e-7, 1.51e-7, 1.279e-7, 1.059e-7, 9.14e-8,
2454 7.707e-8, 6.17e-8, 5.311e-8, 4.263e-8, 3.518e-8, 2.961e-8,
2455 2.457e-8, 2.119e-8, 1.712e-8, 1.439e-8, 1.201e-8, 1.003e-8,
2456 8.564e-9, 7.199e-9, 6.184e-9, 5.206e-9, 4.376e-9, 3.708e-9,
2457 3.157e-9, 2.725e-9, 2.361e-9, 2.074e-9, 1.797e-9, 1.562e-9,
2458 1.364e-9, 1.196e-9, 1.042e-9, 8.862e-10, 7.648e-10, 6.544e-10,
2459 5.609e-10, 4.791e-10, 4.108e-10, 3.531e-10, 3.038e-10, 2.618e-10,
2460 2.268e-10, 1.969e-10, 1.715e-10, 1.496e-10, 1.308e-10, 1.147e-10,
2461 1.008e-10, 8.894e-11, 7.885e-11, 7.031e-11, 6.355e-11, 5.854e-11,
2462 5.534e-11, 5.466e-11, 5.725e-11, 6.447e-11, 7.943e-11, 1.038e-10,
2463 1.437e-10, 2.04e-10, 2.901e-10, 4.051e-10, 5.556e-10, 7.314e-10,
2464 9.291e-10, 1.134e-9, 1.321e-9, 1.482e-9, 1.596e-9, 1.669e-9,
2465 1.715e-9, 1.762e-9, 1.817e-9, 1.828e-9, 1.848e-9, 1.873e-9,
2466 1.902e-9, 1.894e-9, 1.864e-9, 1.841e-9, 1.797e-9, 1.704e-9,
2467 1.559e-9, 1.382e-9, 1.187e-9, 1.001e-9, 8.468e-10, 7.265e-10,
2468 6.521e-10, 6.381e-10, 6.66e-10, 7.637e-10, 9.705e-10, 1.368e-9,
2469 1.856e-9, 2.656e-9, 3.954e-9, 5.96e-9, 8.72e-9, 1.247e-8,
2470 1.781e-8, 2.491e-8, 3.311e-8, 4.272e-8, 5.205e-8, 6.268e-8,
2471 7.337e-8, 8.277e-8, 9.185e-8, 1.004e-7, 1.091e-7, 1.159e-7,
2472 1.188e-7, 1.175e-7, 1.124e-7, 1.033e-7, 9.381e-8, 8.501e-8,
2473 7.956e-8, 7.894e-8, 8.331e-8, 9.102e-8, 9.836e-8, 1.035e-7,
2474 1.064e-7, 1.06e-7, 1.032e-7, 9.808e-8, 9.139e-8, 8.442e-8,
2475 7.641e-8, 6.881e-8, 6.161e-8, 5.404e-8, 4.804e-8, 4.446e-8,
2476 4.328e-8, 4.259e-8, 4.421e-8, 4.673e-8, 4.985e-8, 5.335e-8,
2477 5.796e-8, 6.542e-8, 7.714e-8, 8.827e-8, 1.04e-7, 1.238e-7,
2478 1.499e-7, 1.829e-7, 2.222e-7, 2.689e-7, 3.303e-7, 3.981e-7,
2479 4.84e-7, 5.91e-7, 7.363e-7, 9.087e-7, 1.139e-6, 1.455e-6,
2480 1.866e-6, 2.44e-6, 3.115e-6, 3.941e-6, 4.891e-6, 5.992e-6,
2481 7.111e-6, 8.296e-6, 9.21e-6, 9.987e-6, 1.044e-5, 1.073e-5,
2482 1.092e-5, 1.106e-5, 1.138e-5, 1.171e-5, 1.186e-5, 1.186e-5,
2483 1.179e-5, 1.166e-5, 1.151e-5, 1.16e-5, 1.197e-5, 1.241e-5,
2484 1.268e-5, 1.26e-5, 1.184e-5, 1.063e-5, 9.204e-6, 7.584e-6,
2485 6.053e-6, 4.482e-6, 3.252e-6, 2.337e-6, 1.662e-6, 1.18e-6,
2486 8.15e-7, 5.95e-7, 4.354e-7, 3.302e-7, 2.494e-7, 1.93e-7,
2487 1.545e-7, 1.25e-7, 1.039e-7, 8.602e-8, 7.127e-8, 5.897e-8,
2488 4.838e-8, 4.018e-8, 3.28e-8, 2.72e-8, 2.307e-8, 1.972e-8,
2489 1.654e-8, 1.421e-8, 1.174e-8, 1.004e-8, 8.739e-9, 7.358e-9,
2490 6.242e-9, 5.303e-9, 4.567e-9, 3.94e-9, 3.375e-9, 2.864e-9,
2491 2.422e-9, 2.057e-9, 1.75e-9, 1.505e-9, 1.294e-9, 1.101e-9,
2492 9.401e-10, 8.018e-10, 6.903e-10, 5.965e-10, 5.087e-10, 4.364e-10,
2493 3.759e-10, 3.247e-10, 2.809e-10, 2.438e-10, 2.123e-10, 1.853e-10,
2494 1.622e-10, 1.426e-10, 1.26e-10, 1.125e-10, 1.022e-10, 9.582e-11,
2495 9.388e-11, 9.801e-11, 1.08e-10, 1.276e-10, 1.551e-10, 1.903e-10,
2496 2.291e-10, 2.724e-10, 3.117e-10, 3.4e-10, 3.562e-10, 3.625e-10,
2497 3.619e-10, 3.429e-10, 3.221e-10, 2.943e-10, 2.645e-10, 2.338e-10,
2498 2.062e-10, 1.901e-10, 1.814e-10, 1.827e-10, 1.906e-10, 1.984e-10,
2499 2.04e-10, 2.068e-10, 2.075e-10, 2.018e-10, 1.959e-10, 1.897e-10,
2500 1.852e-10, 1.791e-10, 1.696e-10, 1.634e-10, 1.598e-10, 1.561e-10,
2501 1.518e-10, 1.443e-10, 1.377e-10, 1.346e-10, 1.342e-10, 1.375e-10,
2502 1.525e-10, 1.767e-10, 2.108e-10, 2.524e-10, 2.981e-10, 3.477e-10,
2503 4.262e-10, 5.326e-10, 6.646e-10, 8.321e-10, 1.069e-9, 1.386e-9,
2504 1.743e-9, 2.216e-9, 2.808e-9, 3.585e-9, 4.552e-9, 5.907e-9,
2505 7.611e-9, 9.774e-9, 1.255e-8, 1.666e-8, 2.279e-8, 3.221e-8,
2506 4.531e-8, 6.4e-8, 9.187e-8, 1.295e-7, 1.825e-7, 2.431e-7,
2507 3.181e-7, 4.009e-7, 4.941e-7, 5.88e-7, 6.623e-7, 7.155e-7,
2508 7.451e-7, 7.594e-7, 7.541e-7, 7.467e-7, 7.527e-7, 7.935e-7,
2509 8.461e-7, 8.954e-7, 9.364e-7, 9.843e-7, 1.024e-6, 1.05e-6,
2510 1.059e-6, 1.074e-6, 1.072e-6, 1.043e-6, 9.789e-7, 8.803e-7,
2511 7.662e-7, 6.378e-7, 5.133e-7, 3.958e-7, 2.914e-7, 2.144e-7,
2512 1.57e-7, 1.14e-7, 8.47e-8, 6.2e-8, 4.657e-8, 3.559e-8, 2.813e-8,
2513 2.222e-8, 1.769e-8, 1.391e-8, 1.125e-8, 9.186e-9, 7.704e-9,
2514 6.447e-9, 5.381e-9, 4.442e-9, 3.669e-9, 3.057e-9, 2.564e-9,
2515 2.153e-9, 1.784e-9, 1.499e-9, 1.281e-9, 1.082e-9, 9.304e-10,
2516 8.169e-10, 6.856e-10, 5.866e-10, 5.043e-10, 4.336e-10, 3.731e-10,
2517 3.175e-10, 2.745e-10, 2.374e-10, 2.007e-10, 1.737e-10, 1.508e-10,
2518 1.302e-10, 1.13e-10, 9.672e-11, 8.375e-11, 7.265e-11, 6.244e-11,
2519 5.343e-11, 4.654e-11, 3.975e-11, 3.488e-11, 3.097e-11, 2.834e-11,
2520 2.649e-11, 2.519e-11, 2.462e-11, 2.443e-11, 2.44e-11, 2.398e-11,
2521 2.306e-11, 2.183e-11, 2.021e-11, 1.821e-11, 1.599e-11, 1.403e-11,
2522 1.196e-11, 1.023e-11, 8.728e-12, 7.606e-12, 6.941e-12, 6.545e-12,
2523 6.484e-12, 6.6e-12, 6.718e-12, 6.785e-12, 6.746e-12, 6.724e-12,
2524 6.764e-12, 6.995e-12, 7.144e-12, 7.32e-12, 7.33e-12, 7.208e-12,
2525 6.789e-12, 6.09e-12, 5.337e-12, 4.62e-12, 4.037e-12, 3.574e-12,
2526 3.311e-12, 3.346e-12, 3.566e-12, 3.836e-12, 4.076e-12, 4.351e-12,
2527 4.691e-12, 5.114e-12, 5.427e-12, 6.167e-12, 7.436e-12, 8.842e-12,
2528 1.038e-11, 1.249e-11, 1.54e-11, 1.915e-11, 2.48e-11, 3.256e-11,
2529 4.339e-11, 5.611e-11, 7.519e-11, 1.037e-10, 1.409e-10, 1.883e-10,
2530 2.503e-10, 3.38e-10, 4.468e-10, 5.801e-10, 7.335e-10, 8.98e-10,
2531 1.11e-9, 1.363e-9, 1.677e-9, 2.104e-9, 2.681e-9, 3.531e-9,
2532 4.621e-9, 6.106e-9, 8.154e-9, 1.046e-8, 1.312e-8, 1.607e-8,
2533 1.948e-8, 2.266e-8, 2.495e-8, 2.655e-8, 2.739e-8, 2.739e-8,
2534 2.662e-8, 2.589e-8, 2.59e-8, 2.664e-8, 2.833e-8, 3.023e-8,
2535 3.305e-8, 3.558e-8, 3.793e-8, 3.961e-8, 4.056e-8, 4.102e-8,
2536 4.025e-8, 3.917e-8, 3.706e-8, 3.493e-8, 3.249e-8, 3.096e-8,
2537 3.011e-8, 3.111e-8, 3.395e-8, 3.958e-8, 4.875e-8, 6.066e-8,
2538 7.915e-8, 1.011e-7, 1.3e-7, 1.622e-7, 2.003e-7, 2.448e-7,
2539 2.863e-7, 3.317e-7, 3.655e-7, 3.96e-7, 4.098e-7, 4.168e-7,
2540 4.198e-7, 4.207e-7, 4.289e-7, 4.384e-7, 4.471e-7, 4.524e-7,
2541 4.574e-7, 4.633e-7, 4.785e-7, 5.028e-7, 5.371e-7, 5.727e-7,
2542 5.955e-7, 5.998e-7, 5.669e-7, 5.082e-7, 4.397e-7, 3.596e-7,
2543 2.814e-7, 2.074e-7, 1.486e-7, 1.057e-7, 7.25e-8, 4.946e-8,
2544 3.43e-8, 2.447e-8, 1.793e-8, 1.375e-8, 1.096e-8, 9.091e-9,
2545 7.709e-9, 6.631e-9, 5.714e-9, 4.886e-9, 4.205e-9, 3.575e-9,
2546 3.07e-9, 2.631e-9, 2.284e-9, 2.002e-9, 1.745e-9, 1.509e-9,
2547 1.284e-9, 1.084e-9, 9.163e-10, 7.663e-10, 6.346e-10, 5.283e-10,
2548 4.354e-10, 3.59e-10, 2.982e-10, 2.455e-10, 2.033e-10, 1.696e-10,
2549 1.432e-10, 1.211e-10, 1.02e-10, 8.702e-11, 7.38e-11, 6.293e-11,
2550 5.343e-11, 4.532e-11, 3.907e-11, 3.365e-11, 2.945e-11, 2.558e-11,
2551 2.192e-11, 1.895e-11, 1.636e-11, 1.42e-11, 1.228e-11, 1.063e-11,
2552 9.348e-12, 8.2e-12, 7.231e-12, 6.43e-12, 5.702e-12, 5.052e-12,
2553 4.469e-12, 4e-12, 3.679e-12, 3.387e-12, 3.197e-12, 3.158e-12,
2554 3.327e-12, 3.675e-12, 4.292e-12, 5.437e-12, 7.197e-12, 1.008e-11,
2555 1.437e-11, 2.035e-11, 2.905e-11, 4.062e-11, 5.528e-11, 7.177e-11,
2556 9.064e-11, 1.109e-10, 1.297e-10, 1.473e-10, 1.652e-10, 1.851e-10,
2557 2.079e-10, 2.313e-10, 2.619e-10, 2.958e-10, 3.352e-10, 3.796e-10,
2558 4.295e-10, 4.923e-10, 5.49e-10, 5.998e-10, 6.388e-10, 6.645e-10,
2559 6.712e-10, 6.549e-10, 6.38e-10, 6.255e-10, 6.253e-10, 6.459e-10,
2560 6.977e-10, 7.59e-10, 8.242e-10, 8.92e-10, 9.403e-10, 9.701e-10,
2561 9.483e-10, 9.135e-10, 8.617e-10, 7.921e-10, 7.168e-10, 6.382e-10,
2562 5.677e-10, 5.045e-10, 4.572e-10, 4.312e-10, 4.145e-10, 4.192e-10,
2563 4.541e-10, 5.368e-10, 6.771e-10, 8.962e-10, 1.21e-9, 1.659e-9,
2564 2.33e-9, 3.249e-9, 4.495e-9, 5.923e-9, 7.642e-9, 9.607e-9,
2565 1.178e-8, 1.399e-8, 1.584e-8, 1.73e-8, 1.816e-8, 1.87e-8,
2566 1.868e-8, 1.87e-8, 1.884e-8, 1.99e-8, 2.15e-8, 2.258e-8,
2567 2.364e-8, 2.473e-8, 2.602e-8, 2.689e-8, 2.731e-8, 2.816e-8,
2568 2.859e-8, 2.839e-8, 2.703e-8, 2.451e-8, 2.149e-8, 1.787e-8,
2569 1.449e-8, 1.111e-8, 8.282e-9, 6.121e-9, 4.494e-9, 3.367e-9,
2570 2.487e-9, 1.885e-9, 1.503e-9, 1.249e-9, 1.074e-9, 9.427e-10,
2571 8.439e-10, 7.563e-10, 6.772e-10, 6.002e-10, 5.254e-10, 4.588e-10,
2572 3.977e-10, 3.449e-10, 3.003e-10, 2.624e-10, 2.335e-10, 2.04e-10,
2573 1.771e-10, 1.534e-10, 1.296e-10, 1.097e-10, 9.173e-11, 7.73e-11,
2574 6.547e-11, 5.191e-11, 4.198e-11, 3.361e-11, 2.732e-11, 2.244e-11,
2575 1.791e-11, 1.509e-11, 1.243e-11, 1.035e-11, 8.969e-12, 7.394e-12,
2576 6.323e-12, 5.282e-12, 4.543e-12, 3.752e-12, 3.14e-12, 2.6e-12,
2577 2.194e-12, 1.825e-12, 1.511e-12, 1.245e-12, 1.024e-12, 8.539e-13,
2578 7.227e-13, 6.102e-13, 5.189e-13, 4.43e-13, 3.774e-13, 3.236e-13,
2579 2.8e-13, 2.444e-13, 2.156e-13, 1.932e-13, 1.775e-13, 1.695e-13,
2580 1.672e-13, 1.704e-13, 1.825e-13, 2.087e-13, 2.614e-13, 3.377e-13,
2581 4.817e-13, 6.989e-13, 1.062e-12, 1.562e-12, 2.288e-12, 3.295e-12,
2582 4.55e-12, 5.965e-12, 7.546e-12, 9.395e-12, 1.103e-11, 1.228e-11,
2583 1.318e-11, 1.38e-11, 1.421e-11, 1.39e-11, 1.358e-11, 1.336e-11,
2584 1.342e-11, 1.356e-11, 1.424e-11, 1.552e-11, 1.73e-11, 1.951e-11,
2585 2.128e-11, 2.249e-11, 2.277e-11, 2.226e-11, 2.111e-11, 1.922e-11,
2586 1.775e-11, 1.661e-11, 1.547e-11, 1.446e-11, 1.323e-11, 1.21e-11,
2587 1.054e-11, 9.283e-12, 8.671e-12, 8.67e-12, 9.429e-12, 1.062e-11,
2588 1.255e-11, 1.506e-11, 1.818e-11, 2.26e-11, 2.831e-11, 3.723e-11,
2589 5.092e-11, 6.968e-11, 9.826e-11, 1.349e-10, 1.87e-10, 2.58e-10,
2590 3.43e-10, 4.424e-10, 5.521e-10, 6.812e-10, 8.064e-10, 9.109e-10,
2591 9.839e-10, 1.028e-9, 1.044e-9, 1.029e-9, 1.005e-9, 1.002e-9,
2592 1.038e-9, 1.122e-9, 1.233e-9, 1.372e-9, 1.524e-9, 1.665e-9,
2593 1.804e-9, 1.908e-9, 2.015e-9, 2.117e-9, 2.219e-9, 2.336e-9,
2594 2.531e-9, 2.805e-9, 3.189e-9, 3.617e-9, 4.208e-9, 4.911e-9,
2595 5.619e-9, 6.469e-9, 7.188e-9, 7.957e-9, 8.503e-9, 9.028e-9,
2596 9.571e-9, 9.99e-9, 1.055e-8, 1.102e-8, 1.132e-8, 1.141e-8,
2597 1.145e-8, 1.145e-8, 1.176e-8, 1.224e-8, 1.304e-8, 1.388e-8,
2598 1.445e-8, 1.453e-8, 1.368e-8, 1.22e-8, 1.042e-8, 8.404e-9,
2599 6.403e-9, 4.643e-9, 3.325e-9, 2.335e-9, 1.638e-9, 1.19e-9,
2600 9.161e-10, 7.412e-10, 6.226e-10, 5.516e-10, 5.068e-10, 4.831e-10,
2601 4.856e-10, 5.162e-10, 5.785e-10, 6.539e-10, 7.485e-10, 8.565e-10,
2602 9.534e-10, 1.052e-9, 1.115e-9, 1.173e-9, 1.203e-9, 1.224e-9,
2603 1.243e-9, 1.248e-9, 1.261e-9, 1.265e-9, 1.25e-9, 1.217e-9,
2604 1.176e-9, 1.145e-9, 1.153e-9, 1.199e-9, 1.278e-9, 1.366e-9,
2605 1.426e-9, 1.444e-9, 1.365e-9, 1.224e-9, 1.051e-9, 8.539e-10,
2606 6.564e-10, 4.751e-10, 3.404e-10, 2.377e-10, 1.631e-10, 1.114e-10,
2607 7.87e-11, 5.793e-11, 4.284e-11, 3.3e-11, 2.62e-11, 2.152e-11,
2608 1.777e-11, 1.496e-11, 1.242e-11, 1.037e-11, 8.725e-12, 7.004e-12,
2609 5.718e-12, 4.769e-12, 3.952e-12, 3.336e-12, 2.712e-12, 2.213e-12,
2610 1.803e-12, 1.492e-12, 1.236e-12, 1.006e-12, 8.384e-13, 7.063e-13,
2611 5.879e-13, 4.93e-13, 4.171e-13, 3.569e-13, 3.083e-13, 2.688e-13,
2612 2.333e-13, 2.035e-13, 1.82e-13, 1.682e-13, 1.635e-13, 1.674e-13,
2613 1.769e-13, 2.022e-13, 2.485e-13, 3.127e-13, 4.25e-13, 5.928e-13,
2614 8.514e-13, 1.236e-12, 1.701e-12, 2.392e-12, 3.231e-12, 4.35e-12,
2615 5.559e-12, 6.915e-12, 8.519e-12, 1.013e-11, 1.146e-11, 1.24e-11,
2616 1.305e-11, 1.333e-11, 1.318e-11, 1.263e-11, 1.238e-11, 1.244e-11,
2617 1.305e-11, 1.432e-11, 1.623e-11, 1.846e-11, 2.09e-11, 2.328e-11,
2618 2.526e-11, 2.637e-11, 2.702e-11, 2.794e-11, 2.889e-11, 2.989e-11,
2619 3.231e-11, 3.68e-11, 4.375e-11, 5.504e-11, 7.159e-11, 9.502e-11,
2620 1.279e-10, 1.645e-10, 2.098e-10, 2.618e-10, 3.189e-10, 3.79e-10,
2621 4.303e-10, 4.753e-10, 5.027e-10, 5.221e-10, 5.293e-10, 5.346e-10,
2622 5.467e-10, 5.796e-10, 6.2e-10, 6.454e-10, 6.705e-10, 6.925e-10,
2623 7.233e-10, 7.35e-10, 7.538e-10, 7.861e-10, 8.077e-10, 8.132e-10,
2624 7.749e-10, 7.036e-10, 6.143e-10, 5.093e-10, 4.089e-10, 3.092e-10,
2625 2.299e-10, 1.705e-10, 1.277e-10, 9.723e-11, 7.533e-11, 6.126e-11,
2626 5.154e-11, 4.428e-11, 3.913e-11, 3.521e-11, 3.297e-11, 3.275e-11,
2627 3.46e-11, 3.798e-11, 4.251e-11, 4.745e-11, 5.232e-11, 5.606e-11,
2628 5.82e-11, 5.88e-11, 5.79e-11, 5.661e-11, 5.491e-11, 5.366e-11,
2629 5.341e-11, 5.353e-11, 5.336e-11, 5.293e-11, 5.248e-11, 5.235e-11,
2630 5.208e-11, 5.322e-11, 5.521e-11, 5.725e-11, 5.827e-11, 5.685e-11,
2631 5.245e-11, 4.612e-11, 3.884e-11, 3.129e-11, 2.404e-11, 1.732e-11,
2632 1.223e-11, 8.574e-12, 5.888e-12, 3.986e-12, 2.732e-12, 1.948e-12,
2633 1.414e-12, 1.061e-12, 8.298e-13, 6.612e-13, 5.413e-13, 4.472e-13,
2634 3.772e-13, 3.181e-13, 2.645e-13, 2.171e-13, 1.778e-13, 1.464e-13,
2635 1.183e-13, 9.637e-14, 7.991e-14, 6.668e-14, 5.57e-14, 4.663e-14,
2636 3.848e-14, 3.233e-14, 2.706e-14, 2.284e-14, 1.944e-14, 1.664e-14,
2637 1.43e-14, 1.233e-14, 1.066e-14, 9.234e-15, 8.023e-15, 6.993e-15,
2638 6.119e-15, 5.384e-15, 4.774e-15, 4.283e-15, 3.916e-15, 3.695e-15,
2639 3.682e-15, 4.004e-15, 4.912e-15, 6.853e-15, 1.056e-14, 1.712e-14,
2640 2.804e-14, 4.516e-14, 7.113e-14, 1.084e-13, 1.426e-13, 1.734e-13,
2641 1.978e-13, 2.194e-13, 2.388e-13, 2.489e-13, 2.626e-13, 2.865e-13,
2642 3.105e-13, 3.387e-13, 3.652e-13, 3.984e-13, 4.398e-13, 4.906e-13,
2643 5.55e-13, 6.517e-13, 7.813e-13, 9.272e-13, 1.164e-12, 1.434e-12,
2644 1.849e-12, 2.524e-12, 3.328e-12, 4.523e-12, 6.108e-12, 8.207e-12,
2645 1.122e-11, 1.477e-11, 1.9e-11, 2.412e-11, 2.984e-11, 3.68e-11,
2646 4.353e-11, 4.963e-11, 5.478e-11, 5.903e-11, 6.233e-11, 6.483e-11,
2647 6.904e-11, 7.569e-11, 8.719e-11, 1.048e-10, 1.278e-10, 1.557e-10,
2648 1.869e-10, 2.218e-10, 2.61e-10, 2.975e-10, 3.371e-10, 3.746e-10,
2649 4.065e-10, 4.336e-10, 4.503e-10, 4.701e-10, 4.8e-10, 4.917e-10,
2650 5.038e-10, 5.128e-10, 5.143e-10, 5.071e-10, 5.019e-10, 5.025e-10,
2651 5.183e-10, 5.496e-10, 5.877e-10, 6.235e-10, 6.42e-10, 6.234e-10,
2652 5.698e-10, 4.916e-10, 4.022e-10, 3.126e-10, 2.282e-10, 1.639e-10,
2653 1.142e-10, 7.919e-11, 5.69e-11, 4.313e-11, 3.413e-11, 2.807e-11,
2654 2.41e-11, 2.166e-11, 2.024e-11, 1.946e-11, 1.929e-11, 1.963e-11,
2655 2.035e-11, 2.162e-11, 2.305e-11, 2.493e-11, 2.748e-11, 3.048e-11,
2656 3.413e-11, 3.754e-11, 4.155e-11, 4.635e-11, 5.11e-11, 5.734e-11,
2657 6.338e-11, 6.99e-11, 7.611e-11, 8.125e-11, 8.654e-11, 8.951e-11,
2658 9.182e-11, 9.31e-11, 9.273e-11, 9.094e-11, 8.849e-11, 8.662e-11,
2659 8.67e-11, 8.972e-11, 9.566e-11, 1.025e-10, 1.083e-10, 1.111e-10,
2660 1.074e-10, 9.771e-11, 8.468e-11, 6.958e-11, 5.47e-11, 4.04e-11,
2661 2.94e-11, 2.075e-11, 1.442e-11, 1.01e-11, 7.281e-12, 5.409e-12,
2662 4.138e-12, 3.304e-12, 2.784e-12, 2.473e-12, 2.273e-12, 2.186e-12,
2663 2.118e-12, 2.066e-12, 1.958e-12, 1.818e-12, 1.675e-12, 1.509e-12,
2664 1.349e-12, 1.171e-12, 9.838e-13, 8.213e-13, 6.765e-13, 5.378e-13,
2665 4.161e-13, 3.119e-13, 2.279e-13, 1.637e-13, 1.152e-13, 8.112e-14,
2666 5.919e-14, 4.47e-14, 3.492e-14, 2.811e-14, 2.319e-14, 1.948e-14,
2667 1.66e-14, 1.432e-14, 1.251e-14, 1.109e-14, 1.006e-14, 9.45e-15,
2668 9.384e-15, 1.012e-14, 1.216e-14, 1.636e-14, 2.305e-14, 3.488e-14,
2669 5.572e-14, 8.479e-14, 1.265e-13, 1.905e-13, 2.73e-13, 3.809e-13,
2670 4.955e-13, 6.303e-13, 7.861e-13, 9.427e-13, 1.097e-12, 1.212e-12,
2671 1.328e-12, 1.415e-12, 1.463e-12, 1.495e-12, 1.571e-12, 1.731e-12,
2672 1.981e-12, 2.387e-12, 2.93e-12, 3.642e-12, 4.584e-12, 5.822e-12,
2673 7.278e-12, 9.193e-12, 1.135e-11, 1.382e-11, 1.662e-11, 1.958e-11,
2674 2.286e-11, 2.559e-11, 2.805e-11, 2.988e-11, 3.106e-11, 3.182e-11,
2675 3.2e-11, 3.258e-11, 3.362e-11, 3.558e-11, 3.688e-11, 3.8e-11,
2676 3.929e-11, 4.062e-11, 4.186e-11, 4.293e-11, 4.48e-11, 4.643e-11,
2677 4.704e-11, 4.571e-11, 4.206e-11, 3.715e-11, 3.131e-11, 2.541e-11,
2678 1.978e-11, 1.508e-11, 1.146e-11, 8.7e-12, 6.603e-12, 5.162e-12,
2679 4.157e-12, 3.408e-12, 2.829e-12, 2.405e-12, 2.071e-12, 1.826e-12,
2680 1.648e-12, 1.542e-12, 1.489e-12, 1.485e-12, 1.493e-12, 1.545e-12,
2681 1.637e-12, 1.814e-12, 2.061e-12, 2.312e-12, 2.651e-12, 3.03e-12,
2682 3.46e-12, 3.901e-12, 4.306e-12, 4.721e-12, 5.008e-12, 5.281e-12,
2683 5.541e-12, 5.791e-12, 6.115e-12, 6.442e-12, 6.68e-12, 6.791e-12,
2684 6.831e-12, 6.839e-12, 6.946e-12, 7.128e-12, 7.537e-12, 8.036e-12,
2685 8.392e-12, 8.526e-12, 8.11e-12, 7.325e-12, 6.329e-12, 5.183e-12,
2686 4.081e-12, 2.985e-12, 2.141e-12, 1.492e-12, 1.015e-12, 6.684e-13,
2687 4.414e-13, 2.987e-13, 2.038e-13, 1.391e-13, 9.86e-14, 7.24e-14,
2688 5.493e-14, 4.288e-14, 3.427e-14, 2.787e-14, 2.296e-14, 1.909e-14,
2689 1.598e-14, 1.344e-14, 1.135e-14, 9.616e-15, 8.169e-15, 6.957e-15,
2690 5.938e-15, 5.08e-15, 4.353e-15, 3.738e-15, 3.217e-15, 2.773e-15,
2691 2.397e-15, 2.077e-15, 1.805e-15, 1.575e-15, 1.382e-15, 1.221e-15,
2692 1.09e-15, 9.855e-16, 9.068e-16, 8.537e-16, 8.27e-16, 8.29e-16,
2693 8.634e-16, 9.359e-16, 1.055e-15, 1.233e-15, 1.486e-15, 1.839e-15,
2694 2.326e-15, 2.998e-15, 3.934e-15, 5.256e-15, 7.164e-15, 9.984e-15,
2695 1.427e-14, 2.099e-14, 3.196e-14, 5.121e-14, 7.908e-14, 1.131e-13,
2696 1.602e-13, 2.239e-13, 3.075e-13, 4.134e-13, 5.749e-13, 7.886e-13,
2697 1.071e-12, 1.464e-12, 2.032e-12, 2.8e-12, 3.732e-12, 4.996e-12,
2698 6.483e-12, 8.143e-12, 1.006e-11, 1.238e-11, 1.484e-11, 1.744e-11,
2699 2.02e-11, 2.274e-11, 2.562e-11, 2.848e-11, 3.191e-11, 3.617e-11,
2700 4.081e-11, 4.577e-11, 4.937e-11, 5.204e-11, 5.401e-11, 5.462e-11,
2701 5.507e-11, 5.51e-11, 5.605e-11, 5.686e-11, 5.739e-11, 5.766e-11,
2702 5.74e-11, 5.754e-11, 5.761e-11, 5.777e-11, 5.712e-11, 5.51e-11,
2703 5.088e-11, 4.438e-11, 3.728e-11, 2.994e-11, 2.305e-11, 1.715e-11,
2704 1.256e-11, 9.208e-12, 6.745e-12, 5.014e-12, 3.785e-12, 2.9e-12,
2705 2.239e-12, 1.757e-12, 1.414e-12, 1.142e-12, 9.482e-13, 8.01e-13,
2706 6.961e-13, 6.253e-13, 5.735e-13, 5.433e-13, 5.352e-13, 5.493e-13,
2707 5.706e-13, 6.068e-13, 6.531e-13, 7.109e-13, 7.767e-13, 8.59e-13,
2708 9.792e-13, 1.142e-12, 1.371e-12, 1.65e-12, 1.957e-12, 2.302e-12,
2709 2.705e-12, 3.145e-12, 3.608e-12, 4.071e-12, 4.602e-12, 5.133e-12,
2710 5.572e-12, 5.987e-12, 6.248e-12, 6.533e-12, 6.757e-12, 6.935e-12,
2711 7.224e-12, 7.422e-12, 7.538e-12, 7.547e-12, 7.495e-12, 7.543e-12,
2712 7.725e-12, 8.139e-12, 8.627e-12, 9.146e-12, 9.443e-12, 9.318e-12,
2713 8.649e-12, 7.512e-12, 6.261e-12, 4.915e-12, 3.647e-12, 2.597e-12,
2714 1.785e-12, 1.242e-12, 8.66e-13, 6.207e-13, 4.61e-13, 3.444e-13,
2715 2.634e-13, 2.1e-13, 1.725e-13, 1.455e-13, 1.237e-13, 1.085e-13,
2716 9.513e-14, 7.978e-14, 6.603e-14, 5.288e-14, 4.084e-14, 2.952e-14,
2717 2.157e-14, 1.593e-14, 1.199e-14, 9.267e-15, 7.365e-15, 6.004e-15,
2718 4.995e-15, 4.218e-15, 3.601e-15, 3.101e-15, 2.692e-15, 2.36e-15,
2719 2.094e-15, 1.891e-15, 1.755e-15, 1.699e-15, 1.755e-15, 1.987e-15,
2720 2.506e-15, 3.506e-15, 5.289e-15, 8.311e-15, 1.325e-14, 2.129e-14,
2721 3.237e-14, 4.595e-14, 6.441e-14, 8.433e-14, 1.074e-13, 1.383e-13,
2722 1.762e-13, 2.281e-13, 2.831e-13, 3.523e-13, 4.38e-13, 5.304e-13,
2723 6.29e-13, 7.142e-13, 8.032e-13, 8.934e-13, 9.888e-13, 1.109e-12,
2724 1.261e-12, 1.462e-12, 1.74e-12, 2.099e-12, 2.535e-12, 3.008e-12,
2725 3.462e-12, 3.856e-12, 4.098e-12, 4.239e-12, 4.234e-12, 4.132e-12,
2726 3.986e-12, 3.866e-12, 3.829e-12, 3.742e-12, 3.705e-12, 3.694e-12,
2727 3.765e-12, 3.849e-12, 3.929e-12, 4.056e-12, 4.092e-12, 4.047e-12,
2728 3.792e-12, 3.407e-12, 2.953e-12, 2.429e-12, 1.931e-12, 1.46e-12,
2729 1.099e-12, 8.199e-13, 6.077e-13, 4.449e-13, 3.359e-13, 2.524e-13,
2730 1.881e-13, 1.391e-13, 1.02e-13, 7.544e-14, 5.555e-14, 4.22e-14,
2731 3.321e-14, 2.686e-14, 2.212e-14, 1.78e-14, 1.369e-14, 1.094e-14,
2732 9.13e-15, 8.101e-15, 7.828e-15, 8.393e-15, 1.012e-14, 1.259e-14,
2733 1.538e-14, 1.961e-14, 2.619e-14, 3.679e-14, 5.049e-14, 6.917e-14,
2734 8.88e-14, 1.115e-13, 1.373e-13, 1.619e-13, 1.878e-13, 2.111e-13,
2735 2.33e-13, 2.503e-13, 2.613e-13, 2.743e-13, 2.826e-13, 2.976e-13,
2736 3.162e-13, 3.36e-13, 3.491e-13, 3.541e-13, 3.595e-13, 3.608e-13,
2737 3.709e-13, 3.869e-13, 4.12e-13, 4.366e-13, 4.504e-13, 4.379e-13,
2738 3.955e-13, 3.385e-13, 2.741e-13, 2.089e-13, 1.427e-13, 9.294e-14,
2739 5.775e-14, 3.565e-14, 2.21e-14, 1.398e-14, 9.194e-15, 6.363e-15,
2740 4.644e-15, 3.55e-15, 2.808e-15, 2.274e-15, 1.871e-15, 1.557e-15,
2741 1.308e-15, 1.108e-15, 9.488e-16, 8.222e-16, 7.238e-16, 6.506e-16,
2742 6.008e-16, 5.742e-16, 5.724e-16, 5.991e-16, 6.625e-16, 7.775e-16,
2743 9.734e-16, 1.306e-15, 1.88e-15, 2.879e-15, 4.616e-15, 7.579e-15,
2744 1.248e-14, 2.03e-14, 3.244e-14, 5.171e-14, 7.394e-14, 9.676e-14,
2745 1.199e-13, 1.467e-13, 1.737e-13, 2.02e-13, 2.425e-13, 3.016e-13,
2746 3.7e-13, 4.617e-13, 5.949e-13, 7.473e-13, 9.378e-13, 1.191e-12,
2747 1.481e-12, 1.813e-12, 2.232e-12, 2.722e-12, 3.254e-12, 3.845e-12,
2748 4.458e-12, 5.048e-12, 5.511e-12, 5.898e-12, 6.204e-12, 6.293e-12,
2749 6.386e-12, 6.467e-12, 6.507e-12, 6.466e-12, 6.443e-12, 6.598e-12,
2750 6.873e-12, 7.3e-12, 7.816e-12, 8.368e-12, 8.643e-12, 8.466e-12,
2751 7.871e-12, 6.853e-12, 5.714e-12, 4.482e-12, 3.392e-12, 2.613e-12,
2752 2.008e-12, 1.562e-12, 1.228e-12, 9.888e-13, 7.646e-13, 5.769e-13,
2753 4.368e-13, 3.324e-13, 2.508e-13, 1.916e-13
2754 };
2755
2756 static double xfcrev[15] =
2757 { 1.003, 1.009, 1.015, 1.023, 1.029, 1.033, 1.037,
2758 1.039, 1.04, 1.046, 1.036, 1.027, 1.01, 1.002, 1.
2759 };
2760
2761 double sfac;
2762
2763 /* Get H2O continuum absorption... */
2764 const double xw = nu / 10 + 1;
2765 if (xw >= 1 && xw < 2001) {
2766 const int iw = (int) xw;
2767 const double dw = xw - iw;
2768 const double ew = 1 - dw;
2769 const double cw296 = ew * h2o296[iw - 1] + dw * h2o296[iw];
2770 const double cw260 = ew * h2o260[iw - 1] + dw * h2o260[iw];
2771 const double cwfrn = ew * h2ofrn[iw - 1] + dw * h2ofrn[iw];
2772 if (nu <= 820 || nu >= 960) {
2773 sfac = 1;
2774 } else {
2775 const double xx = (nu - 820) / 10;
2776 const int ix = (int) xx;
2777 const double dx = xx - ix;
2778 sfac = (1 - dx) * xfcrev[ix] + dx * xfcrev[ix + 1];
2779 }
2780 const double ctwslf =
2781 sfac * cw296 * pow(cw260 / cw296, (296 - t) / (296 - 260));
2782 const double vf2 = POW2(nu - 370);
2783 const double vf6 = POW3(vf2);
2784 const double fscal = 36100 / (vf2 + vf6 * 1e-8 + 36100) * -.25 + 1;
2785 const double ctwfrn = cwfrn * fscal;
2786 const double a1 = nu * u * tanh(.7193876 / t * nu);
2787 const double a2 = 296 / t;
2788 const double a3 = p / P0 * (q * ctwslf + (1 - q) * ctwfrn) * 1e-20;
2789 return a1 * a2 * a3;
2790 } else
2791 return 0;
2792}
2793
2794/*****************************************************************************/
2795
2796double ctmn2(
2797 const double nu,
2798 const double p,
2799 const double t) {
2800
2801 static double ba[98] = { 0., 4.45e-8, 5.22e-8, 6.46e-8, 7.75e-8, 9.03e-8,
2802 1.06e-7, 1.21e-7, 1.37e-7, 1.57e-7, 1.75e-7, 2.01e-7, 2.3e-7,
2803 2.59e-7, 2.95e-7, 3.26e-7, 3.66e-7, 4.05e-7, 4.47e-7, 4.92e-7,
2804 5.34e-7, 5.84e-7, 6.24e-7, 6.67e-7, 7.14e-7, 7.26e-7, 7.54e-7,
2805 7.84e-7, 8.09e-7, 8.42e-7, 8.62e-7, 8.87e-7, 9.11e-7, 9.36e-7,
2806 9.76e-7, 1.03e-6, 1.11e-6, 1.23e-6, 1.39e-6, 1.61e-6, 1.76e-6,
2807 1.94e-6, 1.97e-6, 1.87e-6, 1.75e-6, 1.56e-6, 1.42e-6, 1.35e-6,
2808 1.32e-6, 1.29e-6, 1.29e-6, 1.29e-6, 1.3e-6, 1.32e-6, 1.33e-6,
2809 1.34e-6, 1.35e-6, 1.33e-6, 1.31e-6, 1.29e-6, 1.24e-6, 1.2e-6,
2810 1.16e-6, 1.1e-6, 1.04e-6, 9.96e-7, 9.38e-7, 8.63e-7, 7.98e-7,
2811 7.26e-7, 6.55e-7, 5.94e-7, 5.35e-7, 4.74e-7, 4.24e-7, 3.77e-7,
2812 3.33e-7, 2.96e-7, 2.63e-7, 2.34e-7, 2.08e-7, 1.85e-7, 1.67e-7,
2813 1.47e-7, 1.32e-7, 1.2e-7, 1.09e-7, 9.85e-8, 9.08e-8, 8.18e-8,
2814 7.56e-8, 6.85e-8, 6.14e-8, 5.83e-8, 5.77e-8, 5e-8, 4.32e-8, 0.
2815 };
2816
2817 static double betaa[98] = { 802., 802., 761., 722., 679., 646., 609., 562.,
2818 511., 472., 436., 406., 377., 355., 338., 319., 299., 278., 255.,
2819 233., 208., 184., 149., 107., 66., 25., -13., -49., -82., -104.,
2820 -119., -130., -139., -144., -146., -146., -147., -148., -150.,
2821 -153., -160., -169., -181., -189., -195., -200., -205., -209.,
2822 -211., -210., -210., -209., -205., -199., -190., -180., -168.,
2823 -157., -143., -126., -108., -89., -63., -32., 1., 35., 65., 95.,
2824 121., 141., 152., 161., 164., 164., 161., 155., 148., 143., 137.,
2825 133., 131., 133., 139., 150., 165., 187., 213., 248., 284., 321.,
2826 372., 449., 514., 569., 609., 642., 673., 673.
2827 };
2828
2829 static double nua[98] = { 2120., 2125., 2130., 2135., 2140., 2145., 2150.,
2830 2155., 2160., 2165., 2170., 2175., 2180., 2185., 2190., 2195.,
2831 2200., 2205., 2210., 2215., 2220., 2225., 2230., 2235., 2240.,
2832 2245., 2250., 2255., 2260., 2265., 2270., 2275., 2280., 2285.,
2833 2290., 2295., 2300., 2305., 2310., 2315., 2320., 2325., 2330.,
2834 2335., 2340., 2345., 2350., 2355., 2360., 2365., 2370., 2375.,
2835 2380., 2385., 2390., 2395., 2400., 2405., 2410., 2415., 2420.,
2836 2425., 2430., 2435., 2440., 2445., 2450., 2455., 2460., 2465.,
2837 2470., 2475., 2480., 2485., 2490., 2495., 2500., 2505., 2510.,
2838 2515., 2520., 2525., 2530., 2535., 2540., 2545., 2550., 2555.,
2839 2560., 2565., 2570., 2575., 2580., 2585., 2590., 2595., 2600., 2605.
2840 };
2841
2842 const double q_n2 = 0.79, t0 = 273.0, tr = 296.0;
2843
2844 /* Check wavenumber range... */
2845 if (nu < nua[0] || nu > nua[97])
2846 return 0;
2847
2848 /* Interpolate B and beta... */
2849 const int idx = locate_reg(nua, 98, nu);
2850 const double b = LIN(nua[idx], ba[idx], nua[idx + 1], ba[idx + 1], nu);
2851 const double beta =
2852 LIN(nua[idx], betaa[idx], nua[idx + 1], betaa[idx + 1], nu);
2853
2854 /* Compute absorption coefficient... */
2855 return 0.1 * POW2(p / P0 * t0 / t) * exp(beta * (1 / tr - 1 / t))
2856 * q_n2 * b * (q_n2 + (1 - q_n2) * (1.294 - 0.4545 * t / tr));
2857}
2858
2859/*****************************************************************************/
2860
2861double ctmo2(
2862 const double nu,
2863 const double p,
2864 const double t) {
2865
2866 static double ba[90] = { 0., .061, .074, .084, .096, .12, .162, .208, .246,
2867 .285, .314, .38, .444, .5, .571, .673, .768, .853, .966, 1.097,
2868 1.214, 1.333, 1.466, 1.591, 1.693, 1.796, 1.922, 2.037, 2.154,
2869 2.264, 2.375, 2.508, 2.671, 2.847, 3.066, 3.417, 3.828, 4.204,
2870 4.453, 4.599, 4.528, 4.284, 3.955, 3.678, 3.477, 3.346, 3.29,
2871 3.251, 3.231, 3.226, 3.212, 3.192, 3.108, 3.033, 2.911, 2.798,
2872 2.646, 2.508, 2.322, 2.13, 1.928, 1.757, 1.588, 1.417, 1.253,
2873 1.109, .99, .888, .791, .678, .587, .524, .464, .403, .357, .32,
2874 .29, .267, .242, .215, .182, .16, .146, .128, .103, .087, .081,
2875 .071, .064, 0.
2876 };
2877
2878 static double betaa[90] = { 467., 467., 400., 315., 379., 368., 475., 521.,
2879 531., 512., 442., 444., 430., 381., 335., 324., 296., 248., 215.,
2880 193., 158., 127., 101., 71., 31., -6., -26., -47., -63., -79.,
2881 -88., -88., -87., -90., -98., -99., -109., -134., -160., -167.,
2882 -164., -158., -153., -151., -156., -166., -168., -173., -170.,
2883 -161., -145., -126., -108., -84., -59., -29., 4., 41., 73., 97.,
2884 123., 159., 198., 220., 242., 256., 281., 311., 334., 319., 313.,
2885 321., 323., 310., 315., 320., 335., 361., 378., 373., 338., 319.,
2886 346., 322., 291., 290., 350., 371., 504., 504.
2887 };
2888
2889 static double nua[90] = { 1360., 1365., 1370., 1375., 1380., 1385., 1390.,
2890 1395., 1400., 1405., 1410., 1415., 1420., 1425., 1430., 1435.,
2891 1440., 1445., 1450., 1455., 1460., 1465., 1470., 1475., 1480.,
2892 1485., 1490., 1495., 1500., 1505., 1510., 1515., 1520., 1525.,
2893 1530., 1535., 1540., 1545., 1550., 1555., 1560., 1565., 1570.,
2894 1575., 1580., 1585., 1590., 1595., 1600., 1605., 1610., 1615.,
2895 1620., 1625., 1630., 1635., 1640., 1645., 1650., 1655., 1660.,
2896 1665., 1670., 1675., 1680., 1685., 1690., 1695., 1700., 1705.,
2897 1710., 1715., 1720., 1725., 1730., 1735., 1740., 1745., 1750.,
2898 1755., 1760., 1765., 1770., 1775., 1780., 1785., 1790., 1795.,
2899 1800., 1805.
2900 };
2901
2902 const double q_o2 = 0.21, t0 = 273, tr = 296;
2903
2904 /* Check wavenumber range... */
2905 if (nu < nua[0] || nu > nua[89])
2906 return 0;
2907
2908 /* Interpolate B and beta... */
2909 const int idx = locate_reg(nua, 90, nu);
2910 const double b = LIN(nua[idx], ba[idx], nua[idx + 1], ba[idx + 1], nu);
2911 const double beta =
2912 LIN(nua[idx], betaa[idx], nua[idx + 1], betaa[idx + 1], nu);
2913
2914 /* Compute absorption coefficient... */
2915 return 0.1 * POW2(p / P0 * t0 / t) * exp(beta * (1 / tr - 1 / t)) * q_o2 *
2916 b;
2917}
2918
2919/*****************************************************************************/
2920
2922 const ctl_t * ctl,
2923 atm_t * atm_dest,
2924 const atm_t * atm_src,
2925 const int init) {
2926
2927 /* Data size... */
2928 const size_t s = (size_t) atm_src->np * sizeof(double);
2929
2930 /* Copy data... */
2931 atm_dest->np = atm_src->np;
2932 memcpy(atm_dest->time, atm_src->time, s);
2933 memcpy(atm_dest->z, atm_src->z, s);
2934 memcpy(atm_dest->lon, atm_src->lon, s);
2935 memcpy(atm_dest->lat, atm_src->lat, s);
2936 memcpy(atm_dest->p, atm_src->p, s);
2937 memcpy(atm_dest->t, atm_src->t, s);
2938 for (int ig = 0; ig < ctl->ng; ig++)
2939 memcpy(atm_dest->q[ig], atm_src->q[ig], s);
2940 for (int iw = 0; iw < ctl->nw; iw++)
2941 memcpy(atm_dest->k[iw], atm_src->k[iw], s);
2942 atm_dest->clz = atm_src->clz;
2943 atm_dest->cldz = atm_src->cldz;
2944 for (int icl = 0; icl < ctl->ncl; icl++)
2945 atm_dest->clk[icl] = atm_src->clk[icl];
2946 atm_dest->sfz = atm_src->sfz;
2947 atm_dest->sfp = atm_src->sfp;
2948 atm_dest->sft = atm_src->sft;
2949 for (int isf = 0; isf < ctl->nsf; isf++)
2950 atm_dest->sfeps[isf] = atm_src->sfeps[isf];
2951
2952 /* Initialize... */
2953 if (init)
2954 for (int ip = 0; ip < atm_dest->np; ip++) {
2955 atm_dest->p[ip] = 0;
2956 atm_dest->t[ip] = 0;
2957 for (int ig = 0; ig < ctl->ng; ig++)
2958 atm_dest->q[ig][ip] = 0;
2959 for (int iw = 0; iw < ctl->nw; iw++)
2960 atm_dest->k[iw][ip] = 0;
2961 atm_dest->clz = 0;
2962 atm_dest->cldz = 0;
2963 for (int icl = 0; icl < ctl->ncl; icl++)
2964 atm_dest->clk[icl] = 0;
2965 atm_dest->sfz = 0;
2966 atm_dest->sfp = 0;
2967 atm_dest->sft = 0;
2968 for (int isf = 0; isf < ctl->nsf; isf++)
2969 atm_dest->sfeps[isf] = 1;
2970 }
2971}
2972
2973/*****************************************************************************/
2974
2976 const ctl_t * ctl,
2977 obs_t * obs_dest,
2978 const obs_t * obs_src,
2979 const int init) {
2980
2981 /* Data size... */
2982 const size_t s = (size_t) obs_src->nr * sizeof(double);
2983
2984 /* Copy data... */
2985 obs_dest->nr = obs_src->nr;
2986 memcpy(obs_dest->time, obs_src->time, s);
2987 memcpy(obs_dest->obsz, obs_src->obsz, s);
2988 memcpy(obs_dest->obslon, obs_src->obslon, s);
2989 memcpy(obs_dest->obslat, obs_src->obslat, s);
2990 memcpy(obs_dest->vpz, obs_src->vpz, s);
2991 memcpy(obs_dest->vplon, obs_src->vplon, s);
2992 memcpy(obs_dest->vplat, obs_src->vplat, s);
2993 memcpy(obs_dest->tpz, obs_src->tpz, s);
2994 memcpy(obs_dest->tplon, obs_src->tplon, s);
2995 memcpy(obs_dest->tplat, obs_src->tplat, s);
2996 for (int id = 0; id < ctl->nd; id++)
2997 memcpy(obs_dest->rad[id], obs_src->rad[id], s);
2998 for (int id = 0; id < ctl->nd; id++)
2999 memcpy(obs_dest->tau[id], obs_src->tau[id], s);
3000
3001 /* Initialize... */
3002 if (init)
3003 for (int id = 0; id < ctl->nd; id++)
3004 for (int ir = 0; ir < obs_dest->nr; ir++)
3005 if (isfinite(obs_dest->rad[id][ir])) {
3006 obs_dest->rad[id][ir] = 0;
3007 obs_dest->tau[id][ir] = 0;
3008 }
3009}
3010
3011/*****************************************************************************/
3012
3014 const ctl_t * ctl,
3015 const char *emitter) {
3016
3017 for (int ig = 0; ig < ctl->ng; ig++)
3018 if (strcasecmp(ctl->emitter[ig], emitter) == 0)
3019 return ig;
3020
3021 return -1;
3022}
3023
3024/*****************************************************************************/
3025
3027 const ctl_t * ctl,
3028 atm_t * atm,
3029 obs_t * obs) {
3030
3031 int *mask;
3032
3033 /* Allocate... */
3034 ALLOC(mask, int,
3035 ND * NR);
3036
3037 /* Save observation mask... */
3038 for (int id = 0; id < ctl->nd; id++)
3039 for (int ir = 0; ir < obs->nr; ir++)
3040 mask[id * NR + ir] = !isfinite(obs->rad[id][ir]);
3041
3042 /* Hydrostatic equilibrium... */
3043 hydrostatic(ctl, atm);
3044
3045 /* CGA or EGA forward model... */
3046 if (ctl->formod == 0 || ctl->formod == 1)
3047 for (int ir = 0; ir < obs->nr; ir++)
3048 formod_pencil(ctl, atm, obs, ir);
3049
3050 /* Call RFM... */
3051 else if (ctl->formod == 2)
3052 formod_rfm(ctl, atm, obs);
3053
3054 /* Apply field-of-view convolution... */
3055 formod_fov(ctl, obs);
3056
3057 /* Convert radiance to brightness temperature... */
3058 if (ctl->write_bbt)
3059 for (int id = 0; id < ctl->nd; id++)
3060 for (int ir = 0; ir < obs->nr; ir++)
3061 obs->rad[id][ir] = BRIGHT(obs->rad[id][ir], ctl->nu[id]);
3062
3063 /* Apply observation mask... */
3064 for (int id = 0; id < ctl->nd; id++)
3065 for (int ir = 0; ir < obs->nr; ir++)
3066 if (mask[id * NR + ir])
3067 obs->rad[id][ir] = NAN;
3068
3069 /* Free... */
3070 free(mask);
3071}
3072
3073/*****************************************************************************/
3074
3076 const ctl_t * ctl,
3077 const los_t * los,
3078 const int ip,
3079 double *beta) {
3080
3081 static int ig_co2 = -999, ig_h2o = -999;
3082
3083 /* Extinction... */
3084 for (int id = 0; id < ctl->nd; id++)
3085 beta[id] = los->k[ip][id];
3086
3087 /* CO2 continuum... */
3088 if (ctl->ctm_co2) {
3089 if (ig_co2 == -999)
3090 ig_co2 = find_emitter(ctl, "CO2");
3091 if (ig_co2 >= 0)
3092 for (int id = 0; id < ctl->nd; id++)
3093 beta[id] += ctmco2(ctl->nu[id], los->p[ip], los->t[ip],
3094 los->u[ip][ig_co2]) / los->ds[ip];
3095 }
3096
3097 /* H2O continuum... */
3098 if (ctl->ctm_h2o) {
3099 if (ig_h2o == -999)
3100 ig_h2o = find_emitter(ctl, "H2O");
3101 if (ig_h2o >= 0)
3102 for (int id = 0; id < ctl->nd; id++)
3103 beta[id] += ctmh2o(ctl->nu[id], los->p[ip], los->t[ip],
3104 los->q[ip][ig_h2o], los->u[ip][ig_h2o])
3105 / los->ds[ip];
3106 }
3107
3108 /* N2 continuum... */
3109 if (ctl->ctm_n2)
3110 for (int id = 0; id < ctl->nd; id++)
3111 beta[id] += ctmn2(ctl->nu[id], los->p[ip], los->t[ip]);
3112
3113 /* O2 continuum... */
3114 if (ctl->ctm_o2)
3115 for (int id = 0; id < ctl->nd; id++)
3116 beta[id] += ctmo2(ctl->nu[id], los->p[ip], los->t[ip]);
3117}
3118
3119/*****************************************************************************/
3120
3122 const ctl_t * ctl,
3123 obs_t * obs) {
3124
3125 static double dz[NSHAPE], w[NSHAPE];
3126
3127 static int init = 0, n;
3128
3129 obs_t *obs2;
3130
3131 double rad[ND][NR], tau[ND][NR], z[NR];
3132
3133 /* Do not take into account FOV... */
3134 if (ctl->fov[0] == '-')
3135 return;
3136
3137 /* Initialize FOV data... */
3138 if (!init) {
3139 init = 1;
3140 read_shape(ctl->fov, dz, w, &n);
3141 }
3142
3143 /* Allocate... */
3144 ALLOC(obs2, obs_t, 1);
3145
3146 /* Copy observation data... */
3147 copy_obs(ctl, obs2, obs, 0);
3148
3149 /* Loop over ray paths... */
3150 for (int ir = 0; ir < obs->nr; ir++) {
3151
3152 /* Get radiance and transmittance profiles... */
3153 int nz = 0;
3154 for (int ir2 = MAX(ir - NFOV, 0);
3155 ir2 < MIN(ir + 1 + NFOV, obs->nr); ir2++)
3156 if (obs->time[ir2] == obs->time[ir]) {
3157 z[nz] = obs2->vpz[ir2];
3158 for (int id = 0; id < ctl->nd; id++) {
3159 rad[id][nz] = obs2->rad[id][ir2];
3160 tau[id][nz] = obs2->tau[id][ir2];
3161 }
3162 nz++;
3163 }
3164 if (nz < 2)
3165 ERRMSG("Cannot apply FOV convolution!");
3166
3167 /* Convolute profiles with FOV... */
3168 double wsum = 0;
3169 for (int id = 0; id < ctl->nd; id++) {
3170 obs->rad[id][ir] = 0;
3171 obs->tau[id][ir] = 0;
3172 }
3173 for (int i = 0; i < n; i++) {
3174 double zfov = obs->vpz[ir] + dz[i];
3175 int idx = locate_irr(z, nz, zfov);
3176 for (int id = 0; id < ctl->nd; id++) {
3177 obs->rad[id][ir] += w[i]
3178 * LIN(z[idx], rad[id][idx], z[idx + 1], rad[id][idx + 1], zfov);
3179 obs->tau[id][ir] += w[i]
3180 * LIN(z[idx], tau[id][idx], z[idx + 1], tau[id][idx + 1], zfov);
3181 }
3182 wsum += w[i];
3183 }
3184 for (int id = 0; id < ctl->nd; id++) {
3185 obs->rad[id][ir] /= wsum;
3186 obs->tau[id][ir] /= wsum;
3187 }
3188 }
3189
3190 /* Free... */
3191 free(obs2);
3192}
3193
3194/*****************************************************************************/
3195
3197 const ctl_t * ctl,
3198 const atm_t * atm,
3199 obs_t * obs,
3200 const int ir) {
3201
3202 static tbl_t *tbl;
3203
3204 static int init = 0;
3205
3206 los_t *los;
3207
3208 double beta_ctm[ND], rad[ND], tau[ND], tau_refl[ND],
3209 tau_path[ND][NG], tau_gas[ND], x0[3], x1[3];
3210
3211 /* Initialize look-up tables... */
3212 if (!init) {
3213 init = 1;
3214 ALLOC(tbl, tbl_t, 1);
3215 read_tbl(ctl, tbl);
3216 init_srcfunc(ctl, tbl);
3217 }
3218
3219 /* Allocate... */
3220 ALLOC(los, los_t, 1);
3221
3222 /* Initialize... */
3223 for (int id = 0; id < ctl->nd; id++) {
3224 rad[id] = 0;
3225 tau[id] = 1;
3226 for (int ig = 0; ig < ctl->ng; ig++)
3227 tau_path[id][ig] = 1;
3228 }
3229
3230 /* Raytracing... */
3231 raytrace(ctl, atm, obs, los, ir);
3232
3233 /* Loop over LOS points... */
3234 for (int ip = 0; ip < los->np; ip++) {
3235
3236 /* Get trace gas transmittance... */
3237 if (ctl->formod == 0)
3238 intpol_tbl_cga(ctl, tbl, los, ip, tau_path, tau_gas);
3239 else
3240 intpol_tbl_ega(ctl, tbl, los, ip, tau_path, tau_gas);
3241
3242 /* Get continuum absorption... */
3243 formod_continua(ctl, los, ip, beta_ctm);
3244
3245 /* Compute Planck function... */
3246 formod_srcfunc(ctl, tbl, los->t[ip], los->src[ip]);
3247
3248 /* Loop over channels... */
3249 for (int id = 0; id < ctl->nd; id++)
3250 if (tau_gas[id] > 0) {
3251
3252 /* Get segment emissivity... */
3253 los->eps[ip][id] = 1 - tau_gas[id] * exp(-beta_ctm[id] * los->ds[ip]);
3254
3255 /* Compute radiance... */
3256 rad[id] += los->src[ip][id] * los->eps[ip][id] * tau[id];
3257
3258 /* Compute path transmittance... */
3259 tau[id] *= (1 - los->eps[ip][id]);
3260 }
3261 }
3262
3263 /* Check whether LOS hit the ground... */
3264 if (ctl->sftype >= 1 && los->sft > 0) {
3265
3266 /* Add surface emissions... */
3267 double src_sf[ND];
3268 formod_srcfunc(ctl, tbl, los->sft, src_sf);
3269 for (int id = 0; id < ctl->nd; id++)
3270 rad[id] += los->sfeps[id] * src_sf[id] * tau[id];
3271
3272 /* Check reflectivity... */
3273 int refl = 0;
3274 if (ctl->sftype >= 2)
3275 for (int id = 0; id < ctl->nd; id++)
3276 if (los->sfeps[id] < 1) {
3277 refl = 1;
3278 break;
3279 }
3280
3281 /* Calculate reflection... */
3282 if (refl) {
3283
3284 /* Initialize... */
3285 for (int id = 0; id < ctl->nd; id++)
3286 tau_refl[id] = 1;
3287
3288 /* Add down-welling radiance... */
3289 for (int ip = los->np - 1; ip >= 0; ip--)
3290 for (int id = 0; id < ctl->nd; id++) {
3291 rad[id] += los->src[ip][id] * los->eps[ip][id] * tau_refl[id]
3292 * tau[id] * (1 - los->sfeps[id]);
3293 tau_refl[id] *= (1 - los->eps[ip][id]);
3294 }
3295
3296 /* Add solar term... */
3297 if (ctl->sftype >= 3) {
3298
3299 /* Get solar zenith angle... */
3300 double sza2;
3301 if (ctl->sfsza < 0)
3302 sza2 =
3303 sza(obs->time[ir], los->lon[los->np - 1], los->lat[los->np - 1]);
3304 else
3305 sza2 = ctl->sfsza;
3306
3307 /* Check solar zenith angle... */
3308 if (sza2 < 89.999) {
3309
3310 /* Get angle of incidence... */
3311 geo2cart(los->z[los->np - 1], los->lon[los->np - 1],
3312 los->lat[los->np - 1], x0);
3313 geo2cart(los->z[0], los->lon[0], los->lat[0], x1);
3314 for (int i = 0; i < 3; i++)
3315 x1[i] -= x0[i];
3316 const double cosa = DOTP(x0, x1) / NORM(x0) / NORM(x1);
3317
3318 /* Get ratio of SZA and incident radiation... */
3319 const double rcos = cosa / cos(DEG2RAD(sza2));
3320
3321 /* Add solar radiation... */
3322 for (int id = 0; id < ctl->nd; id++)
3323 rad[id] += 6.764e-5 / (2. * M_PI) * PLANCK(TSUN, ctl->nu[id])
3324 * tau_refl[id] * (1 - los->sfeps[id]) * tau[id] * rcos;
3325 }
3326 }
3327 }
3328 }
3329
3330 /* Copy results... */
3331 for (int id = 0; id < ctl->nd; id++) {
3332 obs->rad[id][ir] = rad[id];
3333 obs->tau[id][ir] = tau[id];
3334 }
3335
3336 /* Free... */
3337 free(los);
3338}
3339
3340/*****************************************************************************/
3341
3343 const ctl_t * ctl,
3344 const atm_t * atm,
3345 obs_t * obs) {
3346
3347 los_t *los;
3348
3349 FILE *out;
3350
3351 char cmd[2 * LEN], filename[2 * LEN],
3352 rfmflg[LEN] = { "RAD TRA MIX LIN SFC" };
3353
3354 double f[NSHAPE], nu[NSHAPE], nu0, nu1, obsz = -999, tsurf,
3355 xd[3], xo[3], xv[3], z[NR], zmin, zmax;
3356
3357 int n, nadir = 0;
3358
3359 /* Allocate... */
3360 ALLOC(los, los_t, 1);
3361
3362 /* Check observer positions... */
3363 for (int ir = 1; ir < obs->nr; ir++)
3364 if (obs->obsz[ir] != obs->obsz[0]
3365 || obs->obslon[ir] != obs->obslon[0]
3366 || obs->obslat[ir] != obs->obslat[0])
3367 ERRMSG("RFM interface requires identical observer positions!");
3368
3369 /* Check extinction data... */
3370 for (int iw = 0; iw < ctl->nw; iw++)
3371 for (int ip = 0; ip < atm->np; ip++)
3372 if (atm->k[iw][ip] != 0)
3373 ERRMSG("RFM interface cannot handle extinction data!");
3374
3375 /* Get altitude range of atmospheric data... */
3376 gsl_stats_minmax(&zmin, &zmax, atm->z, 1, (size_t) atm->np);
3377
3378 /* Observer within atmosphere? */
3379 if (obs->obsz[0] >= zmin && obs->obsz[0] <= zmax) {
3380 obsz = obs->obsz[0];
3381 strcat(rfmflg, " OBS");
3382 }
3383
3384 /* Determine tangent altitude or air mass factor... */
3385 for (int ir = 0; ir < obs->nr; ir++) {
3386
3387 /* Raytracing... */
3388 raytrace(ctl, atm, obs, los, ir);
3389
3390 /* Nadir? */
3391 if (obs->tpz[ir] <= zmin) {
3392 geo2cart(obs->obsz[ir], obs->obslon[ir], obs->obslat[ir], xo);
3393 geo2cart(obs->vpz[ir], obs->vplon[ir], obs->vplat[ir], xv);
3394 for (int i = 0; i < 3; i++)
3395 xd[i] = xo[i] - xv[i];
3396 z[ir] = NORM(xo) * NORM(xd) / DOTP(xo, xd);
3397 nadir++;
3398 } else
3399 z[ir] = obs->tpz[ir];
3400 }
3401 if (nadir > 0 && nadir < obs->nr)
3402 ERRMSG("Limb and nadir not simultaneously possible!");
3403
3404 /* Nadir? */
3405 if (nadir)
3406 strcat(rfmflg, " NAD");
3407
3408 /* Get surface temperature... */
3409 tsurf = atm->t[gsl_stats_min_index(atm->z, 1, (size_t) atm->np)];
3410
3411 /* Refraction? */
3412 if (!nadir && !ctl->refrac)
3413 strcat(rfmflg, " GEO");
3414
3415 /* Continua? */
3416 if (ctl->ctm_co2 || ctl->ctm_h2o || ctl->ctm_n2 || ctl->ctm_o2)
3417 strcat(rfmflg, " CTM");
3418
3419 /* Write atmospheric data file... */
3420 write_atm_rfm("rfm.atm", ctl, atm);
3421
3422 /* Loop over channels... */
3423 for (int id = 0; id < ctl->nd; id++) {
3424
3425 /* Read filter function... */
3426 sprintf(filename, "%s_%.4f.filt", ctl->tblbase, ctl->nu[id]);
3427 read_shape(filename, nu, f, &n);
3428
3429 /* Set spectral range... */
3430 nu0 = nu[0];
3431 nu1 = nu[n - 1];
3432
3433 /* Create RFM driver file... */
3434 if (!(out = fopen("rfm.drv", "w")))
3435 ERRMSG("Cannot create file!");
3436 fprintf(out, "*HDR\nRFM call by JURASSIC.\n");
3437 fprintf(out, "*FLG\n%s\n", rfmflg);
3438 fprintf(out, "*SPC\n%.4f %.4f 0.0005\n", nu0, nu1);
3439 fprintf(out, "*GAS\n");
3440 for (int ig = 0; ig < ctl->ng; ig++)
3441 fprintf(out, "%s\n", ctl->emitter[ig]);
3442 fprintf(out, "*ATM\nrfm.atm\n");
3443 fprintf(out, "*TAN\n");
3444 for (int ir = 0; ir < obs->nr; ir++)
3445 fprintf(out, "%g\n", z[ir]);
3446 fprintf(out, "*SFC\n%g 1.0\n", tsurf);
3447 if (obsz >= 0)
3448 fprintf(out, "*OBS\n%g\n", obsz);
3449 fprintf(out, "*HIT\n%s\n", ctl->rfmhit);
3450 fprintf(out, "*XSC\n");
3451 for (int ig = 0; ig < ctl->ng; ig++)
3452 if (ctl->rfmxsc[ig][0] != '-')
3453 fprintf(out, "%s\n", ctl->rfmxsc[ig]);
3454 fprintf(out, "*END\n");
3455 fclose(out);
3456
3457 /* Remove temporary files... */
3458 if (system("rm -f rfm.runlog rad_*.asc tra_*.asc"))
3459 ERRMSG("Cannot remove temporary files!");
3460
3461 /* Call RFM... */
3462 sprintf(cmd, "echo | %s", ctl->rfmbin);
3463 if (system(cmd))
3464 ERRMSG("Error while calling RFM!");
3465
3466 /* Read data... */
3467 for (int ir = 0; ir < obs->nr; ir++) {
3468 obs->rad[id][ir] = read_obs_rfm("rad", z[ir], nu, f, n) * 1e-5;
3469 obs->tau[id][ir] = read_obs_rfm("tra", z[ir], nu, f, n);
3470 }
3471 }
3472
3473 /* Remove temporary files... */
3474 if (system("rm -f rfm.drv rfm.atm rfm.runlog rad_*.asc tra_*.asc"))
3475 ERRMSG("Error while removing temporary files!");
3476
3477 /* Free... */
3478 free(los);
3479}
3480
3481/*****************************************************************************/
3482
3484 const ctl_t * ctl,
3485 const tbl_t * tbl,
3486 const double t,
3487 double *src) {
3488
3489 /* Determine index in temperature array... */
3490 const int it = locate_reg(tbl->st, TBLNS, t);
3491
3492 /* Interpolate Planck function value... */
3493 for (int id = 0; id < ctl->nd; id++)
3494 src[id] = LIN(tbl->st[it], tbl->sr[it][id],
3495 tbl->st[it + 1], tbl->sr[it + 1][id], t);
3496}
3497
3498/*****************************************************************************/
3499
3501 const double z,
3502 const double lon,
3503 const double lat,
3504 double *x) {
3505
3506 const double radius = z + RE;
3507
3508 const double latrad = lat / 180. * M_PI;
3509 const double lonrad = lon / 180. * M_PI;
3510
3511 const double coslat = cos(latrad);
3512
3513 x[0] = radius * coslat * cos(lonrad);
3514 x[1] = radius * coslat * sin(lonrad);
3515 x[2] = radius * sin(latrad);
3516}
3517
3518/*****************************************************************************/
3519
3521 const ctl_t * ctl,
3522 atm_t * atm) {
3523
3524 const double mmair = 28.96456e-3, mmh2o = 18.0153e-3;
3525
3526 const int ipts = 20;
3527
3528 static int ig_h2o = -999;
3529
3530 double dzmin = 1e99, e = 0;
3531
3532 int ipref = 0;
3533
3534 /* Check reference height... */
3535 if (ctl->hydz < 0)
3536 return;
3537
3538 /* Determine emitter index of H2O... */
3539 if (ig_h2o == -999)
3540 ig_h2o = find_emitter(ctl, "H2O");
3541
3542 /* Find air parcel next to reference height... */
3543 for (int ip = 0; ip < atm->np; ip++)
3544 if (fabs(atm->z[ip] - ctl->hydz) < dzmin) {
3545 dzmin = fabs(atm->z[ip] - ctl->hydz);
3546 ipref = ip;
3547 }
3548
3549 /* Upper part of profile... */
3550 for (int ip = ipref + 1; ip < atm->np; ip++) {
3551 double mean = 0;
3552 for (int i = 0; i < ipts; i++) {
3553 if (ig_h2o >= 0)
3554 e = LIN(0.0, atm->q[ig_h2o][ip - 1],
3555 ipts - 1.0, atm->q[ig_h2o][ip], (double) i);
3556 mean += (e * mmh2o + (1 - e) * mmair)
3557 * G0 / RI
3558 / LIN(0.0, atm->t[ip - 1], ipts - 1.0, atm->t[ip], (double) i) / ipts;
3559 }
3560
3561 /* Compute p(z,T)... */
3562 atm->p[ip] =
3563 exp(log(atm->p[ip - 1]) - mean * 1000 * (atm->z[ip] - atm->z[ip - 1]));
3564 }
3565
3566 /* Lower part of profile... */
3567 for (int ip = ipref - 1; ip >= 0; ip--) {
3568 double mean = 0;
3569 for (int i = 0; i < ipts; i++) {
3570 if (ig_h2o >= 0)
3571 e = LIN(0.0, atm->q[ig_h2o][ip + 1],
3572 ipts - 1.0, atm->q[ig_h2o][ip], (double) i);
3573 mean += (e * mmh2o + (1 - e) * mmair)
3574 * G0 / RI
3575 / LIN(0.0, atm->t[ip + 1], ipts - 1.0, atm->t[ip], (double) i) / ipts;
3576 }
3577
3578 /* Compute p(z,T)... */
3579 atm->p[ip] =
3580 exp(log(atm->p[ip + 1]) - mean * 1000 * (atm->z[ip] - atm->z[ip + 1]));
3581 }
3582}
3583
3584/*****************************************************************************/
3585
3587 const ctl_t * ctl,
3588 const int idx,
3589 char *quantity) {
3590
3591 if (idx == IDXP)
3592 sprintf(quantity, "PRESSURE");
3593
3594 if (idx == IDXT)
3595 sprintf(quantity, "TEMPERATURE");
3596
3597 for (int ig = 0; ig < ctl->ng; ig++)
3598 if (idx == IDXQ(ig))
3599 sprintf(quantity, "%s", ctl->emitter[ig]);
3600
3601 for (int iw = 0; iw < ctl->nw; iw++)
3602 if (idx == IDXK(iw))
3603 sprintf(quantity, "EXTINCT_WINDOW_%d", iw);
3604
3605 if (idx == IDXCLZ)
3606 sprintf(quantity, "CLOUD_HEIGHT");
3607
3608 if (idx == IDXCLDZ)
3609 sprintf(quantity, "CLOUD_DEPTH");
3610
3611 for (int icl = 0; icl < ctl->ncl; icl++)
3612 if (idx == IDXCLK(icl))
3613 sprintf(quantity, "CLOUD_EXTINCT_%.4f", ctl->clnu[icl]);
3614
3615 if (idx == IDXSFZ)
3616 sprintf(quantity, "SURFACE_HEIGHT");
3617
3618 if (idx == IDXSFP)
3619 sprintf(quantity, "SURFACE_PRESSURE");
3620
3621 if (idx == IDXSFT)
3622 sprintf(quantity, "SURFACE_TEMPERATURE");
3623
3624 for (int isf = 0; isf < ctl->nsf; isf++)
3625 if (idx == IDXSFEPS(isf))
3626 sprintf(quantity, "SURFACE_EMISSIVITY_%.4f", ctl->sfnu[isf]);
3627}
3628
3629/*****************************************************************************/
3630
3632 const ctl_t * ctl,
3633 tbl_t * tbl) {
3634
3635 char filename[2 * LEN];
3636
3637 double f[NSHAPE], nu[NSHAPE];
3638
3639 int n;
3640
3641 /* Write info... */
3642 LOG(1, "Initialize source function table...");
3643 LOG(2, "Number of data points: %d", TBLNS);
3644
3645 /* Loop over channels... */
3646 for (int id = 0; id < ctl->nd; id++) {
3647
3648 /* Read filter function... */
3649 sprintf(filename, "%s_%.4f.filt", ctl->tblbase, ctl->nu[id]);
3650 read_shape(filename, nu, f, &n);
3651
3652 /* Get minimum grid spacing... */
3653 double dnu = 1.0;
3654 for (int i = 1; i < n; i++)
3655 dnu = MIN(dnu, nu[i] - nu[i - 1]);
3656
3657 /* Compute source function table... */
3658#pragma omp parallel for default(none) shared(ctl,tbl,id,nu,f,n,dnu)
3659 for (int it = 0; it < TBLNS; it++) {
3660
3661 /* Set temperature... */
3662 tbl->st[it] = LIN(0.0, TMIN, TBLNS - 1.0, TMAX, (double) it);
3663
3664 /* Integrate Planck function... */
3665 double fsum = tbl->sr[it][id] = 0;
3666 for (double fnu = nu[0]; fnu <= nu[n - 1]; fnu += dnu) {
3667 int i = locate_irr(nu, n, fnu);
3668 double ff = LIN(nu[i], f[i], nu[i + 1], f[i + 1], fnu);
3669 fsum += ff;
3670 tbl->sr[it][id] += ff * PLANCK(tbl->st[it], fnu);
3671 }
3672 tbl->sr[it][id] /= fsum;
3673 }
3674
3675 /* Write info... */
3676 LOG(2,
3677 "channel= %.4f cm^-1 | T= %g ... %g K | B= %g ... %g W/(m^2 sr cm^-1)",
3678 ctl->nu[id], tbl->st[0], tbl->st[TBLNS - 1], tbl->sr[0][id],
3679 tbl->sr[TBLNS - 1][id]);
3680 }
3681}
3682
3683/*****************************************************************************/
3684
3686 const ctl_t * ctl,
3687 const atm_t * atm,
3688 const double z,
3689 double *p,
3690 double *t,
3691 double *q,
3692 double *k) {
3693
3694 /* Get array index... */
3695 const int ip = locate_irr(atm->z, atm->np, z);
3696
3697 /* Interpolate... */
3698 *p = LOGY(atm->z[ip], atm->p[ip], atm->z[ip + 1], atm->p[ip + 1], z);
3699 *t = LIN(atm->z[ip], atm->t[ip], atm->z[ip + 1], atm->t[ip + 1], z);
3700 for (int ig = 0; ig < ctl->ng; ig++)
3701 q[ig] =
3702 LIN(atm->z[ip], atm->q[ig][ip], atm->z[ip + 1], atm->q[ig][ip + 1], z);
3703 for (int iw = 0; iw < ctl->nw; iw++)
3704 k[iw] =
3705 LIN(atm->z[ip], atm->k[iw][ip], atm->z[ip + 1], atm->k[iw][ip + 1], z);
3706}
3707
3708/*****************************************************************************/
3709
3711 const ctl_t * ctl,
3712 const tbl_t * tbl,
3713 const los_t * los,
3714 const int ip,
3715 double tau_path[ND][NG],
3716 double tau_seg[ND]) {
3717
3718 double eps;
3719
3720 /* Loop over channels... */
3721 for (int id = 0; id < ctl->nd; id++) {
3722
3723 /* Initialize... */
3724 tau_seg[id] = 1;
3725
3726 /* Loop over emitters.... */
3727 for (int ig = 0; ig < ctl->ng; ig++) {
3728
3729 /* Check size of table (pressure)... */
3730 if (tbl->np[id][ig] < 30)
3731 eps = 0;
3732
3733 /* Check transmittance... */
3734 else if (tau_path[id][ig] < 1e-9)
3735 eps = 1;
3736
3737 /* Interpolate... */
3738 else {
3739
3740 /* Determine pressure and temperature indices... */
3741 int ipr = locate_irr(tbl->p[id][ig], tbl->np[id][ig],
3742 los->cgp[ip][ig]);
3743 int it0 = locate_reg(tbl->t[id][ig][ipr], tbl->nt[id][ig][ipr],
3744 los->cgt[ip][ig]);
3745 int it1 =
3746 locate_reg(tbl->t[id][ig][ipr + 1], tbl->nt[id][ig][ipr + 1],
3747 los->cgt[ip][ig]);
3748
3749 /* Check size of table (temperature and column density)... */
3750 if (tbl->nt[id][ig][ipr] < 2 || tbl->nt[id][ig][ipr + 1] < 2
3751 || tbl->nu[id][ig][ipr][it0] < 2
3752 || tbl->nu[id][ig][ipr][it0 + 1] < 2
3753 || tbl->nu[id][ig][ipr + 1][it1] < 2
3754 || tbl->nu[id][ig][ipr + 1][it1 + 1] < 2)
3755 eps = 0;
3756
3757 else {
3758
3759 /* Get emissivities of extended path... */
3760 double eps00
3761 = intpol_tbl_eps(tbl, ig, id, ipr, it0, los->cgu[ip][ig]);
3762 double eps01 =
3763 intpol_tbl_eps(tbl, ig, id, ipr, it0 + 1, los->cgu[ip][ig]);
3764 double eps10 =
3765 intpol_tbl_eps(tbl, ig, id, ipr + 1, it1, los->cgu[ip][ig]);
3766 double eps11 =
3767 intpol_tbl_eps(tbl, ig, id, ipr + 1, it1 + 1, los->cgu[ip][ig]);
3768
3769 /* Interpolate with respect to temperature... */
3770 eps00 = LIN(tbl->t[id][ig][ipr][it0], eps00,
3771 tbl->t[id][ig][ipr][it0 + 1], eps01, los->cgt[ip][ig]);
3772 eps11 = LIN(tbl->t[id][ig][ipr + 1][it1], eps10,
3773 tbl->t[id][ig][ipr + 1][it1 + 1],
3774 eps11, los->cgt[ip][ig]);
3775
3776 /* Interpolate with respect to pressure... */
3777 eps00 = LOGX(tbl->p[id][ig][ipr], eps00,
3778 tbl->p[id][ig][ipr + 1], eps11, los->cgp[ip][ig]);
3779
3780 /* Check emssivity range... */
3781 eps00 = MAX(MIN(eps00, 1), 0);
3782
3783 /* Determine segment emissivity... */
3784 eps = 1 - (1 - eps00) / tau_path[id][ig];
3785 }
3786 }
3787
3788 /* Get transmittance of extended path... */
3789 tau_path[id][ig] *= (1 - eps);
3790
3791 /* Get segment transmittance... */
3792 tau_seg[id] *= (1 - eps);
3793 }
3794 }
3795}
3796
3797/*****************************************************************************/
3798
3800 const ctl_t * ctl,
3801 const tbl_t * tbl,
3802 const los_t * los,
3803 const int ip,
3804 double tau_path[ND][NG],
3805 double tau_seg[ND]) {
3806
3807 double eps, u;
3808
3809 /* Loop over channels... */
3810 for (int id = 0; id < ctl->nd; id++) {
3811
3812 /* Initialize... */
3813 tau_seg[id] = 1;
3814
3815 /* Loop over emitters.... */
3816 for (int ig = 0; ig < ctl->ng; ig++) {
3817
3818 /* Check size of table (pressure)... */
3819 if (tbl->np[id][ig] < 30)
3820 eps = 0;
3821
3822 /* Check transmittance... */
3823 else if (tau_path[id][ig] < 1e-9)
3824 eps = 1;
3825
3826 /* Interpolate... */
3827 else {
3828
3829 /* Determine pressure and temperature indices... */
3830 int ipr = locate_irr(tbl->p[id][ig], tbl->np[id][ig], los->p[ip]);
3831 int it0 =
3832 locate_reg(tbl->t[id][ig][ipr], tbl->nt[id][ig][ipr], los->t[ip]);
3833 int it1 =
3834 locate_reg(tbl->t[id][ig][ipr + 1], tbl->nt[id][ig][ipr + 1],
3835 los->t[ip]);
3836
3837 /* Check size of table (temperature and column density)... */
3838 if (tbl->nt[id][ig][ipr] < 2 || tbl->nt[id][ig][ipr + 1] < 2
3839 || tbl->nu[id][ig][ipr][it0] < 2
3840 || tbl->nu[id][ig][ipr][it0 + 1] < 2
3841 || tbl->nu[id][ig][ipr + 1][it1] < 2
3842 || tbl->nu[id][ig][ipr + 1][it1 + 1] < 2)
3843 eps = 0;
3844
3845 else {
3846
3847 /* Get emissivities of extended path... */
3848 u = intpol_tbl_u(tbl, ig, id, ipr, it0, 1 - tau_path[id][ig]);
3849 double eps00
3850 = intpol_tbl_eps(tbl, ig, id, ipr, it0, u + los->u[ip][ig]);
3851
3852 u = intpol_tbl_u(tbl, ig, id, ipr, it0 + 1, 1 - tau_path[id][ig]);
3853 double eps01 =
3854 intpol_tbl_eps(tbl, ig, id, ipr, it0 + 1, u + los->u[ip][ig]);
3855
3856 u = intpol_tbl_u(tbl, ig, id, ipr + 1, it1, 1 - tau_path[id][ig]);
3857 double eps10 =
3858 intpol_tbl_eps(tbl, ig, id, ipr + 1, it1, u + los->u[ip][ig]);
3859
3860 u =
3861 intpol_tbl_u(tbl, ig, id, ipr + 1, it1 + 1, 1 - tau_path[id][ig]);
3862 double eps11 =
3863 intpol_tbl_eps(tbl, ig, id, ipr + 1, it1 + 1, u + los->u[ip][ig]);
3864
3865 /* Interpolate with respect to temperature... */
3866 eps00 = LIN(tbl->t[id][ig][ipr][it0], eps00,
3867 tbl->t[id][ig][ipr][it0 + 1], eps01, los->t[ip]);
3868 eps11 = LIN(tbl->t[id][ig][ipr + 1][it1], eps10,
3869 tbl->t[id][ig][ipr + 1][it1 + 1], eps11, los->t[ip]);
3870
3871 /* Interpolate with respect to pressure... */
3872 eps00 = LIN(tbl->p[id][ig][ipr], eps00,
3873 tbl->p[id][ig][ipr + 1], eps11, los->p[ip]);
3874
3875 /* Check emssivity range... */
3876 eps00 = MAX(MIN(eps00, 1), 0);
3877
3878 /* Determine segment emissivity... */
3879 eps = 1 - (1 - eps00) / tau_path[id][ig];
3880 }
3881 }
3882
3883 /* Get transmittance of extended path... */
3884 tau_path[id][ig] *= (1 - eps);
3885
3886 /* Get segment transmittance... */
3887 tau_seg[id] *= (1 - eps);
3888 }
3889 }
3890}
3891
3892/*****************************************************************************/
3893
3895 const tbl_t * tbl,
3896 const int ig,
3897 const int id,
3898 const int ip,
3899 const int it,
3900 const double u) {
3901
3902 /* Lower boundary... */
3903 if (u < tbl->u[id][ig][ip][it][0])
3904 return LIN(0, 0, tbl->u[id][ig][ip][it][0], tbl->eps[id][ig][ip][it][0],
3905 u);
3906
3907 /* Upper boundary... */
3908 else if (u > tbl->u[id][ig][ip][it][tbl->nu[id][ig][ip][it] - 1]) {
3909 double a =
3910 log(1 -
3911 tbl->eps[id][ig][ip][it][tbl->nu[id][ig][ip][it] -
3912 1]) /
3913 tbl->u[id][ig][ip][it][tbl->nu[id][ig][ip][it] - 1];
3914 return 1 - exp(a * u);
3915 }
3916
3917 /* Interpolation... */
3918 else {
3919
3920 /* Get index... */
3921 int idx = locate_tbl(tbl->u[id][ig][ip][it], tbl->nu[id][ig][ip][it], u);
3922
3923 /* Interpolate... */
3924 return
3925 LIN(tbl->u[id][ig][ip][it][idx], tbl->eps[id][ig][ip][it][idx],
3926 tbl->u[id][ig][ip][it][idx + 1], tbl->eps[id][ig][ip][it][idx + 1],
3927 u);
3928 }
3929}
3930
3931/*****************************************************************************/
3932
3934 const tbl_t * tbl,
3935 const int ig,
3936 const int id,
3937 const int ip,
3938 const int it,
3939 const double eps) {
3940
3941 /* Lower boundary... */
3942 if (eps < tbl->eps[id][ig][ip][it][0])
3943 return LIN(0, 0, tbl->eps[id][ig][ip][it][0], tbl->u[id][ig][ip][it][0],
3944 eps);
3945
3946 /* Upper boundary... */
3947 else if (eps > tbl->eps[id][ig][ip][it][tbl->nu[id][ig][ip][it] - 1]) {
3948 double a =
3949 log(1 -
3950 tbl->eps[id][ig][ip][it][tbl->nu[id][ig][ip][it] -
3951 1]) /
3952 tbl->u[id][ig][ip][it][tbl->nu[id][ig][ip][it] - 1];
3953 return log(1 - eps) / a;
3954 }
3955
3956 /* Interpolation... */
3957 else {
3958
3959 /* Get index... */
3960 int idx
3961 = locate_tbl(tbl->eps[id][ig][ip][it], tbl->nu[id][ig][ip][it], eps);
3962
3963 /* Interpolate... */
3964 return
3965 LIN(tbl->eps[id][ig][ip][it][idx], tbl->u[id][ig][ip][it][idx],
3966 tbl->eps[id][ig][ip][it][idx + 1], tbl->u[id][ig][ip][it][idx + 1],
3967 eps);
3968 }
3969}
3970
3971/*****************************************************************************/
3972
3974 const double jsec,
3975 int *year,
3976 int *mon,
3977 int *day,
3978 int *hour,
3979 int *min,
3980 int *sec,
3981 double *remain) {
3982
3983 struct tm t0, *t1;
3984
3985 t0.tm_year = 100;
3986 t0.tm_mon = 0;
3987 t0.tm_mday = 1;
3988 t0.tm_hour = 0;
3989 t0.tm_min = 0;
3990 t0.tm_sec = 0;
3991
3992 time_t jsec0 = (time_t) jsec + timegm(&t0);
3993 t1 = gmtime(&jsec0);
3994
3995 *year = t1->tm_year + 1900;
3996 *mon = t1->tm_mon + 1;
3997 *day = t1->tm_mday;
3998 *hour = t1->tm_hour;
3999 *min = t1->tm_min;
4000 *sec = t1->tm_sec;
4001 *remain = jsec - floor(jsec);
4002}
4003
4004/*****************************************************************************/
4005
4007 ctl_t * ctl,
4008 atm_t * atm,
4009 obs_t * obs,
4010 gsl_matrix * k) {
4011
4012 atm_t *atm1;
4013 obs_t *obs1;
4014
4015 gsl_vector *x0, *x1, *yy0, *yy1;
4016
4017 int *iqa;
4018
4019 /* Get sizes... */
4020 const size_t m = k->size1;
4021 const size_t n = k->size2;
4022
4023 /* Allocate... */
4024 x0 = gsl_vector_alloc(n);
4025 yy0 = gsl_vector_alloc(m);
4026 ALLOC(iqa, int,
4027 N);
4028
4029 /* Compute radiance for undisturbed atmospheric data... */
4030 formod(ctl, atm, obs);
4031
4032 /* Compose vectors... */
4033 atm2x(ctl, atm, x0, iqa, NULL);
4034 obs2y(ctl, obs, yy0, NULL, NULL);
4035
4036 /* Initialize kernel matrix... */
4037 gsl_matrix_set_zero(k);
4038
4039 /* Loop over state vector elements... */
4040#pragma omp parallel for default(none) shared(ctl,atm,obs,k,x0,yy0,n,m,iqa) private(x1, yy1, atm1, obs1)
4041 for (size_t j = 0; j < n; j++) {
4042
4043 /* Allocate... */
4044 x1 = gsl_vector_alloc(n);
4045 yy1 = gsl_vector_alloc(m);
4046 ALLOC(atm1, atm_t, 1);
4047 ALLOC(obs1, obs_t, 1);
4048
4049 /* Set perturbation size... */
4050 double h;
4051 if (iqa[j] == IDXP)
4052 h = MAX(fabs(0.01 * gsl_vector_get(x0, j)), 1e-7);
4053 else if (iqa[j] == IDXT)
4054 h = 1.0;
4055 else if (iqa[j] >= IDXQ(0) && iqa[j] < IDXQ(ctl->ng))
4056 h = MAX(fabs(0.01 * gsl_vector_get(x0, j)), 1e-15);
4057 else if (iqa[j] >= IDXK(0) && iqa[j] < IDXK(ctl->nw))
4058 h = 1e-4;
4059 else if (iqa[j] == IDXCLZ || iqa[j] == IDXCLDZ)
4060 h = 1.0;
4061 else if (iqa[j] >= IDXCLK(0) && iqa[j] < IDXCLK(ctl->ncl))
4062 h = 1e-4;
4063 else if (iqa[j] == IDXSFZ)
4064 h = 0.1;
4065 else if (iqa[j] == IDXSFP)
4066 h = 10.0;
4067 else if (iqa[j] == IDXSFT)
4068 h = 1.0;
4069 else if (iqa[j] >= IDXSFEPS(0) && iqa[j] < IDXSFEPS(ctl->nsf))
4070 h = 1e-2;
4071 else
4072 ERRMSG("Cannot set perturbation size!");
4073
4074 /* Disturb state vector element... */
4075 gsl_vector_memcpy(x1, x0);
4076 gsl_vector_set(x1, j, gsl_vector_get(x1, j) + h);
4077 copy_atm(ctl, atm1, atm, 0);
4078 copy_obs(ctl, obs1, obs, 0);
4079 x2atm(ctl, x1, atm1);
4080
4081 /* Compute radiance for disturbed atmospheric data... */
4082 formod(ctl, atm1, obs1);
4083
4084 /* Compose measurement vector for disturbed radiance data... */
4085 obs2y(ctl, obs1, yy1, NULL, NULL);
4086
4087 /* Compute derivatives... */
4088 for (size_t i = 0; i < m; i++)
4089 gsl_matrix_set(k, i, j,
4090 (gsl_vector_get(yy1, i) - gsl_vector_get(yy0, i)) / h);
4091
4092 /* Free... */
4093 gsl_vector_free(x1);
4094 gsl_vector_free(yy1);
4095 free(atm1);
4096 free(obs1);
4097 }
4098
4099 /* Free... */
4100 gsl_vector_free(x0);
4101 gsl_vector_free(yy0);
4102 free(iqa);
4103}
4104
4105/*****************************************************************************/
4106
4108 const double *xx,
4109 const int n,
4110 const double x) {
4111
4112 int ilo = 0;
4113 int ihi = n - 1;
4114 int i = (ihi + ilo) >> 1;
4115
4116 if (xx[i] < xx[i + 1])
4117 while (ihi > ilo + 1) {
4118 i = (ihi + ilo) >> 1;
4119 if (xx[i] > x)
4120 ihi = i;
4121 else
4122 ilo = i;
4123 } else
4124 while (ihi > ilo + 1) {
4125 i = (ihi + ilo) >> 1;
4126 if (xx[i] <= x)
4127 ihi = i;
4128 else
4129 ilo = i;
4130 }
4131
4132 return ilo;
4133}
4134
4135/*****************************************************************************/
4136
4138 const double *xx,
4139 const int n,
4140 const double x) {
4141
4142 /* Calculate index... */
4143 const int i = (int) ((x - xx[0]) / (xx[1] - xx[0]));
4144
4145 /* Check range... */
4146 if (i < 0)
4147 return 0;
4148 else if (i > n - 2)
4149 return n - 2;
4150 else
4151 return i;
4152}
4153
4154/*****************************************************************************/
4155
4157 const float *xx,
4158 const int n,
4159 const double x) {
4160
4161 int ilo = 0;
4162 int ihi = n - 1;
4163 int i = (ihi + ilo) >> 1;
4164
4165 while (ihi > ilo + 1) {
4166 i = (ihi + ilo) >> 1;
4167 if (xx[i] > x)
4168 ihi = i;
4169 else
4170 ilo = i;
4171 }
4172
4173 return ilo;
4174}
4175
4176/*****************************************************************************/
4177
4178size_t obs2y(
4179 const ctl_t * ctl,
4180 const obs_t * obs,
4181 gsl_vector * y,
4182 int *ida,
4183 int *ira) {
4184
4185 size_t m = 0;
4186
4187 /* Determine measurement vector... */
4188 for (int ir = 0; ir < obs->nr; ir++)
4189 for (int id = 0; id < ctl->nd; id++)
4190 if (isfinite(obs->rad[id][ir])) {
4191 if (y != NULL)
4192 gsl_vector_set(y, m, obs->rad[id][ir]);
4193 if (ida != NULL)
4194 ida[m] = id;
4195 if (ira != NULL)
4196 ira[m] = ir;
4197 m++;
4198 }
4199
4200 return m;
4201}
4202
4203/*****************************************************************************/
4204
4206 const ctl_t * ctl,
4207 const atm_t * atm,
4208 obs_t * obs,
4209 los_t * los,
4210 const int ir) {
4211
4212 const double h = 0.02, zrefrac = 60;
4213
4214 double ex0[3], ex1[3], k[NW], lat, lon, n, ng[3], norm, p, q[NG], t,
4215 x[3], xh[3], xobs[3], xvp[3], z = 1e99, zmax, zmin;
4216
4217 int stop = 0;
4218
4219 /* Initialize... */
4220 los->np = 0;
4221 los->sft = -999;
4222 obs->tpz[ir] = obs->vpz[ir];
4223 obs->tplon[ir] = obs->vplon[ir];
4224 obs->tplat[ir] = obs->vplat[ir];
4225
4226 /* Get altitude range of atmospheric data... */
4227 gsl_stats_minmax(&zmin, &zmax, atm->z, 1, (size_t) atm->np);
4228 if (ctl->nsf > 0) {
4229 zmin = MAX(atm->sfz, zmin);
4230 if (atm->sfp > 0) {
4231 int ip = locate_irr(atm->p, atm->np, atm->sfp);
4232 double zip = LIN(log(atm->p[ip]), atm->z[ip],
4233 log(atm->p[ip + 1]), atm->z[ip + 1], log(atm->sfp));
4234 zmin = MAX(zip, zmin);
4235 }
4236 }
4237
4238 /* Check observer altitude... */
4239 if (obs->obsz[ir] < zmin)
4240 ERRMSG("Observer below surface!");
4241
4242 /* Check view point altitude... */
4243 if (obs->vpz[ir] > zmax)
4244 return;
4245
4246 /* Determine Cartesian coordinates for observer and view point... */
4247 geo2cart(obs->obsz[ir], obs->obslon[ir], obs->obslat[ir], xobs);
4248 geo2cart(obs->vpz[ir], obs->vplon[ir], obs->vplat[ir], xvp);
4249
4250 /* Determine initial tangent vector... */
4251 for (int i = 0; i < 3; i++)
4252 ex0[i] = xvp[i] - xobs[i];
4253 norm = NORM(ex0);
4254 for (int i = 0; i < 3; i++)
4255 ex0[i] /= norm;
4256
4257 /* Observer within atmosphere... */
4258 for (int i = 0; i < 3; i++)
4259 x[i] = xobs[i];
4260
4261 /* Observer above atmosphere (search entry point)... */
4262 if (obs->obsz[ir] > zmax) {
4263 double dmax = norm, dmin = 0;
4264 while (fabs(dmin - dmax) > 0.001) {
4265 const double d = (dmax + dmin) / 2;
4266 for (int i = 0; i < 3; i++)
4267 x[i] = xobs[i] + d * ex0[i];
4268 cart2geo(x, &z, &lon, &lat);
4269 if (z <= zmax && z > zmax - 0.001)
4270 break;
4271 if (z < zmax - 0.0005)
4272 dmax = d;
4273 else
4274 dmin = d;
4275 }
4276 }
4277
4278 /* Ray-tracing... */
4279 while (1) {
4280
4281 /* Set step length... */
4282 double ds = ctl->rayds;
4283 if (ctl->raydz > 0) {
4284 norm = NORM(x);
4285 for (int i = 0; i < 3; i++)
4286 xh[i] = x[i] / norm;
4287 const double cosa = fabs(DOTP(ex0, xh));
4288 if (cosa != 0)
4289 ds = MIN(ctl->rayds, ctl->raydz / cosa);
4290 }
4291
4292 /* Determine geolocation... */
4293 cart2geo(x, &z, &lon, &lat);
4294
4295 /* Check if LOS hits the ground or has left atmosphere... */
4296 if (z < zmin || z > zmax) {
4297 stop = (z < zmin ? 2 : 1);
4298 const double frac =
4299 ((z <
4300 zmin ? zmin : zmax) - los->z[los->np - 1]) / (z - los->z[los->np -
4301 1]);
4302 geo2cart(los->z[los->np - 1], los->lon[los->np - 1],
4303 los->lat[los->np - 1], xh);
4304 for (int i = 0; i < 3; i++)
4305 x[i] = xh[i] + frac * (x[i] - xh[i]);
4306 cart2geo(x, &z, &lon, &lat);
4307 los->ds[los->np - 1] = ds * frac;
4308 ds = 0;
4309 }
4310
4311 /* Interpolate atmospheric data... */
4312 intpol_atm(ctl, atm, z, &p, &t, q, k);
4313
4314 /* Save data... */
4315 los->lon[los->np] = lon;
4316 los->lat[los->np] = lat;
4317 los->z[los->np] = z;
4318 los->p[los->np] = p;
4319 los->t[los->np] = t;
4320 for (int ig = 0; ig < ctl->ng; ig++)
4321 los->q[los->np][ig] = q[ig];
4322 for (int id = 0; id < ctl->nd; id++)
4323 los->k[los->np][id] = k[ctl->window[id]];
4324 los->ds[los->np] = ds;
4325
4326 /* Add cloud extinction... */
4327 if (ctl->ncl > 0 && atm->cldz > 0) {
4328 const double aux = exp(-0.5 * POW2((z - atm->clz) / atm->cldz));
4329 for (int id = 0; id < ctl->nd; id++) {
4330 const int icl = locate_irr(ctl->clnu, ctl->ncl, ctl->nu[id]);
4331 los->k[los->np][id]
4332 += aux * LIN(ctl->clnu[icl], atm->clk[icl],
4333 ctl->clnu[icl + 1], atm->clk[icl + 1], ctl->nu[id]);
4334 }
4335 }
4336
4337 /* Increment and check number of LOS points... */
4338 if ((++los->np) > NLOS)
4339 ERRMSG("Too many LOS points!");
4340
4341 /* Check stop flag... */
4342 if (stop) {
4343
4344 /* Set surface temperature... */
4345 if (ctl->nsf > 0 && atm->sft > 0)
4346 t = atm->sft;
4347 los->sft = (stop == 2 ? t : -999);
4348
4349 /* Set surface emissivity... */
4350 for (int id = 0; id < ctl->nd; id++) {
4351 los->sfeps[id] = 1.0;
4352 if (ctl->nsf > 0) {
4353 const int isf = locate_irr(ctl->sfnu, ctl->nsf, ctl->nu[id]);
4354 los->sfeps[id] = LIN(ctl->sfnu[isf], atm->sfeps[isf],
4355 ctl->sfnu[isf + 1], atm->sfeps[isf + 1],
4356 ctl->nu[id]);
4357 }
4358 }
4359
4360 /* Leave raytracer... */
4361 break;
4362 }
4363
4364 /* Determine refractivity... */
4365 if (ctl->refrac && z <= zrefrac)
4366 n = 1 + REFRAC(p, t);
4367 else
4368 n = 1;
4369
4370 /* Construct new tangent vector (first term)... */
4371 for (int i = 0; i < 3; i++)
4372 ex1[i] = ex0[i] * n;
4373
4374 /* Compute gradient of refractivity... */
4375 if (ctl->refrac && z <= zrefrac) {
4376 for (int i = 0; i < 3; i++)
4377 xh[i] = x[i] + 0.5 * ds * ex0[i];
4378 cart2geo(xh, &z, &lon, &lat);
4379 intpol_atm(ctl, atm, z, &p, &t, q, k);
4380 n = REFRAC(p, t);
4381 for (int i = 0; i < 3; i++) {
4382 xh[i] += h;
4383 cart2geo(xh, &z, &lon, &lat);
4384 intpol_atm(ctl, atm, z, &p, &t, q, k);
4385 ng[i] = (REFRAC(p, t) - n) / h;
4386 xh[i] -= h;
4387 }
4388 } else
4389 for (int i = 0; i < 3; i++)
4390 ng[i] = 0;
4391
4392 /* Construct new tangent vector (second term)... */
4393 for (int i = 0; i < 3; i++)
4394 ex1[i] += ds * ng[i];
4395
4396 /* Normalize new tangent vector... */
4397 norm = NORM(ex1);
4398 for (int i = 0; i < 3; i++)
4399 ex1[i] /= norm;
4400
4401 /* Determine next point of LOS... */
4402 for (int i = 0; i < 3; i++)
4403 x[i] += 0.5 * ds * (ex0[i] + ex1[i]);
4404
4405 /* Copy tangent vector... */
4406 for (int i = 0; i < 3; i++)
4407 ex0[i] = ex1[i];
4408 }
4409
4410 /* Get tangent point (to be done before changing segment lengths!)... */
4411 tangent_point(los, &obs->tpz[ir], &obs->tplon[ir], &obs->tplat[ir]);
4412
4413 /* Change segment lengths according to trapezoid rule... */
4414 for (int ip = los->np - 1; ip >= 1; ip--)
4415 los->ds[ip] = 0.5 * (los->ds[ip - 1] + los->ds[ip]);
4416 los->ds[0] *= 0.5;
4417
4418 /* Compute column density... */
4419 for (int ip = 0; ip < los->np; ip++)
4420 for (int ig = 0; ig < ctl->ng; ig++)
4421 los->u[ip][ig] = 10 * los->q[ip][ig] * los->p[ip]
4422 / (KB * los->t[ip]) * los->ds[ip];
4423
4424 /* Compute Curtis-Godson means... */
4425 for (int ig = 0; ig < ctl->ng; ig++) {
4426 los->cgu[0][ig] = los->u[0][ig];
4427 los->cgp[0][ig] = los->u[0][ig] * los->p[0];
4428 los->cgt[0][ig] = los->u[0][ig] * los->t[0];
4429 }
4430 for (int ip = 1; ip < los->np; ip++)
4431 for (int ig = 0; ig < ctl->ng; ig++) {
4432 los->cgu[ip][ig] = los->cgu[ip - 1][ig] + los->u[ip][ig];
4433 los->cgp[ip][ig] = los->cgp[ip - 1][ig] + los->u[ip][ig] * los->p[ip];
4434 los->cgt[ip][ig] = los->cgt[ip - 1][ig] + los->u[ip][ig] * los->t[ip];
4435 }
4436 for (int ip = 0; ip < los->np; ip++)
4437 for (int ig = 0; ig < ctl->ng; ig++) {
4438 los->cgp[ip][ig] /= los->cgu[ip][ig];
4439 los->cgt[ip][ig] /= los->cgu[ip][ig];
4440 }
4441}
4442
4443/*****************************************************************************/
4444
4446 const char *dirname,
4447 const char *filename,
4448 const ctl_t * ctl,
4449 atm_t * atm) {
4450
4451 FILE *in;
4452
4453 char file[LEN], line[LEN], *tok;
4454
4455 /* Init... */
4456 atm->np = 0;
4457
4458 /* Set filename... */
4459 if (dirname != NULL)
4460 sprintf(file, "%s/%s", dirname, filename);
4461 else
4462 sprintf(file, "%s", filename);
4463
4464 /* Write info... */
4465 LOG(1, "Read atmospheric data: %s", file);
4466
4467 /* Open file... */
4468 if (!(in = fopen(file, "r")))
4469 ERRMSG("Cannot open file!");
4470
4471 /* Read line... */
4472 while (fgets(line, LEN, in)) {
4473
4474 /* Read data... */
4475 TOK(line, tok, "%lg", atm->time[atm->np]);
4476 TOK(NULL, tok, "%lg", atm->z[atm->np]);
4477 TOK(NULL, tok, "%lg", atm->lon[atm->np]);
4478 TOK(NULL, tok, "%lg", atm->lat[atm->np]);
4479 TOK(NULL, tok, "%lg", atm->p[atm->np]);
4480 TOK(NULL, tok, "%lg", atm->t[atm->np]);
4481 for (int ig = 0; ig < ctl->ng; ig++)
4482 TOK(NULL, tok, "%lg", atm->q[ig][atm->np]);
4483 for (int iw = 0; iw < ctl->nw; iw++)
4484 TOK(NULL, tok, "%lg", atm->k[iw][atm->np]);
4485 if (ctl->ncl > 0 && atm->np == 0) {
4486 TOK(NULL, tok, "%lg", atm->clz);
4487 TOK(NULL, tok, "%lg", atm->cldz);
4488 for (int icl = 0; icl < ctl->ncl; icl++)
4489 TOK(NULL, tok, "%lg", atm->clk[icl]);
4490 }
4491 if (ctl->nsf > 0 && atm->np == 0) {
4492 TOK(NULL, tok, "%lg", atm->sfz);
4493 TOK(NULL, tok, "%lg", atm->sfp);
4494 TOK(NULL, tok, "%lg", atm->sft);
4495 for (int isf = 0; isf < ctl->nsf; isf++)
4496 TOK(NULL, tok, "%lg", atm->sfeps[isf]);
4497 }
4498
4499 /* Increment data point counter... */
4500 if ((++atm->np) > NP)
4501 ERRMSG("Too many data points!");
4502 }
4503
4504 /* Close file... */
4505 fclose(in);
4506
4507 /* Check number of points... */
4508 if (atm->np < 1)
4509 ERRMSG("Could not read any data!");
4510
4511 /* Write info... */
4512 double mini, maxi;
4513 LOG(2, "Number of data points: %d", atm->np);
4514 gsl_stats_minmax(&mini, &maxi, atm->time, 1, (size_t) atm->np);
4515 LOG(2, "Time range: %.2f ... %.2f s", mini, maxi);
4516 gsl_stats_minmax(&mini, &maxi, atm->z, 1, (size_t) atm->np);
4517 LOG(2, "Altitude range: %g ... %g km", mini, maxi);
4518 gsl_stats_minmax(&mini, &maxi, atm->lon, 1, (size_t) atm->np);
4519 LOG(2, "Longitude range: %g ... %g deg", mini, maxi);
4520 gsl_stats_minmax(&mini, &maxi, atm->lat, 1, (size_t) atm->np);
4521 LOG(2, "Latitude range: %g ... %g deg", mini, maxi);
4522 gsl_stats_minmax(&mini, &maxi, atm->p, 1, (size_t) atm->np);
4523 LOG(2, "Pressure range: %g ... %g hPa", maxi, mini);
4524 gsl_stats_minmax(&mini, &maxi, atm->t, 1, (size_t) atm->np);
4525 LOG(2, "Temperature range: %g ... %g K", mini, maxi);
4526 for (int ig = 0; ig < ctl->ng; ig++) {
4527 gsl_stats_minmax(&mini, &maxi, atm->q[ig], 1, (size_t) atm->np);
4528 LOG(2, "Emitter %s range: %g ... %g ppv", ctl->emitter[ig], mini, maxi);
4529 }
4530 for (int iw = 0; iw < ctl->nw; iw++) {
4531 gsl_stats_minmax(&mini, &maxi, atm->k[iw], 1, (size_t) atm->np);
4532 LOG(2, "Extinction range (window %d): %g ... %g km^-1", iw, mini, maxi);
4533 }
4534 if (ctl->ncl > 0 && atm->np == 0) {
4535 LOG(2, "Cloud layer: z= %g km | dz= %g km | k= %g ... %g km^-1",
4536 atm->clz, atm->cldz, atm->clk[0], atm->clk[ctl->ncl - 1]);
4537 } else
4538 LOG(2, "Cloud layer: none");
4539 if (ctl->nsf > 0 && atm->np == 0) {
4540 LOG(2,
4541 "Surface layer: z_s= %g km | p_s= %g hPa | T_s = %g K | eps= %g ... %g",
4542 atm->sfz, atm->sfp, atm->sft, atm->sfeps[0],
4543 atm->sfeps[ctl->nsf - 1]);
4544 } else
4545 LOG(2, "Surface layer: none");
4546}
4547
4548/*****************************************************************************/
4549
4551 int argc,
4552 char *argv[],
4553 ctl_t * ctl) {
4554
4555 /* Write info... */
4556 LOG(1, "\nJuelich Rapid Spectral Simulation Code (JURASSIC)\n"
4557 "(executable: %s | version: %s | compiled: %s, %s)\n",
4558 argv[0], VERSION, __DATE__, __TIME__);
4559
4560 /* Emitters... */
4561 ctl->ng = (int) scan_ctl(argc, argv, "NG", -1, "0", NULL);
4562 if (ctl->ng < 0 || ctl->ng > NG)
4563 ERRMSG("Set 0 <= NG <= MAX!");
4564 for (int ig = 0; ig < ctl->ng; ig++)
4565 scan_ctl(argc, argv, "EMITTER", ig, "", ctl->emitter[ig]);
4566
4567 /* Radiance channels... */
4568 ctl->nd = (int) scan_ctl(argc, argv, "ND", -1, "0", NULL);
4569 if (ctl->nd < 0 || ctl->nd > ND)
4570 ERRMSG("Set 0 <= ND <= MAX!");
4571 for (int id = 0; id < ctl->nd; id++)
4572 ctl->nu[id] = scan_ctl(argc, argv, "NU", id, "", NULL);
4573
4574 /* Spectral windows... */
4575 ctl->nw = (int) scan_ctl(argc, argv, "NW", -1, "1", NULL);
4576 if (ctl->nw < 0 || ctl->nw > NW)
4577 ERRMSG("Set 0 <= NW <= MAX!");
4578 for (int id = 0; id < ctl->nd; id++)
4579 ctl->window[id] = (int) scan_ctl(argc, argv, "WINDOW", id, "0", NULL);
4580
4581 /* Cloud data... */
4582 ctl->ncl = (int) scan_ctl(argc, argv, "NCL", -1, "0", NULL);
4583 if (ctl->ncl < 0 || ctl->ncl > NCL)
4584 ERRMSG("Set 0 <= NCL <= MAX!");
4585 if (ctl->ncl == 1)
4586 ERRMSG("Set NCL > 1!");
4587 for (int icl = 0; icl < ctl->ncl; icl++)
4588 ctl->clnu[icl] = scan_ctl(argc, argv, "CLNU", icl, "", NULL);
4589
4590 /* Surface data... */
4591 ctl->nsf = (int) scan_ctl(argc, argv, "NSF", -1, "0", NULL);
4592 if (ctl->nsf < 0 || ctl->nsf > NSF)
4593 ERRMSG("Set 0 <= NSF <= MAX!");
4594 if (ctl->nsf == 1)
4595 ERRMSG("Set NSF > 1!");
4596 for (int isf = 0; isf < ctl->nsf; isf++)
4597 ctl->sfnu[isf] = scan_ctl(argc, argv, "SFNU", isf, "", NULL);
4598 ctl->sftype = (int) scan_ctl(argc, argv, "SFTYPE", -1, "2", NULL);
4599 if (ctl->sftype < 0 || ctl->sftype > 3)
4600 ERRMSG("Set 0 <= SFTYPE <= 3!");
4601 ctl->sfsza = scan_ctl(argc, argv, "SFSZA", -1, "-999", NULL);
4602
4603 /* Emissivity look-up tables... */
4604 scan_ctl(argc, argv, "TBLBASE", -1, "-", ctl->tblbase);
4605 ctl->tblfmt = (int) scan_ctl(argc, argv, "TBLFMT", -1, "1", NULL);
4606
4607 /* Hydrostatic equilibrium... */
4608 ctl->hydz = scan_ctl(argc, argv, "HYDZ", -1, "-999", NULL);
4609
4610 /* Continua... */
4611 ctl->ctm_co2 = (int) scan_ctl(argc, argv, "CTM_CO2", -1, "1", NULL);
4612 ctl->ctm_h2o = (int) scan_ctl(argc, argv, "CTM_H2O", -1, "1", NULL);
4613 ctl->ctm_n2 = (int) scan_ctl(argc, argv, "CTM_N2", -1, "1", NULL);
4614 ctl->ctm_o2 = (int) scan_ctl(argc, argv, "CTM_O2", -1, "1", NULL);
4615
4616 /* Ray-tracing... */
4617 ctl->refrac = (int) scan_ctl(argc, argv, "REFRAC", -1, "1", NULL);
4618 ctl->rayds = scan_ctl(argc, argv, "RAYDS", -1, "10", NULL);
4619 ctl->raydz = scan_ctl(argc, argv, "RAYDZ", -1, "0.1", NULL);
4620
4621 /* Field of view... */
4622 scan_ctl(argc, argv, "FOV", -1, "-", ctl->fov);
4623
4624 /* Retrieval interface... */
4625 ctl->retp_zmin = scan_ctl(argc, argv, "RETP_ZMIN", -1, "-999", NULL);
4626 ctl->retp_zmax = scan_ctl(argc, argv, "RETP_ZMAX", -1, "-999", NULL);
4627 ctl->rett_zmin = scan_ctl(argc, argv, "RETT_ZMIN", -1, "-999", NULL);
4628 ctl->rett_zmax = scan_ctl(argc, argv, "RETT_ZMAX", -1, "-999", NULL);
4629 for (int ig = 0; ig < ctl->ng; ig++) {
4630 ctl->retq_zmin[ig] = scan_ctl(argc, argv, "RETQ_ZMIN", ig, "-999", NULL);
4631 ctl->retq_zmax[ig] = scan_ctl(argc, argv, "RETQ_ZMAX", ig, "-999", NULL);
4632 }
4633 for (int iw = 0; iw < ctl->nw; iw++) {
4634 ctl->retk_zmin[iw] = scan_ctl(argc, argv, "RETK_ZMIN", iw, "-999", NULL);
4635 ctl->retk_zmax[iw] = scan_ctl(argc, argv, "RETK_ZMAX", iw, "-999", NULL);
4636 }
4637 ctl->ret_clz = (int) scan_ctl(argc, argv, "RET_CLZ", -1, "0", NULL);
4638 ctl->ret_cldz = (int) scan_ctl(argc, argv, "RET_CLDZ", -1, "0", NULL);
4639 ctl->ret_clk = (int) scan_ctl(argc, argv, "RET_CLK", -1, "0", NULL);
4640 ctl->ret_sfz = (int) scan_ctl(argc, argv, "RET_SFZ", -1, "0", NULL);
4641 ctl->ret_sfp = (int) scan_ctl(argc, argv, "RET_SFP", -1, "0", NULL);
4642 ctl->ret_sft = (int) scan_ctl(argc, argv, "RET_SFT", -1, "0", NULL);
4643 ctl->ret_sfeps = (int) scan_ctl(argc, argv, "RET_SFEPS", -1, "0", NULL);
4644
4645 /* Output flags... */
4646 ctl->write_bbt = (int) scan_ctl(argc, argv, "WRITE_BBT", -1, "0", NULL);
4647 ctl->write_matrix =
4648 (int) scan_ctl(argc, argv, "WRITE_MATRIX", -1, "0", NULL);
4649
4650 /* External forward models... */
4651 ctl->formod = (int) scan_ctl(argc, argv, "FORMOD", -1, "1", NULL);
4652 scan_ctl(argc, argv, "RFMBIN", -1, "-", ctl->rfmbin);
4653 scan_ctl(argc, argv, "RFMHIT", -1, "-", ctl->rfmhit);
4654 for (int ig = 0; ig < ctl->ng; ig++)
4655 scan_ctl(argc, argv, "RFMXSC", ig, "-", ctl->rfmxsc[ig]);
4656}
4657
4658/*****************************************************************************/
4659
4661 const char *dirname,
4662 const char *filename,
4663 gsl_matrix * matrix) {
4664
4665 FILE *in;
4666
4667 char dum[LEN], file[LEN], line[LEN];
4668
4669 double value;
4670
4671 int i, j;
4672
4673 /* Set filename... */
4674 if (dirname != NULL)
4675 sprintf(file, "%s/%s", dirname, filename);
4676 else
4677 sprintf(file, "%s", filename);
4678
4679 /* Write info... */
4680 LOG(1, "Read matrix: %s", file);
4681
4682 /* Open file... */
4683 if (!(in = fopen(file, "r")))
4684 ERRMSG("Cannot open file!");
4685
4686 /* Read data... */
4687 gsl_matrix_set_zero(matrix);
4688 while (fgets(line, LEN, in))
4689 if (sscanf(line, "%d %s %s %s %s %s %d %s %s %s %s %s %lg",
4690 &i, dum, dum, dum, dum, dum,
4691 &j, dum, dum, dum, dum, dum, &value) == 13)
4692 gsl_matrix_set(matrix, (size_t) i, (size_t) j, value);
4693
4694 /* Close file... */
4695 fclose(in);
4696}
4697
4698/*****************************************************************************/
4699
4701 const char *dirname,
4702 const char *filename,
4703 const ctl_t * ctl,
4704 obs_t * obs) {
4705
4706 FILE *in;
4707
4708 char file[LEN], line[LEN], *tok;
4709
4710 /* Init... */
4711 obs->nr = 0;
4712
4713 /* Set filename... */
4714 if (dirname != NULL)
4715 sprintf(file, "%s/%s", dirname, filename);
4716 else
4717 sprintf(file, "%s", filename);
4718
4719 /* Write info... */
4720 LOG(1, "Read observation data: %s", file);
4721
4722 /* Open file... */
4723 if (!(in = fopen(file, "r")))
4724 ERRMSG("Cannot open file!");
4725
4726 /* Read line... */
4727 while (fgets(line, LEN, in)) {
4728
4729 /* Read data... */
4730 TOK(line, tok, "%lg", obs->time[obs->nr]);
4731 TOK(NULL, tok, "%lg", obs->obsz[obs->nr]);
4732 TOK(NULL, tok, "%lg", obs->obslon[obs->nr]);
4733 TOK(NULL, tok, "%lg", obs->obslat[obs->nr]);
4734 TOK(NULL, tok, "%lg", obs->vpz[obs->nr]);
4735 TOK(NULL, tok, "%lg", obs->vplon[obs->nr]);
4736 TOK(NULL, tok, "%lg", obs->vplat[obs->nr]);
4737 TOK(NULL, tok, "%lg", obs->tpz[obs->nr]);
4738 TOK(NULL, tok, "%lg", obs->tplon[obs->nr]);
4739 TOK(NULL, tok, "%lg", obs->tplat[obs->nr]);
4740 for (int id = 0; id < ctl->nd; id++)
4741 TOK(NULL, tok, "%lg", obs->rad[id][obs->nr]);
4742 for (int id = 0; id < ctl->nd; id++)
4743 TOK(NULL, tok, "%lg", obs->tau[id][obs->nr]);
4744
4745 /* Increment counter... */
4746 if ((++obs->nr) > NR)
4747 ERRMSG("Too many rays!");
4748 }
4749
4750 /* Close file... */
4751 fclose(in);
4752
4753 /* Check number of points... */
4754 if (obs->nr < 1)
4755 ERRMSG("Could not read any data!");
4756
4757 /* Write info... */
4758 double mini, maxi;
4759 LOG(2, "Number of ray paths: %d", obs->nr);
4760 gsl_stats_minmax(&mini, &maxi, obs->time, 1, (size_t) obs->nr);
4761 LOG(2, "Time range: %.2f ... %.2f s", mini, maxi);
4762 gsl_stats_minmax(&mini, &maxi, obs->obsz, 1, (size_t) obs->nr);
4763 LOG(2, "Observer altitude range: %g ... %g km", mini, maxi);
4764 gsl_stats_minmax(&mini, &maxi, obs->obslon, 1, (size_t) obs->nr);
4765 LOG(2, "Observer longitude range: %g ... %g deg", mini, maxi);
4766 gsl_stats_minmax(&mini, &maxi, obs->obslat, 1, (size_t) obs->nr);
4767 LOG(2, "Observer latitude range: %g ... %g deg", mini, maxi);
4768 gsl_stats_minmax(&mini, &maxi, obs->vpz, 1, (size_t) obs->nr);
4769 LOG(2, "View point altitude range: %g ... %g km", mini, maxi);
4770 gsl_stats_minmax(&mini, &maxi, obs->vplon, 1, (size_t) obs->nr);
4771 LOG(2, "View point longitude range: %g ... %g deg", mini, maxi);
4772 gsl_stats_minmax(&mini, &maxi, obs->vplat, 1, (size_t) obs->nr);
4773 LOG(2, "View point latitude range: %g ... %g deg", mini, maxi);
4774 gsl_stats_minmax(&mini, &maxi, obs->tpz, 1, (size_t) obs->nr);
4775 LOG(2, "Tangent point altitude range: %g ... %g km", mini, maxi);
4776 gsl_stats_minmax(&mini, &maxi, obs->tplon, 1, (size_t) obs->nr);
4777 LOG(2, "Tangent point longitude range: %g ... %g deg", mini, maxi);
4778 gsl_stats_minmax(&mini, &maxi, obs->tplat, 1, (size_t) obs->nr);
4779 LOG(2, "Tangent point latitude range: %g ... %g deg", mini, maxi);
4780 for (int id = 0; id < ctl->nd; id++) {
4781 gsl_stats_minmax(&mini, &maxi, obs->rad[id], 1, (size_t) obs->nr);
4782 if (ctl->write_bbt) {
4783 LOG(2, "Brightness temperature (%.4f cm^-1) range: %g ... %g K",
4784 ctl->nu[id], mini, maxi);
4785 } else {
4786 LOG(2, "Radiance (%.4f cm^-1) range: %g ... %g W/(m^2 sr cm^-1)",
4787 ctl->nu[id], mini, maxi);
4788 }
4789 }
4790 for (int id = 0; id < ctl->nd; id++) {
4791 gsl_stats_minmax(&mini, &maxi, obs->tau[id], 1, (size_t) obs->nr);
4792 if (ctl->write_bbt) {
4793 LOG(2, "Transmittance (%.4f cm^-1) range: %g ... %g",
4794 ctl->nu[id], mini, maxi);
4795 }
4796 }
4797}
4798
4799/*****************************************************************************/
4800
4802 const char *basename,
4803 const double z,
4804 double *nu,
4805 double *f,
4806 int n) {
4807
4808 FILE *in;
4809
4810 char filename[LEN];
4811
4812 double filt, fsum = 0, nu2[NSHAPE], *nurfm, *rad, radsum = 0;
4813
4814 int npts;
4815
4816 /* Allocate... */
4817 ALLOC(nurfm, double,
4818 RFMNPTS);
4819 ALLOC(rad, double,
4820 RFMNPTS);
4821
4822 /* Search RFM spectrum... */
4823 sprintf(filename, "%s_%05d.asc", basename, (int) (z * 1000));
4824 if (!(in = fopen(filename, "r"))) {
4825 sprintf(filename, "%s_%05d.asc", basename, (int) (z * 1000) + 1);
4826 if (!(in = fopen(filename, "r")))
4827 ERRMSG("Cannot find RFM data file!");
4828 }
4829 fclose(in);
4830
4831 /* Read RFM spectrum... */
4832 read_rfm_spec(filename, nurfm, rad, &npts);
4833
4834 /* Set wavenumbers... */
4835 nu2[0] = nu[0];
4836 nu2[n - 1] = nu[n - 1];
4837 for (int i = 1; i < n - 1; i++)
4838 nu2[i] = LIN(0.0, nu2[0], n - 1.0, nu2[n - 1], i);
4839
4840 /* Convolute... */
4841 for (int ipts = 0; ipts < npts; ipts++)
4842 if (nurfm[ipts] >= nu2[0] && nurfm[ipts] <= nu2[n - 1]) {
4843 int idx = locate_irr(nu2, n, nurfm[ipts]);
4844 filt = LIN(nu2[idx], f[idx], nu2[idx + 1], f[idx + 1], nurfm[ipts]);
4845 fsum += filt;
4846 radsum += filt * rad[ipts];
4847 }
4848
4849 /* Free... */
4850 free(nurfm);
4851 free(rad);
4852
4853 /* Return radiance... */
4854 return radsum / fsum;
4855}
4856
4857/*****************************************************************************/
4858
4860 const char *filename,
4861 double *nu,
4862 double *rad,
4863 int *npts) {
4864
4865 FILE *in;
4866
4867 char line[RFMLINE], *tok;
4868
4869 double dnu, nu0, nu1;
4870
4871 int ipts = 0;
4872
4873 /* Write info... */
4874 LOG(1, "Read RFM data: %s", filename);
4875
4876 /* Open file... */
4877 if (!(in = fopen(filename, "r")))
4878 ERRMSG("Cannot open file!");
4879
4880 /* Read header...... */
4881 for (int i = 0; i < 4; i++)
4882 if (fgets(line, RFMLINE, in) == NULL)
4883 ERRMSG("Error while reading file header!");
4884 sscanf(line, "%d %lg %lg %lg", npts, &nu0, &dnu, &nu1);
4885 if (*npts > RFMNPTS)
4886 ERRMSG("Too many spectral grid points!");
4887
4888 /* Read radiance data... */
4889 while (fgets(line, RFMLINE, in) && ipts < *npts) {
4890 if ((tok = strtok(line, " \t\n")) != NULL)
4891 if (sscanf(tok, "%lg", &rad[ipts]) == 1)
4892 ipts++;
4893 while ((tok = strtok(NULL, " \t\n")) != NULL)
4894 if (sscanf(tok, "%lg", &rad[ipts]) == 1)
4895 ipts++;
4896 }
4897 if (ipts != *npts)
4898 ERRMSG("Error while reading RFM data!");
4899
4900 /* Compute wavenumbers... */
4901 for (ipts = 0; ipts < *npts; ipts++)
4902 nu[ipts] = LIN(0.0, nu0, (double) (*npts - 1), nu1, (double) ipts);
4903
4904 /* Close file... */
4905 fclose(in);
4906}
4907
4908/*****************************************************************************/
4909
4911 const char *filename,
4912 double *x,
4913 double *y,
4914 int *n) {
4915
4916 FILE *in;
4917
4918 char line[LEN];
4919
4920 /* Write info... */
4921 LOG(1, "Read shape function: %s", filename);
4922
4923 /* Open file... */
4924 if (!(in = fopen(filename, "r")))
4925 ERRMSG("Cannot open file!");
4926
4927 /* Read data... */
4928 *n = 0;
4929 while (fgets(line, LEN, in))
4930 if (sscanf(line, "%lg %lg", &x[*n], &y[*n]) == 2)
4931 if ((++(*n)) > NSHAPE)
4932 ERRMSG("Too many data points!");
4933
4934 /* Close file... */
4935 fclose(in);
4936
4937 /* Check number of data points... */
4938 if (*n < 2)
4939 ERRMSG("Could not read any data!");
4940
4941 /* Write info... */
4942 double mini, maxi;
4943 LOG(2, "Number of data points: %d", *n);
4944 gsl_stats_minmax(&mini, &maxi, x, 1, (size_t) *n);
4945 LOG(2, "Range of x values: %.4f ... %.4f", mini, maxi);
4946 gsl_stats_minmax(&mini, &maxi, y, 1, (size_t) *n);
4947 LOG(2, "Range of y values: %g ... %g", mini, maxi);
4948}
4949
4950/*****************************************************************************/
4951
4953 const ctl_t * ctl,
4954 tbl_t * tbl) {
4955
4956 FILE *in;
4957
4958 char filename[2 * LEN], line[LEN];
4959
4960 double eps, press, temp, u;
4961
4962 /* Loop over trace gases and channels... */
4963 for (int id = 0; id < ctl->nd; id++)
4964 for (int ig = 0; ig < ctl->ng; ig++) {
4965
4966 /* Initialize... */
4967 tbl->np[id][ig] = -1;
4968 double eps_old = -999;
4969 double press_old = -999;
4970 double temp_old = -999;
4971 double u_old = -999;
4972 int nrange = 0;
4973
4974 /* Set filename... */
4975 sprintf(filename, "%s_%.4f_%s.%s", ctl->tblbase,
4976 ctl->nu[id], ctl->emitter[ig],
4977 ctl->tblfmt == 1 ? "tab" : "bin");
4978
4979 /* Write info... */
4980 LOG(1, "Read emissivity table: %s", filename);
4981
4982 /* Try to open file... */
4983 if (!(in = fopen(filename, "r"))) {
4984 WARN("Missing emissivity table: %s", filename);
4985 continue;
4986 }
4987
4988 /* Read ASCII tables... */
4989 if (ctl->tblfmt == 1) {
4990
4991 /* Read data... */
4992 while (fgets(line, LEN, in)) {
4993
4994 /* Parse line... */
4995 if (sscanf(line, "%lg %lg %lg %lg", &press, &temp, &u, &eps) != 4)
4996 continue;
4997
4998 /* Check ranges... */
4999 if (u < UMIN || u > UMAX || eps < EPSMIN || eps > EPSMAX) {
5000 nrange++;
5001 continue;
5002 }
5003
5004 /* Determine pressure index... */
5005 if (press != press_old) {
5006 press_old = press;
5007 if ((++tbl->np[id][ig]) >= TBLNP)
5008 ERRMSG("Too many pressure levels!");
5009 tbl->nt[id][ig][tbl->np[id][ig]] = -1;
5010 }
5011
5012 /* Determine temperature index... */
5013 if (temp != temp_old) {
5014 temp_old = temp;
5015 if ((++tbl->nt[id][ig][tbl->np[id][ig]]) >= TBLNT)
5016 ERRMSG("Too many temperatures!");
5017 tbl->nu[id][ig][tbl->np[id][ig]]
5018 [tbl->nt[id][ig][tbl->np[id][ig]]] = -1;
5019 }
5020
5021 /* Determine column density index... */
5022 if ((eps > eps_old && u > u_old) || tbl->nu[id][ig][tbl->np[id][ig]]
5023 [tbl->nt[id][ig][tbl->np[id][ig]]] < 0) {
5024 eps_old = eps;
5025 u_old = u;
5026 if ((++tbl->nu[id][ig][tbl->np[id][ig]]
5027 [tbl->nt[id][ig][tbl->np[id][ig]]]) >= TBLNU)
5028 ERRMSG("Too many column densities!");
5029 }
5030
5031 /* Store data... */
5032 tbl->p[id][ig][tbl->np[id][ig]] = press;
5033 tbl->t[id][ig][tbl->np[id][ig]][tbl->nt[id][ig][tbl->np[id][ig]]]
5034 = temp;
5035 tbl->u[id][ig][tbl->np[id][ig]][tbl->nt[id][ig][tbl->np[id][ig]]]
5036 [tbl->nu[id][ig][tbl->np[id][ig]]
5037 [tbl->nt[id][ig][tbl->np[id][ig]]]] = (float) u;
5038 tbl->eps[id][ig][tbl->np[id][ig]][tbl->nt[id][ig][tbl->np[id][ig]]]
5039 [tbl->nu[id][ig][tbl->np[id][ig]]
5040 [tbl->nt[id][ig][tbl->np[id][ig]]]] = (float) eps;
5041 }
5042
5043 /* Increment counters... */
5044 tbl->np[id][ig]++;
5045 for (int ip = 0; ip < tbl->np[id][ig]; ip++) {
5046 tbl->nt[id][ig][ip]++;
5047 for (int it = 0; it < tbl->nt[id][ig][ip]; it++)
5048 tbl->nu[id][ig][ip][it]++;
5049 }
5050 }
5051
5052 /* Read binary data... */
5053 else if (ctl->tblfmt == 2) {
5054
5055 /* Read data... */
5056 FREAD(&tbl->np[id][ig], int,
5057 1,
5058 in);
5059 if (tbl->np[id][ig] > TBLNP)
5060 ERRMSG("Too many pressure levels!");
5061 FREAD(tbl->p[id][ig], double,
5062 (size_t) tbl->np[id][ig],
5063 in);
5064 for (int ip = 0; ip < tbl->np[id][ig]; ip++) {
5065 FREAD(&tbl->nt[id][ig][ip], int,
5066 1,
5067 in);
5068 if (tbl->nt[id][ig][ip] > TBLNT)
5069 ERRMSG("Too many temperatures!");
5070 FREAD(tbl->t[id][ig][ip], double,
5071 (size_t) tbl->nt[id][ig][ip],
5072 in);
5073 for (int it = 0; it < tbl->nt[id][ig][ip]; it++) {
5074 FREAD(&tbl->nu[id][ig][ip][it], int,
5075 1,
5076 in);
5077 if (tbl->nu[id][ig][ip][it] > TBLNU)
5078 ERRMSG("Too many column densities!");
5079 FREAD(tbl->u[id][ig][ip][it], float,
5080 (size_t) tbl->nu[id][ig][ip][it],
5081 in);
5082 FREAD(tbl->eps[id][ig][ip][it], float,
5083 (size_t) tbl->nu[id][ig][ip][it],
5084 in);
5085 }
5086 }
5087 }
5088
5089 /* Error message... */
5090 else
5091 ERRMSG("Unknown look-up table format!");
5092
5093 /* Check ranges... */
5094 if (nrange > 0)
5095 WARN("Column density or emissivity out of range (%d data points)!",
5096 nrange);
5097
5098 /* Close file... */
5099 fclose(in);
5100
5101 /* Write info... */
5102 for (int ip = 0; ip < tbl->np[id][ig]; ip++)
5103 LOG(2,
5104 "p[%2d]= %.5e hPa | T[0:%2d]= %.2f ... %.2f K | u[0:%3d]= %.5e ... %.5e molec/cm^2 | eps[0:%3d]= %.5e ... %.5e",
5105 ip, tbl->p[id][ig][ip], tbl->nt[id][ig][ip] - 1,
5106 tbl->t[id][ig][ip][0],
5107 tbl->t[id][ig][ip][tbl->nt[id][ig][ip] - 1],
5108 tbl->nu[id][ig][ip][0] - 1, tbl->u[id][ig][ip][0][0],
5109 tbl->u[id][ig][ip][0][tbl->nu[id][ig][ip][0] - 1],
5110 tbl->nu[id][ig][ip][0] - 1, tbl->eps[id][ig][ip][0][0],
5111 tbl->eps[id][ig][ip][0][tbl->nu[id][ig][ip][0] - 1]);
5112 }
5113}
5114
5115/*****************************************************************************/
5116
5118 int argc,
5119 char *argv[],
5120 const char *varname,
5121 int arridx,
5122 const char *defvalue,
5123 char *value) {
5124
5125 FILE *in = NULL;
5126
5127 char dummy[LEN], fullname1[LEN], fullname2[LEN], line[LEN],
5128 rvarname[LEN], rval[LEN];
5129
5130 int contain = 0;
5131
5132 /* Open file... */
5133 if (argv[1][0] != '-')
5134 if (!(in = fopen(argv[1], "r")))
5135 ERRMSG("Cannot open file!");
5136
5137 /* Set full variable name... */
5138 if (arridx >= 0) {
5139 sprintf(fullname1, "%s[%d]", varname, arridx);
5140 sprintf(fullname2, "%s[*]", varname);
5141 } else {
5142 sprintf(fullname1, "%s", varname);
5143 sprintf(fullname2, "%s", varname);
5144 }
5145
5146 /* Read data... */
5147 if (in != NULL)
5148 while (fgets(line, LEN, in))
5149 if (sscanf(line, "%s %s %s", rvarname, dummy, rval) == 3)
5150 if (strcasecmp(rvarname, fullname1) == 0 ||
5151 strcasecmp(rvarname, fullname2) == 0) {
5152 contain = 1;
5153 break;
5154 }
5155 for (int i = 1; i < argc - 1; i++)
5156 if (strcasecmp(argv[i], fullname1) == 0 ||
5157 strcasecmp(argv[i], fullname2) == 0) {
5158 sprintf(rval, "%s", argv[i + 1]);
5159 contain = 1;
5160 break;
5161 }
5162
5163 /* Close file... */
5164 if (in != NULL)
5165 fclose(in);
5166
5167 /* Check for missing variables... */
5168 if (!contain) {
5169 if (strlen(defvalue) > 0)
5170 sprintf(rval, "%s", defvalue);
5171 else
5172 ERRMSG("Missing variable %s!\n", fullname1);
5173 }
5174
5175 /* Write info... */
5176 LOG(1, "%s = %s", fullname1, rval);
5177
5178 /* Return values... */
5179 if (value != NULL)
5180 sprintf(value, "%s", rval);
5181 return atof(rval);
5182}
5183
5184/*****************************************************************************/
5185
5186double sza(
5187 const double sec,
5188 const double lon,
5189 const double lat) {
5190
5191 /* Number of days and fraction with respect to 2000-01-01T12:00Z... */
5192 const double D = sec / 86400 - 0.5;
5193
5194 /* Geocentric apparent ecliptic longitude [rad]... */
5195 const double g = DEG2RAD(357.529 + 0.98560028 * D);
5196 const double q = 280.459 + 0.98564736 * D;
5197 const double L = DEG2RAD(q + 1.915 * sin(g) + 0.020 * sin(2 * g));
5198
5199 /* Mean obliquity of the ecliptic [rad]... */
5200 const double e = DEG2RAD(23.439 - 0.00000036 * D);
5201
5202 /* Declination [rad]... */
5203 const double dec = asin(sin(e) * sin(L));
5204
5205 /* Right ascension [rad]... */
5206 const double ra = atan2(cos(e) * sin(L), cos(L));
5207
5208 /* Greenwich Mean Sidereal Time [h]... */
5209 const double GMST = 18.697374558 + 24.06570982441908 * D;
5210
5211 /* Local Sidereal Time [h]... */
5212 const double LST = GMST + lon / 15;
5213
5214 /* Hour angle [rad]... */
5215 const double h = LST / 12 * M_PI - ra;
5216
5217 /* Convert latitude... */
5218 const double latr = DEG2RAD(lat);
5219
5220 /* Return solar zenith angle [deg]... */
5221 return RAD2DEG(acos(sin(latr) * sin(dec) + cos(latr) * cos(dec) * cos(h)));
5222}
5223
5224/*****************************************************************************/
5225
5227 const los_t * los,
5228 double *tpz,
5229 double *tplon,
5230 double *tplat) {
5231
5232 double dummy, v[3], v0[3], v2[3];
5233
5234 /* Find minimum altitude... */
5235 size_t ip = gsl_stats_min_index(los->z, 1, (size_t) los->np);
5236
5237 /* Nadir or zenith... */
5238 if (ip <= 0 || ip >= (size_t) los->np - 1) {
5239 *tpz = los->z[los->np - 1];
5240 *tplon = los->lon[los->np - 1];
5241 *tplat = los->lat[los->np - 1];
5242 }
5243
5244 /* Limb... */
5245 else {
5246
5247 /* Determine interpolating polynomial y=a*x^2+b*x+c... */
5248 double yy0 = los->z[ip - 1];
5249 double yy1 = los->z[ip];
5250 double yy2 = los->z[ip + 1];
5251 double x1 = sqrt(POW2(los->ds[ip]) - POW2(yy1 - yy0));
5252 double x2 = x1 + sqrt(POW2(los->ds[ip + 1]) - POW2(yy2 - yy1));
5253 double a = 1 / (x1 - x2) * (-(yy0 - yy1) / x1 + (yy0 - yy2) / x2);
5254 double b = -(yy0 - yy1) / x1 - a * x1;
5255 double c = yy0;
5256
5257 /* Get tangent point location... */
5258 double x = -b / (2 * a);
5259 *tpz = a * x * x + b * x + c;
5260 geo2cart(los->z[ip - 1], los->lon[ip - 1], los->lat[ip - 1], v0);
5261 geo2cart(los->z[ip + 1], los->lon[ip + 1], los->lat[ip + 1], v2);
5262 for (int i = 0; i < 3; i++)
5263 v[i] = LIN(0.0, v0[i], x2, v2[i], x);
5264 cart2geo(v, &dummy, tplon, tplat);
5265 }
5266}
5267
5268/*****************************************************************************/
5269
5271 const int year,
5272 const int mon,
5273 const int day,
5274 const int hour,
5275 const int min,
5276 const int sec,
5277 const double remain,
5278 double *jsec) {
5279
5280 struct tm t0, t1;
5281
5282 t0.tm_year = 100;
5283 t0.tm_mon = 0;
5284 t0.tm_mday = 1;
5285 t0.tm_hour = 0;
5286 t0.tm_min = 0;
5287 t0.tm_sec = 0;
5288
5289 t1.tm_year = year - 1900;
5290 t1.tm_mon = mon - 1;
5291 t1.tm_mday = day;
5292 t1.tm_hour = hour;
5293 t1.tm_min = min;
5294 t1.tm_sec = sec;
5295
5296 *jsec = (double) timegm(&t1) - (double) timegm(&t0) + remain;
5297}
5298
5299/*****************************************************************************/
5300
5302 const char *name,
5303 const char *file,
5304 const char *func,
5305 int line,
5306 int mode) {
5307
5308 static double w0[10];
5309
5310 static int l0[10], nt;
5311
5312 /* Start new timer... */
5313 if (mode == 1) {
5314 w0[nt] = omp_get_wtime();
5315 l0[nt] = line;
5316 if ((++nt) >= 10)
5317 ERRMSG("Too many timers!");
5318 }
5319
5320 /* Write elapsed time... */
5321 else {
5322
5323 /* Check timer index... */
5324 if (nt - 1 < 0)
5325 ERRMSG("Coding error!");
5326
5327 /* Write elapsed time... */
5328 LOG(1, "Timer '%s' (%s, %s, l%d-%d): %.3f sec",
5329 name, file, func, l0[nt - 1], line, omp_get_wtime() - w0[nt - 1]);
5330 }
5331
5332 /* Stop timer... */
5333 if (mode == 3)
5334 nt--;
5335}
5336
5337/*****************************************************************************/
5338
5340 const char *dirname,
5341 const char *filename,
5342 const ctl_t * ctl,
5343 const atm_t * atm) {
5344
5345 FILE *out;
5346
5347 char file[LEN];
5348
5349 int n = 6;
5350
5351 /* Set filename... */
5352 if (dirname != NULL)
5353 sprintf(file, "%s/%s", dirname, filename);
5354 else
5355 sprintf(file, "%s", filename);
5356
5357 /* Write info... */
5358 LOG(1, "Write atmospheric data: %s", file);
5359
5360 /* Create file... */
5361 if (!(out = fopen(file, "w")))
5362 ERRMSG("Cannot create file!");
5363
5364 /* Write header... */
5365 fprintf(out,
5366 "# $1 = time (seconds since 2000-01-01T00:00Z)\n"
5367 "# $2 = altitude [km]\n"
5368 "# $3 = longitude [deg]\n"
5369 "# $4 = latitude [deg]\n"
5370 "# $5 = pressure [hPa]\n" "# $6 = temperature [K]\n");
5371 for (int ig = 0; ig < ctl->ng; ig++)
5372 fprintf(out, "# $%d = %s volume mixing ratio [ppv]\n",
5373 ++n, ctl->emitter[ig]);
5374 for (int iw = 0; iw < ctl->nw; iw++)
5375 fprintf(out, "# $%d = extinction (window %d) [km^-1]\n", ++n, iw);
5376 if (ctl->ncl > 0) {
5377 fprintf(out, "# $%d = cloud layer height [km]\n", ++n);
5378 fprintf(out, "# $%d = cloud layer depth [km]\n", ++n);
5379 for (int icl = 0; icl < ctl->ncl; icl++)
5380 fprintf(out, "# $%d = cloud layer extinction (%.4f cm^-1) [km^-1]\n",
5381 ++n, ctl->clnu[icl]);
5382 }
5383 if (ctl->nsf > 0) {
5384 fprintf(out, "# $%d = surface layer height [km]\n", ++n);
5385 fprintf(out, "# $%d = surface layer pressure [hPa]\n", ++n);
5386 fprintf(out, "# $%d = surface layer temperature [K]\n", ++n);
5387 for (int isf = 0; isf < ctl->nsf; isf++)
5388 fprintf(out, "# $%d = surface layer emissivity (%.4f cm^-1)\n",
5389 ++n, ctl->sfnu[isf]);
5390 }
5391
5392 /* Write data... */
5393 for (int ip = 0; ip < atm->np; ip++) {
5394 if (ip == 0 || atm->time[ip] != atm->time[ip - 1])
5395 fprintf(out, "\n");
5396 fprintf(out, "%.2f %g %g %g %g %g", atm->time[ip], atm->z[ip],
5397 atm->lon[ip], atm->lat[ip], atm->p[ip], atm->t[ip]);
5398 for (int ig = 0; ig < ctl->ng; ig++)
5399 fprintf(out, " %g", atm->q[ig][ip]);
5400 for (int iw = 0; iw < ctl->nw; iw++)
5401 fprintf(out, " %g", atm->k[iw][ip]);
5402 if (ctl->ncl > 0) {
5403 fprintf(out, " %g %g", atm->clz, atm->cldz);
5404 for (int icl = 0; icl < ctl->ncl; icl++)
5405 fprintf(out, " %g", atm->clk[icl]);
5406 }
5407 if (ctl->nsf > 0) {
5408 fprintf(out, " %g %g %g", atm->sfz, atm->sfp, atm->sft);
5409 for (int isf = 0; isf < ctl->nsf; isf++)
5410 fprintf(out, " %g", atm->sfeps[isf]);
5411 }
5412 fprintf(out, "\n");
5413 }
5414
5415 /* Close file... */
5416 fclose(out);
5417
5418 /* Write info... */
5419 double mini, maxi;
5420 LOG(2, "Number of data points: %d", atm->np);
5421 gsl_stats_minmax(&mini, &maxi, atm->time, 1, (size_t) atm->np);
5422 LOG(2, "Time range: %.2f ... %.2f s", mini, maxi);
5423 gsl_stats_minmax(&mini, &maxi, atm->z, 1, (size_t) atm->np);
5424 LOG(2, "Altitude range: %g ... %g km", mini, maxi);
5425 gsl_stats_minmax(&mini, &maxi, atm->lon, 1, (size_t) atm->np);
5426 LOG(2, "Longitude range: %g ... %g deg", mini, maxi);
5427 gsl_stats_minmax(&mini, &maxi, atm->lat, 1, (size_t) atm->np);
5428 LOG(2, "Latitude range: %g ... %g deg", mini, maxi);
5429 gsl_stats_minmax(&mini, &maxi, atm->p, 1, (size_t) atm->np);
5430 LOG(2, "Pressure range: %g ... %g hPa", maxi, mini);
5431 gsl_stats_minmax(&mini, &maxi, atm->t, 1, (size_t) atm->np);
5432 LOG(2, "Temperature range: %g ... %g K", mini, maxi);
5433 for (int ig = 0; ig < ctl->ng; ig++) {
5434 gsl_stats_minmax(&mini, &maxi, atm->q[ig], 1, (size_t) atm->np);
5435 LOG(2, "Emitter %s range: %g ... %g ppv", ctl->emitter[ig], mini, maxi);
5436 }
5437 for (int iw = 0; iw < ctl->nw; iw++) {
5438 gsl_stats_minmax(&mini, &maxi, atm->k[iw], 1, (size_t) atm->np);
5439 LOG(2, "Extinction range (window %d): %g ... %g km^-1", iw, mini, maxi);
5440 }
5441 if (ctl->ncl > 0 && atm->np == 0) {
5442 LOG(2, "Cloud layer: z= %g km | dz= %g km | k= %g ... %g km^-1",
5443 atm->clz, atm->cldz, atm->clk[0], atm->clk[ctl->ncl - 1]);
5444 } else
5445 LOG(2, "Cloud layer: none");
5446 if (ctl->nsf > 0 && atm->np == 0) {
5447 LOG(2,
5448 "Surface layer: z_s= %g km | p_s= %g hPa | T_s = %g K | eps= %g ... %g",
5449 atm->sfz, atm->sfp, atm->sft, atm->sfeps[0],
5450 atm->sfeps[ctl->nsf - 1]);
5451 } else
5452 LOG(2, "Surface layer: none");
5453}
5454
5455/*****************************************************************************/
5456
5458 const char *filename,
5459 const ctl_t * ctl,
5460 const atm_t * atm) {
5461
5462 FILE *out;
5463
5464 /* Write info... */
5465 LOG(1, "Write RFM data: %s", filename);
5466
5467 /* Create file... */
5468 if (!(out = fopen(filename, "w")))
5469 ERRMSG("Cannot create file!");
5470
5471 /* Write data... */
5472 fprintf(out, "%d\n", atm->np);
5473 fprintf(out, "*HGT [km]\n");
5474 for (int ip = 0; ip < atm->np; ip++)
5475 fprintf(out, "%g\n", atm->z[ip]);
5476 fprintf(out, "*PRE [mb]\n");
5477 for (int ip = 0; ip < atm->np; ip++)
5478 fprintf(out, "%g\n", atm->p[ip]);
5479 fprintf(out, "*TEM [K]\n");
5480 for (int ip = 0; ip < atm->np; ip++)
5481 fprintf(out, "%g\n", atm->t[ip]);
5482 for (int ig = 0; ig < ctl->ng; ig++) {
5483 fprintf(out, "*%s [ppmv]\n", ctl->emitter[ig]);
5484 for (int ip = 0; ip < atm->np; ip++)
5485 fprintf(out, "%g\n", atm->q[ig][ip] * 1e6);
5486 }
5487 fprintf(out, "*END\n");
5488
5489 /* Close file... */
5490 fclose(out);
5491}
5492
5493/*****************************************************************************/
5494
5496 const char *dirname,
5497 const char *filename,
5498 const ctl_t * ctl,
5499 const gsl_matrix * matrix,
5500 const atm_t * atm,
5501 const obs_t * obs,
5502 const char *rowspace,
5503 const char *colspace,
5504 const char *sort) {
5505
5506 FILE *out;
5507
5508 char file[LEN], quantity[LEN];
5509
5510 int *cida, *ciqa, *cipa, *cira, *rida, *riqa, *ripa, *rira;
5511
5512 size_t i, j, nc, nr;
5513
5514 /* Check output flag... */
5515 if (!ctl->write_matrix)
5516 return;
5517
5518 /* Allocate... */
5519 ALLOC(cida, int,
5520 M);
5521 ALLOC(ciqa, int,
5522 N);
5523 ALLOC(cipa, int,
5524 N);
5525 ALLOC(cira, int,
5526 M);
5527 ALLOC(rida, int,
5528 M);
5529 ALLOC(riqa, int,
5530 N);
5531 ALLOC(ripa, int,
5532 N);
5533 ALLOC(rira, int,
5534 M);
5535
5536 /* Set filename... */
5537 if (dirname != NULL)
5538 sprintf(file, "%s/%s", dirname, filename);
5539 else
5540 sprintf(file, "%s", filename);
5541
5542 /* Write info... */
5543 LOG(1, "Write matrix: %s", file);
5544
5545 /* Create file... */
5546 if (!(out = fopen(file, "w")))
5547 ERRMSG("Cannot create file!");
5548
5549 /* Write header (row space)... */
5550 if (rowspace[0] == 'y') {
5551
5552 fprintf(out,
5553 "# $1 = Row: index (measurement space)\n"
5554 "# $2 = Row: channel wavenumber [cm^-1]\n"
5555 "# $3 = Row: time (seconds since 2000-01-01T00:00Z)\n"
5556 "# $4 = Row: view point altitude [km]\n"
5557 "# $5 = Row: view point longitude [deg]\n"
5558 "# $6 = Row: view point latitude [deg]\n");
5559
5560 /* Get number of rows... */
5561 nr = obs2y(ctl, obs, NULL, rida, rira);
5562
5563 } else {
5564
5565 fprintf(out,
5566 "# $1 = Row: index (state space)\n"
5567 "# $2 = Row: name of quantity\n"
5568 "# $3 = Row: time (seconds since 2000-01-01T00:00Z)\n"
5569 "# $4 = Row: altitude [km]\n"
5570 "# $5 = Row: longitude [deg]\n" "# $6 = Row: latitude [deg]\n");
5571
5572 /* Get number of rows... */
5573 nr = atm2x(ctl, atm, NULL, riqa, ripa);
5574 }
5575
5576 /* Write header (column space)... */
5577 if (colspace[0] == 'y') {
5578
5579 fprintf(out,
5580 "# $7 = Col: index (measurement space)\n"
5581 "# $8 = Col: channel wavenumber [cm^-1]\n"
5582 "# $9 = Col: time (seconds since 2000-01-01T00:00Z)\n"
5583 "# $10 = Col: view point altitude [km]\n"
5584 "# $11 = Col: view point longitude [deg]\n"
5585 "# $12 = Col: view point latitude [deg]\n");
5586
5587 /* Get number of columns... */
5588 nc = obs2y(ctl, obs, NULL, cida, cira);
5589
5590 } else {
5591
5592 fprintf(out,
5593 "# $7 = Col: index (state space)\n"
5594 "# $8 = Col: name of quantity\n"
5595 "# $9 = Col: time (seconds since 2000-01-01T00:00Z)\n"
5596 "# $10 = Col: altitude [km]\n"
5597 "# $11 = Col: longitude [deg]\n" "# $12 = Col: latitude [deg]\n");
5598
5599 /* Get number of columns... */
5600 nc = atm2x(ctl, atm, NULL, ciqa, cipa);
5601 }
5602
5603 /* Write header entry... */
5604 fprintf(out, "# $13 = Matrix element\n\n");
5605
5606 /* Write matrix data... */
5607 i = j = 0;
5608 while (i < nr && j < nc) {
5609
5610 /* Write info about the row... */
5611 if (rowspace[0] == 'y')
5612 fprintf(out, "%d %.4f %.2f %g %g %g",
5613 (int) i, ctl->nu[rida[i]],
5614 obs->time[rira[i]], obs->vpz[rira[i]],
5615 obs->vplon[rira[i]], obs->vplat[rira[i]]);
5616 else {
5617 idx2name(ctl, riqa[i], quantity);
5618 fprintf(out, "%d %s %.2f %g %g %g", (int) i, quantity,
5619 atm->time[ripa[i]], atm->z[ripa[i]],
5620 atm->lon[ripa[i]], atm->lat[ripa[i]]);
5621 }
5622
5623 /* Write info about the column... */
5624 if (colspace[0] == 'y')
5625 fprintf(out, " %d %.4f %.2f %g %g %g",
5626 (int) j, ctl->nu[cida[j]],
5627 obs->time[cira[j]], obs->vpz[cira[j]],
5628 obs->vplon[cira[j]], obs->vplat[cira[j]]);
5629 else {
5630 idx2name(ctl, ciqa[j], quantity);
5631 fprintf(out, " %d %s %.2f %g %g %g", (int) j, quantity,
5632 atm->time[cipa[j]], atm->z[cipa[j]],
5633 atm->lon[cipa[j]], atm->lat[cipa[j]]);
5634 }
5635
5636 /* Write matrix entry... */
5637 fprintf(out, " %g\n", gsl_matrix_get(matrix, i, j));
5638
5639 /* Set matrix indices... */
5640 if (sort[0] == 'r') {
5641 j++;
5642 if (j >= nc) {
5643 j = 0;
5644 i++;
5645 fprintf(out, "\n");
5646 }
5647 } else {
5648 i++;
5649 if (i >= nr) {
5650 i = 0;
5651 j++;
5652 fprintf(out, "\n");
5653 }
5654 }
5655 }
5656
5657 /* Close file... */
5658 fclose(out);
5659
5660 /* Free... */
5661 free(cida);
5662 free(ciqa);
5663 free(cipa);
5664 free(cira);
5665 free(rida);
5666 free(riqa);
5667 free(ripa);
5668 free(rira);
5669}
5670
5671/*****************************************************************************/
5672
5674 const char *dirname,
5675 const char *filename,
5676 const ctl_t * ctl,
5677 const obs_t * obs) {
5678
5679 FILE *out;
5680
5681 char file[LEN];
5682
5683 int n = 10;
5684
5685 /* Set filename... */
5686 if (dirname != NULL)
5687 sprintf(file, "%s/%s", dirname, filename);
5688 else
5689 sprintf(file, "%s", filename);
5690
5691 /* Write info... */
5692 LOG(1, "Write observation data: %s", file);
5693
5694 /* Create file... */
5695 if (!(out = fopen(file, "w")))
5696 ERRMSG("Cannot create file!");
5697
5698 /* Write header... */
5699 fprintf(out,
5700 "# $1 = time (seconds since 2000-01-01T00:00Z)\n"
5701 "# $2 = observer altitude [km]\n"
5702 "# $3 = observer longitude [deg]\n"
5703 "# $4 = observer latitude [deg]\n"
5704 "# $5 = view point altitude [km]\n"
5705 "# $6 = view point longitude [deg]\n"
5706 "# $7 = view point latitude [deg]\n"
5707 "# $8 = tangent point altitude [km]\n"
5708 "# $9 = tangent point longitude [deg]\n"
5709 "# $10 = tangent point latitude [deg]\n");
5710 for (int id = 0; id < ctl->nd; id++)
5711 if (ctl->write_bbt)
5712 fprintf(out, "# $%d = brightness temperature (%.4f cm^-1) [K]\n",
5713 ++n, ctl->nu[id]);
5714 else
5715 fprintf(out, "# $%d = radiance (%.4f cm^-1) [W/(m^2 sr cm^-1)]\n",
5716 ++n, ctl->nu[id]);
5717 for (int id = 0; id < ctl->nd; id++)
5718 fprintf(out, "# $%d = transmittance (%.4f cm^-1) [-]\n", ++n,
5719 ctl->nu[id]);
5720
5721 /* Write data... */
5722 for (int ir = 0; ir < obs->nr; ir++) {
5723 if (ir == 0 || obs->time[ir] != obs->time[ir - 1])
5724 fprintf(out, "\n");
5725 fprintf(out, "%.2f %g %g %g %g %g %g %g %g %g", obs->time[ir],
5726 obs->obsz[ir], obs->obslon[ir], obs->obslat[ir],
5727 obs->vpz[ir], obs->vplon[ir], obs->vplat[ir],
5728 obs->tpz[ir], obs->tplon[ir], obs->tplat[ir]);
5729 for (int id = 0; id < ctl->nd; id++)
5730 fprintf(out, " %g", obs->rad[id][ir]);
5731 for (int id = 0; id < ctl->nd; id++)
5732 fprintf(out, " %g", obs->tau[id][ir]);
5733 fprintf(out, "\n");
5734 }
5735
5736 /* Close file... */
5737 fclose(out);
5738
5739 /* Write info... */
5740 double mini, maxi;
5741 LOG(2, "Number of ray paths: %d", obs->nr);
5742 gsl_stats_minmax(&mini, &maxi, obs->time, 1, (size_t) obs->nr);
5743 LOG(2, "Time range: %.2f ... %.2f s", mini, maxi);
5744 gsl_stats_minmax(&mini, &maxi, obs->obsz, 1, (size_t) obs->nr);
5745 LOG(2, "Observer altitude range: %g ... %g km", mini, maxi);
5746 gsl_stats_minmax(&mini, &maxi, obs->obslon, 1, (size_t) obs->nr);
5747 LOG(2, "Observer longitude range: %g ... %g deg", mini, maxi);
5748 gsl_stats_minmax(&mini, &maxi, obs->obslat, 1, (size_t) obs->nr);
5749 LOG(2, "Observer latitude range: %g ... %g deg", mini, maxi);
5750 gsl_stats_minmax(&mini, &maxi, obs->vpz, 1, (size_t) obs->nr);
5751 LOG(2, "View point altitude range: %g ... %g km", mini, maxi);
5752 gsl_stats_minmax(&mini, &maxi, obs->vplon, 1, (size_t) obs->nr);
5753 LOG(2, "View point longitude range: %g ... %g deg", mini, maxi);
5754 gsl_stats_minmax(&mini, &maxi, obs->vplat, 1, (size_t) obs->nr);
5755 LOG(2, "View point latitude range: %g ... %g deg", mini, maxi);
5756 gsl_stats_minmax(&mini, &maxi, obs->tpz, 1, (size_t) obs->nr);
5757 LOG(2, "Tangent point altitude range: %g ... %g km", mini, maxi);
5758 gsl_stats_minmax(&mini, &maxi, obs->tplon, 1, (size_t) obs->nr);
5759 LOG(2, "Tangent point longitude range: %g ... %g deg", mini, maxi);
5760 gsl_stats_minmax(&mini, &maxi, obs->tplat, 1, (size_t) obs->nr);
5761 LOG(2, "Tangent point latitude range: %g ... %g deg", mini, maxi);
5762 for (int id = 0; id < ctl->nd; id++) {
5763 gsl_stats_minmax(&mini, &maxi, obs->rad[id], 1, (size_t) obs->nr);
5764 if (ctl->write_bbt) {
5765 LOG(2, "Brightness temperature (%.4f cm^-1) range: %g ... %g K",
5766 ctl->nu[id], mini, maxi);
5767 } else {
5768 LOG(2, "Radiance (%.4f cm^-1) range: %g ... %g W/(m^2 sr cm^-1)",
5769 ctl->nu[id], mini, maxi);
5770 }
5771 }
5772 for (int id = 0; id < ctl->nd; id++) {
5773 gsl_stats_minmax(&mini, &maxi, obs->tau[id], 1, (size_t) obs->nr);
5774 if (ctl->write_bbt) {
5775 LOG(2, "Transmittance (%.4f cm^-1) range: %g ... %g",
5776 ctl->nu[id], mini, maxi);
5777 }
5778 }
5779}
5780
5781/*****************************************************************************/
5782
5784 const char *filename,
5785 const double *x,
5786 const double *y,
5787 const int n) {
5788
5789 FILE *out;
5790
5791 /* Write info... */
5792 LOG(1, "Write shape function: %s", filename);
5793
5794 /* Create file... */
5795 if (!(out = fopen(filename, "w")))
5796 ERRMSG("Cannot create file!");
5797
5798 /* Write header... */
5799 fprintf(out,
5800 "# $1 = shape function x-value [-]\n"
5801 "# $2 = shape function y-value [-]\n\n");
5802
5803 /* Write data... */
5804 for (int i = 0; i < n; i++)
5805 fprintf(out, "%.10g %.10g\n", x[i], y[i]);
5806
5807 /* Close file... */
5808 fclose(out);
5809}
5810
5811/*****************************************************************************/
5812
5814 const ctl_t * ctl,
5815 const tbl_t * tbl) {
5816
5817 FILE *out;
5818
5819 char filename[2 * LEN];
5820
5821 /* Loop over emitters and detectors... */
5822 for (int ig = 0; ig < ctl->ng; ig++)
5823 for (int id = 0; id < ctl->nd; id++) {
5824
5825 /* Set filename... */
5826 sprintf(filename, "%s_%.4f_%s.%s", ctl->tblbase,
5827 ctl->nu[id], ctl->emitter[ig],
5828 ctl->tblfmt == 1 ? "tab" : "bin");
5829
5830 /* Write info... */
5831 LOG(1, "Write emissivity table: %s", filename);
5832
5833 /* Create file... */
5834 if (!(out = fopen(filename, "w")))
5835 ERRMSG("Cannot create file!");
5836
5837 /* Write ASCII data... */
5838 if (ctl->tblfmt == 1) {
5839
5840 /* Write header... */
5841 fprintf(out,
5842 "# $1 = pressure [hPa]\n"
5843 "# $2 = temperature [K]\n"
5844 "# $3 = column density [molecules/cm^2]\n"
5845 "# $4 = emissivity [-]\n");
5846
5847 /* Save table file... */
5848 for (int ip = 0; ip < tbl->np[id][ig]; ip++)
5849 for (int it = 0; it < tbl->nt[id][ig][ip]; it++) {
5850 fprintf(out, "\n");
5851 for (int iu = 0; iu < tbl->nu[id][ig][ip][it]; iu++)
5852 fprintf(out, "%g %g %e %e\n",
5853 tbl->p[id][ig][ip], tbl->t[id][ig][ip][it],
5854 tbl->u[id][ig][ip][it][iu],
5855 tbl->eps[id][ig][ip][it][iu]);
5856 }
5857 }
5858
5859 /* Write binary data... */
5860 else if (ctl->tblfmt == 2) {
5861 FWRITE(&tbl->np[id][ig], int,
5862 1,
5863 out);
5864 FWRITE(tbl->p[id][ig], double,
5865 (size_t) tbl->np[id][ig],
5866 out);
5867 for (int ip = 0; ip < tbl->np[id][ig]; ip++) {
5868 FWRITE(&tbl->nt[id][ig][ip], int,
5869 1,
5870 out);
5871 FWRITE(tbl->t[id][ig][ip], double,
5872 (size_t) tbl->nt[id][ig][ip],
5873 out);
5874 for (int it = 0; it < tbl->nt[id][ig][ip]; it++) {
5875 FWRITE(&tbl->nu[id][ig][ip][it], int,
5876 1,
5877 out);
5878 FWRITE(tbl->u[id][ig][ip][it], float,
5879 (size_t) tbl->nu[id][ig][ip][it],
5880 out);
5881 FWRITE(tbl->eps[id][ig][ip][it], float,
5882 (size_t) tbl->nu[id][ig][ip][it],
5883 out);
5884 }
5885 }
5886 }
5887
5888 /* Error message... */
5889 else
5890 ERRMSG("Unknown look-up table format!");
5891
5892 /* Close file... */
5893 fclose(out);
5894 }
5895}
5896
5897/*****************************************************************************/
5898
5900 const ctl_t * ctl,
5901 const gsl_vector * x,
5902 atm_t * atm) {
5903
5904 size_t n = 0;
5905
5906 /* Get pressure... */
5907 for (int ip = 0; ip < atm->np; ip++)
5908 if (atm->z[ip] >= ctl->retp_zmin && atm->z[ip] <= ctl->retp_zmax)
5909 x2atm_help(&atm->p[ip], x, &n);
5910
5911 /* Get temperature... */
5912 for (int ip = 0; ip < atm->np; ip++)
5913 if (atm->z[ip] >= ctl->rett_zmin && atm->z[ip] <= ctl->rett_zmax)
5914 x2atm_help(&atm->t[ip], x, &n);
5915
5916 /* Get volume mixing ratio... */
5917 for (int ig = 0; ig < ctl->ng; ig++)
5918 for (int ip = 0; ip < atm->np; ip++)
5919 if (atm->z[ip] >= ctl->retq_zmin[ig]
5920 && atm->z[ip] <= ctl->retq_zmax[ig])
5921 x2atm_help(&atm->q[ig][ip], x, &n);
5922
5923 /* Get extinction... */
5924 for (int iw = 0; iw < ctl->nw; iw++)
5925 for (int ip = 0; ip < atm->np; ip++)
5926 if (atm->z[ip] >= ctl->retk_zmin[iw]
5927 && atm->z[ip] <= ctl->retk_zmax[iw])
5928 x2atm_help(&atm->k[iw][ip], x, &n);
5929
5930 /* Get cloud data... */
5931 if (ctl->ret_clz)
5932 x2atm_help(&atm->clz, x, &n);
5933 if (ctl->ret_cldz)
5934 x2atm_help(&atm->cldz, x, &n);
5935 if (ctl->ret_clk)
5936 for (int icl = 0; icl < ctl->ncl; icl++)
5937 x2atm_help(&atm->clk[icl], x, &n);
5938
5939 /* Get surface data... */
5940 if (ctl->ret_sfz)
5941 x2atm_help(&atm->sfz, x, &n);
5942 if (ctl->ret_sfp)
5943 x2atm_help(&atm->sfp, x, &n);
5944 if (ctl->ret_sft)
5945 x2atm_help(&atm->sft, x, &n);
5946 if (ctl->ret_sfeps)
5947 for (int isf = 0; isf < ctl->nsf; isf++)
5948 x2atm_help(&atm->sfeps[isf], x, &n);
5949}
5950
5951/*****************************************************************************/
5952
5954 double *value,
5955 const gsl_vector * x,
5956 size_t *n) {
5957
5958 /* Get state vector element... */
5959 *value = gsl_vector_get(x, *n);
5960 (*n)++;
5961}
5962
5963/*****************************************************************************/
5964
5966 const ctl_t * ctl,
5967 const gsl_vector * y,
5968 obs_t * obs) {
5969
5970 size_t m = 0;
5971
5972 /* Decompose measurement vector... */
5973 for (int ir = 0; ir < obs->nr; ir++)
5974 for (int id = 0; id < ctl->nd; id++)
5975 if (isfinite(obs->rad[id][ir])) {
5976 obs->rad[id][ir] = gsl_vector_get(y, m);
5977 m++;
5978 }
5979}
void read_matrix(const char *dirname, const char *filename, gsl_matrix *matrix)
Read matrix.
Definition: jurassic.c:4660
void timer(const char *name, const char *file, const char *func, int line, int mode)
Measure wall-clock time.
Definition: jurassic.c:5301
void read_rfm_spec(const char *filename, double *nu, double *rad, int *npts)
Read RFM spectrum.
Definition: jurassic.c:4859
void read_tbl(const ctl_t *ctl, tbl_t *tbl)
Read look-up table data.
Definition: jurassic.c:4952
void write_atm(const char *dirname, const char *filename, const ctl_t *ctl, const atm_t *atm)
Write atmospheric data.
Definition: jurassic.c:5339
int locate_reg(const double *xx, const int n, const double x)
Find array index for regular grid.
Definition: jurassic.c:4137
void intpol_tbl_ega(const ctl_t *ctl, const tbl_t *tbl, const los_t *los, const int ip, double tau_path[ND][NG], double tau_seg[ND])
Get transmittance from look-up tables (EGA method).
Definition: jurassic.c:3799
double read_obs_rfm(const char *basename, const double z, double *nu, double *f, int n)
Read observation data in RFM format.
Definition: jurassic.c:4801
void formod_rfm(const ctl_t *ctl, const atm_t *atm, obs_t *obs)
Apply RFM for radiative transfer calculations.
Definition: jurassic.c:3342
double ctmo2(const double nu, const double p, const double t)
Compute oxygen continuum (absorption coefficient).
Definition: jurassic.c:2861
void idx2name(const ctl_t *ctl, const int idx, char *quantity)
Determine name of state vector quantity for given index.
Definition: jurassic.c:3586
void read_ctl(int argc, char *argv[], ctl_t *ctl)
Read forward model control parameters.
Definition: jurassic.c:4550
void formod_continua(const ctl_t *ctl, const los_t *los, const int ip, double *beta)
Compute absorption coefficient of continua.
Definition: jurassic.c:3075
void raytrace(const ctl_t *ctl, const atm_t *atm, obs_t *obs, los_t *los, const int ir)
Do ray-tracing to determine LOS.
Definition: jurassic.c:4205
int locate_irr(const double *xx, const int n, const double x)
Find array index for irregular grid.
Definition: jurassic.c:4107
void time2jsec(const int year, const int mon, const int day, const int hour, const int min, const int sec, const double remain, double *jsec)
Convert date to seconds.
Definition: jurassic.c:5270
void x2atm(const ctl_t *ctl, const gsl_vector *x, atm_t *atm)
Decompose parameter vector or state vector.
Definition: jurassic.c:5899
void atm2x_help(const double value, const int value_iqa, const int value_ip, gsl_vector *x, int *iqa, int *ipa, size_t *n)
Add element to state vector.
Definition: jurassic.c:87
double ctmh2o(const double nu, const double p, const double t, const double q, const double u)
Compute water vapor continuum (optical depth).
Definition: jurassic.c:1746
void intpol_tbl_cga(const ctl_t *ctl, const tbl_t *tbl, const los_t *los, const int ip, double tau_path[ND][NG], double tau_seg[ND])
Get transmittance from look-up tables (CGA method).
Definition: jurassic.c:3710
void write_atm_rfm(const char *filename, const ctl_t *ctl, const atm_t *atm)
Write atmospheric data in RFM format.
Definition: jurassic.c:5457
double intpol_tbl_u(const tbl_t *tbl, const int ig, const int id, const int ip, const int it, const double eps)
Interpolate column density from look-up tables.
Definition: jurassic.c:3933
double intpol_tbl_eps(const tbl_t *tbl, const int ig, const int id, const int ip, const int it, const double u)
Interpolate emissivity from look-up tables.
Definition: jurassic.c:3894
void write_tbl(const ctl_t *ctl, const tbl_t *tbl)
Write look-up table data.
Definition: jurassic.c:5813
void intpol_atm(const ctl_t *ctl, const atm_t *atm, const double z, double *p, double *t, double *q, double *k)
Interpolate atmospheric data.
Definition: jurassic.c:3685
int find_emitter(const ctl_t *ctl, const char *emitter)
Find index of an emitter.
Definition: jurassic.c:3013
void formod_pencil(const ctl_t *ctl, const atm_t *atm, obs_t *obs, const int ir)
Compute radiative transfer for a pencil beam.
Definition: jurassic.c:3196
double sza(const double sec, const double lon, const double lat)
Calculate solar zenith angle.
Definition: jurassic.c:5186
void tangent_point(const los_t *los, double *tpz, double *tplon, double *tplat)
Find tangent point of a given LOS.
Definition: jurassic.c:5226
void formod(const ctl_t *ctl, atm_t *atm, obs_t *obs)
Determine ray paths and compute radiative transfer.
Definition: jurassic.c:3026
double ctmco2(const double nu, const double p, const double t, const double u)
Compute carbon dioxide continuum (optical depth).
Definition: jurassic.c:886
void read_atm(const char *dirname, const char *filename, const ctl_t *ctl, atm_t *atm)
Read atmospheric data.
Definition: jurassic.c:4445
void copy_obs(const ctl_t *ctl, obs_t *obs_dest, const obs_t *obs_src, const int init)
Copy and initialize observation data.
Definition: jurassic.c:2975
void read_obs(const char *dirname, const char *filename, const ctl_t *ctl, obs_t *obs)
Read observation data.
Definition: jurassic.c:4700
void write_obs(const char *dirname, const char *filename, const ctl_t *ctl, const obs_t *obs)
Write observation data.
Definition: jurassic.c:5673
void x2atm_help(double *value, const gsl_vector *x, size_t *n)
Get element from state vector.
Definition: jurassic.c:5953
void cart2geo(const double *x, double *z, double *lon, double *lat)
Convert Cartesian coordinates to geolocation.
Definition: jurassic.c:108
void formod_fov(const ctl_t *ctl, obs_t *obs)
Apply field of view convolution.
Definition: jurassic.c:3121
void init_srcfunc(const ctl_t *ctl, tbl_t *tbl)
Initialize source function table.
Definition: jurassic.c:3631
void write_shape(const char *filename, const double *x, const double *y, const int n)
Write shape function.
Definition: jurassic.c:5783
void formod_srcfunc(const ctl_t *ctl, const tbl_t *tbl, const double t, double *src)
Compute Planck source function.
Definition: jurassic.c:3483
void jsec2time(const double jsec, int *year, int *mon, int *day, int *hour, int *min, int *sec, double *remain)
Convert seconds to date.
Definition: jurassic.c:3973
double scan_ctl(int argc, char *argv[], const char *varname, int arridx, const char *defvalue, char *value)
Search control parameter file for variable entry.
Definition: jurassic.c:5117
void copy_atm(const ctl_t *ctl, atm_t *atm_dest, const atm_t *atm_src, const int init)
Copy and initialize atmospheric data.
Definition: jurassic.c:2921
size_t obs2y(const ctl_t *ctl, const obs_t *obs, gsl_vector *y, int *ida, int *ira)
Compose measurement vector.
Definition: jurassic.c:4178
void y2obs(const ctl_t *ctl, const gsl_vector *y, obs_t *obs)
Decompose measurement vector.
Definition: jurassic.c:5965
void hydrostatic(const ctl_t *ctl, atm_t *atm)
Set hydrostatic equilibrium.
Definition: jurassic.c:3520
void read_shape(const char *filename, double *x, double *y, int *n)
Read shape function.
Definition: jurassic.c:4910
double ctmn2(const double nu, const double p, const double t)
Compute nitrogen continuum (absorption coefficient).
Definition: jurassic.c:2796
size_t atm2x(const ctl_t *ctl, const atm_t *atm, gsl_vector *x, int *iqa, int *ipa)
Compose state vector or parameter vector.
Definition: jurassic.c:29
void climatology(const ctl_t *ctl, atm_t *atm)
Interpolate climatological data.
Definition: jurassic.c:123
void geo2cart(const double z, const double lon, const double lat, double *x)
Convert geolocation to Cartesian coordinates.
Definition: jurassic.c:3500
void write_matrix(const char *dirname, const char *filename, const ctl_t *ctl, const gsl_matrix *matrix, const atm_t *atm, const obs_t *obs, const char *rowspace, const char *colspace, const char *sort)
Write matrix.
Definition: jurassic.c:5495
void kernel(ctl_t *ctl, atm_t *atm, obs_t *obs, gsl_matrix *k)
Compute Jacobians.
Definition: jurassic.c:4006
int locate_tbl(const float *xx, const int n, const double x)
Find array index in float array.
Definition: jurassic.c:4156
JURASSIC library declarations.
#define N
Maximum size of state vector.
Definition: jurassic.h:393
#define IDXCLZ
Index for cloud layer height.
Definition: jurassic.h:463
#define LEN
Maximum length of ASCII data lines.
Definition: jurassic.h:383
#define RE
Mean radius of Earth [km].
Definition: jurassic.h:299
#define BRIGHT(rad, nu)
Compute brightness temperature.
Definition: jurassic.h:126
#define P0
Standard pressure [hPa].
Definition: jurassic.h:309
#define KB
Boltzmann constant [kg m^2/(K s^2)].
Definition: jurassic.h:284
#define POW2(x)
Compute x^2.
Definition: jurassic.h:187
#define NFOV
Number of ray paths used for FOV calculations.
Definition: jurassic.h:413
#define FWRITE(ptr, type, size, out)
Write binary data.
Definition: jurassic.h:150
#define DOTP(a, b)
Compute dot product of two vectors.
Definition: jurassic.h:141
#define UMAX
Maximum column density [molecules/cm^2].
Definition: jurassic.h:339
#define MIN(a, b)
Macro to determine the minimum of two values.
Definition: jurassic.h:160
#define IDXCLDZ
Index for cloud layer depth.
Definition: jurassic.h:466
#define ERRMSG(...)
Print error message and quit program.
Definition: jurassic.h:237
#define RFMNPTS
Maximum number of RFM spectral grid points.
Definition: jurassic.h:438
#define IDXK(iw)
Indices for extinction.
Definition: jurassic.h:460
#define M
Maximum size of measurement vector.
Definition: jurassic.h:388
#define G0
Standard gravity [m/s^2].
Definition: jurassic.h:274
#define ND
Maximum number of radiance channels.
Definition: jurassic.h:353
#define NA
Avogadro's number.
Definition: jurassic.h:294
#define LOGY(x0, y0, x1, y1, x)
Compute logarithmic interpolation in y.
Definition: jurassic.h:174
#define NSHAPE
Maximum number of shape function grid points.
Definition: jurassic.h:408
#define IDXSFT
Index for surface layer temperature.
Definition: jurassic.h:478
#define RI
Ideal gas constant [J/(mol K)].
Definition: jurassic.h:304
#define NORM(a)
Compute norm of a vector.
Definition: jurassic.h:180
#define IDXSFEPS(isf)
Indices for surface layer emissivity.
Definition: jurassic.h:481
#define IDXCLK(icl)
Indices for cloud layer extinction.
Definition: jurassic.h:469
#define LOGX(x0, y0, x1, y1, x)
Compute logarithmic interpolation in x.
Definition: jurassic.h:168
#define TOK(line, tok, format, var)
Read string tokens.
Definition: jurassic.h:205
#define WARN(...)
Print warning message.
Definition: jurassic.h:231
#define TBLNU
Maximum number of column densities in emissivity tables.
Definition: jurassic.h:428
#define IDXP
Index for pressure.
Definition: jurassic.h:451
#define ALLOC(ptr, type, n)
Allocate memory.
Definition: jurassic.h:121
#define DEG2RAD(deg)
Convert degrees to radians.
Definition: jurassic.h:130
#define TSUN
Effective temperature of the sun [K].
Definition: jurassic.h:329
#define IDXSFP
Index for surface layer pressure.
Definition: jurassic.h:475
#define RAD2DEG(rad)
Convert radians to degrees.
Definition: jurassic.h:193
#define TBLNT
Maximum number of temperatures in emissivity tables.
Definition: jurassic.h:423
#define NP
Maximum number of atmospheric data points.
Definition: jurassic.h:363
#define POW3(x)
Compute x^3.
Definition: jurassic.h:190
#define PLANCK(T, nu)
Compute Planck function.
Definition: jurassic.h:183
#define NG
Maximum number of emitters.
Definition: jurassic.h:358
#define EPSMAX
Maximum emissivity.
Definition: jurassic.h:269
#define LOG(level,...)
Print log message.
Definition: jurassic.h:221
#define TBLNS
Maximum number of source function temperature levels.
Definition: jurassic.h:433
#define REFRAC(p, T)
Compute refractivity (return value is n - 1).
Definition: jurassic.h:197
#define TBLNP
Maximum number of pressure levels in emissivity tables.
Definition: jurassic.h:418
#define NSF
Maximum number of surface layer spectral grid points.
Definition: jurassic.h:373
#define NCL
Maximum number of cloud layer spectral grid points.
Definition: jurassic.h:348
#define FREAD(ptr, type, size, out)
Read binary data.
Definition: jurassic.h:144
#define LIN(x0, y0, x1, y1, x)
Compute linear interpolation.
Definition: jurassic.h:164
#define NLOS
Maximum number of LOS points.
Definition: jurassic.h:403
#define NR
Maximum number of ray paths.
Definition: jurassic.h:368
#define IDXQ(ig)
Indices for volume mixing ratios.
Definition: jurassic.h:457
#define RFMLINE
Maximum length of RFM data lines.
Definition: jurassic.h:443
#define TMAX
Maximum temperature for source function [K].
Definition: jurassic.h:324
#define TMIN
Minimum temperature for source function [K].
Definition: jurassic.h:319
#define NW
Maximum number of spectral windows.
Definition: jurassic.h:378
#define MAX(a, b)
Macro to determine the maximum of two values.
Definition: jurassic.h:156
#define IDXT
Index for temperature.
Definition: jurassic.h:454
#define IDXSFZ
Index for surface layer height.
Definition: jurassic.h:472
Atmospheric data.
Definition: jurassic.h:488
double time[NP]
Time (seconds since 2000-01-01T00:00Z).
Definition: jurassic.h:494
double sfeps[NSF]
Surface emissivity.
Definition: jurassic.h:536
double k[NW][NP]
Extinction [km^-1].
Definition: jurassic.h:515
double sfz
Surface height [km].
Definition: jurassic.h:527
double lat[NP]
Latitude [deg].
Definition: jurassic.h:503
double lon[NP]
Longitude [deg].
Definition: jurassic.h:500
double t[NP]
Temperature [K].
Definition: jurassic.h:509
double sfp
Surface pressure [hPa].
Definition: jurassic.h:530
double clz
Cloud layer height [km].
Definition: jurassic.h:518
int np
Number of data points.
Definition: jurassic.h:491
double cldz
Cloud layer depth [km].
Definition: jurassic.h:521
double sft
Surface temperature [K].
Definition: jurassic.h:533
double z[NP]
Altitude [km].
Definition: jurassic.h:497
double clk[NCL]
Cloud layer extinction [km^-1].
Definition: jurassic.h:524
double q[NG][NP]
Volume mixing ratio [ppv].
Definition: jurassic.h:512
double p[NP]
Pressure [hPa].
Definition: jurassic.h:506
Forward model control parameters.
Definition: jurassic.h:541
int write_matrix
Write matrix file (0=no, 1=yes).
Definition: jurassic.h:661
int nw
Number of spectral windows.
Definition: jurassic.h:556
double retp_zmin
Minimum altitude for pressure retrieval [km].
Definition: jurassic.h:613
double nu[ND]
Centroid wavenumber of each channel [cm^-1].
Definition: jurassic.h:553
double retk_zmax[NW]
Maximum altitude for extinction retrieval [km].
Definition: jurassic.h:634
double sfnu[NSF]
Surface layer wavenumber [cm^-1].
Definition: jurassic.h:571
char rfmhit[LEN]
HITRAN file for RFM.
Definition: jurassic.h:670
char tblbase[LEN]
Basename for table files and filter function files.
Definition: jurassic.h:580
char rfmbin[LEN]
Path to RFM binary.
Definition: jurassic.h:667
double hydz
Reference height for hydrostatic pressure profile (-999 to skip) [km].
Definition: jurassic.h:586
int ret_sfz
Retrieve surface layer height (0=no, 1=yes).
Definition: jurassic.h:646
int ctm_co2
Compute CO2 continuum (0=no, 1=yes).
Definition: jurassic.h:589
double rett_zmax
Maximum altitude for temperature retrieval [km].
Definition: jurassic.h:622
int ret_sfeps
Retrieve surface layer emissivity (0=no, 1=yes).
Definition: jurassic.h:655
int ret_sft
Retrieve surface layer temperature (0=no, 1=yes).
Definition: jurassic.h:652
int ret_clz
Retrieve cloud layer height (0=no, 1=yes).
Definition: jurassic.h:637
int ctm_n2
Compute N2 continuum (0=no, 1=yes).
Definition: jurassic.h:595
char fov[LEN]
Field-of-view data file.
Definition: jurassic.h:610
char rfmxsc[NG][LEN]
Emitter cross-section files for RFM.
Definition: jurassic.h:673
int window[ND]
Window index of each channel.
Definition: jurassic.h:559
int ctm_h2o
Compute H2O continuum (0=no, 1=yes).
Definition: jurassic.h:592
int formod
Forward model (0=CGA, 1=EGA, 2=RFM).
Definition: jurassic.h:664
double retq_zmax[NG]
Maximum altitude for volume mixing ratio retrieval [km].
Definition: jurassic.h:628
double retq_zmin[NG]
Minimum altitude for volume mixing ratio retrieval [km].
Definition: jurassic.h:625
int ng
Number of emitters.
Definition: jurassic.h:544
double clnu[NCL]
Cloud layer wavenumber [cm^-1].
Definition: jurassic.h:565
int refrac
Take into account refractivity (0=no, 1=yes).
Definition: jurassic.h:601
double rett_zmin
Minimum altitude for temperature retrieval [km].
Definition: jurassic.h:619
double sfsza
Solar zenith angle at the surface [deg] (-999=auto).
Definition: jurassic.h:577
int nd
Number of radiance channels.
Definition: jurassic.h:550
int sftype
Surface treatment (0=none, 1=emissions, 2=downward, 3=solar).
Definition: jurassic.h:574
int ret_sfp
Retrieve surface layer pressure (0=no, 1=yes).
Definition: jurassic.h:649
double retk_zmin[NW]
Minimum altitude for extinction retrieval [km].
Definition: jurassic.h:631
int ncl
Number of cloud layer spectral grid points.
Definition: jurassic.h:562
int ctm_o2
Compute O2 continuum (0=no, 1=yes).
Definition: jurassic.h:598
int ret_clk
Retrieve cloud layer extinction (0=no, 1=yes).
Definition: jurassic.h:643
char emitter[NG][LEN]
Name of each emitter.
Definition: jurassic.h:547
int nsf
Number of surface layer spectral grid points.
Definition: jurassic.h:568
double rayds
Maximum step length for raytracing [km].
Definition: jurassic.h:604
int ret_cldz
Retrieve cloud layer depth (0=no, 1=yes).
Definition: jurassic.h:640
int tblfmt
Look-up table file format (1=ASCII, 2=binary).
Definition: jurassic.h:583
double raydz
Vertical step length for raytracing [km].
Definition: jurassic.h:607
int write_bbt
Use brightness temperature instead of radiance (0=no, 1=yes).
Definition: jurassic.h:658
double retp_zmax
Maximum altitude for pressure retrieval [km].
Definition: jurassic.h:616
Line-of-sight data.
Definition: jurassic.h:678
double z[NLOS]
Altitude [km].
Definition: jurassic.h:684
double eps[NLOS][ND]
Segment emissivity.
Definition: jurassic.h:726
double cgu[NLOS][NG]
Curtis-Godson column density [molecules/cm^2].
Definition: jurassic.h:723
double q[NLOS][NG]
Volume mixing ratio [ppv].
Definition: jurassic.h:699
double sft
Surface temperature [K].
Definition: jurassic.h:705
double cgt[NLOS][NG]
Curtis-Godson temperature [K].
Definition: jurassic.h:720
double lon[NLOS]
Longitude [deg].
Definition: jurassic.h:687
double ds[NLOS]
Segment length [km].
Definition: jurassic.h:711
int np
Number of LOS points.
Definition: jurassic.h:681
double u[NLOS][NG]
Column density [molecules/cm^2].
Definition: jurassic.h:714
double lat[NLOS]
Latitude [deg].
Definition: jurassic.h:690
double src[NLOS][ND]
Segment source function [W/(m^2 sr cm^-1)].
Definition: jurassic.h:729
double k[NLOS][ND]
Extinction [km^-1].
Definition: jurassic.h:702
double sfeps[ND]
Surface emissivity.
Definition: jurassic.h:708
double cgp[NLOS][NG]
Curtis-Godson pressure [hPa].
Definition: jurassic.h:717
double t[NLOS]
Temperature [K].
Definition: jurassic.h:696
double p[NLOS]
Pressure [hPa].
Definition: jurassic.h:693
Observation geometry and radiance data.
Definition: jurassic.h:734
double tau[ND][NR]
Transmittance of ray path.
Definition: jurassic.h:770
double rad[ND][NR]
Radiance [W/(m^2 sr cm^-1)].
Definition: jurassic.h:773
double tplon[NR]
Tangent point longitude [deg].
Definition: jurassic.h:764
double vpz[NR]
View point altitude [km].
Definition: jurassic.h:752
double vplat[NR]
View point latitude [deg].
Definition: jurassic.h:758
double obslon[NR]
Observer longitude [deg].
Definition: jurassic.h:746
double obslat[NR]
Observer latitude [deg].
Definition: jurassic.h:749
double obsz[NR]
Observer altitude [km].
Definition: jurassic.h:743
double tplat[NR]
Tangent point latitude [deg].
Definition: jurassic.h:767
double vplon[NR]
View point longitude [deg].
Definition: jurassic.h:755
double time[NR]
Time (seconds since 2000-01-01T00:00Z).
Definition: jurassic.h:740
double tpz[NR]
Tangent point altitude [km].
Definition: jurassic.h:761
int nr
Number of ray paths.
Definition: jurassic.h:737
Emissivity look-up tables.
Definition: jurassic.h:778
double sr[TBLNS][ND]
Source function radiance [W/(m^2 sr cm^-1)].
Definition: jurassic.h:805
double p[ND][NG][TBLNP]
Pressure [hPa].
Definition: jurassic.h:790
int nu[ND][NG][TBLNP][TBLNT]
Number of column densities.
Definition: jurassic.h:787
int nt[ND][NG][TBLNP]
Number of temperatures.
Definition: jurassic.h:784
float eps[ND][NG][TBLNP][TBLNT][TBLNU]
Emissivity.
Definition: jurassic.h:799
float u[ND][NG][TBLNP][TBLNT][TBLNU]
Column density [molecules/cm^2].
Definition: jurassic.h:796
double t[ND][NG][TBLNP][TBLNT]
Temperature [K].
Definition: jurassic.h:793
double st[TBLNS]
Source function temperature [K].
Definition: jurassic.h:802
int np[ND][NG]
Number of pressure levels.
Definition: jurassic.h:781