ARTS 2.5.0 (git: 9ee3ac6c)
surface.h File Reference
#include "matpack_complex.h"
#include "matpackIV.h"
#include "mystring.h"
#include "ppath.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...
 

Detailed Description

Author
Patrick Eriksson Patri.nosp@m.ck.E.nosp@m.rikss.nosp@m.on@c.nosp@m.halme.nosp@m.rs.s.nosp@m.e
Date
2012-02-06

This file contains definitions of internal functions associated with the surface.

Definition in file surface.h.

Function Documentation

◆ calc_incang()

Numeric calc_incang ( ConstVectorView  rte_los,
ConstVectorView  specular_los 
)

Calculates the incidence angle for a flat surface, based on rte_los and specular_los.

Returns
Incidence angle.
Parameters
[in]rte_losAs the WSV with the same name.
[in]specular_losAs the WSV with the same name.
Author
Patrick Eriksson
Date
2012-11-15

Definition at line 51 of file surface.cc.

References abs.

Referenced by surfaceFlatRefractiveIndex(), and surfaceTelsem().

◆ dsurface_check()

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

Parameters
[in]surface_props_dataAs the WVS with the same name.
[in]surface_props_namesAs the WVS with the same name.
[in]dsurface_namesAs the WVS with the same name.
[in]dsurface_ratrix_dxAs the WVS with the same name.
[in]dsurface_emission_dxAs the WVS with the same name.
Author
Patrick Eriksson
Date
2018-09-01

Definition at line 203 of file surface.cc.

References ARTS_USER_ERROR_IF, and Array< base >::nelem().

Referenced by SurfaceBlackbody(), SurfaceDummy(), SurfaceFastem(), SurfaceFlatScalarReflectivity(), and SurfaceTessem().

◆ index_of_zsurface()

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.

Returns
The found index.
Parameters
[in]z_surfaceA surface value (probably a value from WSV z_surface)
[in]z_profileA profile of geometrical altitudes (probably a page of z_field)
Author
Patrick Eriksson
Date
2019-10-26

Definition at line 55 of file surface.cc.

Referenced by spectral_radiance_fieldClearskyPlaneParallel().

◆ surface_calc()

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.

Parameters
[out]iyRadiation matrix, amtching the WSV with the same name.
[in]IDownwelling radiation, with dimensions (surface_los, f_grid, stokes_dim)
[in]surface_losAs the WSV with the same name.
[in]surface_rmatrixAs the WSV with the same name.
[in]surface_emissionAs the WSV with the same name.
Author
Patrick Eriksson
Date
2005-04-07

Definition at line 64 of file surface.cc.

References joker, mult(), ConstTensor3View::ncols(), ConstTensor3View::nrows(), and ConstMatrixView::nrows().

Referenced by iySurfaceFastem(), iySurfaceRtpropAgenda(), and iySurfaceRtpropCalc().

◆ surface_props_check()

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

Parameters
[in]atmosphere_dimAs the WVS with the same name.
[in]lat_gridAs the WVS with the same name.
[in]lon_gridAs the WVS with the same name.
[in]surface_props_dataAs the WVS with the same name.
[in]surface_props_namesAs the WVS with the same name.
Author
Patrick Eriksson
Date
2018-09-01

Definition at line 140 of file surface.cc.

References ARTS_USER_ERROR_IF, ConstTensor3View::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), Absorption::nelem(), ConstTensor3View::npages(), and ConstTensor3View::nrows().

Referenced by SurfaceBlackbody(), SurfaceDummy(), SurfaceFastem(), SurfaceFlatScalarReflectivity(), and SurfaceTessem().

◆ surface_props_interp()

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.

Parameters
[in]vInterpolated value
[in]vnameName of surface variable to interpolate
[in]atmosphere_dimAs the WVS with the same name.
[in]gp_latPre-calculatd latitude grid positions
[in]gp_lonPre-calculatd longitude grid positions
[in]itwPre-calculatd interpolation weight
[in]surface_props_dataAs the WVS with the same name.
[in]surface_props_namesAs the WVS with the same name.
Author
Patrick Eriksson
Date
2018-09-01

Definition at line 174 of file surface.cc.

References ARTS_ASSERT, ARTS_USER_ERROR, interp_atmsurface_by_itw(), joker, Array< base >::nelem(), ConstTensor3View::npages(), and v.

Referenced by SurfaceBlackbody(), SurfaceFastem(), SurfaceFlatScalarReflectivity(), and SurfaceTessem().

◆ surface_specular_R_and_b()

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.

Parameters
[out]surface_rmatrixAs the WSV with the same name, but slice for one direction and one frequency.
[out]surface_emissionAs the WSV with the same name, but slice for one direction and one frequency.
[in]RvComplex amplitude relection coefficient vertical polarisation.
[in]RhComplex amplitude relection coefficient horisontal polarisation.
[in]fFrequency (a scalar).
[in]stokes_dimAs the WSV with the same name.
[in]surface_skin_tAs the WSV with the same name.
Author
Patrick Eriksson
Date
2004-09-24

Definition at line 89 of file surface.cc.

References a, abs, ARTS_ASSERT, b, c, conj(), d, imag(), ConstMatrixView::ncols(), ConstVectorView::nelem(), ConstMatrixView::nrows(), planck(), pow(), and real().

Referenced by surfaceFlatRefractiveIndex().