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

User interface for dealing with pure line mixing calculations. More...

#include "arts_conversions.h"
#include "hitran_species.h"
#include "linemixing.h"
#include "linemixing_hitran.h"
#include "matpack_data.h"
#include "propagationmatrix.h"

Go to the source code of this file.

Functions

void abs_hitran_relmat_dataReadHitranRelmatDataAndLines (HitranRelaxationMatrixData &abs_hitran_relmat_data, ArrayOfArrayOfAbsorptionLines &abs_lines_per_species, const ArrayOfArrayOfSpeciesTag &abs_species, const String &basedir, const Numeric &linemixinglimit, const Numeric &fmin, const Numeric &fmax, const Numeric &stot, const String &mode, const Verbosity &)
 WORKSPACE METHOD: abs_hitran_relmat_dataReadHitranRelmatDataAndLines.
 
void propmat_clearskyAddHitranLineMixingLines (PropagationMatrix &propmat_clearsky, const HitranRelaxationMatrixData &abs_hitran_relmat_data, const ArrayOfArrayOfAbsorptionLines &abs_lines_per_species, const SpeciesIsotopologueRatios &isotopologue_ratios, const Vector &f_grid, const ArrayOfArrayOfSpeciesTag &abs_species, const ArrayOfSpeciesTag &select_abs_species, const ArrayOfRetrievalQuantity &jacobian_quantities, const Numeric &rtp_pressure, const Numeric &rtp_temperature, const Vector &rtp_vmr, const Verbosity &)
 WORKSPACE METHOD: propmat_clearskyAddHitranLineMixingLines.
 
void abs_lines_per_speciesAdaptHitranLineMixing (ArrayOfArrayOfAbsorptionLines &abs_lines_per_species, const HitranRelaxationMatrixData &abs_hitran_relmat_data, const Vector &t_grid, const Numeric &pressure, const Index &order, const Verbosity &)
 WORKSPACE METHOD: abs_lines_per_speciesAdaptHitranLineMixing.
 
void propmat_clearskyAddOnTheFlyLineMixing (PropagationMatrix &propmat_clearsky, ArrayOfPropagationMatrix &dpropmat_clearsky_dx, const ArrayOfArrayOfAbsorptionLines &abs_lines_per_species, const MapOfErrorCorrectedSuddenData &ecs_data, const SpeciesIsotopologueRatios &isotopologue_ratios, const Vector &f_grid, const ArrayOfArrayOfSpeciesTag &abs_species, const ArrayOfSpeciesTag &select_abs_species, const ArrayOfRetrievalQuantity &jacobian_quantities, const Numeric &rtp_pressure, const Numeric &rtp_temperature, const Vector &rtp_vmr, const Index &lbl_checked, const Verbosity &)
 WORKSPACE METHOD: propmat_clearskyAddOnTheFlyLineMixing.
 
void propmat_clearskyAddOnTheFlyLineMixingWithZeeman (PropagationMatrix &propmat_clearsky, ArrayOfPropagationMatrix &dpropmat_clearsky_dx, const ArrayOfArrayOfAbsorptionLines &abs_lines_per_species, const MapOfErrorCorrectedSuddenData &ecs_data, const SpeciesIsotopologueRatios &isotopologue_ratios, const Vector &f_grid, const ArrayOfArrayOfSpeciesTag &abs_species, const ArrayOfSpeciesTag &select_abs_species, const ArrayOfRetrievalQuantity &jacobian_quantities, const Numeric &rtp_pressure, const Numeric &rtp_temperature, const Vector &rtp_vmr, const Vector &rtp_mag, const Vector &rtp_los, const Index &lbl_checked, const Verbosity &)
 WORKSPACE METHOD: propmat_clearskyAddOnTheFlyLineMixingWithZeeman.
 
void abs_linesAdaptOnTheFlyLineMixing (ArrayOfAbsorptionLines &abs_lines, const MapOfErrorCorrectedSuddenData &ecs_data, const Vector &t_grid, const Numeric &pressure, const Index &order, const Index &robust, const Index &rosenkranz_adaptation, const Verbosity &verbosity)
 WORKSPACE METHOD: abs_linesAdaptOnTheFlyLineMixing.
 
