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

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

#include <cmath>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <stdexcept>
#include "array.h"
#include "arts.h"
#include "auto_md.h"
#include "disort.h"
#include "m_general.h"
#include "math_funcs.h"
#include "messages.h"
#include "wsv_aux.h"
#include "xml_io.h"

Go to the source code of this file.

Functions

void DisortCalc (Workspace &ws, Tensor7 &cloudbox_field, 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 Vector &za_grid, const Index &stokes_dim, const Matrix &z_surface, const Numeric &surface_skin_t, const Vector &surface_scalar_reflectivity, const Index &nstreams, const String &pfct_method, const Index &Npfct, const Index &cdisort_quiet, const Verbosity &verbosity)
 WORKSPACE METHOD: DisortCalc. More...
 
void DisortCalcWithARTSSurface (Workspace &ws, Tensor7 &cloudbox_field, 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 Vector &za_grid, const Index &stokes_dim, const Index &nstreams, const String &pfct_method, const Index &Npfct, const Index &cdisort_quiet, const Verbosity &verbosity)
 WORKSPACE METHOD: DisortCalcWithARTSSurface. More...
 
void DisortCalcClearsky (Workspace &ws, Tensor7 &spectral_radiance_field, const Index &atmfields_checked, const Index &atmgeom_checked, const Agenda &propmat_clearsky_agenda, const Index &atmosphere_dim, const Tensor3 &t_field, const Tensor3 &z_field, const Tensor4 &vmr_field, const Vector &p_grid, const Vector &f_grid, const Vector &za_grid, const Index &stokes_dim, const Matrix &z_surface, const Numeric &surface_skin_t, const Vector &surface_scalar_reflectivity, const Index &nstreams, const Index &cdisort_quiet, const Verbosity &verbosity)
 WORKSPACE METHOD: DisortCalcClearsky. More...
 

Detailed Description

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

Author
Claudia Emde claud.nosp@m.ia.e.nosp@m.mde@d.nosp@m.lr.d.nosp@m.e
Date
2006-02-06

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,
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 Vector za_grid,
const Index stokes_dim,
const Matrix z_surface,
const Numeric surface_skin_t,
const Vector surface_scalar_reflectivity,
const Index nstreams,
const String pfct_method,
const Index Npfct,
const Index quiet,
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).

Known issues of ARTS implementation:

  • Surface altitude is not an interface parameter. Surface is <br> implicitly assumed to be at the lowest atmospheric level.
  • Scattering angle grids of all scattering elements have to be <br> identical (except if pfct_method is 'interpolate').

Keyword pfct_method allows to chose the method to extract phase function. '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. Currently, other methods than 'interpolate' require all scattering elements to be given on identical scattering angle grids. Note that this keyword solely affects the phase function; extinction/absorption/scattering cross sections are always interpolated to the actual temperature.

Author
Claudia Emde, Jana Mendrok
Parameters
[in,out]wsWorkspace
[out]cloudbox_fieldWS 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]za_gridWS Input
[in]stokes_dimWS Input
[in]z_surfaceWS Input
[in]surface_skin_tWS Input
[in]surface_scalar_reflectivityWS Input
[in]nstreamsGeneric Input (Default: "8")
[in]pfct_methodGeneric Input (Default: "median")
[in]NpfctGeneric Input (Default: "181")
[in]quietGeneric Input (Default: "0")

Definition at line 51 of file m_disort.cc.

References ARTS::Var::atmfields_checked(), ARTS::Var::atmgeom_checked(), ARTS::Var::atmosphere_dim(), check_disort_input(), ARTS::Var::cloudbox_checked(), ARTS::Var::cloudbox_field(), ARTS::Var::cloudbox_limits(), ARTS::Var::cloudbox_on(), CREATE_OUT0, ARTS::Var::f_grid(), get_disortsurf_props(), init_ifield(), joker, ARTS::Var::p_grid(), ARTS::Var::pnd_field(), ARTS::Var::propmat_clearsky_agenda(), run_cdisort(), ARTS::Var::scat_data(), ARTS::Var::scat_data_checked(), ARTS::Var::stokes_dim(), ARTS::Var::surface_scalar_reflectivity(), ARTS::Var::surface_skin_t(), ARTS::Var::t_field(), ARTS::Var::verbosity(), ARTS::Var::vmr_field(), ARTS::Var::z_field(), ARTS::Var::z_surface(), and ARTS::Var::za_grid().

