m_abs.cc File Reference

Stuff related to the calculation of absorption coefficients. More...

#include <cmath>
#include <algorithm>
#include "arts.h"
#include "matpackI.h"
#include "array.h"
#include "messages.h"
#include "file.h"
#include "absorption.h"
#include "auto_md.h"
#include "math_funcs.h"
#include "make_array.h"
#include "physics_funcs.h"
#include "continua.h"
#include "make_vector.h"
#include "check_input.h"
#include "xml_io.h"

Include dependency graph for m_abs.cc:

Go to the source code of this file.

Functions

void AbsInputFromRteScalars (Vector &abs_p, Vector &abs_t, Matrix &abs_vmrs, const Numeric &rte_pressure, const Numeric &rte_temperature, const Vector &rte_vmr_list)
 WORKSPACE METHOD: AbsInputFromRteScalars.
void abs_lines_per_speciesSetEmpty (ArrayOfArrayOfLineRecord &abs_lines_per_species, const ArrayOfArrayOfSpeciesTag &tgs)
 WORKSPACE METHOD: abs_lines_per_speciesSetEmpty.
void abs_linesReadFromHitran (ArrayOfLineRecord &abs_lines, const String &filename, const Numeric &fmin, const Numeric &fmax)
 WORKSPACE METHOD: abs_linesReadFromHitran.
void abs_linesReadFromHitran2004 (ArrayOfLineRecord &abs_lines, const String &filename, const Numeric &fmin, const Numeric &fmax)
 WORKSPACE METHOD: abs_linesReadFromHitran2004.
void abs_linesReadFromMytran2 (ArrayOfLineRecord &abs_lines, const String &filename, const Numeric &fmin, const Numeric &fmax)
 WORKSPACE METHOD: abs_linesReadFromMytran2.
void abs_linesReadFromJpl (ArrayOfLineRecord &abs_lines, const String &filename, const Numeric &fmin, const Numeric &fmax)
 WORKSPACE METHOD: abs_linesReadFromJpl.
void abs_linesReadFromArts (ArrayOfLineRecord &abs_lines, const String &filename, const Numeric &fmin, const Numeric &fmax)
 WORKSPACE METHOD: abs_linesReadFromArts.
void abs_linesReadFromArtsObsolete (ArrayOfLineRecord &abs_lines, const String &filename, const Numeric &fmin, const Numeric &fmax)
 WORKSPACE METHOD: abs_linesReadFromArtsObsolete.
void linesElowToJoule (ArrayOfLineRecord &abs_lines)
void abs_lines_per_speciesReadFromCatalogues (ArrayOfArrayOfLineRecord &abs_lines_per_species, const ArrayOfArrayOfSpeciesTag &tgs, const ArrayOfString &filenames, const ArrayOfString &formats, const Vector &fmin, const Vector &fmax)
 WORKSPACE METHOD: abs_lines_per_speciesReadFromCatalogues.
void abs_lines_per_speciesCreateFromLines (ArrayOfArrayOfLineRecord &abs_lines_per_species, const ArrayOfLineRecord &abs_lines, const ArrayOfArrayOfSpeciesTag &tgs)
 WORKSPACE METHOD: abs_lines_per_speciesCreateFromLines.
void abs_lines_per_speciesAddMirrorLines (ArrayOfArrayOfLineRecord &abs_lines_per_species)
 WORKSPACE METHOD: abs_lines_per_speciesAddMirrorLines.
void abs_lines_per_speciesCompact (ArrayOfArrayOfLineRecord &abs_lines_per_species, const ArrayOfLineshapeSpec &abs_lineshape, const Vector &f_grid)
 WORKSPACE METHOD: abs_lines_per_speciesCompact.
void abs_speciesDefineAllInScenario (ArrayOfArrayOfSpeciesTag &tgs, const String &basename)
 WORKSPACE METHOD: abs_speciesDefineAllInScenario.
void abs_lineshapeDefine (ArrayOfLineshapeSpec &abs_lineshape, const String &shape, const String &normalizationfactor, const Numeric &cutoff)
 WORKSPACE METHOD: abs_lineshapeDefine.
void abs_lineshape_per_tgDefine (ArrayOfLineshapeSpec &abs_lineshape, const ArrayOfArrayOfSpeciesTag &tgs, const ArrayOfString &shape, const ArrayOfString &normalizationfactor, const Vector &cutoff)
 WORKSPACE METHOD: abs_lineshape_per_tgDefine.
void abs_h2oSet (Vector &abs_h2o, const ArrayOfArrayOfSpeciesTag &abs_species, const Matrix &abs_vmrs)
 WORKSPACE METHOD: abs_h2oSet.
void abs_n2Set (Vector &abs_n2, const ArrayOfArrayOfSpeciesTag &abs_species, const Matrix &abs_vmrs)
 WORKSPACE METHOD: abs_n2Set.
void AbsInputFromAtmFields (Vector &abs_p, Vector &abs_t, Matrix &abs_vmrs, const Index &atmosphere_dim, const Vector &p_grid, const Tensor3 &t_field, const Tensor4 &vmr_field)
 WORKSPACE METHOD: AbsInputFromAtmFields.
