ARTS 2.5.0 (git: 9ee3ac6c)
rte.h File Reference

Declaration of functions in rte.cc. More...

#include "agenda_class.h"
#include "arts.h"
#include "auto_md.h"
#include "jacobian.h"
#include "matpackI.h"
#include "matpackII.h"
#include "matpackIII.h"
#include "matpack_complex.h"
#include "optproperties.h"
#include "ppath.h"

Go to the source code of this file.

Functions

void adapt_stepwise_partial_derivatives (ArrayOfPropagationMatrix &dK_dx, ArrayOfStokesVector &dS_dx, const ArrayOfRetrievalQuantity &jacobian_quantities, const ConstVectorView &ppath_f_grid, const ConstVectorView &ppath_line_of_sight, const Index &lte, const Index &atmosphere_dim, const bool &jacobian_do)
 Adapts clearsky partial derivatives. More...
 
void adjust_los (VectorView los, const Index &atmosphere_dim)
 Ensures that the zenith and azimuth angles of a line-of-sight vector are inside defined ranges. More...
 
void apply_iy_unit (MatrixView iy, const String &iy_unit, const ConstVectorView &f_grid, const Numeric &n, const ArrayOfIndex &i_pol)
 Performs conversion from radiance to other units, as well as applies refractive index to fulfill the n2-law of radiance. More...
 
void apply_iy_unit2 (Tensor3View J, const ConstMatrixView &iy, const String &iy_unit, const ConstVectorView &f_grid, const Numeric &n, const ArrayOfIndex &i_pol)
 Largely as apply_iy_unit but operates on jacobian data. More...
 
void bending_angle1d (Numeric &alpha, const Ppath &ppath)
 Calculates the bending angle for a 1D atmosphere. More...
 
void defocusing_general (Workspace &ws, Numeric &dlf, const Agenda &ppath_step_agenda, const Index &atmosphere_dim, const ConstVectorView &p_grid, const ConstVectorView &lat_grid, const ConstVectorView &lon_grid, const ConstTensor3View &z_field, const ConstVectorView &f_grid, const ConstVectorView &refellipsoid, const ConstMatrixView &z_surface, const Ppath &ppath, const Numeric &ppath_lmax, const Numeric &ppath_lraytrace, const Numeric &dza, const Verbosity &verbosity)
 Defocusing for arbitrary geometry (zenith angle part only) More...
 
void defocusing_sat2sat (Workspace &ws, Numeric &dlf, const Agenda &ppath_step_agenda, const Index &atmosphere_dim, const ConstVectorView &p_grid, const ConstVectorView &lat_grid, const ConstVectorView &lon_grid, const ConstTensor3View &z_field, const ConstVectorView &f_grid, const ConstVectorView &refellipsoid, const ConstMatrixView &z_surface, const Ppath &ppath, const Numeric &ppath_lmax, const Numeric &ppath_lraytrace, const Numeric &dza, const Verbosity &verbosity)
 Calculates defocusing for limb measurements between two satellites. More...
 
Numeric dotprod_with_los (const ConstVectorView &los, const Numeric &u, const Numeric &v, const Numeric &w, const Index &atmosphere_dim)
 Calculates the dot product between a field and a LOS. More...
 
void get_iy (Workspace &ws, Matrix &iy, const Index &cloudbox_on, const ConstVectorView &f_grid, const EnergyLevelMap &nlte_field, const ConstVectorView &rte_pos, const ConstVectorView &rte_los, const ConstVectorView &rte_pos2, const String &iy_unit, const Agenda &iy_main_agenda)
 Basic call of iy_main_agenda. More...
 
void get_iy_of_background (Workspace &ws, Matrix &iy, ArrayOfTensor3 &diy_dx, const ConstTensor3View &iy_transmittance, const Index &iy_id, const Index &jacobian_do, const ArrayOfRetrievalQuantity &jacobian_quantities, const Ppath &ppath, const ConstVectorView &rte_pos2, const Index &atmosphere_dim, const EnergyLevelMap &nlte_field, const Index &cloudbox_on, const Index &stokes_dim, const ConstVectorView &f_grid, const String &iy_unit, const ConstTensor3View &surface_props_data, const Agenda &iy_main_agenda, const Agenda &iy_space_agenda, const Agenda &iy_surface_agenda, const Agenda &iy_cloudbox_agenda, const Index &iy_agenda_call1, const Verbosity &verbosity)
 Determines iy of the "background" of a propgation path. More...
 
void get_ppath_atmvars (Vector &ppath_p, Vector &ppath_t, EnergyLevelMap &ppath_nlte, Matrix &ppath_vmr, Matrix &ppath_wind, Matrix &ppath_mag, const Ppath &ppath, const Index &atmosphere_dim, const ConstVectorView &p_grid, const ConstTensor3View &t_field, const EnergyLevelMap &nlte_field, const ConstTensor4View &vmr_field, const ConstTensor3View &wind_u_field, const ConstTensor3View &wind_v_field, const ConstTensor3View &wind_w_field, const ConstTensor3View &mag_u_field, const ConstTensor3View &mag_v_field, const ConstTensor3View &mag_w_field)
 Determines pressure, temperature, VMR, winds and magnetic field for each propgataion path point. More...
 
void get_ppath_cloudvars (ArrayOfIndex &clear2cloudy, Matrix &ppath_pnd, ArrayOfMatrix &ppath_dpnd_dx, const Ppath &ppath, const Index &atmosphere_dim, const ArrayOfIndex &cloudbox_limits, const Tensor4 &pnd_field, const ArrayOfTensor4 &dpnd_field_dx)
 Determines the particle fields along a propagation path. More...
 
void get_ppath_f (Matrix &ppath_f, const Ppath &ppath, const ConstVectorView &f_grid, const Index &atmosphere_dim, const Numeric &rte_alonglos_v, const ConstMatrixView &ppath_wind)
 Determines the Doppler shifted frequencies along the propagation path. More...
 
Range get_rowindex_for_mblock (const Sparse &sensor_response, const Index &imblock)
 Returns the "range" of y corresponding to a measurement block. More...
 
void get_stepwise_blackbody_radiation (VectorView B, VectorView dB_dT, const ConstVectorView &ppath_f_grid, const Numeric &ppath_temperature, const bool &do_temperature_derivative)
 Get the blackbody radiation at propagation path point. More...
 
void get_stepwise_clearsky_propmat (Workspace &ws, PropagationMatrix &K, StokesVector &S, Index &lte, ArrayOfPropagationMatrix &dK_dx, ArrayOfStokesVector &dS_dx, const Agenda &propmat_clearsky_agenda, const ArrayOfRetrievalQuantity &jacobian_quantities, const ConstVectorView &ppath_f_grid, const ConstVectorView &ppath_magnetic_field, const ConstVectorView &ppath_line_of_sight, const EnergyLevelMap &ppath_nlte, const ConstVectorView &ppath_vmrs, const Numeric &ppath_temperature, const Numeric &ppath_pressure, const bool &jacobian_do)
 Gets the clearsky propgation matrix and NLTE contributions. More...
 
