ARTS  2.0.49
LineRecord Class Reference

Spectral line catalog data. More...

#include <absorption.h>

Public Member Functions

 LineRecord ()
 Default constructor. More...
 
 LineRecord (Index species, Index isotope, Numeric f, Numeric psf, Numeric i0, Numeric ti0, Numeric elow, Numeric agam, Numeric sgam, Numeric nair, Numeric nself, Numeric tgam, const ArrayOfNumeric &aux, Numeric, Numeric, Numeric, Numeric, Numeric, Numeric, Numeric)
 Constructor that sets all data elements explicitly. More...
 
String VersionString () const
 Return the version String. More...
 
Index Version () const
 Return the version number. More...
 
Index Species () const
 The index of the molecular species that this line belongs to. More...
 
Index Isotope () const
 The index of the isotopic species that this line belongs to. More...
 
String Name () const
 The full name of the species and isotope. More...
 
const SpeciesRecordSpeciesData () const
 The matching SpeciesRecord from species_data. More...
 
const IsotopeRecordIsotopeData () const
 The matching IsotopeRecord from species_data. More...
 
Numeric F () const
 The line center frequency in Hz. More...
 
void setF (Numeric new_mf)
 Set the line center frequency in Hz. More...
 
Numeric Psf () const
 The pressure shift parameter in Hz/Pa. More...
 
void setPsf (Numeric new_mpsf)
 Set the pressure shift parameter in Hz/Pa. More...
 
Numeric I0 () const
 The line intensity in m^2*Hz at the reference temperature Ti0. More...
 
void setI0 (Numeric new_mi0)
 Set Intensity. More...
 
Numeric Ti0 () const
 Reference temperature for I0 in K: More...
 
Numeric Elow () const
 Lower state energy in cm^-1: More...
 
Numeric Agam () const
 Air broadened width in Hz/Pa: More...
 
void setAgam (Numeric new_agam)
 Set Air broadened width in Hz/Pa: More...
 
Numeric Sgam () const
 Self broadened width in Hz/Pa: More...
 
void setSgam (Numeric new_sgam)
 Set Self broadened width in Hz/Pa: More...
 
Numeric Nair () const
 AGAM temperature exponent (dimensionless): More...
 
void setNair (Numeric new_mnair)
 Set AGAM temperature exponent (dimensionless): More...
 
Numeric Nself () const
 SGAM temperature exponent (dimensionless): More...
 
void setNself (Numeric new_mnself)
 Set SGAM temperature exponent (dimensionless): More...
 
Numeric Tgam () const
 Reference temperature for AGAM and SGAM in K: More...
 
Index Naux () const
 Number of auxiliary parameters. More...
 
const ArrayOfNumericAux () const
 Auxiliary parameters. More...
 
Numeric dF () const
 Accuracy for line position in Hz : More...
 
Numeric dI0 () const
 Accuracy for line intensity in relative value : More...
 
Numeric dAgam () const
 Accuracy for air broadened width in relative value : More...
 
Numeric dSgam () const
 Accuracy for self broadened width in relative value : More...
 
Numeric dNair () const
 Accuracy for AGAM temperature exponent in relative value : More...
 
Numeric dNself () const
 Accuracy for SGAM temperature exponent in relative value: More...
 
Numeric dPsf () const
 Accuracy for pressure shift in relative value : More...
 
Numeric A () const
 Einstein A-coefficient in 1/s : More...
 
Numeric G_upper () const
 Upper state stat. More...
 
Numeric G_lower () const
 Lower state stat. More...
 
Numeric Gamma_self () const
 Broadening parameter self in Hz/Pa : More...
 
Numeric Gamma_N2 () const
 Broadening parameter N2 in Hz/Pa : More...
 
Numeric Gamma_O2 () const
 Broadening parameter O2 in Hz/Pa : More...
 
Numeric Gamma_H2O () const
 Broadening parameter H2O in Hz/Pa : More...
 
Numeric Gamma_CO2 () const
 Broadening parameter CO2 in Hz/Pa : More...
 
Numeric Gamma_H2 () const
 Broadening parameter H2 in Hz/Pa : More...
 
Numeric Gamma_He () const
 Broadening parameter He in Hz/Pa : More...
 
Numeric Gam_N_self () const
 GAM temp. More...
 
Numeric Gam_N_N2 () const
 GAM temp. More...
 
Numeric Gam_N_O2 () const
 GAM temp. More...
 
Numeric Gam_N_H2O () const
 GAM temp. More...
 
Numeric Gam_N_CO2 () const
 GAM temp. More...
 
Numeric Gam_N_H2 () const
 GAM temp. More...
 
Numeric Gam_N_He () const
 GAM temp. More...
 
Numeric Delta_N2 () const
 F Pressure shift N2 in Hz/Pa : More...
 
Numeric Delta_O2 () const
 F Pressure shift O2 in Hz/Pa : More...
 
Numeric Delta_H2O () const
 F Pressure shift H2O in Hz/Pa : More...
 
Numeric Delta_CO2 () const
 F Pressure shift CO2 in Hz/Pa : More...
 
Numeric Delta_H2 () const
 F Pressure shift H2 in Hz/Pa : More...
 
Numeric Delta_He () const
 F Pressure shift He in Hz/Pa : More...
 
