ARTS 2.5.4 (git: 31ce4f0e)
linemixing_hitran.h
Go to the documentation of this file.
1/* Copyright (C) 2020
2 * Richard Larsson <ric.larsson@gmail.com>
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2, or (at your option) any
7 * later version.
8 *
9 * This program 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 General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
17 * USA. */
18
27#ifndef LINEMIXING_HITRAN_H
28#define LINEMIXING_HITRAN_H
29
30#include "absorptionlines.h"
31#include "arts_conversions.h"
32#include "linescaling.h"
33#include "matpackIV.h"
34#include "matpack_complex.h"
35#include "mystring.h"
36
37
42
46
51 friend std::ostream& operator<<(std::ostream& os, const HitranRelaxationMatrixData& hit) {
52 return os << hit.W0pp << '\n' << hit.B0pp << '\n'
53 << hit.W0rp << '\n' << hit.B0rp << '\n'
54 << hit.W0qp << '\n' << hit.B0qp << '\n'
55 << hit.W0pr << '\n' << hit.B0pr << '\n'
56 << hit.W0rr << '\n' << hit.B0rr << '\n'
57 << hit.W0qr << '\n' << hit.B0qr << '\n'
58 << hit.W0pq << '\n' << hit.B0pq << '\n'
59 << hit.W0rq << '\n' << hit.B0rq << '\n'
60 << hit.W0qq << '\n' << hit.B0qq << '\n';
61 }
62};
63
64
65namespace lm_hitran_2017 {
66enum class calctype {
67 FullVP,
69 FullW,
70 SDVP,
72 SDW,
73 NoneVP,
75 NoneW
76};
77
78Vector compute(const Numeric p,
79 const Numeric t,
80 const Numeric xco2,
81 const Numeric xh2o,
82 const ConstVectorView& invcm_grid,
83 const Numeric stotmax,
84 const calctype type=calctype::FullW);
85
99 const ArrayOfAbsorptionLines& bands,
100 const SpeciesIsotopologueRatios& isotopologue_ratio,
101 const Numeric P,
102 const Numeric T,
103 const ConstVectorView& vmrs,
104 const ConstVectorView& f_grid);
105
107ENUMCLASS(ModeOfLineMixing, unsigned char,
108 VP, // Sets LineShape::VP, will not use LineMixing code; Sets ByLTE mode
109 VP_Y, // Sets LineShape::VP, will use LineMixing code with pressure > linemixinglimit; Sets ByRosenkranzRelmatLTE mode
110 SDVP, // Sets LineShape::SDVP, will not use LineMixing code; Sets ByLTE mode
111 SDVP_Y, // Sets LineShape::SDVP, will use LineMixing code with pressure > linemixinglimit; Sets ByHITRANRosenkranzRelmat mode
112 FullW, // Sets LineShape::Lorentz, will use LineMixing code with pressure > linemixinglimit; Sets ByHITRANFullRelmat mode
113 VP_W // Sets LineShape::Voigt, will use LineMixing code with pressure > linemixinglimit; Sets ByHITRANFullRelmat mode
114)
115
116constexpr bool typeVP(ModeOfLineMixing x)
117{
118 return x == ModeOfLineMixing::VP or x == ModeOfLineMixing::VP_Y or x == ModeOfLineMixing::FullW or x == ModeOfLineMixing::VP_W;
119}
120
121constexpr bool typeLP(ModeOfLineMixing x)
122{
123 return x == ModeOfLineMixing::FullW;
124}
125
126constexpr bool typeFull(ModeOfLineMixing x)
127{
128 return x == ModeOfLineMixing::FullW or x == ModeOfLineMixing::VP_W;
129}
130
145 const SpeciesIsotopologueRatios& isotopologue_ratio,
146 const String& basedir,
147 const Numeric linemixinglimit,
148 const Numeric fmin,
149 const Numeric fmax,
150 const Numeric stot,
151 const ModeOfLineMixing mode);
152
154 const Vector& temperatures,
155 const HitranRelaxationMatrixData& hitran,
156 const Numeric P0,
157 const Index ord);
158
160 const Vector& temperatures,
161 const HitranRelaxationMatrixData& hitran,
162 const Vector& pressures);
163} // namespace lm_hitran_2017
164
165#endif // LINEMIXING_HITRAN_H
Contains the absorption namespace.
Common ARTS conversions.
This can be used to make arrays out of anything.
Definition: array.h:48
A constant view of a Vector.
Definition: matpackI.h:512
The Tensor4 class.
Definition: matpackIV.h:429
The Tensor5 class.
Definition: matpackV.h:516
The Vector class.
Definition: matpackI.h:899
Constains various line scaling functions.
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
This file contains the definition of String, the ARTS string class.
Vector vmrs(const ConstVectorView &atmospheric_vmrs, const ArrayOfArrayOfSpeciesTag &atmospheric_species, const ArrayOfSpecies &lineshape_species) ARTS_NOEXCEPT
Returns a VMR vector for this model's main calculations.
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 ConstVectorView &invcm_grid, const Numeric stotmax, const calctype type)
constexpr bool typeLP(ModeOfLineMixing x)
ENUMCLASS(ModeOfLineMixing, unsigned char, VP, VP_Y, SDVP, SDVP_Y, FullW, VP_W) const expr bool typeVP(ModeOfLineMixing x)
Class that controls ReadFromLineMixingStream output.
friend std::ostream & operator<<(std::ostream &os, const HitranRelaxationMatrixData &hit)
HitranRelaxationMatrixData()=default