lineshapes.cc File Reference

Stuff related to lineshape functions. More...

#include <cmath>
#include "arts.h"
#include "matpackI.h"
#include "array.h"
#include "absorption.h"

Include dependency graph for lineshapes.cc:

Go to the source code of this file.

Functions

void lineshape_no_shape (Vector &ls, Vector &X, Numeric f0, Numeric gamma, Numeric sigma, VectorView f_grid, const Index nf)
void lineshape_lorentz (Vector &ls, Vector &X, Numeric f0, Numeric gamma, Numeric sigma, VectorView f_grid, const Index nf)
void lineshape_doppler (Vector &ls, Vector &x, Numeric f0, Numeric gamma, Numeric sigma, VectorView f_grid, const Index nf)
long bfun6_ (Numeric y, Numeric x)
void lineshape_voigt_kuntz6 (Vector &ls, Vector &x, Numeric f0, Numeric gamma, Numeric sigma, VectorView f_grid, const Index nf)
long int bfun3_ (Numeric y, Numeric x)
void lineshape_voigt_kuntz3 (Vector &ls, Vector &x, Numeric f0, Numeric gamma, Numeric sigma, VectorView f_grid, const Index nf)
long bfun4_ (Numeric y, Numeric x)
void lineshape_voigt_kuntz4 (Vector &ls, Vector &x, Numeric f0, Numeric gamma, Numeric sigma, VectorView f_grid, const Index nf)
void lineshape_voigt_drayson (Vector &ls, Vector &x, Numeric f0, Numeric gamma, Numeric sigma, VectorView f_grid, const Index nf)
void lineshape_rosenkranz_voigt_kuntz6 (Vector &ls, Vector &x, Numeric f0, Numeric gamma, Numeric sigma, VectorView f_grid, const Index nf)
void lineshape_rosenkranz_voigt_drayson (Vector &ls, Vector &x, Numeric f0, Numeric gamma, Numeric sigma, VectorView f_grid, const Index nf)
void chi_cousin (Numeric &chi, const Numeric &df)
void lineshape_CO2_lorentz (Vector &ls, Vector &X, Numeric f0, Numeric gamma, Numeric sigma, VectorView f_grid, const Index nf)
void lineshape_CO2_drayson (Vector &ls, Vector &X, Numeric f0, Numeric gamma, Numeric sigma, VectorView f_grid, const Index nf)
void lineshape_norm_no_norm (Vector &fac, Numeric f0, VectorView f_grid, const Numeric T, const Index nf)
void lineshape_norm_linear (Vector &fac, Numeric f0, VectorView f_grid, const Numeric T, const Index nf)
void lineshape_norm_quadratic (Vector &fac, Numeric f0, VectorView f_grid, const Numeric T, const Index nf)
void lineshape_norm_VVH (Vector &fac, Numeric f0, VectorView f_grid, const Numeric T, const Index nf)
void define_lineshape_data ()
void define_lineshape_norm_data ()

Variables

Array< LineshapeRecordlineshape_data
Array< LineshapeNormRecordlineshape_norm_data


Detailed Description

Stuff related to lineshape functions.

This file contains both the lineshape functions themselves and the function define_lineshape_data which sets the lineshape lookup data.

This is the file from arts-1-0, back-ported to arts-1-1.

Author:
Stefan Buehler
Date:
2000-08-21

Definition in file lineshapes.cc.


Function Documentation

long int bfun3_ ( Numeric  y,
Numeric  x 
)

Definition at line 571 of file lineshapes.cc.

Referenced by lineshape_voigt_kuntz3().

long bfun4_ ( Numeric  y,
Numeric  x 
)

Definition at line 953 of file lineshapes.cc.

Referenced by lineshape_voigt_kuntz4().

long bfun6_ ( Numeric  y,
Numeric  x 
)

Definition at line 158 of file lineshapes.cc.

Referenced by lineshape_voigt_kuntz6().

void chi_cousin ( Numeric chi,
const Numeric df 
)

Chi factors according to Cousin

The CO2-CO2 self-broadening is neglected. Broadening factors for both O2 and N2 are considered, assuming 79% N2 and 21% O2.

Parameters:
chi Out: The chi factor
df (f-f0) in Hz.
Author:
Patrick Eriksson
Date:
2000-09-07

Definition at line 1821 of file lineshapes.cc.

References HZ2CM.

Referenced by lineshape_CO2_drayson(), and lineshape_CO2_lorentz().

void define_lineshape_data (  ) 