bool ReadFromHitranStream (istream &is, const Verbosity &verbosity)
 Read one line from a stream associated with a HITRAN 1986-2001 file. More...
 
bool ReadFromHitran2004Stream (istream &is, const Verbosity &verbosity)
 Read one line from a stream associated with a HITRAN 2004 file. More...
 
bool ReadFromMytran2Stream (istream &is, const Verbosity &verbosity)
 Read one line from a stream associated with a MYTRAN2 file. More...
 
bool ReadFromJplStream (istream &is, const Verbosity &verbosity)
 Read one line from a stream associated with a JPL file. More...
 
bool ReadFromArtscat3Stream (istream &is, const Verbosity &verbosity)
 Read one line from a stream associated with an ARTSCAT-3 file. More...
 
bool ReadFromArtscat4Stream (istream &is, const Verbosity &verbosity)
 Read one line from a stream associated with an ARTSCAT-4 file. More...
 

Private Attributes

Index mversion
 
Index mspecies
 
Index misotope
 
Numeric mf
 
Numeric mpsf
 
Numeric mi0
 
Numeric mti0
 
Numeric melow
 
Numeric magam
 
Numeric msgam
 
Numeric mnair
 
Numeric mnself
 
Numeric mtgam
 
ArrayOfNumeric maux
 
Numeric mdf
 
Numeric mdi0
 
Numeric mdagam
 
Numeric mdsgam
 
Numeric mdnair
 
Numeric mdnself
 
Numeric mdpsf
 
Numeric ma
 
Numeric mgupper
 
Numeric mglower
 
Numeric mgamma_self
 
Numeric mgamma_n2
 
Numeric mgamma_o2
 
Numeric mgamma_h2o
 
Numeric mgamma_co2
 
Numeric mgamma_h2
 
Numeric mgamma_he
 
Numeric mn_self
 
Numeric mn_n2
 
Numeric mn_o2
 
Numeric mn_h2o
 
Numeric mn_co2
 
Numeric mn_h2
 
Numeric mn_he
 
Numeric mdelta_n2
 
Numeric mdelta_o2
 
Numeric mdelta_h2o
 
Numeric mdelta_co2
 
Numeric mdelta_h2
 
Numeric mdelta_he
 

Friends

void linesElowToJoule (Array< LineRecord > &abs_lines)
 Make the helper function linesElowToJoule a friend, so that it can change the lower state energy. More...
 

Detailed Description

Spectral line catalog data.

Below is a description of the ARTS catalogue format. The file starts with the usual XML header:

<?xml version="1.0"?>
<arts format="ascii" version="1">
<ArrayOfLineRecord version="ARTSCAT-3" nelem="8073">

The ARTSCAT version number is there to keep track of catalogue format changes. The "nelem" tag contains the total number of lines in the file.

The file ends with the usual XML closing tags:

</ArrayOfLineRecord>
</arts>

In-between the header and the footer are the actual spectroscopic data. Each new entry, corresponding to one spectral line, starts with the ‘&rsquo; character.

The line catalogue should not have any fixed column widths because the precision of the parameters should not be limited by the format. The catalogue can then be stored as binary or ASCII. In the ASCII version the columns are separated by one or more blanks. The line format is then specified by only the order and the units of the columns. As the catalogue entry for each transition can be quite long, it can be broken across lines in the ASCII file. That is why each new transition is marked with a ‘&rsquo; character.

The first column will contain the species and isotope, following the naming scheme described below. Scientific notation is allowed, e.g. 501.12345e9.

Note that starting with ARTSCAT-2, the intensity is per molecule, i.e., it does not contain the isotope ratio. This is similar to JPL, but different to HITRAN.

The line format is:

