ARTS 2.5.0 (git: 9ee3ac6c)
species.h
Go to the documentation of this file.
1#ifndef species_h
2#define species_h
3
4#include "enums.h"
5#include "matpack.h"
6
7namespace Species {
9ENUMCLASS(Species, unsigned char,
10 Bath,
11 Water,
12 CarbonDioxide,
13 Ozone,
14 NitrogenOxide,
15 CarbonMonoxide,
16 Methane,
17 Oxygen,
18 NitricOxide,
19 SulfurDioxide,
20 NitrogenDioxide,
21 Ammonia,
22 NitricAcid,
23 Hydroxyl,
24 HydrogenFluoride,
25 HydrogenChloride,
26 HydrogenBromide,
27 HydrogenIodide,
28 ChlorineMonoxide,
29 CarbonylSulfide,
30 Formaldehyde,
31 HeavyFormaldehyde,
32 VeryHeavyFormaldehyde,
33 HypochlorousAcid,
34 Nitrogen,
35 HydrogenCyanide,
36 Chloromethane,
37 HydrogenPeroxide,
38 Acetylene,
39 Ethane,
40 Phosphine,
41 CarbonylFluoride,
42 SulfurHexafluoride,
43 HydrogenSulfide,
44 FormicAcid,
45 LeftHeavyFormicAcid,
46 RightHeavyFormicAcid,
47 Hydroperoxyl,
48 OxygenAtom,
49 ChlorineNitrate,
50 NitricOxideCation,
51 ChlorineDioxide,
52 BromineMonoxide,
53 SulfuricAcid,
54 ChlorineMonoxideDimer,
55 HypobromousAcid,
56 Ethylene,
57 Methanol,
58 Bromomethane,
59 Acetonitrile,
60 HeavyAcetonitrile,
61 CarbonTetrafluoride,
62 Diacetylene,
63 Cyanoacetylene,
64 Hydrogen,
65 CarbonMonosulfide,
66 HydrogenIsocyanide,
67 SulfurMonoxide,
68 Propane,
69 HydrogenAtom,
70 Helium,
71 Argon,
72 SulfurTrioxide,
73 Cyanogen,
74 Phosgene,
75 CarbonDisulfide,
76 Methyl,
77 Cyclopropene,
78 Hexafluoroethane,
79 Perfluoropropane,
80 Perfluorobutane,
81 Perfluoropentane,
82 Perfluorohexane,
83 Perfluorooctane,
84 Perfluorocyclobutane,
85 CarbonTetrachloride,
86 CFC11,
87 CFC113,
88 CFC114,
89 CFC115,
90 CFC12,
91 Dichloromethane,
92 Trichloroethane,
93 Trichloromethane,
94 Bromochlorodifluoromethane,
95 Bromotrifluoromethane,
96 Dibromotetrafluoroethane,
97 HCFC141b,
98 HCFC142b,
99 HCFC22,
100 HFC125,
101 HFC134a,
102 HFC143a,
103 HFC152a,
104 HFC227ea,
105 HFC23,
106 HFC245fa,
107 HFC32,
108 NitrogenTrifluoride,
109 SulfurylFluoride,
110 HFC4310mee,
111 Germane,
112 Iodomethane,
113 Fluoromethane,
114 liquidcloud,
115 icecloud,
116 rain,
117 free_electrons,
118 particles
119 ) // Species
120
121constexpr std::string_view toShortName(Species x) noexcept {
122 switch (x) {
123 case Species::Bath:
124 return "AIR";
125 case Species::Water:
126 return "H2O";
127 case Species::CarbonDioxide:
128 return "CO2";
129 case Species::Ozone:
130 return "O3";
131 case Species::NitrogenOxide:
132 return "N2O";
133 case Species::CarbonMonoxide:
134 return "CO";
135 case Species::Methane:
136 return "CH4";
137 case Species::Oxygen:
138 return "O2";
139 case Species::NitricOxide:
140 return "NO";
141 case Species::SulfurDioxide:
142 return "SO2";
143 case Species::NitrogenDioxide:
144 return "NO2";
145 case Species::Ammonia:
146 return "NH3";
147 case Species::NitricAcid:
148 return "HNO3";
149 case Species::Hydroxyl:
150 return "OH";
151 case Species::HydrogenFluoride:
152 return "HF";
153 case Species::HydrogenChloride:
154 return "HCl";
155 case Species::HydrogenBromide:
156 return "HBr";
157 case Species::HydrogenIodide:
158 return "HI";
159 case Species::ChlorineMonoxide:
160 return "ClO";
161 case Species::CarbonylSulfide:
162 return "OCS";
163 case Species::Formaldehyde:
164 return "H2CO";
165 case Species::HeavyFormaldehyde:
166 return "HDCO";
167 case Species::VeryHeavyFormaldehyde:
168 return "D2CO";
169 case Species::HypochlorousAcid:
170 return "HOCl";
171 case Species::Nitrogen:
172 return "N2";
173 case Species::HydrogenCyanide:
174 return "HCN";
175 case Species::Chloromethane:
176 return "CH3Cl";
177 case Species::HydrogenPeroxide:
178 return "H2O2";
179 case Species::Acetylene:
180 return "C2H2";
181 case Species::Ethane:
182 return "C2H6";
183 case Species::Phosphine:
184 return "PH3";
185 case Species::CarbonylFluoride:
186 return "COF2";
187 case Species::SulfurHexafluoride:
188 return "SF6";
189 case Species::HydrogenSulfide:
190 return "H2S";
191 case Species::FormicAcid:
192 return "HCOOH";
193 case Species::LeftHeavyFormicAcid:
194 return "DCOOH";
195 case Species::RightHeavyFormicAcid:
196 return "HCOOD";
197 case Species::Hydroperoxyl:
198 return "HO2";
199 case Species::OxygenAtom:
200 return "O";
201 case Species::ChlorineNitrate:
202 return "ClONO2";
203 case Species::NitricOxideCation:
204 return "NO+";
205 case Species::HypobromousAcid:
206 return "HOBr";
207 case Species::Ethylene:
208 return "C2H4";
209 case Species::Methanol:
210 return "CH3OH";
211 case Species::Bromomethane:
212 return "CH3Br";
213 case Species::Acetonitrile:
214 return "CH3CN";
215 case Species::HeavyAcetonitrile:
216 return "CH2DCN";
217 case Species::CarbonTetrafluoride:
218 return "CF4";
219 case Species::Diacetylene:
220 return "C4H2";
221 case Species::Cyanoacetylene:
222 return "HC3N";
223 case Species::Hydrogen:
224 return "H2";
225 case Species::CarbonMonosulfide:
226 return "CS";
227 case Species::SulfurTrioxide:
228 return "SO3";
229 case Species::Cyanogen:
230 return "C2N2";
231 case Species::Phosgene:
232 return "COCl2";
233 case Species::SulfurMonoxide:
234 return "SO";
235 case Species::CarbonDisulfide:
236 return "CS2";
237 case Species::Methyl:
238 return "CH3";
239 case Species::Cyclopropene:
240 return "C3H4";
241 case Species::SulfuricAcid:
242 return "H2SO4";
243 case Species::HydrogenIsocyanide:
244 return "HNC";
245 case Species::BromineMonoxide:
246 return "BrO";
247 case Species::ChlorineDioxide:
248 return "OClO";
249 case Species::Propane:
250 return "C3H8";
251 case Species::Helium:
252 return "He";
253 case Species::ChlorineMonoxideDimer:
254 return "Cl2O2";
255 case Species::HydrogenAtom:
256 return "H";
257 case Species::Argon:
258 return "Ar";
259 case Species::Hexafluoroethane: return "C2F6";
260 case Species::Perfluoropropane: return "C3F8";
261 case Species::Perfluorobutane: return "C4F10";
262 case Species::Perfluoropentane: return "C5F12";
263 case Species::Perfluorohexane: return "C6F14";
264 case Species::Perfluorooctane: return "C8F18";
265 case Species::Perfluorocyclobutane: return "cC4F8";
266 case Species::CarbonTetrachloride: return "CCl4";
267 case Species::CFC11: return "CFC11";
268 case Species::CFC113: return "CFC113";
269 case Species::CFC114: return "CFC114";
270 case Species::CFC115: return "CFC115";
271 case Species::CFC12: return "CFC12";
272 case Species::Dichloromethane: return "CH2Cl2";
273 case Species::Trichloroethane: return "CH3CCl3";
274 case Species::Trichloromethane: return "CHCl3";
275 case Species::Bromochlorodifluoromethane: return "Halon1211";
276 case Species::Bromotrifluoromethane: return "Halon1301";
277 case Species::Dibromotetrafluoroethane: return "Halon2402";
278 case Species::HCFC141b: return "HCFC141b";
279 case Species::HCFC142b: return "HCFC142b";
280 case Species::HCFC22: return "HCFC22";
281 case Species::HFC125: return "HFC125";
282 case Species::HFC134a: return "HFC134a";
283 case Species::HFC143a: return "HFC143a";
284 case Species::HFC152a: return "HFC152a";
285 case Species::HFC227ea: return "HFC227ea";
286 case Species::HFC23: return "HFC23";
287 case Species::HFC245fa: return "HFC245fa";
288 case Species::HFC32: return "HFC32";
289 case Species::NitrogenTrifluoride: return "NF3";
290 case Species::SulfurylFluoride: return "SO2F2";
291 case Species::HFC4310mee: return "HFC4310mee";
292 case Species::Germane: return "GeH4";
293 case Species::Iodomethane: return "CH3I";
294 case Species::Fluoromethane: return "CH3F";
295 case Species::liquidcloud:
296 return "liquidcloud";
297 case Species::icecloud:
298 return "icecloud";
299 case Species::rain:
300 return "rain";
301 case Species::free_electrons:
302 return "free_electrons";
303 case Species::particles:
304 return "particles";
305 case Species::FINAL: { /* Leave last */
306 }
307 }
308 return "";
309}
310
311constexpr Species fromShortName(const std::string_view x) noexcept {
312 if (x == "AIR")
313 return Species::Bath;
314 if (x == "H2O")
315 return Species::Water;
316 if (x == "CO2")
317 return Species::CarbonDioxide;
318 if (x == "O3")
319 return Species::Ozone;
320 if (x == "N2O")
321 return Species::NitrogenOxide;
322 if (x == "CO")
323 return Species::CarbonMonoxide;
324 if (x == "CH4")
325 return Species::Methane;
326 if (x == "O2")
327 return Species::Oxygen;
328 if (x == "NO")
329 return Species::NitricOxide;
330 if (x == "SO2")
331 return Species::SulfurDioxide;
332 if (x == "NO2")
333 return Species::NitrogenDioxide;
334 if (x == "NH3")
335 return Species::Ammonia;
336 if (x == "HNO3")
337 return Species::NitricAcid;
338 if (x == "OH")
339 return Species::Hydroxyl;
340 if (x == "HF")
341 return Species::HydrogenFluoride;
342 if (x == "HCl")
343 return Species::HydrogenChloride;
344 if (x == "HBr")
345 return Species::HydrogenBromide;
346 if (x == "HI")
347 return Species::HydrogenIodide;
348 if (x == "ClO")
349 return Species::ChlorineMonoxide;
350 if (x == "OCS")
351 return Species::CarbonylSulfide;
352 if (x == "H2CO")
353 return Species::Formaldehyde;
354 if (x == "HDCO")
355 return Species::HeavyFormaldehyde;
356 if (x == "D2CO")
357 return Species::VeryHeavyFormaldehyde;
358 if (x == "HOCl")
359 return Species::HypochlorousAcid;
360 if (x == "N2")
361 return Species::Nitrogen;
362 if (x == "HCN")
363 return Species::HydrogenCyanide;
364 if (x == "CH3Cl")
365 return Species::Chloromethane;
366 if (x == "H2O2")
367 return Species::HydrogenPeroxide;
368 if (x == "C2H2")
369 return Species::Acetylene;
370 if (x == "C2H6")
371 return Species::Ethane;
372 if (x == "PH3")
373 return Species::Phosphine;
374 if (x == "COF2")
375 return Species::CarbonylFluoride;
376 if (x == "SF6")
377 return Species::SulfurHexafluoride;
378 if (x == "H2S")
379 return Species::HydrogenSulfide;
380 if (x == "HCOOH")
381 return Species::FormicAcid;
382 if (x == "DCOOH")
383 return Species::LeftHeavyFormicAcid;
384 if (x == "HCOOD")
385 return Species::RightHeavyFormicAcid;
386 if (x == "HO2")
387 return Species::Hydroperoxyl;
388 if (x == "O")
389 return Species::OxygenAtom;
390 if (x == "ClONO2")
391 return Species::ChlorineNitrate;
392 if (x == "NO+")
393 return Species::NitricOxideCation;
394 if (x == "HOBr")
395 return Species::HypobromousAcid;
396 if (x == "C2H4")
397 return Species::Ethylene;
398 if (x == "CH3OH")
399 return Species::Methanol;
400 if (x == "CH3Br")
401 return Species::Bromomethane;
402 if (x == "CH3CN")
403 return Species::Acetonitrile;
404 if (x == "CH2DCN")
405 return Species::HeavyAcetonitrile;
406 if (x == "CF4")
407 return Species::CarbonTetrafluoride;
408 if (x == "C4H2")
409 return Species::Diacetylene;
410 if (x == "HC3N")
411 return Species::Cyanoacetylene;
412 if (x == "H2")
413 return Species::Hydrogen;
414 if (x == "CS")
415 return Species::CarbonMonosulfide;
416 if (x == "SO3")
417 return Species::SulfurTrioxide;
418 if (x == "C2N2")
419 return Species::Cyanogen;
420 if (x == "COCl2")
421 return Species::Phosgene;
422 if (x == "SO")
423 return Species::SulfurMonoxide;
424 if (x == "CS2")
425 return Species::CarbonDisulfide;
426 if (x == "CH3")
427 return Species::Methyl;
428 if (x == "C3H4")
429 return Species::Cyclopropene;
430 if (x == "H2SO4")
431 return Species::SulfuricAcid;
432 if (x == "HNC")
433 return Species::HydrogenIsocyanide;
434 if (x == "BrO")
435 return Species::BromineMonoxide;
436 if (x == "OClO")
437 return Species::ChlorineDioxide;
438 if (x == "C3H8")
439 return Species::Propane;
440 if (x == "He")
441 return Species::Helium;
442 if (x == "Cl2O2")
443 return Species::ChlorineMonoxideDimer;
444 if (x == "H")
445 return Species::HydrogenAtom;
446 if (x == "Ar")
447 return Species::Argon;
448 if (x == "C2F6") return Species::Hexafluoroethane;
449 if (x == "C3F8") return Species::Perfluoropropane;
450 if (x == "C4F10") return Species::Perfluorobutane;
451 if (x == "C5F12") return Species::Perfluoropentane;
452 if (x == "C6F14") return Species::Perfluorohexane;
453 if (x == "C8F18") return Species::Perfluorooctane;
454 if (x == "cC4F8") return Species::Perfluorocyclobutane;
455 if (x == "CCl4") return Species::CarbonTetrachloride;
456 if (x == "CFC11") return Species::CFC11;
457 if (x == "CFC113") return Species::CFC113;
458 if (x == "CFC114") return Species::CFC114;
459 if (x == "CFC115") return Species::CFC115;
460 if (x == "CFC12") return Species::CFC12;
461 if (x == "CH2Cl2") return Species::Dichloromethane;
462 if (x == "CH3CCl3") return Species::Trichloroethane;
463 if (x == "CHCl3") return Species::Trichloromethane;
464 if (x == "Halon1211") return Species::Bromochlorodifluoromethane;
465 if (x == "Halon1301") return Species::Bromotrifluoromethane;
466 if (x == "Halon2402") return Species::Dibromotetrafluoroethane;
467 if (x == "HCFC141b") return Species::HCFC141b;
468 if (x == "HCFC142b") return Species::HCFC142b;
469 if (x == "HCFC22") return Species::HCFC22;
470 if (x == "HFC125") return Species::HFC125;
471 if (x == "HFC134a") return Species::HFC134a;
472 if (x == "HFC143a") return Species::HFC143a;
473 if (x == "HFC152a") return Species::HFC152a;
474 if (x == "HFC227ea") return Species::HFC227ea;
475 if (x == "HFC23") return Species::HFC23;
476 if (x == "HFC245fa") return Species::HFC245fa;
477 if (x == "HFC32") return Species::HFC32;
478 if (x == "NF3") return Species::NitrogenTrifluoride;
479 if (x == "SO2F2") return Species::SulfurylFluoride;
480 if (x == "HFC4310mee") return Species::HFC4310mee;
481 if (x == "GeH4") return Species::Germane;
482 if (x == "CH3I") return Species::Iodomethane;
483 if (x == "CH3F") return Species::Fluoromethane;
484 if (x == "liquidcloud")
485 return Species::liquidcloud;
486 if (x == "icecloud")
487 return Species::icecloud;
488 if (x == "rain")
489 return Species::rain;
490 if (x == "free_electrons")
491 return Species::free_electrons;
492 if (x == "particles")
493 return Species::particles;
494 return Species::FINAL;
495}
496} // namespace Species
497
498#endif // species_h
ENUMCLASS(TagType, unsigned char, Plain, Zeeman, Predefined, Cia, FreeElectrons, Particles, HitranXsec, NoLines) struct Tag
Definition: species_tags.h:12