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

Workspace functions related to application of scattering solver RT4. More...

#include <complex.h>
#include <stdexcept>
#include "auto_md.h"
#include "disort.h"
#include "m_xml.h"
#include "messages.h"
#include "rt4.h"

Go to the source code of this file.

Functions

void RT4Calc (Workspace &, Tensor7 &, Vector &, Vector &, const Index &, const Index &, const Index &, const Index &, const Index &, const ArrayOfIndex &, const Agenda &, const Agenda &, const Index &, const Tensor4 &, const Tensor3 &, const Tensor3 &, const Tensor4 &, const Vector &, const ArrayOfArrayOfSingleScatteringData &, const Vector &, const Index &, const Matrix &, const Index &, const String &, const String &, const Index &, const Index &, const Index &, const Index &, const Index &, const Index &, const Numeric &, const Verbosity &)
 WORKSPACE METHOD: RT4Calc. More...
 
void RT4CalcWithRT4Surface (Workspace &, Tensor7 &, Vector &, Vector &, const Index &, const Index &, const Index &, const Index &, const Index &, const ArrayOfIndex &, const Agenda &, const Index &, const Tensor4 &, const Tensor3 &, const Tensor3 &, const Tensor4 &, const Vector &, const ArrayOfArrayOfSingleScatteringData &, const Vector &, const Index &, const Matrix &, const Numeric &, const Vector &, const Tensor3 &, const GriddedField3 &, const Index &, const String &, const String &, const String &, const Index &, const Index &, const Index &, const Index &, const Index &, const Index &, const Numeric &, const Verbosity &)
 WORKSPACE METHOD: RT4CalcWithRT4Surface. More...
 
void RT4Test (Tensor4 &, const String &, const Verbosity &)
 WORKSPACE METHOD: RT4Test. More...
 

Detailed Description

Workspace functions related to application of scattering solver RT4.

Author
Jana Mendrok jana..nosp@m.mend.nosp@m.rok@g.nosp@m.mail.nosp@m..com
Date
2016-05-24

These functions are listed in the doxygen documentation as entries of the file auto_md.h

Definition in file m_rt4.cc.

Function Documentation

◆ RT4Calc()

void RT4Calc ( Workspace ws,
Tensor7 cloudbox_field,
Vector za_grid,
Vector aa_grid,
const Index atmfields_checked,
const Index atmgeom_checked,
const Index scat_data_checked,
const Index cloudbox_checked,
const Index cloudbox_on,
const ArrayOfIndex cloudbox_limits,
const Agenda propmat_clearsky_agenda,
const Agenda surface_rtprop_agenda,
const Index atmosphere_dim,
const Tensor4 pnd_field,
const Tensor3 t_field,
const Tensor3 z_field,
const Tensor4 vmr_field,
const Vector p_grid,
const ArrayOfArrayOfSingleScatteringData scat_data,
const Vector f_grid,
const Index stokes_dim,
const Matrix z_surface,
const Index nstreams,
const String pfct_method,
const String quad_type,
const Index add_straight_angles,
const Index pfct_aa_grid_size,
const Index auto_inc_nstreams,
const Index robust,
const Index za_interp_order,
const Index cos_za_interp,
const Numeric max_delta_tau,
const Verbosity verbosity 
)

WORKSPACE METHOD: RT4Calc.

Interface to the PolRadTran RT4 scattering solver (by F. Evans).

RT4 provides the radiation field (cloudbox_field) from a vector 1D scattering solution assuming a plane-parallel atmosphere (flat Earth). It calculates up to two Stokes parameters (stokes_dim<=2), i.e., all azimuthally randomly oriented particles are allowed (this also includes macroscopically isotropic particles). Refraction is not taken into account.

The scattering solution is internally obtained over the full (plane-parallel) atmosphere, i.e. not confined to the cloudbox. However, the radiation field output is limited to the cloudbox. This allows to consider clearsky RT through a non-spherical atmosphere outside the cloudbox improving the RT solution for non-plane-parallel media compared to the plain RT4 output.