void abs_lines_per_speciesAdaptOnTheFlyLineMixing (ArrayOfArrayOfAbsorptionLines &abs_lines_per_species, const MapOfErrorCorrectedSuddenData &ecs_data, const Vector &t_grid, const Numeric &pressure, const Index &order, const Index &robust, const Index &rosenkranz_adaptation, const Verbosity &verbosity)
 WORKSPACE METHOD: abs_lines_per_speciesAdaptOnTheFlyLineMixing.
 
void ecs_dataInit (MapOfErrorCorrectedSuddenData &ecs_data, const Verbosity &)
 WORKSPACE METHOD: ecs_dataInit.
 
void ecs_dataAddSpeciesData (MapOfErrorCorrectedSuddenData &ecs_data, const SpeciesIsotopologueRatios &isotopologue_ratios, const QuantumIdentifier &qid, const String &species, const String &scaling_type, const Vector &scaling, const String &beta_type, const Vector &beta, const String &lambda_type, const Vector &lambda, const String &collisional_distance_type, const Vector &collisional_distance, const Verbosity &)
 WORKSPACE METHOD: ecs_dataAddSpeciesData.
 
void ecs_dataAddMeanAir (MapOfErrorCorrectedSuddenData &ecs_data, const Vector &vmrs, const ArrayOfSpeciesTag &specs, const Verbosity &)
 WORKSPACE METHOD: ecs_dataAddMeanAir.
 
void ecs_dataAddMakarov2020 (MapOfErrorCorrectedSuddenData &ecs_data, const SpeciesIsotopologueRatios &isotopologue_ratios, const Verbosity &)
 WORKSPACE METHOD: ecs_dataAddMakarov2020.
 
void ecs_dataAddRodrigues1997 (MapOfErrorCorrectedSuddenData &ecs_data, const SpeciesIsotopologueRatios &isotopologue_ratios, const Verbosity &)
 WORKSPACE METHOD: ecs_dataAddRodrigues1997.
 
void ecs_dataAddTran2006 (MapOfErrorCorrectedSuddenData &ecs_data, const SpeciesIsotopologueRatios &isotopologue_ratios, const Verbosity &)
 WORKSPACE METHOD: ecs_dataAddTran2006.
 
void ecs_dataAddTran2011 (MapOfErrorCorrectedSuddenData &ecs_data, const SpeciesIsotopologueRatios &isotopologue_ratios, const Verbosity &)
 WORKSPACE METHOD: ecs_dataAddTran2011.
 

Detailed Description

User interface for dealing with pure line mixing calculations.

Author
Richard Larsson
Date
2020-06-23

Note: If defined using parameterized form, the normal line-functions approach is faster and more appropriate. These functions should first compute the relaxation, not simply use the relaxation

Definition in file m_linemixing.cc.

Function Documentation

◆ abs_hitran_relmat_dataReadHitranRelmatDataAndLines()

void abs_hitran_relmat_dataReadHitranRelmatDataAndLines ( HitranRelaxationMatrixData abs_hitran_relmat_data,
ArrayOfArrayOfAbsorptionLines abs_lines_per_species,
const ArrayOfArrayOfSpeciesTag abs_species,
const String basedir,
const Numeric &  linemixinglimit,
const Numeric &  fmin,
const Numeric &  fmax,
const Numeric &  stot,
const String mode,
const Verbosity verbosity 
)

WORKSPACE METHOD: abs_hitran_relmat_dataReadHitranRelmatDataAndLines.

Reads HITRAN line mixing data from a basedir

The basedir must point at line mixing data as provided by HITRAN. The lines will be changed such that ALL CO2 lines are truncated before adding the HITRAN line mixing lines.

The available modes are such that "VP*" uses Voigt profiles and "SDVP*" uses speed-dependent Voigt profiles, where the "_Y" signifies if Rosenkranz-style line mixing is considered or not, and the "W" at the end signifies that full calculations are used. At the line mixing limit, line mixing is simply turned off.

