ARTS  2.0.49
m_rte.cc File Reference

Workspace functions for solving clear sky radiative transfer. More...

#include <cmath>
#include <stdexcept>
#include "arts.h"
#include "arts_omp.h"
#include "auto_md.h"
#include "check_input.h"
#include "jacobian.h"
#include "logic.h"
#include "math_funcs.h"
#include "messages.h"
#include "montecarlo.h"
#include "physics_funcs.h"
#include "ppath.h"
#include "rte.h"
#include "special_interp.h"

Go to the source code of this file.

Macros

#define FOR_ANALYTICAL_JACOBIANS_DO(what_to_do)
 

Functions

void from_dpath_to_dx (MatrixView diy_dx, ConstMatrixView diy_dq, const Numeric &w)
 diy_from_path_to_rgrids More...
 
void add_extrap (ArrayOfGridPos &gp)
 
void diy_from_path_to_rgrids (Tensor3View diy_dx, const RetrievalQuantity &jacobian_quantity, ConstTensor3View diy_dpath, const Index &atmosphere_dim, const Ppath &ppath, ConstVectorView ppath_p)
 
void get_pointers_for_analytical_jacobians (ArrayOfIndex &abs_species_i, ArrayOfIndex &is_t, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfArrayOfSpeciesTag &abs_species)
 Help function for analytical jacobian calculations. More...
 
void get_iy_of_background (Workspace &ws, Matrix &iy, Matrix &iy_error, Index &iy_error_type, Matrix &iy_aux, ArrayOfTensor3 &diy_dx, ConstTensor3View iy_transmission, const Index &jacobian_do, const Ppath &ppath, const Index &atmosphere_dim, ConstVectorView p_grid, ConstVectorView lat_grid, ConstVectorView lon_grid, ConstTensor3View t_field, ConstTensor3View z_field, ConstTensor4View vmr_field, const Matrix &r_geoid, const Matrix &z_surface, const Index &cloudbox_on, const Index &stokes_dim, ConstVectorView f_grid, const Agenda &iy_clearsky_agenda, const Agenda &iy_space_agenda, const Agenda &surface_prop_agenda, const Agenda &iy_cloudbox_agenda, const Verbosity &verbosity)
 get_iy_of_background More...
 
void iyb_calc (Workspace &ws, Vector &iyb, Vector &iyb_error, Index &iy_error_type, Vector &iyb_aux, ArrayOfMatrix &diyb_dx, const Index &imblock, const Index &atmosphere_dim, ConstVectorView p_grid, ConstVectorView lat_grid, ConstVectorView lon_grid, ConstTensor3View t_field, ConstTensor3View z_field, ConstTensor4View vmr_field, const Index &cloudbox_on, const Index &stokes_dim, ConstVectorView f_grid, ConstMatrixView sensor_pos, ConstMatrixView sensor_los, ConstVectorView mblock_za_grid, ConstVectorView mblock_aa_grid, const Index &antenna_dim, const Agenda &iy_clearsky_agenda, const String &y_unit, const Index &j_analytical_do, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfArrayOfIndex &jacobian_indices, const Verbosity &verbosity)
 iyb_calc More...
 
void iyBeerLambertStandardClearsky (Workspace &ws, Matrix &iy, Matrix &iy_error, Index &iy_error_type, Matrix &iy_aux, ArrayOfTensor3 &diy_dx, const Index &iy_agenda_call1, const Tensor3 &iy_transmission, const Vector &rte_pos, const Vector &rte_los, const Index &jacobian_do, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &z_field, const Tensor3 &t_field, const Tensor4 &vmr_field, const Tensor3 &wind_u_field, const Tensor3 &wind_v_field, const Tensor3 &wind_w_field, const Matrix &r_geoid, const Matrix &z_surface, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const Index &stokes_dim, const Vector &f_grid, const ArrayOfArrayOfSpeciesTag &abs_species, const Agenda &ppath_step_agenda, const Agenda &abs_scalar_gas_agenda, const Agenda &iy_clearsky_agenda, const Agenda &iy_space_agenda, const Agenda &surface_prop_agenda, const Agenda &iy_cloudbox_agenda, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfArrayOfIndex &jacobian_indices, const Verbosity &verbosity)
 WORKSPACE METHOD: iyBeerLambertStandardClearsky. More...
 
void iyBeerLambertStandardCloudbox (Workspace &ws, Matrix &iy, Matrix &iy_error, Index &iy_error_type, Matrix &iy_aux, ArrayOfTensor3 &diy_dx, const Tensor3 &iy_transmission, const Vector &rte_pos, const Vector &rte_los, const Index &jacobian_do, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &z_field, const Tensor3 &t_field, const Tensor4 &vmr_field, const Matrix &r_geoid, const Matrix &z_surface, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const Index &stokes_dim, const Vector &f_grid, const Agenda &ppath_step_agenda, const Agenda &abs_scalar_gas_agenda, const Agenda &iy_clearsky_agenda, const Tensor4 &pnd_field, const Index &use_mean_scat_data, const ArrayOfSingleScatteringData &scat_data_raw, const Agenda &opt_prop_gas_agenda, const Verbosity &verbosity)
 WORKSPACE METHOD: iyBeerLambertStandardCloudbox. More...
 
