ARTS 2.5.11 (git: 725533f0)
|
Stuff related to the calculation of absorption coefficients. More...
#include <algorithm>
#include <cmath>
#include <cstddef>
#include <memory>
#include <utility>
#include "absorption.h"
#include "absorptionlines.h"
#include "agenda_class.h"
#include "agenda_set.h"
#include "array.h"
#include "arts.h"
#include "arts_constants.h"
#include "arts_omp.h"
#include "artstime.h"
#include "auto_md.h"
#include "check_input.h"
#include "debug.h"
#include "depr.h"
#include "file.h"
#include "global_data.h"
#include "hitran_species.h"
#include "jacobian.h"
#include "lineshape.h"
#include "m_xml.h"
#include "math_funcs.h"
#include "matpack_data.h"
#include "messages.h"
#include "methods.h"
#include "montecarlo.h"
#include "optproperties.h"
#include "parameters.h"
#include "physics_funcs.h"
#include "rte.h"
#include "species_tags.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 &) |
void | abs_lines_per_speciesCreateFromLines (ArrayOfArrayOfAbsorptionLines &abs_lines_per_species, const ArrayOfAbsorptionLines &abs_lines, const ArrayOfArrayOfSpeciesTag &abs_species, const Verbosity &) |
WORKSPACE METHOD: abs_lines_per_speciesCreateFromLines. | |
void | abs_speciesDefineAllInScenario (ArrayOfArrayOfSpeciesTag &tgs, Index &propmat_clearsky_agenda_checked, const String &basename, const Verbosity &verbosity) |
WORKSPACE METHOD: abs_speciesDefineAllInScenario. | |
void | abs_speciesDefineAll (ArrayOfArrayOfSpeciesTag &abs_species, Index &propmat_clearsky_agenda_checked, const Verbosity &verbosity) |
WORKSPACE METHOD: abs_speciesDefineAll. | |
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. | |
void | nlte_sourceFromTemperatureAndSrcCoefPerSpecies (StokesVector &nlte_source, ArrayOfStokesVector &dnlte_source_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 &) |
void | propmat_clearskyInit (PropagationMatrix &propmat_clearsky, StokesVector &nlte_source, ArrayOfPropagationMatrix &dpropmat_clearsky_dx, ArrayOfStokesVector &dnlte_source_dx, const ArrayOfRetrievalQuantity &jacobian_quantities, const Vector &f_grid, const Index &stokes_dim, const Index &propmat_clearsky_agenda_checked, const Verbosity &) |
WORKSPACE METHOD: propmat_clearskyInit. | |
void | propmat_clearskyAddFaraday (PropagationMatrix &propmat_clearsky, ArrayOfPropagationMatrix &dpropmat_clearsky_dx, const Index &stokes_dim, const Index &atmosphere_dim, const Vector &f_grid, const ArrayOfArrayOfSpeciesTag &abs_species, const ArrayOfSpeciesTag &select_abs_species, const ArrayOfRetrievalQuantity &jacobian_quantities, const Vector &rtp_vmr, const Vector &rtp_los, const Vector &rtp_mag, const Verbosity &) |
WORKSPACE METHOD: propmat_clearskyAddFaraday. | |
void | propmat_clearskyAddParticles (PropagationMatrix &propmat_clearsky, ArrayOfPropagationMatrix &dpropmat_clearsky_dx, const Index &stokes_dim, const Index &atmosphere_dim, const Vector &f_grid, const ArrayOfArrayOfSpeciesTag &abs_species, const ArrayOfSpeciesTag &select_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. | |
void | sparse_f_gridFromFrequencyGrid (Vector &sparse_f_grid, const Vector &f_grid, const Numeric &sparse_df, const String &speedup_option, const Verbosity &) |
WORKSPACE METHOD: sparse_f_gridFromFrequencyGrid. | |
Vector | create_sparse_f_grid_internal (const Vector &f_grid, const Numeric &sparse_df, const String &speedup_option, const Verbosity &verbosity) |
void | propmat_clearskyAddLines (PropagationMatrix &propmat_clearsky, StokesVector &nlte_source, ArrayOfPropagationMatrix &dpropmat_clearsky_dx, ArrayOfStokesVector &dnlte_source_dx, const Vector &f_grid, const ArrayOfArrayOfSpeciesTag &abs_species, const ArrayOfSpeciesTag &select_abs_species, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfArrayOfAbsorptionLines &abs_lines_per_species, const SpeciesIsotopologueRatios &isotopologue_ratios, const Numeric &rtp_pressure, const Numeric &rtp_temperature, const EnergyLevelMap &rtp_nlte, const Vector &rtp_vmr, const Index &nlte_do, const Index &lbl_checked, const Numeric &sparse_df, const Numeric &sparse_lim, const String &speedup_option, const Index &robust, const Verbosity &verbosity) |
WORKSPACE METHOD: propmat_clearskyAddLines. | |
void | propmat_clearskyZero (PropagationMatrix &propmat_clearsky, const Vector &f_grid, const Index &stokes_dim, const Verbosity &) |
WORKSPACE METHOD: propmat_clearskyZero. | |
void | propmat_clearskyForceNegativeToZero (PropagationMatrix &propmat_clearsky, const Verbosity &) |
WORKSPACE METHOD: propmat_clearskyForceNegativeToZero. | |
void | isotopologue_ratiosInitFromBuiltin (SpeciesIsotopologueRatios &isotopologue_ratios, const Verbosity &) |
WORKSPACE METHOD: isotopologue_ratiosInitFromBuiltin. | |
void | isotopologue_ratiosInitFromHitran (SpeciesIsotopologueRatios &isotopologue_ratios, const Verbosity &) |
WORKSPACE METHOD: isotopologue_ratiosInitFromHitran. | |
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. | |
void | propmat_clearsky_agendaAuto (Workspace &ws, Agenda &propmat_clearsky_agenda, Index &propmat_clearsky_agenda_checked, const ArrayOfArrayOfSpeciesTag &abs_species, const ArrayOfArrayOfAbsorptionLines &abs_lines_per_species, const Numeric &H, const Numeric &T_extrapolfac, const Numeric &eta, const Numeric &extpolfac, const Numeric &force_p, const Numeric &force_t, const Index &ignore_errors, const Numeric &lines_sparse_df, const Numeric &lines_sparse_lim, const String &lines_speedup_option, const Index &manual_mag_field, const Index &no_negatives, const Numeric &theta, const Index &use_abs_as_ext, const Index &use_abs_lookup_ind, const Verbosity &verbosity) |
WORKSPACE METHOD: propmat_clearsky_agendaAuto. | |
Variables | |
constexpr Numeric | ELECTRON_CHARGE =-Constant::elementary_charge |
constexpr Numeric | ELECTRON_MASS =Constant::electron_mass |
constexpr Numeric | PI =Constant::pi |
constexpr Numeric | SPEED_OF_LIGHT =Constant::speed_of_light |
constexpr Numeric | VACUUM_PERMITTIVITY =Constant::vacuum_permittivity |
Stuff related to the calculation of absorption coefficients.
Definition in file m_abs.cc.
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
[out] | abs_lines_per_species | WS Output |
[in] | abs_lines | WS Input |
[in] | abs_species | WS Input |
Definition at line 84 of file m_abs.cc.
References a, Absorption::Lines::AppendSingleLine(), b, Absorption::Lines::Isotopologue(), Absorption::Lines::lines, Array< base >::nelem(), Absorption::Lines::NumLines(), Absorption::Lines::PopLine(), and Absorption::Lines::ReverseLines().
Referenced by abs_lines_per_speciesCreateFromLines_g(), abs_lines_per_speciesReadSpeciesSplitCatalog(), and abs_linesWriteSpeciesSplitCatalog().
void abs_speciesDefineAll | ( | ArrayOfArrayOfSpeciesTag & | abs_species, |
Index & | propmat_clearsky_agenda_checked, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: abs_speciesDefineAll.
Sets abs_species [i][0] to all species in ARTS
[out] | abs_species | WS Output |
[out] | propmat_clearsky_agenda_checked | WS Output |
Definition at line 203 of file m_abs.cc.
References abs_speciesSet().
Referenced by abs_speciesDefineAll_g().
void abs_speciesDefineAllInScenario | ( | ArrayOfArrayOfSpeciesTag & | abs_species, |
Index & | propmat_clearsky_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.
[out] | abs_species | WS Output |
[out] | propmat_clearsky_agenda_checked | WS Output |
[in] | basename | Generic Input |
Definition at line 155 of file m_abs.cc.
References CREATE_OUT2, find_xml_file(), and Array< base >::nelem().
Referenced by abs_speciesDefineAllInScenario_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, | ||
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!
[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 226 of file m_abs.cc.
References ARTS_USER_ERROR_IF.
Referenced by AbsInputFromAtmFields_g().
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 & | |||
) |
Vector create_sparse_f_grid_internal | ( | const Vector & | f_grid, |
const Numeric & | sparse_df, | ||
const String & | speedup_option, | ||
const Verbosity & | verbosity | ||
) |
Definition at line 809 of file m_abs.cc.
References sparse_f_gridFromFrequencyGrid().
Referenced by propmat_clearskyAddLines().
void isotopologue_ratiosInitFromBuiltin | ( | SpeciesIsotopologueRatios & | isotopologue_ratios, |
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: isotopologue_ratiosInitFromBuiltin.
Initialize isotopologue ratios with default values from built-in species data. This should be OK for Earth-like atmospheres
[out] | isotopologue_ratios | WS Output |
Definition at line 1042 of file m_abs.cc.
References Species::isotopologue_ratiosInitFromBuiltin().
Referenced by isotopologue_ratiosInitFromBuiltin_g().
void isotopologue_ratiosInitFromHitran | ( | SpeciesIsotopologueRatios & | isotopologue_ratios, |
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: isotopologue_ratiosInitFromHitran.
Initialize isotopologue ratios with default values from built-in Hitran species data.
[out] | isotopologue_ratios | WS Output |
Definition at line 1048 of file m_abs.cc.
References Hitran::isotopologue_ratios().
Referenced by isotopologue_ratiosInitFromHitran_g().
void nlte_sourceFromTemperatureAndSrcCoefPerSpecies | ( | StokesVector & | nlte_source, |
ArrayOfStokesVector & | dnlte_source_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 & | |||
) |
Definition at line 252 of file m_abs.cc.
References ARTS_USER_ERROR_IF, dplanck_df(), dplanck_dt(), is_frequency_parameter(), Array< base >::nelem(), and planck().
void propmat_clearsky_agendaAuto | ( | Workspace & | ws, |
Agenda & | propmat_clearsky_agenda, | ||
Index & | propmat_clearsky_agenda_checked, | ||
const ArrayOfArrayOfSpeciesTag & | abs_species, | ||
const ArrayOfArrayOfAbsorptionLines & | abs_lines_per_species, | ||
const Numeric & | H, | ||
const Numeric & | T_extrapolfac, | ||
const Numeric & | eta, | ||
const Numeric & | extpolfac, | ||
const Numeric & | force_p, | ||
const Numeric & | force_t, | ||
const Index & | ignore_errors, | ||
const Numeric & | lines_sparse_df, | ||
const Numeric & | lines_sparse_lim, | ||
const String & | lines_speedup_option, | ||
const Index & | manual_mag_field, | ||
const Index & | no_negatives, | ||
const Numeric & | theta, | ||
const Index & | use_abs_as_ext, | ||
const Index & | use_abs_lookup, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: propmat_clearsky_agendaAuto.
Sets the propmat_clearsky_agenda automatically
This method introspects the input and uses it for generating the propmat_clearsky_agenda* automatically. If use_abs_lookup
, all methods that can be used to generate the absorption lookup table are ignored and instead the calculations from the absorption lookup are used.
The following methods are considered for addition: <br> 1) propmat_clearskyInit <br> 2) propmat_clearskyAddCIA <br> 3) propmat_clearskyAddLines <br> 4) propmat_clearskyAddZeeman <br> 5) propmat_clearskyAddFaraday <br> 6) propmat_clearskyAddXsecFit <br> 7) propmat_clearskyAddParticles <br> 8) propmat_clearskyAddFromLookup <br> 9) propmat_clearskyAddPredefined <br> 10) propmat_clearskyAddOnTheFlyLineMixing <br> 11) propmat_clearskyAddHitranLineMixingLines <br> 12) propmat_clearskyAddOnTheFlyLineMixingWithZeeman
To perform absorption lookupo table calculation, call: <br> 1) propmat_clearsky_agendaAuto <br> 2) abs_lookupCalc <br> 3) propmat_clearsky_agendaAuto (use_abs_lookup=1) <br> 4) Perform other calculations
[in,out] | ws | Workspace |
[out] | propmat_clearsky_agenda | WS Output |
[out] | propmat_clearsky_agenda_checked | WS Output |
[in] | abs_species | WS Input |
[in] | abs_lines_per_species | WS Input |
[in] | H | Generic Input (Default: "1.0") |
[in] | T_extrapolfac | Generic Input (Default: "0.5") |
[in] | eta | Generic Input (Default: "0.0") |
[in] | extpolfac | Generic Input (Default: "0.5") |
[in] | force_p | Generic Input (Default: "-1") |
[in] | force_t | Generic Input (Default: "-1") |
[in] | ignore_errors | Generic Input (Default: "0") |
[in] | lines_sparse_df | Generic Input (Default: "0") |
[in] | lines_sparse_lim | Generic Input (Default: "0") |
[in] | lines_speedup_option | Generic Input (Default: "None") |
[in] | manual_mag_field | Generic Input (Default: "0") |
[in] | no_negatives | Generic Input (Default: "1") |
[in] | theta | Generic Input (Default: "0.0") |
[in] | use_abs_as_ext | Generic Input (Default: "1") |
[in] | use_abs_lookup | Generic Input (Default: "0") |
Definition at line 1224 of file m_abs.cc.
References AgendaManip::AgendaCreator::add(), AbsorptionPopulationTagTypeStatus::ByHITRANFullRelmat, AbsorptionPopulationTagTypeStatus::ByHITRANRosenkranzRelmat, AbsorptionPopulationTagTypeStatus::ByMakarovFullRelmat, AbsorptionPopulationTagTypeStatus::ByRovibLinearDipoleLineMixing, SpeciesTagTypeStatus::Cia, CREATE_OUT3, AgendaManip::AgendaCreator::finalize(), SpeciesTagTypeStatus::FreeElectrons, AbsorptionPopulationTagTypeStatus::LTE, AbsorptionPopulationTagTypeStatus::NLTE, SpeciesTagTypeStatus::Particles, SpeciesTagTypeStatus::Plain, AbsorptionTagTypesStatus::population, SpeciesTagTypeStatus::Predefined, AbsorptionPopulationTagTypeStatus::VibTemps, SpeciesTagTypeStatus::XsecFit, and SpeciesTagTypeStatus::Zeeman.
Referenced by propmat_clearsky_agendaAuto_g().
void propmat_clearskyAddFaraday | ( | PropagationMatrix & | propmat_clearsky, |
ArrayOfPropagationMatrix & | dpropmat_clearsky_dx, | ||
const Index & | stokes_dim, | ||
const Index & | atmosphere_dim, | ||
const Vector & | f_grid, | ||
const ArrayOfArrayOfSpeciesTag & | abs_species, | ||
const ArrayOfSpeciesTag & | select_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.
[in,out] | propmat_clearsky | WS Input/Output |
[in,out] | dpropmat_clearsky_dx | WS Input/Output |
[in] | stokes_dim | WS Input |
[in] | atmosphere_dim | WS Input |
[in] | f_grid | WS Input |
[in] | abs_species | WS Input |
[in] | select_abs_species | WS Input |
[in] | jacobian_quantities | WS Input |
[in] | rtp_vmr | WS Input |
[in] | rtp_los | WS Input |
[in] | rtp_mag | WS Input |
Definition at line 400 of file m_abs.cc.
References ARTS_USER_ERROR_IF, do_magnetic_jacobian(), dotprod_with_los(), ELECTRON_CHARGE, ELECTRON_MASS, is_frequency_parameter(), magnetic_field_perturbation(), Array< base >::nelem(), PI, SPEED_OF_LIGHT, and VACUUM_PERMITTIVITY.
Referenced by propmat_clearskyAddFaraday_g().
void propmat_clearskyAddLines | ( | PropagationMatrix & | propmat_clearsky, |
StokesVector & | nlte_source, | ||
ArrayOfPropagationMatrix & | dpropmat_clearsky_dx, | ||
ArrayOfStokesVector & | dnlte_source_dx, | ||
const Vector & | f_grid, | ||
const ArrayOfArrayOfSpeciesTag & | abs_species, | ||
const ArrayOfSpeciesTag & | select_abs_species, | ||
const ArrayOfRetrievalQuantity & | jacobian_quantities, | ||
const ArrayOfArrayOfAbsorptionLines & | abs_lines_per_species, | ||
const SpeciesIsotopologueRatios & | isotopologue_ratios, | ||
const Numeric & | rtp_pressure, | ||
const Numeric & | rtp_temperature, | ||
const EnergyLevelMap & | rtp_nlte, | ||
const Vector & | rtp_vmr, | ||
const Index & | nlte_do, | ||
const Index & | lbl_checked, | ||
const Numeric & | lines_sparse_df, | ||
const Numeric & | lines_sparse_lim, | ||
const String & | lines_speedup_option, | ||
const Index & | no_negatives, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: propmat_clearskyAddLines.
Computes the line-by-line unpolarized absorption and adds it to the diagonal of propmat_clearsky and derivates to other variables. Does the same for NLTE variables if required.
If lines_speedup_option
is not "None", then some speed-up logic is applied. Valid speed-up logic other than "None" includes:
"LinearIndependent"
: <br> Using a sparse-grid, the points are separated as [f0, f0+df[0], f0+df[0], f0+df[1]...] <br> until the entire f_grid is covered. All sparse bins are on f_grid so df changes. <br> A linear interpolation scheme is used between the bins to fill up the dense <br> absorption. The maximum of df[n] is given by lines_sparse_df
and the minimum <br> transition between dense-to-sparse grid calculations are given by lines_sparse_lim
."QuadraticIndependent"
: <br> Using a sparse-grid, the points are separated as [f0, f0+0.5*df[0], f0+df[0], f0+df[0], f0+0.5*df[1], f0+df[1]...] <br> until the entire f_grid is covered. All sparse bins are on f_grid so df changes. <br> A quadratic interpolation scheme is used between the bins to fill up the dense <br> absorption. The maximum of df[n] is given by lines_sparse_df
and the minimum <br> transition between dense-to-sparse grid calculations are given by lines_sparse_lim
.Please use sparse_f_gridFromFrequencyGrid to see the sparse frequency grid
By default we discourage negative values, which are common when using one of the line mixing approximations. Change the value of no_negatives to 0 to allow these negative absorptions.
[in,out] | propmat_clearsky | WS Input/Output |
[in,out] | nlte_source | WS Input/Output |
[in,out] | dpropmat_clearsky_dx | WS Input/Output |
[in,out] | dnlte_source_dx | WS Input/Output |
[in] | f_grid | WS Input |
[in] | abs_species | WS Input |
[in] | select_abs_species | WS Input |
[in] | jacobian_quantities | WS Input |
[in] | abs_lines_per_species | WS Input |
[in] | isotopologue_ratios | WS Input |
[in] | rtp_pressure | WS Input |
[in] | rtp_temperature | WS Input |
[in] | rtp_nlte | WS Input |
[in] | rtp_vmr | WS Input |
[in] | nlte_do | WS Input |
[in] | lbl_checked | WS Input |
[in] | lines_sparse_df | Generic Input (Default: "0") |
[in] | lines_sparse_lim | Generic Input (Default: "0") |
[in] | lines_speedup_option | Generic Input (Default: "None") |
[in] | no_negatives | Generic Input (Default: "1") |
Definition at line 821 of file m_abs.cc.
References any_negative(), arts_omp_get_max_threads(), arts_omp_get_thread_num(), arts_omp_in_parallel(), ARTS_USER_ERROR_IF, check_abs_species(), LineShape::compute(), create_sparse_f_grid_internal(), LineShape::ComputeData::dF, LineShape::ComputeData::dN, LineShape::ComputeData::F, flat_index(), LineShape::ComputeData::interp_add_even(), LineShape::ComputeData::interp_add_triplequad(), LineShape::ComputeData::N, Array< base >::nelem(), Zeeman::None, and EnergyLevelMap::value.
Referenced by propmat_clearskyAddLines_g().
void propmat_clearskyAddParticles | ( | PropagationMatrix & | propmat_clearsky, |
ArrayOfPropagationMatrix & | dpropmat_clearsky_dx, | ||
const Index & | stokes_dim, | ||
const Index & | atmosphere_dim, | ||
const Vector & | f_grid, | ||
const ArrayOfArrayOfSpeciesTag & | abs_species, | ||
const ArrayOfSpeciesTag & | select_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 '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.
[in,out] | propmat_clearsky | WS Input/Output |
[in,out] | dpropmat_clearsky_dx | WS Input/Output |
[in] | stokes_dim | WS Input |
[in] | atmosphere_dim | WS Input |
[in] | f_grid | WS Input |
[in] | abs_species | WS Input |
[in] | select_abs_species | WS Input |
[in] | jacobian_quantities | WS Input |
[in] | rtp_vmr | WS Input |
[in] | rtp_los | WS Input |
[in] | rtp_temperature | WS Input |
[in] | scat_data | WS Input |
[in] | scat_data_checked | WS Input |
[in] | use_abs_as_ext | Generic Input (Default: "1") |
Definition at line 513 of file m_abs.cc.
References ARTS_ASSERT, ARTS_USER_ERROR_IF, CREATE_OUT1, do_frequency_jacobian(), do_temperature_jacobian(), mirror_los(), Array< base >::nelem(), opt_prop_NScatElems(), temperature_perturbation(), and TotalNumberOfElements().
Referenced by propmat_clearskyAddParticles_g().
void propmat_clearskyForceNegativeToZero | ( | PropagationMatrix & | 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!
[in,out] | propmat_clearsky | WS Input/Output |
Definition at line 1035 of file m_abs.cc.
Referenced by propmat_clearskyForceNegativeToZero_g().
void propmat_clearskyInit | ( | PropagationMatrix & | propmat_clearsky, |
StokesVector & | nlte_source, | ||
ArrayOfPropagationMatrix & | dpropmat_clearsky_dx, | ||
ArrayOfStokesVector & | dnlte_source_dx, | ||
const ArrayOfRetrievalQuantity & | jacobian_quantities, | ||
const Vector & | f_grid, | ||
const Index & | stokes_dim, | ||
const Index & | propmat_clearsky_agenda_checked, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: propmat_clearskyInit.
Initialize propmat_clearsky, nlte_source, and their derivatives to zeroes.
This method must be used inside propmat_clearsky_agenda and then be called first.
[out] | propmat_clearsky | WS Output |
[out] | nlte_source | WS Output |
[out] | dpropmat_clearsky_dx | WS Output |
[out] | dnlte_source_dx | WS Output |
[in] | jacobian_quantities | WS Input |
[in] | f_grid | WS Input |
[in] | stokes_dim | WS Input |
[in] | propmat_clearsky_agenda_checked | WS Input |
Definition at line 330 of file m_abs.cc.
References ARTS_USER_ERROR_IF, and Array< base >::nelem().
Referenced by propmat_clearskyInit_g().
void propmat_clearskyZero | ( | PropagationMatrix & | 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).
[out] | propmat_clearsky | WS Output |
[in] | f_grid | WS Input |
[in] | stokes_dim | WS Input |
Definition at line 1027 of file m_abs.cc.
Referenced by propmat_clearskyZero_g().
void sparse_f_gridFromFrequencyGrid | ( | Vector & | sparse_f_grid, |
const Vector & | f_grid, | ||
const Numeric & | sparse_df, | ||
const String & | speedup_option, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: sparse_f_gridFromFrequencyGrid.
Outputs the sparse frequency grid in propmat_clearskyAddLines
[out] | sparse_f_grid | Generic output |
[in] | f_grid | WS Input |
[in] | sparse_df | Generic Input (Default: "0") |
[in] | speedup_option | Generic Input (Default: "None") |
Definition at line 781 of file m_abs.cc.
References ARTS_ASSERT, LineShape::good_linear_sparse_f_grid(), LineShape::linear_sparse_f_grid(), and LineShape::triple_sparse_f_grid().
Referenced by create_sparse_f_grid_internal(), and sparse_f_gridFromFrequencyGrid_g().
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).
[in] | f_grid | WS Input |
[in] | z_field | WS Input |
[in] | propmat_clearsky_field | WS Input |
[in] | atmosphere_dim | WS Input |
[in] | filename | Generic Input |
Definition at line 1056 of file m_abs.cc.
References ARTS_USER_ERROR_IF, nca_error(), and SPEED_OF_LIGHT.
Referenced by WriteMolTau_g().
|
inlineconstexpr |
Definition at line 54 of file m_abs.cc.
Referenced by propmat_clearskyAddFaraday().
|
inlineconstexpr |
Definition at line 55 of file m_abs.cc.
Referenced by propmat_clearskyAddFaraday().
|
inlineconstexpr |
Definition at line 56 of file m_abs.cc.
Referenced by propmat_clearskyAddFaraday().
|
inlineconstexpr |
Definition at line 57 of file m_abs.cc.
Referenced by propmat_clearskyAddFaraday(), and WriteMolTau().
|
inlineconstexpr |
Definition at line 58 of file m_abs.cc.
Referenced by propmat_clearskyAddFaraday().