void get_stepwise_effective_source (MatrixView J, Tensor3View dJ_dx, const PropagationMatrix &K, const StokesVector &a, const StokesVector &S, const ArrayOfPropagationMatrix &dK_dx, const ArrayOfStokesVector &da_dx, const ArrayOfStokesVector &dS_dx, const ConstVectorView &B, const ConstVectorView &dB_dT, const ArrayOfRetrievalQuantity &jacobian_quantities, const bool &jacobian_do)
 Gets the effective source at propagation path point. More...
 
void get_stepwise_frequency_grid (VectorView ppath_f_grid, const ConstVectorView &f_grid, const ConstVectorView &ppath_wind, const ConstVectorView &ppath_line_of_sight, const Numeric &rte_alonglos_v, const Index &atmosphere_dim)
 Inverse of get_stepwise_f_partials. More...
 
Vector get_stepwise_f_partials (const ConstVectorView &ppath_line_of_sight, const ConstVectorView &f_grid, const Jacobian::Atm wind_type, const Index &atmosphere_dim)
 Computes the ratio that a partial derivative with regards to frequency relates to the wind of come component. More...
 
void get_stepwise_scattersky_propmat (StokesVector &ap, PropagationMatrix &Kp, ArrayOfStokesVector &dap_dx, ArrayOfPropagationMatrix &dKp_dx, const ArrayOfRetrievalQuantity &jacobian_quantities, const ConstMatrixView &ppath_1p_pnd, const ArrayOfMatrix &ppath_dpnd_dx, const Index ppath_1p_id, const ArrayOfArrayOfSingleScatteringData &scat_data, const ConstVectorView &ppath_line_of_sight, const ConstVectorView &ppath_temperature, const Index &atmosphere_dim, const bool &jacobian_do)
 Computes the contribution by scattering at propagation path point. More...
 
void get_stepwise_scattersky_source (StokesVector &Sp, ArrayOfStokesVector &dSp_dx, const ArrayOfRetrievalQuantity &jacobian_quantities, const ConstVectorView &ppath_1p_pnd, const ArrayOfMatrix &ppath_dpnd_dx, const Index ppath_1p_id, const ArrayOfArrayOfSingleScatteringData &scat_data, const ConstTensor7View &cloudbox_field, const ConstVectorView &za_grid, const ConstVectorView &aa_grid, const ConstMatrixView &ppath_line_of_sight, const GridPos &ppath_pressure, const Vector &temperature, const Index &atmosphere_dim, const bool &jacobian_do, const Index &t_interp_order=1)
 Calculates the stepwise scattering source terms. More...
 
void get_stepwise_transmission_matrix (Tensor3View cumulative_transmission, Tensor3View T, Tensor4View dT_dx_close, Tensor4View dT_dx_far, const ConstTensor3View &cumulative_transmission_close, const PropagationMatrix &K_close, const PropagationMatrix &K_far, const ArrayOfPropagationMatrix &dK_close_dx, const ArrayOfPropagationMatrix &dK_far_dx, const Numeric &ppath_distance, const bool &first_level, const Numeric &dr_dT_close=0, const Numeric &dr_dT_far=0, const Index &it=-1)
 Computes layer transmission matrix and cumulative transmission. More...
 
void iyb_calc (Workspace &ws, Vector &iyb, ArrayOfVector &iyb_aux, ArrayOfMatrix &diyb_dx, Matrix &geo_pos_matrix, const Index &imblock, const Index &atmosphere_dim, const EnergyLevelMap &nlte_field, const Index &cloudbox_on, const Index &stokes_dim, const ConstVectorView &f_grid, const ConstMatrixView &sensor_pos, const ConstMatrixView &sensor_los, const ConstMatrixView &transmitter_pos, const ConstMatrixView &mblock_dlos_grid, const String &iy_unit, const Agenda &iy_main_agenda, const Agenda &geo_pos_agenda, const Index &j_analytical_do, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfArrayOfIndex &jacobian_indices, const ArrayOfString &iy_aux_vars, const Verbosity &verbosity)
 Performs calculations for one measurement block, on iy-level. More...
 
void iy_transmittance_mult (Tensor3 &iy_trans_total, const ConstTensor3View &iy_trans_old, const ConstTensor3View &iy_trans_new)
 Multiplicates iy_transmittance with transmissions. More...
 
void iy_transmittance_mult (Matrix &iy_new, const ConstTensor3View &iy_trans, const ConstMatrixView &iy_old)
 Multiplicates iy_transmittance with iy-variable. More...
 
void mirror_los (Vector &los_mirrored, const ConstVectorView &los, const Index &atmosphere_dim)
 Determines the backward direction for a given line-of-sight. More...
 
void pos2true_latlon (Numeric &lat, Numeric &lon, const Index &atmosphere_dim, const ConstVectorView &lat_grid, const ConstVectorView &lat_true, const ConstVectorView &lon_true, const ConstVectorView &pos)
 Determines the true alt and lon for an "ARTS position". More...
 
void rtmethods_jacobian_finalisation (Workspace &ws, ArrayOfTensor3 &diy_dx, ArrayOfTensor3 &diy_dpath, const Index &ns, const Index &nf, const Index &np, const Index &atmosphere_dim, const Ppath &ppath, const Vector &ppvar_p, const Vector &ppvar_t, const Matrix &ppvar_vmr, const Index &iy_agenda_call1, const Tensor3 &iy_transmittance, const Agenda &water_p_eq_agenda, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfIndex &jac_species_i)
 This function fixes the last steps to made on the Jacobian in some radiative transfer WSMs. More...
 
void rtmethods_unit_conversion (Matrix &iy, ArrayOfTensor3 &diy_dx, Tensor3 &ppvar_iy, const Index &ns, const Index &np, const Vector &f_grid, const Ppath &ppath, const ArrayOfRetrievalQuantity &jacobian_quantities, const Index &j_analytical_do, const String &iy_unit)
 This function handles the unit conversion to be done at the end of some radiative transfer WSMs. More...
 
void yCalc_mblock_loop_body (bool &failed, String &fail_msg, ArrayOfArrayOfVector &iyb_aux_array, Workspace &ws, Vector &y, Vector &y_f, ArrayOfIndex &y_pol, Matrix &y_pos, Matrix &y_los, Matrix &y_geo, Matrix &jacobian, 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_response_f, const ArrayOfIndex &sensor_response_pol, const Matrix &sensor_response_dlos, const String &iy_unit, const Agenda &iy_main_agenda, const Agenda &geo_pos_agenda, const Agenda &jacobian_agenda, const Index &jacobian_do, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfArrayOfIndex &jacobian_indices, const ArrayOfString &iy_aux_vars, const Verbosity &verbosity, const Index &mblock_index, const Index &n1y, const Index &j_analytical_do)
 Performs calculations for one measurement block, on y-level. More...
 
void ze_cfac (Vector &fac, const Vector &f_grid, const Numeric &ze_tref, const Numeric &k2)
 Calculates factor to convert back-scattering to Ze. More...
 

Detailed Description

Declaration of functions in rte.cc.

Author
Patrick Eriksson Patri.nosp@m.ck.E.nosp@m.rikss.nosp@m.on@c.nosp@m.halme.nosp@m.rs.s.nosp@m.e
Date
2002-05-29

Definition in file rte.h.

