ReFRACtor
rayleigh.h
Go to the documentation of this file.
1 #ifndef RAYLEIGH_H
2 #define RAYLEIGH_H
3 #include "pressure.h"
4 #include "altitude.h"
5 #include "constant.h"
6 #include "default_constant.h"
7 #include <vector>
8 
9 namespace FullPhysics {
10 /****************************************************************/
13 class Rayleigh: public Observer<Pressure>, public Observer<Altitude>,
14  public Printable<Rayleigh> {
15 public:
17  const std::vector<boost::shared_ptr<Altitude> >& Alt,
18  const Constant& C);
19 
20  virtual void notify_update(const Pressure& P)
21  { cache_is_stale = true;}
22  virtual void notify_update(const Altitude& A)
23  {cache_is_stale = true;}
24 
25  ArrayAd<double, 1> optical_depth_each_layer(double wn, int spec_index) const;
27  const Constant& C = DefaultConstant());
28  virtual void print(std::ostream& Os) const
29  { Os << "Rayleigh"; }
30 private:
32  std::vector<boost::shared_ptr<Altitude> > alt;
33  mutable bool cache_is_stale;
34  mutable ArrayAd<double, 2> part_independent_wn;
35  void fill_cache() const;
36  // Constants. We get this from the Constant class, but stash a copy
37  // of them here.
38  double a, b, depolar_fact, molar_weight_dry_air;
39 };
40 }
41 #endif
The class handles the calculation of the altitude and gravity constants.
Definition: altitude.h:19
virtual void notify_update(const Pressure &P)
Called when the Observed object is updated.
Definition: rayleigh.h:20
Rayleigh(const boost::shared_ptr< Pressure > &Pres, const std::vector< boost::shared_ptr< Altitude > > &Alt, const Constant &C)
Constructor.
Definition: rayleigh.cc:20
This class is an implementation of Constant that uses hard coded values suitable for Earth...
ArrayAd< double, 1 > optical_depth_each_layer(double wn, int spec_index) const
This gives the optical depth for each layer, for the given wave number.
Definition: rayleigh.cc:64
This is a Mixin for classes that can be printed.
Definition: printable.h:24
const Unit A("A", 1.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0)
This class calculates the Rayleigh portion of the optical depth.
Definition: rayleigh.h:13
This class contains various constants.
Definition: constant.h:11
virtual void notify_update(const Altitude &A)
Called when the Observed object is updated.
Definition: rayleigh.h:22
static DoubleWithUnit cross_section(const DoubleWithUnit &W, const Constant &C=DefaultConstant())
Calculate the rayleigh cross section for the given wavenumber/wavelength.
Definition: rayleigh.cc:39
We frequently have a double with units associated with it.
This class maintains the pressure portion of the state.
Definition: pressure.h:32
Contains classes to abstract away details in various Spurr Radiative Transfer software.
Definition: doxygen_python.h:1
virtual void print(std::ostream &Os) const
Definition: rayleigh.h:28
const Unit W("W", J/s)
Simple Mixin to be and Observer of another object of class T.
Definition: observer.h:29

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