ReFRACtor
FullPhysics::Absco Class Referenceabstract

This class is used to read the absco tables. More...

#include <absco.h>

+ Inheritance diagram for FullPhysics::Absco:
+ Collaboration diagram for FullPhysics::Absco:

Public Member Functions

virtual ~Absco ()
 
virtual DoubleWithUnit absorption_cross_section (double Wn, const DoubleWithUnit &Press, const DoubleWithUnit &Temp, const DoubleWithUnit &Broadener_vmr) const
 This interpolates the ABSCO data to give absorption cross section for a given pressure, temperature, and broadener VMR. More...
 
virtual AutoDerivativeWithUnit< double > absorption_cross_section (double wn, const DoubleWithUnit &press, const AutoDerivativeWithUnit< double > &temp, const AutoDerivativeWithUnit< double > &broadener_vmr) const
 This interpolates the ABSCO data to give absorption cross section for a given pressure, temperature, and broadener VMR. More...
 
virtual std::string broadener_name () const =0
 For some tables, we might have a broadener (e.g., "h2o"). More...
 
virtual blitz::Array< double, 1 > broadener_vmr_grid () const =0
 Return the broadener VMR grid used for this Absco file. More...
 
virtual bool have_data (double wn) const =0
 Return true if we have data for the given wave number. More...
 
virtual bool is_float () const =0
 Note some of the Absco data files used float, and some use doubles. More...
 
virtual int number_broadener_vmr () const
 Number of broadener VMR values in absco file. More...
 
virtual int number_layer () const
 Number of pressure layers in absco file. More...
 
virtual int number_temperature () const
 Number of temperature values in absco file. More...
 
virtual blitz::Array< double, 1 > pressure_grid () const =0
 Return the pressure grid used for this Absco file. More...
 
virtual void print (std::ostream &Os) const
 
std::string print_to_string () const
 Print to string. More...
 
template<class T >
blitz::Array< T, 3 > read (double wn) const
 Read the record for the highest wavenumber that is less than or equal to given wave number. More...
 
template<>
blitz::Array< float, 3 > read (double wn) const
 
template<>
blitz::Array< double, 3 > read (double wn) const
 
virtual double table_scale (double wn) const =0
 Scale to apply to underlying ABSCO data to get the absorption_cross_section. More...
 
virtual blitz::Array< double, 2 > temperature_grid () const =0
 Return the temperature grid for this Absco file. More...
 

Protected Member Functions

virtual blitz::Array< double, 3 > read_double (double wn) const =0
 Return either a blitz::Array<double, 3> or blitz::Array<float, 3>, depending on the type of the underlying data. More...
 
virtual blitz::Array< float, 3 > read_float (double wn) const =0
 

Friends

class AbscoInterpolator
 

Detailed Description

This class is used to read the absco tables.

Definition at line 56 of file absco.h.

Constructor & Destructor Documentation

◆ ~Absco()

virtual FullPhysics::Absco::~Absco ( )
inlinevirtual

Definition at line 58 of file absco.h.

Member Function Documentation

◆ absorption_cross_section() [1/2]

DoubleWithUnit Absco::absorption_cross_section ( double  Wn,
const DoubleWithUnit Press,
const DoubleWithUnit Temp,
const DoubleWithUnit Broadener_vmr 
) const
virtual

This interpolates the ABSCO data to give absorption cross section for a given pressure, temperature, and broadener VMR.

Parameters
Wnwave number
PressPressure
TempTemperature
Broadener_vmrBroadner VMR (e.g., H2O VMR). Not all tables will make use of this information.
Returns
Absorption cross section in cm^2 / molecule

Implements FullPhysics::GasAbsorption.

Definition at line 81 of file absco.cc.

◆ absorption_cross_section() [2/2]

AutoDerivativeWithUnit< double > Absco::absorption_cross_section ( double  Wn,
const DoubleWithUnit Press,
const AutoDerivativeWithUnit< double > &  Temp,
const AutoDerivativeWithUnit< double > &  Broadener_vmr 
) const
virtual

This interpolates the ABSCO data to give absorption cross section for a given pressure, temperature, and broadener VMR.

Parameters
Wnwave number
PressPressure
TempTemperature
Broadener_vmrBroadner VMR (e.g., H2O VMR). Not all tables will make use of this information.
Returns
Absorption cross section in cm^2 / molecule

Implements FullPhysics::GasAbsorption.

Definition at line 103 of file absco.cc.

◆ broadener_name()

virtual std::string FullPhysics::Absco::broadener_name ( ) const
pure virtual

For some tables, we might have a broadener (e.g., "h2o").

This returns the name of the broadener, if any.

Implements FullPhysics::GasAbsorption.

Implemented in FullPhysics::AbscoHdf.

◆ broadener_vmr_grid()

virtual blitz::Array<double, 1> FullPhysics::Absco::broadener_vmr_grid ( ) const
pure virtual

