m_scatrte.cc File Reference

This file contains functions to calculate the radiative transfer inside the cloudbox. More...

#include <stdexcept>
#include <iostream>
#include <cstdlib>
#include <cmath>
#include "arts.h"
#include "array.h"
#include "auto_md.h"
#include "check_input.h"
#include "matpackVII.h"
#include "logic.h"
#include "ppath.h"
#include "agenda_class.h"
#include "physics_funcs.h"
#include "lin_alg.h"
#include "math_funcs.h"
#include "messages.h"
#include "xml_io.h"
#include "rte.h"
#include "special_interp.h"
#include "scatrte.h"
#include "m_general.h"
#include "wsv_aux.h"

Include dependency graph for m_scatrte.cc:

Go to the source code of this file.

Functions

void DoitAngularGridsSet (Index &doit_za_grid_size, Vector &scat_aa_grid, Vector &scat_za_grid, const Index &N_za_grid, const Index &N_aa_grid, const String &za_grid_opt_file)
 WORKSPACE METHOD: DoitAngularGridsSet.
void doit_conv_flagAbs (Index &doit_conv_flag, Index &doit_iteration_counter, const Tensor6 &doit_i_field, const Tensor6 &doit_i_field_old, const Vector &epsilon)
 WORKSPACE METHOD: doit_conv_flagAbs.
void doit_conv_flagAbsBT (Index &doit_conv_flag, Index &doit_iteration_counter, const Tensor6 &doit_i_field, const Tensor6 &doit_i_field_old, const Vector &f_grid, const Index &f_index, const Vector &epsilon)
 WORKSPACE METHOD: doit_conv_flagAbsBT.
void doit_conv_flagLsq (Index &doit_conv_flag, Index &doit_iteration_counter, const Tensor6 &doit_i_field, const Tensor6 &doit_i_field_old, const Vector &f_grid, const Index &f_index, const Vector &epsilon)
 WORKSPACE METHOD: doit_conv_flagLsq.
void doit_i_fieldIterate (Workspace &ws, Tensor6 &doit_i_field, const Agenda &doit_scat_field_agenda, const Agenda &doit_rte_agenda, const Agenda &doit_conv_test_agenda)
 WORKSPACE METHOD: doit_i_fieldIterate.
void doit_i_fieldUpdate1D (Workspace &ws, Tensor6 &doit_i_field, const Tensor6 &doit_i_field_old, const Tensor6 &doit_scat_field, const ArrayOfIndex &cloudbox_limits, const Agenda &abs_scalar_gas_agenda, const Tensor4 &vmr_field, const Agenda &spt_calc_agenda, const Vector &scat_za_grid, const Tensor4 &pnd_field, const Agenda &opt_prop_part_agenda, const Agenda &opt_prop_gas_agenda, const Agenda &ppath_step_agenda, const Vector &p_grid, const Tensor3 &z_field, const Matrix &r_geoid, const Matrix &z_surface, const Tensor3 &t_field, const Vector &f_grid, const Index &f_index, const Agenda &, const Index &doit_za_interp)
 WORKSPACE METHOD: doit_i_fieldUpdate1D.
void doit_i_fieldUpdateSeq1D (Workspace &ws, Tensor6 &doit_i_field, const Tensor6 &doit_scat_field, const ArrayOfIndex &cloudbox_limits, const Agenda &abs_scalar_gas_agenda, const Tensor4 &vmr_field, const Agenda &spt_calc_agenda, const Vector &scat_za_grid, const Tensor4 &pnd_field, const Agenda &opt_prop_part_agenda, const Agenda &opt_prop_gas_agenda, const Agenda &ppath_step_agenda, const Vector &p_grid, const Tensor3 &z_field, const Matrix &r_geoid, const Matrix &z_surface, const Tensor3 &t_field, const Vector &f_grid, const Index &f_index, const Agenda &surface_prop_agenda, const Index &doit_za_interp)
 WORKSPACE METHOD: doit_i_fieldUpdateSeq1D.
void doit_i_fieldUpdateSeq3D (Workspace &ws, Tensor6 &doit_i_field, const Tensor6 &doit_scat_field, const ArrayOfIndex &cloudbox_limits, const Agenda &abs_scalar_gas_agenda, const Tensor4 &vmr_field, const Agenda &spt_calc_agenda, const Vector &scat_za_grid, const Vector &scat_aa_grid, const Tensor4 &pnd_field, const Agenda &opt_prop_part_agenda, const Agenda &opt_prop_gas_agenda, const Agenda &ppath_step_agenda, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &z_field, const Matrix &r_geoid, const Matrix &z_surface, const Tensor3 &t_field, const Vector &f_grid, const Index &f_index, const Index &doit_za_interp)
 WORKSPACE METHOD: doit_i_fieldUpdateSeq3D.
