1 #include <boost/bind.hpp> 13 const blitz::Array<double, 1>&,
16 const std::string&>())
23 const blitz::Array<double, 1>& Vmr,
26 const std::string& Gas_name)
27 : press_level(Press_level),
30 Array<bool, 1> uflag(1);
31 Array<double, 1> val(1);
34 init(Gas_name, val, uflag, Press,
false);
40 return clone(pressure_clone);
48 used_flag(0), scale_factor(), gas_name()));
54 std::vector<AutoDerivative<double> > plist;
55 std::vector<AutoDerivative<double> > vmrlist;
56 for(
int i = 0; i < press->pressure_grid().rows() - 1; ++i) {
57 vmrlist.push_back(vmr0(i) * coeff(0));
58 plist.push_back(press->pressure_grid()(i).
value);
60 int i = press->pressure_grid().rows() - 1;
61 double p1 = log(press_level->pressure_level()(i - 1));
62 double p2 = log(press_level->pressure_level()(i));
64 (vmr0(i - 1) + (p - p1) * (vmr0(i) - vmr0(i - 1)) / (p2 - p1));
65 plist.push_back(press->surface_pressure().value);
70 (
new lin_type(plist.begin(), plist.end(), vmrlist.begin()));
71 vmr = boost::bind(&lin_type::operator(), lin, _1);
77 Os <<
"AbsorberVmrFixedLevelScaled:\n" 78 <<
" Gas name: " << gas_name() <<
"\n" 79 <<
" Scale: " << scale_factor() <<
"\n" AbsorberVmrFixedLevelScaled(const boost::shared_ptr< Pressure > &Press, const boost::shared_ptr< PressureLevelInput > &Press_level, const blitz::Array< double, 1 > &Vmr, bool Used_flag, double Scale, const std::string &Gas_name)
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)
Apply value function to a blitz array.
virtual void print(std::ostream &Os) const
Print to stream.
This class maps the state vector to the absorber VMR on each level.
This gives the Gas Absorber Volumn mixing ratio for a single gas.
Contains classes to abstract away details in various Spurr Radiative Transfer software.
#define REGISTER_LUA_END()
double value(const FullPhysics::AutoDerivative< double > &Ad)
virtual void calc_vmr() const
Derived classes should provide a function to fill in vmr when this is called.
virtual boost::shared_ptr< AbsorberVmr > clone() const
Clone a AbsorberVmr object.