void iyEmissionStandardClearsky (Workspace &ws, Matrix &iy, Matrix &iy_error, Index &iy_error_type, Matrix &iy_aux, ArrayOfTensor3 &diy_dx, const Index &iy_agenda_call1, const Tensor3 &iy_transmission, const Vector &rte_pos, const Vector &rte_los, const Index &jacobian_do, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &z_field, const Tensor3 &t_field, const Tensor4 &vmr_field, const Tensor3 &wind_u_field, const Tensor3 &wind_v_field, const Tensor3 &wind_w_field, const Matrix &r_geoid, const Matrix &z_surface, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const Index &stokes_dim, const Vector &f_grid, const ArrayOfArrayOfSpeciesTag &abs_species, const Agenda &ppath_step_agenda, const Agenda &emission_agenda, const Agenda &abs_scalar_gas_agenda, const Agenda &iy_clearsky_agenda, const Agenda &iy_space_agenda, const Agenda &surface_prop_agenda, const Agenda &iy_cloudbox_agenda, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfArrayOfIndex &jacobian_indices, const Verbosity &verbosity)
 WORKSPACE METHOD: iyEmissionStandardClearsky. More...
 
void iyEmissionStandardClearskyBasic (Workspace &ws, Matrix &iy, const Vector &rte_pos, const Vector &rte_los, const Index &jacobian_do, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &z_field, const Tensor3 &t_field, const Tensor4 &vmr_field, const Tensor3 &wind_u_field, const Tensor3 &wind_v_field, const Tensor3 &wind_w_field, const Matrix &r_geoid, const Matrix &z_surface, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const Index &stokes_dim, const Vector &f_grid, const Agenda &ppath_step_agenda, const Agenda &emission_agenda, const Agenda &abs_scalar_gas_agenda, const Agenda &iy_clearsky_basic_agenda, const Agenda &iy_space_agenda, const Agenda &surface_prop_agenda, const Agenda &iy_cloudbox_agenda, const Verbosity &verbosity)
 WORKSPACE METHOD: iyEmissionStandardClearskyBasic. More...
 
void iyMC (Workspace &ws, Matrix &iy, Matrix &iy_error, Index &iy_error_type, Matrix &iy_aux, ArrayOfTensor3 &diy_dx, const Index &iy_agenda_call1, const Tensor3 &iy_transmission, const Vector &rte_pos, const Vector &rte_los, const Index &jacobian_do, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &z_field, const Tensor3 &t_field, const Tensor4 &vmr_field, const Matrix &r_geoid, const Matrix &z_surface, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const Index &cloudbox_checked, const Index &stokes_dim, const Vector &f_grid, const ArrayOfSingleScatteringData &scat_data_raw, const Agenda &iy_space_agenda, const Agenda &surface_prop_agenda, const Agenda &abs_scalar_gas_agenda, const Agenda &opt_prop_gas_agenda, const Tensor4 &pnd_field, const String &y_unit, const Numeric &mc_std_err, const Index &mc_max_time, const Index &mc_max_iter, const Verbosity &verbosity)
 WORKSPACE METHOD: iyMC. More...
 
void yCalc (Workspace &ws, Vector &y, Vector &y_f, ArrayOfIndex &y_pol, Matrix &y_pos, Matrix &y_los, Vector &y_error, Vector &y_aux, Matrix &jacobian, const Index &basics_checked, 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 &cloudbox_checked, 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_response_f, const ArrayOfIndex &sensor_response_pol, const Vector &sensor_response_za, const Vector &sensor_response_aa, const Agenda &iy_clearsky_agenda, const String &y_unit, const Agenda &jacobian_agenda, const Index &jacobian_do, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfArrayOfIndex &jacobian_indices, const Verbosity &verbosity)
 WORKSPACE METHOD: yCalc. More...
 
void y_unitApply (Vector &y, Vector &y_error, Matrix &jacobian, const Vector &y_f, const ArrayOfIndex &y_pol, const String &y_unit, const Verbosity &)
 WORKSPACE METHOD: y_unitApply. More...
 
void yCalc2 (Workspace &ws, Vector &y, Vector &y_f, ArrayOfIndex &y_pol, Matrix &y_pos, Matrix &y_los, Vector &y_error, Vector &y_aux, Matrix &jacobian, const Index &basics_checked, 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 &cloudbox_checked, 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 Agenda &sensor_response_agenda, const Agenda &iy_clearsky_agenda, const String &y_unit, const Agenda &jacobian_agenda, const Index &jacobian_do, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfArrayOfIndex &jacobian_indices, const Verbosity &verbosity)
 WORKSPACE METHOD: yCalc2. More...
 

Variables

const String ABSSPECIES_MAINTAG
 
const String TEMPERATURE_MAINTAG
 

Detailed Description

Workspace functions for solving clear sky radiative transfer.

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

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

Definition in file m_rte.cc.

Macro Definition Documentation

◆ FOR_ANALYTICAL_JACOBIANS_DO

#define FOR_ANALYTICAL_JACOBIANS_DO (   what_to_do)
Value:
for( Index iq=0; iq<jacobian_quantities.nelem(); iq++ ) \
{ \
if( jacobian_quantities[iq].Analytical() ) \
{ what_to_do } \
}

Definition at line 64 of file m_rte.cc.

Function Documentation

◆ add_extrap()

