ARTS  2.4.0(git:4fb77825)
m_abs.cc File Reference

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

#include <algorithm>
#include <cmath>
#include "absorption.h"
#include "array.h"
#include "arts.h"
#include "auto_md.h"
#include "check_input.h"
#include "legacy_continua.h"
#include "file.h"
#include "global_data.h"
#include "jacobian.h"
#include "m_xml.h"
#include "math_funcs.h"
#include "matpackI.h"
#include "messages.h"
#include "montecarlo.h"
#include "optproperties.h"
#include "parameters.h"
#include "physics_funcs.h"
#include "rte.h"
#include "xml_io.h"
#include <netcdf.h>
#include "nc_io.h"

Go to the source code of this file.

Functions

void AbsInputFromRteScalars (Vector &abs_p, Vector &abs_t, Matrix &abs_vmrs, const Numeric &rtp_pressure, const Numeric &rtp_temperature, const Vector &rtp_vmr, const Verbosity &)
 WORKSPACE METHOD: AbsInputFromRteScalars. More...
 
void abs_lines_per_speciesCreateFromLines (ArrayOfArrayOfAbsorptionLines &abs_lines_per_species, const ArrayOfAbsorptionLines &abs_lines, const ArrayOfArrayOfSpeciesTag &tgs, const Verbosity &)
 WORKSPACE METHOD: abs_lines_per_speciesCreateFromLines. More...
 
void abs_speciesDefineAllInScenario (ArrayOfArrayOfSpeciesTag &tgs, Index &propmat_clearsky_agenda_checked, Index &abs_xsec_agenda_checked, const String &basename, const Verbosity &verbosity)
 WORKSPACE METHOD: abs_speciesDefineAllInScenario. More...
 
void abs_speciesDefineAll (ArrayOfArrayOfSpeciesTag &abs_species, Index &propmat_clearsky_agenda_checked, Index &abs_xsec_agenda_checked, const Verbosity &verbosity)
 WORKSPACE METHOD: abs_speciesDefineAll. More...
 
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, const Verbosity &)
 WORKSPACE METHOD: AbsInputFromAtmFields. More...
 
void abs_coefCalcFromXsec (Matrix &abs_coef, Matrix &src_coef, ArrayOfMatrix &dabs_coef_dx, ArrayOfMatrix &dsrc_coef_dx, ArrayOfMatrix &abs_coef_per_species, ArrayOfMatrix &src_coef_per_species, const ArrayOfMatrix &abs_xsec_per_species, const ArrayOfMatrix &src_xsec_per_species, const ArrayOfArrayOfMatrix &dabs_xsec_per_species_dx, const ArrayOfArrayOfMatrix &dsrc_xsec_per_species_dx, const ArrayOfArrayOfSpeciesTag &abs_species, const ArrayOfRetrievalQuantity &jacobian_quantities, const Matrix &abs_vmrs, const Vector &abs_p, const Vector &abs_t, const Verbosity &verbosity)
 WORKSPACE METHOD: abs_coefCalcFromXsec. More...
 
void abs_xsec_per_speciesInit (ArrayOfMatrix &abs_xsec_per_species, ArrayOfMatrix &src_xsec_per_species, ArrayOfArrayOfMatrix &dabs_xsec_per_species_dx, ArrayOfArrayOfMatrix &dsrc_xsec_per_species_dx, const ArrayOfArrayOfSpeciesTag &tgs, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfIndex &abs_species_active, const Vector &f_grid, const Vector &abs_p, const Index &abs_xsec_agenda_checked, const Index &nlte_do, const Verbosity &verbosity)
 WORKSPACE METHOD: abs_xsec_per_speciesInit. More...
 
void abs_xsec_per_speciesAddConts (ArrayOfMatrix &abs_xsec_per_species, ArrayOfArrayOfMatrix &dabs_xsec_per_species_dx, const ArrayOfArrayOfSpeciesTag &tgs, 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 ArrayOfString &abs_cont_names, const ArrayOfVector &abs_cont_parameters, const ArrayOfString &abs_cont_models, const Verbosity &verbosity)
 WORKSPACE METHOD: abs_xsec_per_speciesAddConts. More...
 
void abs_cont_descriptionInit (ArrayOfString &abs_cont_names, ArrayOfString &abs_cont_options, ArrayOfVector &abs_cont_parameters, const Verbosity &verbosity)
 WORKSPACE METHOD: abs_cont_descriptionInit. More...
 
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, const Verbosity &)
 WORKSPACE METHOD: abs_cont_descriptionAppend. More...
 
void nlte_sourceFromTemperatureAndSrcCoefPerSpecies (ArrayOfStokesVector &nlte_source, ArrayOfStokesVector &dnlte_dx_source, ArrayOfStokesVector &nlte_dsource_dx, const ArrayOfMatrix &src_coef_per_species, const ArrayOfMatrix &dsrc_coef_dx, const ArrayOfRetrievalQuantity &jacobian_quantities, const Vector &f_grid, const Numeric &rtp_temperature, const Verbosity &)
 WORKSPACE METHOD: nlte_sourceFromTemperatureAndSrcCoefPerSpecies. More...
 
void propmat_clearskyAddFromAbsCoefPerSpecies (ArrayOfPropagationMatrix &propmat_clearsky, ArrayOfPropagationMatrix &dpropmat_clearsky_dx, const ArrayOfMatrix &abs_coef_per_species, const ArrayOfMatrix &dabs_coef_dx, const Verbosity &)
 WORKSPACE METHOD: propmat_clearskyAddFromAbsCoefPerSpecies. More...
 
