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 "physics_funcs.h"
#include "ppath.h"
#include "rte.h"
#include "special_interp.h"

Include dependency graph for m_rte.cc:

Go to the source code of this file.

Functions

void RteCalc (Workspace &ws, Vector &y, Vector &y_f, ArrayOfIndex &y_pol, Matrix &y_pos, Matrix &y_los, Matrix &jacobian, const Agenda &ppath_step_agenda, const Agenda &rte_agenda, const Agenda &iy_space_agenda, const Agenda &surface_prop_agenda, const Agenda &iy_cloudbox_agenda, 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 ArrayOfArrayOfSpeciesTag &abs_species, const Matrix &r_geoid, const Matrix &z_surface, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, 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 Matrix &sensor_pos, const Matrix &sensor_los, const Vector &f_grid, const Index &stokes_dim, const Index &antenna_dim, const Vector &mblock_za_grid, const Vector &mblock_aa_grid, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfArrayOfIndex &jacobian_indices, const String &y_unit, const String &jacobian_unit)
 WORKSPACE METHOD: RteCalc.
void RteCalcNoJacobian (Workspace &ws, Vector &y, Vector &y_f, ArrayOfIndex &y_pol, Matrix &y_pos, Matrix &y_los, const Agenda &ppath_step_agenda, const Agenda &rte_agenda, const Agenda &iy_space_agenda, const Agenda &surface_prop_agenda, const Agenda &iy_cloudbox_agenda, 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 Sparse &sensor_response, const Vector &sensor_response_f, const ArrayOfIndex &sensor_response_pol, const Vector &sensor_response_za, const Vector &sensor_response_aa, const Matrix &sensor_pos, const Matrix &sensor_los, const Vector &f_grid, const Index &stokes_dim, const Index &antenna_dim, const Vector &mblock_za_grid, const Vector &mblock_aa_grid, const String &y_unit)
 WORKSPACE METHOD: RteCalcNoJacobian.
void RteCalcMC (Workspace &ws, Vector &y, Vector &y_f, ArrayOfIndex &y_pol, Matrix &y_pos, Matrix &y_los, Vector &mc_error, const Agenda &iy_space_agenda, const Agenda &surface_prop_agenda, const Agenda &opt_prop_gas_agenda, const Agenda &abs_scalar_gas_agenda, 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 Tensor4 &pnd_field, const ArrayOfSingleScatteringData &scat_data_raw, 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 Matrix &sensor_pos, const Matrix &sensor_los, const Vector &f_grid, const Index &stokes_dim, const Index &antenna_dim, const Vector &mblock_za_grid, const Vector &mblock_aa_grid, const String &y_unit, const Numeric &mc_std_err, const Index &mc_max_time, const Index &mc_max_iter, const Index &mc_z_field_is_1D)
 WORKSPACE METHOD: RteCalcMC.
void RteStd (Workspace &ws, Matrix &iy, ArrayOfTensor4 &diy_dvmr, ArrayOfTensor4 &diy_dt, const Ppath &ppath, const ArrayOfPpath &ppath_array, const Index &ppath_array_index, const Vector &f_grid, const Index &stokes_dim, const Agenda &emission_agenda, const Agenda &abs_scalar_gas_agenda, const ArrayOfIndex &rte_do_gas_jacs, const Index &rte_do_t_jacs)
 WORKSPACE METHOD: RteStd.
void RteStdWithTransmissions (Workspace &ws, Matrix &iy, Tensor4 &ppath_transmissions, ArrayOfTensor4 &diy_dvmr, ArrayOfTensor4 &diy_dt, const Ppath &ppath, const ArrayOfPpath &ppath_array, const Index &ppath_array_index, const Vector &f_grid, const Index &stokes_dim, const Agenda &emission_agenda, const Agenda &abs_scalar_gas_agenda, const ArrayOfIndex &rte_do_gas_jacs, const Index &rte_do_t_jacs)
 WORKSPACE METHOD: RteStdWithTransmissions.
void yUnit (Vector &y, const String &y_unit, const Vector &y_f)
 WORKSPACE METHOD: yUnit.

Variables

const String ABSSPECIES_MAINTAG
const String TEMPERATURE_MAINTAG


Detailed Description