Function Documentation

◆ adapt_stepwise_partial_derivatives()

void adapt_stepwise_partial_derivatives ( ArrayOfPropagationMatrix dK_dx,
ArrayOfStokesVector dS_dx,
const ArrayOfRetrievalQuantity jacobian_quantities,
const ConstVectorView ppath_f_grid,
const ConstVectorView ppath_line_of_sight,
const Index lte,
const Index atmosphere_dim,
const bool &  jacobian_do 
)

Adapts clearsky partial derivatives.

The following fields:

Wind VMR

Adaptation means changing unit by user input

Parameters
[in,out]dK_dxPropagation matrix derivatives at propagation path point, adapted for wind and VMR units
[in,out]dS_dxNLTE source adjustment derivatives at propagation path point, adapted for wind and VMR units
[in]jacobian_quantitiesas WSV
[in]ppath_f_gridWind-adjusted frequency grid at propagation path point
[in]ppath_line_of_sightLine of sight at propagation path point
[in]lteBoolean index for whether or not the atmosphere is in LTE at propagation path point
[in]atmosphere_dimAs WSV
[in]jacobian_doAs WSV
Author
Richard Larsson
Date
2017-09-21

Definition at line 55 of file rte.cc.

References a, get_stepwise_f_partials(), and Array< base >::nelem().

Referenced by iyEmissionStandard(), iyHybrid(), iyRadarSingleScat(), and iyTransmissionStandard().

◆ adjust_los()

void adjust_los ( VectorView  los,
const Index atmosphere_dim 
)

Ensures that the zenith and azimuth angles of a line-of-sight vector are inside defined ranges.

This function should not be used blindly, just when you know that the out-of-bounds values are obtained by an OK operation. As when making a disturbance calculation where e.g. the zenith angle is shifted with a small value. This function then handles the case when the original zenith angle is 0 or 180 and the disturbance then moves the angle outside the defined range.

Parameters
[in,out]losLOS vector, defined as e.g. rte_los.
[in]atmosphere_dimAs the WSV.
Author
Patrick Eriksson
Date
2012-04-11

Definition at line 83 of file rte.cc.

References abs, cart2zaaa(), dx, and zaaa2cart().

Referenced by defocusing_general_sub(), defocusing_sat2sat(), iyb_calc_body(), raytrace_3d_linear_basic(), and surfaceSemiSpecularBy3beams().

◆ apply_iy_unit()

void apply_iy_unit ( MatrixView  iy,
const String iy_unit,
const ConstVectorView f_grid,
const Numeric n,
const ArrayOfIndex i_pol 
)

Performs conversion from radiance to other units, as well as applies refractive index to fulfill the n2-law of radiance.

Use apply_iy_unit2 for conversion of jacobian data.

Parameters
[in,out]iyTensor3 with data to be converted, where column dimension corresponds to Stokes dimensionality and row dimension corresponds to frequency.
[in]iy_unitAs the WSV.
[in]f_gridAs the WSV.
[in]nRefractive index at the observation position.
[in]i_polPolarisation indexes. See documentation of y_pol.
Author
Patrick Eriksson
Date
2010-04-07

Definition at line 106 of file rte.cc.

References ARTS_ASSERT, ARTS_USER_ERROR, invplanck(), invrayjean(), ConstMatrixView::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), ConstMatrixView::nrows(), ns, and SPEED_OF_LIGHT.

Referenced by rtmethods_unit_conversion().

◆ apply_iy_unit2()

void apply_iy_unit2 ( Tensor3View  J,
const ConstMatrixView iy,
const String iy_unit,
const ConstVectorView f_grid,
const Numeric n,
const ArrayOfIndex i_pol 
)

Largely as apply_iy_unit but operates on jacobian data.

The associated spectrum data iy must be in radiance. That is, the spectrum can only be converted to Tb after the jacobian data.

Parameters
[in,out]JTensor3 with data to be converted, where column dimension corresponds to Stokes dimensionality and row dimension corresponds to frequency.
[in]iyAssociated radiance data.
[in]iy_unitAs the WSV.
[in]f_gridAs the WSV.
[in]nRefractive index at the observation position.
[in]i_polPolarisation indexes. See documentation of y_pol.
Author
Patrick Eriksson
Date
2010-04-10

Definition at line 179 of file rte.cc.

References ARTS_ASSERT, ARTS_USER_ERROR, dinvplanckdI(), invrayjean(), ConstTensor3View::ncols(), ConstMatrixView::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), ConstTensor3View::npages(), ConstTensor3View::nrows(), ConstMatrixView::nrows(), ns, and SPEED_OF_LIGHT.

Referenced by rtmethods_unit_conversion().

◆ bending_angle1d()

void bending_angle1d ( Numeric alpha,
const Ppath ppath 
)

Calculates the bending angle for a 1D atmosphere.

The expression used assumes a 1D atmosphere, that allows the bending angle to be calculated by start and end LOS. This is an approximation for 2D and 3D, but a very small one and the function should in general be OK also for 2D and 3D.

The expression is taken from Kursinski et al., The GPS radio occultation technique, TAO, 2000.

FIXMEDOC@Patrick, if this function only returns a numeric, have it defined as "Numeric bending_angle1d(ppath)" since this is better code.

Parameters
[in]ppathPropagation path.
Returns
alpha Bending angle
Author
Patrick Eriksson
Date
2012-04-05

Definition at line 266 of file rte.cc.

Referenced by defocusing_sat2sat().

◆ defocusing_general()

void defocusing_general ( Workspace ws,
Numeric dlf,
const Agenda ppath_step_agenda,
const Index atmosphere_dim,
const ConstVectorView p_grid,
const ConstVectorView lat_grid,
const ConstVectorView lon_grid,
const ConstTensor3View z_field,
const ConstVectorView f_grid,
const ConstVectorView refellipsoid,
const ConstMatrixView z_surface,
const Ppath ppath,
const Numeric ppath_lmax,
const Numeric ppath_lraytrace,
const Numeric dza,
const Verbosity verbosity 
)

Defocusing for arbitrary geometry (zenith angle part only)

Estimates the defocusing loss factor by calculating two paths with zenith angle off-sets. The distance between the two path at the optical path length between the transmitter and the receiver, divided with the corresponding distance for free space propagation, gives the defocusing loss.

The azimuth (gain) factor is not calculated. The path calculations are here done starting from the transmitter, which is the reversed direction compared to the ordinary path calculations starting at the receiver.

Parameters
[in,out]wsThe workspace.
[out]dlfDefocusing loss factor (1 for no loss)
[in]ppath_step_agendaAs the WSV with the same name.
[in]atmosphere_dimAs the WSV with the same name.
[in]p_gridAs the WSV with the same name.
[in]lat_gridAs the WSV with the same name.
[in]lon_gridAs the WSV with the same name.
[in]z_fieldAs the WSV with the same name.
[in]f_gridAs the WSV with the same name.
[in]refellipsoidAs the WSV with the same name.
[in]z_surfaceAs the WSV with the same name.
[in]ppathAs the WSV with the same name.
[in]ppath_lmaxAs the WSV with the same name.
[in]ppath_lraytraceAs the WSV with the same name.
[in]dzaSize of angular shift to apply.
[in]verbosityAs the WSV with the same name.
Author
Patrick Eriksson
Date
2012-04-11

