ARTS  2.2.66
m_doit.cc File Reference

This file contains functions to calculate the radiative transfer inside the cloudbox using the DOIT method. 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 "doit.h"
#include "m_general.h"
#include "wsv_aux.h"
#include "geodetic.h"

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, const Verbosity &verbosity)
 WORKSPACE METHOD: DoitAngularGridsSet. More...
 
void doit_conv_flagAbs (Index &doit_conv_flag, Index &doit_iteration_counter, Tensor6 &doit_i_field, const Tensor6 &doit_i_field_old, const Vector &epsilon, const Index &max_iterations, const Index &throw_nonconv_error, const Verbosity &verbosity)
 WORKSPACE METHOD: doit_conv_flagAbs. More...
 
void doit_conv_flagAbsBT (Index &doit_conv_flag, Index &doit_iteration_counter, Tensor6 &doit_i_field, const Tensor6 &doit_i_field_old, const Vector &f_grid, const Index &f_index, const Vector &epsilon, const Index &max_iterations, const Index &throw_nonconv_error, const Verbosity &verbosity)
 WORKSPACE METHOD: doit_conv_flagAbsBT. More...
 
void doit_conv_flagLsq (Index &doit_conv_flag, Index &doit_iteration_counter, Tensor6 &doit_i_field, const Tensor6 &doit_i_field_old, const Vector &f_grid, const Index &f_index, const Vector &epsilon, const Index &max_iterations, const Index &throw_nonconv_error, const Verbosity &verbosity)
 WORKSPACE METHOD: doit_conv_flagLsq. More...
 
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, const Verbosity &verbosity)
 WORKSPACE METHOD: doit_i_fieldIterate. More...
 
void doit_i_fieldUpdate1D (Workspace &ws, Tensor6 &doit_i_field, const Tensor6 &doit_scat_field, const ArrayOfIndex &cloudbox_limits, const Agenda &propmat_clearsky_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 &ppath_step_agenda, const Numeric &ppath_lraytrace, const Vector &p_grid, const Tensor3 &z_field, const Vector &refellipsoid, const Tensor3 &t_field, const Vector &f_grid, const Index &f_index, const Agenda &surface_rtprop_agenda, const Index &doit_za_interp, const Verbosity &verbosity)
 WORKSPACE METHOD: doit_i_fieldUpdate1D. More...
 
void doit_i_fieldUpdateSeq1D (Workspace &ws, Tensor6 &doit_i_field, Tensor6 &doit_scat_field, const ArrayOfIndex &cloudbox_limits, const Agenda &propmat_clearsky_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 &ppath_step_agenda, const Numeric &ppath_lraytrace, const Vector &p_grid, const Tensor3 &z_field, const Vector &refellipsoid, const Tensor3 &t_field, const Vector &f_grid, const Index &f_index, const Agenda &surface_rtprop_agenda, const Index &doit_za_interp, const Index &normalize, const Numeric &norm_error_threshold, const Index &norm_debug, const Verbosity &verbosity)
 WORKSPACE METHOD: doit_i_fieldUpdateSeq1D. More...
 
void doit_i_fieldUpdateSeq3D (Workspace &ws, Tensor6 &doit_i_field, const Tensor6 &doit_scat_field, const ArrayOfIndex &cloudbox_limits, const Agenda &propmat_clearsky_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 &ppath_step_agenda, const Numeric &ppath_lraytrace, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &z_field, const Vector &refellipsoid, const Tensor3 &t_field, const Vector &f_grid, const Index &f_index, const Index &doit_za_interp, const Verbosity &verbosity)
 WORKSPACE METHOD: doit_i_fieldUpdateSeq3D. More...
 
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 &propmat_clearsky_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 Vector &p_grid, const Tensor3 &z_field, const Tensor3 &t_field, const Vector &f_grid, const Index &f_index, const Verbosity &verbosity)
 WORKSPACE METHOD: doit_i_fieldUpdateSeq1DPP. More...
 
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, Tensor4 &doit_i_field1D_spectrum, Tensor7 &scat_i_p, Tensor7 &scat_i_lat, Tensor7 &scat_i_lon, Index &doit_is_initialized, const Index &stokes_dim, const Index &atmosphere_dim, const Vector &f_grid, const Vector &scat_za_grid, const Vector &scat_aa_grid, const Index &doit_za_grid_size, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const ArrayOfSingleScatteringData &scat_data_array, const Verbosity &verbosity)
 WORKSPACE METHOD: DoitInit. More...
 
void DoitWriteIterationFields (const Index &doit_iteration_counter, const Tensor6 &doit_i_field, const ArrayOfIndex &iterations, const Verbosity &verbosity)
 WORKSPACE METHOD: DoitWriteIterationFields. More...
 
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, const Verbosity &verbosity)
 WORKSPACE METHOD: doit_scat_fieldCalc. More...
 
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, const Verbosity &verbosity)
 WORKSPACE METHOD: doit_scat_fieldCalcLimb. More...
 
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, const Verbosity &verbosity)
 WORKSPACE METHOD: doit_za_grid_optCalc. More...
 
void doit_za_interpSet (Index &doit_za_interp, const Index &atmosphere_dim, const String &method, const Verbosity &)
 WORKSPACE METHOD: doit_za_interpSet. More...
 
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 Index &atmfields_checked, const Index &atmgeom_checked, const Index &cloudbox_checked, const Index &cloudbox_on, const Vector &f_grid, const Agenda &doit_mono_agenda, const Index &doit_is_initialized, const Verbosity &verbosity)
 WORKSPACE METHOD: ScatteringDoit. More...
 
