ARTS 2.5.0 (git: 9ee3ac6c)
hitran_species.cc
Go to the documentation of this file.
1#include <map>
2
3#include "isotopologues.h"
4#include "hitran_species.h"
5
6#include "species_tags.h"
7#include "species_tags.h"
8
9namespace Hitran {
10using HitranMap = std::map<Index, std::map<char, std::pair<Index, Numeric>>>;
11
19 {1, { // H2O
20 {'1', {Species::find_species_index("H2O", "161"), 9.97317E-01}},
21 {'2', {Species::find_species_index("H2O", "181"), 1.99983E-03}},
22 {'3', {Species::find_species_index("H2O", "171"), 3.71884E-04}},
23 {'4', {Species::find_species_index("H2O", "162"), 3.10693E-04}},
24 {'5', {Species::find_species_index("H2O", "182"), 6.23003E-07}},
25 {'6', {Species::find_species_index("H2O", "172"), 1.15853E-07}},
26 {'7', {Species::find_species_index("H2O", "262"), 2.41970E-08}},
27 }},
28 {2, { // CO2
29 {'1', {Species::find_species_index("CO2", "626"), 9.84204E-01}},
30 {'2', {Species::find_species_index("CO2", "636"), 1.10574E-02}},
31 {'3', {Species::find_species_index("CO2", "628"), 3.94707E-03}},
32 {'4', {Species::find_species_index("CO2", "627"), 7.33989E-04}},
33 {'5', {Species::find_species_index("CO2", "638"), 4.43446E-05}},
34 {'6', {Species::find_species_index("CO2", "637"), 8.24623E-06}},
35 {'7', {Species::find_species_index("CO2", "828"), 3.95734E-06}},
36 {'8', {Species::find_species_index("CO2", "827"), 1.47180E-06}},
37 {'9', {Species::find_species_index("CO2", "838"), 4.44600E-08}}, // This is different for HITRAN2008 and earlier cf original map
38 }},
39 {3, { // O3
40 {'1', {Species::find_species_index("O3", "666"), 9.92901E-01}},
41 {'2', {Species::find_species_index("O3", "668"), 3.98194E-03}},
42 {'3', {Species::find_species_index("O3", "686"), 1.99097E-03}},
43 {'4', {Species::find_species_index("O3", "667"), 7.40475E-04}},
44 {'5', {Species::find_species_index("O3", "676"), 3.70237E-04}},
45 }},
46 {4, { // N2O
47 {'1', {Species::find_species_index("N2O", "446"), 9.90333E-01}},
48 {'2', {Species::find_species_index("N2O", "456"), 3.64093E-03}},
49 {'3', {Species::find_species_index("N2O", "546"), 3.64093E-03}},
50 {'4', {Species::find_species_index("N2O", "448"), 1.98582E-03}},
51 {'5', {Species::find_species_index("N2O", "447"), 3.69280E-04}},
52 }},
53 {5, { // CO
54 {'1', {Species::find_species_index("CO", "26"), 9.86544E-01}},
55 {'2', {Species::find_species_index("CO", "36"), 1.10836E-02}},
56 {'3', {Species::find_species_index("CO", "28"), 1.97822E-03}},
57 {'4', {Species::find_species_index("CO", "27"), 3.67867E-04}},
58 {'5', {Species::find_species_index("CO", "38"), 2.22250E-05}},
59 {'6', {Species::find_species_index("CO", "37"), 4.13292E-06}},
60 }},
61 {6, { // CH4
62 {'1', {Species::find_species_index("CH4", "211"), 9.88274E-01}},
63 {'2', {Species::find_species_index("CH4", "311"), 1.11031E-02}},
64 {'3', {Species::find_species_index("CH4", "212"), 6.15751E-04}},
65 {'4', {Species::find_species_index("CH4", "312"), 6.91785E-06}},
66 }},
67 {7, { // O2
68 {'1', {Species::find_species_index("O2", "66"), 9.95262E-01}},
69 {'2', {Species::find_species_index("O2", "68"), 3.99141E-03}},
70 {'3', {Species::find_species_index("O2", "67"), 7.42235E-04}},
71 }},
72 {8, { // NO
73 {'1', {Species::find_species_index("NO", "46"), 9.93974E-01}},
74 {'2', {Species::find_species_index("NO", "56"), 3.65431E-03}},
75 {'3', {Species::find_species_index("NO", "48"), 1.99312E-03}},
76 }},
77 {9, { // SO2
78 {'1', {Species::find_species_index("SO2", "626"), 9.45678E-01}},
79 {'2', {Species::find_species_index("SO2", "646"), 4.19503E-02}},
80 }},
81 {10, { // NO2
82 {'1', {Species::find_species_index("NO2", "646"), 9.91616E-01}},
83 {'2', {Species::find_species_index("NO2", "656"), 3.64564E-03}},
84 }},
85 {11, { // NH3
86 {'1', {Species::find_species_index("NH3", "4111"), 9.95872E-01}},
87 {'2', {Species::find_species_index("NH3", "5111"), 3.66129E-03}},
88 }},
89 {12, { // HNO3
90 {'1', {Species::find_species_index("HNO3", "146"), 9.89110E-01}},
91 {'2', {Species::find_species_index("HNO3", "156"), 3.63600E-03}},
92 }},
93 {13, { // OH
94 {'1', {Species::find_species_index("OH", "61"), 9.97473E-01}},
95 {'2', {Species::find_species_index("OH", "81"), 2.00014E-03}},
96 {'3', {Species::find_species_index("OH", "62"), 1.55371E-04}},
97 }},
98 {14, { // HF
99 {'1', {Species::find_species_index("HF", "19"), 9.99844E-01}},
100 {'2', {Species::find_species_index("HF", "29"), 1.55741E-04}},
101 }},
102 {15, { // HCl
103 {'1', {Species::find_species_index("HCl", "15"), 7.57587E-01}},
104 {'2', {Species::find_species_index("HCl", "17"), 2.42257E-01}},
105 {'3', {Species::find_species_index("HCl", "25"), 1.18005E-04}},
106 {'4', {Species::find_species_index("HCl", "27"), 3.77350E-05}},
107 }},
108 {16, { // HBr
109 {'1', {Species::find_species_index("HBr", "19"), 5.06781E-01}},
110 {'2', {Species::find_species_index("HBr", "11"), 4.93063E-01}},
111 {'3', {Species::find_species_index("HBr", "29"), 7.89384E-05}},
112 {'4', {Species::find_species_index("HBr", "21"), 7.68016E-05}},
113 }},
114 {17, { // HI
115 {'1', {Species::find_species_index("HI", "17"), 9.99844E-01}},
116 {'2', {Species::find_species_index("HI", "27"), 1.55741E-04}},
117 }},
118 {18, { // ClO
119 {'1', {Species::find_species_index("ClO", "56"), 7.55908E-01}},
120 {'2', {Species::find_species_index("ClO", "76"), 2.41720E-01}},
121 }},
122 {19, { // OCS
123 {'1', {Species::find_species_index("OCS", "622"), 9.37395E-01}},
124 {'2', {Species::find_species_index("OCS", "624"), 4.15828E-02}},
125 {'3', {Species::find_species_index("OCS", "632"), 1.05315E-02}},
126 {'4', {Species::find_species_index("OCS", "623"), 7.39908E-03}},
127 {'5', {Species::find_species_index("OCS", "822"), 1.87967E-03}},
128 {'6', {Species::find_species_index("OCS", "634"), 4.67508E-04}},
129 }},
130 {20, { // H2CO
131 {'1', {Species::find_species_index("H2CO", "126"), 9.86237E-01}},
132 {'2', {Species::find_species_index("H2CO", "136"), 1.10802E-02}},
133 {'3', {Species::find_species_index("H2CO", "128"), 1.97761E-03}},
134 }},
135 {21, { // HOCl
136 {'1', {Species::find_species_index("HOCl", "165"), 7.55790E-01}},
137 {'2', {Species::find_species_index("HOCl", "167"), 2.41683E-01}},
138 }},
139 {22, { // N2
140 {'1', {Species::find_species_index("N2", "44"), 9.92687E-01}},
141 {'2', {Species::find_species_index("N2", "45"), 7.47809E-03}},
142 }},
143 {23, { // HCN
144 {'1', {Species::find_species_index("HCN", "124"), 9.85114E-01}},
145 {'2', {Species::find_species_index("HCN", "134"), 1.10676E-02}},
146 {'3', {Species::find_species_index("HCN", "125"), 3.62174E-03}},
147 }},
148 {24, { // CH3Cl
149 {'1', {Species::find_species_index("CH3Cl", "215"), 7.48937E-01}},
150 {'2', {Species::find_species_index("CH3Cl", "217"), 2.39491E-01}},
151 }},
152 {25, { // H2O2
153 {'1', {Species::find_species_index("H2O2", "1661"), 9.94952E-01}},
154 }},
155 {26, { // C2H2
156 {'1', {Species::find_species_index("C2H2", "1221"), 9.77599E-01}},
157 {'2', {Species::find_species_index("C2H2", "1231"), 2.19663E-02}},
158 {'3', {Species::find_species_index("C2H2", "1222"), 3.04550E-04}},
159 }},
160 {27, { // C2H6
161 {'1', {Species::find_species_index("C2H6", "1221"), 9.76990E-01}},
162 {'2', {Species::find_species_index("C2H6", "1231"), 2.19526E-02}},
163 }},
164 {28, { // PH3
165 {'1', {Species::find_species_index("PH3", "1111"), 9.99533E-01}},
166 }},
167 {29, { // COF2
168 {'1', {Species::find_species_index("COF2", "269"), 9.86544E-01}},
169 {'2', {Species::find_species_index("COF2", "369"), 1.10834E-02}},
170 }},
171 {30, { // SF6
172 {'1', {Species::find_species_index("SF6", "29"), .950180E+00}},
173 }},
174 {31, { // H2S
175 {'1', {Species::find_species_index("H2S", "121"), 9.49884E-01}},
176 {'2', {Species::find_species_index("H2S", "141"), 4.21369E-02}},
177 {'3', {Species::find_species_index("H2S", "131"), 7.49766E-03}},
178 }},
179 {32, { // HCOOH
180 {'1', {Species::find_species_index("HCOOH", "126"), 9.83898E-01}},
181 }},
182 {33, { // HO2
183 {'1', {Species::find_species_index("HO2", "166"), 9.95107E-01}},
184 }},
185 {34, { // O
186 {'1', {Species::find_species_index("O", "6"), 9.97628E-01}},
187 }},
188 {35, { // ClONO2
189 {'1', {Species::find_species_index("ClONO2", "5646"), .749570E+00}},
190 {'2', {Species::find_species_index("ClONO2", "7646"), .239694E+00}},
191 }},
192 {36, { // NO+
193 {'1', {Species::find_species_index("NO+", "46"), 9.93974E-01}},
194 }},
195 {37, { // HOBr
196 {'1', {Species::find_species_index("HOBr", "169"), 5.05579E-01}},
197 {'2', {Species::find_species_index("HOBr", "161"), 4.91894E-01}},
198 }},
199 {38, { // C2H4
200 {'1', {Species::find_species_index("C2H4", "221"), 9.77294E-01}},
201 {'2', {Species::find_species_index("C2H4", "231"), 2.19595E-02}},
202 }},
203 {39, { // CH3OH
204 {'1', {Species::find_species_index("CH3OH", "2161"), 9.85930E-01}},
205 }},
206 {40, { // CH3Br
207 {'1', {Species::find_species_index("CH3Br", "219"), 5.00995E-01}},
208 {'2', {Species::find_species_index("CH3Br", "211"), 4.87433E-01}},
209 }},
210 {41, { // CH3CN
211 {'1', {Species::find_species_index("CH3CN", "2124"), 9.73866E-01}},
212 }},
213 {42, { // CF4
214 {'1', {Species::find_species_index("CF4", "29"), 9.88890E-01}},
215 }},
216 {43, { // C4H2
217 {'1', {Species::find_species_index("C4H2", "2211"), 9.55998E-01}},
218 }},
219 {44, { // HC3N
220 {'1', {Species::find_species_index("HC3N", "12224"), 9.63346E-01}},
221 }},
222 {45, { // H2
223 {'1', {Species::find_species_index("H2", "11"), 9.99688E-01}},
224 {'2', {Species::find_species_index("H2", "12"), 3.11432E-04}},
225 }},
226 {46, { // CS
227 {'1', {Species::find_species_index("CS", "22"), 9.39624E-01}},
228 {'2', {Species::find_species_index("CS", "24"), 4.16817E-02}},
229 {'3', {Species::find_species_index("CS", "32"), 1.05565E-02}},
230 {'4', {Species::find_species_index("CS", "23"), 7.41668E-03}},
231 }},
232 {47, { // SO3
233 {'1', {Species::find_species_index("SO3", "26"), 9.43400E-01}},
234 }},
235 {48, { // C2N2
236 {'1', {Species::find_species_index("C2N2", "4224"), 9.70752E-01}},
237 }},
238 {49, { // COCl2
239 {'1', {Species::find_species_index("COCl2", "2655"), 5.66392E-01}},
240 {'2', {Species::find_species_index("COCl2", "2657"), 3.62235E-01}},
241 }},
242 {53, { // CS2
243 {'1', {Species::find_species_index("CS2", "222"), 8.92811E-01}},
244 {'2', {Species::find_species_index("CS2", "224"), 7.92600E-02}},
245 {'3', {Species::find_species_index("CS2", "223"), 1.40940E-02}},
246 {'4', {Species::find_species_index("CS2", "232"), 1.03100E-02}},
247 }},
248 };
249
261 {1, { // H2O
262 {'1', {Species::find_species_index("H2O", "161"), 9.97317E-01}},
263 {'2', {Species::find_species_index("H2O", "181"), 1.99983E-03}},
264 {'3', {Species::find_species_index("H2O", "171"), 3.71884E-04}},
265 {'4', {Species::find_species_index("H2O", "162"), 3.10693E-04}},
266 {'5', {Species::find_species_index("H2O", "182"), 6.23003E-07}},
267 {'6', {Species::find_species_index("H2O", "172"), 1.15853E-07}},
268 {'7', {Species::find_species_index("H2O", "262"), 2.41970E-08}},
269 }},
270 {2, { // CO2
271 {'1', {Species::find_species_index("CO2", "626"), 9.84204E-01}},
272 {'2', {Species::find_species_index("CO2", "636"), 1.10574E-02}},
273 {'3', {Species::find_species_index("CO2", "628"), 3.94707E-03}},
274 {'4', {Species::find_species_index("CO2", "627"), 7.33989E-04}},
275 {'5', {Species::find_species_index("CO2", "638"), 4.43446E-05}},
276 {'6', {Species::find_species_index("CO2", "637"), 8.24623E-06}},
277 {'7', {Species::find_species_index("CO2", "828"), 3.95734E-06}},
278 {'8', {Species::find_species_index("CO2", "827"), 1.47180E-06}},
279 {'9', {Species::find_species_index("CO2", "727"), 1.36847E-07}},
280 {'0', {Species::find_species_index("CO2", "838"), 4.44600E-08}},
281 {'A', {Species::find_species_index("CO2", "837"), 1.65354E-08}},
282 {'B', {Species::find_species_index("CO2", "737"), 1.53750E-09}},
283 }},
284 {3, { // O3
285 {'1', {Species::find_species_index("O3", "666"), 9.92901E-01}},
286 {'2', {Species::find_species_index("O3", "668"), 3.98194E-03}},
287 {'3', {Species::find_species_index("O3", "686"), 1.99097E-03}},
288 {'4', {Species::find_species_index("O3", "667"), 7.40475E-04}},
289 {'5', {Species::find_species_index("O3", "676"), 3.70237E-04}},
290 }},
291 {4, { // N2O
292 {'1', {Species::find_species_index("N2O", "446"), 9.90333E-01}},
293 {'2', {Species::find_species_index("N2O", "456"), 3.64093E-03}},
294 {'3', {Species::find_species_index("N2O", "546"), 3.64093E-03}},
295 {'4', {Species::find_species_index("N2O", "448"), 1.98582E-03}},
296 {'5', {Species::find_species_index("N2O", "447"), 3.69280E-04}},
297 }},
298 {5, { // CO
299 {'1', {Species::find_species_index("CO", "26"), 9.86544E-01}},
300 {'2', {Species::find_species_index("CO", "36"), 1.10836E-02}},
301 {'3', {Species::find_species_index("CO", "28"), 1.97822E-03}},
302 {'4', {Species::find_species_index("CO", "27"), 3.67867E-04}},
303 {'5', {Species::find_species_index("CO", "38"), 2.22250E-05}},
304 {'6', {Species::find_species_index("CO", "37"), 4.13292E-06}},
305 }},
306 {6, { // CH4
307 {'1', {Species::find_species_index("CH4", "211"), 9.88274E-01}},
308 {'2', {Species::find_species_index("CH4", "311"), 1.11031E-02}},
309 {'3', {Species::find_species_index("CH4", "212"), 6.15751E-04}},
310 {'4', {Species::find_species_index("CH4", "312"), 6.91785E-06}},
311 }},
312 {7, { // O2
313 {'1', {Species::find_species_index("O2", "66"), 9.95262E-01}},
314 {'2', {Species::find_species_index("O2", "68"), 3.99141E-03}},
315 {'3', {Species::find_species_index("O2", "67"), 7.42235E-04}},
316 }},
317 {8, { // NO
318 {'1', {Species::find_species_index("NO", "46"), 9.93974E-01}},
319 {'2', {Species::find_species_index("NO", "56"), 3.65431E-03}},
320 {'3', {Species::find_species_index("NO", "48"), 1.99312E-03}},
321 }},
322 {9, { // SO2
323 {'1', {Species::find_species_index("SO2", "626"), 9.45678E-01}},
324 {'2', {Species::find_species_index("SO2", "646"), 4.19503E-02}},
325 }},
326 {10, { // NO2
327 {'1', {Species::find_species_index("NO2", "646"), 9.91616E-01}},
328 {'2', {Species::find_species_index("NO2", "656"), 3.64564E-03}},
329 }},
330 {11, { // NH3
331 {'1', {Species::find_species_index("NH3", "4111"), 9.95872E-01}},
332 {'2', {Species::find_species_index("NH3", "5111"), 3.66129E-03}},
333 }},
334 {12, { // HNO3
335 {'1', {Species::find_species_index("HNO3", "146"), 9.89110E-01}},
336 {'2', {Species::find_species_index("HNO3", "156"), 3.63600E-03}},
337 }},
338 {13, { // OH
339 {'1', {Species::find_species_index("OH", "61"), 9.97473E-01}},
340 {'2', {Species::find_species_index("OH", "81"), 2.00014E-03}},
341 {'3', {Species::find_species_index("OH", "62"), 1.55371E-04}},
342 }},
343 {14, { // HF
344 {'1', {Species::find_species_index("HF", "19"), 9.99844E-01}},
345 {'2', {Species::find_species_index("HF", "29"), 1.55741E-04}},
346 }},
347 {15, { // HCl
348 {'1', {Species::find_species_index("HCl", "15"), 7.57587E-01}},
349 {'2', {Species::find_species_index("HCl", "17"), 2.42257E-01}},
350 {'3', {Species::find_species_index("HCl", "25"), 1.18005E-04}},
351 {'4', {Species::find_species_index("HCl", "27"), 3.77350E-05}},
352 }},
353 {16, { // HBr
354 {'1', {Species::find_species_index("HBr", "19"), 5.06781E-01}},
355 {'2', {Species::find_species_index("HBr", "11"), 4.93063E-01}},
356 {'3', {Species::find_species_index("HBr", "29"), 7.89384E-05}},
357 {'4', {Species::find_species_index("HBr", "21"), 7.68016E-05}},
358 }},
359 {17, { // HI
360 {'1', {Species::find_species_index("HI", "17"), 9.99844E-01}},
361 {'2', {Species::find_species_index("HI", "27"), 1.55741E-04}},
362 }},
363 {18, { // ClO
364 {'1', {Species::find_species_index("ClO", "56"), 7.55908E-01}},
365 {'2', {Species::find_species_index("ClO", "76"), 2.41720E-01}},
366 }},
367 {19, { // OCS
368 {'1', {Species::find_species_index("OCS", "622"), 9.37395E-01}},
369 {'2', {Species::find_species_index("OCS", "624"), 4.15828E-02}},
370 {'3', {Species::find_species_index("OCS", "632"), 1.05315E-02}},
371 {'4', {Species::find_species_index("OCS", "623"), 7.39908E-03}},
372 {'5', {Species::find_species_index("OCS", "822"), 1.87967E-03}},
373 {'6', {Species::find_species_index("OCS", "634"), 4.67508E-04}},
374 }},
375 {20, { // H2CO
376 {'1', {Species::find_species_index("H2CO", "126"), 9.86237E-01}},
377 {'2', {Species::find_species_index("H2CO", "136"), 1.10802E-02}},
378 {'3', {Species::find_species_index("H2CO", "128"), 1.97761E-03}},
379 }},
380 {21, { // HOCl
381 {'1', {Species::find_species_index("HOCl", "165"), 7.55790E-01}},
382 {'2', {Species::find_species_index("HOCl", "167"), 2.41683E-01}},
383 }},
384 {22, { // N2
385 {'1', {Species::find_species_index("N2", "44"), 9.92687E-01}},
386 {'2', {Species::find_species_index("N2", "45"), 7.47809E-03}},
387 }},
388 {23, { // HCN
389 {'1', {Species::find_species_index("HCN", "124"), 9.85114E-01}},
390 {'2', {Species::find_species_index("HCN", "134"), 1.10676E-02}},
391 {'3', {Species::find_species_index("HCN", "125"), 3.62174E-03}},
392 }},
393 {24, { // CH3Cl
394 {'1', {Species::find_species_index("CH3Cl", "215"), 7.48937E-01}},
395 {'2', {Species::find_species_index("CH3Cl", "217"), 2.39491E-01}},
396 }},
397 {25, { // H2O2
398 {'1', {Species::find_species_index("H2O2", "1661"), 9.94952E-01}},
399 }},
400 {26, { // C2H2
401 {'1', {Species::find_species_index("C2H2", "1221"), 9.77599E-01}},
402 {'2', {Species::find_species_index("C2H2", "1231"), 2.19663E-02}},
403 {'3', {Species::find_species_index("C2H2", "1222"), 3.04550E-04}},
404 }},
405 {27, { // C2H6
406 {'1', {Species::find_species_index("C2H6", "1221"), 9.76990E-01}},
407 {'2', {Species::find_species_index("C2H6", "1231"), 2.19526E-02}},
408 }},
409 {28, { // PH3
410 {'1', {Species::find_species_index("PH3", "1111"), 9.99533E-01}},
411 }},
412 {29, { // COF2
413 {'1', {Species::find_species_index("COF2", "269"), 9.86544E-01}},
414 {'2', {Species::find_species_index("COF2", "369"), 1.10834E-02}},
415 }},
416 {30, { // SF6
417 {'1', {Species::find_species_index("SF6", "29"), .950180E+00}},
418 }},
419 {31, { // H2S
420 {'1', {Species::find_species_index("H2S", "121"), 9.49884E-01}},
421 {'2', {Species::find_species_index("H2S", "141"), 4.21369E-02}},
422 {'3', {Species::find_species_index("H2S", "131"), 7.49766E-03}},
423 }},
424 {32, { // HCOOH
425 {'1', {Species::find_species_index("HCOOH", "126"), 9.83898E-01}},
426 }},
427 {33, { // HO2
428 {'1', {Species::find_species_index("HO2", "166"), 9.95107E-01}},
429 }},
430 {34, { // O
431 {'1', {Species::find_species_index("O", "6"), 9.97628E-01}},
432 }},
433 {35, { // ClONO2
434 {'1', {Species::find_species_index("ClONO2", "5646"), .749570E+00}},
435 {'2', {Species::find_species_index("ClONO2", "7646"), .239694E+00}},
436 }},
437 {36, { // NO+
438 {'1', {Species::find_species_index("NO+", "46"), 9.93974E-01}},
439 }},
440 {37, { // HOBr
441 {'1', {Species::find_species_index("HOBr", "169"), 5.05579E-01}},
442 {'2', {Species::find_species_index("HOBr", "161"), 4.91894E-01}},
443 }},
444 {38, { // C2H4
445 {'1', {Species::find_species_index("C2H4", "221"), 9.77294E-01}},
446 {'2', {Species::find_species_index("C2H4", "231"), 2.19595E-02}},
447 }},
448 {39, { // CH3OH
449 {'1', {Species::find_species_index("CH3OH", "2161"), 9.85930E-01}},
450 }},
451 {40, { // CH3Br
452 {'1', {Species::find_species_index("CH3Br", "219"), 5.00995E-01}},
453 {'2', {Species::find_species_index("CH3Br", "211"), 4.87433E-01}},
454 }},
455 {41, { // CH3CN
456 {'1', {Species::find_species_index("CH3CN", "2124"), 9.73866E-01}},
457 }},
458 {42, { // CF4
459 {'1', {Species::find_species_index("CF4", "29"), 9.88890E-01}},
460 }},
461 {43, { // C4H2
462 {'1', {Species::find_species_index("C4H2", "2211"), 9.55998E-01}},
463 }},
464 {44, { // HC3N
465 {'1', {Species::find_species_index("HC3N", "12224"), 9.63346E-01}},
466 }},
467 {45, { // H2
468 {'1', {Species::find_species_index("H2", "11"), 9.99688E-01}},
469 {'2', {Species::find_species_index("H2", "12"), 3.11432E-04}},
470 }},
471 {46, { // CS
472 {'1', {Species::find_species_index("CS", "22"), 9.39624E-01}},
473 {'2', {Species::find_species_index("CS", "24"), 4.16817E-02}},
474 {'3', {Species::find_species_index("CS", "32"), 1.05565E-02}},
475 {'4', {Species::find_species_index("CS", "23"), 7.41668E-03}},
476 }},
477 {47, { // SO3
478 {'1', {Species::find_species_index("SO3", "26"), 9.43400E-01}},
479 }},
480 {48, { // C2N2
481 {'1', {Species::find_species_index("C2N2", "4224"), 9.70752E-01}},
482 }},
483 {49, { // COCl2
484 {'1', {Species::find_species_index("COCl2", "2655"), 5.66392E-01}},
485 {'2', {Species::find_species_index("COCl2", "2657"), 3.62235E-01}},
486 }},
487 {53, { // CS2
488 {'1', {Species::find_species_index("CS2", "222"), 8.92811E-01}},
489 {'2', {Species::find_species_index("CS2", "224"), 7.92600E-02}},
490 {'3', {Species::find_species_index("CS2", "223"), 1.40940E-02}},
491 {'4', {Species::find_species_index("CS2", "232"), 1.03100E-02}},
492 }},
493};
494
495using OurHitranMap = std::map<Index, std::map<char, Species::IsotopeRecord>>;
496
501 OurHitranMap species_map;
502 for (auto& specs: string_map) {
503 ARTS_ASSERT(specs.second.find('1') not_eq specs.second.cend(),
504 "Must have species '1' in map")
505 for (auto& isot: specs.second) {
506 ARTS_ASSERT(isot.second.first >= 0, "Undefined species in ARTS found in HITRAN data")
507 species_map[specs.first][isot.first] = Species::Isotopologues[isot.second.first];
508 }
509 }
510 return species_map;
511}
512
514template <Type t>
516 static_assert(good_enum(t), "Bad enum encountered, something is amiss");
517
518 /*
519 // Debug code to uncomment to check that the output is as expected
520 auto x = to_species_map(latest_molparam_map);
521 for (auto y: x) {
522 std::cout << y.first << '\n';
523 for (auto z: y.second) {
524 std:: cout << z.first << ' ' << z.second << '\n';
525 }
526 }
527 */
528
529 if constexpr (t == Type::Newest) {
531 } else if constexpr (t == Type::Pre2012CO2Change) {
533 } else {
534 std::terminate();
535 }
536}
537
544template <Type t> QuantumIdentifier from_mol_iso(Index molnum, char isonum) {
545 static_assert(good_enum(t), "Bad enum encountered, something is amiss. enum is: ");
546
547 // Map of all HITRAN species
548 static const OurHitranMap hitmap = select_hitran_map<t>();
549
550 // Search the map with pointers so that we can throw manually if something is bad
551 if (auto species_list = hitmap.find(molnum); species_list not_eq hitmap.cend()) {
552 if (auto species_info = species_list -> second.find(isonum); species_info not_eq species_list -> second.cend()) {
553 return QuantumIdentifier(species_info -> second, Quantum::IdentifierType::Transition);
554 }
555 ARTS_USER_ERROR("Species ", molnum, " has no isotopologue ", isonum,
556 " in ARTS' HITRAN implementation.\n",
557 "(Species is ", Species::toShortName(hitmap.at(molnum).at('1').spec), ")\n"
558 "If you are using a new version of HITRAN that has added the isotopologue, please consider\n"
559 "contacting the ARTS developers so we can append the species to our list and make this work.\n"
560 "Note that you are calling this templated function as the ", t, " template")
561
562 }
563 ARTS_USER_ERROR("Species ", molnum, " does not exist in ARTS' HITRAN implementation\n"
564 "If you are using a new version of HITRAN that has added the species, please consider\n"
565 "contacting the ARTS developers so we can append the species to our list and make this work.\n"
566 "Note that you are calling this templated function as the ", t, " template");
567}
568
570 switch (type) {
571 case Type::Pre2012CO2Change:
572 return from_mol_iso<Type::Pre2012CO2Change>(mol, isochar);
573 case Type::Newest:
574 return from_mol_iso<Type::Newest>(mol, isochar);
575 case Type::FINAL: {/* leave last */}
576 }
577 return {};
578}
579
581 switch (type) {
582 case Type::Pre2012CO2Change:
583 return pre2012co2change_molparam_map.at(mol).at(isochar).second;
584 case Type::Newest:
585 return latest_molparam_map.at(mol).at(isochar).second;
586 case Type::FINAL: {/* leave last */}
587 }
588 return {};
589}
590
593 for (auto& x: data) {
594 for (auto& y: x.second) {
595 out.data[y.second.first] = y.second.second;
596 }
597 }
598 return out;
599}
600
602 switch (type) {
603 case Type::Pre2012CO2Change:
605 case Type::Newest:
607 case Type::FINAL: {/* leave last */}
608 }
609 return {};
610}
611} // namespace Hitran
void * data
char * isot
#define ARTS_ASSERT(condition,...)
Definition: debug.h:83
#define ARTS_USER_ERROR(...)
Definition: debug.h:150
constexpr bool good_enum(EnumType x) noexcept
Checks if the enum number is good.
Definition: enums.h:21
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
QuantumIdentifier from_mol_iso(Index molnum, char isonum)
Returns the species if possible or throws an error if it cannot be found.
std::map< Index, std::map< char, std::pair< Index, Numeric > > > HitranMap
Numeric ratio_from_lookup(Index mol, char isochar, Type type)
Finds the isotopologue ratio of the species from HITRAN.
OurHitranMap select_hitran_map()
Selects the map and returns it.
SpeciesIsotopologueRatios isotopologue_ratios_impl(const HitranMap &data)
const HitranMap pre2012co2change_molparam_map
In 2012 the order if isotopologues were changed in HITRAN.
QuantumIdentifier id_from_lookup(Index mol, char isochar, Type type)
std::map< Index, std::map< char, Species::IsotopeRecord > > OurHitranMap
SpeciesIsotopologueRatios isotopologue_ratios(Type type)
OurHitranMap to_species_map(const HitranMap &string_map)
Turns the string-map required at compile time into a species-map to be used as a static runtime map.
const HitranMap latest_molparam_map
The latest version of the HITRAN online molparam.txt file as a map.
char Type type
char isochar
constexpr std::array Isotopologues
Definition: isotopologues.h:50
constexpr Index find_species_index(const Species spec, const std::string_view isot) noexcept
Quantum::Identifier QuantumIdentifier
Definition: quantum.h:471
std::array< Numeric, maxsize > data