nstreams* is the number of polar angles taken into account internally in the scattering solution. That is, nstreams determines the angular resolution, hence the accuracy, of the scattering solution. The more anisotropic the bulk scattering matrix, the more streams are required. The computational burden increases approximately with the third power of nstreams. The default value (nstreams=16) was found to be sufficient for most microwave scattering calculations. It is likely insufficient for IR calculations involving ice clouds, though.

Here, za_grid is NOT an input parameter, but output, and its size equals nstreams or nstreams+2 (Gauss-Legendre and Double Gauss quadratures in case add_straight_angles=1) (the reason is that the computational burden is high for additional angles, regardless whether they are quadrature angles or not; hence the quadrature angles supplemented with 0 and 180deg are considered to provide the best radiation field for a given effort).

The auto_inc_nstreams feature can be used to increase the number of streams used internally in the scattering solution when found necessary. NOTE: this number-of-streams increase is only internally - the angular dimension of the output cloudbox_field is fixed to the nstreams* given as input to this WSM.

Quadrature methods available are: 'L'obatto, 'G'auss-Legendre and 'D'ouble Gauss quadrature.

This WSM applies surface_rtprop_agenda to derive reflection matrix and surface emission vector that are directly feed into RT4's core solver (instead of their RT4-internal calculation as used by RT4CalcWithRT4Surface).

Known issues of ARTS implementation:

  • TOA incoming radiation is so far assumed as blackbody cosmic <br> background (temperature taken from the ARTS-internal constant).

The keyword pfct_method allows to choose the method to extract the scattering matrix. 'interpolate' considers temperature dependence, others neglect it by chosing one specific temperature grid point from the single scattering data: 'low' choses the lowest T-point, 'high' the highest T-point, and 'median' the median T-point. As different scattering elements can have different temperature grids, the actual temperature value used can differ between the scattering elements. Note that this keyword solely affects the scattering matrix; extinction matrix and absorption vector are always interpolated to the actual temperature.

Author
Jana Mendrok
Parameters
[in,out]wsWorkspace
[out]cloudbox_fieldWS Output
[out]za_gridWS Output
[out]aa_gridWS Output
[in]atmfields_checkedWS Input
[in]atmgeom_checkedWS Input
[in]scat_data_checkedWS Input
[in]cloudbox_checkedWS Input
[in]cloudbox_onWS Input
[in]cloudbox_limitsWS Input
[in]propmat_clearsky_agendaWS Input
[in]surface_rtprop_agendaWS Input
[in]atmosphere_dimWS Input
[in]pnd_fieldWS Input
[in]t_fieldWS Input
[in]z_fieldWS Input
[in]vmr_fieldWS Input
[in]p_gridWS Input
[in]scat_dataWS Input
[in]f_gridWS Input
[in]stokes_dimWS Input
[in]z_surfaceWS Input
[in]nstreamsGeneric Input (Default: "16")
[in]pfct_methodGeneric Input (Default: "median")
[in]quad_typeGeneric Input (Default: "D")
[in]add_straight_anglesGeneric Input (Default: "1")
[in]pfct_aa_grid_sizeGeneric Input (Default: "19")
[in]auto_inc_nstreamsGeneric Input (Default: "0")
[in]robustGeneric Input (Default: "0")
[in]za_interp_orderGeneric Input (Default: "1")
[in]cos_za_interpGeneric Input (Default: "0")
[in]max_delta_tauGeneric Input (Default: "1e-6")

Definition at line 362 of file m_rt4.cc.

Referenced by RT4Calc_g().

◆ RT4CalcWithRT4Surface()

