7 #include <boost/any.hpp> 27 virtual void print(std::ostream& Os)
const {Os <<
"AbscoInterpolator";}
32 double interpol(
double X,
const std::vector<double>& Xv,
33 int& i,
double& df_dx)
const;
34 template<
class T> blitz::Array<double, 1>
35 absorption_cross_section_noderiv_calc(
double wn)
const;
37 absorption_cross_section_deriv_calc(
double wn)
const;
39 blitz::Array<double, 1> p;
42 blitz::Array<double, 2> t_jac;
43 blitz::Array<double, 2> b_jac;
45 blitz::Array<int, 1> ip, itp1, itp2, ib, ib2;
46 blitz::Array<double, 1> dftp1_dt, dftp2_dt, dfb_db,
60 virtual std::string broadener_name()
const = 0;
70 virtual double table_scale(
double wn)
const = 0;
78 {
return broadener_vmr_grid().rows(); }
85 {
return pressure_grid().rows(); }
92 {
return temperature_grid().cols(); }
101 virtual blitz::Array<double, 1> broadener_vmr_grid()
const = 0;
110 virtual blitz::Array<double, 1> pressure_grid()
const = 0;
119 virtual blitz::Array<double, 2> temperature_grid()
const = 0;
126 absorption_cross_section(
double wn,
138 virtual bool is_float()
const = 0;
157 template <
class T> blitz::Array<T, 3> read(
double wn)
const;
166 virtual blitz::Array<double, 3> read_double(
double wn)
const = 0;
167 virtual blitz::Array<float, 3> read_float(
double wn)
const = 0;
169 double interpol(
double X,
const std::vector<double>& Xv,
170 int& i,
double& df_dx)
const;
171 mutable std::vector<double> pgrid;
172 mutable std::vector<std::vector<double> > tgrid;
173 mutable std::vector<double> bgrid;
174 void fill_pgrid_tgrid_and_bgrid()
const;
177 template <>
inline blitz::Array<double, 3> Absco::read<double>(
double wn)
const 179 return read_double(
wn);
182 template <>
inline blitz::Array<float, 3> Absco::read<float>(
double wn)
const 184 return read_float(
wn);
This class is used to read the absco tables.
virtual int number_layer() const
Number of pressure layers in absco file.
AbscoInterpolator(const boost::shared_ptr< Absco > &A, const ArrayWithUnit< double, 1 > &Press, const ArrayAdWithUnit< double, 1 > &Temp, const ArrayAdWithUnit< double, 1 > &Broadener_vmr)
Set up a AbscoInterpolator for the given set up pressure, temperature, and broadner VMR...
This is a AutoDerivative that also has units associated with it.
ArrayAd< double, 1 > absorption_cross_section_deriv(double wn) const
Return absorption cross section, with derivatives.
This is a Mixin for classes that can be printed.
const Unit A("A", 1.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0)
virtual ~AbscoInterpolator()
This is a helper class that calculates the absorption cross section for a fixed set of Pressure...
virtual int number_broadener_vmr() const
Number of broadener VMR values in absco file.
We frequently have a double with units associated with it.
virtual void print(std::ostream &Os) const
This class determine the gaseous absorption coefficient for a given wave number, temperature and pres...
blitz::Array< double, 1 > absorption_cross_section_noderiv(double wn) const
Return absorption cross section, without derivatives.
Contains classes to abstract away details in various Spurr Radiative Transfer software.
virtual int number_temperature() const
Number of temperature values in absco file.