void DoitCloudboxFieldPut (Tensor7 &scat_i_p, Tensor7 &scat_i_lat, Tensor7 &scat_i_lon, Tensor4 &doit_i_field1D_spectrum, const Tensor6 &doit_i_field, const Vector &f_grid, const Index &f_index, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Vector &scat_za_grid, const Vector &scat_aa_grid, const Index &stokes_dim, const Index &atmosphere_dim, const ArrayOfIndex &cloudbox_limits, const Verbosity &)
 WORKSPACE METHOD: DoitCloudboxFieldPut. More...
 
void CloudboxGetIncoming (Workspace &ws, Tensor7 &scat_i_p, Tensor7 &scat_i_lat, Tensor7 &scat_i_lon, const Index &atmfields_checked, const Index &atmgeom_checked, const Index &cloudbox_checked, const Index &doit_is_initialized, const Agenda &iy_main_agenda, const Index &atmosphere_dim, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &z_field, const Tensor3 &t_field, const Tensor4 &vmr_field, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const Vector &f_grid, const Index &stokes_dim, const String &iy_unit, const Agenda &blackbody_radiation_agenda, const Vector &scat_za_grid, const Vector &scat_aa_grid, const Index &rigorous, const Numeric &maxratio, const Verbosity &)
 WORKSPACE METHOD: CloudboxGetIncoming. More...
 
void CloudboxGetIncoming1DAtm (Workspace &ws, Tensor7 &scat_i_p, Tensor7 &scat_i_lat, Tensor7 &scat_i_lon, Index &cloudbox_on, const Index &atmfields_checked, const Index &atmgeom_checked, const Index &cloudbox_checked, const Agenda &iy_main_agenda, const Index &atmosphere_dim, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &z_field, const Tensor3 &t_field, const Tensor4 &vmr_field, const ArrayOfIndex &cloudbox_limits, const Vector &f_grid, const Index &stokes_dim, const String &iy_unit, const Agenda &blackbody_radiation_agenda, const Vector &scat_za_grid, const Vector &scat_aa_grid, const Verbosity &)
 WORKSPACE METHOD: CloudboxGetIncoming1DAtm. More...
 
void iyInterpCloudboxField (Matrix &iy, const Tensor7 &scat_i_p, const Tensor7 &scat_i_lat, const Tensor7 &scat_i_lon, const Tensor4 &doit_i_field1D_spectrum, const Vector &rte_pos, const Vector &rte_los, const Index &jacobian_do, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &z_field, const Index &stokes_dim, const Vector &scat_za_grid, const Vector &scat_aa_grid, const Vector &f_grid, const Index &rigorous, const Numeric &maxratio, const Verbosity &verbosity)
 WORKSPACE METHOD: iyInterpCloudboxField. More...
 
void iyInterpPolyCloudboxField (Matrix &iy, const Tensor7 &scat_i_p, const Tensor7 &scat_i_lat, const Tensor7 &scat_i_lon, const Tensor4 &doit_i_field1D_spectrum, const Vector &rte_pos, const Vector &rte_los, const Index &jacobian_do, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &z_field, const Index &stokes_dim, const Vector &scat_za_grid, const Vector &scat_aa_grid, const Vector &f_grid, const Verbosity &verbosity)
 WORKSPACE METHOD: iyInterpPolyCloudboxField. More...
 
void doit_i_fieldSetFromdoit_i_field1D_spectrum (Tensor6 &doit_i_field, const Tensor4 &doit_i_field1D_spectrum, const Tensor7 &scat_i_p, const Vector &scat_za_grid, const Vector &f_grid, const Index &f_index, const Index &atmosphere_dim, const Index &stokes_dim, const ArrayOfIndex &cloudbox_limits, const Verbosity &)
 WORKSPACE METHOD: doit_i_fieldSetFromdoit_i_field1D_spectrum. More...
 
void doit_i_fieldSetClearsky (Tensor6 &doit_i_field, const Tensor7 &scat_i_p, const Tensor7 &scat_i_lat, const Tensor7 &scat_i_lon, const Vector &f_grid, const Index &f_index, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const ArrayOfIndex &cloudbox_limits, const Index &atmosphere_dim, const Index &all_frequencies, const Verbosity &verbosity)
 WORKSPACE METHOD: doit_i_fieldSetClearsky. More...
 
void doit_i_fieldSetConst (Tensor6 &doit_i_field, const Tensor7 &scat_i_p, const Tensor7 &scat_i_lat, const Tensor7 &scat_i_lon, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const ArrayOfIndex &cloudbox_limits, const Index &atmosphere_dim, const Index &stokes_dim, const Vector &doit_i_field_values, const Verbosity &verbosity)
 WORKSPACE METHOD: doit_i_fieldSetConst. More...
 

Variables

const Numeric PI
 
const Numeric RAD2DEG
 

Detailed Description

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

Author
Claudia Emde claud.nosp@m.ia.e.nosp@m.mde@d.nosp@m.lr.d.nosp@m.e
Sreerekha T.R. rekha.nosp@m.@uni.nosp@m.-brem.nosp@m.en.d.nosp@m.e
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_doit.cc.

Function Documentation

◆ CloudboxGetIncoming()