void abs_coefCalc (Matrix &abs_coef, ArrayOfMatrix &abs_coef_per_species, const ArrayOfArrayOfSpeciesTag &tgs, const Vector &f_grid, const Vector &abs_p, const Vector &abs_t, const Vector &abs_n2, const Vector &abs_h2o, const Matrix &abs_vmrs, const ArrayOfArrayOfLineRecord &abs_lines_per_species, const ArrayOfLineshapeSpec &abs_lineshape, const ArrayOfString &abs_cont_names, const ArrayOfString &abs_cont_models, const ArrayOfVector &abs_cont_parameters)
void abs_coefCalcSaveMemory (Matrix &abs_coef, const ArrayOfArrayOfSpeciesTag &tgs, const Vector &f_grid, const Vector &abs_p, const Vector &abs_t, const Vector &abs_n2, const Vector &abs_h2o, const Matrix &abs_vmrs, const ArrayOfArrayOfLineRecord &abs_lines_per_species, const ArrayOfLineshapeSpec &abs_lineshape, const ArrayOfString &abs_cont_names, const ArrayOfString &abs_cont_models, const ArrayOfVector &abs_cont_parameters)
void abs_coefCalcFromXsec (Matrix &abs_coef, ArrayOfMatrix &abs_coef_per_species, const ArrayOfMatrix &abs_xsec_per_species, const Matrix &abs_vmrs, const Vector &abs_p, const Vector &abs_t)
 WORKSPACE METHOD: abs_coefCalcFromXsec.
void abs_xsec_per_speciesInit (ArrayOfMatrix &abs_xsec_per_species, const ArrayOfArrayOfSpeciesTag &tgs, const Vector &f_grid, const Vector &abs_p)
 WORKSPACE METHOD: abs_xsec_per_speciesInit.
void abs_xsec_per_speciesAddLines (ArrayOfMatrix &abs_xsec_per_species, const ArrayOfArrayOfSpeciesTag &tgs, const Vector &f_grid, const Vector &abs_p, const Vector &abs_t, const Vector &abs_h2o, const Matrix &abs_vmrs, const ArrayOfArrayOfLineRecord &abs_lines_per_species, const ArrayOfLineshapeSpec &abs_lineshape)
 WORKSPACE METHOD: abs_xsec_per_speciesAddLines.
void abs_xsec_per_speciesAddConts (ArrayOfMatrix &abs_xsec_per_species, const ArrayOfArrayOfSpeciesTag &tgs, const Vector &f_grid, const Vector &abs_p, const Vector &abs_t, const Vector &abs_n2, const Vector &abs_h2o, const Matrix &abs_vmrs, const ArrayOfString &abs_cont_names, const ArrayOfVector &abs_cont_parameters, const ArrayOfString &abs_cont_models)
void abs_cont_descriptionInit (ArrayOfString &names, ArrayOfString &options, ArrayOfVector &parameters)
void abs_cont_descriptionAppend (ArrayOfString &abs_cont_names, ArrayOfString &abs_cont_models, ArrayOfVector &abs_cont_parameters, const String &tagname, const String &model, const Vector &userparameters)
void abs_scalar_gasFromAbsCoef (Matrix &abs_scalar_gas, const ArrayOfMatrix &abs_coef_per_species)
 WORKSPACE METHOD: abs_scalar_gasFromAbsCoef.
void abs_scalar_gasCalcLBL (Matrix &abs_scalar_gas, const Vector &f_grid, const ArrayOfArrayOfSpeciesTag &abs_species, const Vector &abs_n2, const ArrayOfArrayOfLineRecord &abs_lines_per_species, const ArrayOfLineshapeSpec &abs_lineshape, const ArrayOfString &abs_cont_names, const ArrayOfString &abs_cont_models, const ArrayOfVector &abs_cont_parameters, const Index &f_index, const Numeric &rte_pressure, const Numeric &rte_temperature, const Vector &rte_vmr_list)
void f_gridSelectFIndex (Vector &f_grid, const Index &f_index)
 WORKSPACE METHOD: f_gridSelectFIndex.


Detailed Description

Stuff related to the calculation of absorption coefficients.

Author:
Stefan Buehler
Date:
2001-03-12

Definition in file m_abs.cc.


Function Documentation

void abs_coefCalc ( Matrix abs_coef,
ArrayOfMatrix abs_coef_per_species,
const ArrayOfArrayOfSpeciesTag tgs,
const Vector f_grid,
const Vector abs_p,
const Vector abs_t,
const Vector abs_n2,
const Vector abs_h2o,
const Matrix abs_vmrs,
const ArrayOfArrayOfLineRecord abs_lines_per_species,
const ArrayOfLineshapeSpec abs_lineshape,
const ArrayOfString abs_cont_names,
const ArrayOfString abs_cont_models,
const ArrayOfVector abs_cont_parameters 
)

void abs_coefCalcFromXsec ( Matrix abs_coef,
ArrayOfMatrix abs_coef_per_species,
const ArrayOfMatrix abs_xsec_per_species,
const Matrix abs_vmrs,
const Vector abs_p,
const Vector abs_t 
)

WORKSPACE METHOD: abs_coefCalcFromXsec.

