1 #include <boost/bind.hpp> 13 const blitz::Array<bool, 1>&,
14 const blitz::Array<double, 1>&,
15 const std::string&>())
26 const blitz::Array<bool, 1>& Used_flag,
27 const blitz::Array<double, 1>& Vmr,
28 const std::string& Gas_name)
30 press_level(Press_level)
37 return clone(pressure_clone);
51 std::vector<AutoDerivative<double> > plist;
52 std::vector<AutoDerivative<double> > vmrlist;
53 for(
int i = 0; i < press->pressure_grid().rows() - 1; ++i) {
54 vmrlist.push_back(coeff(i));
55 plist.push_back(press->pressure_grid()(i).
value);
57 int i = press->pressure_grid().rows() - 1;
58 double p1 = log(press_level->pressure_level()(i - 1));
59 double p2 = log(press_level->pressure_level()(i));
61 (p - p1) * (coeff(i) - coeff(i - 1)) / (p2 - p1);
62 plist.push_back(press->surface_pressure().value);
67 (
new lin_type(plist.begin(), plist.end(), vmrlist.begin()));
68 vmr = boost::bind(&lin_type::operator(), lin, _1);
74 Os <<
"AbsorberVmrFixedLevel:\n" 75 <<
" Gas name: " << gas_name() <<
"\n" 77 opad << coeff.value() <<
"\n";
79 Os <<
" Retrieval Flag:\n";
80 opad << used_flag <<
"\n";
This is a filtering stream that adds a pad to the front of every line written out.
This class takes a set of points and values, and linearly interpolates between those values...
#define REGISTER_LUA_DERIVED_CLASS(X, Y)
As a design principle, we have each base class with the absolutely minimum interface needed for use f...
AbsorberVmrFixedLevel(const boost::shared_ptr< Pressure > &Press, const boost::shared_ptr< PressureLevelInput > &Press_level, const blitz::Array< bool, 1 > &Used_flag, const blitz::Array< double, 1 > &Vmr, const std::string &Gas_name)
Constructor.
Apply value function to a blitz array.
virtual boost::shared_ptr< AbsorberVmr > clone() const
Clone a AbsorberVmr object.
virtual void print(std::ostream &Os) const
Print to stream.
This gives the Gas Absorber Volumn mixing ratio for a single gas.
This class maps the state vector to the absorber VMR on each level.
Contains classes to abstract away details in various Spurr Radiative Transfer software.
#define REGISTER_LUA_END()
virtual void calc_vmr() const
Derived classes should provide a function to fill in vmr when this is called.
double value(const FullPhysics::AutoDerivative< double > &Ad)