ARTS  1.0.222
Classes | Typedefs | Functions
absorption.h File Reference

Declarations required for the calculation of absorption coefficients. More...

#include <stdexcept>
#include "matpackI.h"
#include "array.h"
#include "mystring.h"
#include "make_array.h"

Go to the source code of this file.

Classes

class  LineshapeRecord
 Lineshape related information. More...
 
class  LineshapeNormRecord
 Lineshape related normalization function information. More...
 
class  LineshapeSpec
 Lineshape related specification like which lineshape to use, the normalizationfactor, and the cutoff. More...
 
class  IsotopeRecord
 Contains the lookup data for one isotope. More...
 
class  SpeciesRecord
 Contains the lookup data for one species. More...
 
class  LineRecord
 Spectral line catalog data. More...
 
class  SpecIsoMap
 
class  OneTag
 A tag group can consist of the sum of several of these. More...
 

Typedefs

typedef void(* lsf_type) (Vector &, Vector &, Numeric, Numeric, Numeric, VectorView, const Index)
 The type that is used to store pointers to lineshape functions. More...
 
typedef void(* lsnf_type) (Vector &, Numeric, VectorView, const Numeric, const Index)
 The type that is used to store pointers to lineshape normalization functions. More...
 
typedef Array< LineshapeSpecArrayOfLineshapeSpec
 Holds a list of lineshape specifications: function, normalization, cutoff. More...
 
typedef Array< LineRecordArrayOfLineRecord
 Holds a list of spectral line data. More...
 
typedef Array< Array< LineRecord > > ArrayOfArrayOfLineRecord
 Holds a lists of spectral line data for each tag group. More...
 
typedef Array< Array< OneTag > > TagGroups
 Contains the available tag groups. More...
 

Functions

ostream & operator<< (ostream &os, const LineRecord &lr)
 Output operator for LineRecord. More...
 
void define_species_map ()
 Define the species data map. More...
 
ostream & operator<< (ostream &os, const OneTag &ot)
 Output operator for OneTag. More...
 
void get_tagindex_for_Strings (ArrayOfIndex &tags1_index, const TagGroups &tags1, const ArrayOfString &tags2_Strings)
 Returns the index among some tag groups for an array of tag Strings. More...
 
void get_tag_group_index_for_tag_group (Index &tags1_index, const TagGroups &tags1, const Array< OneTag > &tags2)
 Returns the index of the tag group tg2 within the array of tag groups tgs1. More...
 
String get_tag_group_name (const Array< OneTag > &tg)
 Print the name of a tag group. More...
 
void write_lines_to_stream (ostream &os, const ArrayOfLineRecord &lines)
 A helper function that writes lines in a line list to a stream. More...
 
void xsec_species (MatrixView xsec, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView h2o_abs, ConstVectorView vmr, const ArrayOfLineRecord &lines, const Index ind_ls, const Index ind_lsn, const Numeric cutoff)
 Calculate line absorption cross sections for one tag group. More...
 
Numeric wavenumber_to_joule (Numeric e)
 A little helper function to convert energy from units of wavenumber (cm^-1) to Joule (J). More...
 
void refr_index_BoudourisDryAir (Vector &refr_index, ConstVectorView p_abs, ConstVectorView t_abs)
 Calculates the refractive index for dry air at microwave frequncies following Boudouris 1963. More...
 
void refr_index_Boudouris (Vector &refr_index, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView h2o_abs)
 Calculates the refractive index at microwave frequncies following Boudouris 1963. More...
 
void convHitranIERF (Numeric &mdf, const Index &df)
 
void convHitranIERSH (Numeric &mdh, const Index &dh)
 
void convMytranIER (Numeric &mdh, const Index &dh)
 

Detailed Description

Declarations required for the calculation of absorption coefficients.

Author
Stefan Buehler

Definition in file absorption.h.

Typedef Documentation

◆ ArrayOfArrayOfLineRecord

