ARTS 2.5.11 (git: 6827797f)
m_disort.cc File Reference

This file contains functions to use the multiple scattering program (C)DISORT. More...

#include <cmath>
#include <stdexcept>
#include "array.h"
#include "auto_md.h"
#include "disort.h"
#include "m_general.h"
#include "math_funcs.h"
#include "messages.h"
#include "geodetic.h"

Go to the source code of this file.

Functions

void DisortCalc (Workspace &ws, Tensor7 &cloudbox_field, ArrayOfMatrix &disort_aux, 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 &gas_scattering_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 Vector &lat_true, const Vector &lon_true, const Vector &refellipsoid, const ArrayOfArrayOfSingleScatteringData &scat_data, const ArrayOfSun &suns, const Vector &f_grid, const Vector &za_grid, const Vector &aa_grid, const Index &stokes_dim, const Matrix &z_surface, const Numeric &surface_skin_t, const Vector &surface_scalar_reflectivity, const Index &gas_scattering_do, const Index &suns_do, const ArrayOfString &disort_aux_vars, const Index &nstreams, const Index &Npfct, const Index &only_tro, const Index &cdisort_quiet, const Index &emission, const Index &intensity_correction, const Verbosity &verbosity)
 WORKSPACE METHOD: DisortCalc.
 
void DisortCalcWithARTSSurface (Workspace &ws, Tensor7 &cloudbox_field, ArrayOfMatrix &disort_aux, 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 Agenda &gas_scattering_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 Vector &lat_true, const Vector &lon_true, const Vector &refellipsoid, const ArrayOfArrayOfSingleScatteringData &scat_data, const ArrayOfSun &suns, const Vector &f_grid, const Vector &za_grid, const Vector &aa_grid, const Index &stokes_dim, const Matrix &z_surface, const Index &gas_scattering_do, const Index &suns_do, const ArrayOfString &disort_aux_vars, const Index &nstreams, const Index &Npfct, const Index &only_tro, const Index &cdisort_quiet, const Index &emission, const Index &intensity_correction, const Numeric &inc_angle, const Verbosity &verbosity)
 WORKSPACE METHOD: DisortCalcWithARTSSurface.
 
void DisortCalcClearsky (Workspace &ws, Tensor7 &spectral_radiance_field, ArrayOfMatrix &disort_aux, const Index &atmfields_checked, const Index &atmgeom_checked, const Agenda &propmat_clearsky_agenda, const Agenda &gas_scattering_agenda, const Index &atmosphere_dim, const Tensor3 &t_field, const Tensor3 &z_field, const Tensor4 &vmr_field, const Vector &p_grid, const Vector &lat_true, const Vector &lon_true, const Vector &refellipsoid, const ArrayOfSun &suns, const Vector &f_grid, const Vector &za_grid, const Vector &aa_grid, const Index &stokes_dim, const Matrix &z_surface, const Numeric &surface_skin_t, const Vector &surface_scalar_reflectivity, const Index &gas_scattering_do, const Index &suns_do, const ArrayOfString &disort_aux_vars, const Index &nstreams, const Index &cdisort_quiet, const Index &emission, const Index &intensity_correction, const Verbosity &verbosity)
 WORKSPACE METHOD: DisortCalcClearsky.
 
void DisortCalcIrradiance (Workspace &ws, Tensor5 &spectral_irradiance_field, ArrayOfMatrix &disort_aux, const Index &atmfields_checked, const Index &atmgeom_checked, const Index &scat_data_checked, const Agenda &propmat_clearsky_agenda, const Agenda &gas_scattering_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 Vector &lat_true, const Vector &lon_true, const Vector &refellipsoid, const ArrayOfArrayOfSingleScatteringData &scat_data, const ArrayOfSun &suns, const Vector &f_grid, const Index &stokes_dim, const Matrix &z_surface, const Numeric &surface_skin_t, const Vector &surface_scalar_reflectivity, const Index &gas_scattering_do, const Index &suns_do, const ArrayOfString &disort_aux_vars, const Index &nstreams, const Index &Npfct, const Index &only_tro, const Index &cdisort_quiet, const Index &emission, const Index &intensity_correction, const Verbosity &verbosity)
 WORKSPACE METHOD: DisortCalcIrradiance.
 

Detailed Description

