ARTS  2.0.49
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 "math_funcs.h"
#include "messages.h"
#include "interpolation_poly.h"
#include "jacobian.h"
#include "physics_funcs.h"
#include "rte.h"

Go to the source code of this file.

Functions

void jacobianClose (Workspace &ws, Index &jacobian_do, Matrix &jacobian, ArrayOfArrayOfIndex &jacobian_indices, Agenda &jacobian_agenda, const ArrayOfRetrievalQuantity &jacobian_quantities, const Matrix &sensor_pos, const Sparse &sensor_response, 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, ArrayOfArrayOfIndex &jacobian_indices, const Verbosity &verbosity)
 WORKSPACE METHOD: jacobianOff. More...
 
void jacobianAddAbsSpecies (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 String &species, const String &method, const String &mode, const Numeric &dx, const Verbosity &verbosity)
 WORKSPACE METHOD: jacobianAddAbsSpecies. More...
 
void jacobianCalcAbsSpeciesAnalytical (Matrix &jacobian, const Index &imblock, const Vector &iyb, const Vector &yb, const Verbosity &)
 WORKSPACE METHOD: jacobianCalcAbsSpeciesAnalytical. More...
 
void jacobianCalcAbsSpeciesPerturbations (Workspace &ws, Matrix &jacobian, const Index &imblock, const Vector &iyb, const Vector &yb, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &t_field, const Tensor3 &z_field, const Tensor4 &vmr_field, const ArrayOfArrayOfSpeciesTag &abs_species, const Index &cloudbox_on, const Index &stokes_dim, const Vector &f_grid, const Matrix &sensor_pos, const Matrix &sensor_los, const Vector &mblock_za_grid, const Vector &mblock_aa_grid, const Index &antenna_dim, const Sparse &sensor_response, const Agenda &iy_clearsky_agenda, const String &y_unit, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfArrayOfIndex &jacobian_indices, const String &species, const Verbosity &verbosity)
 WORKSPACE METHOD: jacobianCalcAbsSpeciesPerturbations. More...
 
void jacobianAddFreqShiftAndStretch (Workspace &ws, ArrayOfRetrievalQuantity &jacobian_quantities, Agenda &jacobian_agenda, const Vector &f_grid, const String &calcmode, const Numeric &df, const Index &do_stretch, const Verbosity &)
 WORKSPACE METHOD: jacobianAddFreqShiftAndStretch. More...
 
void jacobianCalcFreqShiftAndStretchInterp (Matrix &jacobian, const Index &imblock, const Vector &iyb, const Vector &yb, const Index &stokes_dim, const Vector &f_grid, const Vector &mblock_za_grid, const Vector &mblock_aa_grid, const Index &antenna_dim, const Sparse &sensor_response, const ArrayOfIndex &sensor_response_pol_grid, const Vector &sensor_response_f_grid, const Vector &sensor_response_za_grid, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfArrayOfIndex &jacobian_indices, const Verbosity &)
 WORKSPACE METHOD: jacobianCalcFreqShiftAndStretchInterp. 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 &imblock, const Vector &iyb, const Vector &yb, const Index &stokes_dim, const Vector &f_grid, const Matrix &sensor_los, const Vector &mblock_za_grid, const Vector &mblock_aa_grid, const Index &antenna_dim, const Sparse &sensor_response, const Vector &sensor_time, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfArrayOfIndex &jacobian_indices, const Verbosity &)
 WORKSPACE METHOD: jacobianCalcPointingZaInterp. More...
 
void jacobianCalcPointingZaRecalc (Workspace &ws, Matrix &jacobian, const Index &imblock, const Vector &iyb, const Vector &yb, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &t_field, const Tensor3 &z_field, const Tensor4 &vmr_field, const Index &cloudbox_on, const Index &stokes_dim, const Vector &f_grid, const Matrix &sensor_pos, const Matrix &sensor_los, const Vector &mblock_za_grid, const Vector &mblock_aa_grid, const Index &antenna_dim, const Sparse &sensor_response, const Vector &sensor_time, const Agenda &iy_clearsky_agenda, const String &y_unit, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfArrayOfIndex &jacobian_indices, const Verbosity &verbosity)
 WORKSPACE METHOD: jacobianCalcPointingZaRecalc. More...
 
