ARTS 2.5.11 (git: 6827797f)
|
Functions needed for radiative transfer with direct sources. More...
#include "sun.h"
#include "auto_md.h"
#include "agenda_class.h"
#include "arts_conversions.h"
#include "check_input.h"
#include "debug.h"
#include "matpack_data.h"
#include "messages.h"
#include "physics_funcs.h"
#include "propagationmatrix.h"
#include "geodetic.h"
#include "arts.h"
#include "workspace_ng.h"
Go to the source code of this file.
Functions | |
std::ostream & | operator<< (std::ostream &os, const Sun &sun) |
void | get_scattered_sunsource (Workspace &ws, RadiationVector &scattered_sunlight, const Vector &f_grid, const Numeric &p, const Numeric &T, const Vector &vmr, const Matrix &transmitted_sunlight, const Vector &gas_scattering_los_in, const Vector &gas_scattering_los_out, const Agenda &gas_scattering_agenda) |
Calculates the radiance spectrum of sun which is scattered by the atmospheric gases. | |
void | get_sun_background (Matrix &iy, Index &suns_visible, const ArrayOfSun &suns, const Ppath &ppath, const Vector &f_grid, const Index &stokes_dim, const Index &atmosphere_dim, const Vector &refellipsoid) |
Gets the sun background for a given ppath. | |
void | get_sun_radiation (Matrix &iy, Index &suns_visible, const Sun &sun, const Vector &rtp_pos, const Vector &rtp_los, const Vector &refellipsoid) |
Checks and adds sun radiance if sun is in line of sight. | |
void | get_direct_radiation (Workspace &ws, ArrayOfMatrix &direct_radiation, ArrayOfArrayOfTensor3 &ddirect_radiation_dx, const Index &stokes_dim, const Vector &f_grid, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, 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 Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const Index &gas_scattering_do, const Index &irradiance_flag, const ArrayOfPpath &sun_ppaths, const ArrayOfSun &suns, const ArrayOfIndex &suns_visible, const Vector &refellipsoid, const Tensor4 &pnd_field, const ArrayOfTensor4 &dpnd_field_dx, const ArrayOfString &scat_species, const ArrayOfArrayOfSingleScatteringData &scat_data, const Index &jacobian_do, const ArrayOfRetrievalQuantity &jacobian_quantities, const Agenda &propmat_clearsky_agenda, const Agenda &water_p_eq_agenda, const Agenda &gas_scattering_agenda, const Numeric &rte_alonglos_v, const Verbosity &verbosity) |
Calculates the transmitted sun radiation at the end position of the ppath. | |
void | get_sun_ppaths (Workspace &ws, ArrayOfPpath &sun_ppaths, ArrayOfIndex &suns_visible, ArrayOfVector &sun_rte_los, const Vector &rte_pos, const ArrayOfSun &suns, const Vector &f_grid, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &z_field, const Matrix &z_surface, const Vector &refellipsoid, const Numeric &ppath_lmax, const Numeric &ppath_lraytrace, const Agenda &ppath_step_agenda, const Verbosity &verbosity) |
Calculates the ppath towards the suns from a given position and indicates if sun is visible or not. | |
Matrix | regrid_sun_spectrum (const GriddedField2 &sun_spectrum_raw, const Vector &f_grid, const Index &stokes_dim, const Numeric &temperature, const Verbosity &verbosity) |
regrid_sun_spectrum | |
Functions needed for radiative transfer with direct sources.
Definition in file sun.cc.
void get_direct_radiation | ( | Workspace & | ws, |
ArrayOfMatrix & | direct_radiation, | ||
ArrayOfArrayOfTensor3 & | ddirect_radiation_dx, | ||
const Index & | stokes_dim, | ||
const Vector & | f_grid, | ||
const Index & | atmosphere_dim, | ||
const Vector & | p_grid, | ||
const Vector & | lat_grid, | ||
const Vector & | lon_grid, | ||
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 Index & | cloudbox_on, | ||
const ArrayOfIndex & | cloudbox_limits, | ||
const Index & | gas_scattering_do, | ||
const Index & | irradiance_flag, | ||
const ArrayOfPpath & | sun_ppaths, | ||
const ArrayOfSun & | suns, | ||
const ArrayOfIndex & | suns_visible, | ||
const Vector & | refellipsoid, | ||
const Tensor4 & | pnd_field, | ||
const ArrayOfTensor4 & | dpnd_field_dx, | ||
const ArrayOfString & | scat_species, | ||
const ArrayOfArrayOfSingleScatteringData & | scat_data, | ||
const Index & | jacobian_do, | ||
const ArrayOfRetrievalQuantity & | jacobian_quantities, | ||
const Agenda & | propmat_clearsky_agenda, | ||
const Agenda & | water_p_eq_agenda, | ||
const Agenda & | gas_scattering_agenda, | ||
const Numeric & | rte_alonglos_v, | ||
const Verbosity & | verbosity | ||
) |
Calculates the transmitted sun radiation at the end position of the ppath.
[in,out] | ws | ARTS workspace. |
[out] | direct_radiation | Matrix Transmitted monochromatic irradiance spectrum of sun. |
[out] | ddirect_radiation_dx | Array of Tensor3 Jacobian of transmitted monochromatic irradiance spectrum of sun. |
[in] | stokes_dim | As the WSV. |
[in] | f_grid | As the WSV. |
[in] | atmosphere_dim | As the WSV. |
[in] | p_grid | As the WSV. |
[in] | lat_grid | As the WSV. |
[in] | lon_grid | As the WSV. |
[in] | t_field | As the WSV. |
[in] | nlte_field | As the WSV. |
[in] | vmr_field | As the WSV. |
[in] | abs_species | As the WSV. |
[in] | wind_u_field | As the WSV. |
[in] | wind_v_field | As the WSV. |
[in] | wind_w_field | As the WSV. |
[in] | mag_u_field | As the WSV. |
[in] | mag_v_field | As the WSV. |
[in] | mag_w_field | As the WSV. |
[in] | cloudbox_on | As the WSV. |
[in] | cloudbox_limits | As the WSV. |
[in] | gas_scattering_do | As the WSV. |
[in] | irradiance_flag | Index Flag indicating if the transmitted radiation is spectral irradiance (1) or if it is spectral radiance (0). |
[in] | sun_ppaths | ArrayOfPpath Propagation path towards each sun. |
[in] | suns | As the WSV. |
[in] | suns_visible | ArrayOfIndex Flag indicating if eah sun is visible. |
[in] | refellipsoid | As the WSV. |
[in] | pnd_field | As the WSV. |
[in] | dpnd_field_dx | As the WSV. |
[in] | scat_species | As the WSV. |
[in] | scat_data | As the WSV. |
[in] | jacobian_do | As the WSV. |
[in] | jacobian_quantities | As the WSV. |
[in] | propmat_clearsky_agenda | As the WSV. |
[in] | water_p_eq_agenda | As the WSV. |
[in] | gas_scattering_agenda | As the WSV. |
[in] | ppath_step_agenda | As the WSV. |
[in] | rte_alonglos_v | As the WSV. |
[in] | verbosity | Verbosity. |
Definition at line 195 of file sun.cc.
References distance3D(), get_sun_radiation(), iyTransmissionStandard(), Array< base >::nelem(), pos2refell_r(), and refell2r().
Referenced by iyClearsky(), and iySurfaceLambertianDirect().
void get_scattered_sunsource | ( | Workspace & | ws, |
RadiationVector & | scattered_sunlight, | ||
const Vector & | f_grid, | ||
const Numeric & | p, | ||
const Numeric & | T, | ||
const Vector & | vmr, | ||
const Matrix & | transmitted_sunlight, | ||
const Vector & | gas_scattering_los_in, | ||
const Vector & | gas_scattering_los_out, | ||
const Agenda & | gas_scattering_agenda | ||
) |
Calculates the radiance spectrum of sun which is scattered by the atmospheric gases.
[in,out] | ws | ARTS workspace. |
[out] | scattered_sunlight | RadiationVector scattered monochromatic radiance spectrum of sun. |
[in] | f_grid | Vector frequency grid. |
[in] | p | Numeric pressure at location of scattering. |
[in] | T | Numeric temperature at location of scattering. |
[in] | vmr | Vector volume mixing ratios of absorption species at location of scattering. |
[in] | transmitted_sunlight | Matrix transmitted monochromatic irradiance spectrum of sun at location of scattering. |
[in] | gas_scattering_los_in | Vector incoming direction of the transmitted sun irradiance spectrum. |
[in] | gas_scattering_los_out | outgoing direction of the transmitted sun irradiance spectrum. |
[in] | gas_scattering_agenda | Agenda agenda calculating the gas scattering cross sectionand matrix. |
Definition at line 45 of file sun.cc.
References gas_scattering_agendaExecute(), and RadiationVector::leftMul().
Referenced by iyClearsky().
void get_sun_background | ( | Matrix & | iy, |
Index & | suns_visible, | ||
const ArrayOfSun & | suns, | ||
const Ppath & | ppath, | ||
const Vector & | f_grid, | ||
const Index & | stokes_dim, | ||
const Index & | atmosphere_dim, | ||
const Vector & | refellipsoid | ||
) |
Gets the sun background for a given ppath.
iy is zero if there is no sun in the line of sight at TOA.
[out] | iy | Matrix radiance spectrum of suns. |
[out] | suns_visible | Index indicating if suns are in los |
[in] | suns | Array of sun (structures). |
[in] | ppath | Propagation path as the WSV. |
[in] | f_grid | Vector as the WSV. |
[in] | stokes_dim | Index as the WSV. |
[in] | atmosphere_dim | Index as the WSV. |
[in] | refellipsoid | Vector as the WSV. |
Definition at line 96 of file sun.cc.
References get_sun_radiation(), Ppath::los, Array< base >::nelem(), Ppath::np, Ppath::pos, and ppath_what_background().
Referenced by iyClearsky(), and surface_get_incoming_direct().
void get_sun_ppaths | ( | Workspace & | ws, |
ArrayOfPpath & | sun_ppaths, | ||
ArrayOfIndex & | suns_visible, | ||
ArrayOfVector & | sun_rte_los, | ||
const Vector & | rte_pos, | ||
const ArrayOfSun & | suns, | ||
const Vector & | f_grid, | ||
const Index & | atmosphere_dim, | ||
const Vector & | p_grid, | ||
const Vector & | lat_grid, | ||
const Vector & | lon_grid, | ||
const Tensor3 & | z_field, | ||
const Matrix & | z_surface, | ||
const Vector & | refellipsoid, | ||
const Numeric & | ppath_lmax, | ||
const Numeric & | ppath_lraytrace, | ||
const Agenda & | ppath_step_agenda, | ||
const Verbosity & | verbosity | ||
) |
Calculates the ppath towards the suns from a given position and indicates if sun is visible or not.
[in,out] | ws | ARTS workspace. |
[out] | sun_ppaths | ArrayOfPpath Propagation path towards each sun. |
[out] | suns_visible | ArrayOfIndex Flag indicating if eah sun is visible. |
[out] | sun_rte_los | ArrayOfVector Incoming direction of the each transmitted sun radiation. |
[in] | rte_pos | As the WSV. |
[in] | suns | As the WSV. |
[in] | f_grid | As the WSV. |
[in] | atmosphere_dim | As the WSV. |
[in] | p_grid | As the WSV. |
[in] | lat_grid | As the WSV. |
[in] | lon_grid | As the WSV. |
[in] | z_field | As the WSV. |
[in] | z_surface | As the WSV. |
[in] | refellipsoid | As the WSV. |
[in] | ppath_lmax | As the WSV. |
[in] | ppath_lraytrace | As the WSV. |
[in] | ppath_step_agenda | As the WSV. |
[in] | verbosity | Verbosity. |
Definition at line 371 of file sun.cc.
References Array< base >::nelem(), Ppath::np, pos2refell_r(), ppath_what_background(), ppathFromRtePos2(), and rte_losGeometricFromRtePosToRtePos2().
Referenced by iyClearsky(), and iySurfaceLambertianDirect().
void get_sun_radiation | ( | Matrix & | iy, |
Index & | suns_visible, | ||
const Sun & | sun, | ||
const Vector & | rtp_pos, | ||
const Vector & | rtp_los, | ||
const Vector & | refellipsoid | ||
) |
Checks and adds sun radiance if sun is in line of sight.
[in,out] | iy | Matrix of sun. |
[out] | suns_visible | Index indicating if sun are in los |
[in] | sun | Sun-structure. |
[in] | rtp_pos | The position of the ppath point. |
[in] | rtp_los | The line of sight of the ppath. |
[in] | refellipsoid | As the WSV with the same name. |
Definition at line 126 of file sun.cc.
References Sun::distance, Sun::latitude, Sun::longitude, poslos2cart(), Sun::radius, refell2r(), Sun::spectrum, and sph2cart().
Referenced by get_direct_radiation(), and get_sun_background().
std::ostream & operator<< | ( | std::ostream & | os, |
const Sun & | sun | ||
) |
Matrix regrid_sun_spectrum | ( | const GriddedField2 & | sun_spectrum_raw, |
const Vector & | f_grid, | ||
const Index & | stokes_dim, | ||
const Numeric & | temperature, | ||
const Verbosity & | verbosity | ||
) |
regrid_sun_spectrum
Regrids a given spectrum from a griddedfield2 to the f_grid. if the f_grid covers a larger range as the given one, one can choose between two padding options: zeros: Intensities outside the given spectrum are set to zero planck: Intensities outside the given spectrum are initilizied with the black body value at that frequency.
[in] | sun_spectrum_raw | gf2 of the given spectrum. |
[in] | f_grid | f_grid for the calculation. |
[in] | stokes_dim | stokes_dim for the calculation. |
[in] | temperature | Temperature for the planck padding. |
Definition at line 446 of file sun.cc.
References ARTS_USER_ERROR, chk_interpolation_grids(), CREATE_OUTS, GriddedField2::data, GriddedField::get_numeric_grid(), gridpos(), interp(), interpweights(), Array< base >::nelem(), and planck().
Referenced by sunsAddSingleFromGrid(), and sunsAddSingleFromGridAtLocation().