Definition at line 433 of file rte.cc.

References defocusing_general_sub(), DEG2RAD, distance2D(), distance3D(), Ppath::end_lstep, Ppath::end_pos, Ppath::lstep, max, mirror_los(), Ppath::np, Ppath::nreal, refell2r(), Ppath::start_los, Ppath::start_lstep, and Ppath::start_pos.

◆ defocusing_sat2sat()

void defocusing_sat2sat ( Workspace ws,
Numeric dlf,
const Agenda ppath_step_agenda,
const Index atmosphere_dim,
const ConstVectorView p_grid,
const ConstVectorView lat_grid,
const ConstVectorView lon_grid,
const ConstTensor3View z_field,
const ConstVectorView f_grid,
const ConstVectorView refellipsoid,
const ConstMatrixView z_surface,
const Ppath ppath,
const Numeric ppath_lmax,
const Numeric ppath_lraytrace,
const Numeric dza,
const Verbosity verbosity 
)

Calculates defocusing for limb measurements between two satellites.

The expressions used assume a 1D atmosphere, and can only be applied on limb sounding geometry. The function works for 2D and 3D and should give OK estimates. Both the zenith angle (loss) and azimuth angle (gain) terms are considered.

The expressions is taken from Kursinski et al., The GPS radio occultation technique, TAO, 2000.

Parameters
[in,out]wsThe workspace.
[out]dlfDefocusing loss factor (1 for no loss)
[in]ppath_step_agendaAs the WSV with the same name.
[in]atmosphere_dimAs the WSV with the same name.
[in]p_gridAs the WSV with the same name.
[in]lat_gridAs the WSV with the same name.
[in]lon_gridAs the WSV with the same name.
[in]z_fieldAs the WSV with the same name.
[in]f_gridAs the WSV with the same name.
[in]refellipsoidAs the WSV with the same name.
[in]z_surfaceAs the WSV with the same name.
[in]ppathAs the WSV with the same name.
[in]ppath_lmaxAs the WSV with the same name.
[in]ppath_lraytraceAs the WSV with the same name.
[in]dzaSize of angular shift to apply.
[in]verbosityAs the WSV with the same name.
Author
Patrick Eriksson
Date
2012-04-11

Definition at line 552 of file rte.cc.

References a1, a2, adjust_los(), ARTS_ASSERT, ARTS_USER_ERROR_IF, bending_angle1d(), Ppath::constant, DEG2RAD, Ppath::end_los, Ppath::end_lstep, Ppath::end_pos, find_tanpoint(), Ppath::lstep, Ppath::np, ppath_calc(), ppath_what_background(), Ppath::start_los, and Ppath::start_lstep.

◆ dotprod_with_los()

Numeric dotprod_with_los ( const ConstVectorView los,
const Numeric u,
const Numeric v,
const Numeric w,
const Index atmosphere_dim 
)

Calculates the dot product between a field and a LOS.

The line-of-sight shall be given as in the ppath structure (i.e. the viewing direction), but the dot product is calculated for the photon direction. The field is specified by its three components.

The returned value can be written as |f|*cos(theta), where |f| is the field strength, and theta the angle between the field and photon vectors.

Parameters
[in]losPppath line-of-sight.
[in]uU-component of field.
[in]vV-component of field.
[in]wW-component of field.
[in]atmosphere_dimAs the WSV.
Returns
The result of the dot product
Author
Patrick Eriksson
Date
2012-12-12

Definition at line 668 of file rte.cc.

References DEG2RAD, mirror_los(), sqrt(), u, v, and w.

Referenced by get_ppath_f(), get_stepwise_f_partials(), get_stepwise_frequency_grid(), and propmat_clearskyAddFaraday().

◆ get_iy()

void get_iy ( Workspace ws,
Matrix iy,
const Index cloudbox_on,
const ConstVectorView f_grid,
const EnergyLevelMap nlte_field,
const ConstVectorView rte_pos,
const ConstVectorView rte_los,
const ConstVectorView rte_pos2,
const String iy_unit,
const Agenda iy_main_agenda 
)

Basic call of iy_main_agenda.

This function is an interface to iy_main_agenda that can be used when only iy is of interest. That is, jacobian and auxilary parts are deactivated/ignored.

Parameters
[in,out]wsThe workspace
[out]iyAs the WSV.
[in]cloudbox_onAs the WSV.
[in]f_gridAs the WSV.
[in]nlte_fieldAs the WSV.
[in]rte_posAs the WSV.
[in]rte_losAs the WSV.
[in]iy_unitAs the WSV.
[in]iy_main_agendaAs the WSV.
Author
Patrick Eriksson
Date
2012-08-08

Definition at line 689 of file rte.cc.

References iy_main_agendaExecute().

◆ get_iy_of_background()

void get_iy_of_background ( Workspace ws,
Matrix iy,
ArrayOfTensor3 diy_dx,
const ConstTensor3View iy_transmittance,
const Index iy_id,
const Index jacobian_do,
const ArrayOfRetrievalQuantity jacobian_quantities,
const Ppath ppath,
const ConstVectorView rte_pos2,
const Index atmosphere_dim,
const EnergyLevelMap nlte_field,
const Index cloudbox_on,
const Index stokes_dim,
const ConstVectorView f_grid,
const String iy_unit,
const ConstTensor3View surface_props_data,
const Agenda iy_main_agenda,
const Agenda iy_space_agenda,
const Agenda iy_surface_agenda,
const Agenda iy_cloudbox_agenda,
const Index iy_agenda_call1,
const Verbosity verbosity 
)

Determines iy of the "background" of a propgation path.

The task is to determine iy and related variables for the background, or to continue the raditiave calculations "backwards". The details here depends on the method selected for the agendas.

Each background is handled by an agenda. Several of these agandes can involve recursive calls of iy_main_agenda.

Parameters
[in,out]wsThe workspace
[out]iyAs the WSV.
[out]diy_dxAs the WSV.
[in]iy_transmittanceAs the WSV.
[in]jacobian_doAs the WSV.
[in]ppathAs the WSV.
[in]atmosphere_dimAs the WSV.
[in]cloudbox_onAs the WSV.
[in]stokes_dimAs the WSV.
[in]f_gridAs the WSV.
[in]iy_unitAs the WSV.
[in]surface_props_dataAs the WSV.
[in]iy_main_agendaAs the WSV.
[in]iy_space_agendaAs the WSV.
[in]iy_surface_agendaAs the WSV.
[in]iy_cloudbox_agendaAs the WSV.
Author
Patrick Eriksson
Date
2009-10-08

Definition at line 728 of file rte.cc.

References ARTS_ASSERT, ARTS_USER_ERROR_IF, Ppath::background, chk_not_empty(), CREATE_OUT3, iy_cloudbox_agendaExecute(), iy_space_agendaExecute(), iy_surface_agendaExecute(), joker, Ppath::los, ConstMatrixView::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), Ppath::np, ConstMatrixView::nrows(), Ppath::pos, ppath_what_background(), and Vector::resize().

Referenced by emission_from_propmat_field(), and iyHybrid().

