#include <cmath>
#include "arts.h"
#include "check_input.h"
#include "complex.h"
#include "physics_funcs.h"
#include "matpackIII.h"
#include "math_funcs.h"
#include "messages.h"
#include "special_interp.h"
#include "absorption.h"
#include "interpolation.h"
#include "fastem.h"
#include "gridded_fields.h"
Go to the source code of this file.
Functions | |
void | surface_specular_los (VectorView los, const Index &atmosphere_dim) |
surface_specular_los | |
void | surface_specular_R_and_b (MatrixView surface_rmatrix, VectorView surface_emission, const Complex &Rv, const Complex &Rh, const Numeric &f, const Index &stokes_dim, const Numeric &surface_skin_t) |
surface_specular_R_and_b | |
void | InterpSurfaceFieldToRteGps (Numeric &outvalue, const Index &atmosphere_dim, const Vector &lat_grid, const Vector &lon_grid, const GridPos &rte_gp_lat, const GridPos &rte_gp_lon, const Matrix &field) |
WORKSPACE METHOD: InterpSurfaceFieldToRteGps. | |
void | InterpSurfaceEmissivityFieldIncLatLon (Numeric &outvalue, const Index &atmosphere_dim, const Vector &rte_pos, const Vector &rte_los, const GField3 &gfield) |
WORKSPACE METHOD: InterpSurfaceEmissivityFieldIncLatLon. | |
void | r_geoidSpherical (Matrix &r_geoid, const Index &atmosphere_dim, const Vector &lat_grid, const Vector &lon_grid, const Numeric &r) |
WORKSPACE METHOD: r_geoidSpherical. | |
void | r_geoidWGS84 (Matrix &r_geoid, const Index &atmosphere_dim, const Vector &lat_grid, const Vector &lon_grid, const Numeric &latitude_1d, const Numeric &azimuth_angle_1d) |
WORKSPACE METHOD: r_geoidWGS84. | |
void | surfaceBlackbody (Matrix &surface_los, Tensor4 &surface_rmatrix, Matrix &surface_emission, const Vector &f_grid, const Index &stokes_dim, const Numeric &surface_skin_t) |
WORKSPACE METHOD: surfaceBlackbody. | |
void | surfaceFlatRefractiveIndex (Matrix &surface_los, Tensor4 &surface_rmatrix, Matrix &surface_emission, const Vector &f_grid, const Index &stokes_dim, const Index &atmosphere_dim, const Vector &rte_los, const Numeric &surface_skin_t, const Matrix &complex_n) |
WORKSPACE METHOD: surfaceFlatRefractiveIndex. | |
void | surfaceFlatVaryingEmissivity (Matrix &surface_los, Tensor4 &surface_rmatrix, Matrix &surface_emission, const Vector &f_grid, const Index &stokes_dim, const Index &atmosphere_dim, const Vector &rte_los, const Numeric &surface_skin_t, const Vector &surface_emissivity) |
WORKSPACE METHOD: surfaceFlatVaryingEmissivity. | |
void | surfaceFlatSingleEmissivity (Matrix &surface_los, Tensor4 &surface_rmatrix, Matrix &surface_emission, const Vector &f_grid, const Index &stokes_dim, const Index &atmosphere_dim, const Vector &rte_los, const Numeric &surface_skin_t, const Numeric &surface_emissivity) |
WORKSPACE METHOD: surfaceFlatSingleEmissivity. | |
Variables | |
const Numeric | DEG2RAD |
const Numeric | RAD2DEG |
const Numeric | EARTH_RADIUS |
const Index | GFIELD4_IA_GRID |
const Index | GFIELD4_F_GRID |
const Index | GFIELD4_LAT_GRID |
const Index | GFIELD4_LON_GRID |
void InterpSurfaceEmissivityFieldIncLatLon | ( | Numeric & | outvalue, | |
const Index & | atmosphere_dim, | |||
const Vector & | rte_pos, | |||
const Vector & | rte_los, | |||
const GField3 & | gfield | |||
) |
WORKSPACE METHOD: InterpSurfaceEmissivityFieldIncLatLon.
Interpolation of surface emissivity specified as a function of incidence angle, latitude and longitude.
The surface emissivity field has here three dimension, with incidence angle as first/column dimension, latitude as second/row dimension and longitude as third/page dimension. Grid names must be set exactly to "Incidence angle", "Latitude" and "Longitude". No extrapolation is allowed.
For 1D cases it is expected that the latitude and longitude grids have both a length of 1. For 2D the same apllies to the longitude grid.
This method can be used togetehr with e.g. surfaceFlatSingleEmissivity*.
[out] | outvalue | Generic output |
[in] | atmosphere_dim | WS Input |
[in] | rte_pos | WS Input |
[in] | rte_los | WS Input |
[in] | gfield | Generic Input |
Definition at line 236 of file m_surface.cc.
References abs, chk_if_in_range(), interp_gfield3(), ConstVectorView::nelem(), and out3.
Referenced by InterpSurfaceEmissivityFieldIncLatLon_g().
void InterpSurfaceFieldToRteGps | ( | Numeric & | gout1, | |
const Index & | atmosphere_dim, | |||
const Vector & | lat_grid, | |||
const Vector & | lon_grid, | |||
const GridPos & | rte_gp_lat, | |||
const GridPos & | rte_gp_lon, | |||
const Matrix & | gin1 | |||
) |
WORKSPACE METHOD: InterpSurfaceFieldToRteGps.
Scalar interpolation of surface fields.
The position is specified by the combination of *rte_gp_lat* and rte_gp_lon*.
Generic output: <br> Numeric : Value obtained by interpolation.
Generic input: <br> Matrix : Field to interpolate.
[out] | gout1 | Generic output |
[in] | atmosphere_dim | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | rte_gp_lat | WS Input |
[in] | rte_gp_lon | WS Input |
[in] | gin1 | Generic Input |
Definition at line 217 of file m_surface.cc.
References interp_atmsurface_by_gp(), and out3.
Referenced by InterpSurfaceFieldToRteGps_g().
void r_geoidSpherical | ( | Matrix & | r_geoid, | |
const Index & | atmosphere_dim, | |||
const Vector & | lat_grid, | |||
const Vector & | lon_grid, | |||
const Numeric & | r | |||
) |
WORKSPACE METHOD: r_geoidSpherical.
Sets the geoid to be a perfect sphere.
The radius of the sphere is selected by the keyword argument *r*. If the keyword is set to be negative, the radius is set to the global internal variable *EARTH_RADIUS*, defined in constants.cc.
Keywords: <br> r : Radius of geoid sphere. See further above.
[out] | r_geoid | WS Output |
[in] | atmosphere_dim | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | r | Generic Input |
Definition at line 265 of file m_surface.cc.
References chk_atm_grids(), chk_if_in_range(), EARTH_RADIUS, ConstMatrixView::ncols(), ConstVectorView::nelem(), ConstMatrixView::nrows(), out2, out3, and Matrix::resize().
Referenced by r_geoidSpherical_g().
void r_geoidWGS84 | ( | Matrix & | r_geoid, | |
const Index & | atmosphere_dim, | |||
const Vector & | lat_grid, | |||
const Vector & | lon_grid, | |||
const Numeric & | lat_1d, | |||
const Numeric & | meridian_angle_1d | |||
) |
WORKSPACE METHOD: r_geoidWGS84.
Sets the geoid radius to match the WGS-84 reference ellipsoid.
For 1D, the geoid radius is set to the radius of curvature of the WGS-84 ellipsoid for the position and observation direction described with *lat_1d* and *meridian_angle_1d*. For 2D and 3D, *r_geoid* is set to the radius of the WGS-84 ellipsoid for the crossing points of the latitude and longitude grids.
Please note that the latitude grid must contain true latitudes if the function shall give correct result, and not just arbitrary orbit angles which is allowed for 2D cases.
[out] | r_geoid | WS Output |
[in] | atmosphere_dim | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | lat_1d | WS Input |
[in] | meridian_angle_1d | WS Input |
Definition at line 304 of file m_surface.cc.
References chk_atm_grids(), chk_if_in_range(), DEG2RAD, ConstMatrixView::ncols(), ConstVectorView::nelem(), ConstMatrixView::nrows(), out2, out3, and Matrix::resize().
Referenced by r_geoidWGS84_g(), and sensor_posAddGeoidWGS84().
void surface_specular_los | ( | VectorView | los, | |
const Index & | atmosphere_dim | |||
) |
surface_specular_los
Calculates the LOS for a specular surface reflection.
los | In/Out: LOS to be modified. | |
atmosphere_dim | Input: As the WSV with the same name. |
Definition at line 85 of file m_surface.cc.
References abs, ConstVectorView::nelem(), and sign().
Referenced by surfaceFlatRefractiveIndex(), and surfaceFlatVaryingEmissivity().
void surface_specular_R_and_b | ( | MatrixView | surface_rmatrix, | |
VectorView | surface_emission, | |||
const Complex & | Rv, | |||
const Complex & | Rh, | |||
const Numeric & | f, | |||
const Index & | stokes_dim, | |||
const Numeric & | surface_skin_t | |||
) |
surface_specular_R_and_b
Sets up the surface reflection matrix and emission vector for the case of specular reflection.
The function handles only one frequency at the time.
See further the surface chapter in the user guide.
surface_rmatrix | Out: As the WSV with the same name, but slice for one direction and one frequency. | |
surface_emission | Out: As the WSV with the same name, but slice for one direction and one frequency. | |
Rv | In: Complex amplitude relection coefficient for vertical polarisation. | |
Rh | In: Complex amplitude relection coefficient for horisontal polarisation. | |
f | In: Frequency (a scalar). | |
stokes_dim | In: As the WSV with the same name. | |
surface_skin_t | In: As the WSV with the same name. |
Definition at line 147 of file m_surface.cc.
References abs, ConstMatrixView::ncols(), ConstVectorView::nelem(), ConstMatrixView::nrows(), and planck().
Referenced by surfaceFlatRefractiveIndex().
void surfaceBlackbody | ( | Matrix & | surface_los, | |
Tensor4 & | surface_rmatrix, | |||
Matrix & | surface_emission, | |||
const Vector & | f_grid, | |||
const Index & | stokes_dim, | |||
const Numeric & | surface_skin_t | |||
) |
WORKSPACE METHOD: surfaceBlackbody.
Creates variables to mimic a blackbody surface.
This method sets up *surface_los*, *surface_rmatrix* and surface_emission* for *surfaceCalc*. In this case, *surface_los* and *surface_rmatrix* are set to be empty, and *surface_emission* to hold blackbody radiation for a temperature of *surface_skin_t*.
[out] | surface_los | WS Output |
[out] | surface_rmatrix | WS Output |
[out] | surface_emission | WS Output |
[in] | f_grid | WS Input |
[in] | stokes_dim | WS Input |
[in] | surface_skin_t | WS Input |
Definition at line 400 of file m_surface.cc.
References chk_if_in_range(), chk_if_over_0(), ConstVectorView::nelem(), out2, planck(), Tensor4::resize(), and Matrix::resize().
Referenced by surfaceBlackbody_g().
void surfaceFlatRefractiveIndex | ( | Matrix & | surface_los, | |
Tensor4 & | surface_rmatrix, | |||
Matrix & | surface_emission, | |||
const Vector & | f_grid, | |||
const Index & | stokes_dim, | |||
const Index & | atmosphere_dim, | |||
const Vector & | rte_los, | |||
const Numeric & | surface_skin_t, | |||
const Matrix & | complex_n | |||
) |
WORKSPACE METHOD: surfaceFlatRefractiveIndex.
Creates variables to mimic specular reflection by a (flat) surface where the refracive index is specified.
The dielectric properties of the surface are described by complex_n*. The Fresnel eqiuations are used to calculate amplitude reflection coefficients. The method can thus result in that the reflection properties differ between frequencies and polarizations.
Local thermodynamic equilibrium is assumed, which corresponds to that the reflection and emission coefficients add up to 1.
[out] | surface_los | WS Output |
[out] | surface_rmatrix | WS Output |
[out] | surface_emission | WS Output |
[in] | f_grid | WS Input |
[in] | stokes_dim | WS Input |
[in] | atmosphere_dim | WS Input |
[in] | rte_los | WS Input |
[in] | surface_skin_t | WS Input |
[in] | complex_n | WS Input |
Definition at line 428 of file m_surface.cc.
References abs, chk_if_in_range(), chk_if_over_0(), chk_matrix_ncols(), fresnel(), joker, ConstVectorView::nelem(), ConstMatrixView::nrows(), out2, out3, Tensor4::resize(), Matrix::resize(), surface_specular_los(), and surface_specular_R_and_b().
Referenced by surfaceFlatRefractiveIndex_g().
void surfaceFlatSingleEmissivity | ( | Matrix & | surface_los, | |
Tensor4 & | surface_rmatrix, | |||
Matrix & | surface_emission, | |||
const Vector & | f_grid, | |||
const Index & | stokes_dim, | |||
const Index & | atmosphere_dim, | |||
const Vector & | rte_los, | |||
const Numeric & | surface_skin_t, | |||
const Numeric & | surface_emissivity | |||
) |
WORKSPACE METHOD: surfaceFlatSingleEmissivity.
Creates variables to mimic specular reflection by a (flat) surface where the emissivity is specified.
As *surfaceFlatVaryingEmissivity*, but assumes that the emissivity does not vary with frequency.
Generic output and input: <br> surface_emissivity : The emissivity, a value between 0 and 1.
[out] | surface_los | WS Output |
[out] | surface_rmatrix | WS Output |
[out] | surface_emission | WS Output |
[in] | f_grid | WS Input |
[in] | stokes_dim | WS Input |
[in] | atmosphere_dim | WS Input |
[in] | rte_los | WS Input |
[in] | surface_skin_t | WS Input |
[in] | surface_emissivity | Generic Input |
Definition at line 547 of file m_surface.cc.
References chk_if_in_range(), ConstVectorView::nelem(), and surfaceFlatVaryingEmissivity().
Referenced by surfaceFlatSingleEmissivity_g().
void surfaceFlatVaryingEmissivity | ( | Matrix & | surface_los, | |
Tensor4 & | surface_rmatrix, | |||
Matrix & | surface_emission, | |||
const Vector & | f_grid, | |||
const Index & | stokes_dim, | |||
const Index & | atmosphere_dim, | |||
const Vector & | rte_los, | |||
const Numeric & | surface_skin_t, | |||
const Vector & | surface_emissivity | |||
) |
WORKSPACE METHOD: surfaceFlatVaryingEmissivity.
Creates variables to mimic specular reflection by a (flat) surface where the emissivity is specified.
The usage of emissivity does not provide any polarisation information and it is only formally correct to use this method for *stokes_dim* = 1 (but there is no hard-coded restriction).
Local thermodynamic equilibrium is assumed, which corresponds to that the reflection and emission coefficients add up to 1.
Generic output and input: <br> surface_emissivity : The emissivity, for each frequency in <br> *f_grid*. Values between 0 and 1.
[out] | surface_los | WS Output |
[out] | surface_rmatrix | WS Output |
[out] | surface_emission | WS Output |
[in] | f_grid | WS Input |
[in] | stokes_dim | WS Input |
[in] | atmosphere_dim | WS Input |
[in] | rte_los | WS Input |
[in] | surface_skin_t | WS Input |
[in] | surface_emissivity | Generic Input |
Definition at line 489 of file m_surface.cc.
References chk_if_in_range(), chk_if_over_0(), joker, max, min, ConstVectorView::nelem(), out2, out3, planck(), Tensor4::resize(), Matrix::resize(), and surface_specular_los().
Referenced by surfaceFlatSingleEmissivity(), and surfaceFlatVaryingEmissivity_g().
const Numeric EARTH_RADIUS |
const Index GFIELD4_F_GRID |
const Index GFIELD4_IA_GRID |
const Index GFIELD4_LAT_GRID |
const Index GFIELD4_LON_GRID |