void propmat_clearskyInit (ArrayOfPropagationMatrix &propmat_clearsky, ArrayOfStokesVector &nlte_source, ArrayOfPropagationMatrix &dpropmat_clearsky_dx, ArrayOfStokesVector &dnlte_dx_source, ArrayOfStokesVector &nlte_dsource_dx, const ArrayOfArrayOfSpeciesTag &abs_species, const ArrayOfRetrievalQuantity &jacobian_quantities, const Vector &f_grid, const Index &stokes_dim, const Index &propmat_clearsky_agenda_checked, const Index &nlte_do, const Verbosity &)
 WORKSPACE METHOD: propmat_clearskyInit. More...
 
void propmat_clearskyAddFaraday (ArrayOfPropagationMatrix &propmat_clearsky, ArrayOfPropagationMatrix &dpropmat_clearsky_dx, const Index &stokes_dim, const Index &atmosphere_dim, const Vector &f_grid, const ArrayOfArrayOfSpeciesTag &abs_species, const ArrayOfRetrievalQuantity &jacobian_quantities, const Vector &rtp_vmr, const Vector &rtp_los, const Vector &rtp_mag, const Verbosity &)
 WORKSPACE METHOD: propmat_clearskyAddFaraday. More...
 
void propmat_clearskyAddParticles (ArrayOfPropagationMatrix &propmat_clearsky, ArrayOfPropagationMatrix &dpropmat_clearsky_dx, const Index &stokes_dim, const Index &atmosphere_dim, const Vector &f_grid, const ArrayOfArrayOfSpeciesTag &abs_species, const ArrayOfRetrievalQuantity &jacobian_quantities, const Vector &rtp_vmr, const Vector &rtp_los, const Numeric &rtp_temperature, const ArrayOfArrayOfSingleScatteringData &scat_data, const Index &scat_data_checked, const Index &use_abs_as_ext, const Verbosity &verbosity)
 WORKSPACE METHOD: propmat_clearskyAddParticles. More...
 
void propmat_clearskyAddOnTheFly (Workspace &ws, ArrayOfPropagationMatrix &propmat_clearsky, ArrayOfStokesVector &nlte_source, ArrayOfPropagationMatrix &dpropmat_clearsky_dx, ArrayOfStokesVector &dnlte_dx_source, ArrayOfStokesVector &nlte_dsource_dx, const Vector &f_grid, const ArrayOfArrayOfSpeciesTag &abs_species, const ArrayOfRetrievalQuantity &jacobian_quantities, const Numeric &rtp_pressure, const Numeric &rtp_temperature, const EnergyLevelMap &rtp_nlte, const Vector &rtp_vmr, const Agenda &abs_xsec_agenda, const Verbosity &verbosity)
 WORKSPACE METHOD: propmat_clearskyAddOnTheFly. More...
 
void propmat_clearskyZero (ArrayOfPropagationMatrix &propmat_clearsky, const Vector &f_grid, const Index &stokes_dim, const Verbosity &)
 WORKSPACE METHOD: propmat_clearskyZero. More...
 
void propmat_clearskyForceNegativeToZero (ArrayOfPropagationMatrix &propmat_clearsky, const Verbosity &)
 WORKSPACE METHOD: propmat_clearskyForceNegativeToZero. More...
 
void isotopologue_ratiosInitFromBuiltin (SpeciesAuxData &isotopologue_ratios, const Verbosity &)
 WORKSPACE METHOD: isotopologue_ratiosInitFromBuiltin. More...
 
void partition_functionsInitFromBuiltin (SpeciesAuxData &partition_functions, const Verbosity &)
 WORKSPACE METHOD: partition_functionsInitFromBuiltin. More...
 
void WriteMolTau (const Vector &f_grid, const Tensor3 &z_field, const Tensor7 &propmat_clearsky_field, const Index &atmosphere_dim, const String &filename, const Verbosity &)
 WORKSPACE METHOD: WriteMolTau. More...
 
void abs_xsec_per_speciesAddLines (ArrayOfMatrix &abs_xsec_per_species, ArrayOfMatrix &src_xsec_per_species, ArrayOfArrayOfMatrix &dabs_xsec_per_species_dx, ArrayOfArrayOfMatrix &dsrc_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 EnergyLevelMap &abs_nlte, const Matrix &abs_vmrs, const ArrayOfArrayOfAbsorptionLines &abs_lines_per_species, const SpeciesAuxData &isotopologue_ratios, const SpeciesAuxData &partition_functions, const Index &lbl_checked, const Verbosity &)
 WORKSPACE METHOD: abs_xsec_per_speciesAddLines. More...
 

Variables

const Numeric ELECTRON_CHARGE
 
const Numeric ELECTRON_MASS
 
const Numeric PI
 
const Numeric SPEED_OF_LIGHT
 
const Numeric VACUUM_PERMITTIVITY
 

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

◆ abs_coefCalcFromXsec()

void abs_coefCalcFromXsec ( Matrix abs_coef,
Matrix src_coef,
ArrayOfMatrix dabs_coef_dx,
ArrayOfMatrix dsrc_coef_dx,
ArrayOfMatrix abs_coef_per_species,
ArrayOfMatrix src_coef_per_species,
const ArrayOfMatrix abs_xsec_per_species,
const ArrayOfMatrix src_xsec_per_species,
const ArrayOfArrayOfMatrix dabs_xsec_per_species_dx,
const ArrayOfArrayOfMatrix dsrc_xsec_per_species_dx,
const ArrayOfArrayOfSpeciesTag abs_species,
const ArrayOfRetrievalQuantity jacobian_quantities,
const Matrix abs_vmrs,
const Vector abs_p,
const Vector abs_t,
const Verbosity verbosity 
)

WORKSPACE METHOD: abs_coefCalcFromXsec.

Calculate absorption coefficients from cross sections.

This calculates both the total absorption and the absorption per species.

Cross sections are multiplied by n*VMR.

