hitran2refr  Richard J. Mathar, J. Opt. A: Pure Appl. Opt. 9 (2007) 470
Macros | Functions
hitran2refr.cxx File Reference
Include dependency graph for hitran2refr.cxx:

Macros

#define USE_MAGNETISM
 
#define USE_QOFT   296
 
#define MICRON2THZ(m)   (VACUUMC*1.e-6/(m))
 
#define WN2MICRON(w)   (1.e4/(w))
 
#define MICRON2WN(m)   (1.e4/(m))
 
#define CELS2KELVIN(c)   ((c)+273.15)
 

Functions

void usage (char *argv0)
 
int main (int argc, char *argv[])
 

Macro Definition Documentation

◆ CELS2KELVIN

#define CELS2KELVIN (   c)    ((c)+273.15)

convert Celsius to Kelvin

◆ MICRON2THZ

#define MICRON2THZ (   m)    (VACUUMC*1.e-6/(m))

convert micron to Terahertz

◆ MICRON2WN

#define MICRON2WN (   m)    (1.e4/(m))

convert micron to wavenumber

◆ USE_MAGNETISM

#define USE_MAGNETISM

◆ USE_QOFT

#define USE_QOFT   296

◆ WN2MICRON

#define WN2MICRON (   w)    (1.e4/(w))

convert wavenumber to micron

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Invocation from the UNIX shell.

Usage

Parameters
[in]argcargument count, including command line options.
[in]argvthe vector of all command line arguments.

The general call consists of a number of options followed by two floating point arguments which are a spectral region in either wavelength or wavenumber units, and a list of file names in any of the few databases which correspond to molecular species.

hitran2refr [options] range_low range_hi molec1 [molec2 ...]

line options

-w If the option '-w' is used, the command line numbers of the spectral interval mean wavenumbers (1/cm), not wavelengths (micron). Also, the output is in wavenumbers, not microns.

-h <relhum> If the option '-h' followed by a number between 0 and 99 is provided, this means a relative humidity in percent. The default is dry air (zero percent)

-s <sampl> If the option '-s' followed by a positive number is provided, this number is the number of sampling points on the wavelength (or with the -w option wavenumber) axis. The default is 2000.

-p If this option '-p' is added, the mixing ratios of all gas components will be adjusted to ensure that the gas pressures adds to the full pressure, even though the mixing ratios in the internal table do not add exactly to 100 percent.

-P If this option '-P' followed by a number is added, the number indicates the full gas pressure in units of Pa. The default is 75058.

-C The option '-C' followed by a floating point number specifies a volume density of the carbon dioxide in units of ppmv. The default is 370.

-T The option '-T' followed by a floating point number specifies the air temperature in units of Celsius.

-V disable the use of virial expansions. Use only the ideal gas law. The default is to use virial expansions.

-D The option '-D' followed by a directory name is the name of the directory which contains the directories HITRAN, spec and cfa with the databases of line transitions. This prime use is if the current working directory is not the directory of the original executable, where the databases are at the original place. The default is ".." (which indicates the directories ../HITRAN, ../spec and so on contain this information).

Returns
0 on success and 1 on failure. Failure indicates either use of invalid command line options or command line parameters that are out of reasonable bounds.

Examples

Compute real and imaginary part of n-1 for a relative humidity of 20%, a temperature of 23 C, a total pressure of 750 hPa, and 1000 points for wavelengths from 3 to 6 micron, using the hitran water line list in 011_hit06.par, adding the transitions of the additional line list in h2ofvals.txt, the HITRAN nitrogen line list in 22_hit04.par, the nitrogen line list in n2fvals.txt etc. Filter lines with an IEEE NaN output and create the ASCII file tst.dat with the table.

hitran2refr -s 1000 -h 20. -T 23 -p -P 75000 3.0 6.0 011_hit06.par h2ofvals.txt 22_hit04.par
n2fvals.txt 031_hit04.par 02_hit04.par co2fvals.txt 06_hit04.par 05_hit04.par 07_hit04.par
o2fvals.txt arfvals.txt nefvals.txt |sed '/NaN/d' | sed '/nan/d' > tst.dat

default is that h2o is set by relative humidity, not mixing ratio.

If the number of sampling points on the wavelngth or wavenumber axis had not been provided by a command-line option, we chose some default.

The two command line arguments following the options are interpreted as the limits of the wavenumber or wavelength range of interest.

All command line arguments that follow the two number that specify the spectral region are interpreted as individual base file names of one of the databases, and are used to initialize the Air model with temperature, pressure, relative humidity, CO2 content.

◆ usage()

void usage ( char *  argv0)

Print a short usage hint of the main program on standard output.