Workspace functions for solving clear sky radiative transfer.

Author:
Patrick Eriksson <Patrick.Eriksson@rss.chalmers.se>
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.


Function Documentation

void RteCalc ( Workspace ws,
Vector y,
Vector y_f,
ArrayOfIndex y_pol,
Matrix y_pos,
Matrix y_los,
Matrix jacobian,
const Agenda ppath_step_agenda,
const Agenda rte_agenda,
const Agenda iy_space_agenda,
const Agenda surface_prop_agenda,
const Agenda iy_cloudbox_agenda,
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 ArrayOfArrayOfSpeciesTag abs_species,
const Matrix r_geoid,
const Matrix z_surface,
const Index cloudbox_on,
const ArrayOfIndex cloudbox_limits,
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 Matrix sensor_pos,
const Matrix sensor_los,
const Vector f_grid,
const Index stokes_dim,
const Index antenna_dim,
const Vector mblock_za_grid,
const Vector mblock_aa_grid,
const ArrayOfRetrievalQuantity jacobian_quantities,
const ArrayOfArrayOfIndex jacobian_indices,
const String y_unit,
const String jacobian_unit 
)

WORKSPACE METHOD: RteCalc.

Main function for calculation of spectra.

The overall scheme to solve the radiative transfer equation (RTE) is fixed and found in this method. In short, the method calculates monochromatic spectra for all pencil beam directions and applies the sensor response on obtained radiances.

The first step is to calculate the propagation path through the atmosphere for the considered viewing direction. The next step is to determine the spectrum at the starting point of the propagation path. The start point of the propagation path can be found at the top of the atmosphere, the surface, or at the boundary or inside the cloud box. To determine the start spectrum can involve a recursive call of RteCalc (for example to calculate the radiation reflected by the surface). After this, the vector radiative transfer equation is solved to the end point of the propagation path. Finally, the response of the sensor is applied.

Analytical jacobians for gas species and temperature can be calcultaed along with the spectrum.

See further the user guide.

Author:
Patrick Eriksson
Parameters:
[in,out] ws Workspace
[out] y WS Output
[out] y_f WS Output
[out] y_pol WS Output
[out] y_pos WS Output
[out] y_los WS Output
[out] jacobian WS Output
[in] ppath_step_agenda WS Input
[in] rte_agenda WS Input
[in] iy_space_agenda WS Input
[in] surface_prop_agenda WS Input
[in] iy_cloudbox_agenda WS Input
[in] atmosphere_dim WS Input
[in] p_grid WS Input
[in] lat_grid WS Input
[in] lon_grid WS Input
[in] z_field WS Input
[in] t_field WS Input
[in] vmr_field WS Input
[in] abs_species WS Input
[in] r_geoid WS Input
[in] z_surface WS Input
[in] cloudbox_on WS Input
[in] cloudbox_limits WS Input
[in] sensor_response WS Input
[in] sensor_response_f WS Input
[in] sensor_response_pol WS Input
[in] sensor_response_za WS Input
[in] sensor_response_aa WS Input
[in] sensor_pos WS Input
[in] sensor_los WS Input
[in] f_grid WS Input
[in] stokes_dim WS Input
[in] antenna_dim WS Input
[in] mblock_za_grid WS Input
[in] mblock_aa_grid WS Input
[in] jacobian_quantities WS Input
[in] jacobian_indices WS Input
[in] y_unit WS Input
[in] jacobian_unit WS Input

Definition at line 71 of file m_rte.cc.

References apply_y_unit(), array_species_tag_from_string(), chk_contains(), chk_not_empty(), exit_or_rethrow(), iy_calc(), jacobian_from_path_to_rgrids(), joker, mult(), ConstMatrixView::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), number_density(), Matrix::resize(), Vector::resize(), and rtecalc_check_input().

Referenced by RteCalc_g(), and RteCalcNoJacobian().