void jacobianAddPolyfit (Workspace &ws, ArrayOfRetrievalQuantity &jq, Agenda &jacobian_agenda, const ArrayOfIndex &sensor_response_pol_grid, const Vector &sensor_response_f_grid, const Vector &sensor_response_za_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 &imblock, const Vector &iyb, const Vector &yb, const Sparse &sensor_response, const ArrayOfIndex &sensor_response_pol_grid, const Vector &sensor_response_f_grid, const Vector &sensor_response_za_grid, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfArrayOfIndex &jacobian_indices, const Index &poly_coeff, const Verbosity &)
 WORKSPACE METHOD: jacobianCalcPolyfit. More...
 
void jacobianAddTemperature (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 String &hse, const String &method, const Numeric &dx, const Verbosity &verbosity)
 WORKSPACE METHOD: jacobianAddTemperature. More...
 
void jacobianCalcTemperatureAnalytical (Matrix &jacobian, const Index &imblock, const Vector &iyb, const Vector &yb, const Verbosity &)
 WORKSPACE METHOD: jacobianCalcTemperatureAnalytical. More...
 
void jacobianCalcTemperaturePerturbations (Workspace &ws, Matrix &jacobian, const Index &imblock, const Vector &iyb, const Vector &yb, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &t_field, const Tensor3 &z_field, const Tensor4 &vmr_field, const ArrayOfArrayOfSpeciesTag &abs_species, const Matrix &r_geoid, const Matrix &z_surface, const Index &cloudbox_on, const Index &stokes_dim, const Vector &f_grid, const Matrix &sensor_pos, const Matrix &sensor_los, const Vector &mblock_za_grid, const Vector &mblock_aa_grid, const Index &antenna_dim, const Sparse &sensor_response, const Agenda &iy_clearsky_agenda, const String &y_unit, const Numeric &p_hse, const Numeric &z_hse_accuracy, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfArrayOfIndex &jacobian_indices, const Verbosity &verbosity)
 WORKSPACE METHOD: jacobianCalcTemperaturePerturbations. More...
 

Variables

const String ABSSPECIES_MAINTAG
 
const String FREQUENCY_MAINTAG
 
const String FREQUENCY_SUBTAG_A
 
const String FREQUENCY_CALCMODE_A
 
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 TEMPERATURE_MAINTAG
 

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

These functions are listed in the doxygen documentation as entries of the file auto_md.h.

Definition in file m_jacobian.cc.

Function Documentation

◆ 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 method,
const String unit,
const Numeric dx,
const Verbosity verbosity 
)

WORKSPACE METHOD: jacobianAddAbsSpecies.

Includes an absorption species in the Jacobian.

Details are given in the user guide.

For 1D or 2D calculations the latitude and/or longitude grid of the retrieval field should set to have zero length.

There are two possible calculation methods: <br> "analytical" : (semi-)analytical expressions are used <br> "perturbation" : pure numerical perturbations are used

The retrieval unit can be: <br> "vmr" : Volume mixing ratio. <br> "nd" : Number density. <br> "rel" : Relative unit (e.g. 1.1 means 10% more of the gas). <br> "logrel" : The retrieval is performed with the logarithm of <br> the "rel" option.

For perturbation calculations the size of the perturbation is set by the user. The unit for the perturbation is the same as for the retrieval unit.

Author
Mattias Ekstrom
Patrick Eriksson
Parameters
[in,out]wsWorkspace
[out]jacobian_quantitiesWS Output
[out]jacobian_agendaWS 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]methodGeneric Input (Default: "analytical")
[in]unitGeneric Input (Default: "rel")
[in]dxGeneric Input (Default: "0.001")

Definition at line 180 of file m_jacobian.cc.

References ABSSPECIES_MAINTAG, RetrievalQuantity::Analytical(), Agenda::append(), check_retrieval_grids(), CREATE_OUT2, CREATE_OUT3, dx, RetrievalQuantity::Grids(), RetrievalQuantity::MainTag(), RetrievalQuantity::Mode(), Array< base >::nelem(), RetrievalQuantity::Perturbation(), RetrievalQuantity::Subtag(), and TEMPERATURE_MAINTAG.