void CloudboxGetIncoming ( Workspace ws,
Tensor7 scat_i_p,
Tensor7 scat_i_lat,
Tensor7 scat_i_lon,
const Index atmfields_checked,
const Index atmgeom_checked,
const Index cloudbox_checked,
const Index doit_is_initialized,
const Agenda iy_main_agenda,
const Index atmosphere_dim,
const Vector lat_grid,
const Vector lon_grid,
const Tensor3 z_field,
const Tensor3 t_field,
const Tensor4 vmr_field,
const Index cloudbox_on,
const ArrayOfIndex cloudbox_limits,
const Vector f_grid,
const Index stokes_dim,
const String iy_unit,
const Agenda blackbody_radiation_agenda,
const Vector scat_za_grid,
const Vector scat_aa_grid,
const Index rigorous,
const Numeric maxratio,
const Verbosity verbosity 
)

WORKSPACE METHOD: CloudboxGetIncoming.

Calculates incoming radiation field of the cloudbox by repeated radiative transfer calculations.

The method performs monochromatic pencil beam calculations for all grid positions on the cloudbox boundary, and all directions given by scattering angle grids (scat_za/aa_grid). Found radiances are stored in scat_i_p/lat/lon which can be used as boundary conditions when scattering inside the cloud box is solved by the DOIT method.

Can only handle iy_unit=1 (intensity in terms of radiances). Other output units need to be derived by unit conversion later on (e.g. after yCalc).

Author
Sreerekha T.R.
Claudia Emde
Parameters
[in,out]wsWorkspace
[out]scat_i_pWS Output
[out]scat_i_latWS Output
[out]scat_i_lonWS Output
[in]atmfields_checkedWS Input
[in]atmgeom_checkedWS Input
[in]cloudbox_checkedWS Input
[in]doit_is_initializedWS Input
[in]iy_main_agendaWS Input
[in]atmosphere_dimWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]z_fieldWS Input
[in]t_fieldWS Input
[in]vmr_fieldWS Input
[in]cloudbox_onWS Input
[in]cloudbox_limitsWS Input
[in]f_gridWS Input
[in]stokes_dimWS Input
[in]iy_unitWS Input
[in]blackbody_radiation_agendaWS Input
[in]scat_za_gridWS Input
[in]scat_aa_gridWS Input
[in]rigorousGeneric Input (Default: "1")
[in]maxratioGeneric Input (Default: "100")

Definition at line 2751 of file m_doit.cc.

References chk_if_in_range(), chk_if_std_blackbody_agenda(), get_iy(), joker, ConstVectorView::nelem(), and Tensor7::resize().

Referenced by CloudboxGetIncoming_g().

◆ CloudboxGetIncoming1DAtm()

void CloudboxGetIncoming1DAtm ( Workspace ws,
Tensor7 scat_i_p,
Tensor7 scat_i_lat,
Tensor7 scat_i_lon,
Index cloudbox_on,
const Index atmfields_checked,
const Index atmgeom_checked,
const Index cloudbox_checked,
const Agenda iy_main_agenda,
const Index atmosphere_dim,
const Vector lat_grid,
const Vector lon_grid,
const Tensor3 z_field,
const Tensor3 t_field,
const Tensor4 vmr_field,
const ArrayOfIndex cloudbox_limits,
const Vector f_grid,
const Index stokes_dim,
const String iy_unit,
const Agenda blackbody_radiation_agenda,
const Vector scat_za_grid,
const Vector scat_aa_grid,
const Verbosity verbosity 
)

WORKSPACE METHOD: CloudboxGetIncoming1DAtm.

As CloudboxGetIncoming but assumes clear sky part to be 1D. The incoming field is calculated only for one position and azimuth angle for each cloud box boundary, and obtained values are used for all other postions and azimuth angles. This works if a 3D cloud box is put into an 1D background atmosphere.

This method can only be used for 3D cases.

Author
Sreerekha T.R.
Claudia Emde
Parameters
[in,out]wsWorkspace
[out]scat_i_pWS Output
[out]scat_i_latWS Output
[out]scat_i_lonWS Output
[out]cloudbox_onWS Output
[in]atmfields_checkedWS Input
[in]atmgeom_checkedWS Input
[in]cloudbox_checkedWS Input
[in]iy_main_agendaWS Input
[in]atmosphere_dimWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]z_fieldWS Input
[in]t_fieldWS Input
[in]vmr_fieldWS Input
[in]cloudbox_limitsWS Input
[in]f_gridWS Input
[in]stokes_dimWS Input
[in]iy_unitWS Input
[in]blackbody_radiation_agendaWS Input
[in]scat_za_gridWS Input
[in]scat_aa_gridWS Input

Definition at line 3048 of file m_doit.cc.

References chk_if_in_range(), chk_if_std_blackbody_agenda(), get_iy(), joker, ConstVectorView::nelem(), and Tensor7::resize().

Referenced by CloudboxGetIncoming1DAtm_g().

◆ doit_conv_flagAbs()

void doit_conv_flagAbs ( Index doit_conv_flag,
Index doit_iteration_counter,
Tensor6 doit_i_field,
const Tensor6 doit_i_field_old,
const Vector epsilon,
const Index max_iterations,
const Index nonconv_return_nan,
const Verbosity verbosity 
)

WORKSPACE METHOD: doit_conv_flagAbs.

DOIT 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: <br> |I(m+1) - I(m)| < epsilon_1 Intensity. <br> |Q(m+1) - Q(m)| < epsilon_2 The other Stokes components. <br> |U(m+1) - U(m)| < epsilon_3
<br> |V(m+1) - V(m)| < epsilon_4
These conditions have to be valid for all positions in the cloudbox and for all directions.

