ARTS 2.5.0 (git: 9ee3ac6c)
physics_funcs.h File Reference

This file contains declerations of functions of physical character. More...

#include "arts.h"
#include "constants.h"
#include "matpackI.h"
#include "matpack_complex.h"

Go to the source code of this file.

Functions

Numeric barometric_heightformula (const Numeric &p, const Numeric &dh)
 barometric_heightformula More...
 
Numeric dinvplanckdI (const Numeric &i, const Numeric &f)
 dinvplanckdI More...
 
void fresnel (Complex &Rv, Complex &Rh, const Complex &n1, const Complex &n2, const Numeric &theta)
 fresnel More...
 
Numeric invplanck (const Numeric &i, const Numeric &f)
 invplanck More...
 
Numeric invrayjean (const Numeric &i, const Numeric &f)
 invrayjean More...
 
constexpr Numeric number_density (Numeric p, Numeric t) noexcept
 number_density More...
 
constexpr Numeric dnumber_density_dt (Numeric p, Numeric t) noexcept
 dnumber_density_dT More...
 
Numeric planck (const Numeric &f, const Numeric &t)
 planck More...
 
void planck (VectorView b, const ConstVectorView &f, const Numeric &t)
 planck More...
 
Vector planck (const ConstVectorView &f, const Numeric &t)
 planck More...
 
Numeric dplanck_dt (const Numeric &f, const Numeric &t)
 dplanck_dt More...
 
void dplanck_dt (VectorView b, const ConstVectorView &f, const Numeric &t)
 dplanck_dt More...
 
Vector dplanck_dt (const ConstVectorView &f, const Numeric &t)
 dplanck_dt More...
 
Numeric dplanck_df (const Numeric &f, const Numeric &t)
 dplanck_df More...
 
Vector dplanck_df (const ConstVectorView &f, const Numeric &t)
 dplanck_df More...
 
Numeric rayjean (const Numeric &f, const Numeric &t)
 rayjean More...
 
Complex refice_ (const Numeric &wavlen, const Numeric &temp)
 Calculates complex refractive index of Ice 1H. More...
 

Detailed Description

This file contains declerations of functions of physical character.

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
2002-05-08

Definition in file physics_funcs.h.

Function Documentation

◆ barometric_heightformula()

Numeric barometric_heightformula ( const Numeric p,
const Numeric dh 
)

barometric_heightformula

Barometric heightformula for isothermal earth atmosphere.

Parameters
[in]pAtmospheric pressure at starting level [Pa].
[in]dhVertical displacement to starting pressure level [m].
Returns
p1 Pressure in displacement level [Pa].
Author
Daniel Kreyling
Date
2011-01-20

Definition at line 62 of file physics_funcs.cc.

References M.

Referenced by cloudboxSetAutomatically().

◆ dinvplanckdI()

Numeric dinvplanckdI ( const Numeric i,
const Numeric f 
)

dinvplanckdI

Calculates the derivative of inverse-Planck with respect to intensity.

Parameters
[in]iRadiance.
[in]fFrequency.
Returns
The derivative.
Author
Patrick Eriksson
Date
2010-10-26

Definition at line 98 of file physics_funcs.cc.

References a, ARTS_USER_ERROR_IF, b, BOLTZMAN_CONST, d, PLANCK_CONST, and SPEED_OF_LIGHT.

Referenced by apply_iy_unit2().

◆ dnumber_density_dt()

constexpr Numeric dnumber_density_dt ( Numeric  p,
Numeric  t 
)
constexprnoexcept

dnumber_density_dT

Calculates the atmospheric number density derivative with temperature.

Parameters
[in]pPressure.
[in]tTemperature.
Returns
Number density.
Author
Richard Larsson
Date
2015-09-22

Definition at line 84 of file physics_funcs.h.

References Constant::pow2().

Referenced by abs_coefCalcFromXsec(), and LineShape::compute().

◆ dplanck_df() [1/2]

Vector dplanck_df ( const ConstVectorView f,
const Numeric t 
)

dplanck_df

Calculates the frequency derivative of the Planck function for a single temperature and frequency.

Parameters
[in]fFrequency.
[in]tTemperature.
Returns
Blackbody radiation frequency derivative.
Author
Richard Larsson
Date
2015-09-15

Definition at line 360 of file physics_funcs.cc.

References dplanck_df(), and ConstVectorView::nelem().

◆ dplanck_df() [2/2]

Numeric dplanck_df ( const Numeric f,
const Numeric t 
)

dplanck_df