Referenced by abs_speciesAdd2(), and jacobianAddAbsSpecies_g().

◆ jacobianAddFreqShiftAndStretch()

void jacobianAddFreqShiftAndStretch ( Workspace ws,
ArrayOfRetrievalQuantity jacobian_quantities,
Agenda jacobian_agenda,
const Vector f_grid,
const String calcmode,
const Numeric df,
const Index do_stretch,
const Verbosity verbosity 
)

WORKSPACE METHOD: jacobianAddFreqShiftAndStretch.

Includes a frequency fit in the Jacobian.

Retrieval of deviations between nominal and actual backend frequencies can be included by this method. The calculations can be performed in the following ways: <br> calcmode = "interp": Interpolation of monochromatic spectra, <br> shifted with df from nominal values.

The frequencies can be fitted with 1 or 2 variables. The first one is a "shift". That is, an off-set common for all backend channels. The second variable is "stretch", that is included only if do_stretch* is set to 1. The stretch is a frequency shift that goes from -x at the first channel and increases linearly to reach x at the last channel, where x is the retrieved value.

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

Definition at line 536 of file m_jacobian.cc.

References RetrievalQuantity::Analytical(), Agenda::append(), FREQUENCY_CALCMODE_A, FREQUENCY_MAINTAG, FREQUENCY_SUBTAG_A, RetrievalQuantity::Grids(), RetrievalQuantity::MainTag(), RetrievalQuantity::Mode(), Array< base >::nelem(), ConstVectorView::nelem(), RetrievalQuantity::Perturbation(), and RetrievalQuantity::Subtag().

Referenced by jacobianAddFreqShiftAndStretch_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.

Author
Patrick Eriksson
Mattias Ekstrom
Parameters
[in,out]wsWorkspace
[out]jacobian_quantitiesWS Output
[out]jacobian_agendaWS 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 758 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_CALCMODE_A, POINTING_CALCMODE_B, POINTING_MAINTAG, POINTING_SUBTAG_A, Vector::resize(), and RetrievalQuantity::Subtag().

Referenced by jacobianAddPointingZa_g().

◆ jacobianAddPolyfit()

void jacobianAddPolyfit ( Workspace ws,
ArrayOfRetrievalQuantity jacobian_quantities,
Agenda jacobian_agenda,
const ArrayOfIndex sensor_response_pol_grid,
const Vector sensor_response_f_grid,
const Vector sensor_response_za_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 addidative 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.

Author
Patrick Eriksson
Parameters
[in,out]wsWorkspace
[out]jacobian_quantitiesWS Output
[out]jacobian_agendaWS Output
[in]sensor_response_pol_gridWS Input
[in]sensor_response_f_gridWS Input
[in]sensor_response_za_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 1097 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(), POLYFIT_MAINTAG, and RetrievalQuantity::Subtag().

Referenced by jacobianAddPolyfit_g().

◆ 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 String method,
const Numeric dt,
const Verbosity verbosity 
)

WORKSPACE METHOD: jacobianAddTemperature.

Includes atmospheric temperatures in the Jacobian.

The calculations can be performed by (semi-)analytical expressions or by perturbations. Hydrostatic equilibrium (HSE) can be included. For perturbation calculations, all possible effects are included (but is a costly option). The analytical calculation approach neglects 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.

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 choices for method are: <br> "analytical" : (semi-)analytical expressions are used <br> "perturbation" : pure numerical perturbations are used

Author
Mattias Ekstrom
Patrick Eriksson
Parameters
[in,out]wsWorkspace
[out]jacobian_quantitiesWS Output
[out]jacobian_agendaWS 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: "off")
[in]methodGeneric Input (Default: "analytical")
[in]dtGeneric Input (Default: "1")

Definition at line 1281 of file m_jacobian.cc.

References ABSSPECIES_MAINTAG, RetrievalQuantity::Analytical(), Agenda::append(), check_retrieval_grids(), CREATE_OUT3, dx, RetrievalQuantity::Grids(), RetrievalQuantity::MainTag(), RetrievalQuantity::Mode(), Array< base >::nelem(), RetrievalQuantity::Perturbation(), RetrievalQuantity::Subtag(), and TEMPERATURE_MAINTAG.

Referenced by jacobianAddTemperature_g().