Author
Claudia Emde
Parameters
[out]doit_conv_flagWS Output
[out]doit_iteration_counterWS Output
[out]doit_i_fieldWS Output
[in]doit_i_field_oldWS Input
[in]epsilonGeneric Input
[in]max_iterationsGeneric Input (Default: "100")
[in]nonconv_return_nanGeneric Input (Default: "0")

Definition at line 123 of file m_doit.cc.

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

Referenced by doit_conv_flagAbs_g().

◆ doit_conv_flagAbsBT()

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

WORKSPACE METHOD: doit_conv_flagAbsBT.

DOIT convergence test (maximum absolute difference in Rayleigh Jeans BT)

As doit_conv_flagAbs but convergence limits are specified in Rayleigh-Jeans brighntess temperatures.

Author
Sreerekha T.R.
Claudia Emde
Parameters
[out]doit_conv_flagWS Output
[out]doit_iteration_counterWS Output
[out]doit_i_fieldWS Output
[in]doit_i_field_oldWS Input
[in]f_gridWS Input
[in]f_indexWS Input
[in]epsilonGeneric Input
[in]max_iterationsGeneric Input (Default: "100")
[in]nonconv_return_nanGeneric Input (Default: "0")

Definition at line 254 of file m_doit.cc.

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

Referenced by doit_conv_flagAbsBT_g().

◆ doit_conv_flagLsq()

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

WORKSPACE METHOD: doit_conv_flagLsq.

DOIT convergence test (least squares).

As doit_conv_flagAbsBT but applies a least squares convergence test between two successive iteration fields.

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_flagWS Output
[out]doit_iteration_counterWS Output
[out]doit_i_fieldWS Output
[in]doit_i_field_oldWS Input
[in]f_gridWS Input
[in]f_indexWS Input
[in]epsilonGeneric Input
[in]max_iterationsGeneric Input (Default: "100")
[in]nonconv_return_nanGeneric Input (Default: "0")

Definition at line 398 of file m_doit.cc.

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

Referenced by doit_conv_flagLsq_g().

◆ doit_i_fieldIterate()

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,
const Verbosity verbosity 
)

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: <br> 1. Calculate scattering integral using doit_scat_field_agenda. <br> 2. Calculate RT with fixed scattered field using <br> doit_rte_agenda. <br> 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]wsWorkspace
[out]doit_i_fieldWS Output
[in]doit_scat_field_agendaWS Input
[in]doit_rte_agendaWS Input
[in]doit_conv_test_agendaWS Input

Definition at line 542 of file m_doit.cc.

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

Referenced by doit_i_fieldIterate_g().

◆ doit_i_fieldSetClearsky()

void doit_i_fieldSetClearsky ( Tensor6 doit_i_field,
const Tensor7 scat_i_p,
const Tensor7 scat_i_lat,
const Tensor7 scat_i_lon,
const Vector f_grid,
const Index f_index,
const Vector p_grid,
const Vector lat_grid,
const Vector lon_grid,
const ArrayOfIndex cloudbox_limits,
const Index atmosphere_dim,
const Index all_frequencies,
const Verbosity verbosity 
)

WORKSPACE METHOD: doit_i_fieldSetClearsky.

Interpolate clearsky field on all gridpoints in cloudbox.

This method uses a linear 1D/3D interpolation scheme to obtain the radiation field on all grid points inside the cloud box from the clear sky field on the cloud box boundary. This radiation field is taken as the first guess radiation field in the DOIT module.

Set the all_frequencies to 1 if the clearsky field shall be used as initial field for all frequencies. Set it to 0 if the clear sky field shall be used only for the first frequency in f_grid. For later frequencies, doit_i_field of the previous frequency is then used.

Author
Sreerekha T.R. and Claudia Emde
Parameters
[out]doit_i_fieldWS Output
[in]scat_i_pWS Input
[in]scat_i_latWS Input
[in]scat_i_lonWS Input
[in]f_gridWS Input
[in]f_indexWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]cloudbox_limitsWS Input
[in]atmosphere_dimWS Input
[in]all_frequenciesGeneric Input (Default: "1")

Definition at line 3397 of file m_doit.cc.

References CREATE_OUT2, gridpos(), interp(), interpweights(), joker, ConstTensor7View::nbooks(), ConstTensor7View::ncols(), ConstVectorView::nelem(), ConstTensor7View::nlibraries(), ConstTensor7View::npages(), ConstTensor7View::nrows(), ConstTensor7View::nshelves(), ConstTensor6View::nvitrines(), ConstTensor7View::nvitrines(), p2gridpos(), and Tensor6::resize().

Referenced by doit_i_fieldSetClearsky_g().

◆ doit_i_fieldSetConst()

void doit_i_fieldSetConst ( Tensor6 doit_i_field,
const Tensor7 scat_i_p,
const Tensor7 scat_i_lat,
const Tensor7 scat_i_lon,
const Vector p_grid,
const Vector lat_grid,
const Vector lon_grid,
const ArrayOfIndex cloudbox_limits,
const Index atmosphere_dim,
const Index stokes_dim,
const Vector value,
const Verbosity verbosity 
)

WORKSPACE METHOD: doit_i_fieldSetConst.

This method sets the initial field inside the cloudbox to a constant value. The method works only for monochromatic calculations (number of elements in f_grid=1).

The user can specify a value for each Stokes dimension in the control file by value.

