ARTS  2.3.1285(git:92a29ea9-dirty)
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,
69  FullW,
70  SDVP,
72  SDW,
73  NoneVP,
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,
103  const SpeciesAuxData& partition_functions);
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
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&#39;s main calculations.
ModeOfLineMixing
Class that controls ReadFromLineMixingStream output.
A class implementing complex numbers for ARTS.
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.
The Vector class.
Definition: matpackI.h:860
Constants of physical expressions as constexpr.
The Tensor4 class.
Definition: matpackIV.h:421
Contains the absorption namespace.
constexpr bool typeVP(ModeOfLineMixing x)
friend std::ostream & operator<<(std::ostream &os, const HitranRelaxationMatrixData &hit)
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
Vector compute(const Numeric p, const Numeric t, const Numeric xco2, const Numeric xh2o, const ConstVectorView invcm_grid, const Numeric stotmax, const calctype type)
This can be used to make arrays out of anything.
Definition: array.h:40
Constains various line scaling functions.
A constant view of a Vector.
Definition: matpackI.h:476
constexpr bool typeFull(ModeOfLineMixing x)
Auxiliary data for isotopologues.
Definition: absorption.h:217
constexpr bool typeLP(ModeOfLineMixing x)
This file contains the definition of String, the ARTS string class.