This file contains functions to use the multiple scattering program (C)DISORT.

Author
Claudia Emde claud.nosp@m.ia.e.nosp@m.mde@d.nosp@m.lr.d.nosp@m.e Manfred Brath manfr.nosp@m.ed.b.nosp@m.rath@.nosp@m.uni-.nosp@m.hambu.nosp@m.rg.d.nosp@m.e
Date
2006-02-06, 2022-01-22

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

Definition in file m_disort.cc.

Function Documentation

◆ DisortCalc()

void DisortCalc ( Workspace ws,
Tensor7 &  cloudbox_field,
ArrayOfMatrix &  disort_aux,
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 gas_scattering_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 Vector &  lat_true,
const Vector &  lon_true,
const Vector &  refellipsoid,
const ArrayOfArrayOfSingleScatteringData scat_data,
const ArrayOfSun suns,
const Vector &  f_grid,
const Vector &  za_grid,
const Vector &  aa_grid,
const Index &  stokes_dim,
const Matrix &  z_surface,
const Numeric &  surface_skin_t,
const Vector &  surface_scalar_reflectivity,
const Index &  gas_scattering_do,
const Index &  suns_do,
const ArrayOfString disort_aux_vars,
const Index &  nstreams,
const Index &  Npfct,
const Index &  only_tro,
const Index &  quiet,
const Index &  emission,
const Index &  intensity_correction,
const Verbosity verbosity 
)

WORKSPACE METHOD: DisortCalc.

Interface to the DISORT scattering solver (by Stamnes et al.).

DISCLAIMER: There is a couple of known issues with the current implementation (see below). Use this WSM with care and only if these limitations/requirements are fulfilled. Results might be erroneous otherwise.

DISORT provides the radiation field (cloudbox_field) from a scalar 1D scattering solution assuming a plane-parallel atmosphere (flat Earth). Only totally randomly oriented particles are allowed. Refraction is not taken into account. Only Lambertian surface reflection is handled.

nstreams* is the number of polar angles taken into account internally in the scattering solution, za_grid is the polar angle grid on which cloudbox_field is provided. 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 linearly with nstreams. The default value (8) is sufficient for most microwave scattering calculations. It is likely insufficient for IR calculations involving ice clouds, though.

Further, za_grid determines the resolution of the output radiation field. The size of za_grid has no practical impact on computation time in the case of Disort and higher resolution generally improves the interpolation results, hence larger za_grid are recommended. To ensure sufficient interpolation accuracy, we require a (hardcoded) minimum size of 38.

Different sphericity levels are emulated here by embedding DISORT in different ways and using different output. The available options (from low to high sphericity level) are:

  • Cloudbox extends over whole atmosphere (e.g. by setting cloudbox <br> from cloudboxSetFullAtm).
  • Cloudbox extends over a limited part of the atmosphere only (e.g. <br> by setting cloudbox from cloudboxSetAutomatically or <br> cloudboxSetManually). Internally, DISORT is run over the whole <br> atmosphere, but only the radiation field within the cloudbox is <br> passed on and used further in ARTS (e.g. by yCalc).

Some auxiliary quantities can be obtained. Auxiliary quantities are selected by disort_aux_vars and returned by disort_aux. Valid choices for auxiliary data are: <br> "Layer optical thickness": Matrix [f_grid, size of p_grid - 1] layer optical thickness. <br> "Single scattering albedo": Matrix [f_grid, size of p_grid - 1] layer single" \<br\> scattering albedo. \<br\> "Direct beam": Matrix [f_grid, p_grid]. Attenuated direct at level. \<br\> Zero, if no sun is present \author Claudia Emde, Jana Mendrok \author Manfred Brath @param [in,out] ws Workspace @param [out] cloudbox_field WS Output @param [out] disort_aux WS Output @param [in] atmfields_checked WS Input @param [in] atmgeom_checked WS Input @param [in] scat_data_checked WS Input @param [in] cloudbox_checked WS Input @param [in] cloudbox_on WS Input @param [in] cloudbox_limits WS Input @param [in] propmat_clearsky_agenda WS Input @param [in] gas_scattering_agenda WS Input @param [in] atmosphere_dim WS Input @param [in] pnd_field WS Input @param [in] t_field WS Input @param [in] z_field WS Input @param [in] vmr_field WS Input @param [in] p_grid WS Input @param [in] lat_true WS Input @param [in] lon_true WS Input @param [in] refellipsoid WS Input @param [in] scat_data WS Input @param [in] suns WS Input @param [in] f_grid WS Input @param [in] za_grid WS Input @param [in] aa_grid WS Input @param [in] stokes_dim WS Input @param [in] z_surface WS Input @param [in] surface_skin_t WS Input @param [in] surface_scalar_reflectivity WS Input @param [in] gas_scattering_do WS Input @param [in] suns_do WS Input @param [in] disort_aux_vars WS Input @param [in] nstreams Generic Input (Default: "8") @param [in] Npfct Generic Input (Default: "181") @param [in] only_tro Generic Input (Default: "0") @param [in] quiet Generic Input (Default: "0") @param [in] emission Generic Input (Default: "1") @param [in] intensity_correction Generic Input (Default: "1")

