ARTS  2.3.1285(git:92a29ea9-dirty)
m_jacobian.cc File Reference

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

Variables

const Numeric PI
 
const String ABSSPECIES_MAINTAG
 
const String FREQUENCY_MAINTAG
 
const String FREQUENCY_SUBTAG_0
 
const String FREQUENCY_SUBTAG_1
 
const String POINTING_MAINTAG
 
const String POINTING_SUBTAG_A
 
const String POINTING_CALCMODE_A
 
const String POINTING_CALCMODE_B
 
const String POLYFIT_MAINTAG
 
const String SCATSPECIES_MAINTAG
 
const String SINEFIT_MAINTAG
 
const String TEMPERATURE_MAINTAG
 
const String NLTE_MAINTAG
 
const String WIND_MAINTAG
 
const String MAGFIELD_MAINTAG
 
const String FLUX_MAINTAG
 
const String PROPMAT_SUBSUBTAG
 
const String ELECTRONS_MAINTAG
 
const String PARTICULATES_MAINTAG
 
const String CATALOGPARAMETER_MAINTAG
 
const String SURFACE_MAINTAG
 
const String PRESSUREBROADENINGGAMMA_MODE
 
const String LINESTRENGTH_MODE
 
const String LINECENTER_MODE
 
const String LINEMIXINGY_MODE
 
const String LINEMIXINGG_MODE
 
const String LINEMIXINGDF_MODE
 
const String SELFBROADENING_MODE
 
const String FOREIGNBROADENING_MODE
 
const String WATERBROADENING_MODE
 
const String SELFBROADENINGEXPONENT_MODE
 
const String FOREIGNBROADENINGEXPONENT_MODE
 
const String WATERBROADENINGEXPONENT_MODE
 
const String SELFPRESSURESHIFT_MODE
 
const String FOREIGNPRESSURESHIFT_MODE
 
const String WATERPRESSURESHIFT_MODE
 
const String LINEMIXINGY0_MODE
 
const String LINEMIXINGG0_MODE
 
const String LINEMIXINGDF0_MODE
 
const String LINEMIXINGY1_MODE
 
const String LINEMIXINGG1_MODE
 
const String LINEMIXINGDF1_MODE
 
const String LINEMIXINGYEXPONENT_MODE
 
const String LINEMIXINGGEXPONENT_MODE
 
const String LINEMIXINGDFEXPONENT_MODE
 

Detailed Description

Workspace functions related to the jacobian.

Author
Mattias Ekstrom ekstr.nosp@m.om@r.nosp@m.ss.ch.nosp@m.alme.nosp@m.rs.se
Date
2004-09-14

Definition in file m_jacobian.cc.

Function Documentation

◆ AtmFieldPerturb()

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.

Author
Patrick Eriksson
Parameters
[out]perturbed_fieldGeneric output
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]original_fieldGeneric Input
[in]p_ret_gridGeneric Input
[in]lat_ret_gridGeneric Input
[in]lon_ret_gridGeneric Input
[in]pert_indexGeneric Input
[in]pert_sizeGeneric Input
[in]pert_modeGeneric Input (Default: "absolute")

Definition at line 2085 of file m_jacobian.cc.

References chk_atm_field(), get_gp_rq_to_atmgrids(), regrid_atmfield_by_gp_oem(), and reshape().

Referenced by AtmFieldPerturb_g(), particle_bulkprop_fieldPerturb(), and vmr_fieldPerturb().

◆ AtmFieldPerturbAtmGrids()

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.

Author
Patrick Eriksson
Parameters
[out]perturbed_fieldGeneric output
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]original_fieldGeneric Input
[in]pert_indexGeneric Input
[in]pert_sizeGeneric Input
[in]pert_modeGeneric Input (Default: "absolute")

Definition at line 2177 of file m_jacobian.cc.

References chk_atm_field(), and ConstVectorView::nelem().

Referenced by AtmFieldPerturbAtmGrids_g(), particle_bulkprop_fieldPerturbAtmGrids(), and vmr_fieldPerturbAtmGrids().

◆ IndexNumberOfAtmosphericPoints()

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.

Author
Patrick Eriksson
Parameters
[out]nGeneric output
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input

Definition at line 2239 of file m_jacobian.cc.

References ConstVectorView::nelem().

