ARTS  2.2.66
rte.h File Reference

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

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

Go to the source code of this file.

Functions

void adjust_los (VectorView los, const Index &atmosphere_dim)
 adjust_los More...
 
void apply_iy_unit (MatrixView iy, const String &y_unit, ConstVectorView f_grid, const Numeric &n, const ArrayOfIndex &i_pol)
 apply_iy_unit More...
 
void apply_iy_unit2 (Tensor3View J, ConstMatrixView iy, const String &y_unit, ConstVectorView f_grid, const Numeric &n, const ArrayOfIndex &i_pol)
 apply_iy_unit2 More...
 
void bending_angle1d (Numeric &alpha, const Ppath &ppath)
 bending_angle1d More...
 
void defocusing_general (Workspace &ws, Numeric &dlf, const Agenda &ppath_step_agenda, const Index &atmosphere_dim, ConstVectorView p_grid, ConstVectorView lat_grid, ConstVectorView lon_grid, ConstTensor3View t_field, ConstTensor3View z_field, ConstTensor4View vmr_field, ConstVectorView f_grid, ConstVectorView refellipsoid, ConstMatrixView z_surface, const Ppath &ppath, const Numeric &ppath_lraytrace, const Numeric &dza, const Verbosity &verbosity)
 defocusing_general More...
 
void defocusing_sat2sat (Workspace &ws, Numeric &dlf, const Agenda &ppath_step_agenda, const Index &atmosphere_dim, ConstVectorView p_grid, ConstVectorView lat_grid, ConstVectorView lon_grid, ConstTensor3View t_field, ConstTensor3View z_field, ConstTensor4View vmr_field, ConstVectorView f_grid, ConstVectorView refellipsoid, ConstMatrixView z_surface, const Ppath &ppath, const Numeric &ppath_lraytrace, const Numeric &dza, const Verbosity &verbosity)
 defocusing_sat2sat More...
 
Numeric dotprod_with_los (ConstVectorView los, const Numeric &u, const Numeric &v, const Numeric &w, const Index &atmosphere_dim)
 dotprod_with_los More...
 
void emission_rtstep (Matrix &iy, const Index &stokes_dim, ConstVectorView bbar, ArrayOfIndex &extmat_case, ConstTensor3View t)
 emission_rtstep More...
 
void ext2trans (MatrixView trans_mat, Index &icase, ConstMatrixView ext_mat_av, const Numeric &l_step)
 
void get_iy (Workspace &ws, Matrix &iy, ConstTensor3View t_field, ConstTensor3View z_field, ConstTensor4View vmr_field, const Index &cloudbox_on, ConstVectorView f_grid, ConstVectorView rte_pos, ConstVectorView rte_los, ConstVectorView rte_pos2, const Agenda &iy_main_agenda)
 get_iy More...
 
void get_iy_of_background (Workspace &ws, Matrix &iy, ArrayOfTensor3 &diy_dx, ConstTensor3View iy_transmission, const Index &jacobian_do, const Ppath &ppath, ConstVectorView rte_pos2, const Index &atmosphere_dim, ConstTensor3View t_field, ConstTensor3View z_field, ConstTensor4View vmr_field, const Index &cloudbox_on, const Index &stokes_dim, ConstVectorView f_grid, const Agenda &iy_main_agenda, const Agenda &iy_space_agenda, const Agenda &iy_surface_agenda, const Agenda &iy_cloudbox_agenda, const Verbosity &verbosity)
 get_iy_of_background More...
 
void get_ppath_atmvars (Vector &ppath_p, Vector &ppath_t, Matrix &ppath_vmr, Matrix &ppath_wind, Matrix &ppath_mag, const Ppath &ppath, const Index &atmosphere_dim, ConstVectorView p_grid, ConstTensor3View t_field, ConstTensor4View vmr_field, ConstTensor3View wind_u_field, ConstTensor3View wind_v_field, ConstTensor3View wind_w_field, ConstTensor3View mag_u_field, ConstTensor3View mag_v_field, ConstTensor3View mag_w_field)
 get_ppath_atmvars More...
 