void define_lineshape_norm_data (  ) 

void lineshape_CO2_drayson ( Vector ls,
Vector X,
Numeric  f0,
Numeric  gamma,
Numeric  sigma,
VectorView  f_grid,
const Index  nf 
)

A CO2 IR line shape.

Return values:
ls The shape function.
X Auxillary parameter, only used in Voigt fct.
Parameters:
f0 Line center frequency.
gamma The pressure broadening parameter.
sigma The Doppler broadening parameter. (Not used.)
f_grid The frequency grid.
nf Dimension of f_grid.
Author:
Patrick Eriksson
Date:
2000-09-04

Definition at line 1917 of file lineshapes.cc.

References chi_cousin(), and lineshape_voigt_drayson().

Referenced by define_lineshape_data().

void lineshape_CO2_lorentz ( Vector ls,
Vector X,
Numeric  f0,
Numeric  gamma,
Numeric  sigma,
VectorView  f_grid,
const Index  nf 
)

A CO2 IR line shape.

Return values:
ls The shape function.
X Auxillary parameter, only used in Voigt fct.
Parameters:
f0 Line center frequency.
gamma The pressure broadening parameter.
sigma The Doppler broadening parameter. (Not used.)
f_grid The frequency grid.
nf Dimension of f_grid.
Author:
Patrick Eriksson
Date:
2000-09-04

Definition at line 1871 of file lineshapes.cc.

References chi_cousin(), fac(), ConstVectorView::nelem(), and PI.

Referenced by define_lineshape_data().

void lineshape_doppler ( Vector ls,
Vector x,
Numeric  f0,
Numeric  gamma,
Numeric  sigma,
VectorView  f_grid,
const Index  nf 
)

The Doppler line shape.

Return values:
ls The shape function.
x Auxillary parameter, only used in Voigt fct.
Parameters:
f0 Line center frequency.
gamma The pressure broadening parameter. (Not used.)
sigma The Doppler broadening parameter.
f_grid The frequency grid.
nf Dimension of f_grid.
Author:
Axel von Engeln
Date:
2000-12-06

Definition at line 125 of file lineshapes.cc.

References fac(), ConstVectorView::nelem(), and PI.

Referenced by define_lineshape_data().

void lineshape_lorentz ( Vector ls,
Vector X,
Numeric  f0,
Numeric  gamma,
Numeric  sigma,
VectorView  f_grid,
const Index  nf 
)

The Lorentz line shape. This is a quick and dirty implementation.

Return values:
ls The shape function.
X Auxillary parameter, only used in Voigt fct.
Parameters:
f0 Line center frequency.
gamma The pressure broadening parameter.
sigma The Doppler broadening parameter. (Not used.)
f_grid The frequency grid.
nf Dimension of f_grid.
Author:
Stefan Buehler
Date:
2000-06-16

Definition at line 86 of file lineshapes.cc.

References fac(), ConstVectorView::nelem(), and PI.

Referenced by define_lineshape_data().

void lineshape_no_shape ( Vector ls,
Vector X,
Numeric  f0,
Numeric  gamma,
Numeric  sigma,
VectorView  f_grid,
const Index  nf 
)

The dummy line shape. This lineshape does nothing. It only exists, because formally you have to specify a lineshape also for continuum tags. It has to have the same arguments as all the other lineshapes, though...

Return values:
ls The shape function.
X Auxillary parameter, only used in Voigt fct.
Parameters:
f0 Line center frequency.
gamma The pressure broadening parameter.
sigma The Doppler broadening parameter. (Not used.)
f_grid The frequency grid.
nf Dimension of f_grid.
Exceptions:
runtime_error This exception is always thrown when the function is called.
Date:
2001-01-16
Author:
Stefan Buehler

Definition at line 60 of file lineshapes.cc.

Referenced by define_lineshape_data().

void lineshape_norm_linear ( Vector fac,
Numeric  f0,
VectorView  f_grid,
const Numeric  T,
const Index  nf 
)

Linear normalization factor of the lineshape function with f/f0.

Return values:
fac Normalization factor to the lineshape function.
Parameters:
f0 Line center frequency.
f_grid The frequency grid.
T (unused here)
nf Dimension of f_grid.
Author:
Axel von Engeln 30.11.2000

Definition at line 1992 of file lineshapes.cc.

References ConstVectorView::nelem().

Referenced by define_lineshape_norm_data().

void lineshape_norm_no_norm ( Vector fac,
Numeric  f0,
VectorView  f_grid,
const Numeric  T,
const Index  nf 
)