Calculate absorption coefficients from cross sections.

This calculates both the total absorption and the absorption per tag group.

Cross sections are multiplied by n*VMR.

Author:
Stefan Buehler

Axel von Engeln

Parameters:
[out] abs_coef WS Output
[out] abs_coef_per_species WS Output
[in] abs_xsec_per_species WS Input
[in] abs_vmrs WS Input
[in] abs_p WS Input
[in] abs_t WS Input

Definition at line 1894 of file m_abs.cc.

References chk_size(), ConstMatrixView::ncols(), Array< base >::nelem(), ConstMatrixView::nrows(), number_density(), out3, and Matrix::resize().

Referenced by abs_coefCalc(), abs_coefCalcFromXsec_g(), and abs_coefCalcSaveMemory().

void abs_coefCalcSaveMemory ( Matrix abs_coef,
const ArrayOfArrayOfSpeciesTag tgs,
const Vector f_grid,
const Vector abs_p,
const Vector abs_t,
const Vector abs_n2,
const Vector abs_h2o,
const Matrix abs_vmrs,
const ArrayOfArrayOfLineRecord abs_lines_per_species,
const ArrayOfLineshapeSpec abs_lineshape,
const ArrayOfString abs_cont_names,
const ArrayOfString abs_cont_models,
const ArrayOfVector abs_cont_parameters 
)

void abs_cont_descriptionAppend ( ArrayOfString abs_cont_names,
ArrayOfString abs_cont_models,
ArrayOfVector abs_cont_parameters,
const String tagname,
const String model,
const Vector userparameters 
)

Definition at line 2651 of file m_abs.cc.

References check_continuum_model().

void abs_cont_descriptionInit ( ArrayOfString names,
ArrayOfString options,
ArrayOfVector parameters 
)

Definition at line 2636 of file m_abs.cc.

References out2.

void abs_h2oSet ( Vector abs_h2o,
const ArrayOfArrayOfSpeciesTag abs_species,
const Matrix abs_vmrs 
)

WORKSPACE METHOD: 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 brodening requires water vapour profile). Then this function can be used to copy the profile of the first tag group of water.

Author:
Patrick Eriksson
Parameters:
[out] abs_h2o WS Output
[in] abs_species WS Input
[in] abs_vmrs WS Input

Definition at line 1670 of file m_abs.cc.

References find_first_species_tg(), joker, ConstMatrixView::ncols(), Vector::resize(), and species_index_from_species_name().

Referenced by abs_h2oSet_g(), and abs_scalar_gasCalcLBL().

void abs_lines_per_speciesAddMirrorLines ( ArrayOfArrayOfLineRecord abs_lines_per_species  ) 

WORKSPACE METHOD: abs_lines_per_speciesAddMirrorLines.

Adds mirror lines at negative frequencies to the *abs_lines_per_species*.

For each line at frequency +f in *abs_lines_per_species* a corresponding entry at frequency -f is added to *abs_lines_per_species*.The mirror lines are appended to the line lists after the original lines.

Author:
Axel von Engeln

Stefan Buehler

Parameters:
[out] abs_lines_per_species WS Output

Definition at line 694 of file m_abs.cc.

References LineRecord::F(), ll, Array< base >::nelem(), and LineRecord::setF().

Referenced by abs_lines_per_speciesAddMirrorLines_g().

void abs_lines_per_speciesCompact ( ArrayOfArrayOfLineRecord abs_lines_per_species,
const ArrayOfLineshapeSpec abs_lineshape,
const Vector f_grid 
)

WORKSPACE METHOD: abs_lines_per_speciesCompact.

Removes all lines outside the defined lineshape cutoff frequency from the *abs_lines_per_species*. This can save computation time. It should be particularly useful to call this method after abs_lines_per_speciesAddMirrorLines*.

Author:
Axel von Engeln

Stefan Buehler

Parameters:
[out] abs_lines_per_species WS Output
[in] abs_lineshape WS Input
[in] f_grid WS Input

Definition at line 730 of file m_abs.cc.

References ll, ConstVectorView::nelem(), and Array< base >::nelem().

Referenced by abs_lines_per_speciesCompact_g().

void abs_lines_per_speciesCreateFromLines ( ArrayOfArrayOfLineRecord abs_lines_per_species,
const ArrayOfLineRecord abs_lines,
const ArrayOfArrayOfSpeciesTag abs_species 
)

WORKSPACE METHOD: abs_lines_per_speciesCreateFromLines.

Split lines up into the different tag groups.

The tag groups are tested in the order in which they are specified in the controlfile. The lines are assigned to the tag groups in the order as the groups are specified. That means if you do ["O3-666","O3"],the last group O3 gets assigned all the O3 lines that do not fit in the first group.

Author:
Stefan Buehler
Parameters:
[out] abs_lines_per_species WS Output
[in] abs_lines WS Input
[in] abs_species WS Input

Definition at line 554 of file m_abs.cc.

References LineRecord::F(), LineRecord::Isotope(), SpeciesRecord::Isotope(), SpeciesTag::Isotope(), SpeciesTag::Lf(), SpeciesRecord::Name(), Array< base >::nelem(), out2, out3, LineRecord::Species(), SpeciesTag::Species(), species_data, LineRecord::SpeciesData(), and SpeciesTag::Uf().

