1 #include <boost/bind.hpp> 22 const std::string& Gas_name)
24 Array<bool, 1> flag(1);
25 Array<double, 1> val(flag.shape());
28 init(Gas_name, val, flag, Press,
false);
33 blitz::Array<double, 1> v_profile( vmr_profile() );
34 blitz::Array<double, 1> press_profile( pressure_profile() );
36 std::vector<AutoDerivative<double> > plist;
37 std::vector<AutoDerivative<double> > vlist;
38 if (press_profile.rows() != v_profile.rows()) {
39 std::stringstream err_msg;
40 err_msg <<
"Size of pressure grid: " 41 << press_profile.rows()
42 <<
" != size of vmr levels: " 46 for(
int i = 0; i < press_profile.rows(); ++i) {
49 plist.push_back(press_profile(i));
54 (
new lin_type(plist.begin(), plist.end(), vlist.begin()));
55 vmr = boost::bind(&lin_type::operator(), lin, _1);
60 Os <<
"AbosorberVmrScaled\n";
This class takes a set of points and values, and linearly interpolates between those values...
AbsorberVmrScaled(const boost::shared_ptr< Pressure > &Press, double Scale, bool Scale_flag, const std::string &Gas_name)
Constructor.
This is the base of the exception hierarchy for Full Physics code.
#define REGISTER_LUA_DERIVED_CLASS(X, Y)
Apply value function to a blitz array.
virtual void calc_vmr() const
Derived classes should provide a function to fill in vmr when this is called.
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()
This class maps the state vector to the absorber VMR on each level.
virtual void print(std::ostream &Os) const
Print to stream.