void doit_i_fieldUpdateSeq1DPP (Workspace &ws, Tensor6 &doit_i_field, Index &scat_za_index, const Tensor6 &doit_scat_field, const ArrayOfIndex &cloudbox_limits, const Agenda &abs_scalar_gas_agenda, const Tensor4 &vmr_field, const Agenda &spt_calc_agenda, const Vector &scat_za_grid, const Tensor4 &pnd_field, const Agenda &opt_prop_part_agenda, const Agenda &opt_prop_gas_agenda, const Agenda &ppath_step_agenda, const Vector &p_grid, const Tensor3 &z_field, const Matrix &r_geoid, const Tensor3 &t_field, const Vector &f_grid, const Index &f_index)
 WORKSPACE METHOD: doit_i_fieldUpdateSeq1DPP.
void DoitInit (Index &scat_p_index, Index &scat_lat_index, Index &scat_lon_index, Index &scat_za_index, Index &scat_aa_index, Tensor6 &doit_scat_field, Tensor6 &doit_i_field, Index &doit_za_interp, Index &doit_is_initialized, const Index &stokes_dim, const Index &atmosphere_dim, const Vector &scat_za_grid, const Vector &scat_aa_grid, const Index &doit_za_grid_size, const ArrayOfIndex &cloudbox_limits, const ArrayOfSingleScatteringData &scat_data_raw)
 WORKSPACE METHOD: DoitInit.
void DoitWriteIterationFields (const Index &doit_iteration_counter, const Tensor6 &doit_i_field, const ArrayOfIndex &iterations)
 WORKSPACE METHOD: DoitWriteIterationFields.
void doit_scat_fieldCalc (Workspace &ws, Tensor6 &doit_scat_field, const Agenda &pha_mat_spt_agenda, const Tensor6 &doit_i_field, const Tensor4 &pnd_field, const Tensor3 &t_field, const Index &atmosphere_dim, const ArrayOfIndex &cloudbox_limits, const Vector &scat_za_grid, const Vector &scat_aa_grid, const Index &doit_za_grid_size)
 WORKSPACE METHOD: doit_scat_fieldCalc.
void doit_scat_fieldCalcLimb (Workspace &ws, Tensor6 &doit_scat_field, const Agenda &pha_mat_spt_agenda, const Tensor6 &doit_i_field, const Tensor4 &pnd_field, const Tensor3 &t_field, const Index &atmosphere_dim, const ArrayOfIndex &cloudbox_limits, const Vector &scat_za_grid, const Vector &scat_aa_grid, const Index &doit_za_grid_size, const Index &doit_za_interp)
 WORKSPACE METHOD: doit_scat_fieldCalcLimb.
void doit_za_grid_optCalc (Vector &doit_za_grid_opt, const Tensor6 &doit_i_field, const Vector &scat_za_grid, const Index &doit_za_interp, const Numeric &acc)
 WORKSPACE METHOD: doit_za_grid_optCalc.
void doit_za_interpSet (Index &doit_za_interp, const Index &atmosphere_dim, const String &method)
 WORKSPACE METHOD: doit_za_interpSet.
void ScatteringDoit (Workspace &ws, Tensor6 &doit_i_field, Tensor7 &scat_i_p, Tensor7 &scat_i_lat, Tensor7 &scat_i_lon, Tensor4 &doit_i_field1D_spectrum, const Vector &f_grid, const Agenda &doit_mono_agenda, const Index &doit_is_initialized)
 WORKSPACE METHOD: ScatteringDoit.

Variables

const Numeric PI
const Numeric RAD2DEG


Detailed Description

This file contains functions to calculate the radiative transfer inside the cloudbox.

Author:
Claudia Emde <claudia.emde@dlr.de>

Sreerekha T.R. <rekha@uni-bremen.de>

Date:
Wed Jun 19 11:03:57 2002
These functions are listed in the doxygen documentation as entries of the file auto_md.h

Definition in file m_scatrte.cc.


Function Documentation

void doit_conv_flagAbs ( Index doit_conv_flag,
Index doit_iteration_counter,
const Tensor6 doit_i_field,
const Tensor6 doit_i_field_old,
const Vector epsilon 
)

WORKSPACE METHOD: doit_conv_flagAbs.

Convergence test (maximum absolute difference).