The "FullW" mode uses Lorentzian calculations with the full relaxation matrix until the line mixing limit is reached and it switches to Voigt.

The HITRAN LM data is available for download at: https://hitran.org/supplementary/

Author
Richard Larsson
Parameters
[out]abs_hitran_relmat_dataWS Output
[in,out]abs_lines_per_speciesWS Input/Output
[in]abs_speciesWS Input
[in]basedirGeneric Input
[in]linemixinglimitGeneric Input (Default: "-1")
[in]fminGeneric Input (Default: "-1e99")
[in]fmaxGeneric Input (Default: "1e99")
[in]stotGeneric Input (Default: "0")
[in]modeGeneric Input (Default: "VP_W")

Definition at line 20 of file m_linemixing.cc.

References ARTS_USER_ERROR_IF, Hitran::isotopologue_ratios(), Array< base >::nelem(), lm_hitran_2017::read(), and Species::select_joker().

Referenced by abs_hitran_relmat_dataReadHitranRelmatDataAndLines_g().

◆ abs_lines_per_speciesAdaptHitranLineMixing()

void abs_lines_per_speciesAdaptHitranLineMixing ( ArrayOfArrayOfAbsorptionLines abs_lines_per_species,
const HitranRelaxationMatrixData abs_hitran_relmat_data,
const Vector &  t_grid,
const Numeric &  pressure,
const Index &  order,
const Verbosity verbosity 
)

WORKSPACE METHOD: abs_lines_per_speciesAdaptHitranLineMixing.

Adapts the line-catalog from using abs_hitran_relmat_data to. instead fit ordered parameters to imitate the line mxixing

The order should be 1 or 2. It will compute at 3 as well, but there's no support in current ARTS LBL to make use of it so it will crash at some point

Author
Richard Larsson
Parameters
[in,out]abs_lines_per_speciesWS Input/Output
[in]abs_hitran_relmat_dataWS Input
[in]t_gridGeneric Input
[in]pressureGeneric Input
[in]orderGeneric Input

Definition at line 143 of file m_linemixing.cc.

References lm_hitran_2017::hitran_lm_eigenvalue_adaptation().

Referenced by abs_lines_per_speciesAdaptHitranLineMixing_g().

◆ abs_lines_per_speciesAdaptOnTheFlyLineMixing()

void abs_lines_per_speciesAdaptOnTheFlyLineMixing ( ArrayOfArrayOfAbsorptionLines abs_lines_per_species,
const MapOfErrorCorrectedSuddenData ecs_data,
const Vector &  t_grid,
const Numeric &  pressure,
const Index &  order,
const Index &  robust,
const Index &  rosenkranz_adaptation,
const Verbosity verbosity 
)

WORKSPACE METHOD: abs_lines_per_speciesAdaptOnTheFlyLineMixing.

Calls abs_linesAdaptOnTheFlyLineMixing for each internal array

Author
Richard Larsson
Parameters
[in,out]abs_lines_per_speciesWS Input/Output
[in]ecs_dataWS Input
[in]t_gridGeneric Input
[in]pressureGeneric Input
[in]orderGeneric Input
[in]robustGeneric Input (Default: "1")
[in]rosenkranz_adaptationGeneric Input (Default: "0")

Definition at line 381 of file m_linemixing.cc.

References abs_linesAdaptOnTheFlyLineMixing().

Referenced by abs_lines_per_speciesAdaptOnTheFlyLineMixing_g().

◆ abs_linesAdaptOnTheFlyLineMixing()

void abs_linesAdaptOnTheFlyLineMixing ( ArrayOfAbsorptionLines abs_lines,
const MapOfErrorCorrectedSuddenData ecs_data,
const Vector &  t_grid,
const Numeric &  pressure,
const Index &  order,
const Index &  robust,
const Index &  rosenkranz_adaptation,
const Verbosity verbosity 
)

WORKSPACE METHOD: abs_linesAdaptOnTheFlyLineMixing.

Adapts the line-catalog from using ecs_data data to. instead fit ordered parameters to imitate the line mxixing

