ReFRACtor
|
This class is used to read the absco tables. More...
#include <absco.h>
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 |
|
virtual |
This interpolates the ABSCO data to give absorption cross section for a given pressure, temperature, and broadener VMR.
Wn | wave number |
Press | Pressure |
Temp | Temperature |
Broadener_vmr | Broadner VMR (e.g., H2O VMR). Not all tables will make use of this information. |
Implements FullPhysics::GasAbsorption.
|
virtual |
This interpolates the ABSCO data to give absorption cross section for a given pressure, temperature, and broadener VMR.
Wn | wave number |
Press | Pressure |
Temp | Temperature |
Broadener_vmr | Broadner VMR (e.g., H2O VMR). Not all tables will make use of this information. |
Implements FullPhysics::GasAbsorption.
|
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.
|
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.
|
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.
|
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.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
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.
|
inlinevirtualinherited |
Reimplemented in FullPhysics::AbscoHdf.
Definition at line 68 of file gas_absorption.h.
|
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.
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.
wn | Wave number to read |
|
inline |
|
inline |
|
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.
|
protectedpure virtual |
Implemented in FullPhysics::AbscoHdf.
|
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.
|
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.
|
friend |