void get_ppath_abs (Workspace &ws, Tensor4 &ppath_abs, Tensor5 &abs_per_species, const Agenda &propmat_clearsky_agenda, const Ppath &ppath, ConstVectorView ppath_p, ConstVectorView ppath_t, ConstMatrixView ppath_vmr, ConstMatrixView ppath_f, ConstMatrixView ppath_mag, ConstVectorView f_grid, const Index &stokes_dim, const ArrayOfIndex &ispecies)
 get_ppath_abs More...
 
void get_ppath_blackrad (Workspace &ws, Matrix &ppath_blackrad, const Agenda &blackbody_radiation_agenda, const Ppath &ppath, ConstVectorView ppath_t, ConstMatrixView ppath_f)
 get_ppath_blackrad More...
 
void get_ppath_ext (ArrayOfIndex &clear2cloudbox, Tensor3 &pnd_abs_vec, Tensor4 &pnd_ext_mat, Array< ArrayOfSingleScatteringData > &scat_data, Matrix &ppath_pnd, const Ppath &ppath, ConstVectorView ppath_t, const Index &stokes_dim, ConstMatrixView ppath_f, const Index &atmosphere_dim, const ArrayOfIndex &cloudbox_limits, const Tensor4 &pnd_field, const Index &use_mean_scat_data, const ArrayOfSingleScatteringData &scat_data_array, const Verbosity &verbosity)
 get_ppath_ext More...
 
void get_ppath_f (Matrix &ppath_f, const Ppath &ppath, ConstVectorView f_grid, const Index &atmosphere_dim, const Numeric &rte_alonglos_v, ConstMatrixView ppath_wind)
 get_ppath_f More...
 
void get_ppath_trans (Tensor4 &trans_partial, ArrayOfArrayOfIndex &extmat_case, Tensor4 &trans_cumulat, Vector &scalar_tau, const Ppath &ppath, ConstTensor4View &ppath_abs, ConstVectorView f_grid, const Index &stokes_dim)
 get_ppath_trans More...
 
void get_ppath_trans2 (Tensor4 &trans_partial, ArrayOfArrayOfIndex &extmat_case, Tensor4 &trans_cumulat, Vector &scalar_tau, const Ppath &ppath, ConstTensor4View &ppath_abs, ConstVectorView f_grid, const Index &stokes_dim, const ArrayOfIndex &clear2cloudbox, ConstTensor4View pnd_ext_mat)
 get_ppath_trans2 More...
 
Range get_rowindex_for_mblock (const Sparse &sensor_response, const Index &imblock)
 get_rowindex_for_mblock More...
 
void iy_transmission_mult (Tensor3 &iy_trans_total, ConstTensor3View iy_trans_old, ConstTensor3View iy_trans_new)
 iy_transmission_mult More...
 
void iyb_calc (Workspace &ws, Vector &iyb, ArrayOfVector &iyb_aux, ArrayOfMatrix &diyb_dx, const Index &imblock, const Index &atmosphere_dim, 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, ConstMatrixView transmitter_pos, ConstVectorView mblock_za_grid, ConstVectorView mblock_aa_grid, const Index &antenna_dim, const Agenda &iy_main_agenda, const Index &j_analytical_do, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfArrayOfIndex &jacobian_indices, const ArrayOfString &iy_aux_vars, const Verbosity &verbosity)
 iyb_calc More...
 
void mirror_los (Vector &los_mirrored, ConstVectorView los, const Index &atmosphere_dim)
 mirror_los More...
 
void pos2true_latlon (Numeric &lat, Numeric &lon, const Index &atmosphere_dim, ConstVectorView lat_grid, ConstVectorView lat_true, ConstVectorView lon_true, ConstVectorView pos)
 pos2true_latlon More...
 