Referenced by IndexNumberOfAtmosphericPoints_g().

◆ jacobianAddAbsSpecies()

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.

Author
Mattias Ekstrom
Patrick Eriksson
Parameters
[in,out]wsWorkspace
[in,out]jacobian_quantitiesWS Input/Output
[in,out]jacobian_agendaWS Input/Output
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]g1Generic Input
[in]g2Generic Input
[in]g3Generic Input
[in]speciesGeneric Input
[in]unitGeneric Input (Default: "vmr")
[in]for_species_tagGeneric Input (Default: "1")

Definition at line 159 of file m_jacobian.cc.

References RetrievalQuantity::Analytical(), Agenda::append(), array_species_tag_from_string(), check_retrieval_grids(), CREATE_OUT2, CREATE_OUT3, RetrievalQuantity::Grids(), Isotopologue, QuantumIdentifier::Isotopologue(), RetrievalQuantity::MainTag(), RetrievalQuantity::Mode(), Array< base >::nelem(), NotPropagationMatrixType, RetrievalQuantity::Perturbation(), PROPMAT_SUBSUBTAG, RetrievalQuantity::PropType(), RetrievalQuantity::QuantumIdentity(), QuantumIdentifier::SetAll(), Species, QuantumIdentifier::Species(), _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str(), RetrievalQuantity::SubSubtag(), RetrievalQuantity::Subtag(), and VMR.

Referenced by abs_speciesAdd2(), jacobianAddAbsSpecies_g(), and retrievalAddAbsSpecies().

◆ jacobianAddBasicCatalogParameter()

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.

Author
Richard Larsson
Parameters
[in,out]wsWorkspace
[in,out]jacobian_quantitiesWS Input/Output
[in,out]jacobian_agendaWS Input/Output
[in]catalog_identityGeneric Input
[in]catalog_parameterGeneric Input

Definition at line 1719 of file m_jacobian.cc.

References Agenda::append(), CREATE_OUT3, LineCenter, LineStrength, Array< base >::nelem(), RetrievalQuantity::PropType(), and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().

Referenced by jacobianAddBasicCatalogParameter_g(), jacobianAddBasicCatalogParameters(), and retrievalAddCatalogParameter().

◆ jacobianAddBasicCatalogParameters()

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

Author
Richard Larsson
Parameters
[in,out]wsWorkspace
[in,out]jacobian_quantitiesWS Input/Output
[in,out]jacobian_agendaWS Input/Output
[in]catalog_identitiesGeneric Input
[in]catalog_parametersGeneric Input

Definition at line 1773 of file m_jacobian.cc.

References CREATE_OUT2, jacobianAddBasicCatalogParameter(), and Array< base >::nelem().

Referenced by jacobianAddBasicCatalogParameters_g(), and retrievalAddCatalogParameters().

◆ jacobianAddFreqShift()

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

Author
Patrick Eriksson
Parameters
[in,out]wsWorkspace
[in,out]jacobian_quantitiesWS Input/Output
[in,out]jacobian_agendaWS Input/Output
[in]f_gridWS Input
[in]dfGeneric Input (Default: "100e3")

Definition at line 271 of file m_jacobian.cc.

References Agenda::append(), FREQUENCY_SUBTAG_0, RetrievalQuantity::MainTag(), Array< base >::nelem(), ConstVectorView::nelem(), and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().

Referenced by jacobianAddFreqShift_g(), and retrievalAddFreqShift().

◆ jacobianAddFreqStretch()

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

Author
Patrick Eriksson
Parameters
[in,out]wsWorkspace
[in,out]jacobian_quantitiesWS Input/Output
[in,out]jacobian_agendaWS Input/Output
[in]f_gridWS Input
[in]dfGeneric Input (Default: "100e3")

Definition at line 425 of file m_jacobian.cc.

References Agenda::append(), FREQUENCY_SUBTAG_1, RetrievalQuantity::MainTag(), Array< base >::nelem(), ConstVectorView::nelem(), and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().

Referenced by jacobianAddFreqStretch_g(), and retrievalAddFreqStretch().

◆ jacobianAddMagField()

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