void add_extrap ( ArrayOfGridPos gp)

Definition at line 110 of file m_rte.cc.

References Array< base >::nelem().

Referenced by diy_from_path_to_rgrids().

◆ diy_from_path_to_rgrids()

void diy_from_path_to_rgrids ( Tensor3View  diy_dx,
const RetrievalQuantity jacobian_quantity,
ConstTensor3View  diy_dpath,
const Index atmosphere_dim,
const Ppath ppath,
ConstVectorView  ppath_p 
)

◆ from_dpath_to_dx()

void from_dpath_to_dx ( MatrixView  diy_dx,
ConstMatrixView  diy_dq,
const Numeric w 
)

diy_from_path_to_rgrids

Maps jacobian data for points along the propagation path, to jacobian retrieval grid data.

Parameters
diy_dxOut: Jacobians for selected retrieval grids.
jacobian_quantityAs the WSV.
diy_dpathJacobians along the propagation path.
atmosphere_dimAs the WSV.
ppathAs the WSV.
ppath_pThe pressure at each ppath point.
Author
Patrick Eriksson
Date
2009-10-08

Definition at line 96 of file m_rte.cc.

References ConstMatrixView::ncols(), and ConstMatrixView::nrows().

Referenced by diy_from_path_to_rgrids().

◆ get_iy_of_background()

void get_iy_of_background ( Workspace ws,
Matrix iy,
Matrix iy_error,
Index iy_error_type,
Matrix iy_aux,
ArrayOfTensor3 diy_dx,
ConstTensor3View  iy_transmission,
const Index jacobian_do,
const Ppath ppath,
const Index atmosphere_dim,
ConstVectorView  p_grid,
ConstVectorView  lat_grid,
ConstVectorView  lon_grid,
ConstTensor3View  t_field,
ConstTensor3View  z_field,
ConstTensor4View  vmr_field,
const Matrix r_geoid,
const Matrix z_surface,
const Index cloudbox_on,
const Index stokes_dim,
ConstVectorView  f_grid,
const Agenda iy_clearsky_agenda,
const Agenda iy_space_agenda,
const Agenda surface_prop_agenda,
const Agenda iy_cloudbox_agenda,
const Verbosity verbosity 
)

get_iy_of_background

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_clearsky_agenda. It is also allowed to input iy_clearsky_basic_agenda instead of iy_clearsky_agenda*.

Parameters
wsOut: The workspace
iyOut: As the WSV.
iy_errorOut: As the WSV.
iy_error_typeOut: As the WSV.
iy_auxOut: As the WSV.
diy_auxOut: As the WSV.
iy_transmissionAs the WSV.
jacobian_doAs the WSV.
ppathAs the WSV.
atmosphere_dimAs the WSV.
p_gridAs the WSV.
lat_gridAs the WSV.
lon_gridAs the WSV.
t_fieldAs the WSV.
z_fieldAs the WSV.
vmr_fieldAs the WSV.
cloudbox_onAs the WSV.
stokes_dimAs the WSV.
f_gridAs the WSV.
iy_clearsky_agendaAs the WSV or iy_clearsky_basic_agenda.
iy_space_agendaAs the WSV.
surface_prop_agendaAs the WSV.
iy_cloudbox_agendaAs the WSV.
Author
Patrick Eriksson
Date
2009-10-08

Definition at line 360 of file m_rte.cc.

References Ppath::background, CREATE_OUT1, CREATE_OUT3, Ppath::gp_lat, Ppath::gp_lon, Ppath::gp_p, gridpos_copy(), iy_clearsky_agendaExecute(), iy_clearsky_basic_agendaExecute(), iy_cloudbox_agendaExecute(), iy_space_agendaExecute(), iy_transmission_mult(), joker, Ppath::los, max, min, Agenda::name(), ConstTensor4View::nbooks(), ConstMatrixView::ncols(), ConstTensor4View::ncols(), ConstVectorView::nelem(), Ppath::np, ConstTensor3View::npages(), ConstTensor4View::npages(), ConstMatrixView::nrows(), ConstTensor4View::nrows(), Ppath::pos, ppath_what_background(), Vector::resize(), sign(), surface_calc(), surface_prop_agendaExecute(), and surfacetilt().

Referenced by iyBeerLambertStandardClearsky(), iyEmissionStandardClearsky(), and iyEmissionStandardClearskyBasic().

◆ get_pointers_for_analytical_jacobians()

void get_pointers_for_analytical_jacobians ( ArrayOfIndex abs_species_i,
ArrayOfIndex is_t,
const ArrayOfRetrievalQuantity jacobian_quantities,
const ArrayOfArrayOfSpeciesTag abs_species 
)

Help function for analytical jacobian calculations.

The function determines which terms in jacobian_quantities that are analytical absorption species and temperature jacobians.

abs_species_i* and is_t shall be sized to have the same length as jacobian_quantities. For analytical absorption species jacobians, abs_species_i is set to the matching index in abs_species*. Otherwise, to -1. For analytical temperature jacobians, is_t is set to 1. Otherwise to 0.

Parameters
abs_species_iOut: Matching index in abs_species
is_tOut: Flag for: Is a temperature jacobian?
jacobian_quantitiesAs the WSV.
abs_speciesAs the WSV.
Author
Patrick Eriksson
Date
2009-10-07