◆ get_ppath_atmvars()

void get_ppath_atmvars ( Vector ppath_p,
Vector ppath_t,
EnergyLevelMap ppath_nlte,
Matrix ppath_vmr,
Matrix ppath_wind,
Matrix ppath_mag,
const Ppath ppath,
const Index atmosphere_dim,
const ConstVectorView p_grid,
const ConstTensor3View t_field,
const EnergyLevelMap nlte_field,
const ConstTensor4View vmr_field,
const ConstTensor3View wind_u_field,
const ConstTensor3View wind_v_field,
const ConstTensor3View wind_w_field,
const ConstTensor3View mag_u_field,
const ConstTensor3View mag_v_field,
const ConstTensor3View mag_w_field 
)

Determines pressure, temperature, VMR, winds and magnetic field for each propgataion path point.

The output variables are sized inside the function. For VMR the dimensions are [ species, propagation path point ].

Parameters
[out]ppath_pPressure for each ppath point.
[out]ppath_tTemperature for each ppath point.
[out]ppath_vmrVMR values for each ppath point.
[out]ppath_windWind vector for each ppath point.
[out]ppath_magMag. field vector for each ppath point.
[in]ppathAs the WSV.
[in]atmosphere_dimAs the WSV.
[in]p_gridAs the WSV.
[in]lat_gridAs the WSV.
[in]lon_gridAs the WSV.
[in]t_fieldAs the WSV.
[in]vmr_fieldAs the WSV.
[in]wind_u_fieldAs the WSV.
[in]wind_v_fieldAs the WSV.
[in]wind_w_fieldAs the WSV.
[in]mag_u_fieldAs the WSV.
[in]mag_v_fieldAs the WSV.
[in]mag_w_fieldAs the WSV.
Author
Patrick Eriksson
Date
2009-10-05

Definition at line 843 of file rte.cc.

References Ppath::gp_lat, Ppath::gp_lon, Ppath::gp_p, interp_atmfield_by_itw(), interp_atmfield_gp2itw(), EnergyLevelMap::InterpToGridPos(), interpweights(), itw2p(), joker, ConstTensor4View::nbooks(), Ppath::np, ConstTensor3View::npages(), ns, Vector::resize(), and Matrix::resize().

Referenced by iyEmissionStandard(), iyHybrid(), iyRadarSingleScat(), and iyTransmissionStandard().

◆ get_ppath_cloudvars()

void get_ppath_cloudvars ( ArrayOfIndex clear2cloudy,
Matrix ppath_pnd,
ArrayOfMatrix ppath_dpnd_dx,
const Ppath ppath,
const Index atmosphere_dim,
const ArrayOfIndex cloudbox_limits,
const Tensor4 pnd_field,
const ArrayOfTensor4 dpnd_field_dx 
)

Determines the particle fields along a propagation path.

Parameters
[out]clear2cloudyMapping of index. See code for details.
[out]ppath_pndThe particle number density for each path point (also outside cloudbox).
[out]ppath_dpnd_dxdpnd_field_dx for each path point (also outside cloudbox).
[in]ppathAs the WSV.
[in]cloubox_limitsAs the WSV.
[in]pnd_fieldAs the WSV.
[in]dpnd_field_dxAs the WSV.
Author
Jana Mendrok, Patrick Eriksson
Date
2017-09-18

Definition at line 962 of file rte.cc.

References Ppath::gp_lat, Ppath::gp_lon, Ppath::gp_p, gridpos_copy(), interp_atmfield_by_itw(), interp_cloudfield_gp2itw(), is_gp_inside_cloudbox(), joker, max, min, ConstTensor4View::nbooks(), Array< base >::nelem(), Ppath::np, pow(), and Matrix::resize().

Referenced by iyHybrid(), iyRadarSingleScat(), and iyTransmissionStandard().

◆ get_ppath_f()

void get_ppath_f ( Matrix ppath_f,
const Ppath ppath,
const ConstVectorView f_grid,
const Index atmosphere_dim,
const Numeric rte_alonglos_v,
const ConstMatrixView ppath_wind 
)

Determines the Doppler shifted frequencies along the propagation path.

ppath_doppler[ nf,np]

Parameters
[out]ppath_fDoppler shifted f_grid
[in]ppathPropagation path.
[in]f_gridOriginal f_grid.
[in]atmosphere_dimAs the WSV.
[in]rte_alonglos_vAs the WSV.
[in]ppath_windSee get_ppath_atmvars.
Author
Patrick Eriksson
Date
2013-02-21

Definition at line 1066 of file rte.cc.

References a, dotprod_with_los(), joker, Ppath::los, ConstVectorView::nelem(), Ppath::np, Matrix::resize(), and SPEED_OF_LIGHT.

Referenced by iyEmissionStandard(), iyHybrid(), iyRadarSingleScat(), and iyTransmissionStandard().

◆ get_rowindex_for_mblock()

Range get_rowindex_for_mblock ( const Sparse sensor_response,
const Index imblock 
)

Returns the "range" of y corresponding to a measurement block.

Parameters
[in]sensor_responseAs the WSV.
[in]mblock_indexIndex of the measurement block.
Returns
The range.
Author
Patrick Eriksson
Date
2009-10-16

Definition at line 1110 of file rte.cc.

References Sparse::nrows().

Referenced by calcBaselineFit(), jacobianCalcFreqShift(), jacobianCalcFreqStretch(), jacobianCalcPointingZaInterp(), jacobianCalcPointingZaRecalc(), jacobianCalcPolyfit(), jacobianCalcSinefit(), yCalc(), and yCalc_mblock_loop_body().

◆ get_stepwise_blackbody_radiation()

void get_stepwise_blackbody_radiation ( VectorView  B,
VectorView  dB_dT,
const ConstVectorView ppath_f_grid,
const Numeric ppath_temperature,
const bool &  do_temperature_derivative 
)

Get the blackbody radiation at propagation path point.

Parameters
[in,out]BBlackbody radiation at propagation path point
[in,out]dB_dTBlackbody radiation temperature derivative at propagation path point
[in]ppath_f_gridWind-adjusted frequency grid at propagation path point
[in]ppath_temperatureTemperature of atmosphere at propagation path point
[in]do_temperature_derivativeFill dB_dT?
Author
Richard Larsson
Date
2017-09-21

Definition at line 1116 of file rte.cc.

References dplanck_dt(), ConstVectorView::nelem(), and planck().

Referenced by emission_from_propmat_field(), iyEmissionStandard(), and iyHybrid().

◆ get_stepwise_clearsky_propmat()

void get_stepwise_clearsky_propmat ( Workspace ws,
PropagationMatrix K,
StokesVector S,
Index lte,
ArrayOfPropagationMatrix dK_dx,
ArrayOfStokesVector dS_dx,
const Agenda propmat_clearsky_agenda,
const ArrayOfRetrievalQuantity jacobian_quantities,
const ConstVectorView ppath_f_grid,
const ConstVectorView ppath_magnetic_field,
const ConstVectorView ppath_line_of_sight,
const EnergyLevelMap ppath_nlte,
const ConstVectorView ppath_vmrs,
const Numeric ppath_temperature,
const Numeric ppath_pressure,
const bool &  jacobian_do 
)