The function calculates the absolute differences for two successive iteration fields. It picks out the maximum values for each Stokes component separately. The convergence test is fullfilled under the following conditions: |I(m+1) - I(m)| < epsilon_1 Intensity. |Q(m+1) - Q(m)| < epsilon_2 The other Stokes components. |U(m+1) - U(m)| < epsilon_3 |V(m+1) - V(m)| < epsilon_4 These conditions have to be valid for all positions in the cloudbox and for all directions.

The limits for convergence are set in the controlfile by setting the vector *epsilon* to appropriate values. The unit of *epsilon* is radiance [W / (m^2 Hz sr)].

This method can be used in *doit_convergence_test_agenda*.

Author:
Claudia Emde
Parameters:
[out] doit_conv_flag WS Output
[out] doit_iteration_counter WS Output
[in] doit_i_field WS Input
[in] doit_i_field_old WS Input
[in] epsilon Generic Input

Definition at line 114 of file m_scatrte.cc.

References abs, is_size(), ConstTensor6View::nbooks(), ConstTensor6View::ncols(), ConstVectorView::nelem(), ConstTensor6View::npages(), ConstTensor6View::nrows(), ConstTensor6View::nshelves(), ConstTensor6View::nvitrines(), out1, and out2.

Referenced by doit_conv_flagAbs_g().

void doit_conv_flagAbsBT ( Index doit_conv_flag,
Index doit_iteration_counter,
const Tensor6 doit_i_field,
const Tensor6 doit_i_field_old,
const Vector f_grid,
const Index f_index,
const Vector epsilon 
)

WORKSPACE METHOD: doit_conv_flagAbsBT.

Convergence test (maximum absolute difference in Rayleigh Jeans BT)

The function calculates the absolute differences for two successive iteration fields. It picks out the maximum values for each Stokes component separately. The convergence test is fullfilled under the following conditions: |I(m+1) - I(m)| < epsilon_1 Intensity. |Q(m+1) - Q(m)| < epsilon_2 The other Stokes components. |U(m+1) - U(m)| < epsilon_3 |V(m+1) - V(m)| < epsilon_4 These conditions have to be valid for all positions in the cloudbox and for all directions.

The limits for convergence are set in the controlfile by setting the vector *epsilon* to appropriate values. The unit of *epsilon* is Rayleigh Jeans BT [K].

This method can be used in *doit_convergence_test_agenda*.

Author:
Sreerekha T.R.

Claudia Emde

Parameters:
[out] doit_conv_flag WS Output
[out] doit_iteration_counter WS Output
[in] doit_i_field WS Input
[in] doit_i_field_old WS Input
[in] f_grid WS Input
[in] f_index WS Input
[in] epsilon Generic Input

Definition at line 222 of file m_scatrte.cc.

References abs, chk_if_increasing(), invrayjean(), is_size(), ConstTensor6View::nbooks(), ConstTensor6View::ncols(), ConstVectorView::nelem(), ConstTensor6View::npages(), ConstTensor6View::nrows(), ConstTensor6View::nshelves(), ConstTensor6View::nvitrines(), out1, and out2.

Referenced by doit_conv_flagAbsBT_g().

void doit_conv_flagLsq ( Index doit_conv_flag,
Index doit_iteration_counter,
const Tensor6 doit_i_field,
const Tensor6 doit_i_field_old,
const Vector f_grid,
const Index f_index,
const Vector epsilon 
)

WORKSPACE METHOD: doit_conv_flagLsq.

Convergence test (Least square).

This method performs a least square convergence test for two successive iteration fields.

The limits for convergence are set in the controlfile by setting the vector *epsilon* to appropriate values. The unit of *epsilon* is Rayleigh Jeans BT [K].

Warning: This method is not recommended because this kind of convergence test is not sufficiently strict, so that the DOIT result might be wrong.

Author:
Claudia Emde
Parameters:
[out] doit_conv_flag WS Output
[out] doit_iteration_counter WS Output
[in] doit_i_field WS Input
[in] doit_i_field_old WS Input
[in] f_grid WS Input
[in] f_index WS Input
[in] epsilon Generic Input

Definition at line 340 of file m_scatrte.cc.

References chk_if_increasing(), invrayjean(), is_size(), ConstTensor6View::nbooks(), ConstTensor6View::ncols(), ConstVectorView::nelem(), ConstTensor6View::npages(), ConstTensor6View::nrows(), ConstTensor6View::nshelves(), ConstTensor6View::nvitrines(), out1, and out2.

Referenced by doit_conv_flagLsq_g().

void doit_i_fieldIterate ( Workspace ws,
Tensor6 doit_i_field,
const Agenda doit_scat_field_agenda,
const Agenda doit_rte_agenda,
const Agenda doit_conv_test_agenda 
)