The order should be 1 or 2. It will compute at 3 as well, but there's no support in current ARTS LBL to make use of it so it will crash at some point

Author
Richard Larsson
Parameters
[in,out]abs_linesWS Input/Output
[in]ecs_dataWS Input
[in]t_gridGeneric Input
[in]pressureGeneric Input
[in]orderGeneric Input
[in]robustGeneric Input (Default: "1")
[in]rosenkranz_adaptationGeneric Input (Default: "0")

Definition at line 355 of file m_linemixing.cc.

References Absorption::LineMixing::ecs_eigenvalue_adaptation().

Referenced by abs_lines_per_speciesAdaptOnTheFlyLineMixing(), and abs_linesAdaptOnTheFlyLineMixing_g().

◆ ecs_dataAddMakarov2020()

void ecs_dataAddMakarov2020 ( MapOfErrorCorrectedSuddenData ecs_data,
const SpeciesIsotopologueRatios isotopologue_ratios,
const Verbosity verbosity 
)

WORKSPACE METHOD: ecs_dataAddMakarov2020.

Sets the O2-66 microwave band data for ECS.

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

Definition at line 526 of file m_linemixing.cc.

References Conversion::angstrom2meter(), and Species::mean_mass().

Referenced by ecs_dataAddMakarov2020_g().

◆ ecs_dataAddMeanAir()

◆ ecs_dataAddRodrigues1997()

void ecs_dataAddRodrigues1997 ( MapOfErrorCorrectedSuddenData ecs_data,
const SpeciesIsotopologueRatios isotopologue_ratios,
const Verbosity verbosity 
)

WORKSPACE METHOD: ecs_dataAddRodrigues1997.

Sets the CO2-626, CO2-636, and CO2-628 IR band data for ECS.

Note that the broadening species has to be N2 and not AIR for the band, and that N2 VMR must be present

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

Definition at line 562 of file m_linemixing.cc.

References Conversion::angstrom2meter(), Conversion::kaycm_per_atm2hz_per_pa(), and Species::mean_mass().

Referenced by ecs_dataAddRodrigues1997_g().

◆ ecs_dataAddSpeciesData()

void ecs_dataAddSpeciesData ( MapOfErrorCorrectedSuddenData ecs_data,
const SpeciesIsotopologueRatios isotopologue_ratios,
const QuantumIdentifier qid,
const String species,
const String scaling_type,
const Vector &  scaling,
const String beta_type,
const Vector &  beta,
const String lambda_type,
const Vector &  lambda,
const String collisional_distance_type,
const Vector &  collisional_distance,
const Verbosity verbosity 
)

WORKSPACE METHOD: ecs_dataAddSpeciesData.

Sets ECS data for one set of species and quantum identifiers.

Author
Richard Larsson
Parameters
[in,out]ecs_dataWS Input/Output
[in]isotopologue_ratiosWS Input
[in]qidGeneric Input
[in]speciesGeneric Input
[in]scaling_typeGeneric Input (Default: "T0")
[in]scalingGeneric Input
[in]beta_typeGeneric Input (Default: "T0")
[in]betaGeneric Input
[in]lambda_typeGeneric Input (Default: "T0")
[in]lambdaGeneric Input
[in]collisional_distance_typeGeneric Input (Default: "T0")
[in]collisional_distanceGeneric Input

Definition at line 406 of file m_linemixing.cc.

References ARTS_USER_ERROR_IF, good_enum(), and Species::mean_mass().

Referenced by ecs_dataAddSpeciesData_g().

◆ ecs_dataAddTran2006()

void ecs_dataAddTran2006 ( MapOfErrorCorrectedSuddenData ecs_data,
const SpeciesIsotopologueRatios isotopologue_ratios,
const Verbosity verbosity 
)

WORKSPACE METHOD: ecs_dataAddTran2006.

Sets the O2-66 visible band data for ECS.

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

Definition at line 609 of file m_linemixing.cc.

References Conversion::angstrom2meter(), Conversion::kaycm_per_atm2hz_per_pa(), and Species::mean_mass().

