ARTS  2.0.49
m_surface.cc File Reference
#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 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)
 surface_specular_R_and_b More...
 
void InterpSurfaceFieldToRteGps (Numeric &outvalue, const Index &atmosphere_dim, const GridPos &rte_gp_lat, const GridPos &rte_gp_lon, const Matrix &field, const Verbosity &verbosity)
 WORKSPACE METHOD: InterpSurfaceFieldToRteGps. More...
 
void InterpSurfaceEmissivityFieldIncLatLon (Numeric &outvalue, const Index &atmosphere_dim, const Vector &rte_pos, const Vector &rte_los, const GriddedField3 &gfield, const Verbosity &verbosity)
 WORKSPACE METHOD: InterpSurfaceEmissivityFieldIncLatLon. More...
 
void r_geoidSpherical (Matrix &r_geoid, const Index &atmosphere_dim, const Vector &lat_grid, const Vector &lon_grid, const Numeric &r, const Verbosity &verbosity)
 WORKSPACE METHOD: r_geoidSpherical. More...
 
void r_geoidWGS84 (Matrix &r_geoid, const Index &atmosphere_dim, const Vector &lat_grid, const Vector &lon_grid, const Verbosity &verbosity)
 WORKSPACE METHOD: r_geoidWGS84. More...
 
void surfaceBlackbody (Matrix &surface_los, Tensor4 &surface_rmatrix, Matrix &surface_emission, const Vector &f_grid, const Index &stokes_dim, const Numeric &surface_skin_t, const Verbosity &verbosity)
 WORKSPACE METHOD: surfaceBlackbody. More...
 
void surfaceFlatReflectivity (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_scalar_reflectivity, const Verbosity &verbosity)
 WORKSPACE METHOD: surfaceFlatReflectivity. More...
 
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, const Verbosity &verbosity)
 WORKSPACE METHOD: surfaceFlatRefractiveIndex. More...
 
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, const Verbosity &verbosity)
 WORKSPACE METHOD: surfaceFlatVaryingEmissivity. More...
 
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, const Verbosity &verbosity)
 WORKSPACE METHOD: surfaceFlatSingleEmissivity. More...
 
void surfaceLambertianSimple (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_scalar_reflectivity, const Index &np, const Numeric &za_pos, const Verbosity &)
 WORKSPACE METHOD: surfaceLambertianSimple. More...
 

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
 

Function Documentation

◆ InterpSurfaceEmissivityFieldIncLatLon()

void InterpSurfaceEmissivityFieldIncLatLon ( Numeric outvalue,
const Index atmosphere_dim,
const Vector rte_pos,
const Vector rte_los,
const GriddedField3 gfield,
const Verbosity verbosity 
)

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 applies to the longitude grid.

This method can be used together with e.g. surfaceFlatSingleEmissivity*.

Author
Patrick Eriksson
Parameters
[out]outvalueGeneric output
[in]atmosphere_dimWS Input
[in]rte_posWS Input
[in]rte_losWS Input
[in]gfieldGeneric Input

Definition at line 230 of file m_surface.cc.

References abs, chk_if_in_range(), CREATE_OUT3, interp_gfield3(), and ConstVectorView::nelem().

Referenced by InterpSurfaceEmissivityFieldIncLatLon_g().

◆ InterpSurfaceFieldToRteGps()

void InterpSurfaceFieldToRteGps ( Numeric x,
const Index atmosphere_dim,
const GridPos rte_gp_lat,
const GridPos rte_gp_lon,
const Matrix gin1,
const Verbosity verbosity 
)

WORKSPACE METHOD: InterpSurfaceFieldToRteGps.

Scalar interpolation of surface fields.

The position is specified by the combination of rte_gp_lat and rte_gp_lon*.

Author
Patrick Eriksson
Parameters
[out]xGeneric output
[in]atmosphere_dimWS Input
[in]rte_gp_latWS Input
[in]rte_gp_lonWS Input
[in]gin1Generic Input

Definition at line 211 of file m_surface.cc.

References CREATE_OUT3, and interp_atmsurface_by_gp().

Referenced by InterpSurfaceFieldToRteGps_g().

◆ r_geoidSpherical()

void r_geoidSpherical ( Matrix r_geoid,
const Index atmosphere_dim,
const Vector lat_grid,
const Vector lon_grid,
const Numeric r,
const Verbosity verbosity 
)

WORKSPACE METHOD: r_geoidSpherical.

Sets the geoid to be a perfect sphere.

The radius of the sphere is selected by the generic argument r.

Author
Patrick Eriksson
Parameters
[out]r_geoidWS Output
[in]atmosphere_dimWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]rGeneric Input

Definition at line 261 of file m_surface.cc.

References chk_atm_grids(), chk_if_in_range(), CREATE_OUT2, CREATE_OUT3, EARTH_RADIUS, ConstMatrixView::ncols(), ConstVectorView::nelem(), ConstMatrixView::nrows(), and Matrix::resize().

Referenced by r_geoidSpherical_g().

◆ r_geoidWGS84()