◆ jacobianCalcAbsSpeciesAnalytical()

void jacobianCalcAbsSpeciesAnalytical ( Matrix jacobian,
const Index imblock,
const Vector iyb,
const Vector yb,
const Verbosity verbosity 
)

WORKSPACE METHOD: jacobianCalcAbsSpeciesAnalytical.

This function doesn't do anything. It just exists to satisfy the input and output requirement of the jacobian_agenda.

This function is added to jacobian_agenda by jacobianAddAbsSpecies and should normally not be called by the user.

Author
Oliver Lemke
Parameters
[out]jacobianWS Output
[in]imblockWS Input
[in]iybWS Input
[in]ybWS Input

Definition at line 295 of file m_jacobian.cc.

Referenced by jacobianCalcAbsSpeciesAnalytical_g().

◆ jacobianCalcAbsSpeciesPerturbations()

void jacobianCalcAbsSpeciesPerturbations ( Workspace ws,
Matrix jacobian,
const Index imblock,
const Vector iyb,
const Vector yb,
const Index atmosphere_dim,
const Vector p_grid,
const Vector lat_grid,
const Vector lon_grid,
const Tensor3 t_field,
const Tensor3 z_field,
const Tensor4 vmr_field,
const ArrayOfArrayOfSpeciesTag abs_species,
const Index cloudbox_on,
const Index stokes_dim,
const Vector f_grid,
const Matrix sensor_pos,
const Matrix sensor_los,
const Vector mblock_za_grid,
const Vector mblock_aa_grid,
const Index antenna_dim,
const Sparse sensor_response,
const Agenda iy_clearsky_agenda,
const String y_unit,
const ArrayOfRetrievalQuantity jacobian_quantities,
const ArrayOfArrayOfIndex jacobian_indices,
const String species,
const Verbosity verbosity 
)

WORKSPACE METHOD: jacobianCalcAbsSpeciesPerturbations.

Calculates absorption species jacobians by perturbations.

This function is added to jacobian_agenda by jacobianAddAbsSpecies and should normally not be called by the user.

Author
Mattias Ekstrom
Patrick Eriksson
Parameters
[in,out]wsWorkspace
[out]jacobianWS Output
[in]imblockWS Input
[in]iybWS Input
[in]ybWS Input
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]t_fieldWS Input
[in]z_fieldWS Input
[in]vmr_fieldWS Input
[in]abs_speciesWS Input
[in]cloudbox_onWS Input
[in]stokes_dimWS Input
[in]f_gridWS Input
[in]sensor_posWS Input
[in]sensor_losWS Input
[in]mblock_za_gridWS Input
[in]mblock_aa_gridWS Input
[in]antenna_dimWS Input
[in]sensor_responseWS Input
[in]iy_clearsky_agendaWS Input
[in]y_unitWS Input
[in]jacobian_quantitiesWS Input
[in]jacobian_indicesWS Input
[in]speciesGeneric Input

Definition at line 309 of file m_jacobian.cc.

References ABSSPECIES_MAINTAG, RetrievalQuantity::Analytical(), array_species_tag_from_string(), calc_nd_field(), chk_contains(), get_perturbation_gridpos(), get_perturbation_range(), get_rowindex_for_mblock(), RetrievalQuantity::Grids(), iyb_calc(), joker, RetrievalQuantity::Mode(), mult(), ConstTensor3View::ncols(), Array< base >::nelem(), ConstTensor3View::npages(), Sparse::nrows(), ConstTensor3View::nrows(), RetrievalQuantity::Perturbation(), perturbation_field_1d(), perturbation_field_2d(), perturbation_field_3d(), and Tensor3::resize().

Referenced by jacobianCalcAbsSpeciesPerturbations_g().

◆ jacobianCalcFreqShiftAndStretchInterp()

void jacobianCalcFreqShiftAndStretchInterp ( Matrix jacobian,
const Index imblock,
const Vector iyb,
const Vector yb,
const Index stokes_dim,
const Vector f_grid,
const Vector mblock_za_grid,
const Vector mblock_aa_grid,
const Index antenna_dim,
const Sparse sensor_response,
const ArrayOfIndex sensor_response_pol_grid,
const Vector sensor_response_f_grid,
const Vector sensor_response_za_grid,
const ArrayOfRetrievalQuantity jacobian_quantities,
const ArrayOfArrayOfIndex jacobian_indices,
const Verbosity verbosity 
)