Referenced by ecs_dataAddTran2006_g().

◆ ecs_dataAddTran2011()

void ecs_dataAddTran2011 ( MapOfErrorCorrectedSuddenData ecs_data,
const SpeciesIsotopologueRatios isotopologue_ratios,
const Verbosity verbosity 
)

WORKSPACE METHOD: ecs_dataAddTran2011.

Sets the CO2-626, CO2-636, and CO2-628 IR band data for ECS.

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

Definition at line 637 of file m_linemixing.cc.

References Conversion::angstrom2meter(), Conversion::kaycm_per_atm2hz_per_pa(), and Species::mean_mass().

Referenced by ecs_dataAddTran2011_g().

◆ ecs_dataInit()

void ecs_dataInit ( MapOfErrorCorrectedSuddenData ecs_data,
const Verbosity verbosity 
)

WORKSPACE METHOD: ecs_dataInit.

Resets/initializes the ECS data.

Author
Richard Larsson
Parameters
[out]ecs_dataWS Output

Definition at line 402 of file m_linemixing.cc.

Referenced by ecs_dataInit_g().

◆ propmat_clearskyAddHitranLineMixingLines()

void propmat_clearskyAddHitranLineMixingLines ( PropagationMatrix &  propmat_clearsky,
const HitranRelaxationMatrixData abs_hitran_relmat_data,
const ArrayOfArrayOfAbsorptionLines abs_lines_per_species,
const SpeciesIsotopologueRatios isotopologue_ratios,
const Vector &  f_grid,
const ArrayOfArrayOfSpeciesTag abs_species,
const ArrayOfSpeciesTag select_abs_species,
const ArrayOfRetrievalQuantity jacobian_quantities,
const Numeric &  rtp_pressure,
const Numeric &  rtp_temperature,
const Vector &  rtp_vmr,
const Verbosity verbosity 
)

WORKSPACE METHOD: propmat_clearskyAddHitranLineMixingLines.

Calculates gas absorption coefficients line-by-line for HITRAN line mixed data.

Wigner6Init* or Wigner3Init must be called before this function.

Note that you need to have propmat_clearskyAddLines in addition to this method to compensate the calculations for the pressure limit

Please ensure you cite the original authors when you use this function: J. Lamouroux, L. Realia, X. Thomas, et al., J.Q.S.R.T. 151 (2015), 88-96

Author
Richard Larsson
Parameters
[in,out]propmat_clearskyWS Input/Output
[in]abs_hitran_relmat_dataWS Input
[in]abs_lines_per_speciesWS Input
[in]isotopologue_ratiosWS Input
[in]f_gridWS Input
[in]abs_speciesWS Input
[in]select_abs_speciesWS Input
[in]jacobian_quantitiesWS Input
[in]rtp_pressureWS Input
[in]rtp_temperatureWS Input
[in]rtp_vmrWS Input

Definition at line 90 of file m_linemixing.cc.

References ARTS_USER_ERROR_IF, lm_hitran_2017::compute(), and Array< base >::nelem().

Referenced by propmat_clearskyAddHitranLineMixingLines_g().

◆ propmat_clearskyAddOnTheFlyLineMixing()

void propmat_clearskyAddOnTheFlyLineMixing ( PropagationMatrix &  propmat_clearsky,
ArrayOfPropagationMatrix &  dpropmat_clearsky_dx,
const ArrayOfArrayOfAbsorptionLines abs_lines_per_species,
const MapOfErrorCorrectedSuddenData ecs_data,
const SpeciesIsotopologueRatios isotopologue_ratios,
const Vector &  f_grid,
const ArrayOfArrayOfSpeciesTag abs_species,
const ArrayOfSpeciesTag select_abs_species,
const ArrayOfRetrievalQuantity jacobian_quantities,
const Numeric &  rtp_pressure,
const Numeric &  rtp_temperature,
const Vector &  rtp_vmr,
const Index &  lbl_checked,
const Verbosity verbosity 
)

WORKSPACE METHOD: propmat_clearskyAddOnTheFlyLineMixing.

Compute the line mixing of matching lines and add it to the propagation matrix

