ARTS 2.5.11 (git: 725533f0)
absorption.cc
Go to the documentation of this file.
1
14#include "absorption.h"
15#include "arts.h"
16#include "arts_conversions.h"
17#include "auto_md.h"
18#include "file.h"
19#include "linescaling.h"
20#include "lineshape.h"
21#include "logic.h"
22#include "math_funcs.h"
23#include "messages.h"
24#include "partfun.h"
25#include <algorithm>
26#include <cfloat>
27#include <cmath>
28#include <cstdlib>
29#include <map>
30
31#include "global_data.h"
32
33void checkPartitionFunctions(const ArrayOfArrayOfAbsorptionLines& abs_lines_per_species) {
34 for (auto& abs_lines: abs_lines_per_species) {
35 for (auto& band: abs_lines) {
37 "Species: ", band.Isotopologue().FullName(), " has no partition function\n",
38 "You must recompile ARTS partition functions with data for this species to continue your calculations,\n"
39 "or exclude the species from your computation setup")
40 }
41 }
42}
43
45 const Species::IsotopologueRatios& isoratios) {
46
47 for (auto& abs_lines: abs_lines_per_species) {
48 for (auto& band: abs_lines) {
49 ARTS_USER_ERROR_IF (std::isnan(isoratios[band.Isotopologue()]),
50 "Species: ", band.Isotopologue().FullName(), " has no isotopologue ratios\n",
51 "You must add its isotopologue ratios to your included data or\n"
52 "exclude the species from your computation setup")
53 }
54 }
55}
56
68Numeric wavenumber_to_joule(Numeric e) {
70}
71
73
85 const String& species_name,
86 const ArrayOfArrayOfSpeciesTag& abs_species,
87 const Matrix& abs_vmrs) {
88 const Index index = find_first_species(abs_species, Species::fromShortName(species_name));
89
90 vmr.resize(abs_vmrs.ncols());
91 if (index < 0)
92 vmr = -99;
93 else
94 vmr = abs_vmrs(index, Range(joker));
95}
void checkIsotopologueRatios(const ArrayOfArrayOfAbsorptionLines &abs_lines_per_species, const Species::IsotopologueRatios &isoratios)
Check that isotopologue ratios for the given species are correctly defined.
Definition absorption.cc:44
void checkPartitionFunctions(const ArrayOfArrayOfAbsorptionLines &abs_lines_per_species)
Check that ARTS was compiled for all requested species tags.
Definition absorption.cc:33
void set_vmr_from_first_species(Vector &vmr, const String &species_name, const ArrayOfArrayOfSpeciesTag &abs_species, const Matrix &abs_vmrs)
set_abs_from_first_species.
Definition absorption.cc:84
Numeric wavenumber_to_joule(Numeric e)
A little helper function to convert energy from units of wavenumber (cm^-1) to Joule (J).
Definition absorption.cc:68
Declarations required for the calculation of absorption coefficients.
The global header file for ARTS.
Common ARTS conversions.
This can be used to make arrays out of anything.
Definition array.h:31
#define ARTS_USER_ERROR_IF(condition,...)
Definition debug.h:137
This file contains basic functions to handle ASCII files.
Constains various line scaling functions.
Declarations having to do with the four output streams.
constexpr auto kaycm2joule(auto x) noexcept
Conversion from cm-1 to Joule.
constexpr bool has_partfun(const Species::IsotopeRecord &ir) noexcept
Definition partfun.h:153
Index find_first_species(const ArrayOfArrayOfSpeciesTag &specs, Species::Species spec) noexcept