Definition at line 29 of file m_disort.cc.

References ARTS_USER_ERROR_IF, check_disort_input(), CREATE_OUT0, CREATE_OUT3, distance3D(), get_disortsurf_props(), init_ifield(), Array< base >::nelem(), refell2r(), rte_losGeometricFromRtePosToRtePos2(), and run_cdisort().

Referenced by DisortCalc_g(), and DisortCalcClearsky().

◆ DisortCalcClearsky()

void DisortCalcClearsky ( Workspace ws,
Tensor7 &  spectral_radiance_field,
ArrayOfMatrix &  disort_aux,
const Index &  atmfields_checked,
const Index &  atmgeom_checked,
const Agenda propmat_clearsky_agenda,
const Agenda gas_scattering_agenda,
const Index &  atmosphere_dim,
const Tensor3 &  t_field,
const Tensor3 &  z_field,
const Tensor4 &  vmr_field,
const Vector &  p_grid,
const Vector &  lat_true,
const Vector &  lon_true,
const Vector &  refellipsoid,
const ArrayOfSun suns,
const Vector &  f_grid,
const Vector &  za_grid,
const Vector &  aa_grid,
const Index &  stokes_dim,
const Matrix &  z_surface,
const Numeric &  surface_skin_t,
const Vector &  surface_scalar_reflectivity,
const Index &  gas_scattering_do,
const Index &  suns_do,
const ArrayOfString disort_aux_vars,
const Index &  nstreams,
const Index &  quiet,
const Index &  emission,
const Index &  intensity_correction,
const Verbosity verbosity 
)

WORKSPACE METHOD: DisortCalcClearsky.

Interface to the DISORT scattering solver (by Stamnes et al.). for running clear-sky cases.

The method runs DISORT with pnd_field set to zero.

Note that this version returns spectral_radiance_field, i.e. the solution for the full atmosphere. The standard DisortCalc only returns the field inside the cloudbox.

Some auxiliary quantities can be obtained. Auxiliary quantities are selected by disort_aux_vars and returned by disort_aux. Valid choices for auxiliary data are: <br> "Layer optical thickness": Matrix [f_grid, size of p_grid - 1] layer optical <br> thickness. <br> "Single scattering albedo": Matrix [f_grid, size of p_grid - 1] layer single <br> scattering albedo. <br> "Direct beam": Matrix [f_grid, p_grid]. Level direct spectral radiance. <br> Zero, if no sun is present

Author
Patrick Eriksson
Manfred Brath
Parameters
[in,out]wsWorkspace
[out]spectral_radiance_fieldWS Output
[out]disort_auxWS Output
[in]atmfields_checkedWS Input
[in]atmgeom_checkedWS Input
[in]propmat_clearsky_agendaWS Input
[in]gas_scattering_agendaWS Input
[in]atmosphere_dimWS Input
[in]t_fieldWS Input
[in]z_fieldWS Input
[in]vmr_fieldWS Input
[in]p_gridWS Input
[in]lat_trueWS Input
[in]lon_trueWS Input
[in]refellipsoidWS Input
[in]sunsWS Input
[in]f_gridWS Input
[in]za_gridWS Input
[in]aa_gridWS Input
[in]stokes_dimWS Input
[in]z_surfaceWS Input
[in]surface_skin_tWS Input
[in]surface_scalar_reflectivityWS Input
[in]gas_scattering_doWS Input
[in]suns_doWS Input
[in]disort_aux_varsWS Input
[in]nstreamsGeneric Input (Default: "8")
[in]quietGeneric Input (Default: "0")
[in]emissionGeneric Input (Default: "1")
[in]intensity_correctionGeneric Input (Default: "1")

