ARTS 2.5.9 (git: 825fa5f2)
Absorption::PredefinedModel Namespace Reference

Classes

struct  VMRS
 Contains known required VMR values. More...
 

Functions

template<bool check_exist>
bool compute_selection (PropagationMatrix &pm, const SpeciesIsotopeRecord &model, const Vector &f, const Numeric &p, const Numeric &t, const VMRS &vmr, const PredefinedModelData &predefined_model_data)
 Compute the selected model and returns if it can be computed. More...
 
bool can_compute (const SpeciesIsotopeRecord &model)
 Returns true if the model can be computed. More...
 
template<bool special>
constexpr Numeric dvmr_calc (Numeric x) noexcept
 Sets a VMR perturbation. More...
 
template<bool special>
bool compute_vmr_deriv (PropagationMatrix &dpm, const PropagationMatrix &pm, const SpeciesIsotopeRecord &model, const Vector &f, const Numeric &p, const Numeric &t, VMRS vmr, const Species::Species spec, const PredefinedModelData &predefined_model_data)
 Compute the partial VMR derivative. More...
 
void compute (PropagationMatrix &propmat_clearsky, ArrayOfPropagationMatrix &dpropmat_clearsky_dx, const SpeciesIsotopeRecord &tag, const Vector &f_grid, const Numeric &rtp_pressure, const Numeric &rtp_temperature, const VMRS &vmr, const ArrayOfRetrievalQuantity &jacobian_quantities, const PredefinedModelData &predefined_model_data)
 Compute the predefined model. More...
 

Function Documentation

◆ can_compute()

bool Absorption::PredefinedModel::can_compute ( const SpeciesIsotopeRecord model)

Returns true if the model can be computed.

Definition at line 142 of file predefined_absorption_models.cc.

Referenced by main().

◆ compute()

void Absorption::PredefinedModel::compute ( PropagationMatrix propmat_clearsky,
ArrayOfPropagationMatrix dpropmat_clearsky_dx,
const SpeciesIsotopeRecord tag,
const Vector f_grid,
const Numeric rtp_pressure,
const Numeric rtp_temperature,
const VMRS vmr,
const ArrayOfRetrievalQuantity jacobian_quantities,
const PredefinedModelData &  predefined_model_data 
)

Compute the predefined model.

The tag is checked, so this should just be looped over by all available species

Parameters
[in,out]propmat_clearskyAs WSV
[in,out]dpropmat_clearsky_dxAs WSV
[in]tagAn isotope record
[in]f_gridAs WSV
[in]rtp_pressureAs WSV
[in]rtp_temperatureAs WSV
[in]vmrThe VMRS defined from WSVs abs_species and rtp_vmr
[in]jacobian_quantitiesAs WSV
[in]predefined_model_dataAs WSV

Set simple propagation matrices (NOTE: stokes_dim == 1, if any model cahnges that, fix this!)

Definition at line 239 of file predefined_absorption_models.cc.

References do_frequency_jacobian(), and do_temperature_jacobian().

Referenced by main(), propmat_clearskyAddPredefined(), and test_mpm20().

◆ compute_selection()

template<bool check_exist>
bool Absorption::PredefinedModel::compute_selection ( PropagationMatrix pm,
const SpeciesIsotopeRecord model,
const Vector f,
const Numeric p,
const Numeric t,
const VMRS vmr,
const PredefinedModelData &  predefined_model_data 
)

Compute the selected model and returns if it can be computed.

Remember to use the "if constexpr (not check_exist)" statement as this allows us to not keep any copy of the list of available models

Template Parameters
check_existPerform no computations if false
Parameters
[in,out]pmA local propagation matrix
[in]modelA single isotope record
[in]fA local frequency grid
[in]pA local pressure
[in]tA local temperature
[in]vmrA VMRS object defined from the WSVs abs_species and rtp_vmr
Returns
true When there are computations that can be or have been performed
false When there are no computations that can be or have been performed

Definition at line 62 of file predefined_absorption_models.cc.

References Species::find_species_index().

◆ compute_vmr_deriv()

template<bool special>
bool Absorption::PredefinedModel::compute_vmr_deriv ( PropagationMatrix dpm,
const PropagationMatrix pm,
const SpeciesIsotopeRecord model,
const Vector f,
const Numeric p,
const Numeric t,
VMRS  vmr,
const Species::Species  spec,
const PredefinedModelData &  predefined_model_data 
)

Compute the partial VMR derivative.

Sets dpm to the expected value (does not add, but really sets)

Note that there is an extra special case when the template argument is true to handle the 0-vmr case

Template Parameters
specialWhether or not this is called for special derivatives
Parameters
[in,out]dpmThe
[in]pmA local propagation matrix
[in]modelA single isotope record
[in]fA local frequency grid
[in]pA local pressure
[in]tA local temperature
[in]vmrA VMRS object defined from the WSVs abs_species and rtp_vmr
[in]specThe species whose derivative is computed

Definition at line 182 of file predefined_absorption_models.cc.

References Absorption::PredefinedModel::VMRS::CO2, Absorption::PredefinedModel::VMRS::H2O, Absorption::PredefinedModel::VMRS::LWC, Absorption::PredefinedModel::VMRS::N2, Absorption::PredefinedModel::VMRS::O2, and PropagationMatrix::SetZero().

◆ dvmr_calc()

template<bool special>
constexpr Numeric Absorption::PredefinedModel::dvmr_calc ( Numeric  x)
constexprnoexcept

Sets a VMR perturbation.

Template Parameters
specialWhether or not this is called for special derivatives
Parameters
[in]xOriginal VMR
Returns
constexpr Numeric [1e-6 if x < 1e-10 else x * 1e-6] if not special else x

Definition at line 154 of file predefined_absorption_models.cc.

References d.