ReFRACtor
pressure_sigma.h
Go to the documentation of this file.
1 #ifndef PRESSURE_SIGMA_H
2 #define PRESSURE_SIGMA_H
3 #include "state_vector.h"
4 #include "observer.h"
5 #include "fp_exception.h"
6 #include "pressure_imp_base.h"
7 
8 namespace FullPhysics {
9 /****************************************************************/
15 public:
16  PressureSigma(const blitz::Array<double, 1>& A,
17  const blitz::Array<double, 1>& B,
18  double Surface_pressure, bool Pressure_flag);
19 
20  PressureSigma(const blitz::Array<double, 1>& Pressure_grid,
21  double Surface_pressure, bool Pressure_flag);
22 
23  virtual ~PressureSigma() {}
24 
25 //-----------------------------------------------------------------------
27 //-----------------------------------------------------------------------
28 
30  {return (cov(0, 0) < 0 ? 0.0 : sqrt(cov(0, 0))); }
31 
32 //-----------------------------------------------------------------------
34 //-----------------------------------------------------------------------
35 
36  void set_surface_pressure(const AutoDerivative<double>& Surface_pressure)
37  {
38  coeff(0) = Surface_pressure;
39  cache_stale = true;
41  }
42 
43  void set_levels_from_grid(const blitz::Array<double, 1>& Pressure_grid);
44 
45  virtual void print(std::ostream& Os) const;
46 
47  virtual boost::shared_ptr<Pressure> clone() const;
48  virtual std::string sub_state_identifier() const { return "surface_pressure"; }
49  virtual std::string state_vector_name_i(int i) const
50  { return "Surface Pressure (Pascals)"; }
51  const blitz::Array<double, 1>& a() const {return a_;}
52  const blitz::Array<double, 1>& b() const {return b_;}
53 protected:
54  virtual void calc_pressure_grid() const;
55 private:
56  blitz::Array<double, 1> a_, b_;
57 };
58 }
59 #endif
void set_surface_pressure(const AutoDerivative< double > &Surface_pressure)
Set the surface pressure. This is in Pascals.
virtual boost::shared_ptr< Pressure > clone() const
Clone a PressureFixedLevel object.
blitz::Array< double, 2 > cov
Last covariance matrix updated from the StateVector.
PressureSigma(const blitz::Array< double, 1 > &A, const blitz::Array< double, 1 > &B, double Surface_pressure, bool Pressure_flag)
Constructor.
virtual std::string state_vector_name_i(int i) const
Return state vector name for ith entry in coeff.
void set_levels_from_grid(const blitz::Array< double, 1 > &Pressure_grid)
Creates A and B parameters from the pressure grid passed in.
virtual void calc_pressure_grid() const
Calculate the new pressure grid.
This class maintains the pressure portion of the state.
As a design principle, we have each base class with the absolutely minimum interface needed for use f...
void notify_update_do(const T &Self)
Function to call to notify Observers of a state change.
Definition: observer.h:121
const Unit A("A", 1.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0)
virtual void print(std::ostream &Os) const
Print to stream.
bool cache_stale
If this is true, the recalculate the pressure_grid the next time we need it.
const blitz::Array< double, 1 > & a() const
const blitz::Array< double, 1 > & b() const
Contains classes to abstract away details in various Spurr Radiative Transfer software.
Definition: doxygen_python.h:1
virtual std::string sub_state_identifier() const
Return a string to identify this part of the state, this name should be all lower case and seperate p...
double surface_pressure_uncertainty() const
Return the current surface pressure uncertainty. This is in Pascals.

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