ARTS  2.4.0(git:4fb77825)
absorption.h File Reference

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

#include <cmath>
#include <stdexcept>
#include "abs_species_tags.h"
#include "array.h"
#include "energylevelmap.h"
#include "gridded_fields.h"
#include "jacobian.h"
#include "matpackI.h"
#include "messages.h"
#include "mystring.h"
#include "absorptionlines.h"

Go to the source code of this file.

Classes

class  IsotopologueRecord
 Contains the lookup data for one isotopologue. More...
 
class  SpeciesRecord
 Contains the lookup data for one species. More...
 
class  SpeciesAuxData
 Auxiliary data for isotopologues. More...
 
class  SpecIsoMap
 

Functions

void checkIsotopologueRatios (const ArrayOfArrayOfSpeciesTag &abs_species, const SpeciesAuxData &isoratios)
 Check that isotopologue ratios for the given species are correctly defined. More...
 
void checkPartitionFunctions (const ArrayOfArrayOfSpeciesTag &abs_species, const SpeciesAuxData &partfun)
 Check that partition functions for the given species are correctly defined. More...
 
void fillSpeciesAuxDataWithIsotopologueRatiosFromSpeciesData (SpeciesAuxData &sad)
 Fill SpeciesAuxData with default isotopologue ratios from species data. More...
 
void fillSpeciesAuxDataWithPartitionFunctionsFromSpeciesData (SpeciesAuxData &sad)
 Fill SpeciesAuxData with default partition functions from species data. More...
 
ostream & operator<< (ostream &os, const SpeciesRecord &sr)
 Output operator for SpeciesRecord. More...
 
ostream & operator<< (ostream &os, const SpeciesAuxData &sad)
 Output operator for SpeciesAuxData. More...
 
Numeric wavenumber_to_joule (Numeric e)
 A little helper function to convert energy from units of wavenumber (cm^-1) to Joule (J). More...
 
Index species_index_from_species_name (String name)
 Return species index for given species name. More...
 
String species_name_from_species_index (const Index spec_ind)
 Return species name for given species index. More...
 
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. More...
 
void xsec_species (Matrix &xsec, Matrix &source, Matrix &phase, ArrayOfMatrix &dxsec_dx, ArrayOfMatrix &dsource_dx, ArrayOfMatrix &dphase_dx, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfIndex &jacobian_propmat_positions, const Vector &f_grid, const Vector &abs_p, const Vector &abs_t, const EnergyLevelMap &abs_nlte, const Matrix &abs_vmrs, const ArrayOfArrayOfSpeciesTag &abs_species, const AbsorptionLines &band, const Numeric &isot_ratio, const SpeciesAuxData::AuxType &partfun_type, const ArrayOfGriddedField1 &partfun_data)
 Cross-section algorithm. More...
 
const SpeciesRecordSpeciesDataOfBand (const AbsorptionLines &band)
 Returns the species data. More...
 

Detailed Description

Declarations required for the calculation of absorption coefficients.

This is the file from arts-1-0, back-ported to arts-1-1.

Author
Stefan Buehler, Axel von Engeln

Definition in file absorption.h.

Function Documentation

◆ checkIsotopologueRatios()

void checkIsotopologueRatios ( const ArrayOfArrayOfSpeciesTag abs_species,
const SpeciesAuxData isoratios 
)

◆ checkPartitionFunctions()

void checkPartitionFunctions ( const ArrayOfArrayOfSpeciesTag abs_species,
const SpeciesAuxData partfun 
)

Check that partition functions for the given species are correctly defined.

Definition at line 356 of file absorption.cc.

References ARTS::Var::abs_species(), SpeciesRecord::Isotopologue(), SpeciesRecord::Name(), Array< base >::nelem(), SpeciesAuxData::nisotopologues(), SpeciesAuxData::nspecies(), and global_data::species_data.

Referenced by lbl_checkedCalc().

◆ fillSpeciesAuxDataWithIsotopologueRatiosFromSpeciesData()

void fillSpeciesAuxDataWithIsotopologueRatiosFromSpeciesData ( SpeciesAuxData sad)

◆ fillSpeciesAuxDataWithPartitionFunctionsFromSpeciesData()

void fillSpeciesAuxDataWithPartitionFunctionsFromSpeciesData ( SpeciesAuxData sad)

◆ operator<<() [1/2]

◆ operator<<() [2/2]

ostream& operator<< ( ostream &  os,
const SpeciesRecord sr 
)

Output operator for SpeciesRecord.

Incomplete version: only writes SpeciesName.

Author
Jana Mendrok

Definition at line 467 of file absorption.cc.

References SpeciesRecord::Isotopologue(), SpeciesRecord::Name(), and Absorption::nelem().

