1 #include <boost/algorithm/string.hpp> 2 #include <boost/lexical_cast.hpp> 22 bool Number_instead_of_name)
23 : number_instead_of_name(Number_instead_of_name)
32 throw Exception(
"Currently only support AerosolOptical");
39 typedef boost::function<blitz::Array<double, 1> ()> ftype;
40 double minv = std::numeric_limits<double>::min();
41 double maxv = std::numeric_limits<double>::max();
45 typedef boost::function<double ()> func_type;
46 std::vector<std::string> aerosol_names = a->aerosol_name();
47 for(
int aer_idx = 0; aer_idx < a->number_particle(); aer_idx++) {
49 if(number_instead_of_name) {
50 aer_name = boost::lexical_cast<std::string>(aer_idx + 1);
52 aer_name = aerosol_names[aer_idx];
53 boost::algorithm::to_lower(aer_name);
58 out->register_data_source(
"/RetrievalResults/aerosol_" + aer_name +
"_aod", func_all);
62 out->register_data_source
63 (
"/RetrievalResults/aerosol_" + aer_name +
"_aod_low", func_low);
67 out->register_data_source
68 (
"/RetrievalResults/aerosol_" + aer_name +
"_aod_mid", func_mid);
72 out->register_data_source
73 (
"/RetrievalResults/aerosol_" + aer_name +
"_aod_high", func_high);
76 func_type func_tot_all =
78 out->register_data_source(
"/RetrievalResults/aerosol_total_aod", func_tot_all);
80 func_type func_tot_low =
82 out->register_data_source
83 (
"/RetrievalResults/aerosol_total_aod_low", func_tot_low);
85 func_type func_tot_mid =
87 out->register_data_source
88 (
"/RetrievalResults/aerosol_total_aod_mid", func_tot_mid);
90 func_type func_tot_high =
92 out->register_data_source
93 (
"/RetrievalResults/aerosol_total_aod_high", func_tot_high);
blitz::Array< std::string, 1 > aerosol_name_arr() const
Aerosol names, plus the string "total" as the 1st entry.
static const double high_boundary
The boundary for calculating retrieved_aerosol_aod_by_type_high.
virtual void register_output(const boost::shared_ptr< Output > &out) const
Register portions of class that will be written to output.
This is the base of the exception hierarchy for Full Physics code.
#define REGISTER_LUA_DERIVED_CLASS(X, Y)
double aerosol_optical_depth_total(double pmin=std::numeric_limits< double >::min(), double pmax=std::numeric_limits< double >::max()) const
This gives the total optical depth for each particle, plus adds the total optical depth for all parti...
double aerosol_optical_depth(int aer_idx, double pmin=std::numeric_limits< double >::min(), double pmax=std::numeric_limits< double >::max()) const
This gives the total aerosol optical depth for a given particle.
const Unit A("A", 1.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0)
This registers the portions of the Aerosol class that should be written as output.
static const double low_boundary
The boundary for calculating retrieved_aerosol_aod_by_type_low.
Implementation of Aerosol.
As described in the Output class, we have a decentralized model of producing output for L2 Full Physi...
Contains classes to abstract away details in various Spurr Radiative Transfer software.
#define REGISTER_LUA_END()
AerosolAodOutput(const boost::shared_ptr< Aerosol > &A, bool Number_instead_of_name=false)
Constructor.