void surface_calc (Matrix &iy, ConstTensor3View I, ConstMatrixView surface_los, ConstTensor4View surface_rmatrix, ConstMatrixView surface_emission)
 surface_calc 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

◆ adjust_los()

void adjust_los ( VectorView  los,
const Index atmosphere_dim 
)

adjust_los

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
losIn/Out: LOS vector, defined as e.g. rte_los.
atmosphere_dimAs the WSV.
Author
Patrick Eriksson
Date
2012-04-11

Definition at line 81 of file rte.cc.

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

Referenced by defocusing_general_sub(), defocusing_sat2sat(), iyb_calc_za_loop_body(), and raytrace_3d_linear_basic().

◆ apply_iy_unit()

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

apply_iy_unit

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
iyIn/Out: Tensor3 with data to be converted, where column dimension corresponds to Stokes dimensionality and row dimension corresponds to frequency.
y_unitAs the WSV.
f_gridAs the WSV.
nRefractive index at the observation position.
i_polPolarisation indexes. See documentation of y_pol.
Author
Patrick Eriksson
Date
2010-04-07

Definition at line 127 of file rte.cc.

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

Referenced by fos(), iyApplyUnit(), iyEmissionStandard(), and yApplyUnit().

◆ apply_iy_unit2()

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

apply_iy_unit2

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
JIn/Out: Tensor3 with data to be converted, where column dimension corresponds to Stokes dimensionality and row dimension corresponds to frequency.
iyAssociated radiance data.
y_unitAs the WSV.
f_gridAs the WSV.
nRefractive index at the observation position.
i_polPolarisation indexes. See documentation of y_pol.
Author
Patrick Eriksson
Date
2010-04-10

Definition at line 232 of file rte.cc.

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

Referenced by iyEmissionStandard(), and yApplyUnit().

◆ bending_angle1d()

void bending_angle1d ( Numeric alpha,
const Ppath ppath 
)

bending_angle1d

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.

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

Definition at line 353 of file rte.cc.

References abs, Ppath::dim, Ppath::end_los, Ppath::end_pos, sphdist(), Ppath::start_los, and Ppath::start_pos.

Referenced by defocusing_sat2sat(), and iyRadioLink().

◆ defocusing_general()

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

defocusing_general

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.

Returns
dlf Defocusing loss factor (1 for no loss)
Parameters
ppath_step_agendaAs the WSV with the same name.
atmosphere_dimAs the WSV with the same name.
p_gridAs the WSV with the same name.
lat_gridAs the WSV with the same name.
lon_gridAs the WSV with the same name.
t_fieldAs the WSV with the same name.
z_fieldAs the WSV with the same name.
vmr_fieldAs the WSV with the same name.
f_gridAs the WSV with the same name.
refellipsoidAs the WSV with the same name.
z_surfaceAs the WSV with the same name.
ppathAs the WSV with the same name.
ppath_lraytraceAs the WSV with the same name.
dzaSize of angular shift to apply.
verbosityAs the WSV with the same name.
Author
Patrick Eriksson
Date
2012-04-11

Definition at line 530 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.

Referenced by iyRadioLink().

◆ defocusing_sat2sat()

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

defocusing_sat2sat

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.

Returns
dlf Defocusing loss factor (1 for no loss)
Parameters
ppath_step_agendaAs the WSV with the same name.
atmosphere_dimAs the WSV with the same name.
p_gridAs the WSV with the same name.
lat_gridAs the WSV with the same name.
lon_gridAs the WSV with the same name.
t_fieldAs the WSV with the same name.
z_fieldAs the WSV with the same name.
vmr_fieldAs the WSV with the same name.
f_gridAs the WSV with the same name.
refellipsoidAs the WSV with the same name.
z_surfaceAs the WSV with the same name.
ppathAs the WSV with the same name.
ppath_lraytraceAs the WSV with the same name.
dzaSize of angular shift to apply.
verbosityAs the WSV with the same name.
Author
Patrick Eriksson
Date
2012-04-11

