ARTS  2.4.0(git:4fb77825)
linemixing_hitran.h
Go to the documentation of this file.
1 /* Copyright (C) 2020
2  * Richard Larsson <larsson@mps.mpg.de>
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 "complex.h"
32 #include "constants.h"
33 #include "linescaling.h"
34 #include "matpackIV.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 
65 namespace lm_hitran_2017 {
66 enum class calctype {
67  FullVP,
68  FullRosenkranz,
69  FullW,
70  SDVP,
71  SDRosenkranz,
72  SDW,
73  NoneVP,
74  NoneRosenkranz,
75  NoneW
76 };
77 
78 Vector 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 
98  const ArrayOfAbsorptionLines& bands,
99  const Numeric P,
100  const Numeric T,
101  const ConstVectorView vmrs,
102  const ConstVectorView f_grid,
104 
106 enum class ModeOfLineMixing {
107  VP, // Sets LineShape::VP, will not use LineMixing code; Sets ByLTE mode
108  VP_Y, // Sets LineShape::VP, will use LineMixing code with pressure > linemixinglimit; Sets ByRosenkranzRelmatLTE mode
109  SDVP, // Sets LineShape::SDVP, will not use LineMixing code; Sets ByLTE mode
110  SDVP_Y, // Sets LineShape::SDVP, will use LineMixing code with pressure > linemixinglimit; Sets ByHITRANRosenkranzRelmat mode
111  FullW, // Sets LineShape::Lorentz, will use LineMixing code with pressure > linemixinglimit; Sets ByHITRANFullRelmat mode
112  VP_W // Sets LineShape::Voigt, will use LineMixing code with pressure > linemixinglimit; Sets ByHITRANFullRelmat mode
113 };
114 
115 constexpr bool typeVP(ModeOfLineMixing x)
116 {
117  return x == ModeOfLineMixing::VP or x == ModeOfLineMixing::VP_Y or x == ModeOfLineMixing::FullW or x == ModeOfLineMixing::VP_W;
118 }
119 
120 constexpr bool typeLP(ModeOfLineMixing x)
121 {
122  return x == ModeOfLineMixing::FullW;
123 }
124 
125 constexpr bool typeFull(ModeOfLineMixing x)
126 {
127  return x == ModeOfLineMixing::FullW or x == ModeOfLineMixing::VP_W;
128 }
129 
141 void read(HitranRelaxationMatrixData& hitran, ArrayOfAbsorptionLines& bands, const String& basedir, const Numeric linemixinglimit, const Numeric fmin, const Numeric fmax, const Numeric stot, const ModeOfLineMixing mode);
142 
143 }; // lm_hitran_2017
144 
145 #endif // LINEMIXING_HITRAN_H
HitranRelaxationMatrixData::operator<<
friend std::ostream & operator<<(std::ostream &os, const HitranRelaxationMatrixData &hit)
Definition: linemixing_hitran.h:51
HitranRelaxationMatrixData::B0pr
Tensor4 B0pr
Definition: linemixing_hitran.h:43
HitranRelaxationMatrixData::W0qr
Tensor4 W0qr
Definition: linemixing_hitran.h:45
lm_hitran_2017::calctype::FullVP
@ FullVP
lm_hitran_2017::typeLP
constexpr bool typeLP(ModeOfLineMixing x)
Definition: linemixing_hitran.h:120
HitranRelaxationMatrixData::B0qq
Tensor4 B0qq
Definition: linemixing_hitran.h:49
absorptionlines.h
Contains the absorption namespace.
HitranRelaxationMatrixData::W0pr
Tensor4 W0pr
Definition: linemixing_hitran.h:43
lm_hitran_2017::ModeOfLineMixing
ModeOfLineMixing
Class that controls ReadFromLineMixingStream output.
Definition: linemixing_hitran.h:106
lm_hitran_2017::typeVP
constexpr bool typeVP(ModeOfLineMixing x)
Definition: linemixing_hitran.h:115
HitranRelaxationMatrixData::W0pp
Tensor4 W0pp
Definition: linemixing_hitran.h:39
lm_hitran_2017::read
void read(HitranRelaxationMatrixData &hitran, ArrayOfAbsorptionLines &bands, 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.
Definition: linemixing_hitran.cc:1940
HitranRelaxationMatrixData::W0rr
Tensor4 W0rr
Definition: linemixing_hitran.h:44
Tensor4
The Tensor4 class.
Definition: matpackIV.h:421
SpeciesAuxData
Auxiliary data for isotopologues.
Definition: absorption.h:217
HitranRelaxationMatrixData::B0qr
Tensor4 B0qr
Definition: linemixing_hitran.h:45
matpackIV.h
complex.h
A class implementing complex numbers for ARTS.
HitranRelaxationMatrixData::B0qp
Tensor4 B0qp
Definition: linemixing_hitran.h:41
Array
This can be used to make arrays out of anything.
Definition: array.h:108
HitranRelaxationMatrixData::B0rp
Tensor4 B0rp
Definition: linemixing_hitran.h:40
HitranRelaxationMatrixData
Definition: linemixing_hitran.h:38
HitranRelaxationMatrixData::W0qq
Tensor4 W0qq
Definition: linemixing_hitran.h:49
my_basic_string< char >
lm_hitran_2017::ModeOfLineMixing::VP
@ VP
HitranRelaxationMatrixData::W0qp
Tensor4 W0qp
Definition: linemixing_hitran.h:41
Numeric
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
ARTS::Var::f_grid
Vector f_grid(Workspace &ws) noexcept
Definition: autoarts.h:3449
lm_hitran_2017::typeFull
constexpr bool typeFull(ModeOfLineMixing x)
Definition: linemixing_hitran.h:125
HitranRelaxationMatrixData::HitranRelaxationMatrixData
HitranRelaxationMatrixData()
Definition: linemixing_hitran.h:50
HitranRelaxationMatrixData::W0rq
Tensor4 W0rq
Definition: linemixing_hitran.h:48
lm_hitran_2017::calctype
calctype
Definition: linemixing_hitran.h:66
HitranRelaxationMatrixData::B0pq
Tensor4 B0pq
Definition: linemixing_hitran.h:47
HitranRelaxationMatrixData::W0pq
Tensor4 W0pq
Definition: linemixing_hitran.h:47
lm_hitran_2017
Definition: linemixing_hitran.cc:35
constants.h
Constants of physical expressions as constexpr.
HitranRelaxationMatrixData::B0rr
Tensor4 B0rr
Definition: linemixing_hitran.h:44
linescaling.h
Constains various line scaling functions.
HitranRelaxationMatrixData::B0rq
Tensor4 B0rq
Definition: linemixing_hitran.h:48
ARTS::Var::partition_functions
SpeciesAuxData partition_functions(Workspace &ws) noexcept
Definition: autoarts.h:4860
lm_hitran_2017::compute
Vector compute(const Numeric p, const Numeric t, const Numeric xco2, const Numeric xh2o, const ConstVectorView invcm_grid, const Numeric stotmax, const calctype type)
Definition: linemixing_hitran.cc:1882
ARTS::Var::x
Vector x(Workspace &ws) noexcept
Definition: autoarts.h:7346
Vector
The Vector class.
Definition: matpackI.h:860
ConstVectorView
A constant view of a Vector.
Definition: matpackI.h:476
HitranRelaxationMatrixData::B0pp
Tensor4 B0pp
Definition: linemixing_hitran.h:39
mystring.h
This file contains the definition of String, the ARTS string class.
HitranRelaxationMatrixData::W0rp
Tensor4 W0rp
Definition: linemixing_hitran.h:40
LineShape::vmrs
Vector vmrs(const ConstVectorView &atmospheric_vmrs, const ArrayOfArrayOfSpeciesTag &atmospheric_species, const QuantumIdentifier &self, const ArrayOfSpeciesTag &lineshape_species, bool self_in_list, bool bath_in_list, Type type)
Returns a VMR vector for this model's main calculations.
Definition: lineshapemodel.cc:474