Author
Claudia Emde
Parameters
[out]doit_i_fieldWS Output
[in]scat_i_pWS Input
[in]scat_i_latWS Input
[in]scat_i_lonWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]cloudbox_limitsWS Input
[in]atmosphere_dimWS Input
[in]stokes_dimWS Input
[in]valueGeneric Input

Definition at line 3752 of file m_doit.cc.

References chk_atm_grids(), chk_if_in_range(), CREATE_OUT2, CREATE_OUT3, is_size(), ConstTensor7View::npages(), ConstTensor7View::nrows(), and Tensor6::resize().

Referenced by doit_i_fieldSetConst_g().

◆ doit_i_fieldSetFromdoit_i_field1D_spectrum()

void doit_i_fieldSetFromdoit_i_field1D_spectrum ( Tensor6 doit_i_field,
const Tensor4 doit_i_field1D_spectrum,
const Tensor7 scat_i_p,
const Vector scat_za_grid,
const Vector f_grid,
const Index f_index,
const Index atmosphere_dim,
const Index stokes_dim,
const ArrayOfIndex cloudbox_limits,
const Verbosity verbosity 
)

WORKSPACE METHOD: doit_i_fieldSetFromdoit_i_field1D_spectrum.

Sets the initial cloudbox intensity field from doit_i_field1D_spectrum.

This method sets the (monochromatic) first guess radiation field inside the cloudbox from a precalculated doit_i_field1D_spectrum, e.g., from the solution of a similar atmospheric scenario. The dimensions of doit_i_field1D_Spectrum have to be consistent with the DOIT setup in terms of frequencies, pressure levels inside the cloudbox, polar angles used as well as the stokes dimension. Incoming field on the cloudbox boundaries is adapted to the actual clearsky incoming field as, e.g., calculated by DoitGetIncoming.

Author
Jana Mendrok
Parameters
[out]doit_i_fieldWS Output
[in]doit_i_field1D_spectrumWS Input
[in]scat_i_pWS Input
[in]scat_za_gridWS Input
[in]f_gridWS Input
[in]f_indexWS Input
[in]atmosphere_dimWS Input
[in]stokes_dimWS Input
[in]cloudbox_limitsWS Input

Definition at line 3309 of file m_doit.cc.

References joker, ConstTensor4View::nbooks(), ConstTensor4View::ncols(), ConstVectorView::nelem(), ConstTensor4View::npages(), ConstTensor4View::nrows(), and Tensor6::resize().

Referenced by doit_i_fieldSetFromdoit_i_field1D_spectrum_g().

◆ doit_i_fieldUpdate1D()

void doit_i_fieldUpdate1D ( Workspace ws,
Tensor6 doit_i_field,
const Tensor6 doit_scat_field,
const ArrayOfIndex cloudbox_limits,
const Agenda propmat_clearsky_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 ppath_step_agenda,
const Numeric ppath_lraytrace,
const Vector p_grid,
const Tensor3 z_field,
const Vector refellipsoid,
const Tensor3 t_field,
const Vector f_grid,
const Index f_index,
const Agenda surface_rtprop_agenda,
const Index doit_za_interp,
const Verbosity verbosity 
)

WORKSPACE METHOD: doit_i_fieldUpdate1D.

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

Updates 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]wsWorkspace
[out]doit_i_fieldWS Output
[in]doit_scat_fieldWS Input
[in]cloudbox_limitsWS Input
[in]propmat_clearsky_agendaWS Input
[in]vmr_fieldWS Input
[in]spt_calc_agendaWS Input
[in]scat_za_gridWS Input
[in]pnd_fieldWS Input
[in]opt_prop_part_agendaWS Input
[in]ppath_step_agendaWS Input
[in]ppath_lraytraceWS Input
[in]p_gridWS Input
[in]z_fieldWS Input
[in]refellipsoidWS Input
[in]t_fieldWS Input
[in]f_gridWS Input
[in]f_indexWS Input
[in]surface_rtprop_agendaWS Input
[in]doit_za_interpWS Input

Definition at line 608 of file m_doit.cc.

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

Referenced by doit_i_fieldUpdate1D_g().

◆ doit_i_fieldUpdateSeq1D()

void doit_i_fieldUpdateSeq1D ( Workspace ws,
Tensor6 doit_i_field,
Tensor6 doit_scat_field,
const ArrayOfIndex cloudbox_limits,
const Agenda propmat_clearsky_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 ppath_step_agenda,
const Numeric ppath_lraytrace,
const Vector p_grid,
const Tensor3 z_field,
const Vector refellipsoid,
const Tensor3 t_field,
const Vector f_grid,
const Index f_index,
const Agenda surface_rtprop_agenda,
const Index doit_za_interp,
const Index normalize,
const Numeric norm_error_threshold,
const Index norm_debug,
const Verbosity verbosity 
)

WORKSPACE METHOD: doit_i_fieldUpdateSeq1D.

RT calculation in cloudbox with fixed scattering integral.

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

Author
Claudia Emde
Parameters
[in,out]wsWorkspace
[out]doit_i_fieldWS Output
[out]doit_scat_fieldWS Output
[in]cloudbox_limitsWS Input
[in]propmat_clearsky_agendaWS Input
[in]vmr_fieldWS Input
[in]spt_calc_agendaWS Input
[in]scat_za_gridWS Input
[in]scat_aa_gridWS Input
[in]pnd_fieldWS Input
[in]opt_prop_part_agendaWS Input
[in]ppath_step_agendaWS Input
[in]ppath_lraytraceWS Input
[in]p_gridWS Input
[in]z_fieldWS Input
[in]refellipsoidWS Input
[in]t_fieldWS Input
[in]f_gridWS Input
[in]f_indexWS Input
[in]surface_rtprop_agendaWS Input
[in]doit_za_interpWS Input
[in]normalizeGeneric Input (Default: "1")
[in]norm_error_thresholdGeneric Input (Default: "1.0")
[in]norm_debugGeneric Input (Default: "0")