Referenced by abs_lines_per_speciesCreateFromLines_g(), and abs_lines_per_speciesReadFromCatalogues().

void abs_lines_per_speciesReadFromCatalogues ( ArrayOfArrayOfLineRecord abs_lines_per_species,
const ArrayOfArrayOfSpeciesTag abs_species,
const ArrayOfString filenames,
const ArrayOfString formats,
const Vector fmin,
const Vector fmax 
)

WORKSPACE METHOD: abs_lines_per_speciesReadFromCatalogues.

This method can read lines from different line catalogues.

For each tag group, you can specify which catalogue to use. Because the method creates abs_lines_per_species directly, it replaces for example thefollowing two method calls: <br> - abs_linesReadFromHitran <br> - abs_lines_per_speciesCreateFromLines <br> This method needs as input WSVs the list of tag groups. Keyword parameters must specify the names of the catalogue files to use and the matching formats. Names can be anything, formats can currently be HITRAN96 (for HITRAN 1986-2001 databases), HITRAN04 (for HITRAN 2004 database), MYTRAN2, JPL, or ARTS. Furthermore, keyword parameters have to specify minimum and maximum frequency for each tag group. To safe typing, if there are less elements in the keyword parameters than there are tag groups, the last parameters are applied to all following tag groups.

Example usage:

abs_lines_per_speciesReadFromCatalogues{ <br> filenames = [ "../data/cat1.dat", "../data/cat2.dat" ] <br> formats = [ "MYTRAN2", "HITRAN96" ] <br> fmin = [ 0, 0 ] <br> fmax = [ 2000e9, 100e9 ] } <br> In this example, lines for the first tag group will be taken from cat1, lines for all other tag groups will be taken from cat2. <br> This methods allows you for example to use a special line file just for water vapor lines. This could be the improved water vapor line file generated by Thomas Kuhn. <br> Catalogues are only read once, even if several tag groups have the same catalogue. However, in that case the frequency ranges MUST be the same. (If you want to do fine-tuning of the frequency ranges, you can do this inside the tag definitions, e.g., "H2O-*-0-2000e9".) <br> This function uses the various reading routines (abs_linesReadFromHitran, etc.), as well as abs_lines_per_speciesCreateFromLines.

Keywords: <br> filenames : Name (and path) of the catalogue files. <br> formats : allowed formats are HITRAN96,MYTRAN2,JPL,ARTS <br> fmin : Minimum frequency for lines to read in Hz. <br> fmax : Maximum frequency for lines to read in Hz.

Author:
Stefan Buehler
Parameters:
[out] abs_lines_per_species WS Output
[in] abs_species WS Input
[in] filenames Generic Input
[in] formats Generic Input
[in] fmin Generic Input
[in] fmax Generic Input

Definition at line 347 of file m_abs.cc.

References abs_lines_per_speciesCreateFromLines(), abs_linesReadFromArts(), abs_linesReadFromHitran(), abs_linesReadFromHitran2004(), abs_linesReadFromJpl(), abs_linesReadFromMytran2(), ConstVectorView::nelem(), Array< base >::nelem(), and out3.

Referenced by abs_lines_per_speciesReadFromCatalogues_g().

void abs_lines_per_speciesSetEmpty ( ArrayOfArrayOfLineRecord abs_lines_per_species,
const ArrayOfArrayOfSpeciesTag abs_species 
)

WORKSPACE METHOD: abs_lines_per_speciesSetEmpty.

Sets abs_lines_per_species to empty line lists.

You can use this method to set lines per tag if you do not reall want to compute line spectra. Formally, abs_coefCalc will still require abs_lines_per_species to be set.

Author:
Stefan Buehler
Parameters:
[out] abs_lines_per_species WS Output
[in] abs_species WS Input

Definition at line 76 of file m_abs.cc.

References Array< base >::nelem().

Referenced by abs_lines_per_speciesSetEmpty_g().

void abs_lineshape_per_tgDefine ( ArrayOfLineshapeSpec abs_lineshape,
const ArrayOfArrayOfSpeciesTag abs_species,
const ArrayOfString shape,
const ArrayOfString normalizationfactor,
const Vector cutoff 
)

WORKSPACE METHOD: abs_lineshape_per_tgDefine.

Sets the lineshape per tag group for all calculated lines.

<br> A general lineshape profile is specified, according to a given approximation for each tag group. Alongside a normalization factor is to be set also for each tag group - a multiplicative forefactor through which the profile can be modified. This factor is just the 0th or 1st, or 2nd power of the ratio between the frequency of calculation f and the center frequency for a specific line f0. A cutoff frequency must also be specified for each of the tags in order to restrict the calculation within a desired region or not, when there's no such region. <br> The general lineshape profile is given by the keyword shape, while the normalization factor and the cutoff frequency by normalizationfactor and cutoff respectively.

