ARTS 2.5.11 (git: 725533f0)
cia.cc File Reference

Implementation file for work with HITRAN collision induced absorption (CIA). More...

#include "arts_constants.h"
#include "check_input.h"
#include "cia.h"
#include <cmath>
#include <memory>
#include <numeric>
#include "matpack_concepts.h"
#include "species_tags.h"
#include "absorption.h"
#include "file.h"
#include "interp.h"

Go to the source code of this file.

Functions

void cia_interpolation (VectorView result, const ConstVectorView &f_grid, const Numeric &temperature, const GriddedField2 &cia_data, const Numeric &T_extrapolfac, const Index &robust, const Verbosity &verbosity)
 Interpolate CIA data.
 
Index cia_get_index (const ArrayOfCIARecord &cia_data, const Species::Species sp1, const Species::Species sp2)
 Get the index in cia_data for the two given species.
 
std::shared_ptr< CIARecordcia_get_data (const std::vector< std::shared_ptr< CIARecord > > &cia_data, const Species::Species sp1, const Species::Species sp2)
 Get the correct cia recrod.
 
ostream & operator<< (ostream &os, const CIARecord &)
 Output operator for CIARecord.
 

Variables

constexpr Numeric SPEED_OF_LIGHT =Constant::speed_of_light
 

Detailed Description

Implementation file for work with HITRAN collision induced absorption (CIA).

The CIA data are part of the HITRAN distribution. They are described in Richard, C., I. E. Gordon, L. S. Rothman, M. Abel, L. Frommhold, M. Gustafsson, J.-M. Hartmann, C. Hermans, W. J. Lafferty, G. S. Orton, K.M. Smith, and H. Tran (2012), New section of the HITRAN database: Collision-induced absorption (CIA), J. Quant. Spectrosc. Radiat. Transfer, 113, 1276-1285, doi:10.1016/j.jqsrt.2011.11.004.

Author
Stefan Buehler
Date
2012-11-30

Definition in file cia.cc.

Function Documentation

◆ cia_get_data()

std::shared_ptr< CIARecord > cia_get_data ( const std::vector< std::shared_ptr< CIARecord > > &  cia_data,
const Species::Species  sp1,
const Species::Species  sp2 
)

Get the correct cia recrod.

Parameters
[in]cia_dataCIA data array
[in]sp1First species index
[in]sp2Second species index
Returns
Correct CIA record or nullptr if not found.

Definition at line 232 of file cia.cc.

◆ cia_get_index()

Index cia_get_index ( const ArrayOfCIARecord cia_data,
const Species::Species  sp1,
const Species::Species  sp2 
)

Get the index in cia_data for the two given species.

Parameters
[in]cia_dataCIA data array
[in]sp1First species index
[in]sp2Second species index
Returns
Index of this species combination in cia_data. -1 if not found.

Definition at line 213 of file cia.cc.

References Array< base >::nelem().

Referenced by abs_cia_dataAddCIARecord(), abs_cia_dataReadFromCIA(), abs_cia_dataReadFromXML(), abs_xsec_per_speciesAddCIA(), and propmat_clearskyAddCIA().

◆ cia_interpolation()

void cia_interpolation ( VectorView  result,
const ConstVectorView &  f_grid,
const Numeric &  temperature,
const GriddedField2 cia_data,
const Numeric &  T_extrapolfac,
const Index &  robust,
const Verbosity verbosity 
)

Interpolate CIA data.

Interpolate CIA data to given frequency vector and given scalar temperature. Uses third order interpolation in both coordinates, if grid length allows, otherwise lower order or no interpolation.

Parameters
[out]resultCIA value for given frequency grid and temperature.
[in]f_gridFrequency grid.
[in]temperatureScalar temperature.
[in]cia_dataThe CIA dataset to interpolate.
[in]robustSet to 1 to suppress runtime errors (and return NAN values instead).
[in]verbosityStandard verbosity object.

Definition at line 41 of file cia.cc.

References ARTS_ASSERT, chk_interpolation_grids(), CREATE_OUTS, GriddedField2::data, GriddedField::get_numeric_grid(), and interpweights().

Referenced by CIARecord::Extract().

◆ operator<<()

ostream & operator<< ( ostream &  os,
const CIARecord cr 
)

Output operator for CIARecord.

Outputs the grids for the given CIARecord.

Parameters
[in,out]osOutput stream.
[in]crCIARecord.
Returns
os

Definition at line 491 of file cia.cc.

Variable Documentation

◆ SPEED_OF_LIGHT

constexpr Numeric SPEED_OF_LIGHT =Constant::speed_of_light
inlineconstexpr

Definition at line 26 of file cia.cc.

Referenced by calcSingleScatteringDataProperties(), and CIARecord::ReadFromCIA().