ARTS 2.5.11 (git: 725533f0)
Absorption Namespace Reference

Namespace to contain things required for absorption calculations. More...

Namespaces

namespace  LineMixing
 
namespace  PredefinedModel
 

Classes

struct  Lines
 
struct  SingleLine
 Computations and data for a single absorption line. More...
 
struct  SingleLineExternal
 Single line reading output. More...
 

Functions

std::ostream & operator<< (std::ostream &os, const Absorption::Lines &lines)
 
std::istream & operator>> (std::istream &is, Lines &lines)
 
std::ostream & operator<< (std::ostream &os, const Absorption::SingleLine &line)
 
std::istream & operator>> (std::istream &is, Absorption::SingleLine &line)
 
String cutofftype2metadatastring (CutoffType in, Numeric cutoff)
 
const Quantum::Number::Valueget (const Quantum::Number::LocalState &qns) ARTS_NOEXCEPT
 
bool any_cutoff (const ArrayOfArrayOfAbsorptionLines &abs_lines_per_species)
 
Index nelem (const Lines &l)
 Number of lines.
 
Index nelem (const Array< Lines > &l)
 Number of lines in list.
 
Index nelem (const Array< Array< Lines > > &l)
 Number of lines in lists.
 
 ENUMCLASS (MirroringType, char, None, Lorentz, SameAsLineShape, Manual) const expr std
 Describes the type of mirroring line effects.
 
 ENUMCLASS (PopulationType, char, LTE, NLTE, VibTemps, ByHITRANRosenkranzRelmat, ByHITRANFullRelmat, ByMakarovFullRelmat, ByRovibLinearDipoleLineMixing) const expr std
 Describes the type of population level counter.
 