Each band's Population Type is checked and the calculations are only performed for bands with matching population types (and a good pressure limits)

Presently only supports one method: ByMakarovFullRelmat, based on Makarov et al 2020

Wigner6Init* or Wigner3Init must be called before this function.

Note that you need to have propmat_clearskyAddLines addition to this method to compensate the calculations for the pressure limit

Author
Richard Larsson
Parameters
[in,out]propmat_clearskyWS Input/Output
[in,out]dpropmat_clearsky_dxWS Input/Output
[in]abs_lines_per_speciesWS Input
[in]ecs_dataWS Input
[in]isotopologue_ratiosWS Input
[in]f_gridWS Input
[in]abs_speciesWS Input
[in]select_abs_speciesWS Input
[in]jacobian_quantitiesWS Input
[in]rtp_pressureWS Input
[in]rtp_temperatureWS Input
[in]rtp_vmrWS Input
[in]lbl_checkedWS Input

Definition at line 162 of file m_linemixing.cc.

References ARTS_USER_ERROR_IF, Absorption::LineMixing::ecs_absorption(), Array< base >::nelem(), and Zeeman::None.

Referenced by propmat_clearskyAddOnTheFlyLineMixing_g().

◆ propmat_clearskyAddOnTheFlyLineMixingWithZeeman()

void propmat_clearskyAddOnTheFlyLineMixingWithZeeman ( PropagationMatrix &  propmat_clearsky,
ArrayOfPropagationMatrix &  dpropmat_clearsky_dx,
const ArrayOfArrayOfAbsorptionLines abs_lines_per_species,
const MapOfErrorCorrectedSuddenData ecs_data,
const SpeciesIsotopologueRatios isotopologue_ratios,
const Vector &  f_grid,
const ArrayOfArrayOfSpeciesTag abs_species,
const ArrayOfSpeciesTag select_abs_species,
const ArrayOfRetrievalQuantity jacobian_quantities,
const Numeric &  rtp_pressure,
const Numeric &  rtp_temperature,
const Vector &  rtp_vmr,
const Vector &  rtp_mag,
const Vector &  rtp_los,
const Index &  lbl_checked,
const Verbosity verbosity 
)

WORKSPACE METHOD: propmat_clearskyAddOnTheFlyLineMixingWithZeeman.

Compute the line mixing of matching lines and add it to the propagation matrix Also computes Zeeman effect for all the lines in the band

Each band's Population Type is checked and the calculations are only performed for bands with matching population types (and a good pressure limits)

Presently only supports one method: ByMakarovFullRelmat, based on Makarov et al 2020

Wigner6Init* or Wigner3Init must be called before this function.

Note that you need to have propmat_clearskyAddLines in addition to this method to compensate the calculations for the pressure limit

Author
Richard Larsson
Parameters
[in,out]propmat_clearskyWS Input/Output
[in,out]dpropmat_clearsky_dxWS Input/Output
[in]abs_lines_per_speciesWS Input
[in]ecs_dataWS Input
[in]isotopologue_ratiosWS Input
[in]f_gridWS Input
[in]abs_speciesWS Input
[in]select_abs_speciesWS Input
[in]jacobian_quantitiesWS Input
[in]rtp_pressureWS Input
[in]rtp_temperatureWS Input
[in]rtp_vmrWS Input
[in]rtp_magWS Input
[in]rtp_losWS Input
[in]lbl_checkedWS Input

Definition at line 224 of file m_linemixing.cc.

References Zeeman::AllPolarization(), Zeeman::AllPolarization_deta(), Zeeman::AllPolarization_dtheta(), ARTS_USER_ERROR_IF, Conversion::deg2rad(), Zeeman::dsum(), Absorption::LineMixing::ecs_absorption(), Zeeman::FromGrids(), Array< base >::nelem(), Zeeman::Pi, Zeeman::SelectPolarization(), Zeeman::SigmaMinus, Zeeman::SigmaPlus, and Zeeman::sum().

Referenced by propmat_clearskyAddOnTheFlyLineMixingWithZeeman_g().