Author
Patrick Eriksson
Richard Larsson
Parameters
[in,out]wsWorkspace
[in,out]jacobian_quantitiesWS Input/Output
[in,out]jacobian_agendaWS Input/Output
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]g1Generic Input
[in]g2Generic Input
[in]g3Generic Input
[in]componentGeneric Input (Default: "v")
[in]dBGeneric Input (Default: "1.0e-7")

Definition at line 1557 of file m_jacobian.cc.

References Agenda::append(), check_retrieval_grids(), CREATE_OUT2, CREATE_OUT3, MagneticMagnitude, MagneticU, MagneticV, MagneticW, Array< base >::nelem(), RetrievalQuantity::PropType(), and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().

Referenced by jacobianAddMagField_g(), and retrievalAddMagField().

◆ jacobianAddNLTE()

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

Author
Richard Larsson
Parameters
[in,out]wsWorkspace
[in,out]jacobian_quantitiesWS Input/Output
[in,out]jacobian_agendaWS Input/Output
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]g1Generic Input
[in]g2Generic Input
[in]g3Generic Input
[in]energy_level_identityGeneric Input
[in]dxGeneric Input (Default: "1.0e-3")

Definition at line 1796 of file m_jacobian.cc.

References Agenda::append(), check_retrieval_grids(), CREATE_OUT3, RetrievalQuantity::MainTag(), Array< base >::nelem(), and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().

Referenced by jacobianAddNLTE_g(), and jacobianAddNLTEs().

◆ 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

Author
Richard Larsson
Parameters
[in,out]wsWorkspace
[in,out]jacobian_quantitiesWS Input/Output
[in,out]jacobian_agendaWS Input/Output
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]g1Generic Input
[in]g2Generic Input
[in]g3Generic Input
[in]energy_level_identitiesGeneric Input
[in]dxGeneric Input (Default: "1.0e-3")

Definition at line 1861 of file m_jacobian.cc.

References jacobianAddNLTE().

Referenced by jacobianAddNLTEs_g().

◆ jacobianAddPointingZa()

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.

Author
Patrick Eriksson
Mattias Ekstrom
Parameters
[in,out]wsWorkspace
[in,out]jacobian_quantitiesWS Input/Output
[in,out]jacobian_agendaWS Input/Output
[in]sensor_posWS Input
[in]sensor_timeWS Input
[in]poly_orderGeneric Input (Default: "0")
[in]calcmodeGeneric Input (Default: "recalc")
[in]dzaGeneric Input (Default: "0.01")

Definition at line 600 of file m_jacobian.cc.

References RetrievalQuantity::Analytical(), Agenda::append(), RetrievalQuantity::Grids(), RetrievalQuantity::MainTag(), RetrievalQuantity::Mode(), Array< base >::nelem(), ConstVectorView::nelem(), ConstMatrixView::nrows(), RetrievalQuantity::Perturbation(), POINTING_SUBTAG_A, Vector::resize(), _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str(), and RetrievalQuantity::Subtag().

Referenced by jacobianAddPointingZa_g(), and retrievalAddPointingZa().

◆ jacobianAddPolyfit()

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.

Author
Patrick Eriksson
Parameters
[in,out]wsWorkspace
[in,out]jacobian_quantitiesWS Input/Output
[in,out]jacobian_agendaWS Input/Output
[in]sensor_response_pol_gridWS Input
[in]sensor_response_dlos_gridWS Input
[in]sensor_posWS Input
[in]poly_orderGeneric Input
[in]no_pol_variationGeneric Input (Default: "0")
[in]no_los_variationGeneric Input (Default: "0")
[in]no_mblock_variationGeneric Input (Default: "0")

Definition at line 937 of file m_jacobian.cc.

References Agenda::append(), i, RetrievalQuantity::MainTag(), Array< base >::nelem(), ConstMatrixView::nrows(), POLYFIT_MAINTAG, and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().

Referenced by jacobianAddPolyfit_g(), and retrievalAddPolyfit().

◆ jacobianAddScatSpecies()

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.

Author
Patrick Eriksson
Parameters
[in,out]wsWorkspace
[in,out]jacobian_quantitiesWS Input/Output
[in,out]jacobian_agendaWS Input/Output
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]g1Generic Input
[in]g2Generic Input
[in]g3Generic Input
[in]speciesGeneric Input
[in]quantityGeneric Input

Definition at line 1099 of file m_jacobian.cc.