void RteCalcMC ( Workspace ws,
Vector y,
Vector y_f,
ArrayOfIndex y_pol,
Matrix y_pos,
Matrix y_los,
Vector mc_error,
const Agenda iy_space_agenda,
const Agenda surface_prop_agenda,
const Agenda opt_prop_gas_agenda,
const Agenda abs_scalar_gas_agenda,
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 Tensor4 pnd_field,
const ArrayOfSingleScatteringData scat_data_raw,
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 Matrix sensor_pos,
const Matrix sensor_los,
const Vector f_grid,
const Index stokes_dim,
const Index antenna_dim,
const Vector mblock_za_grid,
const Vector mblock_aa_grid,
const String y_unit,
const Numeric mc_std_err,
const Index mc_max_time,
const Index mc_max_iter,
const Index mc_z_field_is_1D 
)

WORKSPACE METHOD: RteCalcMC.

As *RteCalc* but using *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 (as in *RteCalc*).

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

Author:
Patrick Eriksson
Parameters:
[in,out] ws Workspace
[out] y WS Output
[out] y_f WS Output
[out] y_pol WS Output
[out] y_pos WS Output
[out] y_los WS Output
[out] mc_error WS Output
[in] iy_space_agenda WS Input
[in] surface_prop_agenda WS Input
[in] opt_prop_gas_agenda WS Input
[in] abs_scalar_gas_agenda WS Input
[in] atmosphere_dim WS Input
[in] p_grid WS Input
[in] lat_grid WS Input
[in] lon_grid WS Input
[in] z_field WS Input
[in] t_field WS Input
[in] vmr_field WS Input
[in] r_geoid WS Input
[in] z_surface WS Input
[in] cloudbox_on WS Input
[in] cloudbox_limits WS Input
[in] pnd_field WS Input
[in] scat_data_raw WS Input
[in] sensor_response WS Input
[in] sensor_response_f WS Input
[in] sensor_response_pol WS Input
[in] sensor_response_za WS Input
[in] sensor_response_aa WS Input
[in] sensor_pos WS Input
[in] sensor_los WS Input
[in] f_grid WS Input
[in] stokes_dim WS Input
[in] antenna_dim WS Input
[in] mblock_za_grid WS Input
[in] mblock_aa_grid WS Input
[in] y_unit WS Input
[in] mc_std_err WS Input
[in] mc_max_time WS Input
[in] mc_max_iter WS Input
[in] mc_z_field_is_1D WS Input

Definition at line 456 of file m_rte.cc.

References exit_or_rethrow(), joker, MCGeneral(), MCSetSeedFromTime(), mult(), Sparse::ncols(), ConstMatrixView::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), Matrix::resize(), Vector::resize(), rtecalc_check_input(), scat_data_monoCalc(), MCAntenna::set_pencil_beam(), and transform().

Referenced by RteCalcMC_g().

void RteCalcNoJacobian ( Workspace ws,
Vector y,
Vector y_f,
ArrayOfIndex y_pol,
Matrix y_pos,
Matrix y_los,
const Agenda ppath_step_agenda,
const Agenda rte_agenda,
const Agenda iy_space_agenda,
const Agenda surface_prop_agenda,
const Agenda iy_cloudbox_agenda,
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 Sparse sensor_response,
const Vector sensor_response_f,
const ArrayOfIndex sensor_response_pol,
const Vector sensor_response_za,
const Vector sensor_response_aa,
const Matrix sensor_pos,
const Matrix sensor_los,
const Vector f_grid,
const Index stokes_dim,
const Index antenna_dim,
const Vector mblock_za_grid,
const Vector mblock_aa_grid,
const String y_unit 
)

WORKSPACE METHOD: RteCalcNoJacobian.

As *RteCalc* but throughout ignores jacobians.

Author:
Patrick Eriksson
Parameters:
[in,out] ws Workspace
[out] y WS Output
[out] y_f WS Output
[out] y_pol WS Output
[out] y_pos WS Output
[out] y_los WS Output
[in] ppath_step_agenda WS Input
[in] rte_agenda WS Input
[in] iy_space_agenda WS Input
[in] surface_prop_agenda WS Input
[in] iy_cloudbox_agenda WS Input
[in] atmosphere_dim WS Input
[in] p_grid WS Input
[in] lat_grid WS Input
[in] lon_grid WS Input
[in] z_field WS Input
[in] t_field WS Input
[in] vmr_field WS Input
[in] r_geoid WS Input
[in] z_surface WS Input
[in] cloudbox_on WS Input
[in] cloudbox_limits WS Input
[in] sensor_response WS Input
[in] sensor_response_f WS Input
[in] sensor_response_pol WS Input
[in] sensor_response_za WS Input
[in] sensor_response_aa WS Input
[in] sensor_pos WS Input
[in] sensor_los WS Input
[in] f_grid WS Input
[in] stokes_dim WS Input
[in] antenna_dim WS Input
[in] mblock_za_grid WS Input
[in] mblock_aa_grid WS Input
[in] y_unit WS Input

