1 #ifndef PRESSURE_FIXED_LEVEL_H 2 #define PRESSURE_FIXED_LEVEL_H 21 double Surface_pressure)
22 : press_level(Press_level)
24 blitz::Array<double, 1>
coeff(1);
25 blitz::Array<bool, 1> used(1);
26 coeff(0) = Surface_pressure;
27 used(0) = Pressure_flag;
39 {
return (
cov(0, 0) < 0 ? 0.0 : sqrt(
cov(0, 0))); }
47 coeff(0) = Surface_pressure;
49 const blitz::Array<double, 1>& plev = press_level->pressure_level();
51 plev(plev.rows() - 1));
87 {
return press_level->pressure_level()
90 virtual void print(std::ostream& Os)
const;
97 {
return "Surface Pressure (Pascals)"; }
#define range_check(V, Min, Max)
Range check.
blitz::Array< double, 2 > cov
Last covariance matrix updated from the StateVector.
static const double new_level_fractional_size
Size a new level must be in porportion to the layer above it when resizing pressure grid due to moved...
void set_surface_pressure(const AutoDerivative< double > &Surface_pressure)
Set the surface pressure. This is in Pascals.
virtual ArrayAdWithUnit< double, 1 > pressure_grid() const
This returns the pressure grid to use for layer retrieval, along with the gradient of each of the pre...
virtual boost::shared_ptr< Pressure > clone() const
Clone a PressureFixedLevel object.
virtual ~PressureFixedLevel()
virtual std::string state_vector_name_i(int i) const
Return state vector name for ith entry in coeff.
int max_number_level() const
Maximum number of levels that we can have.
double surface_pressure_uncertainty() const
Return the current surface pressure uncertainty. This is in Pascals.
PressureFixedLevel(bool Pressure_flag, const boost::shared_ptr< PressureLevelInput > &Press_level, double Surface_pressure)
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.
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...
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.
virtual void calc_pressure_grid() const
Calculate the new pressure grid.
int number_active_layer() const
Number of active layers.
blitz::Array< double, 1 > pressure_active_levels() const
Return the pressure on the fixed levels, but only include the "active" portion.
Contains classes to abstract away details in various Spurr Radiative Transfer software.
void init(const blitz::Array< double, 1 > &Coeff, const blitz::Array< bool, 1 > &Used_flag, const boost::shared_ptr< Pressure > &Press=boost::shared_ptr< Pressure >(), bool Mark_according_to_press=true, int Pdep_start=0)
const T & value() const
Convert to type T.
This class maintains the pressure portion of the state.
ArrayAd< double, 1 > coeff
Coefficients.
int number_active_level() const
Number of active levels, this is just the size of pressure_grid for the current surface pressure...