References Agenda::append(), check_retrieval_grids(), CREATE_OUT2, CREATE_OUT3, RetrievalQuantity::MainTag(), Array< base >::nelem(), and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().

Referenced by jacobianAddScatSpecies_g(), and retrievalAddScatSpecies().

◆ jacobianAddShapeCatalogParameter()

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

Author
Richard Larsson
Parameters
[in,out]wsWorkspace
[in,out]jacobian_quantitiesWS Input/Output
[in,out]jacobian_agendaWS Input/Output
[in]line_identityGeneric Input
[in]speciesGeneric Input
[in]variableGeneric Input
[in]coefficientGeneric Input

Definition at line 1638 of file m_jacobian.cc.

References RetrievalQuantity::Analytical(), Agenda::append(), CREATE_OUT3, RetrievalQuantity::Grids(), RetrievalQuantity::IntegrationOn(), RetrievalQuantity::MainTag(), RetrievalQuantity::Mode(), RetrievalQuantity::PropType(), q, RetrievalQuantity::QuantumIdentity(), select_derivativeLineShape(), SpeciesTag::SpeciesNameMain(), RetrievalQuantity::SubSubtag(), QuantumIdentifier::TRANSITION, and QuantumIdentifier::Type().

Referenced by jacobianAddShapeCatalogParameter_g().

◆ jacobianAddShapeCatalogParameters()

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

Author
Richard Larsson
Parameters
[in,out]wsWorkspace
[in,out]jacobian_quantitiesWS Input/Output
[in,out]jacobian_agendaWS Input/Output
[in]line_identitiesGeneric Input
[in]speciesGeneric Input
[in]variablesGeneric Input
[in]coefficientsGeneric Input

Definition at line 1685 of file m_jacobian.cc.

References AllLineShapeCoeffs(), AllLineShapeVars(), and Array< base >::nelem().

Referenced by jacobianAddShapeCatalogParameters_g().

◆ jacobianAddSinefit()

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.

Author
Patrick Eriksson
Parameters
[in,out]wsWorkspace
[in,out]jacobian_quantitiesWS Input/Output
[in,out]jacobian_agendaWS Input/Output
[in]sensor_response_pol_gridWS Input
[in]sensor_response_dlos_gridWS Input
[in]sensor_posWS Input
[in]period_lengthsGeneric Input
[in]no_pol_variationGeneric Input (Default: "0")
[in]no_los_variationGeneric Input (Default: "0")
[in]no_mblock_variationGeneric Input (Default: "0")

Definition at line 1167 of file m_jacobian.cc.

References Agenda::append(), i, RetrievalQuantity::MainTag(), Array< base >::nelem(), ConstVectorView::nelem(), ConstMatrixView::nrows(), SINEFIT_MAINTAG, and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().

Referenced by jacobianAddSinefit_g(), and retrievalAddSinefit().

◆ jacobianAddSpecialSpecies()

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.

Author
Richard Larsson
Parameters
[in,out]wsWorkspace
[in,out]jacobian_quantitiesWS Input/Output
[in,out]jacobian_agendaWS Input/Output
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]g1Generic Input
[in]g2Generic Input
[in]g3Generic Input
[in]speciesGeneric Input

Definition at line 1891 of file m_jacobian.cc.

References Agenda::append(), check_retrieval_grids(), CREATE_OUT2, CREATE_OUT3, Electrons, ELECTRONS_MAINTAG, RetrievalQuantity::Grids(), Array< base >::nelem(), Particulates, PARTICULATES_MAINTAG, and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().

Referenced by jacobianAddSpecialSpecies_g(), and retrievalAddSpecialSpecies().

◆ jacobianAddSurfaceQuantity()

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.

Author
Patrick Eriksson
Parameters
[in,out]wsWorkspace
[in,out]jacobian_quantitiesWS Input/Output
[in,out]jacobian_agendaWS Input/Output
[in]atmosphere_dimWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]g1Generic Input
[in]g2Generic Input
[in]quantityGeneric Input

Definition at line 1338 of file m_jacobian.cc.

References Agenda::append(), check_retrieval_grids(), CREATE_OUT2, CREATE_OUT3, RetrievalQuantity::MainTag(), max, Array< base >::nelem(), and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().

Referenced by jacobianAddSurfaceQuantity_g(), and retrievalAddSurfaceQuantity().

