ReFRACtor
aerosol.h
Go to the documentation of this file.
1 #ifndef AEROSOL_H
2 #define AEROSOL_H
4 #include "accumulated_timer.h"
5 #include "pressure.h"
6 #include "relative_humidity.h"
7 
8 namespace FullPhysics {
9 /****************************************************************/
24 class Aerosol: public StateVectorObserver, public Observable<Aerosol> {
25 public:
26  virtual ~Aerosol() {}
27  // Used as a convenience to collect timing information to report in
28  // logging
30 
31  virtual void add_observer(Observer<Aerosol>& Obs)
32  { add_observer_do(Obs, *this);}
34  { remove_observer_do(Obs, *this);}
35 
36  virtual boost::shared_ptr<Aerosol> clone() const = 0;
39  const boost::shared_ptr<RelativeHumidity>& Rh) const = 0;
40 
41 //-----------------------------------------------------------------------
48 //-----------------------------------------------------------------------
49 
50  virtual ArrayAd<double, 3> pf_mom(double wn,
51  const ArrayAd<double, 2>& frac_aer,
52  int nummom = -1, int numscat = -1) const = 0;
53 
54 //-----------------------------------------------------------------------
56 //-----------------------------------------------------------------------
57 
58  virtual int number_particle() const = 0;
59 
60 //-----------------------------------------------------------------------
69 //-----------------------------------------------------------------------
70 
72  const = 0;
73 
74 //-----------------------------------------------------------------------
89 //-----------------------------------------------------------------------
90 
91  virtual ArrayAd<double, 1>
92  ssa_each_layer(double wn, int particle_index,
93  const ArrayAd<double, 1>& Od) const = 0;
94 };
95 }
96 #endif
virtual boost::shared_ptr< Aerosol > clone() const =0
static AccumulatedTimer timer
Timer for Aerosol.
Definition: aerosol.h:29
virtual void remove_observer(Observer< Aerosol > &Obs)
Remove an observer.
Definition: aerosol.h:33
void add_observer_do(Observer< Aerosol > &Obs, Aerosol &t)
Add an observer.
Definition: observer.h:148
This is an observer of a StateVector.
virtual ArrayAd< double, 1 > ssa_each_layer(double wn, int particle_index, const ArrayAd< double, 1 > &Od) const =0
This gives the single scatter albedo for each layer, for the given wave number, for the given particl...
void remove_observer_do(Observer< Aerosol > &Obs, Aerosol &t)
Remove an observer.
Definition: observer.h:173
This class maintains the aerosol portion of the state.
Definition: aerosol.h:24
The AutoDerivative<T> works well, and it works with blitz if you create a blitz::Array<AutoDerivative...
Definition: array_ad.h:40
Mixin for a class that allows other classes to observe it state.
Definition: observer.h:12
virtual int number_particle() const =0
Number of aerosol particles.
This is a simple timer class that can be used to accumulate the time spent in multiple calls to a fun...
virtual ~Aerosol()
Definition: aerosol.h:26
Contains classes to abstract away details in various Spurr Radiative Transfer software.
Definition: doxygen_python.h:1
virtual ArrayAd< double, 2 > optical_depth_each_layer(double wn) const =0
This gives the optical depth for each layer, for the given wave number.
virtual void add_observer(Observer< Aerosol > &Obs)
Add an observer.
Definition: aerosol.h:31
virtual ArrayAd< double, 3 > pf_mom(double wn, const ArrayAd< double, 2 > &frac_aer, int nummom=-1, int numscat=-1) const =0
This calculates the portion of the phase function moments that come from the aerosol.

Copyright © 2017, California Institute of Technology.
ALL RIGHTS RESERVED.
U.S. Government Sponsorship acknowledged.
Generated Fri Aug 24 2018 15:44:10