1 #ifndef AEROSOL_OPTICAL_H 2 #define AEROSOL_OPTICAL_H 23 double Reference_wn = 1e4/0.755);
47 cache_is_stale =
true;
52 cache_is_stale =
true;
57 cache_is_stale =
true;
62 virtual blitz::Array<double, 3>
pf_mom(
double wn,
63 const blitz::Array<double, 2>& frac_aer)
const;
66 int nummom = -1,
int numscat = -1)
const;
69 virtual void print(std::ostream& Os)
const;
76 double pmin = std::numeric_limits<double>::min(),
77 double pmax = std::numeric_limits<double>::max())
const;
79 (
double pmin = std::numeric_limits<double>::min(),
80 double pmax = std::numeric_limits<double>::max())
const;
89 {
return clone(press->clone(), rh->clone()); }
133 std::vector<boost::shared_ptr<AerosolExtinction> > aext;
134 std::vector<boost::shared_ptr<AerosolProperty> > aprop;
137 double reference_wn_;
140 mutable bool cache_is_stale;
143 void fill_cache()
const;
#define range_check(V, Min, Max)
Range check.
virtual void notify_update(const Pressure &P)
For performance, we cache some data as we calculate it.
This gives the Aerosol properties for an Aerosol.
blitz::Array< std::string, 1 > aerosol_name_arr() const
Aerosol names, plus the string "total" as the 1st entry.
virtual ~AerosolOptical()
const ArrayAd< double, 1 > & state_with_derivative() const
Return the state vector as state() does, but also make each value a AutoDerivative.
void aerosol_extinction(int i, const boost::shared_ptr< AerosolExtinction > &V)
Set AerosolExtinction.
virtual void print(std::ostream &Os) const
std::vector< std::string > aerosol_name() const
Name of aerosols.
const boost::shared_ptr< Pressure > & pressure() const
Return pressure.
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...
void notify_update_do(const Aerosol &Self)
Function to call to notify Observers of a state change.
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.
void aerosol_property(int i, const boost::shared_ptr< AerosolProperty > &V)
Set AerosolProperty.
AerosolOptical(const std::vector< boost::shared_ptr< AerosolExtinction > > &Aext, const std::vector< boost::shared_ptr< AerosolProperty > > &Aerosol_prop, const boost::shared_ptr< Pressure > &Press, const boost::shared_ptr< RelativeHumidity > &Rh, double Reference_wn=1e4/0.755)
Create an aerosol.
const Unit A("A", 1.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0)
virtual void notify_update(const AerosolExtinction &A)
Called when the Observed object is updated.
This class maintains the aerosol portion of the state.
virtual ArrayAd< double, 2 > optical_depth_each_layer(double wn) const
This gives the optical depth for each layer, for the given wave number.
virtual boost::shared_ptr< Aerosol > clone() const
Clone a Aerosol object.
const boost::shared_ptr< AerosolProperty > & aerosol_property(int i) const
Return aerosol property.
Implementation of Aerosol.
This handles informing a set of interested objects when the state vector has updated.
int number_variable() const
virtual void notify_update(const AerosolProperty &A)
Called when the Observed object is updated.
This class maintains the pressure portion of the state.
virtual int number_particle() const
Number of aerosol particles.
virtual ArrayAd< double, 3 > pf_mom(double wn, int pindex) const
This calculates the portion of the phase function moments that come from the aerosol for a single par...
Contains classes to abstract away details in various Spurr Radiative Transfer software.
const boost::shared_ptr< AerosolExtinction > & aerosol_extinction(int i) const
Return aerosol extinction.
This class maps the state vector to the aerosol extinction on each level.
Simple Mixin to be and Observer of another object of class T.
virtual void notify_update(const StateVector &Sv)
Called when the Observed object is updated.
virtual ArrayAd< double, 1 > ssa_each_layer(double wn, int particle_index, const ArrayAd< double, 1 > &Od) const
This gives the single scatter albedo for each layer, for the given wave number, for the given particl...