Author
Stefan Buehler
Axel von Engeln
Parameters
[out]abs_coefWS Output
[out]src_coefWS Output
[out]dabs_coef_dxWS Output
[out]dsrc_coef_dxWS Output
[out]abs_coef_per_speciesWS Output
[out]src_coef_per_speciesWS Output
[in]abs_xsec_per_speciesWS Input
[in]src_xsec_per_speciesWS Input
[in]dabs_xsec_per_species_dxWS Input
[in]dsrc_xsec_per_species_dxWS Input
[in]abs_speciesWS Input
[in]jacobian_quantitiesWS Input
[in]abs_vmrsWS Input
[in]abs_pWS Input
[in]abs_tWS Input

Definition at line 258 of file m_abs.cc.

References ARTS::Var::abs_coef(), ARTS::Var::abs_coef_per_species(), ARTS::Var::abs_p(), ARTS::Var::abs_t(), ARTS::Var::abs_vmrs(), ARTS::Var::abs_xsec_per_species(), chk_size(), CREATE_OUT3, ARTS::Var::dabs_coef_dx(), dnumber_density_dt(), ARTS::Var::dsrc_coef_dx(), equivalent_propmattype_indexes(), ARTS::Var::jacobian_quantities(), ARTS::Var::ncols(), Array< base >::nelem(), ARTS::Var::nrows(), number_density(), ARTS::Var::src_coef(), ARTS::Var::src_coef_per_species(), ARTS::Var::src_xsec_per_species(), and VMR.

Referenced by abs_coefCalcFromXsec_g(), and propmat_clearskyAddOnTheFly().

◆ abs_cont_descriptionAppend()

void abs_cont_descriptionAppend ( ArrayOfString abs_cont_names,
ArrayOfString abs_cont_models,
ArrayOfVector abs_cont_parameters,
const String tagname,
const String model,
const Vector userparam,
const Verbosity verbosity 
)

WORKSPACE METHOD: abs_cont_descriptionAppend.

Appends the description of a continuum model or a complete absorption model to abs_cont_names and abs_cont_parameters.

See online documentation for abs_cont_names for a list of allowed models and for information what parameters they require. See file includes/continua.arts for default parameters for the various models.

Author
Thomas Kuhn
Stefan Buehler
Parameters
[in,out]abs_cont_namesWS Input/Output
[in,out]abs_cont_modelsWS Input/Output
[in,out]abs_cont_parametersWS Input/Output
[in]tagnameGeneric Input
[in]modelGeneric Input
[in]userparamGeneric Input (Default: "[]")

Definition at line 839 of file m_abs.cc.

References ARTS::Var::abs_cont_models(), ARTS::Var::abs_cont_names(), ARTS::Var::abs_cont_parameters(), and check_continuum_model().

Referenced by abs_cont_descriptionAppend_g().

◆ abs_cont_descriptionInit()

void abs_cont_descriptionInit ( ArrayOfString abs_cont_names,
ArrayOfString abs_cont_models,
ArrayOfVector abs_cont_parameters,
const Verbosity verbosity 
)

WORKSPACE METHOD: abs_cont_descriptionInit.

Initializes the two workspace variables for the continuum description, abs_cont_names* and abs_cont_parameters.

This method does not really do anything, except setting the two variables to empty Arrays. It is just necessary because the method abs_cont_descriptionAppend* wants to append to the variables.

Formally, the continuum description workspace variables are required by the absorption calculation methods (e.g., abs_coefCalcFromXsec). Therefore you always have to call at least abs_cont_descriptionInit, even if you do not want to use any continua.

Author
Thomas Kuhn
Stefan Buehler
Parameters
[out]abs_cont_namesWS Output
[out]abs_cont_modelsWS Output
[out]abs_cont_parametersWS Output

Definition at line 823 of file m_abs.cc.

References ARTS::Var::abs_cont_names(), ARTS::Var::abs_cont_parameters(), and CREATE_OUT2.

Referenced by abs_cont_descriptionInit_g().

◆ abs_lines_per_speciesCreateFromLines()

void abs_lines_per_speciesCreateFromLines ( ArrayOfArrayOfAbsorptionLines abs_lines_per_species,
const ArrayOfAbsorptionLines abs_lines,
const ArrayOfArrayOfSpeciesTag abs_species,
const Verbosity verbosity 
)

WORKSPACE METHOD: abs_lines_per_speciesCreateFromLines.

Split lines up into the different species.

The order of the splitting will match the outer layer of abs_species There will be no respect for the internal layer of abs_species

Author
Stefan Buehler
Parameters
[out]abs_lines_per_speciesWS Output
[in]abs_linesWS Input
[in]abs_speciesWS Input

Definition at line 90 of file m_abs.cc.

References ARTS::Var::abs_lines(), ARTS::Var::abs_lines_per_species(), Absorption::createEmptyCopy(), Isotopologue, max, Array< base >::nelem(), Absorption::nelem(), and SpeciesDataOfBand().

Referenced by abs_lines_per_speciesCreateFromLines_g(), and abs_linesWriteSpeciesSplitXML().

◆ abs_speciesDefineAll()

void abs_speciesDefineAll ( ArrayOfArrayOfSpeciesTag abs_species,
Index propmat_clearsky_agenda_checked,
Index abs_xsec_agenda_checked,
const Verbosity verbosity 
)

WORKSPACE METHOD: abs_speciesDefineAll.

Sets abs_species[i][0] to all species in ARTS

Author
Richard Larsson
Parameters
[out]abs_speciesWS Output
[out]propmat_clearsky_agenda_checkedWS Output
[out]abs_xsec_agenda_checkedWS Output

Definition at line 214 of file m_abs.cc.

References ARTS::Var::abs_species(), abs_speciesSet(), ARTS::Var::abs_xsec_agenda_checked(), ARTS::Var::propmat_clearsky_agenda_checked(), global_data::species_data, and ARTS::Var::verbosity().

Referenced by abs_speciesDefineAll_g().

◆ abs_speciesDefineAllInScenario()