Definition at line 445 of file m_disort.cc.

References cloudboxSetFullAtm(), DisortCalc(), and pnd_fieldZero().

Referenced by DisortCalcClearsky_g().

◆ DisortCalcIrradiance()

void DisortCalcIrradiance ( Workspace ws,
Tensor5 &  spectral_irradiance_field,
ArrayOfMatrix &  disort_aux,
const Index &  atmfields_checked,
const Index &  atmgeom_checked,
const Index &  scat_data_checked,
const Agenda propmat_clearsky_agenda,
const Agenda gas_scattering_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 Vector &  lat_true,
const Vector &  lon_true,
const Vector &  refellipsoid,
const ArrayOfArrayOfSingleScatteringData scat_data,
const ArrayOfSun suns,
const Vector &  f_grid,
const Index &  stokes_dim,
const Matrix &  z_surface,
const Numeric &  surface_skin_t,
const Vector &  surface_scalar_reflectivity,
const Index &  gas_scattering_do,
const Index &  suns_do,
const ArrayOfString disort_aux_vars,
const Index &  nstreams,
const Index &  Npfct,
const Index &  only_tro,
const Index &  quiet,
const Index &  emission,
const Index &  intensity_correction,
const Verbosity verbosity 
)

WORKSPACE METHOD: DisortCalcIrradiance.

Interface to the DISORT scattering solver (by Stamnes et al.). for running flux (irradiance) calculations

It provides the irradiance field from a scalar 1D scattering solution assuming a plane-parallel atmosphere (flat Earth). Only totally randomly oriented particles are allowed. Refraction is not taken into account. Only Lambertian surface reflection is handled.

nstreams* is the number of polar angles taken into account internally in the scattering solution and for the angular integration. 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 linearly with nstreams. The default value (6) is sufficient for most flux calculations.

Some auxiliary quantities can be obtained. Auxiliary quantities are selected by disort_aux_vars and returned by disort_aux. Valid choices for auxiliary data are: <br> "Layer optical thickness": Matrix [f_grid, size of p_grid - 1] layer optical <br> thickness. <br> "Single scattering albedo": Matrix [f_grid, size of p_grid - 1] layer single" \<br\> scattering albedo. \<br\> "Direct downward spectral irradiance": Matrix [f_grid, p_grid]. \<br\> Direct downward spectral irradiance. \<br\> Zero, if no sun is present. \<br\> "dFdtau": Matrix [f_grid, p_grid]. Flux divergence in optical \<br\> thickness space. \author Manfred Brath @param [in,out] ws Workspace @param [out] spectral_irradiance_field WS Output @param [out] disort_aux WS Output @param [in] atmfields_checked WS Input @param [in] atmgeom_checked WS Input @param [in] scat_data_checked WS Input @param [in] propmat_clearsky_agenda WS Input @param [in] gas_scattering_agenda WS Input @param [in] atmosphere_dim WS Input @param [in] pnd_field WS Input @param [in] t_field WS Input @param [in] z_field WS Input @param [in] vmr_field WS Input @param [in] p_grid WS Input @param [in] lat_true WS Input @param [in] lon_true WS Input @param [in] refellipsoid WS Input @param [in] scat_data WS Input @param [in] suns WS Input @param [in] f_grid WS Input @param [in] stokes_dim WS Input @param [in] z_surface WS Input @param [in] surface_skin_t WS Input @param [in] surface_scalar_reflectivity WS Input @param [in] gas_scattering_do WS Input @param [in] suns_do WS Input @param [in] disort_aux_vars WS Input @param [in] nstreams Generic Input (Default: "6") @param [in] Npfct Generic Input (Default: "181") @param [in] only_tro Generic Input (Default: "0") @param [in] quiet Generic Input (Default: "0") @param [in] emission Generic Input (Default: "1") @param [in] intensity_correction Generic Input (Default: "1")

Definition at line 560 of file m_disort.cc.