void r_geoidWGS84 ( Matrix r_geoid,
const Index atmosphere_dim,
const Vector lat_grid,
const Vector lon_grid,
const Verbosity verbosity 
)

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 in the north-south direction. The latitude is taken from lat_grid, that then is demanded to have length 1.

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 elsewhere for 2D cases.

Author
Patrick Eriksson
Parameters
[out]r_geoidWS Output
[in]atmosphere_dimWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input

Definition at line 303 of file m_surface.cc.

References chk_atm_grids(), chk_if_in_range(), CREATE_OUT2, CREATE_OUT3, DEG2RAD, ConstMatrixView::ncols(), ConstVectorView::nelem(), ConstMatrixView::nrows(), and Matrix::resize().

Referenced by r_geoidWGS84_g().

◆ surface_specular_los()

void surface_specular_los ( VectorView  los,
const Index atmosphere_dim 
)

surface_specular_los

Calculates the LOS for a specular surface reflection.

Parameters
losIn/Out: LOS to be modified.
atmosphere_dimInput: As the WSV with the same name.
Author
Patrick Eriksson
Date
2002-09-22

Definition at line 85 of file m_surface.cc.

References abs, ConstVectorView::nelem(), and sign().

Referenced by surfaceFlatReflectivity(), surfaceFlatRefractiveIndex(), and surfaceFlatVaryingEmissivity().

◆ 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 
)

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.

Parameters
surface_rmatrixOut: As the WSV with the same name, but slice for one direction and one frequency.
surface_emissionOut: As the WSV with the same name, but slice for one direction and one frequency.
RvIn: Complex amplitude relection coefficient for vertical polarisation.
RhIn: Complex amplitude relection coefficient for horisontal polarisation.
fIn: Frequency (a scalar).
stokes_dimIn: As the WSV with the same name.
surface_skin_tIn: As the WSV with the same name.
Author
Patrick Eriksson
Date
2004-09-24

Definition at line 147 of file m_surface.cc.

References abs, ConstMatrixView::ncols(), ConstVectorView::nelem(), ConstMatrixView::nrows(), and planck().

Referenced by surfaceFlatRefractiveIndex().

◆ surfaceBlackbody()

void surfaceBlackbody ( Matrix surface_los,
Tensor4 surface_rmatrix,
Matrix surface_emission,
const Vector f_grid,
const Index stokes_dim,
const Numeric surface_skin_t,
const Verbosity verbosity 
)

WORKSPACE METHOD: surfaceBlackbody.

Creates variables to mimic a blackbody surface.

This method sets up surface_los, surface_rmatrix and surface_emission* for surface_prop_agenda. Here, surface_los and surface_rmatrix are set to be empty, and surface_emission to hold blackbody radiation for a temperature of surface_skin_t.

Author
Patrick Eriksson
Parameters
[out]surface_losWS Output
[out]surface_rmatrixWS Output
[out]surface_emissionWS Output
[in]f_gridWS Input
[in]stokes_dimWS Input
[in]surface_skin_tWS Input

Definition at line 405 of file m_surface.cc.

References chk_if_in_range(), chk_not_negative(), CREATE_OUT2, ConstVectorView::nelem(), planck(), Tensor4::resize(), and Matrix::resize().

Referenced by surfaceBlackbody_g().

◆ surfaceFlatReflectivity()

void surfaceFlatReflectivity ( 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_scalar_reflectivity,
const Verbosity verbosity 
)

WORKSPACE METHOD: surfaceFlatReflectivity.

Creates variables to mimic specular reflection by a (flat) surface where the reflectivity is specified.

The surface is treated to be flat, and the same (amplitude) reflectivity is assumed for vertical and horisontal polarisation. This assumption results in a pure diagonal surface_rmatrix (see surface chapter in AUG).

Local thermodynamic equilibrium is assumed, which corresponds to that reflectivity and emissivity add up to 1. The emission is unpolarised here.

Author
Patrick Eriksson
Parameters
[out]surface_losWS Output
[out]surface_rmatrixWS Output
[out]surface_emissionWS Output
[in]f_gridWS Input
[in]stokes_dimWS Input
[in]atmosphere_dimWS Input
[in]rte_losWS Input
[in]surface_skin_tWS Input
[in]surface_scalar_reflectivityWS Input

Definition at line 435 of file m_surface.cc.

References chk_if_in_range(), chk_not_negative(), CREATE_OUT2, CREATE_OUT3, joker, max, min, ConstVectorView::nelem(), planck(), Tensor4::resize(), Matrix::resize(), and surface_specular_los().

Referenced by surfaceFlatReflectivity_g().

◆ surfaceFlatRefractiveIndex()

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,
const Verbosity verbosity 
)

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.

Author
Patrick Eriksson
Parameters
[out]surface_losWS Output
[out]surface_rmatrixWS Output
[out]surface_emissionWS Output
[in]f_gridWS Input
[in]stokes_dimWS Input
[in]atmosphere_dimWS Input
[in]rte_losWS Input
[in]surface_skin_tWS Input
[in]complex_nWS Input