◆ jacobianAddTemperature()

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.

Author
Mattias Ekstrom
Patrick Eriksson
Parameters
[in,out]wsWorkspace
[in,out]jacobian_quantitiesWS Input/Output
[in,out]jacobian_agendaWS Input/Output
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]g1Generic Input
[in]g2Generic Input
[in]g3Generic Input
[in]hseGeneric Input (Default: "on")

Definition at line 1397 of file m_jacobian.cc.

References Agenda::append(), check_retrieval_grids(), CREATE_OUT3, RetrievalQuantity::MainTag(), Array< base >::nelem(), _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str(), Temperature, and TEMPERATURE_MAINTAG.

Referenced by jacobianAddTemperature_g(), and retrievalAddTemperature().

◆ jacobianAddWind()

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.

Author
Patrick Eriksson
Parameters
[in,out]wsWorkspace
[in,out]jacobian_quantitiesWS Input/Output
[in,out]jacobian_agendaWS Input/Output
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]g1Generic Input
[in]g2Generic Input
[in]g3Generic Input
[in]componentGeneric Input (Default: "v")
[in]dfrequencyGeneric Input (Default: "0.1")

Definition at line 1476 of file m_jacobian.cc.

References Agenda::append(), check_retrieval_grids(), CREATE_OUT2, CREATE_OUT3, Array< base >::nelem(), RetrievalQuantity::PropType(), _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str(), WindMagnitude, WindU, WindV, and WindW.

Referenced by jacobianAddWind_g(), and retrievalAddWind().

◆ jacobianAdjustAndTransform()

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:

  1. The retrieval transformations set by the user can not be applied onthe Jacobian inside yCalc. Transformations are instead applied by calling this method.
  2. It applies required adjustments of the Jacoboan. So far there is only one possible adjustment. If any absorption species uses the "rel" unit, an adjustment is needed for later iterations of the inversion.

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.

Author
Patrick Eriksson
Parameters
[in,out]jacobianWS Input/Output
[in]jacobian_quantitiesWS Input
[in]xWS Input

Definition at line 1971 of file m_jacobian.cc.

References ConstMatrixView::empty(), i, jac_ranges_indices(), joker, Array< base >::nelem(), q, transform_jacobian(), transform_x_back(), and x0.

Referenced by jacobianAdjustAndTransform_g().

◆ jacobianCalcDoNothing()

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.

Author
Oliver Lemke
Parameters
[in,out]jacobianWS Input/Output
[in]mblock_indexWS Input
[in]iybWS Input
[in]ybWS Input

Definition at line 112 of file m_jacobian.cc.

Referenced by jacobianCalcDoNothing_g().

◆ jacobianCalcFreqShift()

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.

Author
Patrick Eriksson
Parameters
[in,out]jacobianWS Input/Output
[in]mblock_indexWS Input
[in]iybWS Input
[in]ybWS Input
[in]stokes_dimWS Input
[in]f_gridWS Input
[in]mblock_dlos_gridWS Input
[in]sensor_responseWS Input
[in]jacobian_quantitiesWS Input

Definition at line 329 of file m_jacobian.cc.

References FREQUENCY_SUBTAG_0, get_rowindex_for_mblock(), gridpos_poly(), RetrievalQuantity::Grids(), i, interp(), interpweights(), jac_ranges_indices(), mult(), n, Sparse::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), Sparse::nrows(), ConstMatrixView::nrows(), and RetrievalQuantity::Perturbation().

Referenced by jacobianCalcFreqShift_g().

◆ jacobianCalcFreqStretch()

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.

Author
Patrick Eriksson
Parameters
[in,out]jacobianWS Input/Output
[in]mblock_indexWS Input
[in]iybWS Input
[in]ybWS Input
[in]stokes_dimWS Input
[in]f_gridWS Input
[in]mblock_dlos_gridWS Input
[in]sensor_responseWS Input
[in]sensor_response_pol_gridWS Input
[in]sensor_response_f_gridWS Input
[in]sensor_response_dlos_gridWS Input
[in]jacobian_quantitiesWS Input

Definition at line 479 of file m_jacobian.cc.

References FREQUENCY_SUBTAG_1, get_rowindex_for_mblock(), gridpos_poly(), RetrievalQuantity::Grids(), i, interp(), interpweights(), jac_ranges_indices(), mult(), n, Sparse::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), Sparse::nrows(), ConstMatrixView::nrows(), RetrievalQuantity::Perturbation(), polynomial_basis_func(), and w().