Holds a lists of spectral line data for each tag group.

Dimensions: (tag_groups.nelem()) (number of lines for this tag)

Author
Stefan Buehler

Definition at line 1037 of file absorption.h.

◆ ArrayOfLineRecord

Holds a list of spectral line data.

Author
Stefan Buehler

Definition at line 1032 of file absorption.h.

◆ ArrayOfLineshapeSpec

Holds a list of lineshape specifications: function, normalization, cutoff.

Author
Axel von Engeln

Definition at line 162 of file absorption.h.

◆ lsf_type

typedef void(* lsf_type) (Vector &, Vector &, Numeric, Numeric, Numeric, VectorView, const Index)

The type that is used to store pointers to lineshape functions.


Definition at line 38 of file absorption.h.

◆ lsnf_type

typedef void(* lsnf_type) (Vector &, Numeric, VectorView, const Numeric, const Index)

The type that is used to store pointers to lineshape normalization functions.


Definition at line 80 of file absorption.h.

◆ TagGroups

typedef Array< Array<OneTag> > TagGroups

Contains the available tag groups.

Contrary to the Bredbeck definition, tag groups may only consist of tags belonging to the same species. The reason for this is that there is one VMR profile associated with each tag group.

Author
Stefan Buehler

Definition at line 1126 of file absorption.h.

Function Documentation

◆ convHitranIERF()

void convHitranIERF ( Numeric mdf,
const Index df 
)

Definition at line 2901 of file absorption.cc.

◆ convHitranIERSH()

void convHitranIERSH ( Numeric mdh,
const Index dh 
)

Definition at line 2948 of file absorption.cc.

◆ convMytranIER()

void convMytranIER ( Numeric mdh,
const Index dh 
)

Definition at line 3007 of file absorption.cc.

◆ define_species_map()

void define_species_map ( )

Define the species data map.

Author
Stefan Buehler

Definition at line 64 of file absorption.cc.

◆ get_tag_group_index_for_tag_group()

void get_tag_group_index_for_tag_group ( Index tgs1_index,
const TagGroups tgs1,
const Array< OneTag > &  tg2 
)

Returns the index of the tag group tg2 within the array of tag groups tgs1.

Slightly modified copy of get_tagindex_for_Strings.

Exceptions
runtime_errorCould not find tg2 in tgs1.
Return values
tgs1_indexIndex in tgs1 for tg2
Parameters
tgs1The tags groups to search in.
tg2The tag group for which the index shall be found.
Author
Patrick Eriksson, Axel von Engeln, and Stefan Buehler
Date
2001-01-31

Definition at line 2233 of file absorption.cc.

◆ get_tag_group_name()

String get_tag_group_name ( const Array< OneTag > &  tg)

Print the name of a tag group.

A tag group consists of several elementary OneTags. This functions returns a String with the name of the entire tag group. This is nice for informational output messages, for example in the absorption routines.

Parameters
tgThe tag group in question.
Returns
The full name of the tag group, as it could occur in the controlfile.
Author
Stefan Buehler
Date
2001-03-13

Definition at line 2286 of file absorption.cc.

◆ get_tagindex_for_Strings()

void get_tagindex_for_Strings ( ArrayOfIndex tags1_index,
const TagGroups tags1,
const ArrayOfString tags2_Strings 
)

Returns the index among some tag groups for an array of tag Strings.

\begin{verbatim} For example, if tags1 correspond to the definition ["O3","H2O-161,H2O-162"] and the tag Strings are ["H2O-161,H2O-162","O3"] the tags1_index becomes [2,1] \end{verbatim}

Exceptions
runtime_errorSome String is not a valid tag item.
runtime_errorNot all Strings are not found among the tags.
Return values
tags1_indexIndex in tags1 for tags2_Strings
Parameters
tags1The tags to search in.
tags2_StringsThe tag Strings for which indeces shall be found.
Author
Patrick Eriksson
Date
2000-12-06

