ARTS
2.2.66
|
Declarations required for the calculation of absorption coefficients. More...
#include <stdexcept>
#include <cmath>
#include "matpackI.h"
#include "array.h"
#include "mystring.h"
#include "make_array.h"
#include "messages.h"
#include "abs_species_tags.h"
#include "linerecord.h"
#include "linemixingrecord.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 | 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 |
Typedefs | |
typedef void(* | lsf_type) (Vector &, Vector &, Vector &, const Numeric, const Numeric, const Numeric, ConstVectorView) |
The type that is used to store pointers to lineshape functions. More... | |
typedef void(* | lsnf_type) (Vector &, const Numeric, ConstVectorView, const Numeric) |
The type that is used to store pointers to lineshape normalization functions. More... | |
typedef Array< LineshapeSpec > | ArrayOfLineshapeSpec |
Holds a list of lineshape specifications: function, normalization, cutoff. More... | |
Functions | |
ostream & | operator<< (ostream &os, const LineshapeSpec &lsspec) |
void | checkIsotopologueRatios (const ArrayOfArrayOfSpeciesTag &abs_species, const SpeciesAuxData &sad) |
Check that isotopologue ratios for the given species are correctly defined. More... | |
void | fillSpeciesAuxDataWithIsotopologueRatiosFromSpeciesData (SpeciesAuxData &sad) |
Fill SpeciesAuxData with default isotopologue ratios 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... | |
void | define_species_map () |
Define the species data map. More... | |
void | xsec_species (MatrixView xsec_attenuation, MatrixView xsec_phase, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstMatrixView all_vmrs, const ArrayOfArrayOfSpeciesTag &abs_species, const Index this_species, const ArrayOfLineRecord &abs_lines, const Index ind_ls, const Index ind_lsn, const Numeric cutoff, const SpeciesAuxData &isotopologue_ratios, const Verbosity &verbosity) |
Calculate line absorption cross sections for one tag group. More... | |
void | xsec_species_line_mixing_wrapper (MatrixView xsec_attenuation, MatrixView xsec_phase, const ArrayOfArrayOfLineMixingRecord &line_mixing_data, const ArrayOfArrayOfIndex &line_mixing_data_lut, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstMatrixView all_vmrs, const ArrayOfArrayOfSpeciesTag &abs_species, const Index this_species, const ArrayOfLineRecord &abs_lines, const Index ind_ls, const Index ind_lsn, const Numeric cutoff, const SpeciesAuxData &isotopologue_ratios, const Verbosity &verbosity) |
This will work as a wrapper for linemixing when abs_species contain relevant data. More... | |
void | xsec_species_line_mixing_2nd_order (MatrixView xsec_attenuation, MatrixView xsec_phase, const ArrayOfArrayOfLineMixingRecord &line_mixing_data, const ArrayOfArrayOfIndex &line_mixing_data_lut, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstMatrixView all_vmrs, const ArrayOfArrayOfSpeciesTag &abs_species, const Index this_species, const ArrayOfLineRecord &abs_lines, const Index ind_ls, const Index ind_lsn, const Numeric cutoff, const SpeciesAuxData &isotopologue_ratios, const Verbosity &verbosity) |
This is the second order line mixing correction as presented by: Makarov, D.S, M.Yu. 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 | convHitranIERF (Numeric &mdf, const Index &df) |
void | convHitranIERSH (Numeric &mdh, const Index &dh) |
void | convMytranIER (Numeric &mdh, const Index &dh) |
void | abs_n2Set (Vector &abs_n2, const ArrayOfArrayOfSpeciesTag &abs_species, const Matrix &abs_vmrs, const Verbosity &) |
abs_n2Set. More... | |
void | abs_h2oSet (Vector &abs_h2o, const ArrayOfArrayOfSpeciesTag &abs_species, const Matrix &abs_vmrs, const Verbosity &) |
abs_h2oSet. More... | |
Declarations required for the calculation of absorption coefficients.
This is the file from arts-1-0, back-ported to arts-1-1.
Definition in file absorption.h.
typedef Array<LineshapeSpec> ArrayOfLineshapeSpec |
Holds a list of lineshape specifications: function, normalization, cutoff.
Definition at line 185 of file absorption.h.
typedef void(* lsf_type) (Vector &, Vector &, Vector &, const Numeric, const Numeric, const Numeric, ConstVectorView) |
The type that is used to store pointers to lineshape functions.
Definition at line 45 of file absorption.h.
typedef void(* lsnf_type) (Vector &, const Numeric, ConstVectorView, const Numeric) |
The type that is used to store pointers to lineshape normalization functions.
Definition at line 96 of file absorption.h.
void abs_h2oSet | ( | Vector & | abs_h2o, |
const ArrayOfArrayOfSpeciesTag & | abs_species, | ||
const Matrix & | abs_vmrs, | ||
const Verbosity & | |||
) |
abs_h2oSet.
Sets abs_h2o to the profile of the first tag group containing water.
This is necessary, because for example abs_coefCalc requires abs_h2o to contain the water vapour profile(the reason for this is the calculation of oxygen line broadening requires water vapour profile). Then this function can be used to copy the profile of the first tag group of water.
[out] | abs_h2o | WS Output |
[in] | abs_species | WS Input |
[in] | abs_vmrs | WS Input |
Definition at line 1287 of file m_abs.cc.
References find_first_species_tg(), joker, ConstMatrixView::ncols(), Vector::resize(), and species_index_from_species_name().
Referenced by abs_xsec_per_speciesAddConts().
void abs_n2Set | ( | Vector & | abs_n2, |
const ArrayOfArrayOfSpeciesTag & | abs_species, | ||
const Matrix & | abs_vmrs, | ||
const Verbosity & | |||
) |
abs_n2Set.
Sets abs_n2 to the profile of the first tag group containing molecular nitrogen. See abs_h2oSet for more details.
[out] | abs_n2 | WS Output |
[in] | abs_species | WS Input |
[in] | abs_vmrs | WS Input |
Definition at line 1315 of file m_abs.cc.
References find_first_species_tg(), joker, ConstMatrixView::ncols(), Vector::resize(), and species_index_from_species_name().
Referenced by abs_xsec_per_speciesAddConts().
void checkIsotopologueRatios | ( | const ArrayOfArrayOfSpeciesTag & | abs_species, |
const SpeciesAuxData & | sad | ||
) |
Check that isotopologue ratios for the given species are correctly defined.
Definition at line 245 of file absorption.cc.
References SpeciesAuxData::getParam(), SpeciesAuxData::getParams(), iso(), SpeciesRecord::Isotopologue(), SpeciesRecord::Name(), Array< base >::nelem(), and global_data::species_data.
Referenced by abs_xsec_per_speciesAddLines(), and propmat_clearskyAddZeeman().
Definition at line 1327 of file absorption.cc.
Referenced by LineRecord::ReadFromHitran2001Stream(), and LineRecord::ReadFromHitran2004Stream().
Definition at line 1374 of file absorption.cc.
Referenced by LineRecord::ReadFromHitran2001Stream(), and LineRecord::ReadFromHitran2004Stream().
Definition at line 1433 of file absorption.cc.
Referenced by LineRecord::ReadFromMytran2Stream().
void define_species_map | ( | ) |
Define the species data map.
Define the species data map.
Definition at line 322 of file absorption.cc.
References global_data::species_data, and SpeciesMap.
Referenced by main().
void fillSpeciesAuxDataWithIsotopologueRatiosFromSpeciesData | ( | SpeciesAuxData & | sad | ) |
Fill SpeciesAuxData with default isotopologue ratios from species data.
Definition at line 305 of file absorption.cc.
References IsotopologueRecord::Abundance(), SpeciesAuxData::initParams(), SpeciesAuxData::setParam(), and global_data::species_data.
Referenced by isotopologue_ratiosInitFromBuiltin().
ostream& operator<< | ( | ostream & | os, |
const LineshapeSpec & | lsspec | ||
) |
Definition at line 1494 of file absorption.cc.
References LineshapeSpec::Cutoff(), LineshapeSpec::Ind_ls(), and LineshapeSpec::Ind_lsn().
ostream& operator<< | ( | ostream & | os, |
const SpeciesRecord & | sr | ||
) |
Output operator for SpeciesRecord.
Incomplete version: only writes SpeciesName.
Definition at line 333 of file absorption.cc.
References SpeciesRecord::Isotopologue(), SpeciesRecord::Name(), and Array< base >::nelem().
ostream& operator<< | ( | ostream & | os, |
const SpeciesAuxData & | sad | ||
) |
Output operator for SpeciesAuxData.
Definition at line 343 of file absorption.cc.
References SpeciesAuxData::getParams().
Return species index for given species name.
This is useful in connection with other functions that need a species index.
name | Species name. |
Definition at line 1260 of file absorption.cc.
References SpeciesMap, and my_basic_string< charT >::trim().
Referenced by abs_h2oSet(), abs_lookupCalc(), abs_lookupSetup(), abs_lookupSetupBatch(), abs_lookupSetupWide(), abs_lookupTestAccMC(), abs_lookupTestAccuracy(), abs_n2Set(), abs_o2Set(), LineRecord::BroadSpecSpecIndex(), choose_abs_nls(), GasAbsLookup::Extract(), find_nonlinear_continua(), refr_index_airMWgeneral(), refr_index_airThayer(), CIARecord::SetMoleculeName(), SpeciesTag::SpeciesTag(), xml_read_from_stream(), and z_fieldFromHSE().
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.
spec_ind | Species index. |
Definition at line 1301 of file absorption.cc.
References global_data::species_data.
Referenced by abs_cia_dataReadFromCIA(), abs_cia_dataReadFromXML(), get_species_name(), CIARecord::MoleculeName(), SpeciesTag::Name(), and xml_write_to_stream().
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.
e | Energy in cm^-1. |
Definition at line 1227 of file absorption.cc.
References PLANCK_CONST, and SPEED_OF_LIGHT.
Referenced by LineRecord::ReadFromHitran2001Stream(), LineRecord::ReadFromHitran2004Stream(), LineRecord::ReadFromJplStream(), and LineRecord::ReadFromMytran2Stream().
void xsec_species | ( | MatrixView | xsec_attenuation, |
MatrixView | xsec_phase, | ||
ConstVectorView | f_grid, | ||
ConstVectorView | abs_p, | ||
ConstVectorView | abs_t, | ||
ConstMatrixView | all_vmrs, | ||
const ArrayOfArrayOfSpeciesTag & | abs_species, | ||
const Index | this_species, | ||
const ArrayOfLineRecord & | abs_lines, | ||
const Index | ind_ls, | ||
const Index | ind_lsn, | ||
const Numeric | cutoff, | ||
const SpeciesAuxData & | isotopologue_ratios, | ||
const Verbosity & | verbosity | ||
) |
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 abs_lines_per_speciesCreateFromLines, so it is only verified with assert. Also, the input vectors abs_p, and abs_t 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.
xsec | Cross section of one tag group. This is now the true absorption cross section in units of m^2. |
f_grid | Frequency grid. |
abs_p | Pressure grid. |
abs_t | Temperatures associated with abs_p. |
all_vmrs | Gas volume mixing ratios [nspecies, np]. |
abs_species | Species tags for all species. |
this_species | Index of the current species in abs_species. |
abs_lines | The spectroscopic line list. |
ind_ls | Index to lineshape function. |
ind_lsn | Index to lineshape norm. |
cutoff | Lineshape cutoff. |
isotopologue_ratios | Isotopologue ratios. |
Changed from pseudo cross sections to true cross sections
Adapted to new Perrin line parameters, treating broadening by different gases explicitly
Definition at line 594 of file absorption.cc.
References LineRecord::Agam(), arts_omp_get_max_threads(), arts_omp_get_thread_num(), arts_omp_in_parallel(), AVOGADROS_NUMB, BOLTZMAN_CONST, calc_gamma_and_deltaf_artscat4(), IsotopologueRecord::CalculatePartitionFctRatio(), LineRecord::Elow(), LineRecord::F(), fac(), find_broad_spec_locations(), SpeciesAuxData::getParam(), LineRecord::I0(), is_sorted(), LineRecord::Isotopologue(), LineRecord::IsotopologueData(), joker, global_data::lineshape_data, global_data::lineshape_norm_data, IsotopologueRecord::Mass(), LineRecord::Nair(), IsotopologueRecord::Name(), ConstMatrixView::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), ConstMatrixView::nrows(), LineRecord::Nself(), PLANCK_CONST, LineRecord::Psf(), LineRecord::Sgam(), LineRecord::Species(), SPEED_OF_LIGHT, LineRecord::Tgam(), LineRecord::Ti0(), and LineRecord::Version().
Referenced by abs_xsec_per_speciesAddLines(), xsec_species_line_mixing_2nd_order(), and xsec_species_line_mixing_wrapper().
void xsec_species_line_mixing_2nd_order | ( | MatrixView | xsec_attenuation, |
MatrixView | xsec_phase, | ||
const ArrayOfArrayOfLineMixingRecord & | line_mixing_data, | ||
const ArrayOfArrayOfIndex & | line_mixing_data_lut, | ||
ConstVectorView | f_grid, | ||
ConstVectorView | abs_p, | ||
ConstVectorView | abs_t, | ||
ConstMatrixView | all_vmrs, | ||
const ArrayOfArrayOfSpeciesTag & | abs_species, | ||
const Index | this_species, | ||
const ArrayOfLineRecord & | abs_lines, | ||
const Index | ind_ls, | ||
const Index | ind_lsn, | ||
const Numeric | cutoff, | ||
const SpeciesAuxData & | isotopologue_ratios, | ||
const Verbosity & | verbosity | ||
) |
This is the second order line mixing correction as presented by: Makarov, D.S, M.Yu.
Tretyakov and P.W. Rosenkranz, 2011, 60-GHz oxygen band: Precise experimental profiles and extended absorption modeling in a wide temperature range, JQSRT 112, 1420-1428.
xsec_attenuation | Cross section of one tag group. This is now the true attenuation cross section in units of m^2. |
xsec_phase | Cross section of one tag group. This is now the true phase cross section in units of m^2. |
line_mixing_data | Line mixing data for specific type of line mixing. |
line_mixing_data_lut | Line mixing data lookup table. |
f_grid | Frequency grid. |
abs_p | Pressure grid. |
abs_t | Temperatures associated with abs_p. |
all_vmrs | Gas volume mixing ratios [nspecies, np]. |
abs_species | Species tags for all species. |
this_species | Index of the current species in abs_species. |
abs_lines | The spectroscopic line list. |
ind_ls | Index to lineshape function. |
ind_lsn | Index to lineshape norm. |
cutoff | Lineshape cutoff. |
isotopologue_ratios | Isotopologue ratios. |
Definition at line 1598 of file absorption.cc.
References joker, global_data::lineshape_data, ll, Array< base >::nelem(), ConstVectorView::nelem(), ConstMatrixView::nrows(), and xsec_species().
Referenced by xsec_species_line_mixing_wrapper().
void xsec_species_line_mixing_wrapper | ( | MatrixView | xsec_attenuation, |
MatrixView | xsec_phase, | ||
const ArrayOfArrayOfLineMixingRecord & | line_mixing_data, | ||
const ArrayOfArrayOfIndex & | line_mixing_data_lut, | ||
ConstVectorView | f_grid, | ||
ConstVectorView | abs_p, | ||
ConstVectorView | abs_t, | ||
ConstMatrixView | all_vmrs, | ||
const ArrayOfArrayOfSpeciesTag & | abs_species, | ||
const Index | this_species, | ||
const ArrayOfLineRecord & | abs_lines, | ||
const Index | ind_ls, | ||
const Index | ind_lsn, | ||
const Numeric | cutoff, | ||
const SpeciesAuxData & | isotopologue_ratios, | ||
const Verbosity & | verbosity | ||
) |
This will work as a wrapper for linemixing when abs_species contain relevant data.
The funciton will only pass on arguments to xsec_species if there is no linemixing.
xsec_attenuation | Cross section of one tag group. This is now the true attenuation cross section in units of m^2. |
xsec_phase | Cross section of one tag group. This is now the true phase cross section in units of m^2. |
line_mixing_data | Line mixing data for specific type of line mixing. |
line_mixing_data_lut | Line mixing data lookup table. |
f_grid | Frequency grid. |
abs_p | Pressure grid. |
abs_t | Temperatures associated with abs_p. |
all_vmrs | Gas volume mixing ratios [nspecies, np]. |
abs_species | Species tags for all species. |
this_species | Index of the current species in abs_species. |
abs_lines | The spectroscopic line list. |
ind_ls | Index to lineshape function. |
ind_lsn | Index to lineshape norm. |
cutoff | Lineshape cutoff. |
isotopologue_ratios | Isotopologue ratios. |
Definition at line 1530 of file absorption.cc.
References SpeciesTag::LINE_MIXING_TYPE_2NDORDER, SpeciesTag::LINE_MIXING_TYPE_NONE, xsec_species(), and xsec_species_line_mixing_2nd_order().
Referenced by abs_xsec_per_speciesAddLines(), and xsec_species_line_mixing_wrapper_with_zeeman().