WORKSPACE METHOD: jacobianCalcFreqShiftAndStretchInterp.

Calculates frequency shift and stretch jacobians by interpolation of iyb.

This function is added to jacobian_agenda by jacobianAddFreqShiftAndStretch and should normally not be called by the user.

Author
Patrick Eriksson
Parameters
[out]jacobianWS Output
[in]imblockWS Input
[in]iybWS Input
[in]ybWS Input
[in]stokes_dimWS Input
[in]f_gridWS Input
[in]mblock_za_gridWS Input
[in]mblock_aa_gridWS Input
[in]antenna_dimWS Input
[in]sensor_responseWS Input
[in]sensor_response_pol_gridWS Input
[in]sensor_response_f_gridWS Input
[in]sensor_response_za_gridWS Input
[in]jacobian_quantitiesWS Input
[in]jacobian_indicesWS Input

Definition at line 610 of file m_jacobian.cc.

References FREQUENCY_CALCMODE_A, FREQUENCY_MAINTAG, FREQUENCY_SUBTAG_A, get_rowindex_for_mblock(), Range::get_start(), gridpos_poly(), RetrievalQuantity::Grids(), interp(), interpweights(), mult(), Sparse::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), Sparse::nrows(), RetrievalQuantity::Perturbation(), and polynomial_basis_func().

Referenced by jacobianCalcFreqShiftAndStretchInterp_g().

◆ jacobianCalcPointingZaInterp()

void jacobianCalcPointingZaInterp ( Matrix jacobian,
const Index imblock,
const Vector iyb,
const Vector yb,
const Index stokes_dim,
const Vector f_grid,
const Matrix sensor_los,
const Vector mblock_za_grid,
const Vector mblock_aa_grid,
const Index antenna_dim,
const Sparse sensor_response,
const Vector sensor_time,
const ArrayOfRetrievalQuantity jacobian_quantities,
const ArrayOfArrayOfIndex jacobian_indices,
const Verbosity verbosity 
)

WORKSPACE METHOD: jacobianCalcPointingZaInterp.

Calculates zenith angle pointing deviation jacobians by inter-extrapolation of iyb.

This function is added to jacobian_agenda by jacobianAddPointingZa and should normally not be called by the user.

Author
Patrick Eriksson
Parameters
[out]jacobianWS Output
[in]imblockWS Input
[in]iybWS Input
[in]ybWS Input
[in]stokes_dimWS Input
[in]f_gridWS Input
[in]sensor_losWS Input
[in]mblock_za_gridWS Input
[in]mblock_aa_gridWS Input
[in]antenna_dimWS Input
[in]sensor_responseWS Input
[in]sensor_timeWS Input
[in]jacobian_quantitiesWS Input
[in]jacobian_indicesWS Input

Definition at line 849 of file m_jacobian.cc.

References get_rowindex_for_mblock(), Range::get_start(), gridpos(), RetrievalQuantity::Grids(), interp(), interpweights(), mult(), Array< base >::nelem(), ConstVectorView::nelem(), ConstMatrixView::nrows(), Sparse::nrows(), RetrievalQuantity::Perturbation(), POINTING_CALCMODE_B, POINTING_MAINTAG, POINTING_SUBTAG_A, and polynomial_basis_func().

Referenced by jacobianCalcPointingZaInterp_g().

◆ jacobianCalcPointingZaRecalc()