No normalization of the lineshape function.

Return values:
fac Normalization factor to the lineshape function.
Parameters:
f0 Line center frequency.
f_grid The frequency grid.
T Temperature (unused here)
nf Dimension of f_grid.
Author:
Axel von Engeln 30.11.2000

Definition at line 1961 of file lineshapes.cc.

References ConstVectorView::nelem().

Referenced by define_lineshape_norm_data().

void lineshape_norm_quadratic ( Vector fac,
Numeric  f0,
VectorView  f_grid,
const Numeric  T,
const Index  nf 
)

Quadratic normalization factor of the lineshape function with (f/f0)^2.

Return values:
fac Normalization factor to the lineshape function.
Parameters:
f0 Line center frequency.
f_grid The frequency grid.
T Temperature (unused here)
nf Dimension of f_grid.
Author:
Axel von Engeln 30.11.2000

Definition at line 2019 of file lineshapes.cc.

References ConstVectorView::nelem().

Referenced by define_lineshape_norm_data().

void lineshape_norm_VVH ( Vector fac,
Numeric  f0,
VectorView  f_grid,
const Numeric  T,
const Index  nf 
)

Van Vleck Huber normalization factor of the lineshape function with (f*tanh(h*f/(2*k*T))) / (f0*tanh(h*f0/(2*k*T))). The denominator is a result of catalogue intensities. See P. Rayer, The VVH and VVW Spectral Functions, Atmospheric Millimeter and Sub-Millimeter Wave Radiative Transfer Modeling II, Editors: P. Eriksson, S. Buehler, Berichte aus derm Institut fuer Umweltphysik, Band 4, 2001.

Return values:
fac Normalization factor to the lineshape function.
Parameters:
f0 Line center frequency.
f_grid The frequency grid.
T Temperature
nf Dimension of f_grid.
Author:
Axel von Engeln 2003-07-28

Definition at line 2055 of file lineshapes.cc.

References BOLTZMAN_CONST, ConstVectorView::nelem(), and PLANCK_CONST.

Referenced by define_lineshape_norm_data().

void lineshape_rosenkranz_voigt_drayson ( Vector ls,
Vector x,
Numeric  f0,
Numeric  gamma,
Numeric  sigma,
VectorView  f_grid,
const Index  nf 
)

The Rosenkranz overlap routine. Includes a Voigt line shape (drayson) for high altitudes and a lorentz one with overlap correction for lower altitudes.

Return values:
ls The shape function.
x Auxillary parameter to store frequency grid. Here used as well to pass parameters.
Parameters:
f0 Line center frequency.
gamma The pressure broadening parameter.
sigma The Doppler broadening parameter.
f_grid The frequency grid.
nf Dimension of f_grid.
REFERENCE FOR EQUATIONS AND COEFFICIENTS: P.W. ROSENKRANZ, CHAP. 2 AND APPENDIX, IN ATMOSPHERIC REMOTE SENSING BY MICROWAVE RADIOMETRY (M.A. JANSSEN, ED.)

About 'lineshape_rosenkranz_voigt_drayson': The program was originally written by P.W. Rosenkranz, and translated to c by A. von Engeln.

Author:
Axel von Engeln
Date:
2001-01-06

Definition at line 1713 of file lineshapes.cc.

References lineshape_voigt_drayson(), ConstVectorView::nelem(), and PI.

Referenced by define_lineshape_data().

void lineshape_rosenkranz_voigt_kuntz6 ( Vector ls,
Vector x,
Numeric  f0,
Numeric  gamma,
Numeric  sigma,
VectorView  f_grid,
const Index  nf 
)

The Rosenkranz overlap routine. Includes a Voigt line shape (kuntz6) for high altitudes and a lorentz one with overlap correction for lower altitudes.

Return values:
ls The shape function.
x Auxillary parameter to store frequency grid. Here used as well to pass parameters.
Parameters:
f0 Line center frequency.
gamma The pressure broadening parameter.
sigma The Doppler broadening parameter.
f_grid The frequency grid.
nf Dimension of f_grid.
REFERENCE FOR EQUATIONS AND COEFFICIENTS: P.W. ROSENKRANZ, CHAP. 2 AND APPENDIX, IN ATMOSPHERIC REMOTE SENSING BY MICROWAVE RADIOMETRY (M.A. JANSSEN, ED.)

About 'lineshape_rosenkranz_voigt_kuntz6': The program was originally written by P.W. Rosenkranz, and translated to c by A. von Engeln.