Definition at line 663 of file rte.cc.

References adjust_los(), 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.

Referenced by iyRadioLink().

◆ dotprod_with_los()

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

dotprod_with_los

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.

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

Definition at line 776 of file rte.cc.

References DEG2RAD, mirror_los(), and w().

Referenced by get_ppath_f(), and propmat_clearskyAddFaraday().

◆ emission_rtstep()

void emission_rtstep ( Matrix iy,
const Index stokes_dim,
ConstVectorView  bbar,
ArrayOfIndex extmat_case,
ConstTensor3View  t 
)

emission_rtstep

Radiative transfer over a step, with emission.

In scalar notation, this is done: iy = iy*t + bbar*(1-t)

The calculations are done differently for extmat_case 1 and 2/3.

Frequency is throughout leftmost dimension.

Parameters
iyIn/out: Radiance values
stokes_dimIn: As the WSV.
bbarIn: Average of emission source function
extmat_caseIn: As returned by get_ppath_trans, but just for the frequency of cocncern.
tIn: Transmission matrix of the step.
Author
Patrick Eriksson
Date
2013-04-19

Definition at line 822 of file rte.cc.

References joker, mult(), ConstTensor3View::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), ConstTensor3View::npages(), and ConstTensor3View::nrows().

Referenced by fos(), and iyEmissionStandard().

◆ ext2trans()

void ext2trans ( MatrixView  trans_mat,
Index icase,
ConstMatrixView  ext_mat,
const Numeric lstep 
)

Converts an extinction matrix to a transmission matrix

The function performs the calculations differently depending on the conditions, to improve the speed. There are three cases:

  1. Scalar RT and/or the matrix ext_mat_av is diagonal.
  2. Special expression for "p30" case.
  3. The total general case.

If the structure of ext_mat is known, icase can be set to "case index" (1, 2 or 3) and some time is saved. This includes that no asserts are performed on ext_mat.

Otherwise, icase must be set to 0. ext_mat is then analysed and icase is set by the function and is returned.

trans_mat must be sized before calling the function.

Parameters
trans_matInput/Output: Transmission matrix of slab.
icaseInput/Output: Index giving ext_mat case.
ext_matInput: Averaged extinction matrix.
lstepInput: The length of the RTE step.
Author
Patrick Eriksson (based on earlier version started by Claudia)
Date
2013-05-17

Definition at line 903 of file rte.cc.

References is_singular(), matrix_exp(), ConstMatrixView::ncols(), ConstMatrixView::nrows(), and q.

Referenced by fos(), get_ppath_trans(), get_ppath_trans2(), iyEmissionStandard(), iyTransmissionStandard(), main(), mcPathTraceGeneral(), and rte_step_doit().

◆ get_iy()

void get_iy ( Workspace ws,
Matrix iy,
ConstTensor3View  t_field,
ConstTensor3View  z_field,
ConstTensor4View  vmr_field,
const Index cloudbox_on,
ConstVectorView  f_grid,
ConstVectorView  rte_pos,
ConstVectorView  rte_los,
ConstVectorView  rte_pos2,
const Agenda iy_main_agenda 
)

get_iy

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
wsOut: The workspace
iyOut: As the WSV.
t_fieldAs the WSV.
z_fieldAs the WSV.
vmr_fieldAs the WSV.
cloudbox_onAs the WSV.
rte_posAs the WSV.
rte_losAs the WSV.
iy_main_agendaAs the WSV.
Author
Patrick Eriksson
Date
2012-08-08

Definition at line 1046 of file rte.cc.

References iy_main_agendaExecute().

Referenced by CloudboxGetIncoming(), CloudboxGetIncoming1DAtm(), and CloudboxGetIncoming2().