Return the broadener VMR grid used for this Absco file.

This is number_broadener_vmr() in size, which may be size 0.

This is dimensionless.

Implemented in FullPhysics::AbscoHdf.

◆ have_data()

virtual bool FullPhysics::GasAbsorption::have_data ( double  wn) const
pure virtualinherited

Return true if we have data for the given wave number.

A particular gas might not have absorption coefficients for all spectral bands, e.g., ABSCO tables.

Implemented in FullPhysics::AbscoHdf.

◆ is_float()

virtual bool FullPhysics::Absco::is_float ( ) const
pure virtual

Note some of the Absco data files used float, and some use doubles.

HDF is happy to convert for us, but because the absco tables are a bit of a bottle neck we actually want to keep track of float vs. double and use this to optimize the read functions.

Implemented in FullPhysics::AbscoHdf.

◆ number_broadener_vmr()

virtual int FullPhysics::Absco::number_broadener_vmr ( ) const
inlinevirtual

Number of broadener VMR values in absco file.

This may be 0, if we don't have any broadening.

Definition at line 77 of file absco.h.

◆ number_layer()

virtual int FullPhysics::Absco::number_layer ( ) const
inlinevirtual

Number of pressure layers in absco file.

Definition at line 84 of file absco.h.

◆ number_temperature()

virtual int FullPhysics::Absco::number_temperature ( ) const
inlinevirtual

Number of temperature values in absco file.

Definition at line 91 of file absco.h.

◆ pressure_grid()

virtual blitz::Array<double, 1> FullPhysics::Absco::pressure_grid ( ) const
pure virtual

Return the pressure grid used for this Absco file.

This is number_layer() in size.

This is in Pascals.

Implemented in FullPhysics::AbscoHdf.

◆ print()

virtual void FullPhysics::GasAbsorption::print ( std::ostream &  Os) const
inlinevirtualinherited

Reimplemented in FullPhysics::AbscoHdf.

Definition at line 68 of file gas_absorption.h.

◆ print_to_string()

std::string FullPhysics::Printable< GasAbsorption >::print_to_string ( ) const
inlineinherited

Print to string.

This is primarily useful for SWIG wrappers to this class, e.g. a to_s method in ruby.

Definition at line 31 of file printable.h.

◆ read() [1/3]

template<class T >
blitz::Array<T, 3> FullPhysics::Absco::read ( double  wn) const

Read the record for the highest wavenumber that is less than or equal to given wave number.

The value returned in number_layer() x number_temperature() x max(number_broadener_vmr(), 1)

Different absco files have different windows of data. If you don't know the file contains data for wn, you should first check if can read (e.g., use have_data).

Note that the older binary and 3D Absco files do not have broadener VMR dimension. As a convenience, we pretend like there is a dimension with a single value. This allows us to treat 3D and 4D tables the same.

Parameters
wnWave number to read
Returns
Absorption cross section in cm^2 / molecule

◆ read() [2/3]

template<>
blitz::Array<double, 3> FullPhysics::Absco::read ( double  wn) const
inline

Definition at line 177 of file absco.h.

◆ read() [3/3]

template<>
blitz::Array<float, 3> FullPhysics::Absco::read ( double  wn) const
inline

Definition at line 182 of file absco.h.

◆ read_double()

virtual blitz::Array<double, 3> FullPhysics::Absco::read_double ( double  wn) const
protectedpure virtual

Return either a blitz::Array<double, 3> or blitz::Array<float, 3>, depending on the type of the underlying data.

Implemented in FullPhysics::AbscoHdf.

◆ read_float()

virtual blitz::Array<float, 3> FullPhysics::Absco::read_float ( double  wn) const
protectedpure virtual

Implemented in FullPhysics::AbscoHdf.

◆ table_scale()

virtual double FullPhysics::Absco::table_scale ( double  wn) const
pure virtual

Scale to apply to underlying ABSCO data to get the absorption_cross_section.

This allows empirical corrections to be applied the ABSCO tables (e.g., O2 scaling). Note that as a user you don't need to apply this correction, it is already applied in absorption_cross_section() and AbscoInterpolator.

Implemented in FullPhysics::AbscoHdf.

◆ temperature_grid()

virtual blitz::Array<double, 2> FullPhysics::Absco::temperature_grid ( ) const
pure virtual

Return the temperature grid for this Absco file.

This is number_layer() x number_temperature() in size.

This is in Kelvin.

Implemented in FullPhysics::AbscoHdf.

Friends And Related Function Documentation

◆ AbscoInterpolator

friend class AbscoInterpolator
friend

Definition at line 158 of file absco.h.


The documentation for this class was generated from the following files:

Copyright © 2017, California Institute of Technology.
ALL RIGHTS RESERVED.
U.S. Government Sponsorship acknowledged.
Generated Fri Aug 24 2018 15:44:11