Definition at line 286 of file m_rte.cc.

References ABSSPECIES_MAINTAG, array_species_tag_from_string(), chk_contains(), FOR_ANALYTICAL_JACOBIANS_DO, and TEMPERATURE_MAINTAG.

Referenced by iyBeerLambertStandardClearsky(), and iyEmissionStandardClearsky().

◆ iyb_calc()

void iyb_calc ( Workspace ws,
Vector iyb,
Vector iyb_error,
Index iy_error_type,
Vector iyb_aux,
ArrayOfMatrix diyb_dx,
const Index imblock,
const Index atmosphere_dim,
ConstVectorView  p_grid,
ConstVectorView  lat_grid,
ConstVectorView  lon_grid,
ConstTensor3View  t_field,
ConstTensor3View  z_field,
ConstTensor4View  vmr_field,
const Index cloudbox_on,
const Index stokes_dim,
ConstVectorView  f_grid,
ConstMatrixView  sensor_pos,
ConstMatrixView  sensor_los,
ConstVectorView  mblock_za_grid,
ConstVectorView  mblock_aa_grid,
const Index antenna_dim,
const Agenda iy_clearsky_agenda,
const String y_unit,
const Index j_analytical_do,
const ArrayOfRetrievalQuantity jacobian_quantities,
const ArrayOfArrayOfIndex jacobian_indices,
const Verbosity verbosity 
)

iyb_calc

Calculation of pencil beam monochromatic spectra for 1 measurement block.

All in- and output variables as the WSV with the same name.

Author
Patrick Eriksson
Date
2009-10-16

Definition at line 588 of file m_rte.cc.

References abs, apply_y_unit(), apply_y_unit2(), CREATE_OUT0, exit_or_rethrow(), FOR_ANALYTICAL_JACOBIANS_DO, iy_clearsky_agendaExecute(), joker, map_daa(), ConstMatrixView::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), ConstMatrixView::nrows(), Vector::resize(), and sign().

Referenced by jacobianCalcAbsSpeciesPerturbations(), jacobianCalcPointingZaRecalc(), jacobianCalcTemperaturePerturbations(), yCalc(), and yCalc2().

◆ iyBeerLambertStandardClearsky()

void iyBeerLambertStandardClearsky ( Workspace ws,
Matrix iy,
Matrix iy_error,
Index iy_error_type,
Matrix iy_aux,
ArrayOfTensor3 diy_dx,
const Index iy_agenda_call1,
const Tensor3 iy_transmission,
const Vector rte_pos,
const Vector rte_los,
const Index jacobian_do,
const Index atmosphere_dim,
const Vector p_grid,
const Vector lat_grid,
const Vector lon_grid,
const Tensor3 z_field,
const Tensor3 t_field,
const Tensor4 vmr_field,
const Tensor3 wind_u_field,
const Tensor3 wind_v_field,
const Tensor3 wind_w_field,
const Matrix r_geoid,
const Matrix z_surface,
const Index cloudbox_on,
const ArrayOfIndex cloudbox_limits,
const Index stokes_dim,
const Vector f_grid,
const ArrayOfArrayOfSpeciesTag abs_species,
const Agenda ppath_step_agenda,
const Agenda abs_scalar_gas_agenda,
const Agenda iy_clearsky_agenda,
const Agenda iy_space_agenda,
const Agenda surface_prop_agenda,
const Agenda iy_cloudbox_agenda,
const ArrayOfRetrievalQuantity jacobian_quantities,
const ArrayOfArrayOfIndex jacobian_indices,
const Verbosity verbosity 
)

WORKSPACE METHOD: iyBeerLambertStandardClearsky.

Standard method for handling transmission measurements.

Designed to be part of iy_clearsky_agenda. That is, only valid outside the cloudbox (no scattering or polarised absorption).

This method works exactly as iyEmissionStandardClearsky, but does add any emission. In fact, the latter method with emission_agenda set to return zero would give exactly the same result as this WSM. For propagation paths above the surface, the result is the output of iy_space_agenda times the (vector) transmission through the atmosphere (i.e. standard Beer-Lambert).

If the propagation paths intercepts with the surface, the surface variables are used as for iyEmissionStandardClearsky, and surface_emission* should probably be set to 0. Multiple-beams will be followed if surface_los has length > 1.

iy_aux* is not set.

Author
Patrick Eriksson
Parameters
[in,out]wsWorkspace
[out]iyWS Output
[out]iy_errorWS Output
[out]iy_error_typeWS Output
[out]iy_auxWS Output
[out]diy_dxWS Output
[in]iy_agenda_call1WS Input
[in]iy_transmissionWS Input
[in]rte_posWS Input
[in]rte_losWS Input
[in]jacobian_doWS Input
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]z_fieldWS Input
[in]t_fieldWS Input
[in]vmr_fieldWS Input
[in]wind_u_fieldWS Input
[in]wind_v_fieldWS Input
[in]wind_w_fieldWS Input
[in]r_geoidWS Input
[in]z_surfaceWS Input
[in]cloudbox_onWS Input
[in]cloudbox_limitsWS Input
[in]stokes_dimWS Input
[in]f_gridWS Input
[in]abs_speciesWS Input
[in]ppath_step_agendaWS Input
[in]abs_scalar_gas_agendaWS Input
[in]iy_clearsky_agendaWS Input
[in]iy_space_agendaWS Input
[in]surface_prop_agendaWS Input
[in]iy_cloudbox_agendaWS Input
[in]jacobian_quantitiesWS Input
[in]jacobian_indicesWS Input