WORKSPACE METHOD: doit_i_fieldIterate.

Iterative solution of the VRTE (DOIT method).

A solution for the RTE with scattering is found using the DOIT method:

1. Calculate scattering integral using *doit_scat_field_agenda*. 2. Calculate RT with fixed scattered field using <br> *doit_rte_agenda*. 3. Convergence test using *doit_conv_test_agenda*.

Note: The atmospheric dimensionality *atmosphere_dim* can be <br> either 1 or 3. To these dimensions the method adapts <br> automatically. 2D scattering calculations are not <br> supported.

Author:
Claudia Emde
Parameters:
[in,out] ws Workspace
[out] doit_i_field WS Output
[in] doit_scat_field_agenda WS Input
[in] doit_rte_agenda WS Input
[in] doit_conv_test_agenda WS Input

Definition at line 463 of file m_scatrte.cc.

References chk_not_empty(), doit_conv_test_agendaExecute(), doit_rte_agendaExecute(), doit_scat_field_agendaExecute(), ConstTensor6View::nbooks(), ConstTensor6View::ncols(), ConstTensor6View::npages(), ConstTensor6View::nrows(), ConstTensor6View::nshelves(), ConstTensor6View::nvitrines(), and out2.

Referenced by doit_i_fieldIterate_g().

void doit_i_fieldUpdate1D ( Workspace ws,
Tensor6 doit_i_field,
const Tensor6 doit_i_field_old,
const Tensor6 doit_scat_field,
const ArrayOfIndex cloudbox_limits,
const Agenda abs_scalar_gas_agenda,
const Tensor4 vmr_field,
const Agenda spt_calc_agenda,
const Vector scat_za_grid,
const Tensor4 pnd_field,
const Agenda opt_prop_part_agenda,
const Agenda opt_prop_gas_agenda,
const Agenda ppath_step_agenda,
const Vector p_grid,
const Tensor3 z_field,
const Matrix r_geoid,
const Matrix z_surface,
const Tensor3 t_field,
const Vector f_grid,
const Index f_index,
const Agenda surface_prop_agenda,
const Index doit_za_interp 
)

WORKSPACE METHOD: doit_i_fieldUpdate1D.

RT calculation in cloudbox with fixed scattering integral (1D).

Update the radiation field (DOIT method). The method loops through the cloudbox to update the radiation field for all positions and directions in the 1D cloudbox.

Note: This method is very inefficient, because the number of iterations scales with the number of cloudbox pressure levels. It is recommended to use *doit_i_fieldUpdateSeq1D*.

Author:
Claudia Emde
Parameters:
[in,out] ws Workspace
[out] doit_i_field WS Output
[in] doit_i_field_old WS Input
[in] doit_scat_field WS Input
[in] cloudbox_limits WS Input
[in] abs_scalar_gas_agenda WS Input
[in] vmr_field WS Input
[in] spt_calc_agenda WS Input
[in] scat_za_grid WS Input
[in] pnd_field WS Input
[in] opt_prop_part_agenda WS Input
[in] opt_prop_gas_agenda WS Input
[in] ppath_step_agenda WS Input
[in] p_grid WS Input
[in] z_field WS Input
[in] r_geoid WS Input
[in] z_surface WS Input
[in] t_field WS Input
[in] f_grid WS Input
[in] f_index WS Input
[in] surface_prop_agenda WS Input
[in] doit_za_interp WS Input

Definition at line 528 of file m_scatrte.cc.

References chk_atm_surface(), chk_if_decreasing(), chk_if_increasing(), chk_not_empty(), chk_size(), cloud_fieldsCalc(), cloud_ppath_update1D_noseq(), is_size(), ConstTensor6View::ncols(), ConstVectorView::nelem(), Array< base >::nelem(), out2, and out3.

Referenced by doit_i_fieldUpdate1D_g().

void doit_i_fieldUpdateSeq1D ( Workspace ws,
Tensor6 doit_i_field,
const Tensor6 doit_scat_field,
const ArrayOfIndex cloudbox_limits,
const Agenda abs_scalar_gas_agenda,
const Tensor4 vmr_field,
const Agenda spt_calc_agenda,
const Vector scat_za_grid,
const Tensor4 pnd_field,
const Agenda opt_prop_part_agenda,
const Agenda opt_prop_gas_agenda,
const Agenda ppath_step_agenda,
const Vector p_grid,
const Tensor3 z_field,
const Matrix r_geoid,
const Matrix z_surface,
const Tensor3 t_field,
const Vector f_grid,
const Index f_index,
const Agenda surface_prop_agenda,
const Index doit_za_interp 
)