Definition at line 2176 of file absorption.cc.

◆ operator<<() [1/2]

ostream& operator<< ( ostream &  os,
const LineRecord lr 
)

Output operator for LineRecord.

The result should look like a catalogue line.

Author
Stefan Buehler

Definition at line 76 of file absorption.cc.

◆ operator<<() [2/2]

ostream& operator<< ( ostream &  os,
const OneTag ot 
)

Output operator for OneTag.

Author
Stefan Buehler

Definition at line 2147 of file absorption.cc.

◆ refr_index_Boudouris()

void refr_index_Boudouris ( Vector refr_index,
ConstVectorView  p_abs,
ConstVectorView  t_abs,
ConstVectorView  h2o_abs 
)

Calculates the refractive index at microwave frequncies following Boudouris 1963.

The expression is also found in Chapter 5 of the Janssen book.

Return values
refr_indexrefractive index
Parameters
p_absabsorption pressure grid
t_abstemperatures at p_abs
h2o_absH2O vmr at p_abs
Author
Patrick Eriksson
Date
2001-02-16

Definition at line 2842 of file absorption.cc.

◆ refr_index_BoudourisDryAir()

void refr_index_BoudourisDryAir ( Vector refr_index,
ConstVectorView  p_abs,
ConstVectorView  t_abs 
)

Calculates the refractive index for dry air at microwave frequncies following Boudouris 1963.

The expression is also found in Chapter 5 of the Janssen book.

The atmosphere is assumed to have no water vapour.

Return values
refr_indexrefractive index
Parameters
p_absabsorption pressure grid
t_abstemperatures at p_abs
Author
Patrick Eriksson
Date
2001-02-16

Definition at line 2810 of file absorption.cc.

◆ wavenumber_to_joule()

Numeric wavenumber_to_joule ( Numeric  e)

A little helper function to convert energy from units of wavenumber (cm^-1) to Joule (J).

This is used when reading HITRAN or JPL catalogue files, which have the lower state energy in cm^-1.

Returns
Energy in J.
Parameters
eEnergy in cm^-1.
Author
Stefan Buehler
Date
2001-06-26

Definition at line 2879 of file absorption.cc.

◆ write_lines_to_stream()

void write_lines_to_stream ( ostream &  os,
const ArrayOfLineRecord lines 
)

A helper function that writes lines in a line list to a stream.

Return values
osThe stream to write to.
Parameters
linesThe line list to write.
Date
2000-06-12
Author
Stefan Buehler

Definition at line 2309 of file absorption.cc.

◆ xsec_species()

void xsec_species ( MatrixView  xsec,
ConstVectorView  f_mono,
ConstVectorView  p_abs,
ConstVectorView  t_abs,
ConstVectorView  h2o_abs,
ConstVectorView  vmr,
const ArrayOfLineRecord lines,
const Index  ind_ls,
const Index  ind_lsn,
const Numeric  cutoff 
)

Calculate line absorption cross sections for one tag group.

All lines in the line list must belong to the same species. This must be ensured by lines_per_tgCreateFromLines, so it is only verified with assert. Also, the input vectors p_abs, and t_abs must all have the same dimension.

This is mainly a copy of abs_species which is removed now, with the difference that the vmrs are removed from the absorption coefficient calculation. (the vmr is still used for the self broadening)

Continua are not handled by this function, you have to call xsec_continuum_tag for those.

Return values
xsecCross section of one tag group.
Parameters
f_monoFrequency grid.
p_absPressure grid.
t_absTemperatures associated with p_abs.
h2o_absTotal volume mixing ratio of water vapor.
vmrVolume mixing ratio of the calculated species.
linesThe spectroscopic line list.
ind_lsLineshape specifications.
Author
Stefan Buehler and Axel von Engeln
Date
2001-01-11

Definition at line 2379 of file absorption.cc.