Definition at line 396 of file m_rte.cc.

References jacobianOff(), and RteCalc().

Referenced by RteCalcNoJacobian_g().

void RteStd ( Workspace ws,
Matrix iy,
ArrayOfTensor4 diy_dvmr,
ArrayOfTensor4 diy_dt,
const Ppath ppath,
const ArrayOfPpath ppath_array,
const Index ppath_array_index,
const Vector f_grid,
const Index stokes_dim,
const Agenda emission_agenda,
const Agenda abs_scalar_gas_agenda,
const ArrayOfIndex rte_do_vmr_jacs,
const Index rte_do_t_jacs 
)

WORKSPACE METHOD: RteStd.

Standard RTE function.

This function does a clearsky radiative transfer calculation for a given propagation path. Designed to be part of *rte_agenda*.

The overall strategy is to average basic atmospheric quantities (such as temperature) between the end points of each step of the propagation path, and to calculate source term and absorption for these averaged values.

See further the user guide.

Author:
Claudia Emde

Patrick Eriksson

Parameters:
[in,out] ws Workspace
[out] iy WS Output
[out] diy_dvmr WS Output
[out] diy_dt WS Output
[in] ppath WS Input
[in] ppath_array WS Input
[in] ppath_array_index WS Input
[in] f_grid WS Input
[in] stokes_dim WS Input
[in] emission_agenda WS Input
[in] abs_scalar_gas_agenda WS Input
[in] rte_do_vmr_jacs WS Input
[in] rte_do_t_jacs WS Input

Definition at line 676 of file m_rte.cc.

References rte_std().

Referenced by RteStd_g().

void RteStdWithTransmissions ( Workspace ws,
Matrix iy,
Tensor4 ppath_transmissions,
ArrayOfTensor4 diy_dvmr,
ArrayOfTensor4 diy_dt,
const Ppath ppath,
const ArrayOfPpath ppath_array,
const Index ppath_array_index,
const Vector f_grid,
const Index stokes_dim,
const Agenda emission_agenda,
const Agenda abs_scalar_gas_agenda,
const ArrayOfIndex rte_do_vmr_jacs,
const Index rte_do_t_jacs 
)

WORKSPACE METHOD: RteStdWithTransmissions.

As *RteStd*, but also returns path transmissions.

The transmission to each point of the propagation path is returned in *ppath_transmissions*.

Author:
Patrick Eriksson
Parameters:
[in,out] ws Workspace
[out] iy WS Output
[out] ppath_transmissions WS Output
[out] diy_dvmr WS Output
[out] diy_dt WS Output
[in] ppath WS Input
[in] ppath_array WS Input
[in] ppath_array_index WS Input
[in] f_grid WS Input
[in] stokes_dim WS Input
[in] emission_agenda WS Input
[in] abs_scalar_gas_agenda WS Input
[in] rte_do_vmr_jacs WS Input
[in] rte_do_t_jacs WS Input

Definition at line 702 of file m_rte.cc.

References rte_std().

Referenced by RteStdWithTransmissions_g().

void yUnit ( Vector y,
const String y_unit,
const Vector y_f 
)

WORKSPACE METHOD: yUnit.

Conversion of *y* to other spectral units.

The conversion specified by *y_unit* is applied. This function can be used if the standard way of making the conversion inside the radiative transfer function does not work. The WSV *y_unit* should then be set to "1" when performing the radiative transfer calculations, and be changed before calling this method.

Author:
Patrick Eriksson
Parameters:
[out] y WS Output
[in] y_unit WS Input
[in] y_f WS Input

Definition at line 730 of file m_rte.cc.

References invplanck(), invrayjean(), and ConstVectorView::nelem().

Referenced by yUnit_g().


Variable Documentation


Generated on Mon Mar 23 14:06:41 2009 for ARTS by  doxygen 1.5.6