◆ set_vmr_from_first_species()

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.

Returns vmr for the profile of the first tag group containing the given species.

Author
Oliver Lemke
Parameters
[out]vmrVolume mixing ratio
[in]species_nameSpecies Name
[in]abs_speciesWS Input
[in]abs_vmrsWS Input

Definition at line 597 of file absorption.cc.

References ARTS::Var::abs_species(), ARTS::Var::abs_vmrs(), find_first_species_tg(), joker, Vector::resize(), and species_index_from_species_name().

Referenced by abs_xsec_per_speciesAddConts().

◆ species_index_from_species_name()

◆ species_name_from_species_index()

String species_name_from_species_index ( const Index  spec_ind)

Return species name for given species index.

This is useful in connection with other functions that use a species index.

Does an assertion that the index really corresponds to a species.

Parameters
[in]spec_indSpecies index.
Returns
Species name
Author
Stefan Buehler
Date
2013-01-04

Definition at line 569 of file absorption.cc.

References SpeciesRecord::Name(), and global_data::species_data.

Referenced by abs_cia_dataReadFromCIA(), abs_cia_dataReadFromXML(), get_species_name(), CIARecord::MoleculeName(), SpeciesTag::Name(), operator<<(), XsecRecord::SpeciesName(), QuantumIdentifier::SpeciesName(), and SpeciesTag::SpeciesNameMain().

◆ SpeciesDataOfBand()

const SpeciesRecord& SpeciesDataOfBand ( const AbsorptionLines band)

Returns the species data.

Parameters
bandAn absorption band
Returns
const ref to the species record

Definition at line 611 of file absorption.cc.

References Absorption::Lines::Species(), and global_data::species_data.

Referenced by abs_lines_per_speciesCreateFromLines().

◆ 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
[in]eEnergy in cm^-1.
Author
Stefan Buehler
Date
2001-06-26

Definition at line 500 of file absorption.cc.

◆ xsec_species()

void xsec_species ( Matrix xsec,
Matrix source,
Matrix phase,
ArrayOfMatrix dxsec_dx,
ArrayOfMatrix dsource_dx,
ArrayOfMatrix dphase_dx,
const ArrayOfRetrievalQuantity jacobian_quantities,
const ArrayOfIndex jacobian_propmat_positions,
const Vector f_grid,
const Vector abs_p,
const Vector abs_t,
const EnergyLevelMap abs_nlte,
const Matrix abs_vmrs,
const ArrayOfArrayOfSpeciesTag abs_species,
const AbsorptionLines band,
const Numeric isot_ratio,
const SpeciesAuxData::AuxType partfun_type,
const ArrayOfGriddedField1 partfun_data 
)

Cross-section algorithm.

Parameters
[in,out]xsecCross section of one tag group. This is now the true attenuation cross section in units of m^2.
[in,out]sourceCrosssection of one tag group. This is now the true source cross section in units of m^2.
[in,out]phaseCross section of one tag group. This is now the true phase cross section in units of m^2.
[in,out]dxsecPartial derivatives of xsec.
[in,out]dsourcePartial derivatives of source.
[in,out]dphasePartial derivatives of phase.
[in]jacobian_quantitiesAs WSV
[in]jacobian_propmat_positionsPositions in jacobian_quantities affected by propmat calculations
[in]f_gridAs WSV
[in]abs_pAs WSV
[in]abs_tAs WSV
[in]abs_nlteAs WSV
[in]abs_vmrsAs WSV
[in]abs_speciesAs WSV
[in]bandA single absorption band
[in]isot_ratioIsotopologue ratio of this species
[in]partfun_typePartition function type for this species
[in]partfun_dataPartition function model data for this species
Author
Richard Larsson
Date
2019-10-10

Definition at line 616 of file absorption.cc.

References ARTS::Var::abs_nlte(), ARTS::Var::abs_p(), ARTS::Var::abs_species(), ARTS::Var::abs_t(), ARTS::Var::abs_vmrs(), Absorption::Lines::BroadeningSpeciesVMR(), Linefunctions::dDopplerConstant_dT(), Linefunctions::InternalData::dF, Linefunctions::InternalData::dN, Linefunctions::DopplerConstant(), dsingle_partition_function_dT(), ConstMatrixView::empty(), Linefunctions::InternalData::F, ARTS::Var::f_grid(), ARTS::Var::jacobian_quantities(), joker, MapToEigen(), Linefunctions::InternalData::N, Array< base >::nelem(), ConstMatrixView::nrows(), Absorption::Lines::NumLines(), Linefunctions::set_cross_section_of_band(), single_partition_function(), Absorption::Lines::SpeciesMass(), Absorption::Lines::T0(), and temperature_perturbation().

Referenced by abs_xsec_per_speciesAddLines().