ReFRACtor
rt_atmosphere.h
Go to the documentation of this file.
1 #ifndef RT_ATMOSPHERE_H
2 #define RT_ATMOSPHERE_H
4 #include "observer.h"
5 #include "array_ad_with_unit.h"
6 #include "accumulated_timer.h"
7 #include "ground.h"
8 
9 namespace FullPhysics {
10 /****************************************************************/
51 class RtAtmosphere : virtual public StateVectorObserver,
52  public Observable<RtAtmosphere> {
53 public:
54  virtual ~RtAtmosphere() {}
57  { add_observer_do(Obs, *this);}
59  { remove_observer_do(Obs, *this);}
60  virtual std::string timer_info() const;
61 
62 //-----------------------------------------------------------------------
64 //-----------------------------------------------------------------------
65 
66  virtual int number_layer() const = 0;
67 
68 //-----------------------------------------------------------------------
70 //-----------------------------------------------------------------------
71 
72  virtual int number_spectrometer() const = 0;
73 
74 //-----------------------------------------------------------------------
76 //-----------------------------------------------------------------------
77 
78  virtual ArrayAdWithUnit<double, 1> altitude(int spec_index)
79  const = 0;
80 
81 //-----------------------------------------------------------------------
84 //-----------------------------------------------------------------------
85 
87  column_optical_depth(double wn, int spec_index, const std::string& Gas_name) const = 0;
88 
89 //-----------------------------------------------------------------------
99 //-----------------------------------------------------------------------
100 
101  virtual ArrayAd<double, 1>
102  optical_depth_wrt_iv(double wn, int spec_index) const = 0;
103 
104 //-----------------------------------------------------------------------
115 //-----------------------------------------------------------------------
116 
117  virtual ArrayAd<double, 1>
118  single_scattering_albedo_wrt_iv(double wn, int spec_index) const = 0;
119 
120 //-----------------------------------------------------------------------
142 //-----------------------------------------------------------------------
143 
144  virtual ArrayAd<double, 3>
145  scattering_moment_wrt_iv(double wn, int spec_index, int nummom = -1,
146  int numscat = -1) const = 0;
147 
148 //-----------------------------------------------------------------------
157 //-----------------------------------------------------------------------
158 
159  virtual ArrayAd<double, 1>
160  optical_depth_wrt_iv(double wn, int spec_index, const ArrayAd<double, 2>& iv)
161  const = 0;
162 
163 //-----------------------------------------------------------------------
174 //-----------------------------------------------------------------------
175 
176  virtual ArrayAd<double, 1>
177  single_scattering_albedo_wrt_iv(double wn, int spec_index,
178  const ArrayAd<double, 2>& iv) const = 0;
179 
180 //-----------------------------------------------------------------------
198 //-----------------------------------------------------------------------
199 
200  virtual ArrayAd<double, 3>
201  scattering_moment_wrt_iv(double wn, int spec_index,
202  const ArrayAd<double, 2>& iv,
203  int nummom = -1,
204  int numscat = -1) const = 0;
205 
206 
208  optical_depth_wrt_state_vector(double wn, int spec_index) const;
210  single_scattering_albedo_wrt_state_vector(double wn, int spec_index) const;
212  scattering_moment_wrt_state_vector(double wn, int spec_index,
213  int nummom = -1, int numscat = -1) const;
214 
215 //-----------------------------------------------------------------------
217 //-----------------------------------------------------------------------
218 
219  virtual ArrayAd<double, 1>
220  atmosphere_blackbody(double wn, int spec_index) const = 0;
221 
222 //-----------------------------------------------------------------------
224 //-----------------------------------------------------------------------
225 
226  virtual AutoDerivative<double>
227  surface_blackbody(double wn, int spec_index) const = 0;
228 
229 //-----------------------------------------------------------------------
233 //-----------------------------------------------------------------------
234 
235  virtual ArrayAd<double, 2>
236  intermediate_variable(double wn, int spec_index) const = 0;
237 
238 //-----------------------------------------------------------------------
241 //-----------------------------------------------------------------------
242 
243  virtual const boost::shared_ptr<Ground> ground() const = 0;
244 
245 //-----------------------------------------------------------------------
247 //-----------------------------------------------------------------------
248 
249  virtual void reset_timer() { timer.reset_elapsed(); }
250 };
251 }
252 #endif
virtual ArrayAd< double, 3 > scattering_moment_wrt_iv(double wn, int spec_index, int nummom=-1, int numscat=-1) const =0
The scattering moments for for each layer, for the given wave number.
This class is responsible for setting up the atmosphere and ground information needed to run the Radi...
Definition: rt_atmosphere.h:51
virtual ArrayAdWithUnit< double, 1 > altitude(int spec_index) const =0
Altitude grid for current pressure grid.
void reset_elapsed()
Reset elapsed time to 0.
void add_observer_do(Observer< RtAtmosphere > &Obs, RtAtmosphere &t)
Add an observer.
Definition: observer.h:148
static AccumulatedTimer timer
Timer for RtAtmosphere.
Definition: rt_atmosphere.h:55
This is an observer of a StateVector.
ArrayAd< double, 1 > optical_depth_wrt_state_vector(double wn, int spec_index) const
The optical depth for each layer, for the given wave number.
ArrayAd< double, 1 > single_scattering_albedo_wrt_state_vector(double wn, int spec_index) const
The single scattering albedo for each layer, for the given wave number.
void remove_observer_do(Observer< RtAtmosphere > &Obs, RtAtmosphere &t)
Remove an observer.
Definition: observer.h:173
virtual AutoDerivative< double > column_optical_depth(double wn, int spec_index, const std::string &Gas_name) const =0
Total column optical depth for the given gas.
Mixin for a class that allows other classes to observe it state.
Definition: observer.h:12
virtual ArrayAd< double, 1 > optical_depth_wrt_iv(double wn, int spec_index) const =0
The optical depth for each layer, for the given wave number.
virtual ArrayAd< double, 2 > intermediate_variable(double wn, int spec_index) const =0
This gives the values of the intermediate variables and the Jacobian with respect to the state vector...
virtual const boost::shared_ptr< Ground > ground() const =0
Object that represents the ground surface.
virtual AutoDerivative< double > surface_blackbody(double wn, int spec_index) const =0
The surface thermal blackbody.
This is a simple timer class that can be used to accumulate the time spent in multiple calls to a fun...
virtual void remove_observer(Observer< RtAtmosphere > &Obs)
Remove an observer.
Definition: rt_atmosphere.h:58
Contains classes to abstract away details in various Spurr Radiative Transfer software.
Definition: doxygen_python.h:1
virtual int number_layer() const =0
Number of layers we currently have.
virtual ArrayAd< double, 1 > single_scattering_albedo_wrt_iv(double wn, int spec_index) const =0
The single scattering albedo for each layer, for the given wave number.
virtual ArrayAd< double, 1 > atmosphere_blackbody(double wn, int spec_index) const =0
The atmospheric thermal blackbody values per level.
virtual int number_spectrometer() const =0
Number of spectrometers we have.
ArrayAd< double, 3 > scattering_moment_wrt_state_vector(double wn, int spec_index, int nummom=-1, int numscat=-1) const
The scattering moments for for each layer, for the given wave number.
virtual std::string timer_info() const
Return timer information.
virtual void add_observer(Observer< RtAtmosphere > &Obs)
Add an observer.
Definition: rt_atmosphere.h:56
virtual void reset_timer()
Reset timer.

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