void jacobianCalcPointingZaRecalc ( Workspace ws,
Matrix jacobian,
const Index imblock,
const Vector iyb,
const Vector yb,
const Index atmosphere_dim,
const Vector p_grid,
const Vector lat_grid,
const Vector lon_grid,
const Tensor3 t_field,
const Tensor3 z_field,
const Tensor4 vmr_field,
const Index cloudbox_on,
const Index stokes_dim,
const Vector f_grid,
const Matrix sensor_pos,
const Matrix sensor_los,
const Vector mblock_za_grid,
const Vector mblock_aa_grid,
const Index antenna_dim,
const Sparse sensor_response,
const Vector sensor_time,
const Agenda iy_clearsky_agenda,
const String y_unit,
const ArrayOfRetrievalQuantity jacobian_quantities,
const ArrayOfArrayOfIndex jacobian_indices,
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
[out]jacobianWS Output
[in]imblockWS Input
[in]iybWS Input
[in]ybWS Input
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]t_fieldWS Input
[in]z_fieldWS Input
[in]vmr_fieldWS Input
[in]cloudbox_onWS Input
[in]stokes_dimWS Input
[in]f_gridWS Input
[in]sensor_posWS Input
[in]sensor_losWS Input
[in]mblock_za_gridWS Input
[in]mblock_aa_gridWS Input
[in]antenna_dimWS Input
[in]sensor_responseWS Input
[in]sensor_timeWS Input
[in]iy_clearsky_agendaWS Input
[in]y_unitWS Input
[in]jacobian_quantitiesWS Input
[in]jacobian_indicesWS Input

Definition at line 976 of file m_jacobian.cc.

References get_rowindex_for_mblock(), Range::get_start(), RetrievalQuantity::Grids(), iyb_calc(), joker, mult(), Array< base >::nelem(), ConstMatrixView::nrows(), Sparse::nrows(), RetrievalQuantity::Perturbation(), POINTING_CALCMODE_A, POINTING_MAINTAG, POINTING_SUBTAG_A, and polynomial_basis_func().

Referenced by jacobianCalcPointingZaRecalc_g().

◆ jacobianCalcPolyfit()

void jacobianCalcPolyfit ( Matrix jacobian,
const Index imblock,
const Vector iyb,
const Vector yb,
const Sparse sensor_response,
const ArrayOfIndex sensor_response_pol_grid,
const Vector sensor_response_f_grid,
const Vector sensor_response_za_grid,
const ArrayOfRetrievalQuantity jacobian_quantities,
const ArrayOfArrayOfIndex jacobian_indices,
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
[out]jacobianWS Output
[in]imblockWS 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_za_gridWS Input
[in]jacobian_quantitiesWS Input
[in]jacobian_indicesWS Input
[in]poly_coeffGeneric Input

Definition at line 1190 of file m_jacobian.cc.

References get_rowindex_for_mblock(), Range::get_start(), Array< base >::nelem(), ConstVectorView::nelem(), POLYFIT_MAINTAG, and polynomial_basis_func().

Referenced by jacobianCalcPolyfit_g().

◆ jacobianCalcTemperatureAnalytical()

void jacobianCalcTemperatureAnalytical ( Matrix jacobian,
const Index imblock,
const Vector iyb,
const Vector yb,
const Verbosity verbosity 
)

WORKSPACE METHOD: jacobianCalcTemperatureAnalytical.

This function doesn't do anything. It just exists to satisfy the input and output requirement of the jacobian_agenda.

This function is added to jacobian_agenda by jacobianAddTemperature and should normally not be called by the user.

Author
Oliver Lemke
Parameters
[out]jacobianWS Output
[in]imblockWS Input
[in]iybWS Input
[in]ybWS Input

Definition at line 1393 of file m_jacobian.cc.

Referenced by jacobianCalcTemperatureAnalytical_g().

◆ jacobianCalcTemperaturePerturbations()

void jacobianCalcTemperaturePerturbations ( Workspace ws,
Matrix jacobian,
const Index imblock,
const Vector iyb,
const Vector yb,
const Index atmosphere_dim,
const Vector p_grid,
const Vector lat_grid,
const Vector lon_grid,
const Tensor3 t_field,
const Tensor3 z_field,
const Tensor4 vmr_field,
const ArrayOfArrayOfSpeciesTag abs_species,
const Matrix r_geoid,
const Matrix z_surface,
const Index cloudbox_on,
const Index stokes_dim,
const Vector f_grid,
const Matrix sensor_pos,
const Matrix sensor_los,
const Vector mblock_za_grid,
const Vector mblock_aa_grid,
const Index antenna_dim,
const Sparse sensor_response,
const Agenda iy_clearsky_agenda,
const String y_unit,
const Numeric p_hse,
const Numeric z_hse_accuracy,
const ArrayOfRetrievalQuantity jacobian_quantities,
const ArrayOfArrayOfIndex jacobian_indices,
const Verbosity verbosity 
)

WORKSPACE METHOD: jacobianCalcTemperaturePerturbations.

Calculates atmospheric temperature jacobians by perturbations.

This function is added to jacobian_agenda by jacobianAddTemperature and should normally not be called by the user.

Author
Mattias Ekstrom
Patrick Eriksson
Parameters
[in,out]wsWorkspace
[out]jacobianWS Output
[in]imblockWS Input
[in]iybWS Input
[in]ybWS Input
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]t_fieldWS Input
[in]z_fieldWS Input
[in]vmr_fieldWS Input
[in]abs_speciesWS Input
[in]r_geoidWS Input
[in]z_surfaceWS Input
[in]cloudbox_onWS Input
[in]stokes_dimWS Input
[in]f_gridWS Input
[in]sensor_posWS Input
[in]sensor_losWS Input
[in]mblock_za_gridWS Input
[in]mblock_aa_gridWS Input
[in]antenna_dimWS Input
[in]sensor_responseWS Input
[in]iy_clearsky_agendaWS Input
[in]y_unitWS Input
[in]p_hseWS Input
[in]z_hse_accuracyWS Input
[in]jacobian_quantitiesWS Input
[in]jacobian_indicesWS Input

