ARTS 2.5.11 (git: 6827797f)
|
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. | |
This file contains functions to use the multiple scattering program (C)DISORT.
These functions are listed in the doxygen documentation as entries of the file auto_md.h
Definition in file m_disort.cc.
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:
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().
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
[in,out] | ws | Workspace |
[out] | spectral_radiance_field | WS Output |
[out] | disort_aux | WS Output |
[in] | atmfields_checked | WS Input |
[in] | atmgeom_checked | WS Input |
[in] | propmat_clearsky_agenda | WS Input |
[in] | gas_scattering_agenda | WS Input |
[in] | atmosphere_dim | WS Input |
[in] | t_field | WS Input |
[in] | z_field | WS Input |
[in] | vmr_field | WS Input |
[in] | p_grid | WS Input |
[in] | lat_true | WS Input |
[in] | lon_true | WS Input |
[in] | refellipsoid | WS Input |
[in] | suns | WS Input |
[in] | f_grid | WS Input |
[in] | za_grid | WS Input |
[in] | aa_grid | WS Input |
[in] | stokes_dim | WS Input |
[in] | z_surface | WS Input |
[in] | surface_skin_t | WS Input |
[in] | surface_scalar_reflectivity | WS Input |
[in] | gas_scattering_do | WS Input |
[in] | suns_do | WS Input |
[in] | disort_aux_vars | WS Input |
[in] | nstreams | Generic Input (Default: "8") |
[in] | quiet | Generic Input (Default: "0") |
[in] | emission | Generic Input (Default: "1") |
[in] | intensity_correction | Generic Input (Default: "1") |
Definition at line 445 of file m_disort.cc.
References cloudboxSetFullAtm(), DisortCalc(), and pnd_fieldZero().
Referenced by DisortCalcClearsky_g().
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().
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().