Gets the clearsky propgation matrix and NLTE contributions.

Basically a wrapper for calls to the propagation clearsky agenda

Parameters
[in]wsThe workspace
[in,out]KPropagation matrix at propagation path point
[in,out]SNLTE source adjustment at propagation path point
[in,out]lteBoolean index for whether or not the atmosphere is in LTE at propagation path point
[in,out]dK_dxPropagation matrix derivatives at propagation path point
[in,out]dS_dxNLTE source adjustment derivatives at propagation path point
[in]propmat_clearsky_agendaAs WSA
[in]jacobian_quantitiesAs WSV
[in]ppath_f_gridWind-adjusted frequency grid at propagation path point
[in]ppath_mag_fieldMagnetic field at propagation path point
[in]ppath_line_of_sightLine of sight at propagation path point
[in]ppath_nlteNLTE distribution at propagation path point
[in]ppath_vmrsVolume mixing ratio of atmospheric species at propagation path point
[in]ppath_temperatureTemperature of atmosphere at propagation path point
[in]ppath_pressurePressure of atmosphere at propagation path point
[in]jacobian_doAs WSV
Author
Richard Larsson
Date
2017-09-21

Definition at line 1131 of file rte.cc.

References StokesVector::allZeroes(), and propmat_clearsky_agendaExecute().

Referenced by iyEmissionStandard(), iyHybrid(), iyRadarSingleScat(), and iyTransmissionStandard().

◆ get_stepwise_effective_source()

void get_stepwise_effective_source ( MatrixView  J,
Tensor3View  dJ_dx,
const PropagationMatrix K,
const StokesVector a,
const StokesVector S,
const ArrayOfPropagationMatrix dK_dx,
const ArrayOfStokesVector da_dx,
const ArrayOfStokesVector dS_dx,
const ConstVectorView B,
const ConstVectorView dB_dT,
const ArrayOfRetrievalQuantity jacobian_quantities,
const bool &  jacobian_do 
)

Gets the effective source at propagation path point.

Computes

J = K^-1 (a B + S)

and

dJ = - K^-1 dK/dx K^-1 (a B + S) + K^-1 (da B + a dB + dS)

Assumes zeroes for the a and K if nothing is happening but checks all other variables

FIXME: This function should be removed

Parameters
[in,out]JSource term for RTE at propagation path point
[in,out]dJ_dxSource term derivative for RTE at propagation path point
[in]KPropagation matrix, clearsky+scattersky, at propagation path point
[in]aAbsorption vector, clearsky+scattersky, at propagation path point
[in]SNLTE source adjustment, clearsky+scattersky, at propagation path point
[in]dK_dxPropagation matrix derivatives, clearsky+scattersky, at propagation path point
[in]da_dxAbsorption vector derivatives, clearsky+scattersky, at propagation path point
[in]dS_dxNLTE source adjustment derivatives, clearsky+scattersky, at propagation path point
[in]BBlackbody radiation at propagation path point
[in]dB_dTBlackbody radiation temperature derivative at propagation path point
[in]jacobian_quantitiesAs WSV
[in]jacobian_doAs WSV
Author
Richard Larsson
Date
2017-09-21

Definition at line 1168 of file rte.cc.

References a, PropagationMatrix::IsEmpty(), PropagationMatrix::IsRotational(), joker, PropagationMatrix::MatrixInverseAtPosition(), mult(), Array< base >::nelem(), ns, PropagationMatrix::NumberOfFrequencies(), PropagationMatrix::StokesDimensions(), Jacobian::Temperature, and StokesVector::VectorAtPosition().

◆ get_stepwise_f_partials()

Vector get_stepwise_f_partials ( const ConstVectorView ppath_line_of_sight,
const ConstVectorView f_grid,
const Jacobian::Atm  wind_type,
const Index atmosphere_dim 
)

Computes the ratio that a partial derivative with regards to frequency relates to the wind of come component.

Parameters
[in,out]ppath_f_gridWind-adjusted frequency grid wind derivative at propagation path point
[in]ppath_line_of_sightLine of sight at propagation path point
[in]f_gridAs WSV
[in]wind_typeThe wind component
[in]atmosphere_dimAs WSV
Author
Richard Larsson
Date
2017-09-21

Definition at line 1282 of file rte.cc.

References ARTS_ASSERT, dotprod_with_los(), Jacobian::WindMagnitude, Jacobian::WindU, Jacobian::WindV, and Jacobian::WindW.

Referenced by adapt_stepwise_partial_derivatives().

◆ get_stepwise_frequency_grid()

void get_stepwise_frequency_grid ( VectorView  ppath_f_grid,
const ConstVectorView f_grid,
const ConstVectorView ppath_wind,
const ConstVectorView ppath_line_of_sight,
const Numeric rte_alonglos_v,
const Index atmosphere_dim 
)

Inverse of get_stepwise_f_partials.

Computes practical frequency grid due to wind for propmat_clearsky_agenda

Parameters
[in,out]ppath_f_gridWind-adjusted frequency grid at propagation path point
[in]f_gridAs WSV
[in]ppath_windWind vector at propagation path point
[in]ppath_line_of_sightLine of sight at propagation path point
[in]rte_alonglos_vAs WSV
[in]atmosphere_dimAs WSV
Author
Richard Larsson
Date
2017-09-21

Definition at line 1262 of file rte.cc.

References dotprod_with_los(), and SPEED_OF_LIGHT.

◆ get_stepwise_scattersky_propmat()

void get_stepwise_scattersky_propmat ( StokesVector ap,
PropagationMatrix Kp,
ArrayOfStokesVector dap_dx,
ArrayOfPropagationMatrix dKp_dx,
const ArrayOfRetrievalQuantity jacobian_quantities,
const ConstMatrixView ppath_1p_pnd,
const ArrayOfMatrix ppath_dpnd_dx,
const Index  ppath_1p_id,
const ArrayOfArrayOfSingleScatteringData scat_data,
const ConstVectorView ppath_line_of_sight,
const ConstVectorView ppath_temperature,
const Index atmosphere_dim,
const bool &  jacobian_do 
)

Computes the contribution by scattering at propagation path point.

Parameters
[in,out]apAbsorption vector scattersky at propagation path point
[in,out]KpPropagation matrix scattersky at propagation path point
[in,out]dap_dxAbsorption vector scattersky derivatives at propagation path point
[in,out]dKp_dxPropagation matrix scattersky derivatives at propagation path point
[in]jacobian_quantitiesAs WSV
[in]ppath_1p_pndParticulate number density at propagation path point
[in]scat_dataAs WSV
[in]ppath_line_of_sightLine of sight at propagation path point
[in]ppath_temperatureTemperature at propagation path point
[in]atmosphere_dimAs WSV
[in]jacobian_doAs WSV
Author
Jana Mendrok, Richard Larsson
Date
2017-09-21

Definition at line 1316 of file rte.cc.

References FOR_ANALYTICAL_JACOBIANS_DO, joker, mirror_los(), ConstTensor4View::nbooks(), PropagationMatrix::NumberOfFrequencies(), opt_prop_Bulk(), opt_prop_NScatElems(), opt_prop_ScatSpecBulk(), StokesVector::SetAtPosition(), PropagationMatrix::SetAtPosition(), and PropagationMatrix::StokesDimensions().