◆ get_iy_of_background()

void get_iy_of_background ( Workspace ws,
Matrix iy,
ArrayOfTensor3 diy_dx,
ConstTensor3View  iy_transmission,
const Index jacobian_do,
const Ppath ppath,
ConstVectorView  rte_pos2,
const Index atmosphere_dim,
ConstTensor3View  t_field,
ConstTensor3View  z_field,
ConstTensor4View  vmr_field,
const Index cloudbox_on,
const Index stokes_dim,
ConstVectorView  f_grid,
const Agenda iy_main_agenda,
const Agenda iy_space_agenda,
const Agenda iy_surface_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_main_agenda.

Parameters
wsOut: The workspace
iyOut: As the WSV.
diy_dxOut: As the WSV.
iy_transmissionAs the WSV.
jacobian_doAs the WSV.
ppathAs the WSV.
atmosphere_dimAs 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_main_agendaAs the WSV.
iy_space_agendaAs the WSV.
iy_surface_agendaAs the WSV.
iy_cloudbox_agendaAs the WSV.
Author
Patrick Eriksson
Date
2009-10-08

Definition at line 1106 of file rte.cc.

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

Referenced by fos(), and iyEmissionStandard().

◆ get_ppath_abs()

void get_ppath_abs ( Workspace ws,
Tensor4 ppath_abs,
Tensor5 abs_per_species,
const Agenda propmat_clearsky_agenda,
const Ppath ppath,
ConstVectorView  ppath_p,
ConstVectorView  ppath_t,
ConstMatrixView  ppath_vmr,
ConstMatrixView  ppath_f,
ConstMatrixView  ppath_mag,
ConstVectorView  f_grid,
const Index stokes_dim,
const ArrayOfIndex ispecies 
)

get_ppath_abs

Determines the "clearsky" absorption along a propagation path.

ppath_abs* returns the summed absorption and has dimensions [ frequency, stokes, stokes, ppath point ]

abs_per_species* can hold absorption for individual species. The species to include ar selected by ispecies. For example, to store first and third species in abs_per_species, set ispecies to [0][2].

The output variables are sized inside the function. The dimension order is [ absorption species, frequency, stokes, stokes, ppath point ]

Parameters
wsOut: The workspace
ppath_absOut: Summed absorption at each ppath point
abs_per_speciesOut: Absorption for "ispecies"
propmat_clearsky_agendaAs the WSV.
ppathAs the WSV.
ppath_pPressure for each ppath point.
ppath_tTemperature for each ppath point.
ppath_vmrVMR values for each ppath point.
ppath_fSee get_ppath_f.
ppath_magSee get_ppath_atmvars.
f_gridAs the WSV.
stokes_dimAs the WSV.
ispeciesIndex of species to store in abs_per_species
Author
Patrick Eriksson
Date
2012-08-15

Definition at line 1351 of file rte.cc.

References DEBUG_ONLY, joker, Ppath::los, max, ConstTensor4View::nbooks(), ConstTensor4View::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), Ppath::np, ConstTensor4View::npages(), ConstMatrixView::nrows(), ConstTensor4View::nrows(), propmat_clearsky_agendaExecute(), Tensor4::resize(), and Tensor5::resize().

Referenced by fos(), iyCloudRadar(), iyEmissionStandard(), iyRadioLink(), and iyTransmissionStandard().

◆ get_ppath_atmvars()

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

get_ppath_atmvars

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
ppath_pOut: Pressure for each ppath point.
ppath_tOut: Temperature for each ppath point.
ppath_vmrOut: VMR values for each ppath point.
ppath_windOut: Wind vector for each ppath point.
ppath_magOut: Mag. field vector for each ppath point.
ppathAs the WSV.
atmosphere_dimAs the WSV.
p_gridAs the WSV.
lat_gridAs the WSV.
lon_gridAs the WSV.
t_fieldAs the WSV.
vmr_fieldAs the WSV.
wind_u_fieldAs the WSV.
wind_v_fieldAs the WSV.
wind_w_fieldAs the WSV.
mag_u_fieldAs the WSV.
mag_v_fieldAs the WSV.
mag_w_fieldAs the WSV.
Author
Patrick Eriksson
Date
2009-10-05

