%
% function [wn,fL] = lorentz_line_shape(T,P)
%
%       lorentz_line_shape
%
%   ....This function calculates the Lorentz line shape (fL) from a center wavenumber of
%       710 cm-1 (wn0) to +/- 1 cm-1 (cwn) for a given temperature (T in K)
%       and pressure (P in mb).
%
%       This function returns two vectors, wavenumber and Lorentz line shape.
%
%       Written by Von P. Walden
%                  29 January 1998
%
function [wn,fL] = lorentz_line_shape(T,P)

%
%   ....Initializations.
%
wn0 = 710;            % Wavenumber of center of spectral line
cwn = 1;              % Cutoff wavenumber for spectral line limits
dwn    = 0.001;       % cm-1
P0     = 1013;        % mb
T0     = 273.15;      % K
alpha0 = 0.07;        % cm-1

%
%   ....Calculate line half-width.
%
alphaL = alpha0*(P/P0)*(T0/T).^(0.5);

%
%   ....Calculates the Lorentz line shape for the given center wavenumber and
%       wavenumber cutoff.
%
wn = wn0-cwn:dwn:wn0+cwn;

fL = alphaL ./ (pi*((wn-wn0).^2 + alphaL.^2));

return;