<br> The available values for these keywords are given below. shape - "no_shape" : no specified shape <br> "Doppler" : Doppler lineshape <br> "Lorentz" : Lorentz lineshape <br> "Voigt_Kuntz3" : Kuntz approximation to the Voigt profile, <br> accuracy > 2x10^(-3) <br> "Voigt_Kuntz4" : Kuntz approximation to the Voigt profile, <br> accuracy > 2x10^(-4) <br> "Voigt_Kuntz6" : Kuntz approximation to the Voigt profile, <br> accuracy > 2x10^(-6) <br> "Voigt_Drayson" : Drayson approximation to the Voigt profile <br> "Rosenkranz_Voigt_Drayson" : Rosenkrantz oxygen absortion with overlap correction <br> on the basis of Drayson routine <br> "Rosenkranz_Voigt_Kuntz6" : Rosenkrantz oxygen absortion with overlap correction <br> on the basis of Kuntz routine, accuracy > 2x10^(-6) normalizationfactor - "no_norm": 1 <br> "linear": f/f0 <br> "quadratic": (f/f0)^2. cutoff - " -1" : no cutoff <br> "Number": positive cutoff frequency in Hz.

Example usage: shape = ["Lorentz","Voigt_Kuntz6"] normalizationfactor= ["linear", "quadratic"] cutoff = [ 650e9, -1 ] Keywords: <br> shape : The general profile according to an approximation. <br> normalizationfactor : The multiplicative forefactor for the general profile. <br> cutoff : The frequency at which a cutoff can be made.

Author:
Axel von Engeln

Stefan Buehler

Parameters:
[out] abs_lineshape WS Output
[in] abs_species WS Input
[in] shape Generic Input
[in] normalizationfactor Generic Input
[in] cutoff Generic Input

Definition at line 938 of file m_abs.cc.

References lineshape_data, lineshape_norm_data, ConstVectorView::nelem(), Array< base >::nelem(), and out2.

Referenced by abs_lineshape_per_tgDefine_g().

void abs_lineshapeDefine ( ArrayOfLineshapeSpec abs_lineshape,
const String shape,
const String normalizationfactor,
const Numeric cutoff 
)

WORKSPACE METHOD: abs_lineshapeDefine.

Sets the lineshape for all calculated lines.

<br> A general lineshape profile is specified, according to a given approximation. Alongside a normalization factor is to be set - a multiplicative forefactor through which the profile can be modified. This factor is just the 0th or 1st, or 2nd power of the ratio between the frequency of calculation f and the center frequency for a specific line f0. A cutoff frequency must also be specified in order to restrict the calculation within a desired frequency region or not, when there's no such region. <br> The general lineshape profile is given by the keyword shape, while the normalization factor and the cutoff frequency by normalizationfactor and cutoff respectively. <br> We generate only 1 copy of the lineshape settings. Absorption routines check for this case and use it for all species.

<br> The available values for these keywords are given below. shape - "no_shape" : no specified shape <br> "Doppler" : Doppler lineshape <br> "Lorentz" : Lorentz lineshape <br> "Voigt_Kuntz3" : Kuntz approximation to the Voigt profile, <br> accuracy > 2x10^(-3) <br> "Voigt_Kuntz4" : Kuntz approximation to the Voigt profile, <br> accuracy > 2x10^(-4) <br> "Voigt_Kuntz6" : Kuntz approximation to the Voigt profile, <br> accuracy > 2x10^(-6) <br> "Voigt_Drayson" : Drayson approximation to the Voigt profile <br> "Rosenkranz_Voigt_Drayson" : Rosenkrantz oxygen absortion with overlap correction <br> on the basis of Drayson routine <br> "Rosenkranz_Voigt_Kuntz6" : Rosenkrantz oxygen absortion with overlap correction <br> on the basis of Kuntz routine, accuracy > 2x10^(-6) <br> "CO2_Lorentz" : Lorentz multiplicated with Cousin's chi factors <br> "CO2_Drayson" : Drayson multiplicated with Cousin's chi factors

normalizationfactor - "no_norm": 1 <br> "linear": f/f0 <br> "quadratic": (f/f0)^2. <br> "VVH": (f*tanh(h*f/(2*k*T))) / (f0*tanh(h*f0/(2*k*T))).

cutoff - " -1" : no cutoff <br> "Number": positive cutoff frequency in Hz.

Example usage: shape=["Lorentz"] normalizationfactor=["linear"] cutoff= [650e9] Keywords: <br> shape : The general profile according to an approximation. <br> normalizationfactor : The multiplicative forefactor for the general profile. <br> cutoff : The frequency at which a cutoff can be made.

Author:
Axel von Engeln

Stefan Buehler

Parameters:
[out] abs_lineshape WS Output
[in] shape Generic Input
[in] normalizationfactor Generic Input
[in] cutoff Generic Input

Definition at line 872 of file m_abs.cc.

References lineshape_data, lineshape_norm_data, Array< base >::nelem(), and out2.

Referenced by abs_lineshapeDefine_g().

void abs_linesReadFromArts ( ArrayOfLineRecord abs_lines,
const String filename,
const Numeric fmin,
const Numeric fmax 
)

WORKSPACE METHOD: abs_linesReadFromArts.

Read all the lines from an Arts catalogue file in the given frequency range. Otherwise a runtime error will be thrown

Please note that all lines must correspond to the legal species / isotope combinations

