ARTS 2.5.11 (git: 6827797f)
linemixing_hitran.h
Go to the documentation of this file.
1
9#ifndef LINEMIXING_HITRAN_H
10#define LINEMIXING_HITRAN_H
11
12#include "absorptionlines.h"
13#include "arts_conversions.h"
14#include "linescaling.h"
15#include "matpack_data.h"
16#include "matpack_complex.h"
17#include "mystring.h"
18
19
21 Tensor4 W0pp, B0pp;
22 Tensor4 W0rp, B0rp;
23 Tensor4 W0qp, B0qp;
24
25 Tensor4 W0pr, B0pr;
26 Tensor4 W0rr, B0rr;
27 Tensor4 W0qr, B0qr;
28
29 Tensor4 W0pq, B0pq;
30 Tensor4 W0rq, B0rq;
31 Tensor4 W0qq, B0qq;
33 friend std::ostream& operator<<(std::ostream& os, const HitranRelaxationMatrixData& hit) {
34 return os << hit.W0pp << '\n' << hit.B0pp << '\n'
35 << hit.W0rp << '\n' << hit.B0rp << '\n'
36 << hit.W0qp << '\n' << hit.B0qp << '\n'
37 << hit.W0pr << '\n' << hit.B0pr << '\n'
38 << hit.W0rr << '\n' << hit.B0rr << '\n'
39 << hit.W0qr << '\n' << hit.B0qr << '\n'
40 << hit.W0pq << '\n' << hit.B0pq << '\n'
41 << hit.W0rq << '\n' << hit.B0rq << '\n'
42 << hit.W0qq << '\n' << hit.B0qq << '\n';
43 }
44};
45
46
47namespace lm_hitran_2017 {
48enum class calctype {
49 FullVP,
51 FullW,
52 SDVP,
54 SDW,
55 NoneVP,
57 NoneW
58};
59
60Vector compute(const Numeric p,
61 const Numeric t,
62 const Numeric xco2,
63 const Numeric xh2o,
64 const Vector& invcm_grid,
65 const Numeric stotmax,
66 const calctype type=calctype::FullW);
67
80Vector compute(const HitranRelaxationMatrixData& hitran,
81 const ArrayOfAbsorptionLines& bands,
82 const SpeciesIsotopologueRatios& isotopologue_ratio,
83 const Numeric P,
84 const Numeric T,
85 const Vector& vmrs,
86 const Vector& f_grid);
87
89ENUMCLASS(ModeOfLineMixing, unsigned char,
90 VP, // Sets LineShape::VP, will not use LineMixing code; Sets ByLTE mode
91 VP_Y, // Sets LineShape::VP, will use LineMixing code with pressure > linemixinglimit; Sets ByRosenkranzRelmatLTE mode
92 SDVP, // Sets LineShape::SDVP, will not use LineMixing code; Sets ByLTE mode
93 SDVP_Y, // Sets LineShape::SDVP, will use LineMixing code with pressure > linemixinglimit; Sets ByHITRANRosenkranzRelmat mode
94 FullW, // Sets LineShape::Lorentz, will use LineMixing code with pressure > linemixinglimit; Sets ByHITRANFullRelmat mode
95 VP_W // Sets LineShape::Voigt, will use LineMixing code with pressure > linemixinglimit; Sets ByHITRANFullRelmat mode
96)
97
98constexpr bool typeVP(ModeOfLineMixing x)
99{
100 return x == ModeOfLineMixing::VP or x == ModeOfLineMixing::VP_Y or x == ModeOfLineMixing::FullW or x == ModeOfLineMixing::VP_W;
101}
102
103constexpr bool typeLP(ModeOfLineMixing x)
104{
105 return x == ModeOfLineMixing::FullW;
106}
107
108constexpr bool typeFull(ModeOfLineMixing x)
109{
110 return x == ModeOfLineMixing::FullW or x == ModeOfLineMixing::VP_W;
111}
112
127 const SpeciesIsotopologueRatios& isotopologue_ratio,
128 const String& basedir,
129 const Numeric linemixinglimit,
130 const Numeric fmin,
131 const Numeric fmax,
132 const Numeric stot,
133 const ModeOfLineMixing mode);
134
136 const Vector& temperatures,
137 const HitranRelaxationMatrixData& hitran,
138 const Numeric P0,
139 const Index ord);
140
142 const Vector& temperatures,
143 const HitranRelaxationMatrixData& hitran,
144 const Vector& pressures);
145} // namespace lm_hitran_2017
146
147#endif // LINEMIXING_HITRAN_H
Contains the absorption namespace.
Common ARTS conversions.
This can be used to make arrays out of anything.
Definition: array.h:31
#define ENUMCLASS(ENUMTYPE, TYPE,...)
Definition: enums.h:142
Constains various line scaling functions.
This file contains the definition of String, the ARTS string class.
void hitran_lm_eigenvalue_adaptation(AbsorptionLines &band, const Vector &temperatures, const HitranRelaxationMatrixData &hitran, const Numeric P0, const Index ord)
void read(HitranRelaxationMatrixData &hitran, ArrayOfAbsorptionLines &bands, const SpeciesIsotopologueRatios &isotopologue_ratio, const String &basedir, const Numeric linemixinglimit, const Numeric fmin, const Numeric fmax, const Numeric stot, const ModeOfLineMixing mode)
Read from HITRAN online line mixing file.
Tensor5 hitran_lm_eigenvalue_adaptation_test(const AbsorptionLines &band, const Vector &temperatures, const HitranRelaxationMatrixData &hitran, const Vector &pressures)
constexpr bool typeFull(ModeOfLineMixing x)
Vector compute(const Numeric p, const Numeric t, const Numeric xco2, const Numeric xh2o, const Vector &invcm_grid, const Numeric stotmax, const calctype type)
constexpr bool typeLP(ModeOfLineMixing x)
friend std::ostream & operator<<(std::ostream &os, const HitranRelaxationMatrixData &hit)
HitranRelaxationMatrixData()=default