Definition at line 1233 of file rte.cc.

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

Referenced by fos(), iyCloudRadar(), iyEmissionStandard(), iyRadioLink(), and iyTransmissionStandard().

◆ get_ppath_blackrad()

void get_ppath_blackrad ( Workspace ws,
Matrix ppath_blackrad,
const Agenda blackbody_radiation_agenda,
const Ppath ppath,
ConstVectorView  ppath_t,
ConstMatrixView  ppath_f 
)

get_ppath_blackrad

Determines blackbody radiation along the propagation path.

The output variable is sized inside the function. The dimension order is [ frequency, ppath point ]

Parameters
wsOut: The workspace
ppath_blackradOut: Emission source term at each ppath point
blackbody_radiation_agendaAs the WSV.
ppath_tTemperature for each ppath point.
ppath_fSee get_ppath_f.
Author
Patrick Eriksson
Date
2012-08-15

Definition at line 1487 of file rte.cc.

References blackbody_radiation_agendaExecute(), joker, Ppath::np, ConstMatrixView::nrows(), and Matrix::resize().

Referenced by fos(), and iyEmissionStandard().

◆ get_ppath_ext()

void get_ppath_ext ( ArrayOfIndex clear2cloudbox,
Tensor3 pnd_abs_vec,
Tensor4 pnd_ext_mat,
Array< ArrayOfSingleScatteringData > &  scat_data,
Matrix ppath_pnd,
const Ppath ppath,
ConstVectorView  ppath_t,
const Index stokes_dim,
ConstMatrixView  ppath_f,
const Index atmosphere_dim,
const ArrayOfIndex cloudbox_limits,
const Tensor4 pnd_field,
const Index use_mean_scat_data,
const ArrayOfSingleScatteringData scat_data_array,
const Verbosity verbosity 
)

get_ppath_ext

Determines the particle properties along a propagation path.

Note that the extinction for all particle types is summed. And that all frequencies are filled for pnd_abs_vec and pnd_ext_mat even if use_mean_scat_data is true (but data equal for all frequencies).

Parameters
wsOut: The workspace
clear2cloudboxOut: Mapping of index. See code for details.
pnd_abs_vecOut: Absorption vectors for particles (defined only where particles are found)
pnd_ext_vecOut: Extinction matrices for particles (defined only where particles are found)
scat_dataOut: Extracted scattering data. Length of array affected by use_mean_scat_data.
ppath_pndOut. The particle number density for each point (also outside cloudbox).
ppathAs the WSV.
ppath_tTemperature for each ppath point.
stokes_dimAs the WSV.
f_gridAs the WSV.
cloubox_limitsAs the WSV.
pnd_fieldAs the WSV.
use_mean_scat_dataAs the WSV.
scat_data_arrayAs the WSV.
Author
Patrick Eriksson
Date
2012-08-23

Definition at line 1546 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, Ppath::los, max, mean(), mirror_los(), ConstTensor4View::nbooks(), Ppath::np, ConstMatrixView::nrows(), opt_propCalc(), Tensor4::resize(), Tensor3::resize(), Matrix::resize(), and scat_data_array_monoCalc().

Referenced by fos(), iyCloudRadar(), iyRadioLink(), and iyTransmissionStandard().

◆ get_ppath_f()

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

get_ppath_f

Determines the Doppler shifted frequencies along the propagation path.

ppath_doppler [ nf + np ]