void abs_speciesDefineAllInScenario ( ArrayOfArrayOfSpeciesTag abs_species,
Index propmat_clearsky_agenda_checked,
Index abs_xsec_agenda_checked,
const String basename,
const Verbosity verbosity 
)

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 abs_speciesSet 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.

Author
Stefan Buehler
Parameters
[out]abs_speciesWS Output
[out]propmat_clearsky_agenda_checkedWS Output
[out]abs_xsec_agenda_checkedWS Output
[in]basenameGeneric Input

Definition at line 153 of file m_abs.cc.

References ARTS::Var::abs_xsec_agenda_checked(), CREATE_OUT2, find_xml_file(), ARTS::Var::propmat_clearsky_agenda_checked(), global_data::species_data, and ARTS::Var::verbosity().

Referenced by abs_speciesDefineAllInScenario_g().

◆ abs_xsec_per_speciesAddConts()

void abs_xsec_per_speciesAddConts ( 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 ArrayOfString abs_cont_names,
const ArrayOfVector abs_cont_parameters,
const ArrayOfString abs_cont_models,
const Verbosity verbosity 
)

WORKSPACE METHOD: abs_xsec_per_speciesAddConts.

Calculate absorption cross sections per tag group for continua.

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_cont_namesWS Input
[in]abs_cont_parametersWS Input
[in]abs_cont_modelsWS Input

Definition at line 531 of file m_abs.cc.

References ARTS::Var::abs_cont_models(), ARTS::Var::abs_cont_names(), ARTS::Var::abs_cont_parameters(), ARTS::Var::abs_p(), ARTS::Var::abs_species_active(), ARTS::Var::abs_t(), ARTS::Var::abs_vmrs(), ARTS::Var::abs_xsec_per_species(), CREATE_OUT3, ARTS::Var::dabs_xsec_per_species_dx(), do_frequency_jacobian(), do_temperature_jacobian(), equivalent_propmattype_indexes(), ARTS::Var::f_grid(), frequency_perturbation(), is_frequency_parameter(), ARTS::Var::jacobian_quantities(), joker, Array< base >::nelem(), Vector::resize(), Matrix::resize(), set_vmr_from_first_species(), global_data::species_data, supports_continuum(), temperature_perturbation(), SpeciesTag::TYPE_PREDEF, ARTS::Var::verbosity(), and xsec_continuum_tag().

Referenced by ARTS::Agenda::abs_xsec_agenda_standard(), ARTS::Agenda::abs_xsec_agenda_standard_with_cia(), and abs_xsec_per_speciesAddConts_g().

◆ abs_xsec_per_speciesAddLines()

void abs_xsec_per_speciesAddLines ( ArrayOfMatrix abs_xsec_per_species,
ArrayOfMatrix src_xsec_per_species,
ArrayOfArrayOfMatrix dabs_xsec_per_species_dx,
ArrayOfArrayOfMatrix dsrc_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 EnergyLevelMap abs_nlte,
const Matrix abs_vmrs,
const ArrayOfArrayOfAbsorptionLines abs_lines_per_species,
const SpeciesAuxData isotopologue_ratios,
const SpeciesAuxData partition_functions,
const Index lbl_checked,
const Verbosity verbosity 
)

WORKSPACE METHOD: abs_xsec_per_speciesAddLines.

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

Author
Richard Larsson
Parameters
[in,out]abs_xsec_per_speciesWS Input/Output
[in,out]src_xsec_per_speciesWS Input/Output
[in,out]dabs_xsec_per_species_dxWS Input/Output
[in,out]dsrc_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_nlteWS Input
[in]abs_vmrsWS Input
[in]abs_lines_per_speciesWS Input
[in]isotopologue_ratiosWS Input
[in]partition_functionsWS Input
[in]lbl_checkedWS Input

Definition at line 1809 of file m_abs.cc.

References ARTS::Var::abs_lines_per_species(), ARTS::Var::abs_nlte(), ARTS::Var::abs_p(), ARTS::Var::abs_species(), ARTS::Var::abs_species_active(), ARTS::Var::abs_t(), ARTS::Var::abs_vmrs(), ARTS::Var::abs_xsec_per_species(), ARTS::Var::dabs_xsec_per_species_dx(), ARTS::Var::dsrc_xsec_per_species_dx(), equivalent_propmattype_indexes(), ARTS::Var::f_grid(), is_zeeman(), ARTS::Var::isotopologue_ratios(), ARTS::Var::jacobian_quantities(), ARTS::Var::lbl_checked(), min, Absorption::nelem(), ARTS::Var::partition_functions(), ARTS::Var::src_xsec_per_species(), supports_propmat_clearsky(), and xsec_species().

Referenced by ARTS::Agenda::abs_xsec_agenda_standard(), ARTS::Agenda::abs_xsec_agenda_standard_with_cia(), and abs_xsec_per_speciesAddLines_g().

◆ abs_xsec_per_speciesInit()

void abs_xsec_per_speciesInit ( ArrayOfMatrix abs_xsec_per_species,
ArrayOfMatrix src_xsec_per_species,
ArrayOfArrayOfMatrix dabs_xsec_per_species_dx,
ArrayOfArrayOfMatrix dsrc_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 Index abs_xsec_agenda_checked,
const Index nlte_do,
const Verbosity verbosity 
)

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 abs_species.

Author
Stefan Buehler
Parameters
[out]abs_xsec_per_speciesWS Output
[out]src_xsec_per_speciesWS Output
[out]dabs_xsec_per_species_dxWS Output
[out]dsrc_xsec_per_species_dxWS Output
[in]abs_speciesWS Input
[in]jacobian_quantitiesWS Input
[in]abs_species_activeWS Input
[in]f_gridWS Input
[in]abs_pWS Input
[in]abs_xsec_agenda_checkedWS Input
[in]nlte_doWS Input

Definition at line 443 of file m_abs.cc.