constexpr bool relaxationtype_relmat (PopulationType in) noexcept
 
 ENUMCLASS (CutoffType, char, None, ByLine) String cutofftype2metadatastring(CutoffType in
 Describes the type of cutoff calculations.
 
SingleLineExternal ReadFromArtscat3Stream (istream &is)
 Read from ARTSCAT-3.
 
SingleLineExternal ReadFromArtscat4Stream (istream &is)
 Read from ARTSCAT-4.
 
SingleLineExternal ReadFromArtscat5Stream (istream &is)
 Read from ARTSCAT-5.
 
SingleLineExternal ReadFromLBLRTMStream (istream &is)
 Read from LBLRTM.
 
SingleLineExternal ReadFromHitran2004Stream (istream &is)
 Read from newer HITRAN.
 
SingleLineExternal ReadFromHitranOnlineStream (istream &is)
 Read from HITRAN online.
 
SingleLineExternal ReadFromHitran2001Stream (istream &is)
 Read from HITRAN before 2004.
 
SingleLineExternal ReadFromJplStream (istream &is)
 Read from JPL.
 
std::vector< Linessplit_list_of_external_lines (std::vector< SingleLineExternal > &external_lines, const std::vector< QuantumNumberType > &localquantas={}, const std::vector< QuantumNumberType > &globalquantas={})
 Splits a list of lines into proper Lines.
 
Numeric reduced_rovibrational_dipole (Rational Jf, Rational Ji, Rational lf, Rational li, Rational k=Rational(1))
 Compute the reduced rovibrational dipole moment.
 
Numeric reduced_magnetic_quadrapole (Rational Jf, Rational Ji, Rational N)
 Compute the reduced magnetic quadrapole moment.
 
bool any_cutoff (const Array< Array< Lines > > &abs_lines_per_species)
 Checks if there are any cutoffs in the lines.
 

Variables

Numeric cutoff
 

Detailed Description

Namespace to contain things required for absorption calculations.

Function Documentation

◆ any_cutoff() [1/2]

bool Absorption::any_cutoff ( const Array< Array< Lines > > &  abs_lines_per_species)

Checks if there are any cutoffs in the lines.

Parameters
[in]abs_lines_per_speciesAs WSV
Returns
true if any Lines have a cutoff enum value other than None

◆ any_cutoff() [2/2]

bool Absorption::any_cutoff ( const ArrayOfArrayOfAbsorptionLines abs_lines_per_species)

Definition at line 2853 of file absorptionlines.cc.

◆ cutofftype2metadatastring()

String Absorption::cutofftype2metadatastring ( CutoffType  in,
Numeric  cutoff 
)

Definition at line 2126 of file absorptionlines.cc.

References cutoff.

Referenced by Absorption::Lines::MetaData().

◆ ENUMCLASS() [1/3]

Absorption::ENUMCLASS ( CutoffType  ,
char  ,
None  ,
ByLine   
)

Describes the type of cutoff calculations.

◆ ENUMCLASS() [2/3]

Absorption::ENUMCLASS ( MirroringType  ,
char  ,
None  ,
Lorentz  ,
SameAsLineShape  ,
Manual   
) const

Describes the type of mirroring line effects.

Each type but None has to have an implemented effect Describes the type of normalization line effects

Each type but None has to have an implemented effect

Definition at line 34 of file absorptionlines.h.

◆ ENUMCLASS() [3/3]

Absorption::ENUMCLASS ( PopulationType  ,
char  ,
LTE  ,
NLTE  ,
VibTemps  ,
ByHITRANRosenkranzRelmat  ,
ByHITRANFullRelmat  ,
ByMakarovFullRelmat  ,
ByRovibLinearDipoleLineMixing   
) const

Describes the type of population level counter.

The types here might require that different data is available at runtime absorption calculations

Definition at line 93 of file absorptionlines.h.

◆ get()

◆ nelem() [1/3]

Index Absorption::nelem ( const Array< Array< Lines > > &  l)

Number of lines in lists.

Definition at line 2893 of file absorptionlines.cc.

References nelem().

◆ nelem() [2/3]

Index Absorption::nelem ( const Array< Lines > &  l)

Number of lines in list.

Definition at line 2885 of file absorptionlines.cc.

References nelem().

◆ nelem() [3/3]

Index Absorption::nelem ( const Lines l)

Number of lines.

Definition at line 2882 of file absorptionlines.cc.

References nelem(), and Absorption::Lines::NumLines().

Referenced by nelem(), nelem(), nelem(), ReadFromArtscat5Stream(), and Absorption::Lines::SelfVMR().

◆ operator<<() [1/2]

std::ostream & Absorption::operator<< ( std::ostream &  os,
const Absorption::Lines lines 
)

Definition at line 1771 of file absorptionlines.cc.

◆ operator<<() [2/2]

std::ostream & Absorption::operator<< ( std::ostream &  os,
const Absorption::SingleLine line 
)

Definition at line 1781 of file absorptionlines.cc.

◆ operator>>() [1/2]

std::istream & Absorption::operator>> ( std::istream &  is,
Absorption::SingleLine line 
)

Definition at line 1789 of file absorptionlines.cc.

◆ operator>>() [2/2]

std::istream & Absorption::operator>> ( std::istream &  is,
Lines lines 
)

Definition at line 1776 of file absorptionlines.cc.

◆ ReadFromArtscat3Stream()

◆ ReadFromArtscat4Stream()

◆ ReadFromArtscat5Stream()

Absorption::SingleLineExternal Absorption::ReadFromArtscat5Stream ( istream &  is)

Read from ARTSCAT-5.

Parameters
[in]isInput stream
Returns
SingleLineExternal

Definition at line 345 of file absorptionlines.cc.

References Absorption::SingleLine::A, Quantum::Number::ValueList::add(), ARTS_USER_ERROR, ARTS_USER_ERROR_IF, Absorption::SingleLineExternal::bad, Absorption::SingleLineExternal::bathbroadening, c, Absorption::SingleLineExternal::cutoff, Absorption::SingleLineExternal::cutofffreq, LineShape::Model::Data(), Absorption::SingleLine::E0, extract(), Absorption::SingleLine::F0, Species::find_species_index(), LineShape::from_linefunctiondata(), LineShape::from_linemixingdata(), LineShape::from_pressurebroadeningdata(), Absorption::SingleLine::glow, good_enum(), Absorption::SingleLine::gupp, Quantum::Number::ValueList::has(), Absorption::SingleLine::I0, Absorption::SingleLineExternal::line, Absorption::SingleLineExternal::linemixinglimit, Absorption::SingleLine::lineshape, Absorption::SingleLineExternal::lineshapetype, Absorption::SingleLineExternal::mirroring, my_basic_string< charT >::nelem(), nelem(), Absorption::SingleLineExternal::normalization, Absorption::SingleLineExternal::quantumidentity, Absorption::SingleLineExternal::selfbroadening, Quantum::Number::Value::set(), Quantum::Number::ValueList::set(), LineShape::Model::SetLineMixingModel(), Absorption::SingleLineExternal::species, Absorption::SingleLineExternal::T0, Species::update_isot_name(), Quantum::Number::GlobalState::val, and Absorption::SingleLine::zeeman.

Referenced by ReadArrayOfARTSCAT(), and ReadARTSCAT().

◆ ReadFromHitran2001Stream()

◆ ReadFromHitran2004Stream()

Absorption::SingleLineExternal Absorption::ReadFromHitran2004Stream ( istream &  is)

Read from newer HITRAN.

The HITRAN format is as follows:

 Each line consists of 160 ASCII characters, followed by a line feed (ASCII 10)
 and carriage return (ASCII 13) character, for a total of 162 bytes per line.

 Each item is defined below, with its Fortran format shown in parenthesis.

 (I2)     molecule number
 (I1)     isotopologue number (1 = most abundant, 2 = second, etc)
 (F12.6)  vacuum wavenumbers (cm-1)
 (E10.3)  intensity in cm-1/(molec * cm-2) at 296 Kelvin
 (E10.3)  Einstein-A coefficient (s-1)
 (F5.4)   air-broadened halfwidth (HWHM) in cm-1/atm at 296 Kelvin
 (F5.4)   self-broadened halfwidth (HWHM) in cm-1/atm at 296 Kelvin
 (F10.4)  lower state energy (cm-1)
 (F4.2)   coefficient of temperature dependence of air-broadened halfwidth
 (F8.6)   air-broadened pressure shift of line transition at 296 K (cm-1)
 (A15)    upper state global quanta
 (A15)    lower state global quanta
 (A15)    upper state local quanta
 (A15)    lower state local quanta
 (I1)     uncertainty index for wavenumber
 (I1)     uncertainty index for intensity
 (I1)     uncertainty index for air-broadened half-width
 (I1)     uncertainty index for self-broadened half-width
 (I1)     uncertainty index for temperature dependence
 (I1)     uncertainty index for pressure shift
 (I2)     index for table of references correspond. to wavenumber
 (I2)     index for table of references correspond. to intensity
 (I2)     index for table of references correspond. to air-broadened half-width
 (I2)     index for table of references correspond. to self-broadened half-width
 (I2)     index for table of references correspond. to temperature dependence
 (I2)     index for table of references correspond. to pressure shift
 (A1)     flag (*) for lines supplied with line-coupling algorithm
 (F7.1)   upper state statistical weight
 (F7.1)   lower state statistical weight

 The molecule numbers are encoded as shown in the table below:

   0= Null    1=  H2O    2=  CO2    3=   O3    4=  N2O    5=    CO
   6=  CH4    7=   O2    8=   NO    9=  SO2   10=  NO2   11=   NH3
   12= HNO3   13=   OH   14=   HF   15=  HCl   16=  HBr   17=    HI
   18=  ClO   19=  OCS   20= H2CO   21= HOCl   22=   N2   23=   HCN
   24=CH3Cl   25= H2O2   26= C2H2   27= C2H6   28=  PH3   29=  COF2
   30=  SF6   31=  H2S   32=HCOOH   33=  HO2   34=    O   35=ClONO2
   36=  NO+   37= HOBr   38= C2H4
* 
Parameters
[in]isInput stream
Returns
SingleLineExternal

Definition at line 560 of file absorptionlines.cc.

References Absorption::SingleLine::A, ARTS_USER_ERROR_IF, Conversion::atm2pa(), Absorption::SingleLineExternal::bad, Absorption::SingleLineExternal::bathbroadening, Constant::c, d, Absorption::SingleLine::E0, extract(), Absorption::SingleLine::F0, Absorption::SingleLine::glow, Absorption::SingleLine::gupp, LineShape::hitran_model(), Absorption::SingleLine::I0, Hitran::id_from_lookup(), Absorption::SingleLineExternal::line, Absorption::SingleLine::lineshape, Absorption::SingleLineExternal::lineshapetype, my_basic_string< charT >::nelem(), Absorption::SingleLineExternal::quantumidentity, Hitran::ratio_from_lookup(), Absorption::SingleLineExternal::selfbroadening, Absorption::SingleLineExternal::species, Quantum::Number::GlobalState::Species(), Absorption::SingleLineExternal::T0, v, and wavenumber_to_joule().

Referenced by ReadHITRAN().

◆ ReadFromHitranOnlineStream()

◆ ReadFromJplStream()

Absorption::SingleLineExternal Absorption::ReadFromJplStream ( istream &  is)

Read from JPL.

The JPL format is as follows (directly taken from the JPL documentation):

   The catalog line files are composed of 80-character lines, with one
   line entry per spectral line.  The format of each line is:

   \label{lfmt}
   \begin{tabular}{@{}lccccccccr@{}}
   FREQ, & ERR, & LGINT, & DR, & ELO, & GUP, & TAG, & QNFMT, & QN${'}$, & QN${''}$\\ 
   (F13.4, & F8.4, & F8.4, & I2, & F10.4, & I3, & I7, & I4, & 6I2, & 6I2)\\
   \end{tabular}

   \begin{tabular}{lp{4.5in}} 
   FREQ: & Frequency of the line in MHz.\\ 
   ERR: & Estimated or experimental error of FREQ in MHz.\\ 
   LGINT: &Base 10 logarithm of the integrated intensity 
   in units of \linebreak nm$^2$$\cdot$MHz at 300 K. (See Section 3 for 
   conversions to other units.)\\ 
   DR: & Degrees of freedom in the rotational partition 
   function (0 for atoms, 2 for linear molecules, and 3 for nonlinear 
   molecules).\\ 
   ELO: &Lower state energy in cm$^{-1}$ relative to the lowest energy 
   spin--rotation level in ground vibronic state.\\ 
   GUP: & Upper state degeneracy.\\ 
   TAG: & Species tag or molecular identifier. 
   A negative value flags that the line frequency has 
   been measured in the laboratory.  The absolute value of TAG is then the 
   species tag and ERR is the reported experimental error.  The three most 
   significant digits of the species tag are coded as the mass number of the 
   species, as explained above.\\ 
   QNFMT: &Identifies the format of the quantum numbers 
   given in the field QN. These quantum number formats are given in Section 5 
   and are different from those in the first two editions of the catalog.\\ 
   QN${'}$: & Quantum numbers for the upper state coded 
   according to QNFMT.\\ 
   QN${''}$: & Quantum numbers for the lower state.\\
   \end{tabular} 
* 
Parameters
[in]isInput stream
Returns
SingleLineExternal

Definition at line 1918 of file absorptionlines.cc.

References ARTS_USER_ERROR_IF, Absorption::SingleLineExternal::bad, Absorption::SingleLineExternal::bathbroadening, Absorption::SingleLine::E0, extract(), Absorption::SingleLine::F0, Absorption::SingleLine::I0, Jpl::id_from_lookup(), Absorption::SingleLineExternal::line, Absorption::SingleLine::lineshape, Absorption::SingleLineExternal::lineshapetype, my_basic_string< charT >::nelem(), Absorption::SingleLineExternal::quantumidentity, Absorption::SingleLineExternal::selfbroadening, Absorption::SingleLineExternal::species, Absorption::SingleLineExternal::T0, v, and wavenumber_to_joule().

Referenced by ReadJPL().

◆ ReadFromLBLRTMStream()

Absorption::SingleLineExternal Absorption::ReadFromLBLRTMStream ( istream &  is)

Read from LBLRTM.

LBLRTM follows the old HITRAN format from before 2004. This HITRAN format is as follows (directly from the HITRAN documentation):

 Each line consists of 100
 bytes of ASCII text data, followed by a line feed (ASCII 10) and
 carriage return (ASCII 13) character, for a total of 102 bytes per line.
 Each line can be read using the following READ and FORMAT statement pair
 (for a FORTRAN sequential access read):

       READ(3,800) MO,ISO,V,S,R,AGAM,SGAM,E,N,d,V1,V2,Q1,Q2,IERF,IERS,
      *  IERH,IREFF,IREFS,IREFH
 800   FORMAT(I2,I1,F12.6,1P2E10.3,0P2F5.4,F10.4,F4.2,F8.6,2I3,2A9,3I1,3I2)

 Each item is defined below, with its format shown in parenthesis.

   MO  (I2)  = molecule number
   ISO (I1)  = isotopologue number (1 = most abundant, 2 = second, etc)
   V (F12.6) = frequency of transition in wavenumbers (cm-1)
   S (E10.3) = intensity in cm-1/(molec * cm-2) at 296 Kelvin
   R (E10.3) = transition probability squared in Debyes**2
   AGAM (F5.4) = air-broadened halfwidth (HWHM) in cm-1/atm at 296 Kelvin
   SGAM (F5.4) = self-broadened halfwidth (HWHM) in cm-1/atm at 296 Kelvin
   E (F10.4) = lower state energy in wavenumbers (cm-1)
   N (F4.2) = coefficient of temperature dependence of air-broadened halfwidth
   d (F8.6) = shift of transition due to pressure (cm-1)
   V1 (I3) = upper state global quanta index
   V2 (I3) = lower state global quanta index
   Q1 (A9) = upper state local quanta
   Q2 (A9) = lower state local quanta
   IERF (I1) = accuracy index for frequency reference
   IERS (I1) = accuracy index for intensity reference
   IERH (I1) = accuracy index for halfwidth reference
   IREFF (I2) = lookup index for frequency
   IREFS (I2) = lookup index for intensity
   IREFH (I2) = lookup index for halfwidth

 The molecule numbers are encoded as shown in the table below:

   0= Null    1=  H2O    2=  CO2    3=   O3    4=  N2O    5=   CO
   6=  CH4    7=   O2    8=   NO    9=  SO2   10=  NO2   11=  NH3
   12= HNO3   13=   OH   14=   HF   15=  HCl   16=  HBr   17=   HI
   18=  ClO   19=  OCS   20= H2CO   21= HOCl   22=   N2   23=  HCN
   24=CH3Cl   25= H2O2   26= C2H2   27= C2H6   28=  PH3   29= COF2
   30=  SF6   31=  H2S   32=HCOOH
* 

Beyond the HITRAN pre-2004 format, there is one more tag for line mixing available in LBLRTM. This is a sign at the end of the line to indicate that the very next line gives line mixing information.

Parameters
[in]isInput stream
Returns
SingleLineExternal

Definition at line 1334 of file absorptionlines.cc.

References ARTS_USER_ERROR_IF, Conversion::atm2pa(), Absorption::SingleLineExternal::bad, Absorption::SingleLineExternal::bathbroadening, Constant::c, d, Absorption::SingleLine::E0, extract(), Absorption::SingleLine::F0, LineShape::hitran_model(), Absorption::SingleLine::I0, Hitran::id_from_lookup(), LineShape::lblrtm_model(), Absorption::SingleLineExternal::line, Absorption::SingleLine::lineshape, Absorption::SingleLineExternal::lineshapetype, my_basic_string< charT >::nelem(), Math::pow2(), Absorption::SingleLineExternal::quantumidentity, Hitran::ratio_from_lookup(), Absorption::SingleLineExternal::selfbroadening, Absorption::SingleLineExternal::species, Absorption::SingleLineExternal::T0, v, and wavenumber_to_joule().

Referenced by ReadLBLRTM().

◆ reduced_magnetic_quadrapole()

Numeric Absorption::reduced_magnetic_quadrapole ( Rational  Jf,
Rational  Ji,
Rational  N 
)

Compute the reduced magnetic quadrapole moment.

Parameters
[in]JfFinal J
[in]JiInitial J
[in]NThe quantum number (upper should be equal to lower)
Returns
As titled

Definition at line 1909 of file absorptionlines.cc.

References wigner6j().

◆ reduced_rovibrational_dipole()

Numeric Absorption::reduced_rovibrational_dipole ( Rational  Jf,
Rational  Ji,
Rational  lf,
Rational  li,
Rational  k = Rational(1) 
)

Compute the reduced rovibrational dipole moment.

Parameters
[in]JfFinal J
[in]JiInitial J
[in]lfFinal l2
[in]liInitial l2
[in]kType of transition
Returns
As titled

Definition at line 1902 of file absorptionlines.cc.

References wigner3j().

Referenced by Absorption::LineMixing::LinearRovibErrorCorrectedSudden::relaxation_matrix_offdiagonal(), and lm_hitran_2017::sorter_calcw().

◆ relaxationtype_relmat()

constexpr bool Absorption::relaxationtype_relmat ( PopulationType  in)
constexprnoexcept

Definition at line 124 of file absorptionlines.h.

Referenced by LineShape::compute(), and lbl_checkedCalc().

◆ split_list_of_external_lines()

std::vector< Absorption::Lines > Absorption::split_list_of_external_lines ( std::vector< SingleLineExternal > &  external_lines,
const std::vector< QuantumNumberType > &  localquantas = {},
const std::vector< QuantumNumberType > &  globalquantas = {} 
)

Splits a list of lines into proper Lines.

Ensures that all but SingleLine list in Lines is the same in a full Lines

Parameters
[in]linesA list of lines
[in]localquantasList of quantum numbers to be presumed local
[in]globalquantasList of quantum numbers to be presumed global
Returns
A list of properly ordered Lines

Definition at line 1714 of file absorptionlines.cc.

References Quantum::Number::GlobalState::isotopologue_index, Quantum::Number::ValueList::set(), and Quantum::Number::LocalState::val.

Referenced by ReadJPL(), and ReadLBLRTM().

Variable Documentation

◆ cutoff