void RT4CalcWithRT4Surface ( Workspace ws,
Tensor7 cloudbox_field,
Vector za_grid,
Vector aa_grid,
const Index atmfields_checked,
const Index atmgeom_checked,
const Index scat_data_checked,
const Index cloudbox_checked,
const Index cloudbox_on,
const ArrayOfIndex cloudbox_limits,
const Agenda propmat_clearsky_agenda,
const Index atmosphere_dim,
const Tensor4 pnd_field,
const Tensor3 t_field,
const Tensor3 z_field,
const Tensor4 vmr_field,
const Vector p_grid,
const ArrayOfArrayOfSingleScatteringData scat_data,
const Vector f_grid,
const Index stokes_dim,
const Matrix z_surface,
const Numeric surface_skin_t,
const Vector surface_scalar_reflectivity,
const Tensor3 surface_reflectivity,
const GriddedField3 surface_complex_refr_index,
const Index nstreams,
const String pfct_method,
const String ground_type,
const String quad_type,
const Index add_straight_angles,
const Index pfct_aa_grid_size,
const Index auto_inc_nstreams,
const Index robust,
const Index za_interp_order,
const Index cos_za_interp,
const Numeric max_delta_tau,
const Verbosity verbosity 
)

WORKSPACE METHOD: RT4CalcWithRT4Surface.

As RT4Calc except for using RT4's proprietary surface type handling.

This WSM is only indented for testing purposes.

The following surface type/property methods are available and require the the following input:

  • 'L'ambertian: surface_scalar_reflectivity, surface_skin_t
  • 'F'resnel: surface_complex_refr_index, surface_skin_t
  • 'S'pecular: surface_reflectivity, surface_skin_t 'L' and 'F' use proprietary RT4 methods, 'S' uses RT4's Fresnel methods modified to behave similar to ARTS' surfaceFlatReflectivity*.

    Author
    Jana Mendrok
    Parameters
    [in,out]wsWorkspace
    [out]cloudbox_fieldWS Output
    [out]za_gridWS Output
    [out]aa_gridWS Output
    [in]atmfields_checkedWS Input
    [in]atmgeom_checkedWS Input
    [in]scat_data_checkedWS Input
    [in]cloudbox_checkedWS Input
    [in]cloudbox_onWS Input
    [in]cloudbox_limitsWS Input
    [in]propmat_clearsky_agendaWS Input
    [in]atmosphere_dimWS Input
    [in]pnd_fieldWS Input
    [in]t_fieldWS Input
    [in]z_fieldWS Input
    [in]vmr_fieldWS Input
    [in]p_gridWS Input
    [in]scat_dataWS Input
    [in]f_gridWS Input
    [in]stokes_dimWS Input
    [in]z_surfaceWS Input
    [in]surface_skin_tWS Input
    [in]surface_scalar_reflectivityWS Input
    [in]surface_reflectivityWS Input
    [in]surface_complex_refr_indexWS Input
    [in]nstreamsGeneric Input (Default: "16")
    [in]pfct_methodGeneric Input (Default: "median")
    [in]ground_typeGeneric Input (Default: "A")
    [in]quad_typeGeneric Input (Default: "D")
    [in]add_straight_anglesGeneric Input (Default: "1")
    [in]pfct_aa_grid_sizeGeneric Input (Default: "19")
    [in]auto_inc_nstreamsGeneric Input (Default: "0")
    [in]robustGeneric Input (Default: "0")
    [in]za_interp_orderGeneric Input (Default: "1")
    [in]cos_za_interpGeneric Input (Default: "0")
    [in]max_delta_tauGeneric Input (Default: "1e-6")

Definition at line 401 of file m_rt4.cc.

Referenced by RT4CalcWithRT4Surface_g().

◆ RT4Test()

void RT4Test ( Tensor4 out_rad,
const String datapath,
const Verbosity verbosity 
)

WORKSPACE METHOD: RT4Test.

RT4 validation test.

Executes test case testc shipped with PolRadTran/RT4 code (but uses data files converted to arts-xml). Output written to (xml-)file.

Author
Jana Mendrok
Parameters
[out]out_radGeneric output
[in]datapathGeneric Input (Default: "artscomponents/polradtran/testdata/")

Definition at line 454 of file m_rt4.cc.

Referenced by RT4Test_g().