References ARTS::Var::abs_p(), ARTS::Var::abs_species_active(), ARTS::Var::abs_xsec_agenda_checked(), ARTS::Var::abs_xsec_per_species(), CREATE_OUT3, ARTS::Var::dabs_xsec_per_species_dx(), ARTS::Var::dsrc_xsec_per_species_dx(), equivalent_propmattype_indexes(), ARTS::Var::f_grid(), ARTS::Var::jacobian_quantities(), Array< base >::nelem(), ARTS::Var::nlte_do(), ARTS::Var::src_xsec_per_species(), and supports_propmat_clearsky().

Referenced by ARTS::Agenda::abs_xsec_agenda_standard(), ARTS::Agenda::abs_xsec_agenda_standard_with_cia(), and abs_xsec_per_speciesInit_g().

◆ AbsInputFromAtmFields()

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,
const Verbosity verbosity 
)

WORKSPACE METHOD: AbsInputFromAtmFields.

Initialises 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_pWS Output
[out]abs_tWS Output
[out]abs_vmrsWS Output
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]t_fieldWS Input
[in]vmr_fieldWS Input

Definition at line 234 of file m_abs.cc.

References ARTS::Var::abs_p(), ARTS::Var::abs_t(), ARTS::Var::abs_vmrs(), ARTS::Var::atmosphere_dim(), joker, ARTS::Var::p_grid(), ARTS::Var::t_field(), and ARTS::Var::vmr_field().

Referenced by AbsInputFromAtmFields_g().

◆ AbsInputFromRteScalars()

void AbsInputFromRteScalars ( Vector abs_p,
Vector abs_t,
Matrix abs_vmrs,
const Numeric rtp_pressure,
const Numeric rtp_temperature,
const Vector rtp_vmr,
const Verbosity verbosity 
)

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_coefCalcFromXsec, to be put inside the propmat_clearsky_agenda*. What the method does is to prepare absorption input parameters (pressure, temperature, VMRs), from the input parameters to propmat_clearsky_agenda.

Author
Stefan Buehler
Parameters
[out]abs_pWS Output
[out]abs_tWS Output
[out]abs_vmrsWS Output
[in]rtp_pressureWS Input
[in]rtp_temperatureWS Input
[in]rtp_vmrWS Input

Definition at line 67 of file m_abs.cc.

References ARTS::Var::abs_p(), ARTS::Var::abs_t(), ARTS::Var::abs_vmrs(), ARTS::Var::rtp_pressure(), ARTS::Var::rtp_temperature(), and ARTS::Var::rtp_vmr().

Referenced by AbsInputFromRteScalars_g(), and propmat_clearskyAddOnTheFly().

◆ isotopologue_ratiosInitFromBuiltin()

void isotopologue_ratiosInitFromBuiltin ( SpeciesAuxData isotopologue_ratios,
const Verbosity verbosity 
)

WORKSPACE METHOD: isotopologue_ratiosInitFromBuiltin.

Initialize isotopologue ratios with default values from built-in species data.

Author
Oliver Lemke
Parameters
[out]isotopologue_ratiosWS Output

Definition at line 1625 of file m_abs.cc.

References fillSpeciesAuxDataWithIsotopologueRatiosFromSpeciesData(), and ARTS::Var::isotopologue_ratios().

Referenced by isotopologue_ratiosInitFromBuiltin_g().

◆ nlte_sourceFromTemperatureAndSrcCoefPerSpecies()

void nlte_sourceFromTemperatureAndSrcCoefPerSpecies ( ArrayOfStokesVector nlte_source,
ArrayOfStokesVector dnlte_dx_source,
ArrayOfStokesVector nlte_dsource_dx,
const ArrayOfMatrix src_coef_per_species,
const ArrayOfMatrix dsrc_coef_dx,
const ArrayOfRetrievalQuantity jacobian_quantities,
const Vector f_grid,
const Numeric rtp_temperature,
const Verbosity verbosity 
)

WORKSPACE METHOD: nlte_sourceFromTemperatureAndSrcCoefPerSpecies.

Turn NLTE absorption per species into the source function by multiplying NLTE absorption per species with the LTE Planck source function.

Author
Richard Larsson
Parameters
[out]nlte_sourceWS Output
[out]dnlte_dx_sourceWS Output
[out]nlte_dsource_dxWS Output
[in]src_coef_per_speciesWS Input
[in]dsrc_coef_dxWS Input
[in]jacobian_quantitiesWS Input
[in]f_gridWS Input
[in]rtp_temperatureWS Input

Definition at line 862 of file m_abs.cc.

References ARTS::Var::dnlte_dx_source(), dplanck_df(), dplanck_dt(), ARTS::Var::dsrc_coef_dx(), equivalent_propmattype_indexes(), ARTS::Var::f_grid(), is_frequency_parameter(), ARTS::Var::jacobian_quantities(), joker, PropagationMatrix::Kjj(), ARTS::Var::ncols(), Array< base >::nelem(), ARTS::Var::nlte_dsource_dx(), ARTS::Var::nlte_source(), planck(), ARTS::Var::rtp_temperature(), ARTS::Var::src_coef_per_species(), and VMR.

Referenced by nlte_sourceFromTemperatureAndSrcCoefPerSpecies_g(), and propmat_clearskyAddOnTheFly().

◆ partition_functionsInitFromBuiltin()

void partition_functionsInitFromBuiltin ( SpeciesAuxData partition_functions,
const Verbosity verbosity 
)

WORKSPACE METHOD: partition_functionsInitFromBuiltin.

Initialize partition functions with default values from built-in species data.

Author
Oliver Lemke
Parameters
[out]partition_functionsWS Output

Definition at line 1631 of file m_abs.cc.

References fillSpeciesAuxDataWithPartitionFunctionsFromSpeciesData(), and ARTS::Var::partition_functions().

Referenced by partition_functionsInitFromBuiltin_g(), and test_hitran2017().

