9 .def(luabind::constructor<
const HdfFile&,
const std::string&,
20 const std::string& Group_name,
23 : hdf_file(F.
file_name()), hdf_group(Group_name)
26 Array<double, 1>
wn(F.
read_field<
double, 1>(Group_name +
"/wave_number"));
28 qscatv(F.
read_field<
double, 1>(Group_name +
"/scattering_coefficient"));
30 qextv(F.
read_field<
double, 1>(Group_name +
"/extinction_coefficient"));
32 pfv(F.
read_field<
double, 3>(Group_name +
"/phase_function_moment"));
37 std::vector<Array<double, 2> > pf_vec;
38 for(
int i = 0; i < pfv.rows(); ++i)
39 pf_vec.push_back(Array<double, 2>(pfv(i, Range::all(), Range::all())));
47 return clone(press->clone(), rh_dummy);
62 firstIndex i1; secondIndex i2;
74 firstIndex i1; secondIndex i2;
84 (
double wn,
int nmom,
int nscatt)
const 86 firstIndex i1; secondIndex i2; thirdIndex i3; fourthIndex i4;
92 res.jacobian() = t.
jacobian()(i1, i3, i4);
98 Os <<
"AerosolPropertyHdf:\n" 99 <<
" Hdf file: " << hdf_file <<
"\n" 100 <<
" Hdf group: " << hdf_group <<
"\n";
virtual ArrayAd< double, 3 > phase_function_moment_each_layer(double wn, int nmom=-1, int nscatt=-1) const
Return phase function moments for the given wave number for each layer.
This gives the Aerosol properties for an Aerosol.
AerosolPropertyHdf(const HdfFile &F, const std::string &Group_name, const boost::shared_ptr< Pressure > &Press)
Read the given group in the given file for the aerosol properties.
blitz::Array< T, D > read_field(const std::string &Dataname) const
Read a given field.
This gives the Aerosol properties for an Aerosol.
#define REGISTER_LUA_DERIVED_CLASS(X, Y)
const blitz::Array< T, D+1 > jacobian() const
This class reads and writes a HDF5 file.
Apply value function to a blitz array.
const blitz::Array< T, D > & value() const
virtual ArrayAd< double, 1 > extinction_coefficient_each_layer(double wn) const
Return extinction coefficient for the given wave number, for each layer.
int number_variable() const
Number of variables in gradient.
const blitz::Array< T, 1 > & gradient() const
Gradient.
const std::string & file_name() const
File name.
virtual void print(std::ostream &Os) const
Print to stream.
int number_variable() const
Contains classes to abstract away details in various Spurr Radiative Transfer software.
const T & value() const
Convert to type T.
#define REGISTER_LUA_END()
virtual boost::shared_ptr< AerosolProperty > clone() const
Clone a AerosolProperty object.
virtual ArrayAd< double, 1 > scattering_coefficient_each_layer(double wn) const
Return scattering coefficient for the given wave number for each layer.