Definition at line 772 of file m_doit.cc.

References abs, chk_if_decreasing(), chk_if_increasing(), chk_not_empty(), chk_size(), cloud_fieldsCalc(), cloud_ppath_update1D(), CREATE_OUT2, CREATE_OUT3, doit_scat_fieldNormalize(), invrayjean(), is_size(), joker, ConstTensor6View::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), ConstTensor6View::nvitrines(), and RAD2DEG.

Referenced by doit_i_fieldUpdateSeq1D_g().

◆ doit_i_fieldUpdateSeq1DPP()

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 propmat_clearsky_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 Vector p_grid,
const Tensor3 z_field,
const Tensor3 t_field,
const Vector f_grid,
const Index f_index,
const Verbosity verbosity 
)

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]wsWorkspace
[out]doit_i_fieldWS Output
[out]scat_za_indexWS Output
[in]doit_scat_fieldWS Input
[in]cloudbox_limitsWS Input
[in]propmat_clearsky_agendaWS Input
[in]vmr_fieldWS Input
[in]spt_calc_agendaWS Input
[in]scat_za_gridWS Input
[in]pnd_fieldWS Input
[in]opt_prop_part_agendaWS Input
[in]p_gridWS Input
[in]z_fieldWS Input
[in]t_fieldWS Input
[in]f_gridWS Input
[in]f_indexWS Input

Definition at line 1360 of file m_doit.cc.

References cloud_fieldsCalc(), cloud_ppath_update1D_planeparallel(), CREATE_OUT2, CREATE_OUT3, is_size(), ConstTensor6View::ncols(), and ConstVectorView::nelem().

Referenced by doit_i_fieldUpdateSeq1DPP_g().

◆ doit_i_fieldUpdateSeq3D()

void doit_i_fieldUpdateSeq3D ( Workspace ws,
Tensor6 doit_i_field,
const Tensor6 doit_scat_field,
const ArrayOfIndex cloudbox_limits,
const Agenda propmat_clearsky_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 ppath_step_agenda,
const Numeric ppath_lraytrace,
const Vector p_grid,
const Vector lat_grid,
const Vector lon_grid,
const Tensor3 z_field,
const Vector refellipsoid,
const Tensor3 t_field,
const Vector f_grid,
const Index f_index,
const Index doit_za_interp,
const Verbosity verbosity 
)

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.

Author
Claudia Emde
Parameters
[in,out]wsWorkspace
[out]doit_i_fieldWS Output
[in]doit_scat_fieldWS Input
[in]cloudbox_limitsWS Input
[in]propmat_clearsky_agendaWS Input
[in]vmr_fieldWS Input
[in]spt_calc_agendaWS Input
[in]scat_za_gridWS Input
[in]scat_aa_gridWS Input
[in]pnd_fieldWS Input
[in]opt_prop_part_agendaWS Input
[in]ppath_step_agendaWS Input
[in]ppath_lraytraceWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]z_fieldWS Input
[in]refellipsoidWS Input
[in]t_fieldWS Input
[in]f_gridWS Input
[in]f_indexWS Input
[in]doit_za_interpWS Input

Definition at line 1064 of file m_doit.cc.

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

Referenced by doit_i_fieldUpdateSeq3D_g().

◆ doit_scat_fieldCalc()

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,
const Verbosity verbosity 
)

WORKSPACE METHOD: doit_scat_fieldCalc.

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.

Author
Sreerekha T.R.
Claudia Emde
Parameters
[in,out]wsWorkspace
[out]doit_scat_fieldWS Output
[in]pha_mat_spt_agendaWS Input
[in]doit_i_fieldWS Input
[in]pnd_fieldWS Input
[in]t_fieldWS Input
[in]atmosphere_dimWS Input
[in]cloudbox_limitsWS Input
[in]scat_za_gridWS Input
[in]scat_aa_gridWS Input
[in]doit_za_grid_sizeWS Input

Definition at line 1722 of file m_doit.cc.

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

Referenced by doit_scat_fieldCalc_g().

◆ doit_scat_fieldCalcLimb()

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,
const Verbosity verbosity 
)

WORKSPACE METHOD: doit_scat_fieldCalcLimb.

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.

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 near 90 degrees. 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 DoitAngularGridsSet* and it should always be used for limb simulations.

For more information please refer to AUG.

Author
Claudia Emde
Parameters
[in,out]wsWorkspace
[out]doit_scat_fieldWS Output
[in]pha_mat_spt_agendaWS Input
[in]doit_i_fieldWS Input
[in]pnd_fieldWS Input
[in]t_fieldWS Input
[in]atmosphere_dimWS Input
[in]cloudbox_limitsWS Input
[in]scat_za_gridWS Input
[in]scat_aa_gridWS Input
[in]doit_za_grid_sizeWS Input
[in]doit_za_interpWS Input

Definition at line 2022 of file m_doit.cc.

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

Referenced by doit_scat_fieldCalcLimb_g().

◆ doit_za_grid_optCalc()

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,
const Verbosity verbosity 
)

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). Between the grid points the radiation 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_optWS Output
[in]doit_i_fieldWS Input
[in]scat_za_gridWS Input
[in]doit_za_interpWS Input
[in]accGeneric Input