◆ propmat_clearskyAddFaraday()

void propmat_clearskyAddFaraday ( ArrayOfPropagationMatrix propmat_clearsky,
ArrayOfPropagationMatrix dpropmat_clearsky_dx,
const Index stokes_dim,
const Index atmosphere_dim,
const Vector f_grid,
const ArrayOfArrayOfSpeciesTag abs_species,
const ArrayOfRetrievalQuantity jacobian_quantities,
const Vector rtp_vmr,
const Vector rtp_los,
const Vector rtp_mag,
const Verbosity verbosity 
)

WORKSPACE METHOD: propmat_clearskyAddFaraday.

Calculates absorption matrix describing Faraday rotation.

Faraday rotation is a change of polarization state of an electromagnetic wave propagating through charged matter by interaction with a magnetic field. Hence, this method requires abs_species* to contain 'free_electrons' and electron content field (as part of vmr_field) as well as magnetic field (mag_u_field, mag_v_field*, mag_w_field) to be specified.

Faraday rotation affects Stokes parameters 2 and 3 (but not intensity!). Therefore, this method requires stokes_dim>2.

Like all 'propmat_clearskyAdd*' methods, the method is additive, i.e., does not overwrite the propagation matrix propmat_clearsky, but adds further contributions.

Author
Patrick Eriksson
Parameters
[in,out]propmat_clearskyWS Input/Output
[in,out]dpropmat_clearsky_dxWS Input/Output
[in]stokes_dimWS Input
[in]atmosphere_dimWS Input
[in]f_gridWS Input
[in]abs_speciesWS Input
[in]jacobian_quantitiesWS Input
[in]rtp_vmrWS Input
[in]rtp_losWS Input
[in]rtp_magWS Input

Definition at line 1074 of file m_abs.cc.

References abs, ARTS::Var::abs_species(), ARTS::Var::atmosphere_dim(), do_magnetic_jacobian(), dotprod_with_los(), ARTS::Var::dpropmat_clearsky_dx(), ELECTRON_CHARGE, ELECTRON_MASS, equivalent_propmattype_indexes(), ARTS::Var::f_grid(), is_frequency_parameter(), ARTS::Var::jacobian_quantities(), magnetic_field_perturbation(), Array< base >::nelem(), PI, ARTS::Var::propmat_clearsky(), ARTS::Var::rtp_los(), ARTS::Var::rtp_mag(), ARTS::Var::rtp_vmr(), SPEED_OF_LIGHT, ARTS::Var::stokes_dim(), supports_faraday(), SpeciesTag::TYPE_FREE_ELECTRONS, and VACUUM_PERMITTIVITY.

Referenced by propmat_clearskyAddFaraday_g().

◆ propmat_clearskyAddFromAbsCoefPerSpecies()

void propmat_clearskyAddFromAbsCoefPerSpecies ( ArrayOfPropagationMatrix propmat_clearsky,
ArrayOfPropagationMatrix dpropmat_clearsky_dx,
const ArrayOfMatrix abs_coef_per_species,
const ArrayOfMatrix dabs_coef_dx,
const Verbosity verbosity 
)

WORKSPACE METHOD: propmat_clearskyAddFromAbsCoefPerSpecies.

Copy propmat_clearsky from abs_coef_per_species. This is handy for putting an explicit line-by-line calculation into the propmat_clearsky_agenda*. This method is also used internally by. propmat_clearskyAddOnTheFly*. Like all other propmat_clearsky methods, this method does not overwrite prior content of propmat_clearsky, but adds to it.

Author
Stefan Buehler
Parameters
[in,out]propmat_clearskyWS Input/Output
[out]dpropmat_clearsky_dxWS Output
[in]abs_coef_per_speciesWS Input
[in]dabs_coef_dxWS Input

Definition at line 968 of file m_abs.cc.

References ARTS::Var::abs_coef_per_species(), ARTS::Var::dabs_coef_dx(), ARTS::Var::dpropmat_clearsky_dx(), joker, ARTS::Var::ncols(), ARTS::Var::nrows(), and ARTS::Var::propmat_clearsky().

Referenced by propmat_clearskyAddFromAbsCoefPerSpecies_g(), and propmat_clearskyAddOnTheFly().

◆ propmat_clearskyAddOnTheFly()

void propmat_clearskyAddOnTheFly ( Workspace ws,
ArrayOfPropagationMatrix propmat_clearsky,
ArrayOfStokesVector nlte_source,
ArrayOfPropagationMatrix dpropmat_clearsky_dx,
ArrayOfStokesVector dnlte_dx_source,
ArrayOfStokesVector nlte_dsource_dx,
const Vector f_grid,
const ArrayOfArrayOfSpeciesTag abs_species,
const ArrayOfRetrievalQuantity jacobian_quantities,
const Numeric rtp_pressure,
const Numeric rtp_temperature,
const EnergyLevelMap rtp_nlte,
const Vector rtp_vmr,
const Agenda abs_xsec_agenda,
const Verbosity verbosity 
)

WORKSPACE METHOD: propmat_clearskyAddOnTheFly.

Calculates gas absorption coefficients line-by-line.

This method can be used inside propmat_clearsky_agenda just like propmat_clearskyAddFromLookup*. It is a shortcut for putting in some other methods explicitly, namely:

<br> 1. AbsInputFromRteScalars <br> 2. Execute abs_xsec_agenda <br> 3. abs_coefCalcFromXsec <br> 4. propmat_clearskyAddFromAbsCoefPerSpecies

The calculation is for one specific atmospheric condition, i.e., a set of pressure, temperature, and VMR values.