Keywords: <br> filename : Name (and path) of the catalogue file. <br> fmin : Minimum frequency for lines to read in Hz. <br> fmax : Maximum frequency for lines to read in Hz.

Author:
Stefan Buehler
Parameters:
[out] abs_lines WS Output
[in] filename Generic Input
[in] fmin Generic Input
[in] fmax Generic Input

Definition at line 254 of file m_abs.cc.

References Array< base >::nelem(), out2, and xml_read_arts_catalogue_from_file().

Referenced by abs_lines_per_speciesReadFromCatalogues(), and abs_linesReadFromArts_g().

void abs_linesReadFromArtsObsolete ( ArrayOfLineRecord abs_lines,
const String filename,
const Numeric fmin,
const Numeric fmax 
)

WORKSPACE METHOD: abs_linesReadFromArtsObsolete.

Read all the lines from an Arts catalogue file in the given frequency range. Otherwise a runtime error will be thrown

Please note that all lines must correspond to the legal species / isotope combinations

Keywords: <br> filename : Name (and path) of the catalogue file. <br> fmin : Minimum frequency for lines to read in Hz. <br> fmax : Maximum frequency for lines to read in Hz.

Author:
Stefan Buehler
Parameters:
[out] abs_lines WS Output
[in] filename Generic Input
[in] fmin Generic Input
[in] fmax Generic Input

Definition at line 268 of file m_abs.cc.

References LineRecord::F(), Array< base >::nelem(), open_input_file(), out2, LineRecord::ReadFromArtsStream(), and LineRecord::Version().

Referenced by abs_linesReadFromArtsObsolete_g().

void abs_linesReadFromHitran ( ArrayOfLineRecord abs_lines,
const String filename,
const Numeric fmin,
const Numeric fmax 
)

WORKSPACE METHOD: abs_linesReadFromHitran.

Read all the lines from a HITRAN 1986-2001 catalogue file in the given frequency range. Otherwise a runtime error will be thrown. For HITRAN 2004 line data use the workspace method abs_linesReadFromHitran.

Please note that all lines must correspond to the legal species / isotope combinations and that the line data file must be sorted by increasing frequency

WWW access of the HITRAN catalog: http://www.hitran.com/

Keywords: <br> filename : Name (and path) of the catalogue file. <br> fmin : Minimum frequency for lines to read in Hz. <br> fmax : Maximum frequency for lines to read in Hz.

Author:
Thomas Kuhn
Parameters:
[out] abs_lines WS Output
[in] filename Generic Input
[in] fmin Generic Input
[in] fmax Generic Input

Definition at line 92 of file m_abs.cc.

References LineRecord::F(), Array< base >::nelem(), open_input_file(), out2, and LineRecord::ReadFromHitranStream().

Referenced by abs_lines_per_speciesReadFromCatalogues(), and abs_linesReadFromHitran_g().

void abs_linesReadFromHitran2004 ( ArrayOfLineRecord abs_lines,
const String filename,
const Numeric fmin,
const Numeric fmax 
)

WORKSPACE METHOD: abs_linesReadFromHitran2004.

Read all the lines from a HITRAN 2004 catalogue file in the given frequency range. Otherwise a runtime error is thrown.

Records of molecules unknown to ARTS are ignored but a warning is issued. In particular this happens to CH3OH (HITRAN molecule number 39) because there is no total internal partition sum available.

The database must be sorted by increasing frequency!

WWW access of the HITRAN catalog: http://www.hitran.com/

For data in the Hitran 1986-2001 format use the workspace method: abs_linesReadFromHitran

Keywords: <br> filename : Name (and path) of the catalogue file. <br> fmin : Minimum frequency for lines to read in Hz. <br> fmax : Maximum frequency for lines to read in Hz.

Author:
Hermann Berg

Thomas Kuhn

Parameters:
[out] abs_lines WS Output
[in] filename Generic Input
[in] fmin Generic Input
[in] fmax Generic Input

Definition at line 133 of file m_abs.cc.

References LineRecord::F(), Array< base >::nelem(), open_input_file(), out2, and LineRecord::ReadFromHitran2004Stream().

Referenced by abs_lines_per_speciesReadFromCatalogues(), and abs_linesReadFromHitran2004_g().

void abs_linesReadFromJpl ( ArrayOfLineRecord abs_lines,
const String filename,
const Numeric fmin,
const Numeric fmax 
)

WORKSPACE METHOD: abs_linesReadFromJpl.

Read all the lines from a JPL catalogue file in the given frequency range. Otherwise a runtime error will be thrown

Please note that all lines must correspond to the legal species / isotope combinations.

WWW access of the JPL catalog: http://spec.jpl.nasa.gov/

Keywords: <br> filename : Name (and path) of the catalogue file. <br> fmin : Minimum frequency for lines to read in Hz. <br> fmax : Maximum frequency for lines to read in Hz.

Author:
Thomas Kuhn
Parameters:
[out] abs_lines WS Output
[in] filename Generic Input
[in] fmin Generic Input
[in] fmax Generic Input

Definition at line 212 of file m_abs.cc.

References LineRecord::F(), Array< base >::nelem(), open_input_file(), out2, and LineRecord::ReadFromJplStream().