Referenced by iyHybrid(), iyRadarSingleScat(), and iyTransmissionStandard().

◆ get_stepwise_scattersky_source()

void get_stepwise_scattersky_source ( StokesVector Sp,
ArrayOfStokesVector dSp_dx,
const ArrayOfRetrievalQuantity jacobian_quantities,
const ConstVectorView ppath_1p_pnd,
const ArrayOfMatrix ppath_dpnd_dx,
const Index  ppath_1p_id,
const ArrayOfArrayOfSingleScatteringData scat_data,
const ConstTensor7View cloudbox_field,
const ConstVectorView za_grid,
const ConstVectorView aa_grid,
const ConstMatrixView ppath_line_of_sight,
const GridPos ppath_pressure,
const Vector temperature,
const Index atmosphere_dim,
const bool &  jacobian_do,
const Index t_interp_order = 1 
)

Calculates the stepwise scattering source terms.

Uses new, unified phase matrix extraction scheme.

Parameters
[in]SpOut: The scattering source term
[in]dSp_dxOut: The derivative of the scattering source term ...
Author
Jana Mendrok \adapted from non-stepwise function
Date
2018-03-29

Definition at line 1433 of file rte.cc.

References AngIntegrate_trapezoid(), ARTS_ASSERT, ARTS_USER_ERROR_IF, FOR_ANALYTICAL_JACOBIANS_DO, gridpos_copy(), interp(), interpweights(), joker, Array< base >::nelem(), ConstVectorView::nelem(), PropagationMatrix::NumberOfFrequencies(), pha_mat_1ScatElem(), StokesVector::SetAtPosition(), PropagationMatrix::StokesDimensions(), and TotalNumberOfElements().

Referenced by iyHybrid().

◆ get_stepwise_transmission_matrix()

void get_stepwise_transmission_matrix ( Tensor3View  cumulative_transmission,
Tensor3View  T,
Tensor4View  dT_dx_close,
Tensor4View  dT_dx_far,
const ConstTensor3View cumulative_transmission_close,
const PropagationMatrix K_close,
const PropagationMatrix K_far,
const ArrayOfPropagationMatrix dK_close_dx,
const ArrayOfPropagationMatrix dK_far_dx,
const Numeric ppath_distance,
const bool &  first_level,
const Numeric dr_dT_close = 0,
const Numeric dr_dT_far = 0,
const Index it = -1 
)

Computes layer transmission matrix and cumulative transmission.

FIXME: This function should be removed

Parameters
[in,out]cumulative_transmissionPresent accumulation of transmission for Jacobian computations
[in,out]TLayer transmission
[in,out]dT_close_dxLayer transmission derivative due to the close propagation path point
[in,out]dT_far_dxLayer transmission derivative due to the far propagation path point
[in]cumulative_transmission_closePast accumulation of transmission for Jacobian computations
[in]K_closeLevel propagation matrix due to the close propagation path point
[in]K_farLevel propagation matrix due to the far propagation path point
[in]dK_close_dxLevel propagation matrix derivatives due to the close propagation path point
[in]dK_far_dxLevel propagation matrix derivatives due to the far propagation path point
[in]ppath_distanceThickness of the layer
[in]first_levelBoolean for if this is the first level, i.e., there is no cumulative_transmission_close
[in]dr_dT_closeThickness of the layer derivative due to temperature of the close propagation path point
[in]dr_dT_farThickness of the layer derivative due to temperature of the far propagation path point
[in]itIndex to temperature derivatives
Author
Richard Larsson
Date
2017-09-21

Definition at line 1601 of file rte.cc.

References compute_transmission_matrix(), compute_transmission_matrix_and_derivative(), cumulative_transmission(), id_mat(), joker, mult(), ConstTensor3View::ncols(), Array< base >::nelem(), and PropagationMatrix::NumberOfFrequencies().

◆ iy_transmittance_mult() [1/2]

void iy_transmittance_mult ( Matrix iy_new,
const ConstTensor3View iy_trans,
const ConstMatrixView iy_old 
)

Multiplicates iy_transmittance with iy-variable.

The operation can be written as:

iy_new = T * iy_old

where T is the transmission corresponding to iy_transmittance and iy_old is a variable matching iy.

iy_new* is sized by the function.

Parameters
[out]iy_newUpdated version of iy
[in]iy_transA variable matching iy_transmittance.
[in]iy_oldA variable matching iy.
Author
Patrick Eriksson
Date
2018-04-10

Definition at line 1993 of file rte.cc.

References ARTS_ASSERT, joker, mult(), ConstTensor3View::ncols(), ConstMatrixView::ncols(), ConstTensor3View::npages(), ConstTensor3View::nrows(), ConstMatrixView::nrows(), ns, and Matrix::resize().

◆ iy_transmittance_mult() [2/2]

void iy_transmittance_mult ( Tensor3 iy_trans_total,
const ConstTensor3View iy_trans_old,
const ConstTensor3View iy_trans_new 
)

Multiplicates iy_transmittance with transmissions.

That is, a multiplication of iy_transmittance with another variable having same structure and holding transmission values.

The "new path" is assumed to be further away from the sensor than the propagtion path already included in iy_transmittance. That is, the operation can be written as:

Ttotal = Told * Tnew

where Told is the transmission corresponding to iy_transmittance and Tnew corresponds to tau.

iy_trans_new* is sized by the function.

Parameters
[out]iy_trans_totalUpdated version of iy_transmittance
[in]iy_trans_oldA variable matching iy_transmittance.
[in]iy_trans_newA variable matching iy_transmittance.
Author
Patrick Eriksson
Date
2009-10-06

Definition at line 1973 of file rte.cc.

References ARTS_ASSERT, joker, mult(), ConstTensor3View::ncols(), ConstTensor3View::npages(), ConstTensor3View::nrows(), ns, and Tensor3::resize().

Referenced by iyHybrid(), iySurfaceRtpropAgenda(), and iySurfaceRtpropCalc().

◆ iyb_calc()

void iyb_calc ( Workspace ws,
Vector iyb,
ArrayOfVector iyb_aux,
ArrayOfMatrix diyb_dx,
Matrix geo_pos_matrix,
const Index imblock,
const Index atmosphere_dim,
const EnergyLevelMap nlte_field,
const Index cloudbox_on,
const Index stokes_dim,
const ConstVectorView f_grid,
const ConstMatrixView sensor_pos,
const ConstMatrixView sensor_los,
const ConstMatrixView transmitter_pos,
const ConstMatrixView mblock_dlos_grid,
const String iy_unit,
const Agenda iy_main_agenda,
const Agenda geo_pos_agenda,
const Index j_analytical_do,
const ArrayOfRetrievalQuantity jacobian_quantities,
const ArrayOfArrayOfIndex jacobian_indices,
const ArrayOfString iy_aux_vars,
const Verbosity verbosity 
)

Performs calculations for one measurement block, on iy-level.

FIXMEDOC@Patrick This function lacks all documentation

The parameters mainly matches WSVs.

Definition at line 1773 of file rte.cc.