Referenced by DisortCalc_g(), and DisortCalcClearsky().

◆ DisortCalcClearsky()

void DisortCalcClearsky ( Workspace ws,
Tensor7 spectral_radiance_field,
const Index atmfields_checked,
const Index atmgeom_checked,
const Agenda propmat_clearsky_agenda,
const Index atmosphere_dim,
const Tensor3 t_field,
const Tensor3 z_field,
const Tensor4 vmr_field,
const Vector p_grid,
const Vector f_grid,
const Vector za_grid,
const Index stokes_dim,
const Matrix z_surface,
const Numeric surface_skin_t,
const Vector surface_scalar_reflectivity,
const Index nstreams,
const Index quiet,
const Verbosity verbosity 
)

WORKSPACE METHOD: DisortCalcClearsky.

Interface to DISORT 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.

Author
Patrick Eriksson
Parameters
[in,out]wsWorkspace
[out]spectral_radiance_fieldWS Output
[in]atmfields_checkedWS Input
[in]atmgeom_checkedWS Input
[in]propmat_clearsky_agendaWS Input
[in]atmosphere_dimWS Input
[in]t_fieldWS Input
[in]z_fieldWS Input
[in]vmr_fieldWS Input
[in]p_gridWS Input
[in]f_gridWS Input
[in]za_gridWS Input
[in]stokes_dimWS Input
[in]z_surfaceWS Input
[in]surface_skin_tWS Input
[in]surface_scalar_reflectivityWS Input
[in]nstreamsGeneric Input (Default: "8")
[in]quietGeneric Input (Default: "0")

Definition at line 231 of file m_disort.cc.

References ARTS::Var::atmfields_checked(), ARTS::Var::atmgeom_checked(), ARTS::Var::atmosphere_dim(), ARTS::Var::cloudbox_checked(), ARTS::Var::cloudbox_limits(), ARTS::Var::cloudbox_on(), cloudboxSetFullAtm(), DisortCalc(), ARTS::Var::dpnd_field_dx(), ARTS::Var::f_grid(), ARTS::Var::p_grid(), ARTS::Var::pnd_field(), pnd_fieldZero(), ARTS::Var::propmat_clearsky_agenda(), ARTS::Var::scat_data(), ARTS::Var::scat_data_checked(), ARTS::Var::spectral_radiance_field(), ARTS::Var::stokes_dim(), ARTS::Var::surface_scalar_reflectivity(), ARTS::Var::surface_skin_t(), ARTS::Var::t_field(), ARTS::Var::verbosity(), ARTS::Var::vmr_field(), ARTS::Var::z_field(), ARTS::Var::z_surface(), and ARTS::Var::za_grid().

Referenced by DisortCalcClearsky_g().

◆ DisortCalcWithARTSSurface()

void DisortCalcWithARTSSurface ( Workspace ws,
Tensor7 cloudbox_field,
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 Vector za_grid,
const Index stokes_dim,
const Index nstreams,
const String pfct_method,
const Index Npfct,
const Index quiet,
const Verbosity verbosity 
)

WORKSPACE METHOD: DisortCalcWithARTSSurface.

DISORT with surface.

Author
Claudia Emde, Jana Mendrok
Parameters
[in,out]wsWorkspace
[out]cloudbox_fieldWS 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]za_gridWS Input
[in]stokes_dimWS Input
[in]nstreamsGeneric Input (Default: "8")
[in]pfct_methodGeneric Input (Default: "median")
[in]NpfctGeneric Input (Default: "181")
[in]quietGeneric Input (Default: "0")

Definition at line 134 of file m_disort.cc.

References ARTS::Var::atmfields_checked(), ARTS::Var::atmgeom_checked(), ARTS::Var::atmosphere_dim(), check_disort_input(), ARTS::Var::cloudbox_checked(), ARTS::Var::cloudbox_field(), ARTS::Var::cloudbox_limits(), ARTS::Var::cloudbox_on(), CREATE_OUT0, ARTS::Var::f_grid(), init_ifield(), joker, ARTS::Var::p_grid(), ARTS::Var::pnd_field(), ARTS::Var::propmat_clearsky_agenda(), run_cdisort(), ARTS::Var::scat_data(), ARTS::Var::scat_data_checked(), ARTS::Var::stokes_dim(), surf_albedoCalc(), 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 DisortCalcWithARTSSurface_g().