Definition at line 2417 of file m_doit.cc.

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

Referenced by doit_za_grid_optCalc_g().

◆ doit_za_interpSet()

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

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.

Author
Claudia Emde
Parameters
[out]doit_za_interpWS Output
[in]atmosphere_dimWS Input
[in]interp_methodGeneric Input (Default: "linear")

Definition at line 2471 of file m_doit.cc.

References chk_if_in_range().

Referenced by doit_za_interpSet_g().

◆ DoitAngularGridsSet()

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,
const Verbosity verbosity 
)

WORKSPACE METHOD: DoitAngularGridsSet.

Sets the 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* and N_aa_grid. 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 degrees. Such a grid can be generated using doit_za_grid_optCalc. The filename of an optimized zenith angle grid can be given as a keyword (za_grid_opt_file).

If a filename is given, the equidistant grid is used for the calculation of the scattering integrals and the optimized grid is applied for integration of the radiative transfer equation.

For down-looking cases no filename should be specified (za_grid_opt_file = "" ) Using only the equidistant grid makes sense to speed up the calculation.

Author
Claudia Emde
Parameters
[out]doit_za_grid_sizeWS Output
[out]scat_aa_gridWS Output
[out]scat_za_gridWS Output
[in]N_za_gridGeneric Input
[in]N_aa_gridGeneric Input
[in]za_grid_opt_fileGeneric Input

Definition at line 73 of file m_doit.cc.

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

Referenced by DoitAngularGridsSet_g().

◆ DoitCloudboxFieldPut()

void DoitCloudboxFieldPut ( Tensor7 scat_i_p,
Tensor7 scat_i_lat,
Tensor7 scat_i_lon,
Tensor4 doit_i_field1D_spectrum,
const Tensor6 doit_i_field,
const Vector f_grid,
const Index f_index,
const Vector p_grid,
const Vector lat_grid,
const Vector lon_grid,
const Vector scat_za_grid,
const Vector scat_aa_grid,
const Index stokes_dim,
const Index atmosphere_dim,
const ArrayOfIndex cloudbox_limits,
const Verbosity verbosity 
)

WORKSPACE METHOD: DoitCloudboxFieldPut.

Method for the DOIT communication between cloudbox and clearsky.

This method puts the scattered radiation field into the interface variables between the cloudbox and the clearsky, which are scat_i_p*, scat_i_lat and scat_i_lon.

The best way to calculate spectra including the influence of scattering is to set up the doit_mono_agenda where this method can be included.

Author
Claudia Emde
Parameters
[out]scat_i_pWS Output
[out]scat_i_latWS Output
[out]scat_i_lonWS Output
[out]doit_i_field1D_spectrumWS Output
[in]doit_i_fieldWS Input
[in]f_gridWS Input
[in]f_indexWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]scat_za_gridWS Input
[in]scat_aa_gridWS Input
[in]stokes_dimWS Input
[in]atmosphere_dimWS Input
[in]cloudbox_limitsWS Input

Definition at line 2576 of file m_doit.cc.

References chk_atm_grids(), chk_if_in_range(), is_size(), joker, ConstVectorView::nelem(), and Tensor7::resize().

Referenced by DoitCloudboxFieldPut_g().

◆ DoitInit()

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,
Tensor4 doit_i_field1D_spectrum,
Tensor7 scat_i_p,
Tensor7 scat_i_lat,
Tensor7 scat_i_lon,
Index doit_is_initialized,
const Index stokes_dim,
const Index atmosphere_dim,
const Vector f_grid,
const Vector scat_za_grid,
const Vector scat_aa_grid,
const Index doit_za_grid_size,
const Index cloudbox_on,
const ArrayOfIndex cloudbox_limits,
const ArrayOfSingleScatteringData scat_data_array,
const Verbosity verbosity 
)

WORKSPACE METHOD: DoitInit.

Initialises variables for DOIT scattering calculations.

Note that multi-dimensional output variables (Tensors, specifically) are zero-initialized. That is, this methods needs to be called BEFORE other WSMs that provide input to ScatteringDOIT, e.g. before CloudboxGetIncoming.

Author
Claudia Emde
Parameters
[out]scat_p_indexWS Output
[out]scat_lat_indexWS Output
[out]scat_lon_indexWS Output
[out]scat_za_indexWS Output
[out]scat_aa_indexWS Output
[out]doit_scat_fieldWS Output
[out]doit_i_fieldWS Output
[out]doit_i_field1D_spectrumWS Output
[out]scat_i_pWS Output
[out]scat_i_latWS Output
[out]scat_i_lonWS Output
[out]doit_is_initializedWS Output
[in]stokes_dimWS Input
[in]atmosphere_dimWS Input
[in]f_gridWS Input
[in]scat_za_gridWS Input
[in]scat_aa_gridWS Input
[in]doit_za_grid_sizeWS Input
[in]cloudbox_onWS Input
[in]cloudbox_limitsWS Input
[in]scat_data_arrayWS Input

Definition at line 1525 of file m_doit.cc.

References chk_if_in_range(), CREATE_OUT0, CREATE_OUT1, is_increasing(), Array< base >::nelem(), ConstVectorView::nelem(), Tensor4::resize(), Tensor7::resize(), and Tensor6::resize().

Referenced by DoitInit_g().

◆ DoitWriteIterationFields()

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

WORKSPACE METHOD: DoitWriteIterationFields.

Writes DOIT iteration fields.