WORKSPACE METHOD: doit_i_fieldUpdateSeq1D.

RT calculation in cloudbox with fixed scattering integral.

Update radiation field (*doit_i_field*) in DOIT module. This method loops through the cloudbox to update the radiation field for all positions and directions in the 1D cloudbox. The method applies the sequential update. For more information refer to AUG.

Note: This is the commonly used WSM for the radiation field update (can be used in *doit_rte_agenda*). It is recommended because it is the most efficient and accurate method.

Author:
Claudia Emde
Parameters:
[in,out] ws Workspace
[out] doit_i_field WS Output
[in] doit_scat_field WS Input
[in] cloudbox_limits WS Input
[in] abs_scalar_gas_agenda WS Input
[in] vmr_field WS Input
[in] spt_calc_agenda WS Input
[in] scat_za_grid WS Input
[in] pnd_field WS Input
[in] opt_prop_part_agenda WS Input
[in] opt_prop_gas_agenda WS Input
[in] ppath_step_agenda WS Input
[in] p_grid WS Input
[in] z_field WS Input
[in] r_geoid WS Input
[in] z_surface WS Input
[in] t_field WS Input
[in] f_grid WS Input
[in] f_index WS Input
[in] surface_prop_agenda WS Input
[in] doit_za_interp WS Input

Definition at line 694 of file m_scatrte.cc.

References chk_atm_surface(), chk_if_decreasing(), chk_if_increasing(), chk_not_empty(), chk_size(), cloud_fieldsCalc(), cloud_ppath_update1D(), is_size(), ConstTensor6View::ncols(), ConstVectorView::nelem(), Array< base >::nelem(), out2, out3, and RAD2DEG.

Referenced by doit_i_fieldUpdateSeq1D_g().

void doit_i_fieldUpdateSeq1DPP ( Workspace ws,
Tensor6 doit_i_field,
Index scat_za_index,
const Tensor6 doit_scat_field,
const ArrayOfIndex cloudbox_limits,
const Agenda abs_scalar_gas_agenda,
const Tensor4 vmr_field,
const Agenda spt_calc_agenda,
const Vector scat_za_grid,
const Tensor4 pnd_field,
const Agenda opt_prop_part_agenda,
const Agenda opt_prop_gas_agenda,
const Agenda ppath_step_agenda,
const Vector p_grid,
const Tensor3 z_field,
const Matrix r_geoid,
const Tensor3 t_field,
const Vector f_grid,
const Index f_index 
)

WORKSPACE METHOD: doit_i_fieldUpdateSeq1DPP.

RT calculation in cloudbox with fixed scattering integral.

<br> Update radiation field (*doit_i_field*) in DOIT module. This method loops through the cloudbox to update the radiation field for all positions and directions in the 1D cloudbox. The method applies the sequential update and the plane parallel approximation. This method is only slightly faster than doit_i_fieldUpdateSeq1D* and it is less accurate. It can not be used for limb simulations.

Author:
Sreerekha T.R.
Parameters:
[in,out] ws Workspace
[out] doit_i_field WS Output
[out] scat_za_index WS Output
[in] doit_scat_field WS Input
[in] cloudbox_limits WS Input
[in] abs_scalar_gas_agenda WS Input
[in] vmr_field WS Input
[in] spt_calc_agenda WS Input
[in] scat_za_grid WS Input
[in] pnd_field WS Input
[in] opt_prop_part_agenda WS Input
[in] opt_prop_gas_agenda WS Input
[in] ppath_step_agenda WS Input
[in] p_grid WS Input
[in] z_field WS Input
[in] r_geoid WS Input
[in] t_field WS Input
[in] f_grid WS Input
[in] f_index WS Input

Definition at line 1226 of file m_scatrte.cc.

References cloud_fieldsCalc(), cloud_ppath_update1D_planeparallel(), is_size(), ConstTensor6View::ncols(), ConstVectorView::nelem(), out2, and out3.

Referenced by doit_i_fieldUpdateSeq1DPP_g().

void doit_i_fieldUpdateSeq3D ( Workspace ws,
Tensor6 doit_i_field,
const Tensor6 doit_scat_field,
const ArrayOfIndex cloudbox_limits,
const Agenda abs_scalar_gas_agenda,
const Tensor4 vmr_field,
const Agenda spt_calc_agenda,
const Vector scat_za_grid,
const Vector scat_aa_grid,
const Tensor4 pnd_field,
const Agenda opt_prop_part_agenda,
const Agenda opt_prop_gas_agenda,
const Agenda ppath_step_agenda,
const Vector p_grid,
const Vector lat_grid,
const Vector lon_grid,
const Tensor3 z_field,
const Matrix r_geoid,
const Matrix z_surface,
const Tensor3 t_field,
const Vector f_grid,
const Index f_index,
const Index doit_za_interp 
)