Referenced by jacobianCalcFreqStretch_g().

◆ jacobianCalcPointingZaInterp()

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  
)

◆ jacobianCalcPointingZaRecalc()

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.

Author
Mattias Ekstrom
Patrick Eriksson
Parameters
[in,out]wsWorkspace
[in,out]jacobianWS Input/Output
[in]mblock_indexWS Input
[in]iybWS Input
[in]ybWS Input
[in]atmosphere_dimWS Input
[in]nlte_fieldWS Input
[in]cloudbox_onWS Input
[in]stokes_dimWS Input
[in]f_gridWS Input
[in]sensor_posWS Input
[in]sensor_losWS Input
[in]transmitter_posWS Input
[in]mblock_dlos_gridWS Input
[in]sensor_responseWS Input
[in]sensor_timeWS Input
[in]iy_unitWS Input
[in]iy_main_agendaWS Input
[in]geo_pos_agendaWS Input
[in]jacobian_quantitiesWS Input

Definition at line 808 of file m_jacobian.cc.

References get_rowindex_for_mblock(), Range::get_start(), RetrievalQuantity::Grids(), i, iyb_calc(), jac_ranges_indices(), joker, mult(), n, Array< base >::nelem(), Sparse::nrows(), ConstMatrixView::nrows(), RetrievalQuantity::Perturbation(), POINTING_CALCMODE_A, and w().

Referenced by jacobianCalcPointingZaRecalc_g().

◆ jacobianCalcPolyfit()

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.

Author
Patrick Eriksson
Parameters
[in,out]jacobianWS Input/Output
[in]mblock_indexWS Input
[in]iybWS Input
[in]ybWS Input
[in]sensor_responseWS Input
[in]sensor_response_pol_gridWS Input
[in]sensor_response_f_gridWS Input
[in]sensor_response_dlos_gridWS Input
[in]jacobian_quantitiesWS Input
[in]poly_coeffGeneric Input

Definition at line 1012 of file m_jacobian.cc.

References get_rowindex_for_mblock(), Range::get_start(), jac_ranges_indices(), Array< base >::nelem(), ConstVectorView::nelem(), ConstMatrixView::nrows(), polynomial_basis_func(), _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str(), and w().

Referenced by jacobianCalcPolyfit_g().

◆ jacobianCalcSinefit()

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.

Author
Patrick Eriksson
Parameters
[in,out]jacobianWS Input/Output
[in]mblock_indexWS Input
[in]iybWS Input
[in]ybWS Input
[in]sensor_responseWS Input
[in]sensor_response_pol_gridWS Input
[in]sensor_response_f_gridWS Input
[in]sensor_response_dlos_gridWS Input
[in]jacobian_quantitiesWS Input
[in]period_indexGeneric Input

Definition at line 1243 of file m_jacobian.cc.

References Array< base >::nelem(), ConstVectorView::nelem(), ConstMatrixView::nrows(), and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().

Referenced by jacobianCalcSinefit_g().

◆ jacobianClose()

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.

Author
Mattias Ekstrom
Parameters
[in,out]wsWorkspace
[out]jacobian_doWS Output
[in,out]jacobian_agendaWS Input/Output
[in]jacobian_quantitiesWS Input

Definition at line 122 of file m_jacobian.cc.

References Agenda::check().

Referenced by jacobianClose_g(), and retrievalDefClose().

◆ jacobianFromTwoY()

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.

Author
Patrick Eriksson
Parameters
[out]jacobianWS Output
[in]yWS Input
[in]y_pertGeneric Input
[in]pert_sizeGeneric Input

Definition at line 2253 of file m_jacobian.cc.

References n, and ConstVectorView::nelem().

Referenced by jacobianFromTwoY_g().

◆ jacobianFromYbatch()

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.

Author
Patrick Eriksson
Parameters
[out]jacobianWS Output
[in]ybatchWS Input
[in]yWS Input
[in]pert_sizeGeneric Input

Definition at line 2268 of file m_jacobian.cc.

References i, joker, n, Array< base >::nelem(), ConstVectorView::nelem(), Absorption::nelem(), and Matrix::resize().