Author
Stefan Buehler, Richard Larsson
Parameters
[in,out]wsWorkspace
[in,out]propmat_clearskyWS Input/Output
[in,out]nlte_sourceWS Input/Output
[in,out]dpropmat_clearsky_dxWS Input/Output
[in,out]dnlte_dx_sourceWS Input/Output
[in,out]nlte_dsource_dxWS Input/Output
[in]f_gridWS Input
[in]abs_speciesWS Input
[in]jacobian_quantitiesWS Input
[in]rtp_pressureWS Input
[in]rtp_temperatureWS Input
[in]rtp_nlteWS Input
[in]rtp_vmrWS Input
[in]abs_xsec_agendaWS Input

Definition at line 1504 of file m_abs.cc.

References ARTS::Var::abs_coef(), ARTS::Var::abs_coef_per_species(), abs_coefCalcFromXsec(), ARTS::Var::abs_p(), ARTS::Var::abs_species(), ARTS::Var::abs_species_active(), ARTS::Var::abs_t(), ARTS::Var::abs_vmrs(), ARTS::Var::abs_xsec_agenda(), abs_xsec_agendaExecute(), ARTS::Var::abs_xsec_per_species(), AbsInputFromRteScalars(), ARTS::Var::dabs_coef_dx(), ARTS::Var::dabs_xsec_per_species_dx(), ARTS::Var::dnlte_dx_source(), ARTS::Var::dpropmat_clearsky_dx(), ARTS::Var::dsrc_coef_dx(), ARTS::Var::dsrc_xsec_per_species_dx(), ARTS::Var::f_grid(), ARTS::Var::jacobian_quantities(), ARTS::Var::nlte_dsource_dx(), ARTS::Var::nlte_source(), nlte_sourceFromTemperatureAndSrcCoefPerSpecies(), ARTS::Var::propmat_clearsky(), propmat_clearskyAddFromAbsCoefPerSpecies(), ARTS::Var::rtp_nlte(), ARTS::Var::rtp_pressure(), ARTS::Var::rtp_temperature(), ARTS::Var::rtp_vmr(), ARTS::Var::src_coef(), ARTS::Var::src_coef_per_species(), ARTS::Var::src_xsec_per_species(), and ARTS::Var::verbosity().

Referenced by calc_lookup_error(), ARTS::Agenda::propmat_clearsky_agenda_on_the_fly(), ARTS::Agenda::propmat_clearsky_agenda_on_the_fly_zeeman(), and propmat_clearskyAddOnTheFly_g().

◆ propmat_clearskyAddParticles()

void propmat_clearskyAddParticles ( ArrayOfPropagationMatrix propmat_clearsky,
ArrayOfPropagationMatrix dpropmat_clearsky_dx,
const Index stokes_dim,
const Index atmosphere_dim,
const Vector f_grid,
const ArrayOfArrayOfSpeciesTag abs_species,
const ArrayOfRetrievalQuantity jacobian_quantities,
const Vector rtp_vmr,
const Vector rtp_los,
const Numeric rtp_temperature,
const ArrayOfArrayOfSingleScatteringData scat_data,
const Index scat_data_checked,
const Index use_abs_as_ext,
const Verbosity verbosity 
)

WORKSPACE METHOD: propmat_clearskyAddParticles.

Calculates absorption coefficients of particles to be used in clearsky (non-cloudbox) calculations.

This is a method to include particles (neglecting possible scattering components) in a clearsky calculation, i.e. without applying the cloudbox and scattering solvers. Particles are handled as absorbing species with one instance of 'particles' per scattering element considered added to abs_species. Particle absorption cross- sections at current atmospheric conditions are extracted from the single scattering data stored in scat_data, i.e., one array element per 'particles' instance in abs_species is required. Number densities are stored in vmr_field_raw or vmr_field as for all abs_species*, but can be taken from (raw) pnd_field type data.

Note that the absorption coefficient is applied both in the extinction term (neglecting scattering out of the line of sight) and the emission term (neglecting the scattering source term, i.e. scattering into the line of sight).

Optionally, particle extinction (sum of absorption and scattering coefficient) can be used instead of absorption only. To choose this case, set the use_abs_as_ext flag to 0. However, be aware that this creates some unphysical emission term, hence is only suitable, where the source term is negligible anyways, e.g. for occultation simulations.

A line-of-sight direction rtp_los is required as particles can exhibit directional dependent absorption properties, which is taken into account by this method. ScatElementsToabs_speciesAdd* can be used to add all required settings/data for individual scattering elements at once, i.e. a <br> 'particles' tag to abs_species, a set of single scattering data to scat_data* and a number density field to vmr_field_raw (vmr_field is derived applying AtmFieldsCalc once VMRs for all abs_species* have been added) is appended for each scattering element.

Like all 'propmat_clearskyAdd*' methods, the method is additive, i.e., does not overwrite the propagation matrix propmat_clearsky, but adds further contributions.

Author
Jana Mendrok
Parameters
[in,out]propmat_clearskyWS Input/Output
[in,out]dpropmat_clearsky_dxWS Input/Output
[in]stokes_dimWS Input
[in]atmosphere_dimWS Input
[in]f_gridWS Input
[in]abs_speciesWS Input
[in]jacobian_quantitiesWS Input
[in]rtp_vmrWS Input
[in]rtp_losWS Input
[in]rtp_temperatureWS Input
[in]scat_dataWS Input
[in]scat_data_checkedWS Input
[in]use_abs_as_extGeneric Input (Default: "1")

Definition at line 1202 of file m_abs.cc.

References ARTS::Var::abs_species(), ARTS::Var::atmosphere_dim(), CREATE_OUT1, do_frequency_jacobian(), do_temperature_jacobian(), ARTS::Var::dpropmat_clearsky_dx(), equivalent_propmattype_indexes(), ARTS::Var::f_grid(), ARTS::Var::jacobian_quantities(), joker, mirror_los(), Array< base >::nelem(), ns, opt_prop_NScatElems(), ARTS::Var::propmat_clearsky(), Vector::resize(), ARTS::Var::rtp_los(), ARTS::Var::rtp_temperature(), ARTS::Var::rtp_vmr(), ARTS::Var::scat_data(), ARTS::Var::scat_data_checked(), ARTS::Var::stokes_dim(), supports_particles(), temperature_perturbation(), TotalNumberOfElements(), and SpeciesTag::TYPE_PARTICLES.