WORKSPACE METHOD: doit_i_fieldUpdateSeq3D.

RT calculation in cloudbox with fixed scattering integral.

Update radiation field (*doit_i_field*) in DOIT module. This method loops through the cloudbox to update the radiation field for all positions and directions in the 3D cloudbox. The method applies the sequential update. For more information please refer to AUG. Surface reflections are not yet implemented in 3D scattering calculations.

Note: DOIT calculations in 3D are computationally expensive. For large 3D cloud fields it is recommended to use the Monte Carlo module or an independent pixel approach applying DOIT-1D.

Author:
Claudia Emde
Parameters:
[in,out] ws Workspace
[out] doit_i_field WS Output
[in] doit_scat_field WS Input
[in] cloudbox_limits WS Input
[in] abs_scalar_gas_agenda WS Input
[in] vmr_field WS Input
[in] spt_calc_agenda WS Input
[in] scat_za_grid WS Input
[in] scat_aa_grid WS Input
[in] pnd_field WS Input
[in] opt_prop_part_agenda WS Input
[in] opt_prop_gas_agenda WS Input
[in] ppath_step_agenda WS Input
[in] p_grid WS Input
[in] lat_grid WS Input
[in] lon_grid WS Input
[in] z_field WS Input
[in] r_geoid WS Input
[in] z_surface WS Input
[in] t_field WS Input
[in] f_grid WS Input
[in] f_index WS Input
[in] doit_za_interp WS Input

Definition at line 927 of file m_scatrte.cc.

References chk_atm_grids(), chk_atm_surface(), chk_if_increasing(), chk_not_empty(), chk_size(), cloud_fieldsCalc(), cloud_ppath_update3D(), is_size(), joker, ConstTensor6View::ncols(), ConstVectorView::nelem(), Array< base >::nelem(), out2, out3, and RAD2DEG.

Referenced by doit_i_fieldUpdateSeq3D_g().

void doit_scat_fieldCalc ( Workspace ws,
Tensor6 doit_scat_field,
const Agenda pha_mat_spt_agenda,
const Tensor6 doit_i_field,
const Tensor4 pnd_field,
const Tensor3 t_field,
const Index atmosphere_dim,
const ArrayOfIndex cloudbox_limits,
const Vector scat_za_grid,
const Vector scat_aa_grid,
const Index doit_za_grid_size 
)

WORKSPACE METHOD: doit_scat_fieldCalc.

This method calculates the scattering integral field in the DOIT module.

The scattering integral field is generated by integrating the product of phase matrix and Stokes vector over all incident angles. For more information please refer to AUG.

The output of this method is *doit_scat_field* which is used in the radiative transfer part (*doit_i_fieldUpdateXXX*).

Author:
Sreerekha T.R.

Claudia Emde

Parameters:
[in,out] ws Workspace
[out] doit_scat_field WS Output
[in] pha_mat_spt_agenda WS Input
[in] doit_i_field WS Input
[in] pnd_field WS Input
[in] t_field WS Input
[in] atmosphere_dim WS Input
[in] cloudbox_limits WS Input
[in] scat_za_grid WS Input
[in] scat_aa_grid WS Input
[in] doit_za_grid_size WS Input

Definition at line 1564 of file m_scatrte.cc.

References AngIntegrate_trapezoid_opti(), chk_not_empty(), is_size(), joker, ConstTensor4View::nbooks(), ConstTensor6View::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), out2, out3, pha_mat_spt_agendaExecute(), and pha_matCalc().

Referenced by doit_scat_fieldCalc_g().

void doit_scat_fieldCalcLimb ( Workspace ws,
Tensor6 doit_scat_field,
const Agenda pha_mat_spt_agenda,
const Tensor6 doit_i_field,
const Tensor4 pnd_field,
const Tensor3 t_field,
const Index atmosphere_dim,
const ArrayOfIndex cloudbox_limits,
const Vector scat_za_grid,
const Vector scat_aa_grid,
const Index doit_za_grid_size,
const Index doit_za_interp 
)

WORKSPACE METHOD: doit_scat_fieldCalcLimb.

This method calculates the scattering integral field in the DOIT module (Limb).

The scattering integral field is the field generated by integrating the product of phase matrix and the Stokes vector over all incident angles.

