ARTS  2.3.1285(git:92a29ea9-dirty)
m_cia.cc File Reference

Workspace methods for HITRAN CIA data. More...

#include "absorption.h"
#include "arts.h"
#include "auto_md.h"
#include "cia.h"
#include "file.h"
#include "messages.h"
#include "physics_funcs.h"
#include "xml_io.h"

Go to the source code of this file.

Functions

void abs_xsec_per_speciesAddCIA (ArrayOfMatrix &abs_xsec_per_species, ArrayOfArrayOfMatrix &dabs_xsec_per_species_dx, const ArrayOfArrayOfSpeciesTag &abs_species, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfIndex &abs_species_active, const Vector &f_grid, const Vector &abs_p, const Vector &abs_t, const Matrix &abs_vmrs, const ArrayOfCIARecord &abs_cia_data, const Numeric &T_extrapolfac, const Index &robust, const Verbosity &verbosity)
 WORKSPACE METHOD: abs_xsec_per_speciesAddCIA. More...
 
void CIARecordReadFromFile (CIARecord &cia_record, const String &species_tag, const String &filename, const Verbosity &verbosity)
 WORKSPACE METHOD: CIARecordReadFromFile. More...
 
void abs_cia_dataAddCIARecord (ArrayOfCIARecord &abs_cia_data, const CIARecord &cia_record, const Index &clobber, const Verbosity &)
 WORKSPACE METHOD: abs_cia_dataAddCIARecord. More...
 
void abs_cia_dataReadFromCIA (ArrayOfCIARecord &abs_cia_data, const ArrayOfArrayOfSpeciesTag &abs_species, const String &catalogpath, const Verbosity &verbosity)
 WORKSPACE METHOD: abs_cia_dataReadFromCIA. More...
 
void abs_cia_dataReadFromXML (ArrayOfCIARecord &abs_cia_data, const ArrayOfArrayOfSpeciesTag &abs_species, const String &filename, const Verbosity &verbosity)
 WORKSPACE METHOD: abs_cia_dataReadFromXML. More...
 
void CIAInfo (const String &catalogpath, const ArrayOfString &cia_tags, const Verbosity &verbosity)
 WORKSPACE METHOD: CIAInfo. More...
 

Variables

const Numeric SPEED_OF_LIGHT
 

Detailed Description

Workspace methods for HITRAN CIA data.

Author
Oliver Lemke olemk.nosp@m.e@co.nosp@m.re-du.nosp@m.mp.i.nosp@m.nfo
Stefan Buehler
Date
2012-12-04

Definition in file m_cia.cc.

Function Documentation

◆ abs_cia_dataAddCIARecord()

void abs_cia_dataAddCIARecord ( ArrayOfCIARecord abs_cia_data,
const CIARecord cia_record,
const Index clobber,
const Verbosity verbosity 
)

WORKSPACE METHOD: abs_cia_dataAddCIARecord.

Takes CIARecord as input and appends the results in the appropriate place.

If CIARecord has same species as species in abs_cia_data, then the array position is used to append all of the CIARecord into the array. If clobber evaluates as true, cia_record overwrites the appropriate abs_cia_data. If species in cia_record are not in abs_cia_data, the CIARecord is pushed back.

Author
Richard Larsson
Parameters
[in,out]abs_cia_dataWS Input/Output
[in]cia_recordGeneric Input
[in]clobberGeneric Input (Default: "0")

Definition at line 295 of file m_cia.cc.

References cia_get_index(), and CIARecord::Species().

Referenced by abs_cia_dataAddCIARecord_g().

◆ abs_cia_dataReadFromCIA()

void abs_cia_dataReadFromCIA ( ArrayOfCIARecord abs_cia_data,
const ArrayOfArrayOfSpeciesTag abs_species,
const String catalogpath,
const Verbosity verbosity 
)

WORKSPACE METHOD: abs_cia_dataReadFromCIA.

Read data from a CIA data file for all CIA molecules defined in abs_species.

The units in the HITRAN file are: Frequency: cm^(-1) Binary absorption cross-section: cm^5 molec^(-2)

Upon reading we convert this to the ARTS internal SI units of Hz and m^5 molec^(-2).

Author
Oliver Lemke
Parameters
[out]abs_cia_dataWS Output
[in]abs_speciesWS Input
[in]catalogpathGeneric Input

Definition at line 313 of file m_cia.cc.

References cia_get_index(), CIASecond, iso(), list_directory(), Array< base >::nelem(), Species, species_name_from_species_index(), and SpeciesTag::TYPE_CIA.

Referenced by abs_cia_dataReadFromCIA_g(), and CIAInfo().

◆ abs_cia_dataReadFromXML()