Calculates the frequency derivative of the Planck function for a single temperature and frequency.

Parameters
[in]fFrequency.
[in]tTemperature.
Returns
Blackbody radiation frequency derivative.
Author
Richard Larsson
Date
2015-09-15

Definition at line 335 of file physics_funcs.cc.

References a, ARTS_USER_ERROR_IF, b, and Constant::pow2().

Referenced by dplanck_df(), and nlte_sourceFromTemperatureAndSrcCoefPerSpecies().

◆ dplanck_dt() [1/3]

Vector dplanck_dt ( const ConstVectorView f,
const Numeric t 
)

dplanck_dt

Calculates the Planck function temperature derivative for a single temperature and a vector of frequencies.

Parameters
[in]fFrequency.
[in]tTemperature.
Returns
Blackbody radiation temperature derivative.
Author
Richard Larsson
Date
2019-10-11

Definition at line 316 of file physics_funcs.cc.

References dplanck_dt(), and ConstVectorView::nelem().

◆ dplanck_dt() [2/3]

Numeric dplanck_dt ( const Numeric f,
const Numeric t 
)

dplanck_dt

Calculates the temperature derivative of the Planck function for a single temperature and frequency.

Parameters
[in]fFrequency.
[in]tTemperature.
Returns
Blackbody radiation temperature derivative.
Author
Richard Larsson
Date
2015-09-15

Definition at line 271 of file physics_funcs.cc.

References a, ARTS_USER_ERROR_IF, b, Constant::pow2(), and Constant::pow4().

Referenced by dplanck_dt(), get_stepwise_blackbody_radiation(), nlte_sourceFromTemperatureAndSrcCoefPerSpecies(), and SurfaceBlackbody().

◆ dplanck_dt() [3/3]

void dplanck_dt ( VectorView  dbdt,
const ConstVectorView f,
const Numeric t 
)

dplanck_dt

Calculates the Planck function temperature derivative for a single temperature and a vector of frequencies.

Parameters
[in]fFrequency.
[in]tTemperature.
Returns
Blackbody radiation temperature derivative.
Author
Richard Larsson
Date
2019-10-11

Definition at line 297 of file physics_funcs.cc.

References ARTS_USER_ERROR_IF, dplanck_dt(), and ConstVectorView::nelem().

◆ fresnel()

void fresnel ( Complex Rv,
Complex Rh,
const Complex n1,
const Complex n2,
const Numeric theta 
)

fresnel

Calculates complex AMPLITUDE reflection coeffcients for a specular reflection.

The properties of the two involved media are given as the complex refractive index, n. A dielectric constant, eps, is converted as n = sqrt( eps ). The power reflection coefficient, r, for one polarisation is r = abs(R)^2.

Parameters
[out]RvReflection coefficient for vertical polarisation.
[out]RhReflection coefficient for vertical polarisation.
[in]n1Refractive index of medium where radiation propagates.
[in]n2Refractive index of reflecting medium.
[in]thetaPropagation angle from normal of radiation to be. reflected
Author
Patrick Eriksson
Date
2004-09-21

Definition at line 130 of file physics_funcs.cc.

References a, b, and DEG2RAD.

Referenced by surfaceFlatRefractiveIndex().

◆ invplanck()

Numeric invplanck ( const Numeric i,
const Numeric f 
)

invplanck

Converts a radiance to Planck brightness temperature.

Parameters
[in]iRadiance.
[in]fFrequency.
Returns
Planck brightness temperature.
Author
Patrick Eriksson
Date
2002-08-11

Definition at line 160 of file physics_funcs.cc.

References a, ARTS_USER_ERROR_IF, b, BOLTZMAN_CONST, PLANCK_CONST, and SPEED_OF_LIGHT.

Referenced by apply_iy_unit().

◆ invrayjean()

Numeric invrayjean ( const Numeric i,
const Numeric f 
)

invrayjean

Converts a radiance to Rayleigh-Jean brightness temperature.

Parameters
[in]iRadiance.
[in]fFrequency.
Returns
RJ brightness temperature.
Author
Patrick Eriksson
Date
2000-09-28

Definition at line 182 of file physics_funcs.cc.

References a, ARTS_USER_ERROR_IF, BOLTZMAN_CONST, and SPEED_OF_LIGHT.

Referenced by apply_iy_unit(), apply_iy_unit2(), cloudbox_fieldUpdateSeq1D(), doit_conv_flagAbsBT(), and doit_conv_flagLsq().

◆ number_density()