Parameters
ppath_fOut: Doppler shifted f_grid
ppathPropagation path.
f_gridOriginal f_grid.
atmosphere_dimAs the WSV.
rte_alonglos_vAs the WSV.
ppath_windSee get_ppath_atmvars.
Author
Patrick Eriksson
Date
2013-02-21

Definition at line 1690 of file rte.cc.

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

Referenced by fos(), iyCloudRadar(), iyEmissionStandard(), iyRadioLink(), and iyTransmissionStandard().

◆ get_ppath_trans()

void get_ppath_trans ( Tensor4 trans_partial,
ArrayOfArrayOfIndex extmat_case,
Tensor4 trans_cumulat,
Vector scalar_tau,
const Ppath ppath,
ConstTensor4View ppath_abs,
ConstVectorView  f_grid,
const Index stokes_dim 
)

get_ppath_trans

Determines the transmission in different ways for a clear-sky RT integration.

The argument trans_partial holds the transmission for each propagation path step. It has np-1 columns.

The structure of average extinction matrix for each step is returned in extmat_case. The dimension of this variable is [np-1,nf]. For the coding see ext2trans.

The argument trans_cumalat holds the transmission between the path point with index 0 and each propagation path point. The transmission is valid for the photon travelling direction. It has np columns.

The output variables are sized inside the function. The dimension order is [ frequency, stokes, stokes, ppath point ]

The scalar optical thickness is calculated in parallel.

Parameters
trans_partialOut: Transmission for each path step.
extmat_caseOut: Corresponds to icase of ext2trans.
trans_cumulatOut: Transmission to each path point.
scalar_tauOut: Total (scalar) optical thickness of path
ppathAs the WSV.
ppath_absSee get_ppath_abs.
f_gridAs the WSV.
stokes_dimAs the WSV.
Author
Patrick Eriksson
Date
2012-08-15

Definition at line 1770 of file rte.cc.

References ext2trans(), id_mat(), joker, Ppath::lstep, mult(), ConstVectorView::nelem(), Ppath::np, Tensor4::resize(), and Vector::resize().

Referenced by fos(), iyCloudRadar(), iyEmissionStandard(), iyRadioLink(), and iyTransmissionStandard().

◆ get_ppath_trans2()

void get_ppath_trans2 ( Tensor4 trans_partial,
ArrayOfArrayOfIndex extmat_case,
Tensor4 trans_cumulat,
Vector scalar_tau,
const Ppath ppath,
ConstTensor4View ppath_abs,
ConstVectorView  f_grid,
const Index stokes_dim,
const ArrayOfIndex clear2cloudbox,
ConstTensor4View  pnd_ext_mat 
)

get_ppath_trans2

Determines the transmission in different ways for a cloudy RT integration.

This function works as get_ppath_trans, but considers also particle extinction. See get_ppath_trans for format of output data.

Parameters
trans_partialOut: Transmission for each path step.
trans_cumulatOut: Transmission to each path point.
scalar_tauOut: Total (scalar) optical thickness of path
ppathAs the WSV.
ppath_absSee get_ppath_abs.
f_gridAs the WSV.
stokes_dimAs the WSV.
clear2cloudboxSee get_ppath_ext.
pnd_ext_matSee get_ppath_ext.
Author
Patrick Eriksson
Date
2012-08-23

Definition at line 1856 of file rte.cc.

References ext2trans(), id_mat(), joker, Ppath::lstep, mult(), ConstVectorView::nelem(), Ppath::np, Tensor4::resize(), and Vector::resize().

Referenced by fos(), iyCloudRadar(), iyRadioLink(), and iyTransmissionStandard().

◆ get_rowindex_for_mblock()

Range get_rowindex_for_mblock ( const Sparse sensor_response,
const Index mblock_index 
)

get_rowindex_for_mblock

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

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

Definition at line 1960 of file rte.cc.

References Sparse::nrows().

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

◆ iy_transmission_mult()

void iy_transmission_mult ( Tensor3 iy_trans_total,
ConstTensor3View  iy_trans_old,
ConstTensor3View  iy_trans_new 
)