void abs_cia_dataReadFromXML ( ArrayOfCIARecord abs_cia_data,
const ArrayOfArrayOfSpeciesTag abs_species,
const String filename,
const Verbosity verbosity 
)

WORKSPACE METHOD: abs_cia_dataReadFromXML.

Read data from a CIA XML file and check that all CIA tags defined in abs_species are present in the file.

The units of the data are described in abs_cia_dataReadFromCIA.

Author
Oliver Lemke
Parameters
[out]abs_cia_dataWS Output
[in]abs_speciesWS Input
[in]filenameGeneric Input (Default: "")

Definition at line 401 of file m_cia.cc.

References cia_get_index(), CIASecond, i, iso(), Array< base >::nelem(), Species, species_name_from_species_index(), _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str(), SpeciesTag::TYPE_CIA, and xml_read_from_file().

Referenced by abs_cia_dataReadFromXML_g().

◆ abs_xsec_per_speciesAddCIA()

void abs_xsec_per_speciesAddCIA ( ArrayOfMatrix abs_xsec_per_species,
ArrayOfArrayOfMatrix dabs_xsec_per_species_dx,
const ArrayOfArrayOfSpeciesTag abs_species,
const ArrayOfRetrievalQuantity jacobian_quantities,
const ArrayOfIndex abs_species_active,
const Vector f_grid,
const Vector abs_p,
const Vector abs_t,
const Matrix abs_vmrs,
const ArrayOfCIARecord abs_cia_data,
const Numeric T_extrapolfac,
const Index robust,
const Verbosity verbosity 
)

WORKSPACE METHOD: abs_xsec_per_speciesAddCIA.

Calculate absorption cross sections per tag group for HITRAN CIA continua.

This interpolates the cross sections from abs_cia_data.

The robust option is intended only for testing. Do not use for normal runs, since subsequent functions will not be able to deal with NAN values.

Author
Stefan Buehler
Parameters
[in,out]abs_xsec_per_speciesWS Input/Output
[in,out]dabs_xsec_per_species_dxWS Input/Output
[in]abs_speciesWS Input
[in]jacobian_quantitiesWS Input
[in]abs_species_activeWS Input
[in]f_gridWS Input
[in]abs_pWS Input
[in]abs_tWS Input
[in]abs_vmrsWS Input
[in]abs_cia_dataWS Input
[in]T_extrapolfacGeneric Input (Default: "0.5")
[in]robustGeneric Input (Default: "0")

Definition at line 41 of file m_cia.cc.

References cia_get_index(), SpeciesTag::CIADataset(), SpeciesTag::CIASecond(), CREATE_OUTS, do_frequency_jacobian(), do_temperature_jacobian(), equivalent_propmattype_indexes(), CIARecord::Extract(), find_first_species_tg(), frequency_perturbation(), i, CIARecord::MoleculeName(), SpeciesTag::Name(), ConstMatrixView::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), ConstMatrixView::nrows(), Vector::resize(), SpeciesTag::Species(), CIARecord::Species(), _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str(), supports_CIA(), temperature_perturbation(), SpeciesTag::Type(), and SpeciesTag::TYPE_CIA.

Referenced by ARTS::Agenda::abs_xsec_agenda_standard_with_cia(), and abs_xsec_per_speciesAddCIA_g().

◆ CIAInfo()

void CIAInfo ( const String catalogpath,
const ArrayOfString cia_tags,
const Verbosity verbosity 
)

WORKSPACE METHOD: CIAInfo.

Display information about the given CIA tags. The CIA tags shown are in the same format as needed by abs_speciesSet.

Author
Oliver Lemke
Parameters
[in]catalogpathGeneric Input
[in]cia_tagsGeneric Input

Definition at line 452 of file m_cia.cc.

References abs_cia_dataReadFromCIA(), CREATE_OUT1, i, Array< base >::nelem(), Print(), and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().

Referenced by CIAInfo_g().

◆ CIARecordReadFromFile()

void CIARecordReadFromFile ( CIARecord cia_record,
const String species_tag,
const String filename,
const Verbosity verbosity 
)

WORKSPACE METHOD: CIARecordReadFromFile.

Reads CIARecord from Hitran-style file.

Author
Richard Larsson
Parameters
[out]cia_recordGeneric output
[in]species_tagGeneric Input
[in]filenameGeneric Input

Definition at line 274 of file m_cia.cc.

References SpeciesTag::CIASecond(), CIARecord::ReadFromCIA(), CIARecord::SetSpecies(), SpeciesTag::Species(), _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str(), SpeciesTag::Type(), and SpeciesTag::TYPE_CIA.

Referenced by CIARecordReadFromFile_g().

Variable Documentation

◆ SPEED_OF_LIGHT

const Numeric SPEED_OF_LIGHT