Author:
Axel von Engeln
Date:
2001-01-06

Definition at line 1595 of file lineshapes.cc.

References lineshape_voigt_kuntz6(), ConstVectorView::nelem(), and PI.

Referenced by define_lineshape_data().

void lineshape_voigt_drayson ( Vector ls,
Vector x,
Numeric  f0,
Numeric  gamma,
Numeric  sigma,
VectorView  f_grid,
const Index  nf 
)

The Voigt line shape. Drayson approximation of the Voigt line shape.

Return values:
ls The shape function.
x Auxillary parameter to store frequency grid.
Parameters:
f0 Line center frequency.
gamma The pressure broadening parameter.
sigma The Doppler broadening parameter.
f_grid The frequency grid.
nf Dimension of f_grid.
Original ife function call and documention:

int voigt_vector(int nx, Numeric *X, Numeric Y, Numeric *Z, Numeric fac)

direct translation of the FORTRAN algorithm given in Drayson, S. R., Rapid Computation of the Voigt Profile, J. Quant. Spectrosc. Radiat. Transfer, Vol. 16, pp. 611-614, 1976 by Bjoern-Martin Sinnhuber, 13.Mar.96 in Ny-Aalesund, Spitsbergen.

Modified for vector calculation of a frequency array:

    --------------------------------------------------------------------
            int    nx        (in)           number of frequencies
            double *X        (in)           distance from line center in 
                                            units of (Doppler halfwidths 
                                            times sqrt(ln 2) )
            double  Y        (in)           Ratio of the collision halfwidth 
                                            to the ( Doppler halfwidth times sqrt(ln2) )
            double *Z        (out)          return array of voigt 
            double fac       (in)           no function, included to be
                                            consistent with the other voigt
                                            profile calculations
    --------------------------------------------------------------------
    

23.02.98 AvE

Replaced nx by nf, Z by ls, X by x, and multiplied ls with the factor fac.

Author:
Axel von Engeln
Date:
2000-12-06

Definition at line 1429 of file lineshapes.cc.

References fac(), N, ConstVectorView::nelem(), and PI.

Referenced by define_lineshape_data(), lineshape_CO2_drayson(), and lineshape_rosenkranz_voigt_drayson().

void lineshape_voigt_kuntz3 ( Vector ls,
Vector x,
Numeric  f0,
Numeric  gamma,
Numeric  sigma,
VectorView  f_grid,
const Index  nf 
)

The Voigt line shape. Kuntz approximation of the Voigt line shape.

Return values:
ls The shape function.
x Auxillary parameter to store frequency grid.
Parameters:
f0 Line center frequency.
gamma The pressure broadening parameter.
sigma The Doppler broadening parameter.
f_grid The frequency grid.
nf Dimension of f_grid.
Original c function call and documention:

int voigt3 ( long nx, float *x, float y, float *prb, float fak )

Calculates the Voigt-Function times the user-definied value fac with a relative accuracy better than 2*10-3.

If this subroutine is called several times with the same parameter y the numerically expensive coefficents a1..t8 are only calculated once thus further accelerating the algorithm

    --------------------------------------------------------------------
    x(nx)   (in)    :Distance from line center in units of Doppler
                    :halfwidths
    y       (in)    :Ratio of the Doppler halfwidth to the Lorentz
                    :halfwidth  
    prb     (out)   :voigt-function times fak
    fak     (in)    :factor to be specified by the user
    --------------------------------------------------------------------

    author: M. Kuntz, 
            Institut fuer Meteorologie und Klimaforschung, 
            Forschungszentrum Karlsruhe, 
            Postfach 3640, 
            76021 Karlsruhe, Germany. 
            email: kuntz@imk.fzk.de 

    

About 'voigt3' : The program was originally written by M. Kuntz in Fortran77 but has been translated into C by Dietrich Feist (f2c) and into C++ by Oliver Lemke and Axel von Engeln. fak is removed from program code. Replaced nx by nf. Replaced prb by ls. Multiplied ls with the factor fac.

Author:
Oliver Lemke and Axel von Engeln
Date:
2000-12-07

Definition at line 662 of file lineshapes.cc.

References b0, bfun3_(), fac(), max, min, ConstVectorView::nelem(), and PI.

Referenced by define_lineshape_data().

void lineshape_voigt_kuntz4 ( Vector ls,
Vector x,
Numeric  f0,
Numeric  gamma,
Numeric  sigma,
VectorView  f_grid,
const Index  nf 
)

The Voigt line shape. Kuntz approximation of the Voigt line shape.

