ARTS
2.3.1285(git:92a29ea9-dirty)
|
#include "surface.h"
#include <cmath>
#include "auto_md.h"
#include "check_input.h"
#include "complex.h"
#include "geodetic.h"
#include "math_funcs.h"
#include "matpackI.h"
#include "physics_funcs.h"
#include "workspace_ng.h"
Go to the source code of this file.
Functions | |
Numeric | calc_incang (ConstVectorView rte_los, ConstVectorView specular_los) |
Calculates the incidence angle for a flat surface, based on rte_los and specular_los. More... | |
Index | index_of_zsurface (const Numeric &z_surface, ConstVectorView z_profile) |
Lccates the surface with respect to pressure levels. More... | |
void | surface_calc (Matrix &iy, ConstTensor3View I, ConstMatrixView surface_los, ConstTensor4View surface_rmatrix, ConstMatrixView surface_emission) |
Weights together downwelling radiation and surface emission. More... | |
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) |
Sets up the surface reflection matrix and emission vector for the case of specular reflection. More... | |
void | surface_props_check (const Index &atmosphere_dim, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &surface_props_data, const ArrayOfString &surface_props_names) |
Peforms basic checks of surface_props_data and surface_props_names More... | |
void | surface_props_interp (Vector &v, const String &vname, const Index &atmosphere_dim, const ArrayOfGridPos &gp_lat, const ArrayOfGridPos &gp_lon, const Matrix &itw, const Tensor3 &surface_props_data, const ArrayOfString &surface_props_names) |
Peforms an interpolation of surface_props_data More... | |
void | dsurface_check (const ArrayOfString &surface_props_names, const ArrayOfString &dsurface_names, const ArrayOfTensor4 dsurface_rmatrix_dx, const ArrayOfMatrix &dsurface_emission_dx) |
Peforms basic checks of the dsurface variables. More... | |
This file contains internal functions associated with the surface.
Definition in file surface.cc.
Numeric calc_incang | ( | ConstVectorView | rte_los, |
ConstVectorView | specular_los | ||
) |
Calculates the incidence angle for a flat surface, based on rte_los and specular_los.
[in] | rte_los | As the WSV with the same name. |
[in] | specular_los | As the WSV with the same name. |
Definition at line 50 of file surface.cc.
References abs.
Referenced by surfaceFlatRefractiveIndex().
void dsurface_check | ( | const ArrayOfString & | surface_props_names, |
const ArrayOfString & | dsurface_names, | ||
const ArrayOfTensor4 | dsurface_rmatrix_dx, | ||
const ArrayOfMatrix & | dsurface_emission_dx | ||
) |
Peforms basic checks of the dsurface variables.
No calculaions, just checks
[in] | surface_props_data | As the WVS with the same name. |
[in] | surface_props_names | As the WVS with the same name. |
[in] | dsurface_names | As the WVS with the same name. |
[in] | dsurface_ratrix_dx | As the WVS with the same name. |
[in] | dsurface_emission_dx | As the WVS with the same name. |
Definition at line 210 of file surface.cc.
References i, Array< base >::nelem(), and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().
Referenced by SurfaceDummy(), SurfaceFastem(), and SurfaceTessem().
Index index_of_zsurface | ( | const Numeric & | z_surface, |
ConstVectorView | z_profile | ||
) |
Lccates the surface with respect to pressure levels.
The function returns the index of the pressure level at or just below the surface.
[in] | z_surface | A surface value (probably a value from WSV z_surface) |
[in] | z_profile | A profile of geometrical altitudes (probably a page of z_field) |
Definition at line 54 of file surface.cc.
Referenced by spectral_radiance_fieldClearskyPlaneParallel().
void surface_calc | ( | Matrix & | iy, |
ConstTensor3View | I, | ||
ConstMatrixView | surface_los, | ||
ConstTensor4View | surface_rmatrix, | ||
ConstMatrixView | surface_emission | ||
) |
Weights together downwelling radiation and surface emission.
iy* must have correct size when function is called.
[out] | iy | Radiation matrix, amtching the WSV with the same name. |
[in] | I | Downwelling radiation, with dimensions (surface_los, f_grid, stokes_dim) |
[in] | surface_los | As the WSV with the same name. |
[in] | surface_rmatrix | As the WSV with the same name. |
[in] | surface_emission | As the WSV with the same name. |
Definition at line 63 of file surface.cc.
References joker, mult(), ConstTensor3View::ncols(), ConstTensor3View::nrows(), and ConstMatrixView::nrows().
Referenced by iySurfaceFastem(), iySurfaceRtpropAgenda(), and iySurfaceRtpropCalc().
void surface_props_check | ( | const Index & | atmosphere_dim, |
const Vector & | lat_grid, | ||
const Vector & | lon_grid, | ||
const Tensor3 & | surface_props_data, | ||
const ArrayOfString & | surface_props_names | ||
) |
Peforms basic checks of surface_props_data and surface_props_names
No calculaions, just checks
[in] | atmosphere_dim | As the WVS with the same name. |
[in] | lat_grid | As the WVS with the same name. |
[in] | lon_grid | As the WVS with the same name. |
[in] | surface_props_data | As the WVS with the same name. |
[in] | surface_props_names | As the WVS with the same name. |
Definition at line 139 of file surface.cc.
References i, ConstTensor3View::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), Absorption::nelem(), ConstTensor3View::npages(), ConstTensor3View::nrows(), and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().
Referenced by SurfaceDummy(), SurfaceFastem(), and SurfaceTessem().
void surface_props_interp | ( | Vector & | v, |
const String & | vname, | ||
const Index & | atmosphere_dim, | ||
const ArrayOfGridPos & | gp_lat, | ||
const ArrayOfGridPos & | gp_lon, | ||
const Matrix & | itw, | ||
const Tensor3 & | surface_props_data, | ||
const ArrayOfString & | surface_props_names | ||
) |
Peforms an interpolation of surface_props_data
The function assumes that the intrpolatin gives a single value. The vector v* must have lenght 1.
[in] | v | Interpolated value |
[in] | vname | Name of surface variable to interpolate |
[in] | atmosphere_dim | As the WVS with the same name. |
[in] | gp_lat | Pre-calculatd latitude grid positions |
[in] | gp_lon | Pre-calculatd longitude grid positions |
[in] | itw | Pre-calculatd interpolation weight |
[in] | surface_props_data | As the WVS with the same name. |
[in] | surface_props_names | As the WVS with the same name. |
Definition at line 180 of file surface.cc.
References i, interp_atmsurface_by_itw(), joker, Array< base >::nelem(), ConstVectorView::nelem(), ConstTensor3View::npages(), and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().
Referenced by SurfaceFastem(), and SurfaceTessem().
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 | ||
) |
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.
[out] | surface_rmatrix | As the WSV with the same name, but slice for one direction and one frequency. |
[out] | surface_emission | As the WSV with the same name, but slice for one direction and one frequency. |
[in] | Rv | Complex amplitude relection coefficient vertical polarisation. |
[in] | Rh | Complex amplitude relection coefficient horisontal polarisation. |
[in] | f | Frequency (a scalar). |
[in] | stokes_dim | As the WSV with the same name. |
[in] | surface_skin_t | As the WSV with the same name. |
Definition at line 88 of file surface.cc.
References abs, conj(), ConstMatrixView::ncols(), ConstVectorView::nelem(), ConstMatrixView::nrows(), planck(), and pow().
Referenced by surfaceFlatRefractiveIndex().