Definition at line 789 of file m_rte.cc.

References diy_from_path_to_rgrids(), FOR_ANALYTICAL_JACOBIANS_DO, get_iy_of_background(), get_pointers_for_analytical_jacobians(), get_ppath_atmvars(), get_ppath_rtvars(), iy_transmission_for_scalar_tau(), iy_transmission_mult_scalar_tau(), joker, Ppath::l_step, mult(), Array< base >::nelem(), ConstVectorView::nelem(), Ppath::np, ppath_calc(), Vector::resize(), transpose(), and vmrunitscf().

Referenced by iyBeerLambertStandardClearsky_g().

◆ iyBeerLambertStandardCloudbox()

void iyBeerLambertStandardCloudbox ( Workspace ws,
Matrix iy,
Matrix iy_error,
Index iy_error_type,
Matrix iy_aux,
ArrayOfTensor3 diy_dx,
const Tensor3 iy_transmission,
const Vector rte_pos,
const Vector rte_los,
const Index jacobian_do,
const Index atmosphere_dim,
const Vector p_grid,
const Vector lat_grid,
const Vector lon_grid,
const Tensor3 z_field,
const Tensor3 t_field,
const Tensor4 vmr_field,
const Matrix r_geoid,
const Matrix z_surface,
const Index cloudbox_on,
const ArrayOfIndex cloudbox_limits,
const Index stokes_dim,
const Vector f_grid,
const Agenda ppath_step_agenda,
const Agenda abs_scalar_gas_agenda,
const Agenda iy_clearsky_agenda,
const Tensor4 pnd_field,
const Index use_mean_scat_data,
const ArrayOfSingleScatteringData scat_data_raw,
const Agenda opt_prop_gas_agenda,
const Verbosity verbosity 
)

WORKSPACE METHOD: iyBeerLambertStandardCloudbox.

Standard method for handling transmission measurements.

Designed to be part of iy_cloudbox_agenda, and is thus a complement to iyBeerLambertStandardClearsky.

Only scattering out of the propagation path is considered. Thus, this method could be used for direct solar occultation measurements but clearly not for observations of scattered solar radiation.

For regions of no scattering there is a marginal difference between running this method and the corresponding pure clear-sky agenda, and there is not critical to set the cloudbox limits in a "tight" manner.

Author
Patrick Eriksson
Parameters
[in,out]wsWorkspace
[out]iyWS Output
[out]iy_errorWS Output
[out]iy_error_typeWS Output
[out]iy_auxWS Output
[out]diy_dxWS Output
[in]iy_transmissionWS Input
[in]rte_posWS Input
[in]rte_losWS Input
[in]jacobian_doWS Input
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]z_fieldWS Input
[in]t_fieldWS Input
[in]vmr_fieldWS Input
[in]r_geoidWS Input
[in]z_surfaceWS Input
[in]cloudbox_onWS Input
[in]cloudbox_limitsWS Input
[in]stokes_dimWS Input
[in]f_gridWS Input
[in]ppath_step_agendaWS Input
[in]abs_scalar_gas_agendaWS Input
[in]iy_clearsky_agendaWS Input
[in]pnd_fieldWS Input
[in]use_mean_scat_dataWS Input
[in]scat_data_rawWS Input
[in]opt_prop_gas_agendaWS Input

Definition at line 1097 of file m_rte.cc.

References get_ppath_atmvars(), get_ppath_cloudrtvars(), get_ppath_pnd(), iy_clearsky_agendaExecute(), iy_transmission_mult(), joker, Ppath::los, mult(), ConstVectorView::nelem(), Ppath::np, Ppath::pos, ppath_calc(), and ppath_what_background().

Referenced by iyBeerLambertStandardCloudbox_g().

◆ iyEmissionStandardClearsky()

void iyEmissionStandardClearsky ( Workspace ws,
Matrix iy,
Matrix iy_error,
Index iy_error_type,
Matrix iy_aux,
ArrayOfTensor3 diy_dx,
const Index iy_agenda_call1,
const Tensor3 iy_transmission,
const Vector rte_pos,
const Vector rte_los,
const Index jacobian_do,
const Index atmosphere_dim,
const Vector p_grid,
const Vector lat_grid,
const Vector lon_grid,
const Tensor3 z_field,
const Tensor3 t_field,
const Tensor4 vmr_field,
const Tensor3 wind_u_field,
const Tensor3 wind_v_field,
const Tensor3 wind_w_field,
const Matrix r_geoid,
const Matrix z_surface,
const Index cloudbox_on,
const ArrayOfIndex cloudbox_limits,
const Index stokes_dim,
const Vector f_grid,
const ArrayOfArrayOfSpeciesTag abs_species,
const Agenda ppath_step_agenda,
const Agenda emission_agenda,
const Agenda abs_scalar_gas_agenda,
const Agenda iy_clearsky_agenda,
const Agenda iy_space_agenda,
const Agenda surface_prop_agenda,
const Agenda iy_cloudbox_agenda,
const ArrayOfRetrievalQuantity jacobian_quantities,
const ArrayOfArrayOfIndex jacobian_indices,
const Verbosity verbosity 
)