Referenced by propmat_clearskyAddParticles_g().

◆ propmat_clearskyForceNegativeToZero()

void propmat_clearskyForceNegativeToZero ( ArrayOfPropagationMatrix propmat_clearsky,
const Verbosity verbosity 
)

WORKSPACE METHOD: propmat_clearskyForceNegativeToZero.

Sets propmat_clearsky to match zero attenuation if negative value. Useful for line mixing in some cases.

Use this method just if you know what you are doing!

Author
Richard Larsson
Parameters
[in,out]propmat_clearskyWS Input/Output

Definition at line 1617 of file m_abs.cc.

References ARTS::Var::propmat_clearsky().

Referenced by propmat_clearskyForceNegativeToZero_g().

◆ propmat_clearskyInit()

void propmat_clearskyInit ( ArrayOfPropagationMatrix propmat_clearsky,
ArrayOfStokesVector nlte_source,
ArrayOfPropagationMatrix dpropmat_clearsky_dx,
ArrayOfStokesVector dnlte_dx_source,
ArrayOfStokesVector nlte_dsource_dx,
const ArrayOfArrayOfSpeciesTag abs_species,
const ArrayOfRetrievalQuantity jacobian_quantities,
const Vector f_grid,
const Index stokes_dim,
const Index propmat_clearsky_agenda_checked,
const Index nlte_do,
const Verbosity verbosity 
)

WORKSPACE METHOD: propmat_clearskyInit.

Initialize propmat_clearsky and nlte_source.

This method must be used inside propmat_clearsky_agenda and then be called first.

Author
Oliver Lemke, Richard Larsson
Parameters
[out]propmat_clearskyWS Output
[out]nlte_sourceWS Output
[out]dpropmat_clearsky_dxWS Output
[out]dnlte_dx_sourceWS Output
[out]nlte_dsource_dxWS Output
[in]abs_speciesWS Input
[in]jacobian_quantitiesWS Input
[in]f_gridWS Input
[in]stokes_dimWS Input
[in]propmat_clearsky_agenda_checkedWS Input
[in]nlte_doWS Input

Definition at line 1028 of file m_abs.cc.

References ARTS::Var::abs_species(), ARTS::Var::dnlte_dx_source(), ARTS::Var::dpropmat_clearsky_dx(), equivalent_propmattype_indexes(), ARTS::Var::f_grid(), ARTS::Var::jacobian_quantities(), Array< base >::nelem(), ARTS::Var::nlte_do(), ARTS::Var::nlte_dsource_dx(), ARTS::Var::nlte_source(), ARTS::Var::propmat_clearsky(), ARTS::Var::propmat_clearsky_agenda_checked(), and ARTS::Var::stokes_dim().

Referenced by calc_lookup_error(), ARTS::Agenda::propmat_clearsky_agenda_on_the_fly(), ARTS::Agenda::propmat_clearsky_agenda_on_the_fly_zeeman(), and propmat_clearskyInit_g().

◆ propmat_clearskyZero()

void propmat_clearskyZero ( ArrayOfPropagationMatrix propmat_clearsky,
const Vector f_grid,
const Index stokes_dim,
const Verbosity verbosity 
)

WORKSPACE METHOD: propmat_clearskyZero.

Sets propmat_clearsky to match zero attenuation.

Use this method just if you know what you are doing!

If you want to make a calculation with no clear-sky attenuation at all, fill propmat_clearsky_agenda with this method and required Ignore statements (don't include propmat_clearskyInit).

Author
Patrick Eriksson
Parameters
[out]propmat_clearskyWS Output
[in]f_gridWS Input
[in]stokes_dimWS Input

Definition at line 1607 of file m_abs.cc.

References ARTS::Var::f_grid(), ARTS::Var::propmat_clearsky(), and ARTS::Var::stokes_dim().

Referenced by propmat_clearskyZero_g().

◆ WriteMolTau()

void WriteMolTau ( const Vector f_grid,
const Tensor3 z_field,
const Tensor7 propmat_clearsky_field,
const Index atmosphere_dim,
const String filename,
const Verbosity verbosity 
)

WORKSPACE METHOD: WriteMolTau.

Writes a 'molecular_tau_file' as required for libRadtran.

The libRadtran (www.libradtran.org) radiative transfer package is a comprehensive package for various applications, it can be used to compute radiances, irradiances, actinic fluxes, ... for the solar and the thermal spectral ranges. Absorption is usually treated using k-distributions or other parameterizations. For calculations with high spectral resolution it requires absorption coefficients from an external line-by-line model. Using this method, arts generates a file that can be used by libRadtran (option molecular_tau_file).

Author
Claudia Emde
Parameters
[in]f_gridWS Input
[in]z_fieldWS Input
[in]propmat_clearsky_fieldWS Input
[in]atmosphere_dimWS Input
[in]filenameGeneric Input

Definition at line 1639 of file m_abs.cc.

References ARTS::Var::atmosphere_dim(), ARTS::Var::f_grid(), nca_error(), ARTS::Var::propmat_clearsky_field(), SPEED_OF_LIGHT, and ARTS::Var::z_field().

Referenced by WriteMolTau_g().

Variable Documentation

◆ ELECTRON_CHARGE

const Numeric ELECTRON_CHARGE
extern

◆ ELECTRON_MASS

const Numeric ELECTRON_MASS
extern

◆ PI

const Numeric PI
extern

◆ SPEED_OF_LIGHT

const Numeric SPEED_OF_LIGHT
extern

◆ VACUUM_PERMITTIVITY

const Numeric VACUUM_PERMITTIVITY
extern