constexpr Numeric number_density ( Numeric  p,
Numeric  t 
)
constexprnoexcept

number_density

Calculates the atmospheric number density.

Parameters
[in]pPressure.
[in]tTemperature.
Returns
Number density.
Author
Patrick Eriksson
Date
2000-04-08

Definition at line 70 of file physics_funcs.h.

Referenced by abs_coefCalcFromXsec(), abs_xsec_per_speciesAddLines(), lm_hitran_2017::compabs(), LineShape::compute(), dxdvmrscf(), Absorption::LineMixing::ecs_absorption_impl(), Absorption::LineMixing::ecs_absorption_zeeman_impl(), GasAbsLookup::Extract(), rtmethods_jacobian_finalisation(), vmrunitscf(), and x2artsAtmAndSurf().

◆ planck() [1/3]

Vector planck ( const ConstVectorView f,
const Numeric t 
)

planck

Calculates the Planck function for a single temperature and a vector of frequencies.

Note that this expression gives the intensity for both polarisations.

Parameters
[in]fFrequency.
[in]tTemperature.
Returns
Blackbody radiation.
Author
Patrick Eriksson
Date
2015-12-15

Definition at line 252 of file physics_funcs.cc.

References b, ConstVectorView::nelem(), and planck().

◆ planck() [2/3]

Numeric planck ( const Numeric f,
const Numeric t 
)

planck

Calculates the Planck function for a single temperature.

Note that this expression gives the intensity for both polarisations.

Parameters
[in]fFrequency.
[in]tTemperature.
Returns
Blackbody radiation.
Author
Patrick Eriksson
Date
2000-04-08

Definition at line 206 of file physics_funcs.cc.

References a, ARTS_USER_ERROR_IF, b, Constant::pow2(), and Constant::pow3().

Referenced by get_stepwise_blackbody_radiation(), MatrixCBR(), MatrixPlanck(), MCGeneral(), nlte_sourceFromTemperatureAndSrcCoefPerSpecies(), planck(), surface_specular_R_and_b(), surfaceBlackbody(), surfaceFastem(), surfaceFlatRvRh(), surfaceFlatScalarReflectivity(), and surfaceLambertianSimple().

◆ planck() [3/3]

void planck ( VectorView  b,
const ConstVectorView f,
const Numeric t 
)

planck

Calculates the Planck function for a single temperature and a vector of frequencies.

Note that this expression gives the intensity for both polarisations.

Parameters
[in]fFrequency.
[in]tTemperature.
Returns
Blackbody radiation.
Author
Patrick Eriksson
Date
2015-12-15

Definition at line 231 of file physics_funcs.cc.

References ARTS_USER_ERROR_IF, b, ConstVectorView::nelem(), and planck().

◆ rayjean()

Numeric rayjean ( const Numeric f,
const Numeric tb 
)

rayjean

Converts a Rayleigh-Jean brightness temperature to radiance

Parameters
[in]tbRJ brightness temperature.
[in]fFrequency.
Returns
Radiance.
Author
Patrick Eriksson
Date
2011-07-13

Definition at line 378 of file physics_funcs.cc.

References a, ARTS_USER_ERROR_IF, BOLTZMAN_CONST, and SPEED_OF_LIGHT.

◆ refice_()

Complex refice_ ( const Numeric wavlen,
const Numeric temp 
)

Calculates complex refractive index of Ice 1H.

Valid range for wavelengths is between 45 nm and 8.6 m. For wavelengths above 167 microns, temperature dependence is included for temperatures between 213 and 272K. Mainly intended for applications in Earth ice clouds and snow, not other planets or interstellar space; the temperature dependence or crystalline form of ice may be incorrect for these latter applications.

Authors of Fortran function:
Stephen Warren, Univ. of Washington (1983)
Bo-Cai Gao, JCESS, Univ. of Maryland (1995)
Warren Wiscombe, NASA Goddard (1995)

References:
Warren, S., 1984: Optical Constants of Ice from the Ultraviolet to the Microwave, Appl. Opt. 23, 1206-1225

Kou, L., D. Labrie, and P. Chylek, 1994: Refractive indices of water and ice in the 0.65- to 2.5-micron spectral range, Appl. Opt. 32, 3531-3540

Perovich, D., and J. Govoni, 1991: Absorption Coefficients of Ice from 250 to 400 nm, Geophys. Res. Lett. 18, 1233-1235

Parameters
[in]wavlenWavelength in microns
[in]tempTemperature in Kelvin

returns Refractive index as complex number