Referenced by abs_lines_per_speciesReadFromCatalogues(), and abs_linesReadFromJpl_g().

void abs_linesReadFromMytran2 ( ArrayOfLineRecord abs_lines,
const String filename,
const Numeric fmin,
const Numeric fmax 
)

WORKSPACE METHOD: abs_linesReadFromMytran2.

Read all the lines from a MYTRAN2 catalogue file in the given frequency range. Otherwise a runtime error will be thrown

Please note that all lines must correspond to the legal species / isotope combinations

Keywords: <br> filename : Name (and path) of the catalogue file. <br> fmin : Minimum frequency for lines to read in Hz. <br> fmax : Maximum frequency for lines to read in Hz.

Author:
Axel von Engeln

Stefan Buehler

Parameters:
[out] abs_lines WS Output
[in] filename Generic Input
[in] fmin Generic Input
[in] fmax Generic Input

Definition at line 174 of file m_abs.cc.

References LineRecord::F(), Array< base >::nelem(), open_input_file(), out2, and LineRecord::ReadFromMytran2Stream().

Referenced by abs_lines_per_speciesReadFromCatalogues(), and abs_linesReadFromMytran2_g().

void abs_n2Set ( Vector abs_n2,
const ArrayOfArrayOfSpeciesTag abs_species,
const Matrix abs_vmrs 
)

WORKSPACE METHOD: abs_n2Set.

Sets abs_n2 to the profile of the first tag group containing molecular nitrogen. See *abs_h2oSet* for more details.

Author:
Patrick Eriksson
Parameters:
[out] abs_n2 WS Output
[in] abs_species WS Input
[in] abs_vmrs WS Input

Definition at line 1687 of file m_abs.cc.

References find_first_species_tg(), joker, ConstMatrixView::ncols(), Vector::resize(), and species_index_from_species_name().

Referenced by abs_n2Set_g().

void abs_scalar_gasCalcLBL ( Matrix abs_scalar_gas,
const Vector f_grid,
const ArrayOfArrayOfSpeciesTag abs_species,
const Vector abs_n2,
const ArrayOfArrayOfLineRecord abs_lines_per_species,
const ArrayOfLineshapeSpec abs_lineshape,
const ArrayOfString abs_cont_names,
const ArrayOfString abs_cont_models,
const ArrayOfVector abs_cont_parameters,
const Index f_index,
const Numeric rte_pressure,
const Numeric rte_temperature,
const Vector rte_vmr_list 
)

void abs_scalar_gasFromAbsCoef ( Matrix abs_scalar_gas,
const ArrayOfMatrix abs_coef_per_species 
)

WORKSPACE METHOD: abs_scalar_gasFromAbsCoef.

Copy *abs_scalar_gas* from *abs_coef*. This is handy for putting an explicit line-by-line calculation into the abs_scalar_gas_agenda*. See also method *AbsInputFromRteScalars*.

Author:
Stefan Buehler
Parameters:
[out] abs_scalar_gas WS Output
[in] abs_coef_per_species WS Input

Definition at line 2675 of file m_abs.cc.

References joker, Array< base >::nelem(), and Matrix::resize().

Referenced by abs_scalar_gasCalcLBL(), and abs_scalar_gasFromAbsCoef_g().

void abs_speciesDefineAllInScenario ( ArrayOfArrayOfSpeciesTag abs_species,
const String basename 
)

WORKSPACE METHOD: abs_speciesDefineAllInScenario.

Define one tag group for each species known to ARTS and included in an atmospheric scenario.

You can use this as an alternative to tgsDefine if you want to make an absorption calculation that is as complete as possible. The method goes through all defined species and tries to open the VMR file. If this works the tag is included, otherwise it is skipped.

Keywords: <br> basename : The name and path of a particular atmospheric scenario. <br> For example: /pool/lookup2/arts-data/atmosphere/fascod/tropical

Author:
Stefan Buehler
Parameters:
[out] abs_species WS Output
[in] basename Generic Input

Definition at line 813 of file m_abs.cc.

References Array< base >::nelem(), open_input_file(), out2, and species_data.

Referenced by abs_speciesDefineAllInScenario_g().

void abs_xsec_per_speciesAddConts ( ArrayOfMatrix abs_xsec_per_species,
const ArrayOfArrayOfSpeciesTag tgs,
const Vector f_grid,
const Vector abs_p,
const Vector abs_t,
const Vector abs_n2,
const Vector abs_h2o,
const Matrix abs_vmrs,
const ArrayOfString abs_cont_names,
const ArrayOfVector abs_cont_parameters,
const ArrayOfString abs_cont_models 
)

void abs_xsec_per_speciesAddLines ( ArrayOfMatrix abs_xsec_per_species,
const ArrayOfArrayOfSpeciesTag abs_species,
const Vector f_grid,
const Vector abs_p,
const Vector abs_t,
const Vector abs_h2o,
const Matrix abs_vmrs,
const ArrayOfArrayOfLineRecord abs_lines_per_species,
const ArrayOfLineshapeSpec abs_lineshape 
)

WORKSPACE METHOD: abs_xsec_per_speciesAddLines.

Calculates the line spectrum for each tag group and adds it to abs_xsec_per_species.