References ARTS_USER_ERROR_IF, check_disort_irradiance_input(), cloudboxSetFullAtm(), CREATE_OUT0, distance3D(), get_disortsurf_props(), Array< base >::nelem(), refell2r(), rte_losGeometricFromRtePosToRtePos2(), and run_cdisort_flux().

Referenced by DisortCalcIrradiance_g().

◆ DisortCalcWithARTSSurface()

void DisortCalcWithARTSSurface ( Workspace ws,
Tensor7 &  cloudbox_field,
ArrayOfMatrix &  disort_aux,
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 Agenda gas_scattering_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 Vector &  lat_true,
const Vector &  lon_true,
const Vector &  refellipsoid,
const ArrayOfArrayOfSingleScatteringData scat_data,
const ArrayOfSun suns,
const Vector &  f_grid,
const Vector &  za_grid,
const Vector &  aa_grid,
const Index &  stokes_dim,
const Matrix &  z_surface,
const Index &  gas_scattering_do,
const Index &  suns_do,
const ArrayOfString disort_aux_vars,
const Index &  nstreams,
const Index &  Npfct,
const Index &  only_tro,
const Index &  quiet,
const Index &  emission,
const Index &  intensity_correction,
const Numeric &  inc_angle,
const Verbosity verbosity 
)

WORKSPACE METHOD: DisortCalcWithARTSSurface.

Interface to the DISORT scattering solver (by Stamnes et al.).

As DisortCalc but uses surface_rtprop_agenda.

The Lambertian surface reflection is set by surface_rtprop_agenda. If the GIN inc_angle is inside of the range [0,90], the reflection is set according to the result of surface_rtprop_agenda for this incidence angle. Otherwise (default) is to call surface_rtprop_agenda for multiple angles, to estimate the hemispheric mean value.

Some auxiliary quantities can be obtained. Auxiliary quantities are selected by disort_aux_vars and returned by disort_aux. Valid choices for auxiliary data are: <br> "Layer optical thickness": Matrix [f_grid, size of p_grid - 1] layer optical thickness. <br> "Single scattering albedo": Matrix [f_grid, size of p_grid - 1] layer single" \<br\> scattering albedo. \<br\> "Direct beam": Matrix [f_grid, p_grid]. Attenuated direct at level. \<br\> Zero, if no sun is present \author Claudia Emde, Jana Mendrok \author Manfred Brath @param [in,out] ws Workspace @param [out] cloudbox_field WS Output @param [out] disort_aux WS Output @param [in] atmfields_checked WS Input @param [in] atmgeom_checked WS Input @param [in] scat_data_checked WS Input @param [in] cloudbox_checked WS Input @param [in] cloudbox_on WS Input @param [in] cloudbox_limits WS Input @param [in] propmat_clearsky_agenda WS Input @param [in] surface_rtprop_agenda WS Input @param [in] gas_scattering_agenda WS Input @param [in] atmosphere_dim WS Input @param [in] pnd_field WS Input @param [in] t_field WS Input @param [in] z_field WS Input @param [in] vmr_field WS Input @param [in] p_grid WS Input @param [in] lat_true WS Input @param [in] lon_true WS Input @param [in] refellipsoid WS Input @param [in] scat_data WS Input @param [in] suns WS Input @param [in] f_grid WS Input @param [in] za_grid WS Input @param [in] aa_grid WS Input @param [in] stokes_dim WS Input @param [in] z_surface WS Input @param [in] gas_scattering_do WS Input @param [in] suns_do WS Input @param [in] disort_aux_vars WS Input @param [in] nstreams Generic Input (Default: "8") @param [in] Npfct Generic Input (Default: "181") @param [in] only_tro Generic Input (Default: "0") @param [in] quiet Generic Input (Default: "0") @param [in] emission Generic Input (Default: "1") @param [in] intensity_correction Generic Input (Default: "1") @param [in] inc_angle Generic Input (Default: "-1")

Definition at line 228 of file m_disort.cc.

References ARTS_USER_ERROR_IF, check_disort_input(), CREATE_OUT0, CREATE_OUT3, distance3D(), init_ifield(), Array< base >::nelem(), refell2r(), rte_losGeometricFromRtePosToRtePos2(), run_cdisort(), surf_albedoCalc(), and surf_albedoCalcSingleAngle().

Referenced by DisortCalcWithARTSSurface_g().