ARTS 2.5.11 (git: 725533f0)
|
Workspace functions related to simulation of radiation fluxes. More...
#include <iostream>
#include <stdexcept>
#include "absorption.h"
#include "agenda_class.h"
#include "agenda_set.h"
#include "arts_constants.h"
#include "arts_conversions.h"
#include "auto_md.h"
#include "check_input.h"
#include "math_funcs.h"
#include "matpack_data.h"
#include "messages.h"
#include "sorting.h"
#include "surface.h"
#include "workspace_ng.h"
#include "global_data.h"
#include "gsl_gauss_legendre.h"
Go to the source code of this file.
Functions | |
void | AngularGridsSetFluxCalc (Vector &za_grid, Vector &aa_grid, Vector &za_grid_weights, const Index &N_za_grid, const Index &N_aa_grid, const String &za_grid_type, const Verbosity &) |
WORKSPACE METHOD: AngularGridsSetFluxCalc. | |
void | heating_ratesFromIrradiance (Tensor3 &heating_rates, const Vector &p_grid, const Tensor4 &irradiance_field, const Tensor3 &specific_heat_capacity, const Numeric &g0, const Verbosity &) |
WORKSPACE METHOD: heating_ratesFromIrradiance. | |
void | irradiance_fieldFromRadiance (Tensor4 &irradiance_field, const Tensor5 &radiance_field, const Vector &za_grid, const Vector &aa_grid, const Vector &za_grid_weights, const Verbosity &) |
WORKSPACE METHOD: irradiance_fieldFromRadiance. | |
void | RadiationFieldSpectralIntegrate (Tensor4 &radiation_field, const Vector &f_grid, const Tensor5 &spectral_radiation_field, const Verbosity &) |
WORKSPACE METHOD: RadiationFieldSpectralIntegrate. | |
void | RadiationFieldSpectralIntegrate (Tensor5 &radiation_field, const Vector &f_grid, const Tensor7 &spectral_radiation_field, const Verbosity &) |
WORKSPACE METHOD: RadiationFieldSpectralIntegrate. | |
void | spectral_irradiance_fieldFromSpectralRadianceField (Tensor5 &spectral_irradiance_field, const Tensor7 &spectral_radiance_field, const Vector &za_grid, const Vector &aa_grid, const Vector &za_grid_weights, const Verbosity &) |
WORKSPACE METHOD: spectral_irradiance_fieldFromSpectralRadianceField. | |
void | spectral_radiance_fieldClearskyPlaneParallel (Workspace &ws, Tensor7 &spectral_radiance_field, Tensor3 &trans_field, const Agenda &propmat_clearsky_agenda, const Agenda &water_p_eq_agenda, const Agenda &iy_space_agenda, const Agenda &iy_surface_agenda, const Agenda &iy_cloudbox_agenda, const Index &stokes_dim, const Vector &f_grid, const Index &atmosphere_dim, const Vector &p_grid, const Tensor3 &z_field, const Tensor3 &t_field, const EnergyLevelMap &nlte_field, const Tensor4 &vmr_field, const ArrayOfArrayOfSpeciesTag &abs_species, const Tensor3 &wind_u_field, const Tensor3 &wind_v_field, const Tensor3 &wind_w_field, const Tensor3 &mag_u_field, const Tensor3 &mag_v_field, const Tensor3 &mag_w_field, const Matrix &z_surface, const Numeric &ppath_lmax, const Numeric &rte_alonglos_v, const String &rt_integration_option, const Tensor3 &surface_props_data, const Vector &za_grid, const Index &use_parallel_za, const Verbosity &verbosity) |
WORKSPACE METHOD: spectral_radiance_fieldClearskyPlaneParallel. | |
void | spectral_radiance_fieldCopyCloudboxField (Tensor7 &spectral_radiance_field, const Index &atmosphere_dim, const Vector &p_grid, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const Tensor7 &cloudbox_field, const Verbosity &) |
WORKSPACE METHOD: spectral_radiance_fieldCopyCloudboxField. | |
void | spectral_radiance_fieldExpandCloudboxField (Workspace &ws, Tensor7 &spectral_radiance_field, const Agenda &propmat_clearsky_agenda, const Agenda &water_p_eq_agenda, const Agenda &iy_space_agenda, const Agenda &iy_surface_agenda, const Agenda &iy_cloudbox_agenda, const Index &stokes_dim, const Vector &f_grid, const Index &atmosphere_dim, const Vector &p_grid, const Tensor3 &z_field, const Tensor3 &t_field, const EnergyLevelMap &nlte_field, const Tensor4 &vmr_field, const ArrayOfArrayOfSpeciesTag &abs_species, const Tensor3 &wind_u_field, const Tensor3 &wind_v_field, const Tensor3 &wind_w_field, const Tensor3 &mag_u_field, const Tensor3 &mag_v_field, const Tensor3 &mag_w_field, const Matrix &z_surface, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const Tensor7 &cloudbox_field, const Numeric &ppath_lmax, const Numeric &rte_alonglos_v, const String &rt_integration_option, const Tensor3 &surface_props_data, const Vector &za_grid, const Index &use_parallel_za, const Verbosity &verbosity) |
WORKSPACE METHOD: spectral_radiance_fieldExpandCloudboxField. | |
Variables | |
constexpr Numeric | PI =Constant::pi |
constexpr Numeric | DEG2RAD =Conversion::deg2rad(1) |
Workspace functions related to simulation of radiation fluxes.
These functions are listed in the doxygen documentation as entries of the file auto_md.h.
Definition in file m_fluxes.cc.
void AngularGridsSetFluxCalc | ( | Vector & | za_grid, |
Vector & | aa_grid, | ||
Vector & | za_grid_weights, | ||
const Index & | N_za_grid, | ||
const Index & | N_aa_grid, | ||
const String & | za_grid_type, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: AngularGridsSetFluxCalc.
Sets the angular grids for the calculation of radiation fluxes.
This method sets the angular grids for the radiation fluxes type calculations and calculates the integration weights za_grid_weights for the zenith angle integration. For down- und up-looking geometries it suffices to use the default values of N_za_grid and N_aa_grid. From N_aa_grid an equally spaced grid is created and stored in the WSV aa_grid.
Depending on the desired za_grid_type za_grid will be equally spaced ('linear') or unequally ('linear_mu','double_gauss') Important, N_za_grid must be an even number because for the integration over each hemisphere N_za_grid / 2 zenith angles are needed.
Possible zenith angle grid types are:
double_gauss
: <br> The zenith grid and the integration weights are set according <br> to a gauss-legendre integration for each hemispheres.linear
: Equally space grid between 0 deg and 180 deg including the poleslinear_mu
: <br> Similar to 'linear' but equally spaced for cos(180 deg) to cos(0 deg), <br> which results a unequally spaced angular grid
[out] | za_grid | WS Output |
[out] | aa_grid | WS Output |
[out] | za_grid_weights | WS Output |
[in] | N_za_grid | Generic Input (Default: "2") |
[in] | N_aa_grid | Generic Input (Default: "1") |
[in] | za_grid_type | Generic Input (Default: "linear_mu") |
Definition at line 42 of file m_fluxes.cc.
References calculate_weights_linear(), DEG2RAD, nlinspace(), and w.
Referenced by AngularGridsSetFluxCalc_g(), and iySurfaceLambertian().
void heating_ratesFromIrradiance | ( | Tensor3 & | heating_rates, |
const Vector & | p_grid, | ||
const Tensor4 & | irradiance_field, | ||
const Tensor3 & | specific_heat_capacity, | ||
const Numeric & | g0, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: heating_ratesFromIrradiance.
Calculates heating rates from the irradiance_field.
The method assumes that the heating rates depend only on the vertical derivation of the net flux. The net flux is the sum of the irradiance_field* in upward direction and the irradiance_field in downward direction
[out] | heating_rates | WS Output |
[in] | p_grid | WS Input |
[in] | irradiance_field | WS Input |
[in] | specific_heat_capacity | WS Input |
[in] | g0 | WS Input |
Definition at line 174 of file m_fluxes.cc.
References b.
Referenced by heating_ratesFromIrradiance_g().
void irradiance_fieldFromRadiance | ( | Tensor4 & | irradiance_field, |
const Tensor5 & | radiance_field, | ||
const Vector & | za_grid, | ||
const Vector & | aa_grid, | ||
const Vector & | za_grid_weights, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: irradiance_fieldFromRadiance.
Calculates the irradiance from the radiance_field.
The radiance_field is integrated over the angular grids according to the grids set by AngularGridsSetFluxCalc. See AngularGridsSetFluxCalc to set za_grid, aa_grid, and za_grid_weights*
[out] | irradiance_field | WS Output |
[in] | radiance_field | WS Input |
[in] | za_grid | WS Input |
[in] | aa_grid | WS Input |
[in] | za_grid_weights | WS Input |
Definition at line 243 of file m_fluxes.cc.
References b, c, DEG2RAD, and PI.
Referenced by irradiance_fieldFromRadiance_g().
void RadiationFieldSpectralIntegrate | ( | Tensor4 & | radiation_field, |
const Vector & | f_grid, | ||
const Tensor5 & | spectral_radiation_field, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: RadiationFieldSpectralIntegrate.
Integrates fields like spectral_irradiance_field or spectral_radiance_field over frequency.
Important, the first dimension must be the frequency dimension! If a field like spectral_radiance_field is input, the stokes dimension is also removed.
[out] | radiation_field | Supergeneric output |
[in] | f_grid | WS Input |
[in] | spectral_radiation_field | Generic Input |
Definition at line 315 of file m_fluxes.cc.
Referenced by RadiationFieldSpectralIntegrate_sg_Tensor4Tensor5_g(), and RadiationFieldSpectralIntegrate_sg_Tensor5Tensor7_g().
void RadiationFieldSpectralIntegrate | ( | Tensor5 & | radiation_field, |
const Vector & | f_grid, | ||
const Tensor7 & | spectral_radiation_field, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: RadiationFieldSpectralIntegrate.
Integrates fields like spectral_irradiance_field or spectral_radiance_field over frequency.
Important, the first dimension must be the frequency dimension! If a field like spectral_radiance_field is input, the stokes dimension is also removed.
[out] | radiation_field | Supergeneric output |
[in] | f_grid | WS Input |
[in] | spectral_radiation_field | Generic Input |
Definition at line 352 of file m_fluxes.cc.
void spectral_irradiance_fieldFromSpectralRadianceField | ( | Tensor5 & | spectral_irradiance_field, |
const Tensor7 & | spectral_radiance_field, | ||
const Vector & | za_grid, | ||
const Vector & | aa_grid, | ||
const Vector & | za_grid_weights, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: spectral_irradiance_fieldFromSpectralRadianceField.
Calculates the spectral irradiance from spectral_radiance_field.
The spectral_radiance_field is integrated over the angular grids according to the grids set by AngularGridsSetFluxCalc. See AngularGridsSetFluxCalc to set za_grid, aa_grid, and za_grid_weights*.
[out] | spectral_irradiance_field | WS Output |
[in] | spectral_radiance_field | WS Input |
[in] | za_grid | WS Input |
[in] | aa_grid | WS Input |
[in] | za_grid_weights | WS Input |
Definition at line 392 of file m_fluxes.cc.
References b, c, DEG2RAD, and PI.
Referenced by spectral_irradiance_fieldFromSpectralRadianceField_g().
void spectral_radiance_fieldClearskyPlaneParallel | ( | Workspace & | ws, |
Tensor7 & | spectral_radiance_field, | ||
Tensor3 & | trans_field, | ||
const Agenda & | propmat_clearsky_agenda, | ||
const Agenda & | water_p_eq_agenda, | ||
const Agenda & | iy_space_agenda, | ||
const Agenda & | iy_surface_agenda, | ||
const Agenda & | iy_cloudbox_agenda, | ||
const Index & | stokes_dim, | ||
const Vector & | f_grid, | ||
const Index & | atmosphere_dim, | ||
const Vector & | p_grid, | ||
const Tensor3 & | z_field, | ||
const Tensor3 & | t_field, | ||
const EnergyLevelMap & | nlte_field, | ||
const Tensor4 & | vmr_field, | ||
const ArrayOfArrayOfSpeciesTag & | abs_species, | ||
const Tensor3 & | wind_u_field, | ||
const Tensor3 & | wind_v_field, | ||
const Tensor3 & | wind_w_field, | ||
const Tensor3 & | mag_u_field, | ||
const Tensor3 & | mag_v_field, | ||
const Tensor3 & | mag_w_field, | ||
const Matrix & | z_surface, | ||
const Numeric & | ppath_lmax, | ||
const Numeric & | rte_alonglos_v, | ||
const String & | rt_integration_option, | ||
const Tensor3 & | surface_props_data, | ||
const Vector & | za_grid, | ||
const Index & | use_parallel_za, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: spectral_radiance_fieldClearskyPlaneParallel.
Clear-sky radiance field of a plane parallel atmosphere.
The method assumes a 1D flat planet. Radiances along each direction given by za_grid are calculated using ppathPlaneParallel and iyEmissionStandard.
Surface properties are defined by iy_surface_agenda, i.e. there is no restriction to e.g. specular surfaces.
Note that the variable ppath_lmax is considered, and that it can be critical for the accuracy for zenith angles close to 90 degrees. That is, using ppath_lmax=-1 is not recommended for this function.
Information on transmittance is also provided by the GOUT trans_field
. For up-welling radiation (scat_za > 90), this variable holds the transmittance to space, for considered position and propagation direction. For down-welling radiation, trans_field
holds instead the transmittance down to the surface.
[in,out] | ws | Workspace |
[out] | spectral_radiance_field | WS Output |
[out] | trans_field | Generic output |
[in] | propmat_clearsky_agenda | WS Input |
[in] | water_p_eq_agenda | WS Input |
[in] | iy_space_agenda | WS Input |
[in] | iy_surface_agenda | WS Input |
[in] | iy_cloudbox_agenda | WS Input |
[in] | stokes_dim | WS Input |
[in] | f_grid | WS Input |
[in] | atmosphere_dim | WS Input |
[in] | p_grid | WS Input |
[in] | z_field | WS Input |
[in] | t_field | WS Input |
[in] | nlte_field | WS Input |
[in] | vmr_field | WS Input |
[in] | abs_species | WS Input |
[in] | wind_u_field | WS Input |
[in] | wind_v_field | WS Input |
[in] | wind_w_field | WS Input |
[in] | mag_u_field | WS Input |
[in] | mag_v_field | WS Input |
[in] | mag_w_field | WS Input |
[in] | z_surface | WS Input |
[in] | ppath_lmax | WS Input |
[in] | rte_alonglos_v | WS Input |
[in] | rt_integration_option | WS Input |
[in] | surface_props_data | WS Input |
[in] | za_grid | WS Input |
[in] | use_parallel_za | Generic Input (Default: "1") |
Definition at line 470 of file m_fluxes.cc.
References ARTS_ASSERT, AgendaManip::get_iy_main_agenda(), Ppath::gp_p, index_of_zsurface(), iyEmissionStandard(), Array< base >::nelem(), Ppath::np, and ppathPlaneParallel().
Referenced by spectral_radiance_fieldClearskyPlaneParallel_g().
void spectral_radiance_fieldCopyCloudboxField | ( | Tensor7 & | spectral_radiance_field, |
const Index & | atmosphere_dim, | ||
const Vector & | p_grid, | ||
const Index & | cloudbox_on, | ||
const ArrayOfIndex & | cloudbox_limits, | ||
const Tensor7 & | cloudbox_field, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: spectral_radiance_fieldCopyCloudboxField.
Set spectral_radiance_field to be a copy of cloudbox_field.
This method can only be used for 1D atmospheres and if the cloud box covers the complete atmosphere. For such case, the two fields cover the same atmospheric volume and a direct copying can be made.
[out] | spectral_radiance_field | WS Output |
[in] | atmosphere_dim | WS Input |
[in] | p_grid | WS Input |
[in] | cloudbox_on | WS Input |
[in] | cloudbox_limits | WS Input |
[in] | cloudbox_field | WS Input |
Definition at line 689 of file m_fluxes.cc.
References Array< base >::nelem().
Referenced by spectral_radiance_fieldCopyCloudboxField_g().
void spectral_radiance_fieldExpandCloudboxField | ( | Workspace & | ws, |
Tensor7 & | spectral_radiance_field, | ||
const Agenda & | propmat_clearsky_agenda, | ||
const Agenda & | water_p_eq_agenda, | ||
const Agenda & | iy_space_agenda, | ||
const Agenda & | iy_surface_agenda, | ||
const Agenda & | iy_cloudbox_agenda, | ||
const Index & | stokes_dim, | ||
const Vector & | f_grid, | ||
const Index & | atmosphere_dim, | ||
const Vector & | p_grid, | ||
const Tensor3 & | z_field, | ||
const Tensor3 & | t_field, | ||
const EnergyLevelMap & | nlte_field, | ||
const Tensor4 & | vmr_field, | ||
const ArrayOfArrayOfSpeciesTag & | abs_species, | ||
const Tensor3 & | wind_u_field, | ||
const Tensor3 & | wind_v_field, | ||
const Tensor3 & | wind_w_field, | ||
const Tensor3 & | mag_u_field, | ||
const Tensor3 & | mag_v_field, | ||
const Tensor3 & | mag_w_field, | ||
const Matrix & | z_surface, | ||
const Index & | cloudbox_on, | ||
const ArrayOfIndex & | cloudbox_limits, | ||
const Tensor7 & | cloudbox_field, | ||
const Numeric & | ppath_lmax, | ||
const Numeric & | rte_alonglos_v, | ||
const String & | rt_integration_option, | ||
const Tensor3 & | surface_props_data, | ||
const Vector & | za_grid, | ||
const Index & | use_parallel_za, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: spectral_radiance_fieldExpandCloudboxField.
Uses and expands cloudbox_field to set spectral_radiance_field.
The method demands that cloudbox_field starts at the first pressure level (i.e. cloudbox_limits[0] is 0). The method copies cloudbox_field to fill spectral_radiance_field up to the top of the cloudbox.
To fill the remaning part of spectral_radiance_field, clear-sky calculations are performed largely in the same maner as done by spectral_radiance_fieldClearskyPlaneParallel*. That is, clear-sky calculations are done for the upper part of the atmosphere, assuming a flat planet.
Note that the cloud box constitutes the lower boundary for the later calculations, and iy_cloudbox_agenda must be set to perform an interpolation of the cloudbox field.
[in,out] | ws | Workspace |
[out] | spectral_radiance_field | WS Output |
[in] | propmat_clearsky_agenda | WS Input |
[in] | water_p_eq_agenda | WS Input |
[in] | iy_space_agenda | WS Input |
[in] | iy_surface_agenda | WS Input |
[in] | iy_cloudbox_agenda | WS Input |
[in] | stokes_dim | WS Input |
[in] | f_grid | WS Input |
[in] | atmosphere_dim | WS Input |
[in] | p_grid | WS Input |
[in] | z_field | WS Input |
[in] | t_field | WS Input |
[in] | nlte_field | WS Input |
[in] | vmr_field | WS Input |
[in] | abs_species | WS Input |
[in] | wind_u_field | WS Input |
[in] | wind_v_field | WS Input |
[in] | wind_w_field | WS Input |
[in] | mag_u_field | WS Input |
[in] | mag_v_field | WS Input |
[in] | mag_w_field | WS Input |
[in] | z_surface | WS Input |
[in] | cloudbox_on | WS Input |
[in] | cloudbox_limits | WS Input |
[in] | cloudbox_field | WS Input |
[in] | ppath_lmax | WS Input |
[in] | rte_alonglos_v | WS Input |
[in] | rt_integration_option | WS Input |
[in] | surface_props_data | WS Input |
[in] | za_grid | WS Input |
[in] | use_parallel_za | Generic Input (Default: "0") |
Definition at line 711 of file m_fluxes.cc.
References ARTS_ASSERT, AgendaManip::get_iy_main_agenda(), Ppath::gp_p, iyEmissionStandard(), Array< base >::nelem(), Ppath::np, and ppathPlaneParallel().
Referenced by spectral_radiance_fieldExpandCloudboxField_g().
|
inlineconstexpr |
Definition at line 35 of file m_fluxes.cc.
Referenced by AngularGridsSetFluxCalc(), irradiance_fieldFromRadiance(), and spectral_irradiance_fieldFromSpectralRadianceField().
|
inlineconstexpr |
Definition at line 34 of file m_fluxes.cc.
Referenced by irradiance_fieldFromRadiance(), and spectral_irradiance_fieldFromSpectralRadianceField().