Definition at line 1408 of file m_jacobian.cc.

References RetrievalQuantity::Analytical(), get_perturbation_gridpos(), get_perturbation_range(), get_rowindex_for_mblock(), RetrievalQuantity::Grids(), iyb_calc(), joker, mult(), Array< base >::nelem(), Sparse::nrows(), RetrievalQuantity::Perturbation(), perturbation_field_1d(), perturbation_field_2d(), perturbation_field_3d(), RetrievalQuantity::Subtag(), TEMPERATURE_MAINTAG, and z_fieldFromHSE().

Referenced by jacobianCalcTemperaturePerturbations_g().

◆ jacobianClose()

void jacobianClose ( Workspace ws,
Index jacobian_do,
Matrix jacobian,
ArrayOfArrayOfIndex jacobian_indices,
Agenda jacobian_agenda,
const ArrayOfRetrievalQuantity jacobian_quantities,
const Matrix sensor_pos,
const Sparse sensor_response,
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, sets the correct size of jacobian 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
[out]jacobianWS Output
[out]jacobian_indicesWS Output
[out]jacobian_agendaWS Output
[in]jacobian_quantitiesWS Input
[in]sensor_posWS Input
[in]sensor_responseWS Input

Definition at line 79 of file m_jacobian.cc.

References Agenda::check(), Array< base >::nelem(), ConstMatrixView::nrows(), Sparse::nrows(), and Matrix::resize().

Referenced by jacobianClose_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 146 of file m_jacobian.cc.

References Agenda::set_name().

Referenced by jacobianInit_g(), and jacobianOff().

◆ jacobianOff()

void jacobianOff ( Index jacobian_do,
Agenda jacobian_agenda,
ArrayOfRetrievalQuantity jacobian_quantities,
ArrayOfArrayOfIndex jacobian_indices,
const Verbosity verbosity 
)

WORKSPACE METHOD: jacobianOff.

Makes mandatory initialisation of some jacobian variables.

Some jacobian WSVs must be initilised even if no such calculations will be performed and this is handled with this method. That is, this method must be called when no jacobians will be calculated. Sets jacobian_on to 0.

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

Definition at line 159 of file m_jacobian.cc.

References jacobianInit().

Referenced by jacobianOff_g().

Variable Documentation

◆ ABSSPECIES_MAINTAG

◆ FREQUENCY_CALCMODE_A

const String FREQUENCY_CALCMODE_A
extern

◆ FREQUENCY_MAINTAG

const String FREQUENCY_MAINTAG
extern

◆ FREQUENCY_SUBTAG_A

const String FREQUENCY_SUBTAG_A
extern

◆ POINTING_CALCMODE_A

const String POINTING_CALCMODE_A
extern

◆ POINTING_CALCMODE_B

const String POINTING_CALCMODE_B
extern

◆ POINTING_MAINTAG

◆ POINTING_SUBTAG_A

◆ POLYFIT_MAINTAG

const String POLYFIT_MAINTAG
extern

◆ TEMPERATURE_MAINTAG