Referenced by jacobianFromYbatch_g().

◆ jacobianInit()

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.

Author
Mattias Ekstrom
Parameters
[out]jacobian_quantitiesWS Output
[out]jacobian_agendaWS Output

Definition at line 137 of file m_jacobian.cc.

References Agenda::set_name().

Referenced by jacobianInit_g(), jacobianOff(), and retrievalDefInit().

◆ jacobianOff()

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.

Author
Patrick Eriksson
Parameters
[out]jacobian_doWS Output
[out]jacobian_agendaWS Output
[out]jacobian_quantitiesWS Output

Definition at line 146 of file m_jacobian.cc.

References jacobianInit().

Referenced by jacobianOff_g(), and main().

◆ jacobianSetAffineTransformation()

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.

Author
Simon Pfreundschuh
Parameters
[in,out]jacobian_quantitiesWS Input/Output
[in]transformation_matrixGeneric Input
[in]offset_vectorGeneric 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().

◆ jacobianSetFuncTransformation()

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.

General handling of retrieval units and transformations:

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

Author
Patrick Eriksson
Simon Pfreundschuh
Parameters
[in,out]jacobian_quantitiesWS Input/Output
[in]transformation_funcGeneric Input
[in]z_minGeneric Input (Default: "0")
[in]z_maxGeneric Input (Default: "-99e99")

Definition at line 2040 of file m_jacobian.cc.

References Vector::resize(), and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().

Referenced by jacobianSetFuncTransformation_g().

◆ particle_bulkprop_fieldPerturb()

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.

Author
Patrick Eriksson
Parameters
[in,out]particle_bulkprop_fieldWS Input/Output
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]particle_bulkprop_namesWS Input
[in]particle_typeGeneric Input
[in]p_ret_gridGeneric Input
[in]lat_ret_gridGeneric Input
[in]lon_ret_gridGeneric Input
[in]pert_indexGeneric Input
[in]pert_sizeGeneric Input
[in]pert_modeGeneric Input (Default: "absolute")

Definition at line 2288 of file m_jacobian.cc.

References AtmFieldPerturb(), find_first(), joker, and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().

Referenced by particle_bulkprop_fieldPerturb_g().

◆ particle_bulkprop_fieldPerturbAtmGrids()

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.

Author
Patrick Eriksson
Parameters
[in,out]particle_bulkprop_fieldWS Input/Output
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]particle_bulkprop_namesWS Input
[in]particle_typeGeneric Input
[in]pert_indexGeneric Input
[in]pert_sizeGeneric Input
[in]pert_modeGeneric Input (Default: "absolute")

Definition at line 2329 of file m_jacobian.cc.

References AtmFieldPerturbAtmGrids(), find_first(), joker, and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().

Referenced by particle_bulkprop_fieldPerturbAtmGrids_g().

◆ vmr_fieldPerturb()

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.

Author
Patrick Eriksson
Parameters
[in,out]vmr_fieldWS Input/Output
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]abs_speciesWS Input
[in]speciesGeneric Input
[in]p_ret_gridGeneric Input
[in]lat_ret_gridGeneric Input
[in]lon_ret_gridGeneric Input
[in]pert_indexGeneric Input
[in]pert_sizeGeneric Input
[in]pert_modeGeneric Input (Default: "absolute")

Definition at line 2364 of file m_jacobian.cc.

References AtmFieldPerturb(), i, joker, Array< base >::nelem(), SpeciesTag::Species(), Species, and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().

Referenced by vmr_fieldPerturb_g().

◆ vmr_fieldPerturbAtmGrids()

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.

Author
Patrick Eriksson
Parameters
[in,out]vmr_fieldWS Input/Output
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]abs_speciesWS Input
[in]speciesGeneric Input
[in]pert_indexGeneric Input
[in]pert_sizeGeneric Input
[in]pert_modeGeneric Input (Default: "absolute")

Definition at line 2411 of file m_jacobian.cc.

References AtmFieldPerturbAtmGrids(), i, joker, Array< base >::nelem(), SpeciesTag::Species(), Species, and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().

Referenced by vmr_fieldPerturbAtmGrids_g().

Variable Documentation

◆ ABSSPECIES_MAINTAG

const String ABSSPECIES_MAINTAG

◆ CATALOGPARAMETER_MAINTAG