WORKSPACE METHOD: iyEmissionStandardClearsky.

Standard method for radiative transfer calculations with emission.

Designed to be part of iy_clearsky_agenda. That is, only valid outside the cloudbox (no scattering or polarised absorption). Assumes local thermodynamic equilibrium for emission.

The overall strategy is to take the average of the absorption and the emission source function at the end points of each step of the propagation path. See further the user guide. iy_error is considered to be 0.

The WSV iy_aux is set to hold the transmission, if the radiative background is space or the surface. That is, as long as there is no intersection with a cloudbox, the method sets iy_aux to the transmission through the atmosphere either down to the surface, or to the top of the atmosphere. The treatment of iy_aux if there is an interesection with the cloudbox depends on the scattering method selected.

Author
Patrick Eriksson
Parameters
[in,out]wsWorkspace
[out]iyWS Output
[out]iy_errorWS Output
[out]iy_error_typeWS Output
[out]iy_auxWS Output
[out]diy_dxWS Output
[in]iy_agenda_call1WS Input
[in]iy_transmissionWS Input
[in]rte_posWS Input
[in]rte_losWS Input
[in]jacobian_doWS Input
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]z_fieldWS Input
[in]t_fieldWS Input
[in]vmr_fieldWS Input
[in]wind_u_fieldWS Input
[in]wind_v_fieldWS Input
[in]wind_w_fieldWS Input
[in]r_geoidWS Input
[in]z_surfaceWS Input
[in]cloudbox_onWS Input
[in]cloudbox_limitsWS Input
[in]stokes_dimWS Input
[in]f_gridWS Input
[in]abs_speciesWS Input
[in]ppath_step_agendaWS Input
[in]emission_agendaWS Input
[in]abs_scalar_gas_agendaWS Input
[in]iy_clearsky_agendaWS Input
[in]iy_space_agendaWS Input
[in]surface_prop_agendaWS Input
[in]iy_cloudbox_agendaWS Input
[in]jacobian_quantitiesWS Input
[in]jacobian_indicesWS Input

Definition at line 1240 of file m_rte.cc.

References diy_from_path_to_rgrids(), FOR_ANALYTICAL_JACOBIANS_DO, get_iy_of_background(), get_pointers_for_analytical_jacobians(), get_ppath_atmvars(), get_ppath_rtvars(), iy_transmission_for_scalar_tau(), iy_transmission_mult_scalar_tau(), joker, Ppath::l_step, mult(), Array< base >::nelem(), ConstVectorView::nelem(), Ppath::np, ppath_calc(), ppath_what_background(), Vector::resize(), Matrix::resize(), transpose(), and vmrunitscf().

Referenced by iyEmissionStandardClearsky_g().

◆ iyEmissionStandardClearskyBasic()

void iyEmissionStandardClearskyBasic ( Workspace ws,
Matrix iy,
const Vector rte_pos,
const Vector rte_los,
const Index jacobian_do,
const Index atmosphere_dim,
const Vector p_grid,
const Vector lat_grid,
const Vector lon_grid,
const Tensor3 z_field,
const Tensor3 t_field,
const Tensor4 vmr_field,
const Tensor3 wind_u_field,
const Tensor3 wind_v_field,
const Tensor3 wind_w_field,
const Matrix r_geoid,
const Matrix z_surface,
const Index cloudbox_on,
const ArrayOfIndex cloudbox_limits,
const Index stokes_dim,
const Vector f_grid,
const Agenda ppath_step_agenda,
const Agenda emission_agenda,
const Agenda abs_scalar_gas_agenda,
const Agenda iy_clearsky_basic_agenda,
const Agenda iy_space_agenda,
const Agenda surface_prop_agenda,
const Agenda iy_cloudbox_agenda,
const Verbosity verbosity 
)

WORKSPACE METHOD: iyEmissionStandardClearskyBasic.

As iyEmissionStandardClearsky, but lacking support for auxilary variables and jacobian calculations.

Designed to be part of iy_clearsky_basic_agenda. See further iyEmissionStandardClearsky*.

Author
Patrick Eriksson
Parameters
[in,out]wsWorkspace
[out]iyWS Output
[in]rte_posWS Input
[in]rte_losWS Input
[in]jacobian_doWS Input
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]z_fieldWS Input
[in]t_fieldWS Input
[in]vmr_fieldWS Input
[in]wind_u_fieldWS Input
[in]wind_v_fieldWS Input
[in]wind_w_fieldWS Input
[in]r_geoidWS Input
[in]z_surfaceWS Input
[in]cloudbox_onWS Input
[in]cloudbox_limitsWS Input
[in]stokes_dimWS Input
[in]f_gridWS Input
[in]ppath_step_agendaWS Input
[in]emission_agendaWS Input
[in]abs_scalar_gas_agendaWS Input
[in]iy_clearsky_basic_agendaWS Input
[in]iy_space_agendaWS Input
[in]surface_prop_agendaWS Input
[in]iy_cloudbox_agendaWS Input

Definition at line 1612 of file m_rte.cc.

References get_iy_of_background(), get_ppath_atmvars(), get_ppath_rtvars(), ConstVectorView::nelem(), Ppath::np, and ppath_calc().