Definition at line 503 of file m_surface.cc.

References abs, chk_if_in_range(), chk_matrix_ncols(), chk_not_negative(), CREATE_OUT2, CREATE_OUT3, fresnel(), joker, ConstVectorView::nelem(), ConstMatrixView::nrows(), Tensor4::resize(), Matrix::resize(), surface_specular_los(), and surface_specular_R_and_b().

Referenced by surfaceFlatRefractiveIndex_g().

◆ surfaceFlatSingleEmissivity()

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,
const Verbosity verbosity 
)

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. The emissivity can be defined with a a varying degree of complexity and there is no specific workspace variable defined to hold the emissivity. You have to define the 'surface_emissivity' to match your needs.

Author
Patrick Eriksson
Parameters
[out]surface_losWS Output
[out]surface_rmatrixWS Output
[out]surface_emissionWS Output
[in]f_gridWS Input
[in]stokes_dimWS Input
[in]atmosphere_dimWS Input
[in]rte_losWS Input
[in]surface_skin_tWS Input
[in]surface_emissivityGeneric Input

Definition at line 630 of file m_surface.cc.

References chk_if_in_range(), ConstVectorView::nelem(), and surfaceFlatVaryingEmissivity().

Referenced by surfaceFlatSingleEmissivity_g().

◆ surfaceFlatVaryingEmissivity()

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,
const Verbosity verbosity 
)

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.

As surfaceFlatSingleEmissivity, but assumes that the emissivity varies with frequency. The emissivity can be defined with a a varying degree of complexity and there is no specific workspace variable defined to hold the emissivity. You have to define the 'surface_emissivity' to match your needs.

Author
Patrick Eriksson
Parameters
[out]surface_losWS Output
[out]surface_rmatrixWS Output
[out]surface_emissionWS Output
[in]f_gridWS Input
[in]stokes_dimWS Input
[in]atmosphere_dimWS Input
[in]rte_losWS Input
[in]surface_skin_tWS Input
[in]surface_emissivityGeneric Input

Definition at line 569 of file m_surface.cc.

References chk_if_in_range(), chk_not_negative(), CREATE_OUT2, CREATE_OUT3, joker, max, min, ConstVectorView::nelem(), planck(), Tensor4::resize(), Matrix::resize(), and surface_specular_los().

Referenced by surfaceFlatSingleEmissivity(), and surfaceFlatVaryingEmissivity_g().

◆ surfaceLambertianSimple()

void surfaceLambertianSimple ( 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_scalar_reflectivity,
const Index np,
const Numeric za_pos,
const Verbosity verbosity 
)

WORKSPACE METHOD: surfaceLambertianSimple.

Creates variables to mimic a Lambertian surface, ignoring the azimuthal dimension.

A lambertian surface can be characterised solely by its reflectivity, here taken from surface_scalar_reflectivity.

The down-welling radiation field is estimated by making calculations for np directions. The range of zenith angles ([0,90]) is divided in an equidistant manner. The values for surface_rmatrix are assuming a constant radiance over each zenith angle range. See AUG.

Default is to select the zenith angles for sensor_los to be placed centrally in the grid ranges. For example, if np is set to 9, down-welling radiation will be calculated for zenith angles = 5, 15, ..., 85. The position of these angles can be shifted by za_pos*. This variable specifies the fractional distance inside the ranges. For example, a za_pos of 0.7 (np still 9) gives the angles 7, 17, ..., 87. Any aziumuth angle in sensor_los is set to 0.

Local thermodynamic equilibrium is assumed, which corresponds to that the reflection and emission coefficients "add up to 1".

Author
Patrick Eriksson
Parameters
[out]surface_losWS Output
[out]surface_rmatrixWS Output
[out]surface_emissionWS Output
[in]f_gridWS Input
[in]stokes_dimWS Input
[in]atmosphere_dimWS Input
[in]rte_losWS Input
[in]surface_skin_tWS Input
[in]surface_scalar_reflectivityWS Input
[in]npGeneric Input
[in]za_posGeneric Input (Default: "0.5")

Definition at line 653 of file m_surface.cc.

References chk_if_in_range(), chk_not_negative(), DEG2RAD, max, min, ConstVectorView::nelem(), planck(), Tensor4::resize(), and Matrix::resize().

Referenced by surfaceLambertianSimple_g().

Variable Documentation

◆ DEG2RAD

const Numeric DEG2RAD
extern

◆ EARTH_RADIUS

const Numeric EARTH_RADIUS
extern

Referenced by r_geoidSpherical().

◆ GFIELD4_F_GRID

const Index GFIELD4_F_GRID
extern

◆ GFIELD4_IA_GRID

const Index GFIELD4_IA_GRID
extern

◆ GFIELD4_LAT_GRID

const Index GFIELD4_LAT_GRID
extern

◆ GFIELD4_LON_GRID

const Index GFIELD4_LON_GRID
extern

◆ RAD2DEG

const Numeric RAD2DEG
extern