const String CATALOGPARAMETER_MAINTAG

◆ ELECTRONS_MAINTAG

const String ELECTRONS_MAINTAG

◆ FLUX_MAINTAG

const String FLUX_MAINTAG

◆ FOREIGNBROADENING_MODE

const String FOREIGNBROADENING_MODE

◆ FOREIGNBROADENINGEXPONENT_MODE

const String FOREIGNBROADENINGEXPONENT_MODE

◆ FOREIGNPRESSURESHIFT_MODE

const String FOREIGNPRESSURESHIFT_MODE

◆ FREQUENCY_MAINTAG

const String FREQUENCY_MAINTAG

◆ FREQUENCY_SUBTAG_0

const String FREQUENCY_SUBTAG_0

◆ FREQUENCY_SUBTAG_1

const String FREQUENCY_SUBTAG_1

◆ LINECENTER_MODE

const String LINECENTER_MODE

◆ LINEMIXINGDF0_MODE

const String LINEMIXINGDF0_MODE

◆ LINEMIXINGDF1_MODE

const String LINEMIXINGDF1_MODE

◆ LINEMIXINGDF_MODE

const String LINEMIXINGDF_MODE

◆ LINEMIXINGDFEXPONENT_MODE

const String LINEMIXINGDFEXPONENT_MODE

◆ LINEMIXINGG0_MODE

const String LINEMIXINGG0_MODE

◆ LINEMIXINGG1_MODE

const String LINEMIXINGG1_MODE

◆ LINEMIXINGG_MODE

const String LINEMIXINGG_MODE

◆ LINEMIXINGGEXPONENT_MODE

const String LINEMIXINGGEXPONENT_MODE

◆ LINEMIXINGY0_MODE

const String LINEMIXINGY0_MODE

◆ LINEMIXINGY1_MODE

const String LINEMIXINGY1_MODE

◆ LINEMIXINGY_MODE

const String LINEMIXINGY_MODE

◆ LINEMIXINGYEXPONENT_MODE

const String LINEMIXINGYEXPONENT_MODE

◆ LINESTRENGTH_MODE

const String LINESTRENGTH_MODE

◆ MAGFIELD_MAINTAG

const String MAGFIELD_MAINTAG

◆ NLTE_MAINTAG

const String NLTE_MAINTAG

◆ PARTICULATES_MAINTAG

const String PARTICULATES_MAINTAG

◆ PI

const Numeric PI

◆ POINTING_CALCMODE_A

const String POINTING_CALCMODE_A

◆ POINTING_CALCMODE_B

const String POINTING_CALCMODE_B

◆ POINTING_MAINTAG

const String POINTING_MAINTAG

◆ POINTING_SUBTAG_A

const String POINTING_SUBTAG_A

Referenced by jacobianAddPointingZa().

◆ POLYFIT_MAINTAG

const String POLYFIT_MAINTAG

Referenced by jacobianAddPolyfit().

◆ PRESSUREBROADENINGGAMMA_MODE

const String PRESSUREBROADENINGGAMMA_MODE

◆ PROPMAT_SUBSUBTAG

const String PROPMAT_SUBSUBTAG

Referenced by jacobianAddAbsSpecies().

◆ SCATSPECIES_MAINTAG

const String SCATSPECIES_MAINTAG

◆ SELFBROADENING_MODE

const String SELFBROADENING_MODE

◆ SELFBROADENINGEXPONENT_MODE

const String SELFBROADENINGEXPONENT_MODE

◆ SELFPRESSURESHIFT_MODE

const String SELFPRESSURESHIFT_MODE

◆ SINEFIT_MAINTAG

const String SINEFIT_MAINTAG

Referenced by jacobianAddSinefit().

◆ SURFACE_MAINTAG

const String SURFACE_MAINTAG

◆ TEMPERATURE_MAINTAG

const String TEMPERATURE_MAINTAG

Referenced by jacobianAddTemperature().

◆ WATERBROADENING_MODE

const String WATERBROADENING_MODE

◆ WATERBROADENINGEXPONENT_MODE

const String WATERBROADENINGEXPONENT_MODE

◆ WATERPRESSURESHIFT_MODE

const String WATERPRESSURESHIFT_MODE

◆ WIND_MAINTAG

const String WIND_MAINTAG