ARTS
2.4.0(git:4fb77825)
|
Workspace functions related to the jacobian. More...
#include <cmath>
#include <string>
#include "absorption.h"
#include "arts.h"
#include "auto_md.h"
#include "check_input.h"
#include "cloudbox.h"
#include "interpolation_poly.h"
#include "jacobian.h"
#include "m_xml.h"
#include "math_funcs.h"
#include "messages.h"
#include "physics_funcs.h"
#include "rte.h"
Go to the source code of this file.
Functions | |
void | jacobianCalcDoNothing (Matrix &jacobian, const Index &mblock_index, const Vector &iyb, const Vector &yb, const Verbosity &) |
WORKSPACE METHOD: jacobianCalcDoNothing. More... | |
void | jacobianClose (Workspace &ws, Index &jacobian_do, Agenda &jacobian_agenda, const ArrayOfRetrievalQuantity &jacobian_quantities, const Verbosity &verbosity) |
WORKSPACE METHOD: jacobianClose. More... | |
void | jacobianInit (ArrayOfRetrievalQuantity &jacobian_quantities, Agenda &jacobian_agenda, const Verbosity &) |
WORKSPACE METHOD: jacobianInit. More... | |
void | jacobianOff (Index &jacobian_do, Agenda &jacobian_agenda, ArrayOfRetrievalQuantity &jacobian_quantities, const Verbosity &verbosity) |
WORKSPACE METHOD: jacobianOff. More... | |
void | jacobianAddAbsSpecies (Workspace &, ArrayOfRetrievalQuantity &jq, Agenda &jacobian_agenda, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Vector &rq_p_grid, const Vector &rq_lat_grid, const Vector &rq_lon_grid, const String &species, const String &mode, const Index &for_species_tag, const Verbosity &verbosity) |
WORKSPACE METHOD: jacobianAddAbsSpecies. More... | |
void | jacobianAddFreqShift (Workspace &ws, ArrayOfRetrievalQuantity &jacobian_quantities, Agenda &jacobian_agenda, const Vector &f_grid, const Numeric &df, const Verbosity &) |
WORKSPACE METHOD: jacobianAddFreqShift. More... | |
void | jacobianCalcFreqShift (Matrix &jacobian, const Index &mblock_index, const Vector &iyb, const Vector &yb, const Index &stokes_dim, const Vector &f_grid, const Matrix &mblock_dlos_grid, const Sparse &sensor_response, const ArrayOfRetrievalQuantity &jacobian_quantities, const Verbosity &) |
WORKSPACE METHOD: jacobianCalcFreqShift. More... | |
void | jacobianAddFreqStretch (Workspace &ws, ArrayOfRetrievalQuantity &jacobian_quantities, Agenda &jacobian_agenda, const Vector &f_grid, const Numeric &df, const Verbosity &) |
WORKSPACE METHOD: jacobianAddFreqStretch. More... | |
void | jacobianCalcFreqStretch (Matrix &jacobian, const Index &mblock_index, const Vector &iyb, const Vector &yb, const Index &stokes_dim, const Vector &f_grid, const Matrix &mblock_dlos_grid, const Sparse &sensor_response, const ArrayOfIndex &sensor_response_pol_grid, const Vector &sensor_response_f_grid, const Matrix &sensor_response_dlos_grid, const ArrayOfRetrievalQuantity &jacobian_quantities, const Verbosity &) |
WORKSPACE METHOD: jacobianCalcFreqStretch. More... | |
void | jacobianAddPointingZa (Workspace &ws, ArrayOfRetrievalQuantity &jacobian_quantities, Agenda &jacobian_agenda, const Matrix &sensor_pos, const Vector &sensor_time, const Index &poly_order, const String &calcmode, const Numeric &dza, const Verbosity &) |
WORKSPACE METHOD: jacobianAddPointingZa. More... | |
void | jacobianCalcPointingZaInterp (Matrix &jacobian, const Index &mblock_index, const Vector &iyb, const Vector &yb, const Index &stokes_dim, const Vector &f_grid, const Matrix &DEBUG_ONLY(sensor_los), const Matrix &mblock_dlos_grid, const Sparse &sensor_response, const Vector &sensor_time, const ArrayOfRetrievalQuantity &jacobian_quantities, const Verbosity &) |
void | jacobianCalcPointingZaRecalc (Workspace &ws, Matrix &jacobian, const Index &mblock_index, const Vector &iyb, const Vector &yb, const Index &atmosphere_dim, const EnergyLevelMap &nlte_field, const Index &cloudbox_on, const Index &stokes_dim, const Vector &f_grid, const Matrix &sensor_pos, const Matrix &sensor_los, const Matrix &transmitter_pos, const Matrix &mblock_dlos_grid, const Sparse &sensor_response, const Vector &sensor_time, const String &iy_unit, const Agenda &iy_main_agenda, const Agenda &geo_pos_agenda, const ArrayOfRetrievalQuantity &jacobian_quantities, const Verbosity &verbosity) |
WORKSPACE METHOD: jacobianCalcPointingZaRecalc. More... | |
void | jacobianAddPolyfit (Workspace &ws, ArrayOfRetrievalQuantity &jq, Agenda &jacobian_agenda, const ArrayOfIndex &sensor_response_pol_grid, const Matrix &sensor_response_dlos_grid, const Matrix &sensor_pos, const Index &poly_order, const Index &no_pol_variation, const Index &no_los_variation, const Index &no_mblock_variation, const Verbosity &) |
WORKSPACE METHOD: jacobianAddPolyfit. More... | |
void | jacobianCalcPolyfit (Matrix &jacobian, const Index &mblock_index, const Vector &iyb, const Vector &yb, const Sparse &sensor_response, const ArrayOfIndex &sensor_response_pol_grid, const Vector &sensor_response_f_grid, const Matrix &sensor_response_dlos_grid, const ArrayOfRetrievalQuantity &jacobian_quantities, const Index &poly_coeff, const Verbosity &) |
WORKSPACE METHOD: jacobianCalcPolyfit. More... | |
void | jacobianAddScatSpecies (Workspace &, ArrayOfRetrievalQuantity &jq, Agenda &jacobian_agenda, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Vector &rq_p_grid, const Vector &rq_lat_grid, const Vector &rq_lon_grid, const String &species, const String &quantity, const Verbosity &verbosity) |
WORKSPACE METHOD: jacobianAddScatSpecies. More... | |
void | jacobianAddSinefit (Workspace &ws, ArrayOfRetrievalQuantity &jq, Agenda &jacobian_agenda, const ArrayOfIndex &sensor_response_pol_grid, const Matrix &sensor_response_dlos_grid, const Matrix &sensor_pos, const Vector &period_lengths, const Index &no_pol_variation, const Index &no_los_variation, const Index &no_mblock_variation, const Verbosity &) |
WORKSPACE METHOD: jacobianAddSinefit. More... | |
void | jacobianCalcSinefit (Matrix &jacobian, const Index &mblock_index, const Vector &iyb, const Vector &yb, const Sparse &sensor_response, const ArrayOfIndex &sensor_response_pol_grid, const Vector &sensor_response_f_grid, const Matrix &sensor_response_dlos_grid, const ArrayOfRetrievalQuantity &jacobian_quantities, const Index &period_index, const Verbosity &) |
WORKSPACE METHOD: jacobianCalcSinefit. More... | |
void | jacobianAddSurfaceQuantity (Workspace &, ArrayOfRetrievalQuantity &jq, Agenda &jacobian_agenda, const Index &atmosphere_dim, const Vector &lat_grid, const Vector &lon_grid, const Vector &rq_lat_grid, const Vector &rq_lon_grid, const String &quantity, const Verbosity &verbosity) |
WORKSPACE METHOD: jacobianAddSurfaceQuantity. More... | |
void | jacobianAddTemperature (Workspace &, ArrayOfRetrievalQuantity &jq, Agenda &jacobian_agenda, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Vector &rq_p_grid, const Vector &rq_lat_grid, const Vector &rq_lon_grid, const String &hse, const Verbosity &verbosity) |
WORKSPACE METHOD: jacobianAddTemperature. More... | |
void | jacobianAddWind (Workspace &, ArrayOfRetrievalQuantity &jq, Agenda &jacobian_agenda, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Vector &rq_p_grid, const Vector &rq_lat_grid, const Vector &rq_lon_grid, const String &component, const Numeric &dfrequency, const Verbosity &verbosity) |
WORKSPACE METHOD: jacobianAddWind. More... | |
void | jacobianAddMagField (Workspace &, ArrayOfRetrievalQuantity &jq, Agenda &jacobian_agenda, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Vector &rq_p_grid, const Vector &rq_lat_grid, const Vector &rq_lon_grid, const String &component, const Numeric &dB, const Verbosity &verbosity) |
WORKSPACE METHOD: jacobianAddMagField. More... | |
void | jacobianAddShapeCatalogParameter (Workspace &, ArrayOfRetrievalQuantity &jq, Agenda &jacobian_agenda, const QuantumIdentifier &line_identity, const String &species, const String &variable, const String &coefficient, const Verbosity &verbosity) |
WORKSPACE METHOD: jacobianAddShapeCatalogParameter. More... | |
void | jacobianAddShapeCatalogParameters (Workspace &ws, ArrayOfRetrievalQuantity &jq, Agenda &jacobian_agenda, const ArrayOfQuantumIdentifier &line_identities, const ArrayOfString &species, const ArrayOfString &variables, const ArrayOfString &coefficients, const Verbosity &verbosity) |
WORKSPACE METHOD: jacobianAddShapeCatalogParameters. More... | |
void | jacobianAddBasicCatalogParameter (Workspace &, ArrayOfRetrievalQuantity &jq, Agenda &jacobian_agenda, const QuantumIdentifier &catalog_identity, const String &catalog_parameter, const Verbosity &verbosity) |
WORKSPACE METHOD: jacobianAddBasicCatalogParameter. More... | |
void | jacobianAddBasicCatalogParameters (Workspace &ws, ArrayOfRetrievalQuantity &jq, Agenda &jacobian_agenda, const ArrayOfQuantumIdentifier &catalog_identities, const ArrayOfString &catalog_parameters, const Verbosity &verbosity) |
WORKSPACE METHOD: jacobianAddBasicCatalogParameters. More... | |
void | jacobianAddNLTE (Workspace &, ArrayOfRetrievalQuantity &jq, Agenda &jacobian_agenda, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Vector &rq_p_grid, const Vector &rq_lat_grid, const Vector &rq_lon_grid, const QuantumIdentifier &energy_level_identity, const Numeric &dx, const Verbosity &verbosity) |
WORKSPACE METHOD: jacobianAddNLTE. More... | |
void | jacobianAddNLTEs (Workspace &ws, ArrayOfRetrievalQuantity &jq, Agenda &jacobian_agenda, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Vector &rq_p_grid, const Vector &rq_lat_grid, const Vector &rq_lon_grid, const ArrayOfQuantumIdentifier &energy_level_identities, const Numeric &dx, const Verbosity &verbosity) |
WORKSPACE METHOD: jacobianAddNLTEs. More... | |
void | jacobianAddSpecialSpecies (Workspace &, ArrayOfRetrievalQuantity &jq, Agenda &jacobian_agenda, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Vector &rq_p_grid, const Vector &rq_lat_grid, const Vector &rq_lon_grid, const String &species, const Verbosity &verbosity) |
WORKSPACE METHOD: jacobianAddSpecialSpecies. More... | |
void | jacobianAdjustAndTransform (Matrix &jacobian, const ArrayOfRetrievalQuantity &jacobian_quantities, const Vector &x, const Verbosity &) |
WORKSPACE METHOD: jacobianAdjustAndTransform. More... | |
void | jacobianSetAffineTransformation (ArrayOfRetrievalQuantity &jqs, const Matrix &transformation_matrix, const Vector &offset_vector, const Verbosity &) |
WORKSPACE METHOD: jacobianSetAffineTransformation. More... | |
void | jacobianSetFuncTransformation (ArrayOfRetrievalQuantity &jqs, const String &transformation_func, const Numeric &z_min, const Numeric &z_max, const Verbosity &) |
WORKSPACE METHOD: jacobianSetFuncTransformation. More... | |
void | AtmFieldPerturb (Tensor3 &perturbed_field, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &original_field, const Vector &p_ret_grid, const Vector &lat_ret_grid, const Vector &lon_ret_grid, const Index &pert_index, const Numeric &pert_size, const String &pert_mode, const Verbosity &) |
WORKSPACE METHOD: AtmFieldPerturb. More... | |
void | AtmFieldPerturbAtmGrids (Tensor3 &perturbed_field, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &original_field, const Index &pert_index, const Numeric &pert_size, const String &pert_mode, const Verbosity &) |
WORKSPACE METHOD: AtmFieldPerturbAtmGrids. More... | |
void | IndexNumberOfAtmosphericPoints (Index &n, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Verbosity &) |
WORKSPACE METHOD: IndexNumberOfAtmosphericPoints. More... | |
void | jacobianFromTwoY (Matrix &jacobian, const Vector &y_pert, const Vector &y, const Numeric &pert_size, const Verbosity &) |
WORKSPACE METHOD: jacobianFromTwoY. More... | |
void | jacobianFromYbatch (Matrix &jacobian, const ArrayOfVector &ybatch, const Vector &y, const Numeric &pert_size, const Verbosity &) |
WORKSPACE METHOD: jacobianFromYbatch. More... | |
void | particle_bulkprop_fieldPerturb (Tensor4 &particle_bulkprop_field, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const ArrayOfString &particle_bulkprop_names, const String &particle_type, const Vector &p_ret_grid, const Vector &lat_ret_grid, const Vector &lon_ret_grid, const Index &pert_index, const Numeric &pert_size, const String &pert_mode, const Verbosity &verbosity) |
WORKSPACE METHOD: particle_bulkprop_fieldPerturb. More... | |
void | particle_bulkprop_fieldPerturbAtmGrids (Tensor4 &particle_bulkprop_field, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const ArrayOfString &particle_bulkprop_names, const String &particle_type, const Index &pert_index, const Numeric &pert_size, const String &pert_mode, const Verbosity &verbosity) |
WORKSPACE METHOD: particle_bulkprop_fieldPerturbAtmGrids. More... | |
void | vmr_fieldPerturb (Tensor4 &vmr_field, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const ArrayOfArrayOfSpeciesTag &abs_species, const String &species, const Vector &p_ret_grid, const Vector &lat_ret_grid, const Vector &lon_ret_grid, const Index &pert_index, const Numeric &pert_size, const String &pert_mode, const Verbosity &verbosity) |
WORKSPACE METHOD: vmr_fieldPerturb. More... | |
void | vmr_fieldPerturbAtmGrids (Tensor4 &vmr_field, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const ArrayOfArrayOfSpeciesTag &abs_species, const String &species, const Index &pert_index, const Numeric &pert_size, const String &pert_mode, const Verbosity &verbosity) |
WORKSPACE METHOD: vmr_fieldPerturbAtmGrids. More... | |
void AtmFieldPerturb | ( | Tensor3 & | perturbed_field, |
const Index & | atmosphere_dim, | ||
const Vector & | p_grid, | ||
const Vector & | lat_grid, | ||
const Vector & | lon_grid, | ||
const Tensor3 & | original_field, | ||
const Vector & | p_ret_grid, | ||
const Vector & | lat_ret_grid, | ||
const Vector & | lon_ret_grid, | ||
const Index & | pert_index, | ||
const Numeric & | pert_size, | ||
const String & | pert_mode, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: AtmFieldPerturb.
Adds a perturbation to an atmospheric field.
The shape and position of the perturbation follow the retrieval grids. That is, the shape of the perturbation has a traingular shape, with breake points at the retrieval grid points. The position is given as an index. This index matches the column in the Jacobian for the selected grid position.
If the retrieval grids fully match the atmospheric grids, you can use AtmFieldPerturbAtmGrids, that is faster. The description of that method can help to understand this method.
[out] | perturbed_field | Generic output |
[in] | atmosphere_dim | WS Input |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | original_field | Generic Input |
[in] | p_ret_grid | Generic Input |
[in] | lat_ret_grid | Generic Input |
[in] | lon_ret_grid | Generic Input |
[in] | pert_index | Generic Input |
[in] | pert_size | Generic Input |
[in] | pert_mode | Generic Input (Default: "absolute") |
Definition at line 2085 of file m_jacobian.cc.
References ARTS::Var::atmosphere_dim(), chk_atm_field(), get_gp_rq_to_atmgrids(), ARTS::Var::lat_grid(), ARTS::Var::lon_grid(), ARTS::Var::p_grid(), regrid_atmfield_by_gp_oem(), reshape(), and ARTS::Var::x().
Referenced by AtmFieldPerturb_g(), particle_bulkprop_fieldPerturb(), and vmr_fieldPerturb().
void AtmFieldPerturbAtmGrids | ( | Tensor3 & | perturbed_field, |
const Index & | atmosphere_dim, | ||
const Vector & | p_grid, | ||
const Vector & | lat_grid, | ||
const Vector & | lon_grid, | ||
const Tensor3 & | original_field, | ||
const Index & | pert_index, | ||
const Numeric & | pert_size, | ||
const String & | pert_mode, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: AtmFieldPerturbAtmGrids.
As AtmFieldPerturb, but perturbation follows the atmospheric grids.
The method effectively performs this <br> perturbed_field = original_field <br> perturbed_field(p_index,lat_index,lon_index) += pert_size if not pert_mode is set to relative when this is done <br> perturbed_field = original_field <br> perturbed_field(p_index,lat_index,lon_index) *= 1*pert_size where p_index etc. are derived from pert_index.
[out] | perturbed_field | Generic output |
[in] | atmosphere_dim | WS Input |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | original_field | Generic Input |
[in] | pert_index | Generic Input |
[in] | pert_size | Generic Input |
[in] | pert_mode | Generic Input (Default: "absolute") |
Definition at line 2177 of file m_jacobian.cc.
References ARTS::Var::atmosphere_dim(), chk_atm_field(), ARTS::Var::lat_grid(), ARTS::Var::lon_grid(), and ARTS::Var::p_grid().
Referenced by AtmFieldPerturbAtmGrids_g(), particle_bulkprop_fieldPerturbAtmGrids(), and vmr_fieldPerturbAtmGrids().
void IndexNumberOfAtmosphericPoints | ( | Index & | n, |
const Index & | atmosphere_dim, | ||
const Vector & | p_grid, | ||
const Vector & | lat_grid, | ||
const Vector & | lon_grid, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: IndexNumberOfAtmosphericPoints.
Counts number of points in the atmosphere.
For a 3D atmosphere the method sets n to: <br> p_grid.nelem()*lat_grid.nelem()*lon_grid.nelem() For 1D and 2D the same calculation is done, but ignoring dimensions not active.
[out] | n | Generic output |
[in] | atmosphere_dim | WS Input |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
Definition at line 2239 of file m_jacobian.cc.
References ARTS::Var::atmosphere_dim(), ARTS::Var::lat_grid(), ARTS::Var::lon_grid(), and ARTS::Var::p_grid().
Referenced by IndexNumberOfAtmosphericPoints_g().
void jacobianAddAbsSpecies | ( | Workspace & | ws, |
ArrayOfRetrievalQuantity & | jacobian_quantities, | ||
Agenda & | jacobian_agenda, | ||
const Index & | atmosphere_dim, | ||
const Vector & | p_grid, | ||
const Vector & | lat_grid, | ||
const Vector & | lon_grid, | ||
const Vector & | g1, | ||
const Vector & | g2, | ||
const Vector & | g3, | ||
const String & | species, | ||
const String & | unit, | ||
const Index & | for_species_tag, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: jacobianAddAbsSpecies.
Includes an absorption species in the Jacobian.
For 1D or 2D calculations the latitude and/or longitude grid of the retrieval field should set to have zero length.
These retrieval units are at hand for all gas species: <br> "vmr" : Volume mixing ratio. <br> "nd" : Number density. <br> "rel" : Relative unit (e.g. 1.1 means 10% more of the gas).
For water vapour, also these units are at hand: <br> "rh" : Relative humidity. <br> "q" : Specific humidity.
Note that for_species_tag is used to indicate if species tag VMR, rather than atmospheric gas VMR is calculated. Set it to 0 and we calculate the atmospheric gas VMR, but this only works for "analytical".
Note that the Jacobian is set to zero where volume mixing ratio equals zero.
The number of elements added to the state vector (x) is: <br> n_g1 * n_g2 * n_g3 where n_g1, n_g2 and n_g3 are the length of GIN g1, g2 and g3, respectively. Here empty vectors should be considered to have a length 1. The elements are sorted with pressure as innermost loop, followed by latitude and longitude as outermost loop.
[in,out] | ws | Workspace |
[in,out] | jacobian_quantities | WS Input/Output |
[in,out] | jacobian_agenda | WS Input/Output |
[in] | atmosphere_dim | WS Input |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | g1 | Generic Input |
[in] | g2 | Generic Input |
[in] | g3 | Generic Input |
[in] | species | Generic Input |
[in] | unit | Generic Input (Default: "vmr") |
[in] | for_species_tag | Generic Input (Default: "1") |
Definition at line 159 of file m_jacobian.cc.
References ABSSPECIES_MAINTAG, RetrievalQuantity::Analytical(), array_species_tag_from_string(), ARTS::Var::atmosphere_dim(), check_retrieval_grids(), CREATE_OUT2, CREATE_OUT3, RetrievalQuantity::Grids(), Isotopologue, QuantumIdentifier::Isotopologue(), ARTS::Var::jacobian_agenda(), ARTS::Var::lat_grid(), ARTS::Var::lon_grid(), RetrievalQuantity::MainTag(), RetrievalQuantity::Mode(), Array< base >::nelem(), ARTS::Var::p_grid(), RetrievalQuantity::Perturbation(), PROPMAT_SUBSUBTAG, RetrievalQuantity::PropType(), RetrievalQuantity::QuantumIdentity(), QuantumIdentifier::SetAll(), Species, QuantumIdentifier::Species(), RetrievalQuantity::SubSubtag(), RetrievalQuantity::Subtag(), and VMR.
Referenced by abs_speciesAdd2(), jacobianAddAbsSpecies_g(), and retrievalAddAbsSpecies().
void jacobianAddBasicCatalogParameter | ( | Workspace & | ws, |
ArrayOfRetrievalQuantity & | jacobian_quantities, | ||
Agenda & | jacobian_agenda, | ||
const QuantumIdentifier & | catalog_identity, | ||
const String & | catalog_parameter, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: jacobianAddBasicCatalogParameter.
Includes a basic catalog parameter in the Jacobian. These are constant over all layers and so only a single vector output is returned.
The only basic catalog parameters currently supported are: <br> "Line Strength" <br> "Line Center"
The catalog_identity should be able to identify one or many lines in the catalog used for calculating the spectral absorption. Note that partial matching for energy levels are allowed but not recommended, as it is somewhat nonsensical to add multiple parameters
Also note jacobianAddShapeCatalogParameter as this allows addition of shape parameters, e.g., pressure broadening coefficients
Each call to this function adds just a single value to x.
Example given the catalog_identity="O2-66 TR UP v1 0 J 1 LO v1 0 J 0", only the O2 ground-level 119 GHz line can be accessed and only its catalog_parameter will be accessed. However, the more lenient catalog_identity="O2-66 TR UP J 1 LO J 0" may be used, but then the 118 GHz line belonging to v1=1 branch will be added to the same x.
[in,out] | ws | Workspace |
[in,out] | jacobian_quantities | WS Input/Output |
[in,out] | jacobian_agenda | WS Input/Output |
[in] | catalog_identity | Generic Input |
[in] | catalog_parameter | Generic Input |
Definition at line 1719 of file m_jacobian.cc.
References RetrievalQuantity::Analytical(), CATALOGPARAMETER_MAINTAG, CREATE_OUT3, RetrievalQuantity::IntegrationOn(), ARTS::Var::jacobian_agenda(), LINECENTER_MODE, LINESTRENGTH_MODE, RetrievalQuantity::MainTag(), RetrievalQuantity::Mode(), Array< base >::nelem(), PROPMAT_SUBSUBTAG, RetrievalQuantity::PropType(), RetrievalQuantity::QuantumIdentity(), and RetrievalQuantity::SubSubtag().
Referenced by jacobianAddBasicCatalogParameter_g(), jacobianAddBasicCatalogParameters(), and retrievalAddCatalogParameter().
void jacobianAddBasicCatalogParameters | ( | Workspace & | ws, |
ArrayOfRetrievalQuantity & | jacobian_quantities, | ||
Agenda & | jacobian_agenda, | ||
const ArrayOfQuantumIdentifier & | catalog_identities, | ||
const ArrayOfString & | catalog_parameters, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: jacobianAddBasicCatalogParameters.
See jacobianAddBasicCatalogParameter.
This adds a multiple of parameters for first each catalog_identity in catalog_identities and then for each catalog_parameter in catalog_parameters by looping calls to jacobianAddBasicCatalogParameter over these input
[in,out] | ws | Workspace |
[in,out] | jacobian_quantities | WS Input/Output |
[in,out] | jacobian_agenda | WS Input/Output |
[in] | catalog_identities | Generic Input |
[in] | catalog_parameters | Generic Input |
Definition at line 1773 of file m_jacobian.cc.
References CREATE_OUT2, ARTS::Var::jacobian_agenda(), jacobianAddBasicCatalogParameter(), Array< base >::nelem(), and ARTS::Var::verbosity().
Referenced by jacobianAddBasicCatalogParameters_g(), and retrievalAddCatalogParameters().
void jacobianAddFreqShift | ( | Workspace & | ws, |
ArrayOfRetrievalQuantity & | jacobian_quantities, | ||
Agenda & | jacobian_agenda, | ||
const Vector & | f_grid, | ||
const Numeric & | df, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: jacobianAddFreqShift.
Includes a frequency fit of shift type in the Jacobian.
Retrieval of deviations between nominal and actual backend frequencies can be included by this method. The assumption here is that the deviation is a constant off-set, a shift, common for all frequencies (and not varying between measurement blocks).
This method adds one element to the state vector (x).
[in,out] | ws | Workspace |
[in,out] | jacobian_quantities | WS Input/Output |
[in,out] | jacobian_agenda | WS Input/Output |
[in] | f_grid | WS Input |
[in] | df | Generic Input (Default: "100e3") |
Definition at line 271 of file m_jacobian.cc.
References RetrievalQuantity::Analytical(), ARTS::Var::f_grid(), FREQUENCY_MAINTAG, FREQUENCY_SUBTAG_0, RetrievalQuantity::Grids(), ARTS::Var::jacobian_agenda(), ARTS::Var::jacobian_quantities(), RetrievalQuantity::MainTag(), RetrievalQuantity::Mode(), RetrievalQuantity::Perturbation(), and RetrievalQuantity::Subtag().
Referenced by jacobianAddFreqShift_g(), and retrievalAddFreqShift().
void jacobianAddFreqStretch | ( | Workspace & | ws, |
ArrayOfRetrievalQuantity & | jacobian_quantities, | ||
Agenda & | jacobian_agenda, | ||
const Vector & | f_grid, | ||
const Numeric & | df, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: jacobianAddFreqStretch.
Includes a frequency fit of stretch type in the Jacobian.
Retrieval of deviations between nominal and actual backend frequencies can be included by this method. The assumption here is that the deviation varies linearly over the frequency range (following ARTS basis function for polynomial order 1).
This method adds one element to the state vector (x).
[in,out] | ws | Workspace |
[in,out] | jacobian_quantities | WS Input/Output |
[in,out] | jacobian_agenda | WS Input/Output |
[in] | f_grid | WS Input |
[in] | df | Generic Input (Default: "100e3") |
Definition at line 425 of file m_jacobian.cc.
References RetrievalQuantity::Analytical(), ARTS::Var::f_grid(), FREQUENCY_MAINTAG, FREQUENCY_SUBTAG_1, RetrievalQuantity::Grids(), ARTS::Var::jacobian_agenda(), ARTS::Var::jacobian_quantities(), RetrievalQuantity::MainTag(), RetrievalQuantity::Mode(), RetrievalQuantity::Perturbation(), and RetrievalQuantity::Subtag().
Referenced by jacobianAddFreqStretch_g(), and retrievalAddFreqStretch().
void jacobianAddMagField | ( | Workspace & | ws, |
ArrayOfRetrievalQuantity & | jacobian_quantities, | ||
Agenda & | jacobian_agenda, | ||
const Index & | atmosphere_dim, | ||
const Vector & | p_grid, | ||
const Vector & | lat_grid, | ||
const Vector & | lon_grid, | ||
const Vector & | g1, | ||
const Vector & | g2, | ||
const Vector & | g3, | ||
const String & | component, | ||
const Numeric & | dB, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: jacobianAddMagField.
Includes one magnetic field component in the Jacobian.
The method follows the pattern of other Jacobian methods. The calculations can only be performed by analytic expressions.
The magnetic field components are retrieved separately, and, hence, the argument component can be "u", "v", "w", and "strength".
The number of elements added to the state vector (x) is: <br> n_g1 * n_g2 * n_g3 where n_g1, n_g2 and n_g3 are the length of GIN g1, g2 and g3, respectively. Here empty vectors should be considered to have a length 1. The elements are sorted with pressure as innermost loop, followed by latitude and longitude as outermost loop.
The dB-parameter is only used for Faraday rotation
[in,out] | ws | Workspace |
[in,out] | jacobian_quantities | WS Input/Output |
[in,out] | jacobian_agenda | WS Input/Output |
[in] | atmosphere_dim | WS Input |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | g1 | Generic Input |
[in] | g2 | Generic Input |
[in] | g3 | Generic Input |
[in] | component | Generic Input (Default: "v") |
[in] | dB | Generic Input (Default: "1.0e-7") |
Definition at line 1557 of file m_jacobian.cc.
References RetrievalQuantity::Analytical(), ARTS::Var::atmosphere_dim(), check_retrieval_grids(), CREATE_OUT2, CREATE_OUT3, RetrievalQuantity::Grids(), ARTS::Var::jacobian_agenda(), ARTS::Var::lat_grid(), ARTS::Var::lon_grid(), MAGFIELD_MAINTAG, RetrievalQuantity::MainTag(), Array< base >::nelem(), ARTS::Var::p_grid(), RetrievalQuantity::Perturbation(), PROPMAT_SUBSUBTAG, RetrievalQuantity::PropType(), RetrievalQuantity::SubSubtag(), and RetrievalQuantity::Subtag().
Referenced by jacobianAddMagField_g(), and retrievalAddMagField().
void jacobianAddNLTE | ( | Workspace & | ws, |
ArrayOfRetrievalQuantity & | jacobian_quantities, | ||
Agenda & | jacobian_agenda, | ||
const Index & | atmosphere_dim, | ||
const Vector & | p_grid, | ||
const Vector & | lat_grid, | ||
const Vector & | lon_grid, | ||
const Vector & | g1, | ||
const Vector & | g2, | ||
const Vector & | g3, | ||
const QuantumIdentifier & | energy_level_identity, | ||
const Numeric & | dx, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: jacobianAddNLTE.
Experimental NLTE Jacobian.
Intention: Adds the nlte_field level distribution per atmospheric grid to the Jacobian.
The number of elements added to the state vector (x) is: <br> n_g1 * n_g2 * n_g3 where n_g1, n_g2 and n_g3 are the length of GIN g1, g2 and g3, respectively. Here empty vectors should be considered to have a length 1. The elements are sorted with pressure as innermost loop, followed by latitude and longitude as outermost loop.
The QuantumIdentifier should identify a single energy level, such as: "H2O-161 EN J 1 Ka 0 Kc 1", for one of the lower levels in the chains of transitions of water. Note that using this method directly is not best practice, as the quantum identifiers of the levels have to be known at an early stage in NLTE calculations, and will usually populate the nlte_level_identifiers* variable, meaning it is better to use jacobianAddNLTE directly than to individually call this function
[in,out] | ws | Workspace |
[in,out] | jacobian_quantities | WS Input/Output |
[in,out] | jacobian_agenda | WS Input/Output |
[in] | atmosphere_dim | WS Input |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | g1 | Generic Input |
[in] | g2 | Generic Input |
[in] | g3 | Generic Input |
[in] | energy_level_identity | Generic Input |
[in] | dx | Generic Input (Default: "1.0e-3") |
Definition at line 1796 of file m_jacobian.cc.
References RetrievalQuantity::Analytical(), ARTS::Var::atmosphere_dim(), check_retrieval_grids(), CREATE_OUT3, dx, RetrievalQuantity::Grids(), ARTS::Var::jacobian_agenda(), ARTS::Var::lat_grid(), ARTS::Var::lon_grid(), RetrievalQuantity::MainTag(), Array< base >::nelem(), NLTE_MAINTAG, ARTS::Var::p_grid(), RetrievalQuantity::Perturbation(), PROPMAT_SUBSUBTAG, RetrievalQuantity::QuantumIdentity(), and RetrievalQuantity::SubSubtag().
Referenced by jacobianAddNLTE_g(), and jacobianAddNLTEs().
void jacobianAddNLTEs | ( | Workspace & | ws, |
ArrayOfRetrievalQuantity & | jacobian_quantities, | ||
Agenda & | jacobian_agenda, | ||
const Index & | atmosphere_dim, | ||
const Vector & | p_grid, | ||
const Vector & | lat_grid, | ||
const Vector & | lon_grid, | ||
const Vector & | g1, | ||
const Vector & | g2, | ||
const Vector & | g3, | ||
const ArrayOfQuantumIdentifier & | energy_level_identities, | ||
const Numeric & | dx, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: jacobianAddNLTEs.
Experimental NLTE Jacobian. Same as jacobianAddNLTE but for many levels
Adds energy_level_identities.nelem() times as many arguments to x as jacobianAddNLTE, ordered as energy_level_identities describes
This method is preferred to jacobianAddNLTE, since energy_level_identities is conveniently almost always the same as nlte_level_identifiers
[in,out] | ws | Workspace |
[in,out] | jacobian_quantities | WS Input/Output |
[in,out] | jacobian_agenda | WS Input/Output |
[in] | atmosphere_dim | WS Input |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | g1 | Generic Input |
[in] | g2 | Generic Input |
[in] | g3 | Generic Input |
[in] | energy_level_identities | Generic Input |
[in] | dx | Generic Input (Default: "1.0e-3") |
Definition at line 1861 of file m_jacobian.cc.
References ARTS::Var::atmosphere_dim(), dx, ARTS::Var::jacobian_agenda(), jacobianAddNLTE(), ARTS::Var::lat_grid(), ARTS::Var::lon_grid(), ARTS::Var::p_grid(), and ARTS::Var::verbosity().
Referenced by jacobianAddNLTEs_g().
void jacobianAddPointingZa | ( | Workspace & | ws, |
ArrayOfRetrievalQuantity & | jacobian_quantities, | ||
Agenda & | jacobian_agenda, | ||
const Matrix & | sensor_pos, | ||
const Vector & | sensor_time, | ||
const Index & | poly_order, | ||
const String & | calcmode, | ||
const Numeric & | dza, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: jacobianAddPointingZa.
Adds sensor pointing zenith angle off-set jacobian.
Retrieval of deviations between nominal and actual zenith angle of the sensor can be included by this method. The weighing functions can be calculated in several ways: <br> calcmode = "recalc": Recalculation of pencil beam spectra, <br> shifted with dza from nominal values. A single-sided <br> perturbation is applied (towards higher zenith angles). <br> calcmode = "interp": Inter/extrapolation of existing pencil <br> beam spectra. For this option, allow some extra margins for <br> zenith angle grids, to avoid artifacts when extrapolating <br> the data (to shifted zenith angles). The average of a <br> negative and a positive shift is taken. The interp option is recommended. It should in general be both faster and more accurate (due to the double sided disturbance). In addition, it is less sensitive to the choice of dza (as long as a small value is applied).
The pointing off-set can be modelled to be time varying. The time variation is then described by a polynomial (with standard base functions). For example, a polynomial order of 0 means that the off-set is constant in time. If the off-set is totally uncorrelated between the spectra, set the order to -1.
The number of elements added to the state vector (x) is <br> if poly_order < 0 : length of sensor_time <br> otherwise : poly_order+1 In the first case, the order in x matches sensor_time. In the second case, the coefficient for polynomial order 0 comes first etc.
[in,out] | ws | Workspace |
[in,out] | jacobian_quantities | WS Input/Output |
[in,out] | jacobian_agenda | WS Input/Output |
[in] | sensor_pos | WS Input |
[in] | sensor_time | WS Input |
[in] | poly_order | Generic Input (Default: "0") |
[in] | calcmode | Generic Input (Default: "recalc") |
[in] | dza | Generic Input (Default: "0.01") |
Definition at line 600 of file m_jacobian.cc.
References RetrievalQuantity::Analytical(), RetrievalQuantity::Grids(), ARTS::Var::jacobian_agenda(), ARTS::Var::jacobian_quantities(), RetrievalQuantity::MainTag(), RetrievalQuantity::Mode(), RetrievalQuantity::Perturbation(), POINTING_CALCMODE_A, POINTING_CALCMODE_B, POINTING_MAINTAG, POINTING_SUBTAG_A, Vector::resize(), ARTS::Var::sensor_pos(), ARTS::Var::sensor_time(), and RetrievalQuantity::Subtag().
Referenced by jacobianAddPointingZa_g(), and retrievalAddPointingZa().
void jacobianAddPolyfit | ( | Workspace & | ws, |
ArrayOfRetrievalQuantity & | jacobian_quantities, | ||
Agenda & | jacobian_agenda, | ||
const ArrayOfIndex & | sensor_response_pol_grid, | ||
const Matrix & | sensor_response_dlos_grid, | ||
const Matrix & | sensor_pos, | ||
const Index & | poly_order, | ||
const Index & | no_pol_variation, | ||
const Index & | no_los_variation, | ||
const Index & | no_mblock_variation, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: jacobianAddPolyfit.
Includes polynomial baseline fit in the Jacobian.
This method deals with retrieval of disturbances of the spectra that can be described by an additive term, a baseline off-set.
The baseline off-set is here modelled as a polynomial. The polynomial spans the complete frequency range spanned by sensor_response_f_grid* and the method should only of interest for cases with no frequency gap in the spectra. The default assumption is that the off-set differs between all spectra, but it can also be assumed that the off-set is common for all e.g. line-of-sights.
If the simulation/retrieval deals with a single spectrum, the number of elements added to the state vector (x) is poly_order+1. The coefficient for polynomial order 0 comes first etc. The same is true if no_pol_variation, no_los_variation and no_mblock_variation all are set to 1, even if several spectra are involved. Otherwise thenumber of elements added to x depends on the number of spectra and the settings of no_pol_variation, no_los_variation and no_mblock_variation*. The coefficients of the different polynomial orders are treated as separate retrieval quantities. That is, the the elements associated with polynomial order 0 are grouped and form together a retrieval quantity. The coefficients for higher polynomial orders are treated in the same way.
[in,out] | ws | Workspace |
[in,out] | jacobian_quantities | WS Input/Output |
[in,out] | jacobian_agenda | WS Input/Output |
[in] | sensor_response_pol_grid | WS Input |
[in] | sensor_response_dlos_grid | WS Input |
[in] | sensor_pos | WS Input |
[in] | poly_order | Generic Input |
[in] | no_pol_variation | Generic Input (Default: "0") |
[in] | no_los_variation | Generic Input (Default: "0") |
[in] | no_mblock_variation | Generic Input (Default: "0") |
Definition at line 937 of file m_jacobian.cc.
References RetrievalQuantity::Analytical(), RetrievalQuantity::Grids(), ARTS::Var::jacobian_agenda(), RetrievalQuantity::MainTag(), RetrievalQuantity::Mode(), Array< base >::nelem(), RetrievalQuantity::Perturbation(), POLYFIT_MAINTAG, ARTS::Var::sensor_pos(), ARTS::Var::sensor_response_dlos_grid(), ARTS::Var::sensor_response_pol_grid(), and RetrievalQuantity::Subtag().
Referenced by jacobianAddPolyfit_g(), and retrievalAddPolyfit().
void jacobianAddScatSpecies | ( | Workspace & | ws, |
ArrayOfRetrievalQuantity & | jacobian_quantities, | ||
Agenda & | jacobian_agenda, | ||
const Index & | atmosphere_dim, | ||
const Vector & | p_grid, | ||
const Vector & | lat_grid, | ||
const Vector & | lon_grid, | ||
const Vector & | g1, | ||
const Vector & | g2, | ||
const Vector & | g3, | ||
const String & | species, | ||
const String & | quantity, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: jacobianAddScatSpecies.
Includes a scattering species in the Jacobian.
For 1D or 2D calculations the latitude and/or longitude grid of the retrieval field should set to have zero length.
The number of elements added to the state vector (x) is: <br> n_g1 * n_g2 * n_g3 where n_g1, n_g2 and n_g3 are the length of GIN g1, g2 and g3, respectively. Here empty vectors should be considered to have a length 1. The elements are sorted with pressure as innermost loop, followed by latitude and longitude as outermost loop.
[in,out] | ws | Workspace |
[in,out] | jacobian_quantities | WS Input/Output |
[in,out] | jacobian_agenda | WS Input/Output |
[in] | atmosphere_dim | WS Input |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | g1 | Generic Input |
[in] | g2 | Generic Input |
[in] | g3 | Generic Input |
[in] | species | Generic Input |
[in] | quantity | Generic Input |
Definition at line 1099 of file m_jacobian.cc.
References RetrievalQuantity::Analytical(), ARTS::Var::atmosphere_dim(), check_retrieval_grids(), CREATE_OUT2, CREATE_OUT3, RetrievalQuantity::Grids(), ARTS::Var::jacobian_agenda(), ARTS::Var::lat_grid(), ARTS::Var::lon_grid(), RetrievalQuantity::MainTag(), Array< base >::nelem(), ARTS::Var::p_grid(), SCATSPECIES_MAINTAG, RetrievalQuantity::SubSubtag(), and RetrievalQuantity::Subtag().
Referenced by jacobianAddScatSpecies_g(), and retrievalAddScatSpecies().
void jacobianAddShapeCatalogParameter | ( | Workspace & | ws, |
ArrayOfRetrievalQuantity & | jacobian_quantities, | ||
Agenda & | jacobian_agenda, | ||
const QuantumIdentifier & | line_identity, | ||
const String & | species, | ||
const String & | variable, | ||
const String & | coefficient, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: jacobianAddShapeCatalogParameter.
Adds a line shape parameter to the Jacobian calculations. These are constant over all levels so only a single x-value is added
Line function parameter assume the derivatives of internal pressure broadening and line mixing functionality follows a simply f(T, T0, X0, X1, X2) format. The shape of the function f() is determined by input catalog; please see the ARTS documentation for more details
The input are as follows: <br> line_identity: Identifier of preferably a single line <br> species: A SpeciesTag, e.g., "O2" or "H2O" for common species. <br> Note that "SELF" and "AIR" tags are used for shape parameters <br> affected by self and air-broadening, respectively. <br> variable: A variable supported by the line, these can be <br> "G0": Speed-independent pressure broadening <br> "G2": Speed-dependent pressure broadening <br> "D0": Speed-independent pressure shift <br> "D2": Speed-dependent pressure shift <br> "FVC": Frequency of velocity changing collisions <br> "ETA": partial correlation between velocity and <br> rotational state changes due to collisions <br> "Y": First order line-mixing parameter <br> "G": Second order line-mixing parameter for strength <br> "DV": Second order line-mixing parameter for shifting <br> coefficient: A coefficient in the model to compute the above parameters.
Note that we cannot test if the line in question supports the variable and coefficient at the level of this function, so many errors will only be reported at a later stage
For other spectroscopic parameters, see jacobianAddBasicCatalogParameter. Also see said function for an example of how to set the QuantumIdentifier
[in,out] | ws | Workspace |
[in,out] | jacobian_quantities | WS Input/Output |
[in,out] | jacobian_agenda | WS Input/Output |
[in] | line_identity | Generic Input |
[in] | species | Generic Input |
[in] | variable | Generic Input |
[in] | coefficient | Generic Input |
Definition at line 1638 of file m_jacobian.cc.
References RetrievalQuantity::Analytical(), CATALOGPARAMETER_MAINTAG, CREATE_OUT3, RetrievalQuantity::Grids(), RetrievalQuantity::IntegrationOn(), ARTS::Var::jacobian_agenda(), RetrievalQuantity::MainTag(), RetrievalQuantity::Mode(), PROPMAT_SUBSUBTAG, RetrievalQuantity::PropType(), q, RetrievalQuantity::QuantumIdentity(), select_derivativeLineShape(), SpeciesTag::SpeciesNameMain(), RetrievalQuantity::SubSubtag(), QuantumIdentifier::TRANSITION, and QuantumIdentifier::Type().
Referenced by jacobianAddShapeCatalogParameter_g().
void jacobianAddShapeCatalogParameters | ( | Workspace & | ws, |
ArrayOfRetrievalQuantity & | jacobian_quantities, | ||
Agenda & | jacobian_agenda, | ||
const ArrayOfQuantumIdentifier & | line_identities, | ||
const ArrayOfString & | species, | ||
const ArrayOfString & | variables, | ||
const ArrayOfString & | coefficients, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: jacobianAddShapeCatalogParameters.
See jacobianAddShapeCatalogParameter for information on the GIN parameters
This function accepts the same input but for lists of data. The function loops over each input list individually and appends the information to jacobian_quantities.
Special "ALL" for 1 length variables and coefficients are allowed to compute all variables/coefficients in the order described in the description of jacobianAddShapeCatalogParameter
For example, if line_identities have length 5, species length 4, variables* length 3, and coefficients length 2, there will be 5*4x3x2 = 120 new additions to jacobian_quantities in the order: [{line_identities[0], species[0], variables[0] coefficients[0]}] [{line_identities[0], species[0], variables[0] coefficients[1]}] [{line_identities[0], species[0], variables[1] coefficients[0]}] [{line_identities[0], species[0], variables[1] coefficients[1]}] [{line_identities[0], species[0], variables[2] coefficients[0]}] [{line_identities[0], species[0], variables[2] coefficients[1]}] [{line_identities[0], species[1], variables[0] coefficients[0]}] ... [{line_identities[4], species[3], variables[1] coefficients[1]}] [{line_identities[4], species[3], variables[2] coefficients[0]}] [{line_identities[4], species[3], variables[2] coefficients[1]}] or in words: lines first, then species, then variables, then coefficients
[in,out] | ws | Workspace |
[in,out] | jacobian_quantities | WS Input/Output |
[in,out] | jacobian_agenda | WS Input/Output |
[in] | line_identities | Generic Input |
[in] | species | Generic Input |
[in] | variables | Generic Input |
[in] | coefficients | Generic Input |
Definition at line 1685 of file m_jacobian.cc.
References AllLineShapeCoeffs(), AllLineShapeVars(), and Array< base >::nelem().
Referenced by jacobianAddShapeCatalogParameters_g().
void jacobianAddSinefit | ( | Workspace & | ws, |
ArrayOfRetrievalQuantity & | jacobian_quantities, | ||
Agenda & | jacobian_agenda, | ||
const ArrayOfIndex & | sensor_response_pol_grid, | ||
const Matrix & | sensor_response_dlos_grid, | ||
const Matrix & | sensor_pos, | ||
const Vector & | period_lengths, | ||
const Index & | no_pol_variation, | ||
const Index & | no_los_variation, | ||
const Index & | no_mblock_variation, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: jacobianAddSinefit.
Includes sinusoidal baseline fit in the Jacobian.
Works as jacobianAddPolyfit, beside that a series of sine and cosine terms are used for the baseline fit.
For each value in *period_lengths one sine and one cosine term are included (in mentioned order). By these two terms the amplitude and "phase" for each period length can be determined. The sine and cosine terms have value 0 and 1, respectively, for first frequency.
If the simulation/retrieval deals with a single spectrum, the number of elements added to the state vector (x) is 2*nperiods, where nperiods is the length of period_lengths. The same is true if no_pol_variation, no_los_variation and no_mblock_variation all are set to 1, even if several spectra are involved. Otherwise thenumber of elements added to x depends on the number of spectra and the settings of no_pol_variation, no_los_variation and no_mblock_variation*. The sine and cosine terms for each period length are treated as a separate retrieval quantities. That is, the the elements associated with the first period length are grouped and form together a retrieval quantity, etc. Inside each retrieval quantity the pairs of sine and cosine terms are kept together, in given order.
[in,out] | ws | Workspace |
[in,out] | jacobian_quantities | WS Input/Output |
[in,out] | jacobian_agenda | WS Input/Output |
[in] | sensor_response_pol_grid | WS Input |
[in] | sensor_response_dlos_grid | WS Input |
[in] | sensor_pos | WS Input |
[in] | period_lengths | Generic Input |
[in] | no_pol_variation | Generic Input (Default: "0") |
[in] | no_los_variation | Generic Input (Default: "0") |
[in] | no_mblock_variation | Generic Input (Default: "0") |
Definition at line 1167 of file m_jacobian.cc.
References RetrievalQuantity::Analytical(), RetrievalQuantity::Grids(), ARTS::Var::jacobian_agenda(), RetrievalQuantity::MainTag(), RetrievalQuantity::Mode(), Array< base >::nelem(), ConstVectorView::nelem(), RetrievalQuantity::Perturbation(), ARTS::Var::sensor_pos(), ARTS::Var::sensor_response_dlos_grid(), ARTS::Var::sensor_response_pol_grid(), SINEFIT_MAINTAG, and RetrievalQuantity::Subtag().
Referenced by jacobianAddSinefit_g(), and retrievalAddSinefit().
void jacobianAddSpecialSpecies | ( | Workspace & | ws, |
ArrayOfRetrievalQuantity & | jacobian_quantities, | ||
Agenda & | jacobian_agenda, | ||
const Index & | atmosphere_dim, | ||
const Vector & | p_grid, | ||
const Vector & | lat_grid, | ||
const Vector & | lon_grid, | ||
const Vector & | g1, | ||
const Vector & | g2, | ||
const Vector & | g3, | ||
const String & | species, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: jacobianAddSpecialSpecies.
Includes a special absorption species in the Jacobian.
Similar to jacobianAddAbsSpecies but only for number densities.
Species allowed are: <br> "electrons" <br> "particulates"
Note that the average of all particulates are used to scale its jacobian*, so this method works best when only one type of particulate is being used, i.e., when scat_data has only one scattering species.
The number of elements added to the state vector (x) is: <br> n_g1 * n_g2 * n_g3 where n_g1, n_g2 and n_g3 are the length of GIN g1, g2 and g3, respectively. Here empty vectors should be considered to have a length 1. The elements are sorted with pressure as innermost loop, followed by latitude and longitude as outermost loop.
[in,out] | ws | Workspace |
[in,out] | jacobian_quantities | WS Input/Output |
[in,out] | jacobian_agenda | WS Input/Output |
[in] | atmosphere_dim | WS Input |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | g1 | Generic Input |
[in] | g2 | Generic Input |
[in] | g3 | Generic Input |
[in] | species | Generic Input |
Definition at line 1891 of file m_jacobian.cc.
References RetrievalQuantity::Analytical(), ARTS::Var::atmosphere_dim(), check_retrieval_grids(), CREATE_OUT2, CREATE_OUT3, ELECTRONS_MAINTAG, RetrievalQuantity::Grids(), ARTS::Var::jacobian_agenda(), ARTS::Var::lat_grid(), ARTS::Var::lon_grid(), RetrievalQuantity::MainTag(), Array< base >::nelem(), ARTS::Var::p_grid(), PARTICULATES_MAINTAG, PROPMAT_SUBSUBTAG, RetrievalQuantity::PropType(), and RetrievalQuantity::SubSubtag().
Referenced by jacobianAddSpecialSpecies_g(), and retrievalAddSpecialSpecies().
void jacobianAddSurfaceQuantity | ( | Workspace & | ws, |
ArrayOfRetrievalQuantity & | jacobian_quantities, | ||
Agenda & | jacobian_agenda, | ||
const Index & | atmosphere_dim, | ||
const Vector & | lat_grid, | ||
const Vector & | lon_grid, | ||
const Vector & | g1, | ||
const Vector & | g2, | ||
const String & | quantity, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: jacobianAddSurfaceQuantity.
Includes a surface quantity in the Jacobian.
The quantity is specified by the GIN-variable quantity. The name of the quantity must match the name used in surface_props_names.
For 1D or 2D calculations the latitude and/or longitude grid of the retrieval field should set to have zero length.
The number of elements added to the state vector (x) is: <br> n_g1 * n_g2 where n_g1 and n_g2 are the length of GIN g1 and g2, respectively. Here empty vectors should be considered to have a length 1. The elements are sorted with latitude as innermost loop and longitude as outermost loop.
[in,out] | ws | Workspace |
[in,out] | jacobian_quantities | WS Input/Output |
[in,out] | jacobian_agenda | WS Input/Output |
[in] | atmosphere_dim | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | g1 | Generic Input |
[in] | g2 | Generic Input |
[in] | quantity | Generic Input |
Definition at line 1338 of file m_jacobian.cc.
References RetrievalQuantity::Analytical(), ARTS::Var::atmosphere_dim(), check_retrieval_grids(), CREATE_OUT2, CREATE_OUT3, RetrievalQuantity::Grids(), ARTS::Var::jacobian_agenda(), ARTS::Var::lat_grid(), ARTS::Var::lon_grid(), RetrievalQuantity::MainTag(), max, Array< base >::nelem(), RetrievalQuantity::Subtag(), and SURFACE_MAINTAG.
Referenced by jacobianAddSurfaceQuantity_g(), and retrievalAddSurfaceQuantity().
void jacobianAddTemperature | ( | Workspace & | ws, |
ArrayOfRetrievalQuantity & | jacobian_quantities, | ||
Agenda & | jacobian_agenda, | ||
const Index & | atmosphere_dim, | ||
const Vector & | p_grid, | ||
const Vector & | lat_grid, | ||
const Vector & | lon_grid, | ||
const Vector & | g1, | ||
const Vector & | g2, | ||
const Vector & | g3, | ||
const String & | hse, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: jacobianAddTemperature.
Includes atmospheric temperatures in the Jacobian.
The calculations are performed by (semi-)analytical expressions. Hydrostatic equilibrium (HSE) can be included.
The analytical calculation approach neglects so far refraction totally, but considers the local effect of HSE. The later should be accaptable for observations around zenith and nadir. There is no warning if the method is applied incorrectly, with respect to these issues. Note that the argument hse of this WSM only refers to the Jacobian calculation, if the model and/or retrieved atmosphere actually fulfils HSE or not is governed in other manners.
The calculations (both options) assume that gas species are defined in VMR (a change in temperature then changes the number density). This has the consequence that retrieval of temperatures and number density can not be mixed. Neither any warning here!
The number of elements added to the state vector (x) is: <br> n_g1 * n_g2 * n_g3 where n_g1, n_g2 and n_g3 are the length of GIN g1, g2 and g3, respectively. Here empty vectors should be considered to have a length 1. The elements are sorted with pressure as innermost loop, followed by latitude and longitude as outermost loop.
[in,out] | ws | Workspace |
[in,out] | jacobian_quantities | WS Input/Output |
[in,out] | jacobian_agenda | WS Input/Output |
[in] | atmosphere_dim | WS Input |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | g1 | Generic Input |
[in] | g2 | Generic Input |
[in] | g3 | Generic Input |
[in] | hse | Generic Input (Default: "on") |
Definition at line 1397 of file m_jacobian.cc.
References RetrievalQuantity::Analytical(), ARTS::Var::atmosphere_dim(), check_retrieval_grids(), CREATE_OUT3, RetrievalQuantity::Grids(), ARTS::Var::jacobian_agenda(), ARTS::Var::lat_grid(), ARTS::Var::lon_grid(), RetrievalQuantity::MainTag(), RetrievalQuantity::Mode(), Array< base >::nelem(), ARTS::Var::p_grid(), RetrievalQuantity::Perturbation(), PROPMAT_SUBSUBTAG, RetrievalQuantity::PropType(), RetrievalQuantity::SubSubtag(), RetrievalQuantity::Subtag(), and TEMPERATURE_MAINTAG.
Referenced by jacobianAddTemperature_g(), and retrievalAddTemperature().
void jacobianAddWind | ( | Workspace & | ws, |
ArrayOfRetrievalQuantity & | jacobian_quantities, | ||
Agenda & | jacobian_agenda, | ||
const Index & | atmosphere_dim, | ||
const Vector & | p_grid, | ||
const Vector & | lat_grid, | ||
const Vector & | lon_grid, | ||
const Vector & | g1, | ||
const Vector & | g2, | ||
const Vector & | g3, | ||
const String & | component, | ||
const Numeric & | dfrequency, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: jacobianAddWind.
Includes one atmospheric wind component in the Jacobian.
The method follows the pattern of other Jacobian methods. The calculations can only be performed by analytic expressions. Some lower level function depends on frequency perturbations, however, so therefore a frequency perturbation df is required and as a consequence abs_f_interp_order must be > 0.
The wind field components are retrieved separately, and, hence, the argument component can be "u", "v" or "w" for vector components, or just "strength" for total wind speed.
The number of elements added to the state vector (x) is: <br> n_g1 * n_g2 * n_g3 where n_g1, n_g2 and n_g3 are the length of GIN g1, g2 and g3, respectively. Here empty vectors should be considered to have a length 1. The elements are sorted with pressure as innermost loop, followed by latitude and longitude as outermost loop.
[in,out] | ws | Workspace |
[in,out] | jacobian_quantities | WS Input/Output |
[in,out] | jacobian_agenda | WS Input/Output |
[in] | atmosphere_dim | WS Input |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | g1 | Generic Input |
[in] | g2 | Generic Input |
[in] | g3 | Generic Input |
[in] | component | Generic Input (Default: "v") |
[in] | dfrequency | Generic Input (Default: "0.1") |
Definition at line 1476 of file m_jacobian.cc.
References RetrievalQuantity::Analytical(), ARTS::Var::atmosphere_dim(), check_retrieval_grids(), CREATE_OUT2, CREATE_OUT3, RetrievalQuantity::Grids(), ARTS::Var::jacobian_agenda(), ARTS::Var::lat_grid(), ARTS::Var::lon_grid(), RetrievalQuantity::MainTag(), Array< base >::nelem(), ARTS::Var::p_grid(), RetrievalQuantity::Perturbation(), PROPMAT_SUBSUBTAG, RetrievalQuantity::PropType(), RetrievalQuantity::SubSubtag(), RetrievalQuantity::Subtag(), and WIND_MAINTAG.
Referenced by jacobianAddWind_g(), and retrievalAddWind().
void jacobianAdjustAndTransform | ( | Matrix & | jacobian, |
const ArrayOfRetrievalQuantity & | jacobian_quantities, | ||
const Vector & | x, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: jacobianAdjustAndTransform.
Applies adjustments and transformations on jacobian.
The method handles two tasks:
If no tranformations are selected and the "rel" option is not used at all, there is no need to call this method(, but you can still include it without causing any error, the calculations will just be a bit slower). Otherwise, this method should be called, typically as part of inversion_iterate_agenda*.
The method accepts if jacobian is empty, and then does, nothing.
[in,out] | jacobian | WS Input/Output |
[in] | jacobian_quantities | WS Input |
[in] | x | WS Input |
Definition at line 1971 of file m_jacobian.cc.
References ABSSPECIES_MAINTAG, jac_ranges_indices(), ARTS::Var::jacobian(), ARTS::Var::jacobian_quantities(), joker, q, transform_jacobian(), transform_x_back(), ARTS::Var::x(), and x0.
Referenced by jacobianAdjustAndTransform_g().
void jacobianCalcDoNothing | ( | Matrix & | jacobian, |
const Index & | mblock_index, | ||
const Vector & | iyb, | ||
const Vector & | yb, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: jacobianCalcDoNothing.
This function doesn't do anything. It just exists to satisfy the input and output requirement of the jacobian_agenda.
This method is added to jacobian_agenda by jacobianAddAbsSpecies and some similar methods, and it should normally not be called by the user.
[in,out] | jacobian | WS Input/Output |
[in] | mblock_index | WS Input |
[in] | iyb | WS Input |
[in] | yb | WS Input |
Definition at line 112 of file m_jacobian.cc.
Referenced by jacobianCalcDoNothing_g().
void jacobianCalcFreqShift | ( | Matrix & | jacobian, |
const Index & | mblock_index, | ||
const Vector & | iyb, | ||
const Vector & | yb, | ||
const Index & | stokes_dim, | ||
const Vector & | f_grid, | ||
const Matrix & | mblock_dlos_grid, | ||
const Sparse & | sensor_response, | ||
const ArrayOfRetrievalQuantity & | jacobian_quantities, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: jacobianCalcFreqShift.
Calculates frequency shift jacobians by interpolation of iyb.
This function is added to jacobian_agenda by jacobianAddFreqShift and should normally not be called by the user.
[in,out] | jacobian | WS Input/Output |
[in] | mblock_index | WS Input |
[in] | iyb | WS Input |
[in] | yb | WS Input |
[in] | stokes_dim | WS Input |
[in] | f_grid | WS Input |
[in] | mblock_dlos_grid | WS Input |
[in] | sensor_response | WS Input |
[in] | jacobian_quantities | WS Input |
Definition at line 329 of file m_jacobian.cc.
References ARTS::Var::f_grid(), FREQUENCY_MAINTAG, FREQUENCY_SUBTAG_0, get_rowindex_for_mblock(), gridpos_poly(), RetrievalQuantity::Grids(), interp(), interpweights(), ARTS::Var::iyb(), jac_ranges_indices(), ARTS::Var::jacobian(), ARTS::Var::jacobian_quantities(), ARTS::Var::mblock_dlos_grid(), ARTS::Var::mblock_index(), mult(), Array< base >::nelem(), RetrievalQuantity::Perturbation(), ARTS::Var::sensor_response(), ARTS::Var::stokes_dim(), and ARTS::Var::yb().
Referenced by jacobianCalcFreqShift_g().
void jacobianCalcFreqStretch | ( | Matrix & | jacobian, |
const Index & | mblock_index, | ||
const Vector & | iyb, | ||
const Vector & | yb, | ||
const Index & | stokes_dim, | ||
const Vector & | f_grid, | ||
const Matrix & | mblock_dlos_grid, | ||
const Sparse & | sensor_response, | ||
const ArrayOfIndex & | sensor_response_pol_grid, | ||
const Vector & | sensor_response_f_grid, | ||
const Matrix & | sensor_response_dlos_grid, | ||
const ArrayOfRetrievalQuantity & | jacobian_quantities, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: jacobianCalcFreqStretch.
Calculates frequency stretch jacobians by interpolation of iyb.
This function is added to jacobian_agenda by jacobianAddFreqStretch and should normally not be called by the user.
[in,out] | jacobian | WS Input/Output |
[in] | mblock_index | WS Input |
[in] | iyb | WS Input |
[in] | yb | WS Input |
[in] | stokes_dim | WS Input |
[in] | f_grid | WS Input |
[in] | mblock_dlos_grid | WS Input |
[in] | sensor_response | WS Input |
[in] | sensor_response_pol_grid | WS Input |
[in] | sensor_response_f_grid | WS Input |
[in] | sensor_response_dlos_grid | WS Input |
[in] | jacobian_quantities | WS Input |
Definition at line 479 of file m_jacobian.cc.
References ARTS::Var::f_grid(), FREQUENCY_MAINTAG, FREQUENCY_SUBTAG_1, get_rowindex_for_mblock(), gridpos_poly(), RetrievalQuantity::Grids(), interp(), interpweights(), ARTS::Var::iyb(), jac_ranges_indices(), ARTS::Var::jacobian(), ARTS::Var::jacobian_quantities(), ARTS::Var::mblock_dlos_grid(), ARTS::Var::mblock_index(), mult(), Array< base >::nelem(), RetrievalQuantity::Perturbation(), polynomial_basis_func(), ARTS::Var::sensor_response(), ARTS::Var::sensor_response_dlos_grid(), ARTS::Var::sensor_response_f_grid(), ARTS::Var::sensor_response_pol_grid(), ARTS::Var::stokes_dim(), w(), and ARTS::Var::yb().
Referenced by jacobianCalcFreqStretch_g().
void jacobianCalcPointingZaInterp | ( | Matrix & | jacobian, |
const Index & | mblock_index, | ||
const Vector & | iyb, | ||
const Vector & | yb, | ||
const Index & | stokes_dim, | ||
const Vector & | f_grid, | ||
const Matrix & | DEBUG_ONLYsensor_los, | ||
const Matrix & | mblock_dlos_grid, | ||
const Sparse & | sensor_response, | ||
const Vector & | sensor_time, | ||
const ArrayOfRetrievalQuantity & | jacobian_quantities, | ||
const Verbosity & | |||
) |
Definition at line 677 of file m_jacobian.cc.
References ARTS::Var::f_grid(), get_rowindex_for_mblock(), Range::get_start(), gridpos(), RetrievalQuantity::Grids(), interp(), interpweights(), is_decreasing(), is_increasing(), ARTS::Var::iyb(), jac_ranges_indices(), ARTS::Var::jacobian(), ARTS::Var::jacobian_quantities(), joker, ARTS::Var::mblock_dlos_grid(), ARTS::Var::mblock_index(), mult(), Array< base >::nelem(), RetrievalQuantity::Perturbation(), POINTING_CALCMODE_B, POINTING_MAINTAG, POINTING_SUBTAG_A, ARTS::Var::sensor_los(), ARTS::Var::sensor_response(), ARTS::Var::stokes_dim(), and w().
Referenced by jacobianCalcPointingZaInterp_g().
void jacobianCalcPointingZaRecalc | ( | Workspace & | ws, |
Matrix & | jacobian, | ||
const Index & | mblock_index, | ||
const Vector & | iyb, | ||
const Vector & | yb, | ||
const Index & | atmosphere_dim, | ||
const EnergyLevelMap & | nlte_field, | ||
const Index & | cloudbox_on, | ||
const Index & | stokes_dim, | ||
const Vector & | f_grid, | ||
const Matrix & | sensor_pos, | ||
const Matrix & | sensor_los, | ||
const Matrix & | transmitter_pos, | ||
const Matrix & | mblock_dlos_grid, | ||
const Sparse & | sensor_response, | ||
const Vector & | sensor_time, | ||
const String & | iy_unit, | ||
const Agenda & | iy_main_agenda, | ||
const Agenda & | geo_pos_agenda, | ||
const ArrayOfRetrievalQuantity & | jacobian_quantities, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: jacobianCalcPointingZaRecalc.
Calculates zenith angle pointing deviation jacobians by recalulation of iyb.
This function is added to jacobian_agenda by jacobianAddPointingZa and should normally not be called by the user.
[in,out] | ws | Workspace |
[in,out] | jacobian | WS Input/Output |
[in] | mblock_index | WS Input |
[in] | iyb | WS Input |
[in] | yb | WS Input |
[in] | atmosphere_dim | WS Input |
[in] | nlte_field | WS Input |
[in] | cloudbox_on | WS Input |
[in] | stokes_dim | WS Input |
[in] | f_grid | WS Input |
[in] | sensor_pos | WS Input |
[in] | sensor_los | WS Input |
[in] | transmitter_pos | WS Input |
[in] | mblock_dlos_grid | WS Input |
[in] | sensor_response | WS Input |
[in] | sensor_time | WS Input |
[in] | iy_unit | WS Input |
[in] | iy_main_agenda | WS Input |
[in] | geo_pos_agenda | WS Input |
[in] | jacobian_quantities | WS Input |
Definition at line 808 of file m_jacobian.cc.
References ARTS::Var::atmosphere_dim(), ARTS::Var::cloudbox_on(), ARTS::Var::f_grid(), ARTS::Var::geo_pos(), ARTS::Var::geo_pos_agenda(), get_rowindex_for_mblock(), Range::get_start(), RetrievalQuantity::Grids(), ARTS::Var::iy_main_agenda(), ARTS::Var::iy_unit(), iyb_calc(), jac_ranges_indices(), ARTS::Var::jacobian(), ARTS::Var::jacobian_quantities(), joker, ARTS::Var::mblock_dlos_grid(), ARTS::Var::mblock_index(), mult(), Array< base >::nelem(), ARTS::Var::nlte_field(), RetrievalQuantity::Perturbation(), POINTING_CALCMODE_A, POINTING_MAINTAG, POINTING_SUBTAG_A, ARTS::Var::sensor_los(), ARTS::Var::sensor_pos(), ARTS::Var::sensor_response(), ARTS::Var::stokes_dim(), ARTS::Var::transmitter_pos(), ARTS::Var::verbosity(), w(), and ARTS::Var::yb().
Referenced by jacobianCalcPointingZaRecalc_g().
void jacobianCalcPolyfit | ( | Matrix & | jacobian, |
const Index & | mblock_index, | ||
const Vector & | iyb, | ||
const Vector & | yb, | ||
const Sparse & | sensor_response, | ||
const ArrayOfIndex & | sensor_response_pol_grid, | ||
const Vector & | sensor_response_f_grid, | ||
const Matrix & | sensor_response_dlos_grid, | ||
const ArrayOfRetrievalQuantity & | jacobian_quantities, | ||
const Index & | poly_coeff, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: jacobianCalcPolyfit.
Calculates jacobians for polynomial baseline fit.
This function is added to jacobian_agenda by jacobianAddPolyfit and should normally not be called by the user.
[in,out] | jacobian | WS Input/Output |
[in] | mblock_index | WS Input |
[in] | iyb | WS Input |
[in] | yb | WS Input |
[in] | sensor_response | WS Input |
[in] | sensor_response_pol_grid | WS Input |
[in] | sensor_response_f_grid | WS Input |
[in] | sensor_response_dlos_grid | WS Input |
[in] | jacobian_quantities | WS Input |
[in] | poly_coeff | Generic Input |
Definition at line 1012 of file m_jacobian.cc.
References get_rowindex_for_mblock(), Range::get_start(), jac_ranges_indices(), ARTS::Var::jacobian(), ARTS::Var::jacobian_quantities(), ARTS::Var::mblock_index(), Array< base >::nelem(), POLYFIT_MAINTAG, polynomial_basis_func(), ARTS::Var::sensor_response(), ARTS::Var::sensor_response_dlos_grid(), ARTS::Var::sensor_response_f_grid(), ARTS::Var::sensor_response_pol_grid(), and w().
Referenced by jacobianCalcPolyfit_g().
void jacobianCalcSinefit | ( | Matrix & | jacobian, |
const Index & | mblock_index, | ||
const Vector & | iyb, | ||
const Vector & | yb, | ||
const Sparse & | sensor_response, | ||
const ArrayOfIndex & | sensor_response_pol_grid, | ||
const Vector & | sensor_response_f_grid, | ||
const Matrix & | sensor_response_dlos_grid, | ||
const ArrayOfRetrievalQuantity & | jacobian_quantities, | ||
const Index & | period_index, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: jacobianCalcSinefit.
Calculates jacobians for sinusoidal baseline fit.
This function is added to jacobian_agenda by jacobianAddPolyfit and should normally not be called by the user.
[in,out] | jacobian | WS Input/Output |
[in] | mblock_index | WS Input |
[in] | iyb | WS Input |
[in] | yb | WS Input |
[in] | sensor_response | WS Input |
[in] | sensor_response_pol_grid | WS Input |
[in] | sensor_response_f_grid | WS Input |
[in] | sensor_response_dlos_grid | WS Input |
[in] | jacobian_quantities | WS Input |
[in] | period_index | Generic Input |
Definition at line 1243 of file m_jacobian.cc.
References ARTS::Var::jacobian_quantities(), ARTS::Var::sensor_response_dlos_grid(), ARTS::Var::sensor_response_f_grid(), ARTS::Var::sensor_response_pol_grid(), and SINEFIT_MAINTAG.
Referenced by jacobianCalcSinefit_g().
void jacobianClose | ( | Workspace & | ws, |
Index & | jacobian_do, | ||
Agenda & | jacobian_agenda, | ||
const ArrayOfRetrievalQuantity & | jacobian_quantities, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: jacobianClose.
Closes the array of retrieval quantities and prepares for calculation of the Jacobian matrix.
This function closes the jacobian_quantities array and sets jacobian_do* to 1.
Retrieval quantities should not be added after a call to this WSM. No calculations are performed here.
[in,out] | ws | Workspace |
[out] | jacobian_do | WS Output |
[in,out] | jacobian_agenda | WS Input/Output |
[in] | jacobian_quantities | WS Input |
Definition at line 122 of file m_jacobian.cc.
References ARTS::Var::jacobian_agenda(), ARTS::Var::jacobian_do(), ARTS::Var::jacobian_quantities(), and ARTS::Var::verbosity().
Referenced by jacobianClose_g(), and retrievalDefClose().
void jacobianFromTwoY | ( | Matrix & | jacobian, |
const Vector & | y, | ||
const Vector & | y_pert, | ||
const Numeric & | pert_size, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: jacobianFromTwoY.
Sets jacobian based on the difference vetween two measurement vectors.
This function assumes that y_pert contains a measurement calculated with some variable perturbed, in comparison to the calculation behind y. The function takes the differences between y_pert and y to form a numerical derived estimate of jacobian. This gives a Jacobian wit a single column.
jacobian* equals here: (y_pert-y)/pert_size.
[out] | jacobian | WS Output |
[in] | y | WS Input |
[in] | y_pert | Generic Input |
[in] | pert_size | Generic Input |
Definition at line 2253 of file m_jacobian.cc.
References ARTS::Var::jacobian(), ConstVectorView::nelem(), and ARTS::Var::y().
Referenced by jacobianFromTwoY_g().
void jacobianFromYbatch | ( | Matrix & | jacobian, |
const ArrayOfVector & | ybatch, | ||
const Vector & | y, | ||
const Numeric & | pert_size, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: jacobianFromYbatch.
Sets jacobian based on perturbation calcuations.
This function assumes that ybatch contains spectra calculated with some variable perturbed, in comparison to the calculation behind y. The function takes the differences between ybatch and y to form a numerical derived estimate of jacobian.
Column i of jacobian equals: (ybatch[i]-y)/pert_size.
[out] | jacobian | WS Output |
[in] | ybatch | WS Input |
[in] | y | WS Input |
[in] | pert_size | Generic Input |
Definition at line 2268 of file m_jacobian.cc.
References ARTS::Var::jacobian(), joker, Absorption::nelem(), ARTS::Var::y(), and ARTS::Var::ybatch().
Referenced by jacobianFromYbatch_g().
void jacobianInit | ( | ArrayOfRetrievalQuantity & | jacobian_quantities, |
Agenda & | jacobian_agenda, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: jacobianInit.
Initialises the variables connected to the Jacobian matrix.
This function initialises the jacobian_quantities array so that retrieval quantities can be added to it. Accordingly, it has to be called before any calls to jacobianAddTemperature or similar methods.
The Jacobian quantities are initialised to be empty.
[out] | jacobian_quantities | WS Output |
[out] | jacobian_agenda | WS Output |
Definition at line 137 of file m_jacobian.cc.
References ARTS::Var::jacobian_agenda(), and ARTS::Var::jacobian_quantities().
Referenced by jacobianInit_g(), jacobianOff(), and retrievalDefInit().
void jacobianOff | ( | Index & | jacobian_do, |
Agenda & | jacobian_agenda, | ||
ArrayOfRetrievalQuantity & | jacobian_quantities, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: jacobianOff.
Makes mandatory initialisation of some jacobian variables.
Some clear-sky jacobian WSVs must be initialised even if no such calculations will be performed. This is handled with this method. That is, this method must be called when no clear-sky jacobians will be calculated (even if cloudy-sky jacobians are calculated!).
Sets jacobian_do to 0.
[out] | jacobian_do | WS Output |
[out] | jacobian_agenda | WS Output |
[out] | jacobian_quantities | WS Output |
Definition at line 146 of file m_jacobian.cc.
References ARTS::Var::jacobian_agenda(), ARTS::Var::jacobian_do(), ARTS::Var::jacobian_quantities(), jacobianInit(), and ARTS::Var::verbosity().
Referenced by jacobianOff_g().
void jacobianSetAffineTransformation | ( | ArrayOfRetrievalQuantity & | jacobian_quantities, |
const Matrix & | transformation_matrix, | ||
const Vector & | offset_vector, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: jacobianSetAffineTransformation.
Adds an affine transformation of the last element of jacobian_quantities*.
See jacobianSetFuncTransformation for a general description of how retrieval transformations are defined. Transformations are not applied by methods such as*yCalc*. Instead, the method jacobianAdjustAndTransform must be called to activate the transformations.
The affine transformation is specified by a transformation matrix, A, and an offset vector, b. These two are applied as described in jacobianSetFuncTransformation*.
The transformations is applied as <br> x = A * ( z - b ) where z is the retrieval quantity on the standard retrieval grids and x is the final state vector.
So far, the following must be true for valid A-matrices <br> z = A'*x + b That is, the reversed transformation is given by A transposed.
This method must only be called if an affine transformation is wanted. Default is to make no such tranformation at all.
[in,out] | jacobian_quantities | WS Input/Output |
[in] | transformation_matrix | Generic Input |
[in] | offset_vector | Generic Input |
Definition at line 2013 of file m_jacobian.cc.
References Array< base >::nelem(), ConstVectorView::nelem(), Absorption::nelem(), ConstMatrixView::nrows(), and transpose().
Referenced by jacobianSetAffineTransformation_g().
void jacobianSetFuncTransformation | ( | ArrayOfRetrievalQuantity & | jacobian_quantities, |
const String & | transformation_func, | ||
const Numeric & | z_min, | ||
const Numeric & | z_max, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: jacobianSetFuncTransformation.
Sets the functional transformation of the last element of jacobian_quantities*.
See below for a general description of how retrieval transformations are defined. Transformations are not applied by methods such as*yCalc*. Instead, the method jacobianAdjustAndTransform must be called to activate the transformations.
The following transformations can be selected (by transformation_func): <br> log : The natural logarithm <br> log10 : The base-10 logarithm <br> atanh : Area hyperbolic tangent <br> none : No transformation at all
This method needs only to be called if a functional transformation is wanted. Default is to make no such tranformation at all (i.e. the option "none" exists only for reasons of flexibility).
The log-options are applied as log(z-z_min) and log10(z-z_min). The default for z_min is zero, but by changing it the lower limit for z can be changed. Note that z_min becomes the lower limit for allowed values of z. The GIN z_max is here ignored.
For the atanh-option, also z_max is considered. This transformation is applied as atanh((2(z-z_min)/(z_max-z_min))-1). As above,z_min is lower limit for allowed values of z. On the other hand, z_max eines the upper limit for z.
The GIN transformation_func is so far only used for atanh. The parameter specifies the maximum allowed value allowed for u. That is, the valid range for u becomes ]0,tfunc_parameter[. Note that log and log10 demands/ensures that u > 0, but implies no upper limit.
Default is that quantities are retrieved as defined in ARTS, but both some unit conversion and transformations are provided. These operations are applied as: <br> x = A * ( f(u(z)) - b ) where <br> z is the quantity as defined ARTS <br> u represents the change of unit <br> f is the transformation function <br> A and b define together an affine transformation <br> x is the retrieved quantity For example, this systen allows to retrive a principal component representation (A and b) of the log (f) of relative humidity (u).
Change of unit is selected by the quantity specific jacobian-add methods (so far only at hand for gas species).
Activating a transformation function is done by this method. Note that the functions are defined as the transformation from z to x. For more details on affine transformations, see jacobianSetAffineTransformation*.
[in,out] | jacobian_quantities | WS Input/Output |
[in] | transformation_func | Generic Input |
[in] | z_min | Generic Input (Default: "0") |
[in] | z_max | Generic Input (Default: "-99e99") |
Definition at line 2040 of file m_jacobian.cc.
References Vector::resize().
Referenced by jacobianSetFuncTransformation_g().
void particle_bulkprop_fieldPerturb | ( | Tensor4 & | particle_bulkprop_field, |
const Index & | atmosphere_dim, | ||
const Vector & | p_grid, | ||
const Vector & | lat_grid, | ||
const Vector & | lon_grid, | ||
const ArrayOfString & | particle_bulkprop_names, | ||
const String & | particle_type, | ||
const Vector & | p_ret_grid, | ||
const Vector & | lat_ret_grid, | ||
const Vector & | lon_ret_grid, | ||
const Index & | pert_index, | ||
const Numeric & | pert_size, | ||
const String & | pert_mode, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: particle_bulkprop_fieldPerturb.
Adds a perturbation to particle_bulkprop_field.
Works as AtmFieldPerturb but acts on particle_bulkprop_field.
[in,out] | particle_bulkprop_field | WS Input/Output |
[in] | atmosphere_dim | WS Input |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | particle_bulkprop_names | WS Input |
[in] | particle_type | Generic Input |
[in] | p_ret_grid | Generic Input |
[in] | lat_ret_grid | Generic Input |
[in] | lon_ret_grid | Generic Input |
[in] | pert_index | Generic Input |
[in] | pert_size | Generic Input |
[in] | pert_mode | Generic Input (Default: "absolute") |
Definition at line 2288 of file m_jacobian.cc.
References AtmFieldPerturb(), ARTS::Var::atmosphere_dim(), find_first(), joker, ARTS::Var::lat_grid(), ARTS::Var::lon_grid(), ARTS::Var::p_grid(), ARTS::Var::particle_bulkprop_field(), ARTS::Var::particle_bulkprop_names(), and ARTS::Var::verbosity().
Referenced by particle_bulkprop_fieldPerturb_g().
void particle_bulkprop_fieldPerturbAtmGrids | ( | Tensor4 & | particle_bulkprop_field, |
const Index & | atmosphere_dim, | ||
const Vector & | p_grid, | ||
const Vector & | lat_grid, | ||
const Vector & | lon_grid, | ||
const ArrayOfString & | particle_bulkprop_names, | ||
const String & | particle_type, | ||
const Index & | pert_index, | ||
const Numeric & | pert_size, | ||
const String & | pert_mode, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: particle_bulkprop_fieldPerturbAtmGrids.
Adds a perturbation to particle_bulkprop_field.
Works as AtmFieldPerturbAtmGrids but acts on particle_bulkprop_field.
[in,out] | particle_bulkprop_field | WS Input/Output |
[in] | atmosphere_dim | WS Input |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | particle_bulkprop_names | WS Input |
[in] | particle_type | Generic Input |
[in] | pert_index | Generic Input |
[in] | pert_size | Generic Input |
[in] | pert_mode | Generic Input (Default: "absolute") |
Definition at line 2329 of file m_jacobian.cc.
References AtmFieldPerturbAtmGrids(), ARTS::Var::atmosphere_dim(), find_first(), joker, ARTS::Var::lat_grid(), ARTS::Var::lon_grid(), ARTS::Var::p_grid(), ARTS::Var::particle_bulkprop_field(), ARTS::Var::particle_bulkprop_names(), and ARTS::Var::verbosity().
Referenced by particle_bulkprop_fieldPerturbAtmGrids_g().
void vmr_fieldPerturb | ( | Tensor4 & | vmr_field, |
const Index & | atmosphere_dim, | ||
const Vector & | p_grid, | ||
const Vector & | lat_grid, | ||
const Vector & | lon_grid, | ||
const ArrayOfArrayOfSpeciesTag & | abs_species, | ||
const String & | species, | ||
const Vector & | p_ret_grid, | ||
const Vector & | lat_ret_grid, | ||
const Vector & | lon_ret_grid, | ||
const Index & | pert_index, | ||
const Numeric & | pert_size, | ||
const String & | pert_mode, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: vmr_fieldPerturb.
Adds a perturbation to vmr_field.
Works as AtmFieldPerturb but acts on vmr_field.
[in,out] | vmr_field | WS Input/Output |
[in] | atmosphere_dim | WS Input |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | abs_species | WS Input |
[in] | species | Generic Input |
[in] | p_ret_grid | Generic Input |
[in] | lat_ret_grid | Generic Input |
[in] | lon_ret_grid | Generic Input |
[in] | pert_index | Generic Input |
[in] | pert_size | Generic Input |
[in] | pert_mode | Generic Input (Default: "absolute") |
Definition at line 2364 of file m_jacobian.cc.
References ARTS::Var::abs_species(), AtmFieldPerturb(), ARTS::Var::atmosphere_dim(), joker, ARTS::Var::lat_grid(), ARTS::Var::lon_grid(), ARTS::Var::p_grid(), Species, ARTS::Var::verbosity(), and ARTS::Var::vmr_field().
Referenced by vmr_fieldPerturb_g().
void vmr_fieldPerturbAtmGrids | ( | Tensor4 & | vmr_field, |
const Index & | atmosphere_dim, | ||
const Vector & | p_grid, | ||
const Vector & | lat_grid, | ||
const Vector & | lon_grid, | ||
const ArrayOfArrayOfSpeciesTag & | abs_species, | ||
const String & | species, | ||
const Index & | pert_index, | ||
const Numeric & | pert_size, | ||
const String & | pert_mode, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: vmr_fieldPerturbAtmGrids.
Adds a perturbation to vmr_field.
Works as AtmFieldPerturbAtmGrids but acts on vmr_field.
[in,out] | vmr_field | WS Input/Output |
[in] | atmosphere_dim | WS Input |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | abs_species | WS Input |
[in] | species | Generic Input |
[in] | pert_index | Generic Input |
[in] | pert_size | Generic Input |
[in] | pert_mode | Generic Input (Default: "absolute") |
Definition at line 2411 of file m_jacobian.cc.
References ARTS::Var::abs_species(), AtmFieldPerturbAtmGrids(), ARTS::Var::atmosphere_dim(), joker, ARTS::Var::lat_grid(), ARTS::Var::lon_grid(), ARTS::Var::p_grid(), Species, ARTS::Var::verbosity(), and ARTS::Var::vmr_field().
Referenced by vmr_fieldPerturbAtmGrids_g().
|
extern |
Referenced by jacobianAddAbsSpecies(), and jacobianAdjustAndTransform().
|
extern |
Referenced by jacobianAddBasicCatalogParameter(), and jacobianAddShapeCatalogParameter().
|
extern |
Referenced by jacobianAddSpecialSpecies().
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
Referenced by jacobianAddFreqShift(), jacobianAddFreqStretch(), jacobianCalcFreqShift(), and jacobianCalcFreqStretch().
|
extern |
Referenced by jacobianAddFreqShift(), and jacobianCalcFreqShift().
|
extern |
Referenced by jacobianAddFreqStretch(), and jacobianCalcFreqStretch().
|
extern |
Referenced by jacobianAddBasicCatalogParameter().
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
Referenced by jacobianAddBasicCatalogParameter().
|
extern |
Referenced by jacobianAddMagField().
|
extern |
Referenced by jacobianAddNLTE().
|
extern |
Referenced by jacobianAddSpecialSpecies().
|
extern |
|
extern |
Referenced by jacobianAddPointingZa(), and jacobianCalcPointingZaRecalc().
|
extern |
Referenced by jacobianAddPointingZa(), and jacobianCalcPointingZaInterp().
|
extern |
Referenced by jacobianAddPointingZa(), jacobianCalcPointingZaInterp(), and jacobianCalcPointingZaRecalc().
|
extern |
Referenced by jacobianAddPointingZa(), jacobianCalcPointingZaInterp(), and jacobianCalcPointingZaRecalc().
|
extern |
Referenced by jacobianAddPolyfit(), and jacobianCalcPolyfit().
|
extern |
|
extern |
|
extern |
Referenced by jacobianAddScatSpecies().
|
extern |
|
extern |
|
extern |
|
extern |
Referenced by jacobianAddSinefit(), and jacobianCalcSinefit().
|
extern |
Referenced by jacobianAddSurfaceQuantity().
|
extern |
Referenced by jacobianAddTemperature().
|
extern |
|
extern |
|
extern |
|
extern |
Referenced by jacobianAddWind().