Referenced by iyEmissionStandardClearskyBasic_g().

◆ iyMC()

void iyMC ( Workspace ws,
Matrix iy,
Matrix iy_error,
Index iy_error_type,
Matrix iy_aux,
ArrayOfTensor3 diy_dx,
const Index iy_agenda_call1,
const Tensor3 iy_transmission,
const Vector rte_pos,
const Vector rte_los,
const Index jacobian_do,
const Index atmosphere_dim,
const Vector p_grid,
const Vector lat_grid,
const Vector lon_grid,
const Tensor3 z_field,
const Tensor3 t_field,
const Tensor4 vmr_field,
const Matrix r_geoid,
const Matrix z_surface,
const Index cloudbox_on,
const ArrayOfIndex cloudbox_limits,
const Index cloudbox_checked,
const Index stokes_dim,
const Vector f_grid,
const ArrayOfSingleScatteringData scat_data_raw,
const Agenda iy_space_agenda,
const Agenda surface_prop_agenda,
const Agenda abs_scalar_gas_agenda,
const Agenda opt_prop_gas_agenda,
const Tensor4 pnd_field,
const String y_unit,
const Numeric mc_std_err,
const Index mc_max_time,
const Index mc_max_iter,
const Verbosity verbosity 
)

WORKSPACE METHOD: iyMC.

Interface to Monte Carlo part for iy_clearsky_agenda.

Basically an interface to MCGeneral for doing monochromatic pencil beam calculations. This functions allows Monte Carlo (MC) calculations for sets of frequencies and sensor pos/los in a single run. Sensor responses can be included in the standard manner (through yCalc).

MC unit is set as for MCGeneral. No antenna pattern is included.

This function does not apply the MC approach when it comes to sensor properties. These properties are not considered when tracking photons, which is done in MCGeneral (but then only for the antenna pattern).

The MC calculation errors are all assumed be uncorrelated and each have a normal distribution. These properties are of relevance when weighting the errors with the sensor repsonse matrix. The seed is reset for each call of MCGeneral to obtain uncorrelated errors.

MC control arguments (mc_std_err, mc_max_time, mc_max_iter and mc_z_field_is_1D) as for MCGeneral. The arguments are applied for each monochromatic pencil beam calculation individually.

iy_aux* is not set.

Author
Patrick Eriksson
Parameters
[in,out]wsWorkspace
[out]iyWS Output
[out]iy_errorWS Output
[out]iy_error_typeWS Output
[out]iy_auxWS Output
[out]diy_dxWS Output
[in]iy_agenda_call1WS Input
[in]iy_transmissionWS Input
[in]rte_posWS Input
[in]rte_losWS Input
[in]jacobian_doWS Input
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]z_fieldWS Input
[in]t_fieldWS Input
[in]vmr_fieldWS Input
[in]r_geoidWS Input
[in]z_surfaceWS Input
[in]cloudbox_onWS Input
[in]cloudbox_limitsWS Input
[in]cloudbox_checkedWS Input
[in]stokes_dimWS Input
[in]f_gridWS Input
[in]scat_data_rawWS Input
[in]iy_space_agendaWS Input
[in]surface_prop_agendaWS Input
[in]abs_scalar_gas_agendaWS Input
[in]opt_prop_gas_agendaWS Input
[in]pnd_fieldWS Input
[in]y_unitWS Input
[in]mc_std_errWS Input
[in]mc_max_timeWS Input
[in]mc_max_iterWS Input

Definition at line 1731 of file m_rte.cc.

References invrayjean(), joker, MCGeneral(), MCSetSeedFromTime(), ConstTensor3View::ncols(), ConstVectorView::nelem(), Matrix::resize(), scat_data_monoCalc(), and MCAntenna::set_pencil_beam().

Referenced by iyMC_g().

◆ y_unitApply()

void y_unitApply ( Vector y,
Vector y_error,
Matrix jacobian,
const Vector y_f,
const ArrayOfIndex y_pol,
const String y_unit,
const Verbosity verbosity 
)

WORKSPACE METHOD: y_unitApply.

Conversion to other spectral units.

Any conversion to brightness temperature is normally made inside yCalc*. This method makes it possible to also make this conversion after yCalc, but with restrictions for jacobian.

The method handles y, y_error and jacobian in parallel, where the two last variables are only considered if they are set. The input data must be in original radiance units. A completely stringent check of this can not be performed.

The method can not be used with jacobian quantities that are not obtained through radiative transfer calculations. One example on quantity that can not be handled is jacobianAddPolyfit.

If you are using this method, y_unit should be set to "1" when calling yCalc, and be changed before calling this method.

See further y_unit.

Author
Patrick Eriksson
Parameters
[out]yWS Output
[out]y_errorWS Output
[out]jacobianWS Output
[in]y_fWS Input
[in]y_polWS Input
[in]y_unitWS Input

Definition at line 2156 of file m_rte.cc.

References apply_y_unit(), apply_y_unit2(), joker, max, ConstMatrixView::ncols(), ConstVectorView::nelem(), ConstMatrixView::nrows(), and transpose().

Referenced by y_unitApply_g().

◆ yCalc()