Author:
Stefan Buehler

Axel von Engeln

Parameters:
[out] abs_xsec_per_species WS Output
[in] abs_species WS Input
[in] f_grid WS Input
[in] abs_p WS Input
[in] abs_t WS Input
[in] abs_h2o WS Input
[in] abs_vmrs WS Input
[in] abs_lines_per_species WS Input
[in] abs_lineshape WS Input

Definition at line 1999 of file m_abs.cc.

References LineshapeSpec::Cutoff(), get_tag_group_name(), LineshapeSpec::Ind_ls(), LineshapeSpec::Ind_lsn(), joker, lineshape_data, ll, Array< base >::nelem(), ConstMatrixView::nrows(), out3, and xsec_species().

Referenced by abs_coefCalc(), abs_coefCalcSaveMemory(), abs_lookupCreate(), and abs_xsec_per_speciesAddLines_g().

void abs_xsec_per_speciesInit ( ArrayOfMatrix abs_xsec_per_species,
const ArrayOfArrayOfSpeciesTag abs_species,
const Vector f_grid,
const Vector abs_p 
)

WORKSPACE METHOD: abs_xsec_per_speciesInit.

Initialize *abs_xsec_per_species*.

The initialization is necessary, because methods *abs_xsec_per_speciesAddLines* and *abs_xsec_per_speciesAddConts* just add to *abs_xsec_per_species*. The size is determined from *tgs*.

Author:
Stefan Buehler
Parameters:
[out] abs_xsec_per_species WS Output
[in] abs_species WS Input
[in] f_grid WS Input
[in] abs_p WS Input

Definition at line 1971 of file m_abs.cc.

References ConstVectorView::nelem(), Array< base >::nelem(), and out3.

Referenced by abs_coefCalc(), abs_coefCalcSaveMemory(), abs_lookupCreate(), and abs_xsec_per_speciesInit_g().

void AbsInputFromAtmFields ( Vector abs_p,
Vector abs_t,
Matrix abs_vmrs,
const Index atmosphere_dim,
const Vector p_grid,
const Tensor3 t_field,
const Tensor4 vmr_field 
)

WORKSPACE METHOD: AbsInputFromAtmFields.

Initialize the WSVs *abs_p*, *abs_t* and *abs_vmrs* from p_grid, *t_field* and *vmr_field*.

This only works for a 1D atmosphere!

Author:
Stefan Buehler
Parameters:
[out] abs_p WS Output
[out] abs_t WS Output
[out] abs_vmrs WS Output
[in] atmosphere_dim WS Input
[in] p_grid WS Input
[in] t_field WS Input
[in] vmr_field WS Input

Definition at line 1704 of file m_abs.cc.

References joker.

Referenced by AbsInputFromAtmFields_g().

void AbsInputFromRteScalars ( Vector abs_p,
Vector abs_t,
Matrix abs_vmrs,
const Numeric rte_pressure,
const Numeric rte_temperature,
const Vector rte_vmr_list 
)

WORKSPACE METHOD: AbsInputFromRteScalars.

Initialize absorption input WSVs from local atmospheric conditions.

The purpose of this method is to allow an explicit line-by-line calculation, e.g., by *abs_coefCalc*, to be put inside the abs_scalar_gas_agenda*. What the method does is to prepare absorption input parameters (pressure, temperature, VMRs, frequency grid), from the input parameters to *abs_scalar_gas_agenda*. There is a matching method to turn the output of *abs_coefCalc* into what the agenda expects (*abs_scalar_gasFromAbsCoef*).

Note that the original *f_grid* is distroyed. (This is not a problem if the method is used inside an agenda.)

Author:
Stefan Buehler
Parameters:
[out] abs_p WS Output
[out] abs_t WS Output
[out] abs_vmrs WS Output
[in] rte_pressure WS Input
[in] rte_temperature WS Input
[in] rte_vmr_list WS Input

Definition at line 52 of file m_abs.cc.

References ConstVectorView::nelem(), Matrix::resize(), and Vector::resize().

Referenced by abs_scalar_gasCalcLBL(), and AbsInputFromRteScalars_g().

void f_gridSelectFIndex ( Vector f_grid,
const Index f_index 
)

WORKSPACE METHOD: f_gridSelectFIndex.

Reduce f_grid to the frequency given by f_index.

This is one of the methods necessary to do line by line absorption calculations inside *abs_scalar_gas_agenda*.

It reduces the f_grid to only one frequency, the one given by f_index. If f_index is -1, then all frequencies are kept. This behavior is consistent with *abs_scalar_gasExtractFromLookup*.

Author:
Stefan Buehler
Parameters:
[out] f_grid WS Output
[in] f_index WS Input

Definition at line 2795 of file m_abs.cc.

References ConstVectorView::nelem(), and Vector::resize().

Referenced by abs_scalar_gasCalcLBL(), and f_gridSelectFIndex_g().

void linesElowToJoule ( ArrayOfLineRecord abs_lines  ) 

Definition at line 338 of file m_abs.cc.

References Array< base >::nelem(), and wavenumber_to_joule().


Generated on Mon Mar 23 14:06:38 2009 for ARTS by  doxygen 1.5.6