Col  Variable                Label    Unit     Comment
------------------------------------------------------------------      
 0   `@'                         ENTRY        -    marks start of entry
 1   name                         NAME        -    e.g. O3-666
 2   center frequency                F       Hz    e.g. 501.12345e9 
 3   pressure shift of F           PSF    Hz/Pa    
 4   line intensity                 I0    Hz*m^2   per isotope, not per species
 5   reference temp. for I0       T_I0        K
 6   lower state energy           ELOW        J    
 7   air broadened width          AGAM    Hz/Pa    values around 20000 Hz/Pa
 8   self broadened width         SGAM    Hz/Pa
 9   AGAM temp. exponent          NAIR        -    values around .5
10   SGAM temp. exponent         NSELF        - 
11   ref. temp. for AGAM, SGAM   T_GAM        K
12   number of aux. parameters   N_AUX        -
13   auxiliary parameter          AUX1        -
14   ... 
15   error for F                    DF       Hz
16   error for I0                  DI0        %
17   error for AGAM              DAGAM        %
18   error for SGAM              DSGAM        %
19   error for NAIR              DNAIR        %
20   error for NSELF            DNSELF        %
21   error for PSF                DPSF        %

The parameters 0-12 must be present, the others can be missing, since they are not needed for the calculation.

For the error fields (15-21), a -1 means that no value exist.

A valid ARTS line file would be:

<?xml version="1.0"?>
<arts format="ascii" version="1">
<ArrayOfLineRecord version="ARTSCAT-3" nelem="2">
@ O3-676 80015326542.0992 0 3.70209114155527e-19 296 7.73661776567701e-21 21480.3182341969
28906.7092490501 0.76 0.76 296 0 300000 0.1 0.1 0.1 0.2 -1 -1.24976056865038e-11
@ O3-676 80015476438.3282 0 3.83245786810611e-19 296 7.73661577919822e-21 21480.3182341969
28906.7092490501 0.76 0.76 296 0 300000 0.1 0.1 0.1 0.2 -1 -1.24975822742335e-11
</ArrayOfLineRecord>
</arts>

Some species need special parameters that are not needed by other species (for example overlap coefficients for O2). In the case of oxygen two parameters are sufficient to describe the overlap, but other species, e.g., methane, may need more coefficients. The default for N_AUX is zero. In that case, no further AUX fields are present. [FIXME: Check Oxygen.]

The names of the private members and public access functions of this data structure follow the above table. The only difference is that underscores are omited and only the first letter of each name is capitalized. This is for consistency with the notation elsewhere in the program.

Author
Stefan Buehler

Definition at line 481 of file absorption.h.

Constructor & Destructor Documentation

◆ LineRecord() [1/2]

LineRecord::LineRecord ( )
inline

Default constructor.

Initialize to default values. The indices are initialized to large numbers, so that we at least get range errors when we try to used un-initialized data.

Definition at line 492 of file absorption.h.

◆ LineRecord() [2/2]

LineRecord::LineRecord ( Index  species,
Index  isotope,
Numeric  f,
Numeric  psf,
Numeric  i0,
Numeric  ti0,
Numeric  elow,
Numeric  agam,
Numeric  sgam,
Numeric  nair,
Numeric  nself,
Numeric  tgam,
const ArrayOfNumeric aux,
Numeric  ,
Numeric  ,
Numeric  ,
Numeric  ,
Numeric  ,
Numeric  ,
Numeric   
)
inline

Constructor that sets all data elements explicitly.

If assertions are not disabled (i.e., if NDEBUG is not #defined), assert statements check that the species and isotope data exists.

Definition at line 520 of file absorption.h.

Member Function Documentation

◆ A()

Numeric LineRecord::A ( ) const
inline

Einstein A-coefficient in 1/s :

Definition at line 693 of file absorption.h.

References ma.

Referenced by operator<<().

◆ Agam()

Numeric LineRecord::Agam ( ) const
inline

Air broadened width in Hz/Pa:

Definition at line 634 of file absorption.h.

References magam.

Referenced by operator<<(), and xsec_species().

◆ Aux()

const ArrayOfNumeric& LineRecord::Aux ( ) const
inline

Auxiliary parameters.

Definition at line 668 of file absorption.h.

References maux.

Referenced by operator<<(), and xsec_species().

◆ dAgam()

Numeric LineRecord::dAgam ( ) const
inline

Accuracy for air broadened width in relative value :

Definition at line 678 of file absorption.h.

References mdagam.

Referenced by operator<<().

◆ Delta_CO2()

Numeric LineRecord::Delta_CO2 ( ) const
inline

F Pressure shift CO2 in Hz/Pa :

Definition at line 753 of file absorption.h.

References mdelta_co2.

Referenced by operator<<().

◆ Delta_H2()

Numeric LineRecord::Delta_H2 ( ) const
inline

F Pressure shift H2 in Hz/Pa :

Definition at line 756 of file absorption.h.

References mdelta_h2.

Referenced by operator<<().

◆ Delta_H2O()

Numeric LineRecord::Delta_H2O ( ) const
inline

F Pressure shift H2O in Hz/Pa :

Definition at line 750 of file absorption.h.

References mdelta_h2o.

Referenced by operator<<().

◆ Delta_He()

Numeric LineRecord::Delta_He ( ) const
inline

F Pressure shift He in Hz/Pa :

Definition at line 759 of file absorption.h.

References mdelta_he.

Referenced by operator<<().

◆ Delta_N2()

Numeric LineRecord::Delta_N2 ( ) const
inline

F Pressure shift N2 in Hz/Pa :

Definition at line 744 of file absorption.h.

References mdelta_n2.

Referenced by operator<<().

◆ Delta_O2()

Numeric LineRecord::Delta_O2 ( ) const
inline

F Pressure shift O2 in Hz/Pa :

Definition at line 747 of file absorption.h.

References mdelta_o2.

Referenced by operator<<().

◆ dF()

Numeric LineRecord::dF ( ) const
inline

Accuracy for line position in Hz :

Definition at line 672 of file absorption.h.

References mdf.

Referenced by operator<<().

◆ dI0()

Numeric LineRecord::dI0 ( ) const
inline

Accuracy for line intensity in relative value :

Definition at line 675 of file absorption.h.

References mdi0.

Referenced by operator<<().

◆ dNair()

Numeric LineRecord::dNair ( ) const
inline

Accuracy for AGAM temperature exponent in relative value :

Definition at line 684 of file absorption.h.

References mdnair.

Referenced by operator<<().

◆ dNself()

Numeric LineRecord::dNself ( ) const
inline

Accuracy for SGAM temperature exponent in relative value:

Definition at line 687 of file absorption.h.

References mdnself.

Referenced by operator<<().

◆ dPsf()

Numeric LineRecord::dPsf ( ) const
inline

Accuracy for pressure shift in relative value :

Definition at line 690 of file absorption.h.

References mdpsf.

Referenced by operator<<().

◆ dSgam()

Numeric LineRecord::dSgam ( ) const
inline

Accuracy for self broadened width in relative value :

Definition at line 681 of file absorption.h.

References mdsgam.

Referenced by operator<<().

◆ Elow()

Numeric LineRecord::Elow ( ) const
inline

Lower state energy in cm^-1:

Definition at line 631 of file absorption.h.

References melow.

Referenced by operator<<(), and xsec_species().

◆ F()

◆ G_lower()

Numeric LineRecord::G_lower ( ) const
inline

Lower state stat.

weight:

Definition at line 699 of file absorption.h.

References mglower.

Referenced by operator<<().

◆ G_upper()

Numeric LineRecord::G_upper ( ) const
inline

Upper state stat.

weight:

Definition at line 696 of file absorption.h.

References mgupper.

Referenced by operator<<().

◆ Gam_N_CO2()

Numeric LineRecord::Gam_N_CO2 ( ) const
inline

GAM temp.

exponent N CO2:

Definition at line 735 of file absorption.h.

References mn_co2.

Referenced by operator<<().

◆ Gam_N_H2()

Numeric LineRecord::Gam_N_H2 ( ) const
inline

GAM temp.

exponent N H2:

Definition at line 738 of file absorption.h.

References mn_h2.

Referenced by operator<<().

◆ Gam_N_H2O()

Numeric LineRecord::Gam_N_H2O ( ) const
inline

GAM temp.

exponent N H2O:

Definition at line 732 of file absorption.h.

References mn_h2o.

Referenced by operator<<().

◆ Gam_N_He()

Numeric LineRecord::Gam_N_He ( ) const
inline

GAM temp.

exponent N He:

Definition at line 741 of file absorption.h.

References mn_he.

Referenced by operator<<().

◆ Gam_N_N2()

Numeric LineRecord::Gam_N_N2 ( ) const
inline

GAM temp.

exponent N N2:

Definition at line 726 of file absorption.h.

References mn_n2.

Referenced by operator<<().

◆ Gam_N_O2()

Numeric LineRecord::Gam_N_O2 ( ) const
inline

GAM temp.

exponent N O2:

Definition at line 729 of file absorption.h.

References mn_o2.

Referenced by operator<<().

◆ Gam_N_self()

Numeric LineRecord::Gam_N_self ( ) const
inline

GAM temp.

exponent N self:

Definition at line 723 of file absorption.h.

References mn_self.

Referenced by operator<<().

◆ Gamma_CO2()

Numeric LineRecord::Gamma_CO2 ( ) const
inline

Broadening parameter CO2 in Hz/Pa :

Definition at line 714 of file absorption.h.

References mgamma_co2.

Referenced by operator<<().

◆ Gamma_H2()

Numeric LineRecord::Gamma_H2 ( ) const
inline

Broadening parameter H2 in Hz/Pa :

Definition at line 717 of file absorption.h.

References mgamma_h2.

Referenced by operator<<().

◆ Gamma_H2O()

Numeric LineRecord::Gamma_H2O ( ) const
inline

Broadening parameter H2O in Hz/Pa :

Definition at line 711 of file absorption.h.

References mgamma_h2o.

Referenced by operator<<().

◆ Gamma_He()

Numeric LineRecord::Gamma_He ( ) const
inline

Broadening parameter He in Hz/Pa :

Definition at line 720 of file absorption.h.

References mgamma_he.

Referenced by operator<<().

◆ Gamma_N2()

Numeric LineRecord::Gamma_N2 ( ) const
inline

Broadening parameter N2 in Hz/Pa :

Definition at line 705 of file absorption.h.

References mgamma_n2.

Referenced by operator<<().

◆ Gamma_O2()

Numeric LineRecord::Gamma_O2 ( ) const
inline

Broadening parameter O2 in Hz/Pa :

Definition at line 708 of file absorption.h.

References mgamma_o2.

Referenced by operator<<().

◆ Gamma_self()

Numeric LineRecord::Gamma_self ( ) const
inline

Broadening parameter self in Hz/Pa :

Definition at line 702 of file absorption.h.

References mgamma_self.

Referenced by operator<<().

◆ I0()

Numeric LineRecord::I0 ( ) const
inline

The line intensity in m^2*Hz at the reference temperature Ti0.

The line intensity $I_0$ is defined by:

\[ \alpha(\nu) = n \, x \, I_0(T) \, F(\nu) \]

where $\alpha$ is the absorption coefficient (in m^-1), $\nu$ is frequency, $n$ is the total number density, $x$ is the volume mixing ratio, and $F(\nu)$ is the lineshape function.

Definition at line 622 of file absorption.h.

References mi0.

Referenced by operator<<(), and xsec_species().

◆ Isotope()

Index LineRecord::Isotope ( ) const
inline

The index of the isotopic species that this line belongs to.

The isotopic species data can be accessed by species_data[Species()].Isotope()[Isotope()].

Definition at line 590 of file absorption.h.

References misotope.

Referenced by abs_lines_per_speciesCreateFromLines().

◆ IsotopeData()

const IsotopeRecord & LineRecord::IsotopeData ( ) const

The matching IsotopeRecord from species_data.

The IsotopeRecord is a subset of the SpeciesRecord. To get at the isotope data of a LineRecord lr, you can use:

  • species_data[lr.Species()].Isotope()[lr.Isotope()]
  • lr.SpeciesData().Isotope()[lr.Isotope()]
  • lr.IsotopeData()

The last option is clearly the shortest, and has the advantage that you don't have to declare the external variable species_data.

Definition at line 242 of file absorption.cc.

References misotope, mspecies, and species_data.

Referenced by xsec_species().

◆ Nair()

Numeric LineRecord::Nair ( ) const
inline

AGAM temperature exponent (dimensionless):

Definition at line 646 of file absorption.h.

References mnair.

Referenced by operator<<(), and xsec_species().

◆ Name()

String LineRecord::Name ( ) const

The full name of the species and isotope.

E.g., ‘O3-666’. The name is found by looking up the information in species_data, using the species and isotope index.

Definition at line 207 of file absorption.cc.

References SpeciesRecord::Isotope(), misotope, mspecies, SpeciesRecord::Name(), and species_data.

Referenced by operator<<().

◆ Naux()

Index LineRecord::Naux ( ) const
inline

Number of auxiliary parameters.

This function is actually redundant, since the number of auxiliary parameters can also be obtained directly with Aux.nelem(). I just added the function in order to have consistency of the interface with the catalgue format.

Definition at line 665 of file absorption.h.

References maux, and Array< base >::nelem().

Referenced by operator<<(), and xsec_species().

◆ Nself()

Numeric LineRecord::Nself ( ) const
inline

SGAM temperature exponent (dimensionless):

Definition at line 652 of file absorption.h.

References mnself.

Referenced by operator<<(), and xsec_species().

◆ Psf()

Numeric LineRecord::Psf ( ) const
inline

The pressure shift parameter in Hz/Pa.

Definition at line 605 of file absorption.h.

References mpsf.

Referenced by operator<<(), and xsec_species().

◆ ReadFromArtscat3Stream()

bool LineRecord::ReadFromArtscat3Stream ( istream &  is,
const Verbosity verbosity 
)

Read one line from a stream associated with an ARTSCAT-3 file.

Format: see Documentation of class LineRecord

The function attempts to read a line of data from the catalogue. It returns false if it succeeds. Otherwise, if eof is reached, it returns true. If an error occurs, a runtime_error is thrown. When the function looks for a data line, comment lines are automatically skipped.

Parameters
isStream from which to read
Exceptions
runtime_errorSome error occured during the read
Returns
false=ok (data returned), true=eof (no data returned)
Date
2000-12-15
Author
Oliver Lemke
Date
2001-06-20
Author
Stefan Buehler

Definition at line 1825 of file absorption.cc.

References CREATE_OUT3, extract(), SpeciesRecord::Isotope(), magam, maux, mdagam, mdf, mdi0, mdnair, mdnself, mdpsf, mdsgam, melow, mf, mi0, misotope, mnair, mnself, mpsf, msgam, mspecies, mtgam, mti0, mversion, SpeciesRecord::Name(), my_basic_string< charT >::nelem(), species_data, and SpecIsoMap::Speciesindex().

Referenced by abs_linesReadFromArtsObsolete(), and xml_read_from_stream().

◆ ReadFromArtscat4Stream()

bool LineRecord::ReadFromArtscat4Stream ( istream &  is,
const Verbosity verbosity 
)

Read one line from a stream associated with an ARTSCAT-4 file.

Format: see Documentation of class LineRecord

The function attempts to read a line of data from the catalogue. It returns false if it succeeds. Otherwise, if eof is reached, it returns true. If an error occurs, a runtime_error is thrown. When the function looks for a data line, comment lines are automatically skipped.

Parameters
isStream from which to read
Exceptions
runtime_errorSome error occured during the read
Returns
false=ok (data returned), true=eof (no data returned)
Date
2012-02-10
Author
Oliver Lemke

Definition at line 2020 of file absorption.cc.

References CREATE_OUT3, extract(), SpeciesRecord::Isotope(), ma, maux, mdagam, mdelta_co2, mdelta_h2, mdelta_h2o, mdelta_he, mdelta_n2, mdelta_o2, mdf, mdi0, mdnair, mdnself, mdpsf, mdsgam, melow, mf, mgamma_co2, mgamma_h2, mgamma_h2o, mgamma_he, mgamma_n2, mgamma_o2, mgamma_self, mglower, mgupper, mi0, misotope, mn_co2, mn_h2, mn_h2o, mn_he, mn_n2, mn_o2, mn_self, mspecies, mti0, mversion, SpeciesRecord::Name(), my_basic_string< charT >::nelem(), species_data, and SpecIsoMap::Speciesindex().

Referenced by xml_read_from_stream().

◆ ReadFromHitran2004Stream()

bool LineRecord::ReadFromHitran2004Stream ( istream &  is,
const Verbosity verbosity 
)

Read one line from a stream associated with a HITRAN 2004 file.

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

CH3OH is not included in ARTS because its total internal partition sum is not known yet.

The function attempts to read a line of data from the catalogue. It returns false if it succeeds. Otherwise, if eof is reached, it returns true. If an error occurs, a runtime_error is thrown. When the function looks for a data line, comment lines are automatically skipped. It is checked if the data record has the right number of characters (comment lines are ignored). If not, a runtime_error is thrown. If the molecule is unknown to ARTS, a warning is prompted but the program continues (ignoring this record). For CH3OH this warning will be issued even when using the regular Hitran 2004 data base (see above).

Parameters
isStream from which to read
Exceptions
runtime_errorSome error occured during the read
Returns
false=ok (data returned), true=eof (no data returned)
Author
Stefan Buehler, Hermann Berg

Definition at line 708 of file absorption.cc.

References ATM2PA, convHitranIERF(), convHitranIERSH(), CREATE_OUT1, CREATE_OUT3, extract(), iso(), SpeciesRecord::Isotope(), magam, max, mdagam, mdf, mdi0, mdnair, mdnself, mdpsf, mdsgam, melow, mf, mi0, misotope, mnair, mnself, mpsf, msgam, mspecies, mtgam, mti0, Array< base >::nelem(), my_basic_string< charT >::nelem(), species_data, SPEED_OF_LIGHT, and wavenumber_to_joule().

Referenced by abs_linesReadFromHitran2004().

◆ ReadFromHitranStream()

bool LineRecord::ReadFromHitranStream ( istream &  is,
const Verbosity verbosity 
)

Read one line from a stream associated with a HITRAN 1986-2001 file.

The 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)  = isotope 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

The function attempts to read a line of data from the catalogue. It returns false if it succeeds. Otherwise, if eof is reached, it returns true. If an error occurs, a runtime_error is thrown. When the function looks for a data line, comment lines are automatically skipped. It is checked if the data record has the right number of characters. If not, a runtime_error is thrown.

Parameters
isStream from which to read
Exceptions
runtime_errorSome error occured during the read
Returns
false=ok (data returned), true=eof (no data returned)
Author
Stefan Buehler

Definition at line 255 of file absorption.cc.

References arts_exit(), ATM2PA, convHitranIERF(), convHitranIERSH(), CREATE_OUT0, CREATE_OUT3, extract(), iso(), SpeciesRecord::Isotope(), magam, max, mdagam, mdf, mdi0, mdpsf, melow, mf, mi0, misotope, mnair, mnself, mpsf, msgam, mspecies, mtgam, mti0, Array< base >::nelem(), my_basic_string< charT >::nelem(), species_data, SPEED_OF_LIGHT, and wavenumber_to_joule().

Referenced by abs_linesReadFromHitran().

◆ ReadFromJplStream()

bool LineRecord::ReadFromJplStream ( istream &  is,
const Verbosity verbosity 
)

Read one line from a stream associated with a JPL file.

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} 

The function attempts to read a line of data from the catalogue. It returns false if it succeeds. Otherwise, if eof is reached, it returns true. If an error occurs, a runtime_error is thrown. When the function looks for a data line, comment lines are automatically skipped (unused in jpl).

Parameters
isStream from which to read
Exceptions
runtime_errorSome error occured during the read
Returns
false=ok (data returned), true=eof (no data returned)
Date
01.11.00
Author
Axel von Engeln

Definition at line 1579 of file absorption.cc.

References CREATE_OUT3, extract(), SpeciesRecord::Isotope(), magam, mdf, melow, mf, mi0, misotope, mnair, mnself, mpsf, msgam, mspecies, mtgam, mti0, my_basic_string< charT >::nelem(), species_data, SpecIsoMap::Speciesindex(), and wavenumber_to_joule().

Referenced by abs_linesReadFromJpl().

◆ ReadFromMytran2Stream()

bool LineRecord::ReadFromMytran2Stream ( istream &  is,
const Verbosity verbosity 
)

Read one line from a stream associated with a MYTRAN2 file.

The MYTRAN2 format is as follows (directly taken from the abs_my.c documentation):

The MYTRAN format is as follows (FORTRAN notation):
FORMAT(I2,I1,F13.4,1PE10.3,0P2F5.2,F10.4,2F4.2,F8.6,F6.4,2I3,2A9,4I1,3I2)

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

   MO  (I2)      = molecule number
   ISO (I1)      = isotope number (1 = most abundant, 2 = second, etc)
*  F (F13.4)     = frequency of transition in MHz
*  errf (F8.4)   = error in f in MHz
   S (E10.3)     = intensity in cm-1/(molec * cm-2) at 296 K
*  AGAM (F5.4)   = air-broadened halfwidth (HWHM) in MHz/Torr at Tref
*  SGAM (F5.4)   = self-broadened halfwidth (HWHM) in MHz/Torr at Tref
   E (F10.4)     = lower state energy in wavenumbers (cm-1)
   N (F4.2)      = coefficient of temperature dependence of 
                   air-broadened halfwidth
*  N_self (F4.2) = coefficient of temperature dependence of 
                   self-broadened halfwidth
*  Tref (F7.2)   = reference temperature for AGAM and SGAM 
*  d (F9.7)      = shift of transition due to pressure (MHz/Torr)
   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
   IERS (I1)     = accuracy index for S
   IERH (I1)     = accuracy index for AGAM
*  IERN (I1)     = accuracy index for N


The asterisks mark entries that are different from HITRAN.

Note that AGAM and SGAM are for the temperature Tref, while S is
still for 296 K!

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= Null   38= Null   39= Null   40=H2O_L   41= Null
42= Null   43= OCLO   44= Null   45= Null   46=BRO     47= Null
48= H2SO4  49=CL2O2

All molecule numbers are from HITRAN, except for species with id's
greater or equals 40, which are not included in HITRAN.
(E.g.: For BrO, iso=1 is Br-79-O,iso=2 is  Br-81-O.)

The function attempts to read a line of data from the catalogue. It returns false if it succeeds. Otherwise, if eof is reached, it returns true. If an error occurs, a runtime_error is thrown. When the function looks for a data line, comment lines are automatically skipped.

Parameters
isStream from which to read
Exceptions
runtime_errorSome error occured during the read
Returns
false=ok (data returned), true=eof (no data returned)
Date
31.10.00
Author
Axel von Engeln

Definition at line 1177 of file absorption.cc.

References arts_exit(), convMytranIER(), CREATE_OUT0, CREATE_OUT3, extract(), iso(), SpeciesRecord::Isotope(), magam, max, mdagam, mdf, mdi0, mdnair, melow, mf, mi0, misotope, mnair, mnself, mpsf, msgam, mspecies, mtgam, mti0, Array< base >::nelem(), my_basic_string< charT >::nelem(), species_data, SPEED_OF_LIGHT, TORR2PA, and wavenumber_to_joule().

Referenced by abs_linesReadFromMytran2().

◆ setAgam()

void LineRecord::setAgam ( Numeric  new_agam)
inline

Set Air broadened width in Hz/Pa:

Definition at line 637 of file absorption.h.

References magam.

◆ setF()

void LineRecord::setF ( Numeric  new_mf)
inline

Set the line center frequency in Hz.

Definition at line 602 of file absorption.h.

References mf.

Referenced by abs_lines_per_speciesAddMirrorLines().

◆ setI0()

void LineRecord::setI0 ( Numeric  new_mi0)
inline

Set Intensity.

Definition at line 625 of file absorption.h.

References mi0.

◆ setNair()

void LineRecord::setNair ( Numeric  new_mnair)
inline

Set AGAM temperature exponent (dimensionless):

Definition at line 649 of file absorption.h.

References mnair.

◆ setNself()

void LineRecord::setNself ( Numeric  new_mnself)
inline

Set SGAM temperature exponent (dimensionless):

Definition at line 655 of file absorption.h.

References mnself.

◆ setPsf()

void LineRecord::setPsf ( Numeric  new_mpsf)
inline

Set the pressure shift parameter in Hz/Pa.

Definition at line 608 of file absorption.h.

References mpsf.

◆ setSgam()

void LineRecord::setSgam ( Numeric  new_sgam)
inline

Set Self broadened width in Hz/Pa:

Definition at line 643 of file absorption.h.

References msgam.

◆ Sgam()

Numeric LineRecord::Sgam ( ) const
inline

Self broadened width in Hz/Pa:

Definition at line 640 of file absorption.h.

References msgam.

Referenced by operator<<(), and xsec_species().

◆ Species()

Index LineRecord::Species ( ) const
inline

The index of the molecular species that this line belongs to.

The species data can be accessed by species_data[Species()].

Definition at line 585 of file absorption.h.

References mspecies.

Referenced by abs_lines_per_speciesCreateFromLines().

◆ SpeciesData()

const SpeciesRecord & LineRecord::SpeciesData ( ) const

The matching SpeciesRecord from species_data.

To get at the species data of a LineRecord lr, you can use:

  • species_data[lr.Species()]
  • lr.SpeciesData()

The only advantages of the latter are that the notation is slightly nicer and that you don't have to declare the external variable species_data.

Definition at line 224 of file absorption.cc.

References mspecies, and species_data.

Referenced by abs_lines_per_speciesCreateFromLines().

◆ Tgam()

Numeric LineRecord::Tgam ( ) const
inline

Reference temperature for AGAM and SGAM in K:

Definition at line 658 of file absorption.h.

References mtgam.

Referenced by operator<<(), and xsec_species().

◆ Ti0()

Numeric LineRecord::Ti0 ( ) const
inline

Reference temperature for I0 in K:

Definition at line 628 of file absorption.h.

References mti0.

Referenced by operator<<(), and xsec_species().

◆ Version()

Index LineRecord::Version ( ) const
inline

Return the version number.

Definition at line 581 of file absorption.h.

References mversion.

Referenced by abs_linesReadFromArtsObsolete(), operator<<(), and xml_write_to_stream().

◆ VersionString()

String LineRecord::VersionString ( ) const
inline

Return the version String.

Definition at line 573 of file absorption.h.

References mversion.

Referenced by abs_linesReadFromArtsObsolete().

Friends And Related Function Documentation

◆ linesElowToJoule

void linesElowToJoule ( Array< LineRecord > &  abs_lines)
friend

Make the helper function linesElowToJoule a friend, so that it can change the lower state energy.

FIXME: Remove this when we don't need the helper function anymore.

Definition at line 420 of file m_abs.cc.

Member Data Documentation

◆ ma

Numeric LineRecord::ma
private

Definition at line 1116 of file absorption.h.

Referenced by A(), and ReadFromArtscat4Stream().

◆ magam

◆ maux

ArrayOfNumeric LineRecord::maux
private

Definition at line 1094 of file absorption.h.

Referenced by Aux(), Naux(), ReadFromArtscat3Stream(), and ReadFromArtscat4Stream().

◆ mdagam

◆ mdelta_co2

Numeric LineRecord::mdelta_co2
private

Definition at line 1159 of file absorption.h.

Referenced by Delta_CO2(), and ReadFromArtscat4Stream().

◆ mdelta_h2

Numeric LineRecord::mdelta_h2
private

Definition at line 1161 of file absorption.h.

Referenced by Delta_H2(), and ReadFromArtscat4Stream().

◆ mdelta_h2o

Numeric LineRecord::mdelta_h2o
private

Definition at line 1157 of file absorption.h.

Referenced by Delta_H2O(), and ReadFromArtscat4Stream().

◆ mdelta_he

Numeric LineRecord::mdelta_he
private

Definition at line 1163 of file absorption.h.

Referenced by Delta_He(), and ReadFromArtscat4Stream().

◆ mdelta_n2

Numeric LineRecord::mdelta_n2
private

Definition at line 1153 of file absorption.h.

Referenced by Delta_N2(), and ReadFromArtscat4Stream().

◆ mdelta_o2

Numeric LineRecord::mdelta_o2
private

Definition at line 1155 of file absorption.h.

Referenced by Delta_O2(), and ReadFromArtscat4Stream().

◆ mdf

◆ mdi0

◆ mdnair

Numeric LineRecord::mdnair
private

◆ mdnself

Numeric LineRecord::mdnself
private

◆ mdpsf

Numeric LineRecord::mdpsf
private

◆ mdsgam

Numeric LineRecord::mdsgam
private

◆ melow

◆ mf

◆ mgamma_co2

Numeric LineRecord::mgamma_co2
private

Definition at line 1131 of file absorption.h.

Referenced by Gamma_CO2(), and ReadFromArtscat4Stream().

◆ mgamma_h2

Numeric LineRecord::mgamma_h2
private

Definition at line 1133 of file absorption.h.

Referenced by Gamma_H2(), and ReadFromArtscat4Stream().

◆ mgamma_h2o

Numeric LineRecord::mgamma_h2o
private

Definition at line 1129 of file absorption.h.

Referenced by Gamma_H2O(), and ReadFromArtscat4Stream().

◆ mgamma_he

Numeric LineRecord::mgamma_he
private

Definition at line 1135 of file absorption.h.

Referenced by Gamma_He(), and ReadFromArtscat4Stream().

◆ mgamma_n2

Numeric LineRecord::mgamma_n2
private

Definition at line 1125 of file absorption.h.

Referenced by Gamma_N2(), and ReadFromArtscat4Stream().

◆ mgamma_o2

Numeric LineRecord::mgamma_o2
private

Definition at line 1127 of file absorption.h.

Referenced by Gamma_O2(), and ReadFromArtscat4Stream().

◆ mgamma_self

Numeric LineRecord::mgamma_self
private

Definition at line 1123 of file absorption.h.

Referenced by Gamma_self(), and ReadFromArtscat4Stream().

◆ mglower

Numeric LineRecord::mglower
private

Definition at line 1120 of file absorption.h.

Referenced by G_lower(), and ReadFromArtscat4Stream().

◆ mgupper

Numeric LineRecord::mgupper
private

Definition at line 1118 of file absorption.h.

Referenced by G_upper(), and ReadFromArtscat4Stream().

◆ mi0

◆ misotope

◆ mn_co2

Numeric LineRecord::mn_co2
private

Definition at line 1146 of file absorption.h.

Referenced by Gam_N_CO2(), and ReadFromArtscat4Stream().

◆ mn_h2

Numeric LineRecord::mn_h2
private

Definition at line 1148 of file absorption.h.

Referenced by Gam_N_H2(), and ReadFromArtscat4Stream().

◆ mn_h2o

Numeric LineRecord::mn_h2o
private

Definition at line 1144 of file absorption.h.

Referenced by Gam_N_H2O(), and ReadFromArtscat4Stream().

◆ mn_he

Numeric LineRecord::mn_he
private

Definition at line 1150 of file absorption.h.

Referenced by Gam_N_He(), and ReadFromArtscat4Stream().

◆ mn_n2

Numeric LineRecord::mn_n2
private

Definition at line 1140 of file absorption.h.

Referenced by Gam_N_N2(), and ReadFromArtscat4Stream().

◆ mn_o2

Numeric LineRecord::mn_o2
private

Definition at line 1142 of file absorption.h.

Referenced by Gam_N_O2(), and ReadFromArtscat4Stream().

◆ mn_self

Numeric LineRecord::mn_self
private

Definition at line 1138 of file absorption.h.

Referenced by Gam_N_self(), and ReadFromArtscat4Stream().

◆ mnair

◆ mnself

◆ mpsf

◆ msgam

◆ mspecies

◆ mtgam

◆ mti0

◆ mversion

Index LineRecord::mversion
private

The documentation for this class was generated from the following files: