ARTS
2.3.1285(git:92a29ea9-dirty)
|
This file contains functions to calculate the radiative transfer inside the cloudbox using the DOIT method. More...
#include "doit.h"
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <stdexcept>
#include "agenda_class.h"
#include "array.h"
#include "auto_md.h"
#include "check_input.h"
#include "cloudbox.h"
#include "geodetic.h"
#include "lin_alg.h"
#include "logic.h"
#include "math_funcs.h"
#include "matpackVII.h"
#include "messages.h"
#include "physics_funcs.h"
#include "ppath.h"
#include "propagationmatrix.h"
#include "rte.h"
#include "sorting.h"
#include "special_interp.h"
#include "xml_io.h"
Go to the source code of this file.
Functions | |
void | rte_step_doit_replacement (VectorView stokes_vec, MatrixView trans_mat, const PropagationMatrix &ext_mat_av, const StokesVector &abs_vec_av, ConstVectorView sca_vec_av, const Numeric &lstep, const Numeric &rtp_planck_value, const bool &trans_is_precalc) |
Solves monochromatic VRTE for an atmospheric slab with constant conditions. More... | |
void | cloud_fieldsCalc (Workspace &ws, Tensor5View ext_mat_field, Tensor4View abs_vec_field, const Agenda &spt_calc_agenda, const Index &za_index, const Index &aa_index, const ArrayOfIndex &cloudbox_limits, ConstTensor3View t_field, ConstTensor4View pnd_field, const Verbosity &verbosity) |
Calculate ext_mat, abs_vec for all points inside the cloudbox for one. More... | |
void | cloud_ppath_update1D (Workspace &ws, Tensor6View cloudbox_field_mono, const Index &p_index, const Index &za_index, ConstVectorView za_grid, const ArrayOfIndex &cloudbox_limits, ConstTensor6View doit_scat_field, const Agenda &propmat_clearsky_agenda, ConstTensor4View vmr_field, const Agenda &ppath_step_agenda, const Numeric &ppath_lmax, const Numeric &ppath_lraytrace, ConstVectorView p_grid, ConstTensor3View z_field, ConstVectorView refellipsoid, ConstTensor3View t_field, ConstVectorView f_grid, const Index &f_index, ConstTensor5View ext_mat_field, ConstTensor4View abs_vec_field, const Agenda &surface_rtprop_agenda, const Index &scat_za_interp, const Verbosity &verbosity) |
Calculates radiation field along a propagation path step for specified zenith direction and pressure level. More... | |
void | cloud_ppath_update1D_noseq (Workspace &ws, Tensor6View cloudbox_field_mono, const Index &p_index, const Index &za_index, ConstVectorView za_grid, const ArrayOfIndex &cloudbox_limits, ConstTensor6View cloudbox_field_mono_old, ConstTensor6View doit_scat_field, const Agenda &propmat_clearsky_agenda, ConstTensor4View vmr_field, const Agenda &ppath_step_agenda, const Numeric &ppath_lmax, const Numeric &ppath_lraytrace, ConstVectorView p_grid, ConstTensor3View z_field, ConstVectorView refellipsoid, ConstTensor3View t_field, ConstVectorView f_grid, const Index &f_index, ConstTensor5View ext_mat_field, ConstTensor4View abs_vec_field, const Agenda &surface_rtprop_agenda, const Index &scat_za_interp, const Verbosity &verbosity) |
Calculation of radiation field along a propagation path step for specified zenith direction and pressure level. More... | |
void | cloud_ppath_update1D_planeparallel (Workspace &ws, Tensor6View cloudbox_field_mono, const Index &p_index, const Index &za_index, ConstVectorView za_grid, const ArrayOfIndex &cloudbox_limits, ConstTensor6View doit_scat_field, const Agenda &propmat_clearsky_agenda, ConstTensor4View vmr_field, ConstVectorView p_grid, ConstTensor3View z_field, ConstTensor3View t_field, ConstVectorView f_grid, const Index &f_index, ConstTensor5View ext_mat_field, ConstTensor4View abs_vec_field, const Verbosity &verbosity) |
Radiative transfer calculation inside cloudbox for planeparallel case. More... | |
void | cloud_ppath_update3D (Workspace &ws, Tensor6View cloudbox_field_mono, const Index &p_index, const Index &lat_index, const Index &lon_index, const Index &za_index, const Index &aa_index, ConstVectorView za_grid, ConstVectorView aa_grid, const ArrayOfIndex &cloudbox_limits, ConstTensor6View doit_scat_field, const Agenda &propmat_clearsky_agenda, ConstTensor4View vmr_field, const Agenda &ppath_step_agenda, const Numeric &ppath_lmax, const Numeric &ppath_lraytrace, ConstVectorView p_grid, ConstVectorView lat_grid, ConstVectorView lon_grid, ConstTensor3View z_field, ConstVectorView refellipsoid, ConstTensor3View t_field, ConstVectorView f_grid, const Index &f_index, ConstTensor5View ext_mat_field, ConstTensor4View abs_vec_field, const Index &, const Verbosity &verbosity) |
Radiative transfer calculation along a path inside the cloudbox (3D). More... | |
void | cloud_RT_no_background (Workspace &ws, Tensor6View cloudbox_field_mono, const Agenda &propmat_clearsky_agenda, const Ppath &ppath_step, ConstVectorView t_int, ConstMatrixView vmr_list_int, ConstTensor3View ext_mat_int, ConstMatrixView abs_vec_int, ConstMatrixView sca_vec_int, ConstMatrixView cloudbox_field_mono_int, ConstVectorView p_int, const ArrayOfIndex &cloudbox_limits, ConstVectorView f_grid, const Index &f_index, const Index &p_index, const Index &lat_index, const Index &lon_index, const Index &za_index, const Index &aa_index, const Verbosity &verbosity) |
Calculates RT in the cloudbox (1D) More... | |
void | cloud_RT_surface (Workspace &ws, Tensor6View cloudbox_field_mono, const Agenda &surface_rtprop_agenda, ConstVectorView f_grid, const Index &f_index, const Index &stokes_dim, const Ppath &ppath_step, const ArrayOfIndex &cloudbox_limits, ConstVectorView za_grid, const Index &za_index) |
Calculates RT in the cloudbox. More... | |
void | cloudbox_field_ngAcceleration (Tensor6 &cloudbox_field_mono, const ArrayOfTensor6 &acceleration_input, const Index &accelerated, const Verbosity &) |
Convergence acceleration. More... | |
void | interp_cloud_coeff1D (Tensor3View ext_mat_int, MatrixView abs_vec_int, MatrixView sca_vec_int, MatrixView cloudbox_field_mono_int, VectorView t_int, MatrixView vmr_list_int, VectorView p_int, ConstTensor5View ext_mat_field, ConstTensor4View abs_vec_field, ConstTensor6View doit_scat_field, ConstTensor6View cloudbox_field_mono, ConstTensor3View t_field, ConstTensor4View vmr_field, ConstVectorView p_grid, const Ppath &ppath_step, const ArrayOfIndex &cloudbox_limits, ConstVectorView za_grid, const Index &scat_za_interp, const Verbosity &verbosity) |
Interpolate all inputs of the VRTE on a propagation path step. More... | |
void | za_gridOpt (Vector &za_grid_opt, Matrix &cloudbox_field_opt, ConstVectorView za_grid_fine, ConstTensor6View cloudbox_field_mono, const Numeric &acc, const Index &scat_za_interp) |
Optimize the zenith angle grid. More... | |
void | doit_scat_fieldNormalize (Workspace &ws, Tensor6 &doit_scat_field, const Tensor6 &cloudbox_field_mono, const ArrayOfIndex &cloudbox_limits, const Agenda &spt_calc_agenda, const Index &atmosphere_dim, const Vector &za_grid, const Vector &aa_grid, const Tensor4 &pnd_field, const Tensor3 &t_field, const Numeric &norm_error_threshold, const Index &norm_debug, const Verbosity &verbosity) |
Normalization of scattered field. More... | |
Variables | |
const Numeric | PI |
const Numeric | RAD2DEG |
This file contains functions to calculate the radiative transfer inside the cloudbox using the DOIT method.
Definition in file doit.cc.
void cloud_fieldsCalc | ( | Workspace & | ws, |
Tensor5View | ext_mat_field, | ||
Tensor4View | abs_vec_field, | ||
const Agenda & | spt_calc_agenda, | ||
const Index & | za_index, | ||
const Index & | aa_index, | ||
const ArrayOfIndex & | cloudbox_limits, | ||
ConstTensor3View | t_field, | ||
ConstTensor4View | pnd_field, | ||
const Verbosity & | verbosity | ||
) |
Calculate ext_mat, abs_vec for all points inside the cloudbox for one.
sca_vec can be obtained from the workspace variable doit_scat_field. As we need the average for each layer, it makes sense to calculte the coefficients once and store them in an array instead of calculating at each point the coefficient of the point above and the point below.
[out] | ws | Current Workspace |
[out] | ext_mat_field | extinction matrix field |
[out] | abs_vec_field | absorption vector field |
[in] | spt_calc_agenda | Agenda for calculation of single scattering properties |
[in] | za_index | Indices for |
[in] | aa_index | propagation direction |
[in] | cloudbox_limits | Cloudbox limits. |
[in] | t_field | Temperature field |
[in] | pnd_field | Particle number density field. |
[in] | verbosity | Verbosity setting |
Definition at line 163 of file doit.cc.
References CREATE_OUT3, joker, PropagationMatrix::MatrixAtPosition(), ConstTensor4View::nbooks(), ConstTensor4View::ncols(), ConstTensor5View::ncols(), Array< base >::nelem(), ConstTensor5View::nrows(), opt_prop_bulkCalc(), pm, spt_calc_agendaExecute(), and StokesVector::VectorAtPosition().
Referenced by cloudbox_fieldUpdate1D(), cloudbox_fieldUpdateSeq1D(), cloudbox_fieldUpdateSeq1DPP(), cloudbox_fieldUpdateSeq3D(), and doit_scat_fieldNormalize().
void cloud_ppath_update1D | ( | Workspace & | ws, |
Tensor6View | i_field, | ||
const Index & | p_index, | ||
const Index & | za_index, | ||
ConstVectorView | za_grid, | ||
const ArrayOfIndex & | cloudbox_limits, | ||
ConstTensor6View | scat_field, | ||
const Agenda & | propmat_clearsky_agenda, | ||
ConstTensor4View | vmr_field, | ||
const Agenda & | ppath_step_agenda, | ||
const Numeric & | ppath_lmax, | ||
const Numeric & | ppath_lraytrace, | ||
ConstVectorView | p_grid, | ||
ConstTensor3View | z_field, | ||
ConstVectorView | refellipsoid, | ||
ConstTensor3View | t_field, | ||
ConstVectorView | f_grid, | ||
const Index & | f_index, | ||
ConstTensor5View | ext_mat_field, | ||
ConstTensor4View | abs_vec_field, | ||
const Agenda & | surface_rtprop_agenda, | ||
const Index & | scat_za_interp, | ||
const Verbosity & | verbosity | ||
) |
Calculates radiation field along a propagation path step for specified zenith direction and pressure level.
This function is used in the sequential update and called inside a loop over the pressure grid. In the function the intersection point of the propagation path with the next layer is calculated and all atmospheric properties are interpolated an the intersection point. Then a radiative transfer step is performed.
[in,out] | ws | Current Workspace |
[out] | i_field | Updated radiation field inside the cloudbox. |
[in] | p_index | Pressure index |
[in] | za_index | Index for proagation direction |
[in] | za_grid | Zenith angle grid |
[in] | cloudbox_limits | The limits of the cloud box |
[in] | scat_field | Scattered field |
[in] | propmat_clearsky_agenda | calculates the absorption coefficient matrix |
[in] | vmr_field | VMR field |
[in] | ppath_step_agenda | Calculation of a propagation path step |
[in] | ppath_lmax | Maximum length between points describing propagation paths |
[in] | ppath_lraytrace | Maximum length of ray tracing steps when determining propagation paths |
[in] | p_grid | Pressure grid |
[in] | z_field | Field of geometrical altitudes |
[in] | refellipsoid | Reference ellipsoid |
[in] | t_field | Atmospheric temperature field |
[in] | f_grid | The frequency grid for monochromatic pencil beam calculations |
[in] | f_index | Frequency index |
[in] | ext_mat_field | Extinction matrix field |
[in] | abs_vec_field | Absorption matrix field |
[in] | surface_rtprop_agenda | Provides radiative properties of the surface |
[in] | scat_za_interp | Flag for interplation method in zenith angle dimension |
[in] | verbosity | Verbosity setting |
Definition at line 301 of file doit.cc.
References abs, Ppath::gp_p, Ppath::los, Ppath::pos, ppath_init_structure(), ppath_step_agendaExecute(), and Ppath::r.
Referenced by cloudbox_fieldUpdateSeq1D().
void cloud_ppath_update1D_noseq | ( | Workspace & | ws, |
Tensor6View | cloudbox_field_mono, | ||
const Index & | p_index, | ||
const Index & | za_index, | ||
ConstVectorView | za_grid, | ||
const ArrayOfIndex & | cloudbox_limits, | ||
ConstTensor6View | cloudbox_field_mono_old, | ||
ConstTensor6View | doit_scat_field, | ||
const Agenda & | propmat_clearsky_agenda, | ||
ConstTensor4View | vmr_field, | ||
const Agenda & | ppath_step_agenda, | ||
const Numeric & | ppath_lmax, | ||
const Numeric & | ppath_lraytrace, | ||
ConstVectorView | p_grid, | ||
ConstTensor3View | z_field, | ||
ConstVectorView | refellipsoid, | ||
ConstTensor3View | t_field, | ||
ConstVectorView | f_grid, | ||
const Index & | f_index, | ||
ConstTensor5View | ext_mat_field, | ||
ConstTensor4View | abs_vec_field, | ||
const Agenda & | surface_rtprop_agenda, | ||
const Index & | scat_za_interp, | ||
const Verbosity & | verbosity | ||
) |
Calculation of radiation field along a propagation path step for specified zenith direction and pressure level.
Basically the same as cloud_ppath_update1D, the only difference is that i_field_old is always used as incoming Stokes vector.
[in,out] | ws | Current Workspace |
[out] | cloudbox_field_mono | Updated radiation field inside the cloudbox. |
[in] | p_index | Pressure index |
[in] | za_index | Index for propagation direction |
[in] | za_grid | Zenith angle grid |
[in] | cloudbox_limits | The limits of the cloud box |
[in] | cloudbox_field_mono_old | Radiation field inside the cloudbox from previous iteration step |
[in] | doit_scat_field | Scattered field |
[in] | propmat_clearsky_agenda | calculates the absorption coefficient matrix |
[in] | vmr_field | VMR field |
[in] | ppath_step_agenda | Calculation of a propagation path step |
[in] | ppath_lmax | Maximum length between points describing propagation paths |
[in] | ppath_lraytrace | Maximum length of ray tracing steps when determining propagation paths |
[in] | p_grid | Pressure grid |
[in] | z_field | Field of geometrical altitudes |
[in] | refellipsoid | Reference ellipsoid |
[in] | t_field | Atmospheric temperature field |
[in] | f_grid | The frequency grid for monochromatic pencil beam calculations |
[in] | f_index | Frequency index |
[in] | ext_mat_field | Extinction matrix field |
[in] | abs_vec_field | Absorption matrix field |
[in] | surface_rtprop_agenda | Provides radiative properties of the surface |
[in] | scat_za_interp | Flag for interplation method in zenith angle dimension |
[in] | verbosity | Verbosity setting |
Definition at line 457 of file doit.cc.
References abs, Ppath::gp_p, Ppath::los, Ppath::pos, ppath_init_structure(), ppath_step_agendaExecute(), and Ppath::r.
Referenced by cloudbox_fieldUpdate1D().
void cloud_ppath_update1D_planeparallel | ( | Workspace & | ws, |
Tensor6View | cloudbox_field_mono, | ||
const Index & | p_index, | ||
const Index & | za_index, | ||
ConstVectorView | za_grid, | ||
const ArrayOfIndex & | cloudbox_limits, | ||
ConstTensor6View | scat_field, | ||
const Agenda & | propmat_clearsky_agenda, | ||
ConstTensor4View | vmr_field, | ||
ConstVectorView | p_grid, | ||
ConstTensor3View | z_field, | ||
ConstTensor3View | t_field, | ||
ConstVectorView | f_grid, | ||
const Index & | f_index, | ||
ConstTensor5View | ext_mat_field, | ||
ConstTensor4View | abs_vec_field, | ||
const Verbosity & | verbosity | ||
) |
Radiative transfer calculation inside cloudbox for planeparallel case.
This function calculates the radiation field along a line of sight. This function is used for the sequential update of the radiation field and called inside a loop over the pressure grid.
The function gets all the atmospheric points on the pressure grid. Then a radiative transfer step is performed using the stokes vector as output and input. The inermediate Stokes vectors are stored in the WSV cloudbox_field_mono.
[in,out] | ws | Current Workspace |
[out] | cloudbox_field_mono | Updated radiation field inside the cloudbox. |
[in] | p_index | Pressure index |
[in] | za_index | Index for propagation direction |
[in] | za_grid | Zenith angle grid |
[in] | cloudbox_limits | The limits of the cloud box |
[in] | scat_field | Scattered field. |
[in] | propmat_clearsky_agenda | calculates the absorption coefficient matrix |
[in] | vmr_field | VMR field |
[in] | p_grid | Pressure grid |
[in] | z_field | Field of geometrical altitudes |
[in] | t_field | Atmospheric temperature field |
[in] | f_grid | The frequency grid for monochromatic pencil beam calculations |
[in] | f_index | Frequency index |
[in] | ext_mat_field | Extinction matrix field |
[in] | abs_vec_field | Absorption matrix field |
[in] | verbosity | Verbosity setting |
Definition at line 615 of file doit.cc.
References CREATE_OUT3, joker, ConstTensor4View::nbooks(), and ConstTensor6View::ncols().
Referenced by cloudbox_fieldUpdateSeq1DPP().
void cloud_ppath_update3D | ( | Workspace & | ws, |
Tensor6View | cloudbox_field_mono, | ||
const Index & | p_index, | ||
const Index & | lat_index, | ||
const Index & | lon_index, | ||
const Index & | za_index, | ||
const Index & | aa_index, | ||
ConstVectorView | za_grid, | ||
ConstVectorView | aa_grid, | ||
const ArrayOfIndex & | cloudbox_limits, | ||
ConstTensor6View | doit_scat_field, | ||
const Agenda & | propmat_clearsky_agenda, | ||
ConstTensor4View | vmr_field, | ||
const Agenda & | ppath_step_agenda, | ||
const Numeric & | ppath_lmax, | ||
const Numeric & | ppath_lraytrace, | ||
ConstVectorView | p_grid, | ||
ConstVectorView | lat_grid, | ||
ConstVectorView | lon_grid, | ||
ConstTensor3View | z_field, | ||
ConstVectorView | refellipsoid, | ||
ConstTensor3View | t_field, | ||
ConstVectorView | f_grid, | ||
const Index & | f_index, | ||
ConstTensor5View | ext_mat_field, | ||
ConstTensor4View | abs_vec_field, | ||
const Index & | , | ||
const Verbosity & | verbosity | ||
) |
Radiative transfer calculation along a path inside the cloudbox (3D).
This function calculates the radiation field along a propagation path step for a specified zenith direction. This function is used for the sequential update if the radiation field and called inside a loop over the pressure grid. In the function the intersection point of the propagation path with the next layer is calculated and all atmospheric properties are interpolated an the intersection point. Then a radiative transfer step is performed using the stokes vector as output and input. The inermediate Stokes vectors are stored in the WSV cloudbox_field_mono.
[in,out] | ws | Current workspace |
[out] | cloudbox_field_mono | Updated radiation field inside the cloudbox. |
[in] | p_index | Pressure index |
[in] | lat_index | Latitude index |
[in] | lon_index | Longitude index |
[in] | za_index | Index for propagation zenith direction |
[in] | aa_index | Index for propagation azimuth direction |
[in] | za_grid | Zenith angle grid |
[in] | aa_grid | Azimuth angle grid |
[in] | cloudbox_limits | The limits of the cloud box |
[in] | doit_scat_field | Scattered field. |
[in] | propmat_clearsky_agenda | calculates the absorption coefficient matrix |
[in] | vmr_field | VMR field |
[in] | ppath_step_agenda | Calculation of a propagation path step |
[in] | ppath_lmax | Maximum length between points describing propagation paths |
[in] | ppath_lraytrace | Maximum length of ray tracing steps when determining propagation paths |
[in] | p_grid | Pressure grid |
[in] | lat_grid | Latidue grid |
[in] | lon_grid | Longitude grid |
[in] | z_field | Field of geometrical altitudes |
[in] | refellipsoid | Reference ellipsoid |
[in] | t_field | Atmospheric temperature field |
[in] | f_grid | The frequency grid for monochromatic pencil beam calculations |
[in] | f_index | Frequency index |
[in] | ext_mat_field | Extinction matrix field |
[in] | abs_vec_field | Absorption matrix field |
[in] | verbosity | Verbosity setting |
Definition at line 1108 of file doit.cc.
References cloud_RT_no_background(), CREATE_OUT3, Ppath::gp_lat, Ppath::gp_lon, Ppath::gp_p, gridpos(), gridpos_upperend_check(), i, interp(), interpweights(), is_inside_cloudbox(), itw2p(), joker, Ppath::los, ConstTensor4View::nbooks(), ConstTensor6View::ncols(), ConstVectorView::nelem(), Ppath::np, Ppath::pos, ppath_init_structure(), ppath_step_agendaExecute(), Ppath::r, and refell2r().
Referenced by cloudbox_fieldUpdateSeq3D().
void cloud_RT_no_background | ( | Workspace & | ws, |
Tensor6View | cloudbox_field_mono, | ||
const Agenda & | propmat_clearsky_agenda, | ||
const Ppath & | ppath_step, | ||
ConstVectorView | t_int, | ||
ConstMatrixView | vmr_list_int, | ||
ConstTensor3View | ext_mat_int, | ||
ConstMatrixView | abs_vec_int, | ||
ConstMatrixView | sca_vec_int, | ||
ConstMatrixView | cloudbox_field_mono_int, | ||
ConstVectorView | p_int, | ||
const ArrayOfIndex & | cloudbox_limits, | ||
ConstVectorView | f_grid, | ||
const Index & | f_index, | ||
const Index & | p_index, | ||
const Index & | lat_index, | ||
const Index & | lon_index, | ||
const Index & | za_index, | ||
const Index & | aa_index, | ||
const Verbosity & | verbosity | ||
) |
Calculates RT in the cloudbox (1D)
This function calculates RT in the cloudbox (1D) if the next intersected level is an atmospheric level (in contrast to the surface). It is used inside the functions cloud_ppath_update1DXXX.
[in,out] | ws | Current workspace |
[out] | cloudbox_field_mono | Radiation field in cloudbox |
[in] | propmat_clearsky_agenda | Calculate gas absorption |
[in] | ppath_step | Propagation path step from one pressure level to the next |
[in] | t_int | Temperature values interpolated on propagation path points |
[in] | vmr_list_int | Interpolated volume mixing ratios |
[in] | ext_mat_int | Interpolated total particle extinction matrix |
[in] | abs_vec_int | Interpolated total particle absorption vector |
[in] | sca_vec_int | Interpolated total particle scattering vector |
[in] | cloudbox_field_mono_int | Interpolated radiances |
[in] | p_int | Interpolated pressure values |
[in] | cloudbox_limits | Cloudbox limits |
[in] | f_grid | Frequency grid |
[in] | f_index | Frequency index of (monochromatic) scattering calculation |
[in] | p_index | Pressure index in cloudbox_field_mono |
[in] | lat_index | Latitude index |
[in] | lon_index | Longitude index |
[in] | za_index | Zenith angle index in cloudbox_field_mono |
[in] | aa_index | Azimuth angle index in cloudbox_field_mono |
[in] | verbosity | Verbosity setting |
Definition at line 1382 of file doit.cc.
References CREATE_OUT3, joker, ConstTensor6View::ncols(), Array< base >::nelem(), Ppath::np, and ConstMatrixView::nrows().
Referenced by cloud_ppath_update3D().
void cloud_RT_surface | ( | Workspace & | ws, |
Tensor6View | cloudbox_field_mono, | ||
const Agenda & | surface_rtprop_agenda, | ||
ConstVectorView | f_grid, | ||
const Index & | f_index, | ||
const Index & | stokes_dim, | ||
const Ppath & | ppath_step, | ||
const ArrayOfIndex & | cloudbox_limits, | ||
ConstVectorView | za_grid, | ||
const Index & | za_index | ||
) |
Calculates RT in the cloudbox.
This function calculates RT in the cloudbox if the next intersected level is the surface.
[in,out] | ws | Current workspace |
[out] | cloudbox_field_mono | Radiation field in cloudbox |
[in] | surface_rtprop_agenda | Provides radiative properties of the surface |
[in] | f_grid | Frequency grid |
[in] | f_index | Frequency index of (monochromatic) scattering calculation |
[in] | stokes_dim | Dimension of Stokes vector |
[in] | ppath_step | Propagation path step |
[in] | cloudbox_limits | Cloudbox limits |
[in] | za_grid | Zenith angle grid |
[in] | za_index | Zenith angle index |
Definition at line 1547 of file doit.cc.
References chk_not_empty(), Ppath::dim, joker, Ppath::los, mult(), ConstMatrixView::ncols(), ConstVectorView::nelem(), Ppath::np, ConstMatrixView::nrows(), Ppath::pos, Vector::resize(), and surface_rtprop_agendaExecute().
void cloudbox_field_ngAcceleration | ( | Tensor6 & | cloudbox_field_mono, |
const ArrayOfTensor6 & | acceleration_input, | ||
const Index & | accelerated, | ||
const Verbosity & | verbosity | ||
) |
Convergence acceleration.
This function accelarate the convergence of the doit iteration by extrapolation of the doit_i_mono from the previous three iteration steps. The acceleration method is called Ng-Acceleration and was develop by Ng (1974)
[out] | cloudbox_field_mono | Radiation field in cloudbox |
[in] | acceleration_input | Array of the previous three iteration steps |
[in] | accelerated | Index wether to accelerate only the intensity or the whole Stokes Vector |
[in] | verbosity | Verbosity setting |
Definition at line 1620 of file doit.cc.
References i, J, joker, ConstTensor6View::npages(), and ConstTensor6View::nvitrines().
void doit_scat_fieldNormalize | ( | Workspace & | ws, |
Tensor6 & | doit_scat_field, | ||
const Tensor6 & | cloudbox_field_mono, | ||
const ArrayOfIndex & | cloudbox_limits, | ||
const Agenda & | spt_calc_agenda, | ||
const Index & | atmosphere_dim, | ||
const Vector & | za_grid, | ||
const Vector & | aa_grid, | ||
const Tensor4 & | pnd_field, | ||
const Tensor3 & | t_field, | ||
const Numeric & | norm_error_threshold, | ||
const Index & | norm_debug, | ||
const Verbosity & | verbosity | ||
) |
Normalization of scattered field.
Calculate the scattered extinction field and apply the derived correction factor to doit_scat_field.
Only 1D is supported.
[in,out] | ws | Current workspace |
[in,out] | doit_scat_field | Scattered field |
[in] | cloudbox_field_mono | Radiation field |
[in] | cloudbox_limits | Cloudbox limits |
[in] | spt_calc_agenda | Calculates single scattering properties |
[in] | atmopshere_dim | Dimension of atmosphere |
[in] | za_grid | Zenith angle grid |
[in] | aa_grid | Azimuth angle grid |
[in] | pnd_field | pnd field |
[in] | t_field | Atmospheric temperature field |
[in] | norm_error_threshold | Normalization error threshold |
[in] | norm_debug | Flag for normalization debug output |
[in] | verbosity | Verbosity setting |
Definition at line 1959 of file doit.cc.
References abs, AngIntegrate_trapezoid(), cloud_fieldsCalc(), CREATE_OUT0, CREATE_OUT2, i, joker, ConstTensor6View::nbooks(), ConstTensor6View::ncols(), ConstVectorView::nelem(), ConstTensor6View::npages(), ConstTensor6View::nrows(), ConstTensor6View::nshelves(), ConstTensor6View::nvitrines(), and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().
Referenced by cloudbox_fieldUpdateSeq1D().
void interp_cloud_coeff1D | ( | Tensor3View | ext_mat_int, |
MatrixView | abs_vec_int, | ||
MatrixView | sca_vec_int, | ||
MatrixView | cloudbox_field_mono_int, | ||
VectorView | t_int, | ||
MatrixView | vmr_list_int, | ||
VectorView | p_int, | ||
ConstTensor5View | ext_mat_field, | ||
ConstTensor4View | abs_vec_field, | ||
ConstTensor6View | doit_scat_field, | ||
ConstTensor6View | cloudbox_field_mono, | ||
ConstTensor3View | t_field, | ||
ConstTensor4View | vmr_field, | ||
ConstVectorView | p_grid, | ||
const Ppath & | ppath_step, | ||
const ArrayOfIndex & | cloudbox_limits, | ||
ConstVectorView | za_grid, | ||
const Index & | scat_za_interp, | ||
const Verbosity & | verbosity | ||
) |
Interpolate all inputs of the VRTE on a propagation path step.
Used in the WSM cloud_ppath_update1D.
[out] | ext_mat_int | Interpolated extinction matrix for 1D atmosphere |
[out] | abs_vec_int | Interpolated absorption vector for 1D atmosphere |
[out] | sca_vec_int | Interpolated scattering field for 1D atmosphere |
[out] | cloudbox_field_mono_int | Interpolated radiation field for 1D atmosphere |
[out] | t_int | Interpolated temperature field for 1D atmosphere |
[out] | vmr_list_int | Interpolated vmr field for each ppath_step |
[out] | p_int | Interpolated pressure |
[in] | ext_mat_field | Extinction matrix field |
[in] | abs_vec_field | Absorption vector field |
[in] | doit_scat_field | Scattering field |
[in] | cloudbox_field_mono | Radiation field |
[in] | t_field | Atmopheric temperature field |
[in] | vmr_field | VMR field |
[in] | p_grid | Pressure grid |
[in] | ppath_step | Propagation path step |
[in] | cloudbox_limits | Cloudbox limits |
[in] | za_grid | Zenith angle grid |
[in] | scat_za_interp | Flag for interplation method in zenith angle dimension |
[in] | verbosity | Verbosity setting |
Definition at line 1695 of file doit.cc.
References CREATE_OUT3, Ppath::gp_p, gridpos(), gridpos_upperend_check(), i, interp(), interp_poly(), interpweights(), itw2p(), joker, Ppath::los, ConstTensor4View::nbooks(), ConstTensor6View::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), and Ppath::np.
void rte_step_doit_replacement | ( | VectorView | stokes_vec, |
MatrixView | trans_mat, | ||
const PropagationMatrix & | ext_mat_av, | ||
const StokesVector & | abs_vec_av, | ||
ConstVectorView | sca_vec_av, | ||
const Numeric & | lstep, | ||
const Numeric & | rtp_planck_value, | ||
const bool & | trans_is_precalc = false |
||
) |
Solves monochromatic VRTE for an atmospheric slab with constant conditions.
The function can be used for cloudbox calculations.
The function is best explained by considering a homogenous layer. That is, the physical conditions inside the layer are constant. In reality they are not constant, so in practical all coefficients have to be averaged before calling this function. Total extinction and absorption inside the layer are described by ext_mat_av* and abs_vec_av respectively, the blackbdody radiation of the layer is given by rte_planck_value and the propagation path length through the layer is lstep.
There is an additional scattering source term in the VRTE, the scattering integral term. For this function a constant scattering term is assumed. The radiative transfer step is only a part the iterative solution of the scattering problem, for more information consider AUG. In the clearsky case this variable has to be set to 0.
When calling the function, the vector stokes_vec shall contain the Stokes vector for the incoming radiation. The function returns this vector, then containing the outgoing radiation on the other side of the layer.
The function performs the calculations differently depending on the conditions to improve the speed. There are three cases:
[in,out] | stokes_vec | A Stokes vector. |
[out] | trans_mat | Transmission matrix of slab. |
[in] | ext_mat_av | Averaged extinction matrix. |
[in] | abs_vec_av | Averaged absorption vector. |
[in] | sca_vec_av | averaged scattering vector. |
[in] | lstep | The length of the RTE step. |
[in] | rtp_planck_value | Blackbody radiation. |
[in] | trans_is_precalc | FIXMEDOC |
Definition at line 62 of file doit.cc.
References compute_transmission_matrix_from_averaged_matrix_at_frequency(), i, id_mat(), is_size(), PropagationMatrix::Kjj(), PropagationMatrix::MatrixInverseAtPosition(), mult(), ConstVectorView::nelem(), PropagationMatrix::NumberOfFrequencies(), PropagationMatrix::StokesDimensions(), and StokesVector::VectorAtPosition().
void za_gridOpt | ( | Vector & | za_grid_opt, |
Matrix & | i_field_opt, | ||
ConstVectorView | za_grid_fine, | ||
ConstTensor6View | i_field, | ||
const Numeric & | acc, | ||
const Index & | scat_za_interp | ||
) |
Optimize the zenith angle grid.
This method optimizes the zenith angle grid. For optimization it uses the interpolation method given by scat_za_interp (0 - linear interpolation, 1 - polynomial interpolation). As input it needs the intensity field calculated on a very fine zenith angle grid (za_grid_fine). The function picks out as many grid points as required to achieve the required accuracy (acc [%]). This methods optimizes only the intensity (first Stokes component) for 1D cases (first latitude and longitude of the intensity field. (Could be modified to optimize all Stokes components at the same time, if we don't want to use the clearsky field for grid optimuzation.)
[out] | za_grid_opt | Optimized zenith angle grid. |
[out] | cloudbox_field_opt | Optimized intensity field. |
[in] | za_grid_fine | Fine zenith angle grid. |
[in] | cloudbox_field_mono | Radiation field calculated on a very fine za grid. |
[in] | acc | Accuracy of optimization [%]. |
[in] | scat_za_interp | Interpolation method. |
Definition at line 1853 of file doit.cc.
References abs, get_sorted_indexes(), gridpos(), i, interp(), interp_poly(), interpweights(), joker, Array< base >::nelem(), ConstVectorView::nelem(), ConstTensor6View::npages(), ConstTensor6View::nvitrines(), Vector::resize(), and Matrix::resize().
Referenced by doit_za_grid_optCalc().
const Numeric PI |
const Numeric RAD2DEG |