The output of this method is the scattering integral field *doit_scat_field* which is used in the radiative transfer part (*doit_i_fieldUpdateXXX*). For limb simulations it makes sense to use different zenith angle grids for the scattering integral part and the RT part, because the latter part requires a much finer resolution about 90°. Taking an optimized grid for the RT part and an equidistant grid for the scattering integral part saves very much CPU time. This method uses the equidistant za_grid defined in doit_angular_gridsSet* and it should always be used for limb simulations.

For more information please refer to AUG.

Author:
Claudia Emde
Parameters:
[in,out] ws Workspace
[out] doit_scat_field WS Output
[in] pha_mat_spt_agenda WS Input
[in] doit_i_field WS Input
[in] pnd_field WS Input
[in] t_field WS Input
[in] atmosphere_dim WS Input
[in] cloudbox_limits WS Input
[in] scat_za_grid WS Input
[in] scat_aa_grid WS Input
[in] doit_za_grid_size WS Input
[in] doit_za_interp WS Input

Definition at line 1860 of file m_scatrte.cc.

References AngIntegrate_trapezoid_opti(), chk_not_empty(), gridpos(), interp(), interp_poly(), interpweights(), is_size(), joker, ConstTensor4View::nbooks(), ConstTensor6View::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), nlinspace(), out1, out2, out3, pha_mat_spt_agendaExecute(), and pha_matCalc().

Referenced by doit_scat_fieldCalcLimb_g().

void doit_za_grid_optCalc ( Vector doit_za_grid_opt,
const Tensor6 doit_i_field,
const Vector scat_za_grid,
const Index doit_za_interp,
const Numeric acc 
)

WORKSPACE METHOD: doit_za_grid_optCalc.

Zenith angle grid optimization for scattering calculation.

This method optimizes the zenith angle grid. As input it requires a radiation field (*doit_i_field*) which is calculated on a very fine zenith angle grid (*scat_za_grid*). Based on this field zenith angle grid points are selected, such that the maximum difference between the radiation field represented on the very fine zenith angle grid and the radiation field represented on the optimized grid (*doit_za_grid_opt*) is less than the accuracy (*acc*) provided as a keyword. The accuracy must be given in %. Between the grid points theradiation field is interpolated linearly or polynomially depending on *doit_za_interp*.

Note: The method works only for a 1D atmosphere and for one frequency.

Author:
Claudia Emde
Parameters:
[out] doit_za_grid_opt WS Output
[in] doit_i_field WS Input
[in] scat_za_grid WS Input
[in] doit_za_interp WS Input
[in] acc Generic Input

Definition at line 2249 of file m_scatrte.cc.

References chk_size(), ConstTensor6View::ncols(), ConstVectorView::nelem(), ConstTensor6View::nvitrines(), and za_gridOpt().

Referenced by doit_za_grid_optCalc_g().

void doit_za_interpSet ( Index doit_za_interp,
const Index atmosphere_dim,
const String interp_method 
)

WORKSPACE METHOD: doit_za_interpSet.

Define interpolation method for zenith angle dimension.

You can use this method to choose the interpolation method for interpolations in the zenith angle dimension. By default, linear interpolation is used.

Keyword: <br> interp_method - 'linear' or 'polynomial'

Author:
Claudia Emde
Parameters:
[out] doit_za_interp WS Output
[in] atmosphere_dim WS Input
[in] interp_method Generic Input

Definition at line 2297 of file m_scatrte.cc.

References chk_if_in_range().

Referenced by doit_za_interpSet_g().

void DoitAngularGridsSet ( Index doit_za_grid_size,
Vector scat_aa_grid,
Vector scat_za_grid,
const Index N_za_grid,
const Index N_aa_grid,
const String za_grid_opt_file 
)

WORKSPACE METHOD: DoitAngularGridsSet.

Set angular grids for DOIT calculation. In this method the angular grids for a DOIT calculation are specified. For down-looking geometries it is sufficient to define

N_za_grid: number of grid points in zenith angle grid <br> recommended value: 19 N_aa_grid: number of grid points in zenith angle grid <br> recommended value: 37

From these numbers equally spaced grids are created and stored in the WSVs *scat_za_grid* and *scat_aa_grid*.

For limb simulations it is important to use an optimized zenith angle grid with a very fine resolution about 90° for the RT calculations. Such a grid can be generated using *doit_za_grid_optCalc*. The filename of the optimized zenith angle grid can be given as a keyword. If a filename is given, the equidistant grid is taken for the calculation of the scattering integrals and the optimized grid is taken for the radiative transfer part. Otherwise, if no filename is specified ( za_grid_opt_file = "" ) the equidistant grid is taken for the calculation of the scattering integrals and for the RT calculations. This option makes sense for down-looking cases to speed up the calculation.