void yCalc ( Workspace ws,
Vector y,
Vector y_f,
ArrayOfIndex y_pol,
Matrix y_pos,
Matrix y_los,
Vector y_error,
Vector y_aux,
Matrix jacobian,
const Index basics_checked,
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 cloudbox_checked,
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_response_f,
const ArrayOfIndex sensor_response_pol,
const Vector sensor_response_za,
const Vector sensor_response_aa,
const Agenda iy_clearsky_agenda,
const String y_unit,
const Agenda jacobian_agenda,
const Index jacobian_do,
const ArrayOfRetrievalQuantity jacobian_quantities,
const ArrayOfArrayOfIndex jacobian_indices,
const Verbosity verbosity 
)

WORKSPACE METHOD: yCalc.

Calculation of complete measurement vectors (y).

The method performs radiative transfer calculations from a sensor perspective. Radiative transfer calculations are performed for monochromatic pencil beams, following iy_clearsky_agenda and associated agendas. Obtained radiances are weighted together by sensor_response*, to include the characteristics of the sensor. The measurement vector obtained can contain anything from a single frequency value to a series of measurement scans (each consisting of a series of spectra), all depending on the settings. Spectra and jacobians are calculated in parallel.

The unit of output radiances and jacobians follow y_unit. The conversion is applied on monochromatic pencil beam values. That is, before any sensor responses have been included. The frequency, polarisation etc. for each measurement value is given by y_f, y_pol etc. No unit conversion is applied for y_aux*.

Author
Patrick Eriksson
Parameters
[in,out]wsWorkspace
[out]yWS Output
[out]y_fWS Output
[out]y_polWS Output
[out]y_posWS Output
[out]y_losWS Output
[out]y_errorWS Output
[out]y_auxWS Output
[out]jacobianWS Output
[in]basics_checkedWS 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]cloudbox_checkedWS 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_response_fWS Input
[in]sensor_response_polWS Input
[in]sensor_response_zaWS Input
[in]sensor_response_aaWS Input
[in]iy_clearsky_agendaWS Input
[in]y_unitWS Input
[in]jacobian_agendaWS Input
[in]jacobian_doWS Input
[in]jacobian_quantitiesWS Input
[in]jacobian_indicesWS Input

Definition at line 1856 of file m_rte.cc.

References chk_if_in_range(), chk_if_increasing(), FOR_ANALYTICAL_JACOBIANS_DO, get_rowindex_for_mblock(), Range::get_start(), iyb_calc(), jacobian_agendaExecute(), joker, max, min, mult(), ConstMatrixView::ncols(), Sparse::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), ConstMatrixView::nrows(), Sparse::nrows(), Vector::resize(), and Matrix::resize().

Referenced by yCalc_g().

◆ yCalc2()

void yCalc2 ( Workspace ws,
Vector y,
Vector y_f,
ArrayOfIndex y_pol,
Matrix y_pos,
Matrix y_los,
Vector y_error,
Vector y_aux,
Matrix jacobian,
const Index basics_checked,
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 cloudbox_checked,
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 Agenda sensor_response_agenda,
const Agenda iy_clearsky_agenda,
const String y_unit,
const Agenda jacobian_agenda,
const Index jacobian_do,
const ArrayOfRetrievalQuantity jacobian_quantities,
const ArrayOfArrayOfIndex jacobian_indices,
const Verbosity verbosity 
)

WORKSPACE METHOD: yCalc2.

Calculation of complete measurement vectors (y).

The method performs radiative transfer calculations from a sensor perspective. Radiative transfer calculations are performed for monochromatic pencil beams, following iy_clearsky_agenda and associated agendas. Obtained radiances are weighted together by sensor_response*, to include the characteristics of the sensor. The measurement vector obtained can contain anything from a single frequency value to a series of measurement scans (each consisting of a series of spectra), all depending on the settings. Spectra and jacobians are calculated in parallel.

The unit of output radiances and jacobians follow y_unit. The conversion is applied on monochromatic pencil beam values. That is, before any sensor responses have been included. The frequency, polarisation etc. for each measurement value is given by y_f, y_pol etc. No unit conversion is applied for y_aux*.

Author
Patrick Eriksson
Parameters
[in,out]wsWorkspace
[out]yWS Output
[out]y_fWS Output
[out]y_polWS Output
[out]y_posWS Output
[out]y_losWS Output
[out]y_errorWS Output
[out]y_auxWS Output
[out]jacobianWS Output
[in]basics_checkedWS 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]cloudbox_checkedWS 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_response_agendaWS Input
[in]iy_clearsky_agendaWS Input
[in]y_unitWS Input
[in]jacobian_agendaWS Input
[in]jacobian_doWS Input
[in]jacobian_quantitiesWS Input
[in]jacobian_indicesWS Input

Definition at line 2318 of file m_rte.cc.

References chk_if_in_range(), chk_if_increasing(), FOR_ANALYTICAL_JACOBIANS_DO, iyb_calc(), jacobian_agendaExecute(), joker, max, min, mult(), ConstMatrixView::ncols(), Sparse::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), ConstMatrixView::nrows(), Sparse::nrows(), Vector::resize(), Matrix::resize(), and sensor_response_agendaExecute().

Referenced by yCalc2_g().

Variable Documentation

◆ ABSSPECIES_MAINTAG

const String ABSSPECIES_MAINTAG
extern

◆ TEMPERATURE_MAINTAG

const String TEMPERATURE_MAINTAG
extern
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39