This method writes intermediate iteration fields to xml-files. The method can be used as a part of doit_conv_test_agenda.

The iterations to be stored are specified by iterations, 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' ... If a number is larger than the total number of iterations, this number is ignored. If all iterations should be stored set <br> iterations = [0]

Author
Claudia Emde
Parameters
[in]doit_iteration_counterWS Input
[in]doit_i_fieldWS Input
[in]iterationsGeneric Input

Definition at line 1684 of file m_doit.cc.

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

Referenced by DoitWriteIterationFields_g().

◆ iyInterpCloudboxField()

void iyInterpCloudboxField ( Matrix iy,
const Tensor7 scat_i_p,
const Tensor7 scat_i_lat,
const Tensor7 scat_i_lon,
const Tensor4 doit_i_field1D_spectrum,
const Vector rtp_pos,
const Vector rtp_los,
const Index jacobian_do,
const Index cloudbox_on,
const ArrayOfIndex cloudbox_limits,
const Index atmosphere_dim,
const Vector p_grid,
const Vector lat_grid,
const Vector lon_grid,
const Tensor3 z_field,
const Index stokes_dim,
const Vector scat_za_grid,
const Vector scat_aa_grid,
const Vector f_grid,
const Index rigorous,
const Numeric maxratio,
const Verbosity verbosity 
)

WORKSPACE METHOD: iyInterpCloudboxField.

Interpolates the intensity field of the cloud box.

This is the standard method to put in iy_cloudbox_agenda if the the scattering inside the cloud box is handled by the DOIT method.

The intensity field is interpolated to the position (specified by rtp_pos*) and direction (specified by rtp_los) given. A linear interpolation is used for all dimensions.

The intensity field on the cloux box boundaries is provided by scat_i_p/lat/lon* and these variables are interpolated if the given position is at any boundary.

Interpolation of the internal field is not yet possible.

Author
Claudia Emde
Parameters
[out]iyWS Output
[in]scat_i_pWS Input
[in]scat_i_latWS Input
[in]scat_i_lonWS Input
[in]doit_i_field1D_spectrumWS Input
[in]rtp_posWS Input
[in]rtp_losWS Input
[in]jacobian_doWS Input
[in]cloudbox_onWS Input
[in]cloudbox_limitsWS Input
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]z_fieldWS Input
[in]stokes_dimWS Input
[in]scat_za_gridWS Input
[in]scat_aa_gridWS Input
[in]f_gridWS Input
[in]rigorousGeneric Input (Default: "1")
[in]maxratioGeneric Input (Default: "3")

Definition at line 3221 of file m_doit.cc.

References iy_interp_cloudbox_field(), and rte_pos2gridpos().

Referenced by iyInterpCloudboxField_g().

◆ iyInterpPolyCloudboxField()

void iyInterpPolyCloudboxField ( Matrix iy,
const Tensor7 scat_i_p,
const Tensor7 scat_i_lat,
const Tensor7 scat_i_lon,
const Tensor4 doit_i_field1D_spectrum,
const Vector rtp_pos,
const Vector rtp_los,
const Index jacobian_do,
const Index cloudbox_on,
const ArrayOfIndex cloudbox_limits,
const Index atmosphere_dim,
const Vector p_grid,
const Vector lat_grid,
const Vector lon_grid,
const Tensor3 z_field,
const Index stokes_dim,
const Vector scat_za_grid,
const Vector scat_aa_grid,
const Vector f_grid,
const Verbosity verbosity 
)

WORKSPACE METHOD: iyInterpPolyCloudboxField.

As iyInterpCloudboxField but performs cubic interpolation.

Works so far only for 1D cases, and accordingly a cubic interpolation along scat_za_grid is performed.

Author
Claudia Emde
Parameters
[out]iyWS Output
[in]scat_i_pWS Input
[in]scat_i_latWS Input
[in]scat_i_lonWS Input
[in]doit_i_field1D_spectrumWS Input
[in]rtp_posWS Input
[in]rtp_losWS Input
[in]jacobian_doWS Input
[in]cloudbox_onWS Input
[in]cloudbox_limitsWS Input
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]z_fieldWS Input
[in]stokes_dimWS Input
[in]scat_za_gridWS Input
[in]scat_aa_gridWS Input
[in]f_gridWS Input

Definition at line 3266 of file m_doit.cc.

References iy_interp_cloudbox_field(), and rte_pos2gridpos().

Referenced by iyInterpPolyCloudboxField_g().

◆ ScatteringDoit()

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 Index atmfields_checked,
const Index atmgeom_checked,
const Index cloudbox_checked,
const Index cloudbox_on,
const Vector f_grid,
const Agenda doit_mono_agenda,
const Index doit_is_initialized,
const Verbosity verbosity 
)

WORKSPACE METHOD: ScatteringDoit.

Main DOIT method.

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]wsWorkspace
[out]doit_i_fieldWS Output
[out]scat_i_pWS Output
[out]scat_i_latWS Output
[out]scat_i_lonWS Output
[out]doit_i_field1D_spectrumWS Output
[in]atmfields_checkedWS Input
[in]atmgeom_checkedWS Input
[in]cloudbox_checkedWS Input
[in]cloudbox_onWS Input
[in]f_gridWS Input
[in]doit_mono_agendaWS Input
[in]doit_is_initializedWS Input

Definition at line 2498 of file m_doit.cc.

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

Referenced by ScatteringDoit_g().

Variable Documentation

◆ PI

const Numeric PI
extern

◆ RAD2DEG

const Numeric RAD2DEG
extern