Author:
Claudia Emde
Parameters:
[out] doit_za_grid_size WS Output
[out] scat_aa_grid WS Output
[out] scat_za_grid WS Output
[in] N_za_grid Generic Input
[in] N_aa_grid Generic Input
[in] za_grid_opt_file Generic Input

Definition at line 71 of file m_scatrte.cc.

References nlinspace(), out1, and xml_read_from_file().

Referenced by DoitAngularGridsSet_g().

void DoitInit ( Index scat_p_index,
Index scat_lat_index,
Index scat_lon_index,
Index scat_za_index,
Index scat_aa_index,
Tensor6 doit_scat_field,
Tensor6 doit_i_field,
Index doit_za_interp,
Index doit_is_initialized,
const Index stokes_dim,
const Index atmosphere_dim,
const Vector scat_za_grid,
const Vector scat_aa_grid,
const Index doit_za_grid_size,
const ArrayOfIndex cloudbox_limits,
const ArrayOfSingleScatteringData scat_data_raw 
)

WORKSPACE METHOD: DoitInit.

Initialize variables for DOIT scattering calculations.

Before using the WSM *ScatteringDOIT*, please use this method to initialize the required WSVs.

Author:
Claudia Emde
Parameters:
[out] scat_p_index WS Output
[out] scat_lat_index WS Output
[out] scat_lon_index WS Output
[out] scat_za_index WS Output
[out] scat_aa_index WS Output
[out] doit_scat_field WS Output
[out] doit_i_field WS Output
[out] doit_za_interp WS Output
[out] doit_is_initialized WS Output
[in] stokes_dim WS Input
[in] atmosphere_dim WS Input
[in] scat_za_grid WS Input
[in] scat_aa_grid WS Input
[in] doit_za_grid_size WS Input
[in] cloudbox_limits WS Input
[in] scat_data_raw WS Input

Definition at line 1395 of file m_scatrte.cc.

References chk_if_in_range(), Array< base >::nelem(), ConstVectorView::nelem(), out1, and Tensor6::resize().

Referenced by DoitInit_g().

void DoitWriteIterationFields ( const Index doit_iteration_counter,
const Tensor6 doit_i_field,
const ArrayOfIndex iterations 
)

WORKSPACE METHOD: DoitWriteIterationFields.

Write DOIT iteration fields.

This method writes intermediate iteration fields to xml-files which is useful to check the DOIT method. It can be interesting to look how the radiation fields (*doit_i_field*) behave. The method can be used as a part of convergence_test_agenda*.

The keyword 'iterations' includes the numbers of the iterations which should be stored, e.g., <br> 'iterations = [3, 6, 9]'. In this case the 3rd, 6th and 9th iterations are stored in the files 'doit_iteration_3.xml', 'doit_iteration_6.xml' ... <br> If a number is larger than the total number of iterations, this number is ignored.

If all iterations should be stored please set the keyword <br> 'iterations = [0]'.

Author:
Claudia Emde
Parameters:
[in] doit_iteration_counter WS Input
[in] doit_i_field WS Input
[in] iterations Generic Input

Definition at line 1527 of file m_scatrte.cc.

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

Referenced by DoitWriteIterationFields_g().

void ScatteringDoit ( Workspace ws,
Tensor6 doit_i_field,
Tensor7 scat_i_p,
Tensor7 scat_i_lat,
Tensor7 scat_i_lon,
Tensor4 doit_i_field1D_spectrum,
const Vector f_grid,
const Agenda doit_mono_agenda,
const Index doit_is_initialized 
)

WORKSPACE METHOD: ScatteringDoit.

This method executes *doit_mono_agenda* for each frequency in *f_grid*. The output is the radiation field inside the cloudbox (*doit_i_field*) and on the cloudbox boundary (*scat_i_p* (1D), scat_i_lat* and *scat_i_lon* (3D)).

Author:
Claudia Emde
Parameters:
[in,out] ws Workspace
[out] doit_i_field WS Output
[out] scat_i_p WS Output
[out] scat_i_lat WS Output
[out] scat_i_lon WS Output
[out] doit_i_field1D_spectrum WS Output
[in] f_grid WS Input
[in] doit_mono_agenda WS Input
[in] doit_is_initialized WS Input

Definition at line 2326 of file m_scatrte.cc.

References chk_if_increasing(), chk_not_empty(), doit_mono_agendaExecute(), ConstVectorView::nelem(), and out1.

Referenced by ScatteringDoit_g().


Variable Documentation

const Numeric PI


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