iy_transmission_mult

Multiplicates iy_transmission with (vector) transmissions.

That is, a multiplication of iy_transmission 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_transmission. That is, the operation can be written as:

Ttotal = Told * Tnew

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

iy_trans_new* is sized by the function.

Parameters
iy_trans_totalOut: Updated version of iy_transmission
iy_trans_oldA variable matching *iy_transmission.
iy_trans_newA variable matching *iy_transmission.
Author
Patrick Eriksson
Date
2009-10-06

Definition at line 2309 of file rte.cc.

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

Referenced by fos(), iyEmissionStandard(), and iySurfaceRtpropAgenda().

◆ iyb_calc()

void iyb_calc ( Workspace ws,
Vector iyb,
ArrayOfVector iyb_aux,
ArrayOfMatrix diyb_dx,
const Index mblock_index,
const Index atmosphere_dim,
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,
ConstMatrixView  transmitter_pos,
ConstVectorView  mblock_za_grid,
ConstVectorView  mblock_aa_grid,
const Index antenna_dim,
const Agenda iy_main_agenda,
const Index j_analytical_do,
const ArrayOfRetrievalQuantity jacobian_quantities,
const ArrayOfArrayOfIndex jacobian_indices,
const ArrayOfString iy_aux_vars,
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 2101 of file rte.cc.

References arts_omp_get_max_threads(), CREATE_OUT3, FOR_ANALYTICAL_JACOBIANS_DO, iyb_calc_za_loop_body(), min, Array< base >::nelem(), ConstVectorView::nelem(), q, and Vector::resize().

Referenced by jacobianCalcAbsSpeciesPerturbations(), jacobianCalcPointingZaRecalc(), jacobianCalcTemperaturePerturbations(), and yCalc_mblock_loop_body().

◆ mirror_los()

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

mirror_los

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
los_mirroredOut: The line-of-sight for reversed direction.
losA line-of-sight
atmosphere_dimAs the WSV.
Author
Patrick Eriksson
Date
2011-07-15

Definition at line 2389 of file rte.cc.

References Vector::resize().

Referenced by defocusing_general(), dotprod_with_los(), fos(), get_ppath_ext(), iyCloudRadar(), propmat_clearskyAddParticles(), and propmat_clearskyAddZeeman().

◆ pos2true_latlon()

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

pos2true_latlon

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
latOut: True latitude.
lonOut: True longitude.
atmosphere_dimAs the WSV.
lat_gridAs the WSV.
lat_trueAs the WSV.
lon_trueAs the WSV.
posA position, as defined for rt calculations.
Author
Patrick Eriksson
Date
2011-07-15

Definition at line 2438 of file rte.cc.

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

Referenced by surface_complex_refr_indexFromGriddedField5(), surface_reflectivityFromGriddedField6(), surface_scalar_reflectivityFromGriddedField4(), and z_fieldFromHSE().

◆ surface_calc()

void surface_calc ( Matrix iy,
ConstTensor3View  I,
ConstMatrixView  surface_los,
ConstTensor4View  surface_rmatrix,
ConstMatrixView  surface_emission 
)

surface_calc

Weights together downwelling radiation and surface emission.

iy* must have correct size when function is called.

Parameters
iyIn/Out: Radiation matrix, amtching the WSV with the same name.
IInput: Downwelling radiation, with dimensions matching: (surface_los, f_grid, stokes_dim)
surface_losInput: As the WSV with the same name.
surface_rmatrixInput: As the WSV with the same name.
surface_emissionInput: As the WSV with the same name.
Author
Patrick Eriksson
Date
2005-04-07

Definition at line 2496 of file rte.cc.

References joker, mult(), ConstTensor3View::ncols(), ConstMatrixView::nrows(), and ConstTensor3View::nrows().

Referenced by iySurfaceRtpropAgenda().