References arts_omp_get_max_threads(), ARTS_USER_ERROR_IF, CREATE_OUT3, FOR_ANALYTICAL_JACOBIANS_DO2, geo_pos_agendaExecute(), iyb_calc_body(), joker, Array< base >::nelem(), ConstVectorView::nelem(), ConstMatrixView::nrows(), Vector::resize(), and Matrix::resize().

Referenced by jacobianCalcPointingZaRecalc(), and yCalc_mblock_loop_body().

◆ mirror_los()

void mirror_los ( Vector los_mirrored,
const ConstVectorView los,
const Index atmosphere_dim 
)

Determines the backward direction for a given line-of-sight.

This function can be used to get the LOS to apply for extracting single scattering properties, if the propagation path LOS is given.

A viewing direction of aa=0 is assumed for 1D. This corresponds to positive za for 2D.

Parameters
[out]los_mirroredThe line-of-sight for reversed direction.
[in]losA line-of-sight
[in]atmosphere_dimAs the WSV.
Author
Patrick Eriksson
Date
2011-07-15

Definition at line 2010 of file rte.cc.

References Vector::resize().

Referenced by cloudy_rt_vars_at_gp(), defocusing_general(), dotprod_with_los(), get_stepwise_scattersky_propmat(), MCRadar(), propmat_clearskyAddParticles(), propmat_clearskyAddZeeman(), and Sample_los().

◆ pos2true_latlon()

void pos2true_latlon ( Numeric lat,
Numeric lon,
const Index atmosphere_dim,
const ConstVectorView lat_grid,
const ConstVectorView lat_true,
const ConstVectorView lon_true,
const ConstVectorView pos 
)

Determines the true alt and lon for an "ARTS position".

The function disentangles if the geographical position shall be taken from lat_grid and lon_grid, or lat_true and lon_true.

Parameters
[out]latTrue latitude.
[out]lonTrue longitude.
[in]atmosphere_dimAs the WSV.
[in]lat_gridAs the WSV.
[in]lat_trueAs the WSV.
[in]lon_trueAs the WSV.
[in]posA position, as defined for rt calculations.
Author
Patrick Eriksson
Date
2011-07-15

Definition at line 2034 of file rte.cc.

References ARTS_ASSERT, gridpos(), interp(), interpweights(), and ConstVectorView::nelem().

Referenced by InterpGriddedField2ToPosition(), surface_complex_refr_indexFromGriddedField5(), surface_reflectivityFromGriddedField6(), surface_scalar_reflectivityFromGriddedField4(), surface_typeInterpTypeMask(), surfaceTelsem(), and telsemSurfaceTypeLandSea().

◆ rtmethods_jacobian_finalisation()

void rtmethods_jacobian_finalisation ( Workspace ws,
ArrayOfTensor3 diy_dx,
ArrayOfTensor3 diy_dpath,
const Index ns,
const Index nf,
const Index np,
const Index atmosphere_dim,
const Ppath ppath,
const Vector ppvar_p,
const Vector ppvar_t,
const Matrix ppvar_vmr,
const Index iy_agenda_call1,
const Tensor3 iy_transmittance,
const Agenda water_p_eq_agenda,
const ArrayOfRetrievalQuantity jacobian_quantities,
const ArrayOfIndex jac_species_i 
)

This function fixes the last steps to made on the Jacobian in some radiative transfer WSMs.

The method applies iy_transmittance, maps from ppath to the retrieval grids and applies non-standard Jacobian units.

See iyEmissonStandard for usage example.

Author
Patrick Eriksson
Date
2017-11-19

Definition at line 2068 of file rte.cc.

References ARTS_ASSERT, diy_from_path_to_rgrids(), FOR_ANALYTICAL_JACOBIANS_DO, joker, mult(), Array< base >::nelem(), ConstVectorView::nelem(), ConstTensor3View::npages(), ns, number_density(), pow(), Jacobian::Temperature, transpose(), water_p_eq_agendaExecute(), and LineShape::Y.

Referenced by iyHybrid(), and iyTransmissionStandard().

◆ rtmethods_unit_conversion()

void rtmethods_unit_conversion ( Matrix iy,
ArrayOfTensor3 diy_dx,
Tensor3 ppvar_iy,
const Index ns,
const Index np,
const Vector f_grid,
const Ppath ppath,
const ArrayOfRetrievalQuantity jacobian_quantities,
const Index j_analytical_do,
const String iy_unit 
)

This function handles the unit conversion to be done at the end of some radiative transfer WSMs.

The method hanldes both iy and analytical parts of the Jacobian.

See iyEmissonStandard for usage example.

Author
Patrick Eriksson
Date
2017-11-19

Definition at line 2206 of file rte.cc.

References apply_iy_unit(), apply_iy_unit2(), Ppath::end_lstep, FOR_ANALYTICAL_JACOBIANS_DO2, joker, Ppath::np, Ppath::nreal, and ns.

Referenced by iyHybrid().

◆ yCalc_mblock_loop_body()

void yCalc_mblock_loop_body ( bool &  failed,
String fail_msg,
ArrayOfArrayOfVector iyb_aux_array,
Workspace ws,
Vector y,
Vector y_f,
ArrayOfIndex y_pol,
Matrix y_pos,
Matrix y_los,
Matrix y_geo,
Matrix jacobian,
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_response_f,
const ArrayOfIndex sensor_response_pol,
const Matrix sensor_response_dlos,
const String iy_unit,
const Agenda iy_main_agenda,
const Agenda geo_pos_agenda,
const Agenda jacobian_agenda,
const Index jacobian_do,
const ArrayOfRetrievalQuantity jacobian_quantities,
const ArrayOfArrayOfIndex jacobian_indices,
const ArrayOfString iy_aux_vars,
const Verbosity verbosity,
const Index mblock_index,
const Index n1y,
const Index j_analytical_do 
)

Performs calculations for one measurement block, on y-level.

The parameters mainly matches WSVs.

Definition at line 2248 of file rte.cc.

References ARTS_USER_ERROR_IF, FOR_ANALYTICAL_JACOBIANS_DO2, get_rowindex_for_mblock(), Range::get_start(), nonstd::isnan(), iyb_calc(), jacobian_agendaExecute(), joker, mult(), Sparse::ncols(), ConstMatrixView::ncols(), and ConstVectorView::nelem().

Referenced by yCalc().

◆ ze_cfac()

void ze_cfac ( Vector fac,
const Vector f_grid,
const Numeric ze_tref,
const Numeric k2 
)

Calculates factor to convert back-scattering to Ze.

The vector fac shall be sized to match f_grid, before calling the function.

If k2 <= 0, the K" factor is calculated. Otherwise the input k2 is applied as "hard-coded".

Parameters
[out]facVector with factors.
[in]f_gridAs the WSV.
[in]z_trefReference temperature for conversion to Ze.
[in]k2Reference dielectric factor.
Author
Patrick Eriksson
Date
2002-05-20

Definition at line 2389 of file rte.cc.

References a, abs, ARTS_ASSERT, complex_n_water_liebe93(), fac(), ConstVectorView::nelem(), PI, and SPEED_OF_LIGHT.

Referenced by MCRadar(), and yRadar().