ARTS  2.4.0(git:4fb77825)
m_doit.cc File Reference

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

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

Go to the source code of this file.

Functions

void DOAngularGridsSet (Index &doit_za_grid_size, Vector &aa_grid, Vector &za_grid, const Index &N_za_grid, const Index &N_aa_grid, const String &za_grid_opt_file, const Verbosity &verbosity)
 WORKSPACE METHOD: DOAngularGridsSet. More...
 
void doit_conv_flagAbs (Index &doit_conv_flag, Index &doit_iteration_counter, Tensor6 &cloudbox_field_mono, const Tensor6 &cloudbox_field_mono_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 &cloudbox_field_mono, const Tensor6 &cloudbox_field_mono_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 &cloudbox_field_mono, const Tensor6 &cloudbox_field_mono_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 cloudbox_field_monoIterate (Workspace &ws, Tensor6 &cloudbox_field_mono, const Agenda &doit_scat_field_agenda, const Agenda &doit_rte_agenda, const Agenda &doit_conv_test_agenda, const Index &accelerated, const Verbosity &verbosity)
 WORKSPACE METHOD: cloudbox_field_monoIterate. More...
 
void cloudbox_fieldUpdate1D (Workspace &ws, Tensor6 &cloudbox_field_mono, 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 &za_grid, const Tensor4 &pnd_field, const Agenda &ppath_step_agenda, const Numeric &ppath_lmax, 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: cloudbox_fieldUpdate1D. More...
 
void cloudbox_fieldUpdateSeq1D (Workspace &ws, Tensor6 &cloudbox_field_mono, Tensor6 &doit_scat_field, const ArrayOfIndex &cloudbox_limits, const Agenda &propmat_clearsky_agenda, const Tensor4 &vmr_field, const Agenda &spt_calc_agenda, const Vector &za_grid, const Vector &aa_grid, const Tensor4 &pnd_field, const Agenda &ppath_step_agenda, const Numeric &ppath_lmax, 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: cloudbox_fieldUpdateSeq1D. More...
 
void cloudbox_fieldUpdateSeq3D (Workspace &ws, Tensor6 &cloudbox_field_mono, 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 &za_grid, const Vector &aa_grid, const Tensor4 &pnd_field, const Agenda &ppath_step_agenda, const Numeric &ppath_lmax, 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: cloudbox_fieldUpdateSeq3D. More...
 
void cloudbox_fieldUpdateSeq1DPP (Workspace &ws, Tensor6 &cloudbox_field_mono, Index &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 &za_grid, const Tensor4 &pnd_field, 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: cloudbox_fieldUpdateSeq1DPP. More...
 
void DoitInit (Tensor6 &doit_scat_field, Tensor7 &cloudbox_field, Index &doit_is_initialized, const Index &stokes_dim, const Index &atmosphere_dim, const Vector &f_grid, const Vector &za_grid, const Vector &aa_grid, const Index &doit_za_grid_size, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const Verbosity &verbosity)
 WORKSPACE METHOD: DoitInit. More...
 
void cloudbox_field_monoOptimizeReverse (Tensor6 &cloudbox_field_mono, const Vector &p_grid_orig, const Vector &p_grid, const ArrayOfIndex &cloudbox_limits, const Verbosity &)
 WORKSPACE METHOD: cloudbox_field_monoOptimizeReverse. More...
 
void OptimizeDoitPressureGrid (Workspace &ws, Vector &p_grid, Tensor4 &pnd_field, Tensor3 &t_field, ArrayOfArrayOfSingleScatteringData &scat_data_mono, Tensor3 &z_field, ArrayOfIndex &cloudbox_limits, Tensor6 &cloudbox_field_mono, Tensor7 &pha_mat_doit, Tensor4 &vmr_field, Vector &p_grid_orig, const Vector &f_grid, const Index &f_index, const Agenda &propmat_clearsky_agenda, const Numeric &tau_scat_max, const Numeric &sgl_alb_max, const Index &cloudbox_size_max, const Verbosity &verbosity)
 WORKSPACE METHOD: OptimizeDoitPressureGrid. More...
 
void DoitWriteIterationFields (const Index &doit_iteration_counter, const Tensor6 &cloudbox_field_mono, const Index &f_index, const ArrayOfIndex &iterations, const ArrayOfIndex &frequencies, 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 &cloudbox_field_mono, const Tensor4 &pnd_field, const Tensor3 &t_field, const Index &atmosphere_dim, const ArrayOfIndex &cloudbox_limits, const Vector &za_grid, const Vector &aa_grid, const Index &doit_za_grid_size, const Tensor7 &pha_mat_doit, 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 &cloudbox_field_mono, const Tensor4 &pnd_field, const Tensor3 &t_field, const Index &atmosphere_dim, const ArrayOfIndex &cloudbox_limits, const Vector &za_grid, const Vector &aa_grid, const Index &doit_za_grid_size, const Index &doit_za_interp, const Tensor7 &pha_mat_doit, const Verbosity &verbosity)
 WORKSPACE METHOD: doit_scat_fieldCalcLimb. More...
 
void doit_za_grid_optCalc (Vector &doit_za_grid_opt, const Tensor6 &cloudbox_field_mono, const Vector &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 DoitCalc (Workspace &ws, Tensor7 &cloudbox_field, const Index &atmfields_checked, const Index &atmgeom_checked, const Index &cloudbox_checked, const Index &scat_data_checked, const Index &cloudbox_on, const Vector &f_grid, const Agenda &doit_mono_agenda, const Index &doit_is_initialized, const Verbosity &verbosity)
 WORKSPACE METHOD: DoitCalc. More...
 
void DoitGetIncoming (Workspace &ws, Tensor7 &cloudbox_field, 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 EnergyLevelMap &nlte_field, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const Vector &f_grid, const Index &stokes_dim, const Vector &za_grid, const Vector &aa_grid, const Index &rigorous, const Numeric &maxratio, const Verbosity &)
 WORKSPACE METHOD: DoitGetIncoming. More...
 
void DoitGetIncoming1DAtm (Workspace &ws, Tensor7 &cloudbox_field, Index &cloudbox_on, 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 EnergyLevelMap &nlte_field, const ArrayOfIndex &cloudbox_limits, const Vector &f_grid, const Index &stokes_dim, const Vector &za_grid, const Vector &aa_grid, const Verbosity &)
 WORKSPACE METHOD: DoitGetIncoming1DAtm. More...
 
void cloudbox_fieldSetFromPrecalc (Tensor7 &cloudbox_field, const Vector &za_grid, const Vector &f_grid, const Index &atmosphere_dim, const Index &stokes_dim, const ArrayOfIndex &cloudbox_limits, const Index &doit_is_initialized, const Tensor7 &cloudbox_field_precalc, const Verbosity &)
 WORKSPACE METHOD: cloudbox_fieldSetFromPrecalc. More...
 
void cloudbox_fieldSetClearsky (Tensor7 &cloudbox_field, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const ArrayOfIndex &cloudbox_limits, const Index &atmosphere_dim, const Index &cloudbox_on, const Index &doit_is_initialized, const Index &all_frequencies, const Verbosity &verbosity)
 WORKSPACE METHOD: cloudbox_fieldSetClearsky. More...
 
void cloudbox_fieldSetConst (Tensor7 &cloudbox_field, 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 &cloudbox_field_values, const Verbosity &verbosity)
 WORKSPACE METHOD: cloudbox_fieldSetConst. More...
 
void cloudbox_fieldSetConstPerFreq (Tensor7 &cloudbox_field, 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 Matrix &cloudbox_field_values, const Verbosity &verbosity)
 WORKSPACE METHOD: cloudbox_fieldSetConstPerFreq. More...
 
void cloudbox_field_monoSetConst (Tensor6 &cloudbox_field_mono, 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 &cloudbox_field_values, const Verbosity &verbosity)
 WORKSPACE METHOD: cloudbox_field_monoSetConst. 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

◆ cloudbox_field_monoIterate()

void cloudbox_field_monoIterate ( Workspace ws,
Tensor6 cloudbox_field_mono,
const Agenda doit_scat_field_agenda,
const Agenda doit_rte_agenda,
const Agenda doit_conv_test_agenda,
const Index accelerated,
const Verbosity verbosity 
)

WORKSPACE METHOD: cloudbox_field_monoIterate.

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, Jakob Doerr
Parameters
[in,out]wsWorkspace
[in,out]cloudbox_field_monoWS Input/Output
[in]doit_scat_field_agendaWS Input
[in]doit_rte_agendaWS Input
[in]doit_conv_test_agendaWS Input
[in]acceleratedGeneric Input (Default: "0")

Definition at line 497 of file m_doit.cc.

References chk_not_empty(), ARTS::Var::cloudbox_field_mono(), CREATE_OUT2, ARTS::Var::doit_conv_test_agenda(), ARTS::Var::doit_rte_agenda(), and ARTS::Var::doit_scat_field_agenda().

Referenced by cloudbox_field_monoIterate_g().

◆ cloudbox_field_monoOptimizeReverse()

void cloudbox_field_monoOptimizeReverse ( Tensor6 cloudbox_field_mono,
const Vector p_grid_orig,
const Vector p_grid,
const ArrayOfIndex cloudbox_limits,
const Verbosity verbosity 
)

WORKSPACE METHOD: cloudbox_field_monoOptimizeReverse.

Interpolate cloudbox_field_mono back to the original p_grid. For detailed description, see OptimizeDoitPressureGrid.

Author
Jakob Doerr
Parameters
[in,out]cloudbox_field_monoWS Input/Output
[in]p_grid_origWS Input
[in]p_gridWS Input
[in]cloudbox_limitsWS Input

Definition at line 1699 of file m_doit.cc.

References chk_interpolation_grids(), ARTS::Var::cloudbox_field_mono(), ARTS::Var::cloudbox_limits(), gridpos(), interp(), interpweights(), joker, Array< base >::nelem(), ARTS::Var::p_grid(), and ARTS::Var::p_grid_orig().

Referenced by cloudbox_field_monoOptimizeReverse_g().

◆ cloudbox_field_monoSetConst()

void cloudbox_field_monoSetConst ( Tensor6 cloudbox_field_mono,
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: cloudbox_field_monoSetConst.

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
[in,out]cloudbox_field_monoWS Input/Output
[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 3793 of file m_doit.cc.

References ARTS::Var::atmosphere_dim(), chk_atm_grids(), chk_if_in_range(), ARTS::Var::cloudbox_field_mono(), ARTS::Var::cloudbox_limits(), CREATE_OUT2, CREATE_OUT3, joker, ARTS::Var::lat_grid(), ARTS::Var::lon_grid(), ARTS::Var::p_grid(), and ARTS::Var::stokes_dim().

Referenced by cloudbox_field_monoSetConst_g(), cloudbox_fieldSetConst(), and cloudbox_fieldSetConstPerFreq().

◆ cloudbox_fieldSetClearsky()

void cloudbox_fieldSetClearsky ( Tensor7 cloudbox_field,
const Vector p_grid,
const Vector lat_grid,
const Vector lon_grid,
const ArrayOfIndex cloudbox_limits,
const Index atmosphere_dim,
const Index cloudbox_on,
const Index doit_is_initialized,
const Index all_frequencies,
const Verbosity verbosity 
)

WORKSPACE METHOD: cloudbox_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 cloudbox 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, cloudbox_field of the previous frequency is then used.

Author
Sreerekha T.R. and Claudia Emde
Parameters
[in,out]cloudbox_fieldWS Input/Output
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]cloudbox_limitsWS Input
[in]atmosphere_dimWS Input
[in]cloudbox_onWS Input
[in]doit_is_initializedWS Input
[in]all_frequenciesGeneric Input (Default: "1")

Definition at line 3467 of file m_doit.cc.

References ARTS::Var::aa_index(), ARTS::Var::atmosphere_dim(), ARTS::Var::cloudbox_field(), ARTS::Var::cloudbox_limits(), ARTS::Var::cloudbox_on(), CREATE_OUT2, ARTS::Var::doit_is_initialized(), ARTS::Var::f_index(), gridpos(), interp(), interpweights(), joker, ARTS::Var::lat_grid(), ARTS::Var::lon_grid(), p2gridpos(), ARTS::Var::p_grid(), and ARTS::Var::za_index().

Referenced by cloudbox_fieldSetClearsky_g().

◆ cloudbox_fieldSetConst()

void cloudbox_fieldSetConst ( Tensor7 cloudbox_field,
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: cloudbox_fieldSetConst.

This method sets the initial field inside the cloudbox to a constant value.

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

Author
Claudia Emde
Parameters
[in,out]cloudbox_fieldWS Input/Output
[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 3706 of file m_doit.cc.

References ARTS::Var::atmosphere_dim(), ARTS::Var::cloudbox_field(), ARTS::Var::cloudbox_field_mono(), cloudbox_field_monoSetConst(), ARTS::Var::cloudbox_limits(), CREATE_OUT2, ARTS::Var::f_index(), joker, ARTS::Var::lat_grid(), ARTS::Var::lon_grid(), ARTS::Var::p_grid(), ARTS::Var::stokes_dim(), and ARTS::Var::verbosity().

Referenced by cloudbox_fieldSetConst_g().

◆ cloudbox_fieldSetConstPerFreq()

void cloudbox_fieldSetConstPerFreq ( Tensor7 cloudbox_field,
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 Matrix value,
const Verbosity verbosity 
)

WORKSPACE METHOD: cloudbox_fieldSetConstPerFreq.

This method sets the initial field inside the cloudbox to a constant value per frequency slice.

The user has specify a value for each frequency and Stokes dimension in the control file by value.

Author
Jana Mendrok
Parameters
[in,out]cloudbox_fieldWS Input/Output
[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 3747 of file m_doit.cc.

References ARTS::Var::atmosphere_dim(), ARTS::Var::cloudbox_field(), ARTS::Var::cloudbox_field_mono(), cloudbox_field_monoSetConst(), ARTS::Var::cloudbox_limits(), CREATE_OUT2, ARTS::Var::f_index(), joker, ARTS::Var::lat_grid(), ARTS::Var::lon_grid(), ConstMatrixView::nrows(), ARTS::Var::p_grid(), ARTS::Var::stokes_dim(), and ARTS::Var::verbosity().

Referenced by cloudbox_fieldSetConstPerFreq_g().

◆ cloudbox_fieldSetFromPrecalc()

void cloudbox_fieldSetFromPrecalc ( Tensor7 cloudbox_field,
const Vector za_grid,
const Vector f_grid,
const Index atmosphere_dim,
const Index stokes_dim,
const ArrayOfIndex cloudbox_limits,
const Index doit_is_initialized,
const Tensor7 cloudbox_field_precalc,
const Verbosity verbosity 
)

WORKSPACE METHOD: cloudbox_fieldSetFromPrecalc.

Sets the initial cloudbox intensity field cloudbox_field from a precalculated field.

This method sets the (monochromatic) first guess radiation field inside the cloudbox from a precalculated cloudbox_field_precalc, e.g., from the solution of a similar atmospheric scenario. The dimensions of cloudbox_field_precalc 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
[in,out]cloudbox_fieldWS Input/Output
[in]za_gridWS Input
[in]f_gridWS Input
[in]atmosphere_dimWS Input
[in]stokes_dimWS Input
[in]cloudbox_limitsWS Input
[in]doit_is_initializedWS Input
[in]cloudbox_field_precalcGeneric Input

Definition at line 3364 of file m_doit.cc.

References ARTS::Var::atmosphere_dim(), ARTS::Var::cloudbox_field(), ARTS::Var::cloudbox_limits(), ARTS::Var::doit_is_initialized(), ARTS::Var::f_grid(), joker, ConstTensor7View::ncols(), ConstTensor7View::nlibraries(), ConstTensor7View::npages(), ConstTensor7View::nvitrines(), ARTS::Var::stokes_dim(), and ARTS::Var::za_grid().

Referenced by cloudbox_fieldSetFromPrecalc_g().

◆ cloudbox_fieldUpdate1D()

void cloudbox_fieldUpdate1D ( Workspace ws,
Tensor6 cloudbox_field_mono,
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 za_grid,
const Tensor4 pnd_field,
const Agenda ppath_step_agenda,
const Numeric ppath_lmax,
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: cloudbox_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 cloudbox_fieldUpdateSeq1D.

Author
Claudia Emde
Parameters
[in,out]wsWorkspace
[in,out]cloudbox_field_monoWS Input/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]za_gridWS Input
[in]pnd_fieldWS Input
[in]ppath_step_agendaWS Input
[in]ppath_lmaxWS 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 591 of file m_doit.cc.

References chk_if_decreasing(), chk_if_increasing(), chk_not_empty(), chk_size(), cloud_fieldsCalc(), cloud_ppath_update1D_noseq(), ARTS::Var::cloudbox_field_mono(), ARTS::Var::cloudbox_limits(), CREATE_OUT2, CREATE_OUT3, ARTS::Var::doit_scat_field(), ARTS::Var::doit_za_interp(), ARTS::Var::f_grid(), ARTS::Var::f_index(), is_size(), ARTS::Var::p_grid(), ARTS::Var::pnd_field(), ARTS::Var::ppath_lmax(), ARTS::Var::ppath_lraytrace(), ARTS::Var::ppath_step_agenda(), ARTS::Var::propmat_clearsky_agenda(), ARTS::Var::refellipsoid(), ARTS::Var::spt_calc_agenda(), ARTS::Var::stokes_dim(), ARTS::Var::surface_rtprop_agenda(), ARTS::Var::t_field(), ARTS::Var::verbosity(), ARTS::Var::vmr_field(), ARTS::Var::z_field(), and ARTS::Var::za_grid().

Referenced by cloudbox_fieldUpdate1D_g().

◆ cloudbox_fieldUpdateSeq1D()

void cloudbox_fieldUpdateSeq1D ( Workspace ws,
Tensor6 cloudbox_field_mono,
Tensor6 doit_scat_field,
const ArrayOfIndex cloudbox_limits,
const Agenda propmat_clearsky_agenda,
const Tensor4 vmr_field,
const Agenda spt_calc_agenda,
const Vector za_grid,
const Vector aa_grid,
const Tensor4 pnd_field,
const Agenda ppath_step_agenda,
const Numeric ppath_lmax,
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: cloudbox_fieldUpdateSeq1D.

RT calculation in cloudbox with fixed scattering integral.

Updates radiation field (cloudbox_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
[in,out]cloudbox_field_monoWS Input/Output
[in,out]doit_scat_fieldWS Input/Output
[in]cloudbox_limitsWS Input
[in]propmat_clearsky_agendaWS Input
[in]vmr_fieldWS Input
[in]spt_calc_agendaWS Input
[in]za_gridWS Input
[in]aa_gridWS Input
[in]pnd_fieldWS Input
[in]ppath_step_agendaWS Input
[in]ppath_lmaxWS 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 771 of file m_doit.cc.

References ARTS::Var::aa_grid(), abs, chk_if_decreasing(), chk_if_increasing(), chk_not_empty(), chk_size(), cloud_fieldsCalc(), cloud_ppath_update1D(), ARTS::Var::cloudbox_field_mono(), ARTS::Var::cloudbox_limits(), CREATE_OUT2, CREATE_OUT3, ARTS::Var::doit_scat_field(), doit_scat_fieldNormalize(), ARTS::Var::doit_za_interp(), ARTS::Var::f_grid(), ARTS::Var::f_index(), invrayjean(), is_size(), joker, ARTS::Var::p_grid(), ARTS::Var::pnd_field(), ARTS::Var::ppath_lmax(), ARTS::Var::ppath_lraytrace(), ARTS::Var::ppath_step_agenda(), ARTS::Var::propmat_clearsky_agenda(), RAD2DEG, ARTS::Var::refellipsoid(), ARTS::Var::spt_calc_agenda(), ARTS::Var::stokes_dim(), ARTS::Var::surface_rtprop_agenda(), ARTS::Var::t_field(), ARTS::Var::verbosity(), ARTS::Var::vmr_field(), ARTS::Var::z_field(), and ARTS::Var::za_grid().

Referenced by cloudbox_fieldUpdateSeq1D_g().

◆ cloudbox_fieldUpdateSeq1DPP()

void cloudbox_fieldUpdateSeq1DPP ( Workspace ws,
Tensor6 cloudbox_field_mono,
Index 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 za_grid,
const Tensor4 pnd_field,
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: cloudbox_fieldUpdateSeq1DPP.

RT calculation in cloudbox with fixed scattering integral.

<br> Update radiation field (cloudbox_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 cloudbox_fieldUpdateSeq1D* and it is less accurate. It can not be used for limb simulations.

Author
Sreerekha T.R.
Parameters
[in,out]wsWorkspace
[in,out]cloudbox_field_monoWS Input/Output
[out]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]za_gridWS Input
[in]pnd_fieldWS Input
[in]p_gridWS Input
[in]z_fieldWS Input
[in]t_fieldWS Input
[in]f_gridWS Input
[in]f_indexWS Input

Definition at line 1410 of file m_doit.cc.

References ARTS::Var::aa_index(), cloud_fieldsCalc(), cloud_ppath_update1D_planeparallel(), ARTS::Var::cloudbox_field_mono(), ARTS::Var::cloudbox_limits(), CREATE_OUT2, CREATE_OUT3, ARTS::Var::doit_scat_field(), ARTS::Var::f_grid(), ARTS::Var::f_index(), is_size(), ARTS::Var::p_grid(), ARTS::Var::pnd_field(), ARTS::Var::propmat_clearsky_agenda(), ARTS::Var::spt_calc_agenda(), ARTS::Var::stokes_dim(), ARTS::Var::t_field(), ARTS::Var::verbosity(), ARTS::Var::vmr_field(), ARTS::Var::z_field(), ARTS::Var::za_grid(), and ARTS::Var::za_index().

Referenced by cloudbox_fieldUpdateSeq1DPP_g().

◆ cloudbox_fieldUpdateSeq3D()

void cloudbox_fieldUpdateSeq3D ( Workspace ws,
Tensor6 cloudbox_field_mono,
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 za_grid,
const Vector aa_grid,
const Tensor4 pnd_field,
const Agenda ppath_step_agenda,
const Numeric ppath_lmax,
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: cloudbox_fieldUpdateSeq3D.

RT calculation in cloudbox with fixed scattering integral.

Update radiation field (cloudbox_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
[in,out]cloudbox_field_monoWS Input/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]za_gridWS Input
[in]aa_gridWS Input
[in]pnd_fieldWS Input
[in]ppath_step_agendaWS Input
[in]ppath_lmaxWS 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 1096 of file m_doit.cc.

References ARTS::Var::aa_grid(), ARTS::Var::aa_index(), chk_atm_grids(), chk_if_increasing(), chk_not_empty(), chk_size(), cloud_fieldsCalc(), cloud_ppath_update3D(), ARTS::Var::cloudbox_field_mono(), ARTS::Var::cloudbox_limits(), CREATE_OUT2, CREATE_OUT3, ARTS::Var::doit_scat_field(), ARTS::Var::doit_za_interp(), ARTS::Var::f_grid(), ARTS::Var::f_index(), is_size(), joker, ARTS::Var::lat_grid(), ARTS::Var::lon_grid(), ARTS::Var::p_grid(), ARTS::Var::pnd_field(), ARTS::Var::ppath_lmax(), ARTS::Var::ppath_lraytrace(), ARTS::Var::ppath_step_agenda(), ARTS::Var::propmat_clearsky_agenda(), RAD2DEG, ARTS::Var::refellipsoid(), ARTS::Var::spt_calc_agenda(), ARTS::Var::stokes_dim(), ARTS::Var::t_field(), ARTS::Var::verbosity(), ARTS::Var::vmr_field(), ARTS::Var::z_field(), ARTS::Var::za_grid(), and ARTS::Var::za_index().

Referenced by cloudbox_fieldUpdateSeq3D_g().

◆ DOAngularGridsSet()

void DOAngularGridsSet ( Index doit_za_grid_size,
Vector aa_grid,
Vector za_grid,
const Index N_za_grid,
const Index N_aa_grid,
const String za_grid_opt_file,
const Verbosity verbosity 
)

WORKSPACE METHOD: DOAngularGridsSet.

Sets the angular grids for Discrete Ordinate type scattering calculations.

This method sets the angular grids for the Discrete Ordinate type scattering calculations (DOIT, DISORT). For down- und up-looking geometries it suffices to define N_za_grid (both solvers) and N_aa_grid* (DOIT). From these numbers equally spaced grids are created and stored in the WSVs za_grid and aa_grid.

For limb simulations it is important to use an optimized zenith angle grid with a very fine resolution around the horizon (za=90 degrees). Such a grid can be generated using doit_za_grid_optCalc*. To be applied, the name of the file holding the optimized angle grid has to be given (za_grid_opt_file).

When an optimized grid is present, the equidistant grid is used for the calculation of the scattering integrals, while the optimized grid is applied for the integration of the radiative transfer equation. Otherwise the equidistant grid is used throughout. For down-looking cases using the equidistant grid typically suffices and speeds up the calculations.

Author
Claudia Emde
Parameters
[out]doit_za_grid_sizeWS Output
[out]aa_gridWS Output
[out]za_gridWS Output
[in]N_za_gridGeneric Input
[in]N_aa_gridGeneric Input (Default: "1")
[in]za_grid_opt_fileGeneric Input (Default: "")

Definition at line 70 of file m_doit.cc.

References ARTS::Var::aa_grid(), ARTS::Var::doit_za_grid_size(), nlinspace(), ARTS::Var::verbosity(), xml_read_from_file(), and ARTS::Var::za_grid().

Referenced by DOAngularGridsSet_g().

◆ doit_conv_flagAbs()

void doit_conv_flagAbs ( Index doit_conv_flag,
Index doit_iteration_counter,
Tensor6 cloudbox_field_mono,
const Tensor6 cloudbox_field_mono_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
[in,out]doit_conv_flagWS Input/Output
[in,out]doit_iteration_counterWS Input/Output
[in,out]cloudbox_field_monoWS Input/Output
[in]cloudbox_field_mono_oldWS Input
[in]epsilonGeneric Input
[in]max_iterationsGeneric Input (Default: "100")
[in]nonconv_return_nanGeneric Input (Default: "0")

Definition at line 115 of file m_doit.cc.

References ARTS::Var::aa_index(), abs, ARTS::Var::cloudbox_field_mono(), ARTS::Var::cloudbox_field_mono_old(), CREATE_OUT1, CREATE_OUT2, ARTS::Var::doit_conv_flag(), ARTS::Var::doit_iteration_counter(), is_size(), ConstVectorView::nelem(), ARTS::Var::stokes_dim(), and ARTS::Var::za_index().

Referenced by doit_conv_flagAbs_g().

◆ doit_conv_flagAbsBT()

void doit_conv_flagAbsBT ( Index doit_conv_flag,
Index doit_iteration_counter,
Tensor6 cloudbox_field_mono,
const Tensor6 cloudbox_field_mono_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
[in,out]doit_conv_flagWS Input/Output
[in,out]doit_iteration_counterWS Input/Output
[in,out]cloudbox_field_monoWS Input/Output
[in]cloudbox_field_mono_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 231 of file m_doit.cc.

References ARTS::Var::aa_index(), abs, chk_if_increasing(), ARTS::Var::cloudbox_field_mono(), ARTS::Var::cloudbox_field_mono_old(), CREATE_OUT1, CREATE_OUT2, ARTS::Var::doit_conv_flag(), ARTS::Var::doit_iteration_counter(), ARTS::Var::f_grid(), ARTS::Var::f_index(), invrayjean(), is_size(), ConstVectorView::nelem(), ARTS::Var::stokes_dim(), and ARTS::Var::za_index().

Referenced by doit_conv_flagAbsBT_g().

◆ doit_conv_flagLsq()

void doit_conv_flagLsq ( Index doit_conv_flag,
Index doit_iteration_counter,
Tensor6 cloudbox_field_mono,
const Tensor6 cloudbox_field_mono_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
[in,out]doit_conv_flagWS Input/Output
[in,out]doit_iteration_counterWS Input/Output
[in,out]cloudbox_field_monoWS Input/Output
[in]cloudbox_field_mono_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 370 of file m_doit.cc.

References ARTS::Var::aa_index(), chk_if_increasing(), ARTS::Var::cloudbox_field_mono(), ARTS::Var::cloudbox_field_mono_old(), CREATE_OUT1, CREATE_OUT2, ARTS::Var::doit_conv_flag(), ARTS::Var::doit_iteration_counter(), ARTS::Var::f_grid(), ARTS::Var::f_index(), invrayjean(), is_size(), ConstVectorView::nelem(), pow(), sqrt(), ARTS::Var::stokes_dim(), and ARTS::Var::za_index().

Referenced by doit_conv_flagLsq_g().

◆ doit_scat_fieldCalc()

void doit_scat_fieldCalc ( Workspace ws,
Tensor6 doit_scat_field,
const Agenda pha_mat_spt_agenda,
const Tensor6 cloudbox_field_mono,
const Tensor4 pnd_field,
const Tensor3 t_field,
const Index atmosphere_dim,
const ArrayOfIndex cloudbox_limits,
const Vector za_grid,
const Vector aa_grid,
const Index doit_za_grid_size,
const Tensor7 pha_mat_doit,
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
[in,out]doit_scat_fieldWS Input/Output
[in]pha_mat_spt_agendaWS Input
[in]cloudbox_field_monoWS Input
[in]pnd_fieldWS Input
[in]t_fieldWS Input
[in]atmosphere_dimWS Input
[in]cloudbox_limitsWS Input
[in]za_gridWS Input
[in]aa_gridWS Input
[in]doit_za_grid_sizeWS Input
[in]pha_mat_doitWS Input

Definition at line 2081 of file m_doit.cc.

References ARTS::Var::aa_grid(), AngIntegrate_trapezoid(), AngIntegrate_trapezoid_opti(), ARTS::Var::atmosphere_dim(), chk_not_empty(), ARTS::Var::cloudbox_field_mono(), ARTS::Var::cloudbox_limits(), CREATE_OUT2, CREATE_OUT3, ARTS::Var::doit_scat_field(), ARTS::Var::doit_za_grid_size(), is_size(), joker, ARTS::Var::pha_mat_doit(), ARTS::Var::pha_mat_spt_agenda(), pha_mat_spt_agendaExecute(), pha_matCalc(), PI, ARTS::Var::pnd_field(), ARTS::Var::stokes_dim(), ARTS::Var::t_field(), ARTS::Var::verbosity(), and ARTS::Var::za_grid().

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 cloudbox_field_mono,
const Tensor4 pnd_field,
const Tensor3 t_field,
const Index atmosphere_dim,
const ArrayOfIndex cloudbox_limits,
const Vector za_grid,
const Vector aa_grid,
const Index doit_za_grid_size,
const Index doit_za_interp,
const Tensor7 pha_mat_doit,
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 DOAngularGridsSet* and it should always be used for limb simulations.

For more information please refer to AUG.

Author
Claudia Emde
Parameters
[in,out]wsWorkspace
[in,out]doit_scat_fieldWS Input/Output
[in]pha_mat_spt_agendaWS Input
[in]cloudbox_field_monoWS Input
[in]pnd_fieldWS Input
[in]t_fieldWS Input
[in]atmosphere_dimWS Input
[in]cloudbox_limitsWS Input
[in]za_gridWS Input
[in]aa_gridWS Input
[in]doit_za_grid_sizeWS Input
[in]doit_za_interpWS Input
[in]pha_mat_doitWS Input

Definition at line 2355 of file m_doit.cc.

References ARTS::Var::aa_grid(), AngIntegrate_trapezoid(), AngIntegrate_trapezoid_opti(), ARTS::Var::atmosphere_dim(), chk_not_empty(), ARTS::Var::cloudbox_field_mono(), ARTS::Var::cloudbox_limits(), CREATE_OUT1, CREATE_OUT2, CREATE_OUT3, ARTS::Var::doit_scat_field(), ARTS::Var::doit_za_grid_size(), ARTS::Var::doit_za_interp(), gridpos(), interp(), interp_poly(), interpweights(), is_size(), joker, ConstVectorView::nelem(), nlinspace(), ARTS::Var::pha_mat_doit(), ARTS::Var::pha_mat_spt_agenda(), pha_mat_spt_agendaExecute(), pha_matCalc(), PI, ARTS::Var::pnd_field(), ARTS::Var::stokes_dim(), ARTS::Var::t_field(), ARTS::Var::verbosity(), and ARTS::Var::za_grid().

Referenced by doit_scat_fieldCalcLimb_g().

◆ doit_za_grid_optCalc()

void doit_za_grid_optCalc ( Vector doit_za_grid_opt,
const Tensor6 cloudbox_field_mono,
const Vector 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 (cloudbox_field) which is calculated on a very fine zenith angle grid (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]cloudbox_field_monoWS Input
[in]za_gridWS Input
[in]doit_za_interpWS Input
[in]accGeneric Input

Definition at line 2709 of file m_doit.cc.

References chk_size(), ARTS::Var::cloudbox_field_mono(), CREATE_OUT1, ARTS::Var::doit_za_grid_opt(), ARTS::Var::doit_za_interp(), ARTS::Var::za_grid(), 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 2770 of file m_doit.cc.

References ARTS::Var::atmosphere_dim(), chk_if_in_range(), and ARTS::Var::doit_za_interp().

Referenced by doit_za_interpSet_g().

◆ DoitCalc()

void DoitCalc ( Workspace ws,
Tensor7 cloudbox_field,
const Index atmfields_checked,
const Index atmgeom_checked,
const Index cloudbox_checked,
const Index scat_data_checked,
const Index cloudbox_on,
const Vector f_grid,
const Agenda doit_mono_agenda,
const Index doit_is_initialized,
const Verbosity verbosity 
)

WORKSPACE METHOD: DoitCalc.

Main DOIT method.

This method executes doit_mono_agenda for each frequency in f_grid. The output is the radiation field inside the cloudbox (cloudbox_field).

Author
Claudia Emde
Parameters
[in,out]wsWorkspace
[in,out]cloudbox_fieldWS Input/Output
[in]atmfields_checkedWS Input
[in]atmgeom_checkedWS Input
[in]cloudbox_checkedWS Input
[in]scat_data_checkedWS Input
[in]cloudbox_onWS Input
[in]f_gridWS Input
[in]doit_mono_agendaWS Input
[in]doit_is_initializedWS Input

Definition at line 2795 of file m_doit.cc.

References ARTS::Var::atmfields_checked(), ARTS::Var::atmgeom_checked(), chk_if_increasing(), chk_not_empty(), ARTS::Var::cloudbox_checked(), ARTS::Var::cloudbox_field(), ARTS::Var::cloudbox_on(), CREATE_OUT0, CREATE_OUT2, ARTS::Var::doit_is_initialized(), ARTS::Var::doit_mono_agenda(), doit_mono_agendaExecute(), ARTS::Var::f_grid(), ARTS::Var::f_index(), joker, and ARTS::Var::scat_data_checked().

Referenced by DoitCalc_g().

◆ DoitGetIncoming()

void DoitGetIncoming ( Workspace ws,
Tensor7 cloudbox_field,
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 EnergyLevelMap nlte_field,
const Index cloudbox_on,
const ArrayOfIndex cloudbox_limits,
const Vector f_grid,
const Index stokes_dim,
const Vector za_grid,
const Vector aa_grid,
const Index rigorous,
const Numeric maxratio,
const Verbosity verbosity 
)

WORKSPACE METHOD: DoitGetIncoming.

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 cloudbox_field which can be used as boundary conditions when scattering inside the cloud box is solved by the DoitCalc* method.

Note that cloudbox_field will always hold intensity in terms of radiances, regardless of the setting of iy_unit (unit conversion is done within yCalc or iyCalc, which will provide their output in terms of the specified iy_unit; no explicit unit conversion by the user necessary.).

Author
Sreerekha T.R.
Claudia Emde
Parameters
[in,out]wsWorkspace
[in,out]cloudbox_fieldWS Input/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]nlte_fieldWS Input
[in]cloudbox_onWS Input
[in]cloudbox_limitsWS Input
[in]f_gridWS Input
[in]stokes_dimWS Input
[in]za_gridWS Input
[in]aa_gridWS Input
[in]rigorousGeneric Input (Default: "1")
[in]maxratioGeneric Input (Default: "100")

Definition at line 2912 of file m_doit.cc.

References ARTS::Var::aa_grid(), ARTS::Var::aa_index(), ARTS::Var::atmfields_checked(), ARTS::Var::atmgeom_checked(), ARTS::Var::atmosphere_dim(), chk_if_in_range(), ARTS::Var::cloudbox_checked(), ARTS::Var::cloudbox_field(), ARTS::Var::cloudbox_limits(), ARTS::Var::cloudbox_on(), ARTS::Var::doit_is_initialized(), ARTS::Var::f_grid(), get_iy(), ARTS::Var::iy(), ARTS::Var::iy_main_agenda(), ARTS::Var::iy_unit(), joker, ARTS::Var::lat_grid(), ARTS::Var::lon_grid(), ARTS::Var::nlte_field(), ARTS::Var::ppath(), ARTS::Var::stokes_dim(), ARTS::Var::z_field(), ARTS::Var::za_grid(), and ARTS::Var::za_index().

Referenced by DoitGetIncoming_g().

◆ DoitGetIncoming1DAtm()

void DoitGetIncoming1DAtm ( Workspace ws,
Tensor7 cloudbox_field,
Index cloudbox_on,
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 EnergyLevelMap nlte_field,
const ArrayOfIndex cloudbox_limits,
const Vector f_grid,
const Index stokes_dim,
const Vector za_grid,
const Vector aa_grid,
const Verbosity verbosity 
)

WORKSPACE METHOD: DoitGetIncoming1DAtm.

As DoitGetIncoming 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
[in,out]cloudbox_fieldWS Input/Output
[in,out]cloudbox_onWS Input/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]nlte_fieldWS Input
[in]cloudbox_limitsWS Input
[in]f_gridWS Input
[in]stokes_dimWS Input
[in]za_gridWS Input
[in]aa_gridWS Input

Definition at line 3208 of file m_doit.cc.

References ARTS::Var::aa_grid(), ARTS::Var::aa_index(), ARTS::Var::atmfields_checked(), ARTS::Var::atmgeom_checked(), ARTS::Var::atmosphere_dim(), chk_if_in_range(), ARTS::Var::cloudbox_checked(), ARTS::Var::cloudbox_field(), ARTS::Var::cloudbox_limits(), ARTS::Var::cloudbox_on(), ARTS::Var::doit_is_initialized(), ARTS::Var::f_grid(), get_iy(), ARTS::Var::iy(), ARTS::Var::iy_main_agenda(), ARTS::Var::iy_unit(), joker, ARTS::Var::lat(), ARTS::Var::lat_grid(), ARTS::Var::lon(), ARTS::Var::lon_grid(), ARTS::Var::nlte_field(), ARTS::Var::ppath(), ARTS::Var::stokes_dim(), ARTS::Var::z_field(), ARTS::Var::za_grid(), and ARTS::Var::za_index().

Referenced by DoitGetIncoming1DAtm_g().

◆ DoitInit()

void DoitInit ( Tensor6 doit_scat_field,
Tensor7 cloudbox_field,
Index doit_is_initialized,
const Index stokes_dim,
const Index atmosphere_dim,
const Vector f_grid,
const Vector za_grid,
const Vector aa_grid,
const Index doit_za_grid_size,
const Index cloudbox_on,
const ArrayOfIndex cloudbox_limits,
const Verbosity verbosity 
)

WORKSPACE METHOD: DoitInit.

Initialises variables for DOIT scattering calculations.

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

Author
Claudia Emde
Parameters
[out]doit_scat_fieldWS Output
[out]cloudbox_fieldWS Output
[out]doit_is_initializedWS Output
[in]stokes_dimWS Input
[in]atmosphere_dimWS Input
[in]f_gridWS Input
[in]za_gridWS Input
[in]aa_gridWS Input
[in]doit_za_grid_sizeWS Input
[in]cloudbox_onWS Input
[in]cloudbox_limitsWS Input

Definition at line 1582 of file m_doit.cc.

References ARTS::Var::aa_grid(), ARTS::Var::atmosphere_dim(), chk_if_in_range(), ARTS::Var::cloudbox_field(), ARTS::Var::cloudbox_limits(), ARTS::Var::cloudbox_on(), CREATE_OUT0, CREATE_OUT1, ARTS::Var::doit_is_initialized(), ARTS::Var::doit_scat_field(), ARTS::Var::doit_za_grid_size(), ARTS::Var::f_grid(), is_increasing(), ARTS::Var::stokes_dim(), and ARTS::Var::za_grid().

Referenced by DoitInit_g().

◆ DoitWriteIterationFields()

void DoitWriteIterationFields ( const Index doit_iteration_counter,
const Tensor6 cloudbox_field_mono,
const Index f_index,
const ArrayOfIndex iterations,
const ArrayOfIndex frequencies,
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. If a number is larger than the total number of iterations, this number is ignored. If all iterations should be stored set <br> iterations = [-1]

The frequencies to be stored are specified by frequencies in the same way as the iterations. The frequency index corresponds to the order of frequencies in f_grid.

The output files are named doit_iteration_fX_iY.xml with X being the frequency index and iY the iteration counter.

Author
Claudia Emde
Parameters
[in]doit_iteration_counterWS Input
[in]cloudbox_field_monoWS Input
[in]f_indexWS Input
[in]iterationsGeneric Input (Default: "[-1]")
[in]frequenciesGeneric Input (Default: "[-1]")

Definition at line 2032 of file m_doit.cc.

References ARTS::Var::cloudbox_field_mono(), ARTS::Var::doit_iteration_counter(), ARTS::Var::f_index(), FILE_TYPE_ASCII, Array< base >::nelem(), ARTS::Var::verbosity(), and xml_write_to_file().

Referenced by DoitWriteIterationFields_g().

◆ OptimizeDoitPressureGrid()

void OptimizeDoitPressureGrid ( Workspace ws,
Vector p_grid,
Tensor4 pnd_field,
Tensor3 t_field,
ArrayOfArrayOfSingleScatteringData scat_data_mono,
Tensor3 z_field,
ArrayOfIndex cloudbox_limits,
Tensor6 cloudbox_field_mono,
Tensor7 pha_mat_doit,
Tensor4 vmr_field,
Vector p_grid_orig,
const Vector f_grid,
const Index f_index,
const Agenda propmat_clearsky_agenda,
const Numeric tau_scat_max,
const Numeric sgl_alb_max,
const Index cloudbox_size_max,
const Verbosity verbosity 
)

WORKSPACE METHOD: OptimizeDoitPressureGrid.

Optimization of the pressure grid for RT calculation. The methods consists of three parts: 1) Calculate the single scattering albedo and the scattering opticalthickness from the scattering and absorption species. 2) Enhance z_field according to the two thresholds sgl_alb_max and tau_scat_max.If the resulting cloudbox size is bigger than cloudbox_size_max, this step is repeated with a higher threshold of tau_scat_max. 3) Interpolate all variables used in doit_mono_agenda to the new z_field This method should be called inside doit_mono_agenda*, right before cloudbox_field_monoIterate. It can only be used if ScatSpeciesMerge has been called and if it is called, cloudbox_field_monoOptimizeReverse has to be called right after cloudbox_field_monoIterate to interpolate cloudbox_field_mono* back to the original size. Optimization currently only works with stokes_dim = 1 .

Author
Jakob Doerr
Parameters
[in,out]wsWorkspace
[in,out]p_gridWS Input/Output
[in,out]pnd_fieldWS Input/Output
[in,out]t_fieldWS Input/Output
[in,out]scat_data_monoWS Input/Output
[in,out]z_fieldWS Input/Output
[in,out]cloudbox_limitsWS Input/Output
[in,out]cloudbox_field_monoWS Input/Output
[in,out]pha_mat_doitWS Input/Output
[in,out]vmr_fieldWS Input/Output
[out]p_grid_origWS Output
[in]f_gridWS Input
[in]f_indexWS Input
[in]propmat_clearsky_agendaWS Input
[in]tau_scat_maxGeneric Input (Default: "0.1")
[in]sgl_alb_maxGeneric Input (Default: "0.9")
[in]cloudbox_size_maxGeneric Input (Default: "200")

Definition at line 1732 of file m_doit.cc.

References ARTS::Var::abs_vec(), ARTS::Var::cloudbox_field_mono(), ARTS::Var::cloudbox_limits(), CREATE_OUT2, CREATE_OUT3, ARTS::Var::ext_mat(), ARTS::Var::p_grid(), ARTS::Var::p_grid_orig(), ARTS::Var::pnd_field(), ARTS::Var::scat_data_mono(), and ARTS::Var::z_field().

Referenced by OptimizeDoitPressureGrid_g().

Variable Documentation

◆ PI

const Numeric PI
extern

◆ RAD2DEG

const Numeric RAD2DEG
extern