Return values:
ls The shape function.
x Auxillary parameter to store frequency grid.
Parameters:
f0 Line center frequency.
gamma The pressure broadening parameter.
sigma The Doppler broadening parameter. (Not used.)
f_grid The frequency grid.
nf Dimension of f_grid.
Original c function call and documention:

int voigt4 ( long nx, float *x, float y, float *prb, float fak )

Calculates the Voigt-Function times the user-definied value fac with a relative accuracy better than 2*10-4.

If this subroutine is called several times with the same parameter y the numerically expensive coefficents a1..t8 are only calculated once thus further accelerating the algorithm

    --------------------------------------------------------------------
    x(nx)   (in)    :Distance from line center in units of Doppler
                    :halfwidths
    y       (in)    :Ratio of the Doppler halfwidth to the Lorentz
                    :halfwidth  
    prb     (out)   :voigt-function times fak
    fak     (in)    :factor to be specified by the user
    --------------------------------------------------------------------

    author: M. Kuntz, 
            Institut fuer Meteorologie und Klimaforschung, 
            Forschungszentrum Karlsruhe, 
            Postfach 3640, 
            76021 Karlsruhe, Germany. 
            email: kuntz@imk.fzk.de 

    

About 'voigt4' : The program was originally written by M. Kuntz in Fortran77 but has been translated into C by Dietrich Feist (f2c) and into C++ by Oliver Lemke and Axel von Engeln. fak is removed from program code. Replaced nx by nf. Replaced prb by ls. Multiplied ls with the factor fac.

Author:
Oliver Lemke and Axel von Engeln
Date:
2000-12-07

Definition at line 1040 of file lineshapes.cc.

References b0, bfun4_(), fac(), max, min, ConstVectorView::nelem(), and PI.

Referenced by define_lineshape_data().

void lineshape_voigt_kuntz6 ( Vector ls,
Vector x,
Numeric  f0,
Numeric  gamma,
Numeric  sigma,
VectorView  f_grid,
const Index  nf 
)

The Voigt line shape. Kuntz approximation of the Voigt line shape.

Return values:
ls The shape function.
x Auxillary parameter to store frequency grid.
Parameters:
f0 Line center frequency.
gamma The pressure broadening parameter.
sigma The Doppler broadening parameter.
f_grid The frequency grid.
nf Dimension of f_grid.
Original c function call and documention:

int voigt ( long nx, float *x, float y, float *prb, float fak )

Calculates the Voigt-Function times the user-definied value fac with a relative accuracy better than 2*10-6.

If this subroutine is called several times with the same parameter y the numerically expensive coefficents a1..t8 are only calculated once thus further accelerating the algorithm

    --------------------------------------------------------------------
    x(nx)   (in)    :Distance from line center in units of Doppler
                    :halfwidths
    y       (in)    :Ratio of the Doppler halfwidth to the Lorentz
                    :halfwidth  
    prb     (out)   :voigt-function times fak
    fak     (in)    :factor to be specified by the user
    --------------------------------------------------------------------

    author: M. Kuntz, 
            Institut fuer Meteorologie und Klimaforschung, 
            Forschungszentrum Karlsruhe, 
            Postfach 3640, 
            76021 Karlsruhe, Germany. 
            email: kuntz@imk.fzk.de 

    

About 'voigt' : The program was originally written by M. Kuntz in Fortran77 but has been translated into C by Dietrich Feist (f2c) and into C++ by Oliver Lemke and Axel von Engeln. fak is removed from program code. Replaced nx by nf. Replaced prb by ls. Multiplied ls with the factor fac.

Author:
Oliver Lemke and Axel von Engeln
Date:
2000-09-27

Definition at line 242 of file lineshapes.cc.

References bfun6_(), fac(), max, min, ConstVectorView::nelem(), and PI.

Referenced by define_lineshape_data(), and lineshape_rosenkranz_voigt_kuntz6().


Variable Documentation

The lookup data for the different lineshapes.

Definition at line 2090 of file lineshapes.cc.

Referenced by abs_lineshape_per_tgDefine(), abs_lineshapeDefine(), abs_xsec_per_speciesAddLines(), and xsec_species().

The lookup data for the different normalization factors to the lineshapes.

Definition at line 2187 of file lineshapes.cc.

Referenced by abs_lineshape_per_tgDefine(), abs_lineshapeDefine(), and xsec_species().


Generated on Mon Mar 23 14:06:37 2009 for ARTS by  doxygen 1.5.6