ReFRACtor
ground_brdf.h
Go to the documentation of this file.
1 #ifndef GROUND_BREON_H
2 #define GROUND_BREON_H
3 
4 #include "ground.h"
5 #include "auto_derivative.h"
6 #include "array_with_unit.h"
8 
9 namespace FullPhysics {
10 /****************************************************************/
19 class GroundBrdf: public SubStateVectorArray<Ground> {
20 public:
21  enum ParamIndex {
29  };
30 
31  GroundBrdf(const blitz::Array<double, 2>& Coeffs,
32  const blitz::Array<bool, 2>& Flag,
33  const ArrayWithUnit<double, 1>& Ref_points,
34  const std::vector<std::string>& Desc_band_names);
35 
36  virtual ArrayAd<double, 1> surface_parameter(const double wn, const int spec_index) const;
37 
38  virtual const int number_spectrometer() const { return desc_band_names.size(); }
39 
40  // Rahman parameters
41  virtual const AutoDerivative<double> weight(const double wn, const int spec_index) const;
42  virtual const AutoDerivative<double> weight_intercept(const int spec_index) const;
43  virtual const AutoDerivative<double> weight_slope(const int spec_index) const;
44  virtual const AutoDerivative<double> rahman_factor(const int spec_index) const;
45  virtual const AutoDerivative<double> hotspot_parameter(const int spec_index) const;
46  virtual const AutoDerivative<double> asymmetry_parameter(const int spec_index) const;
47  virtual const AutoDerivative<double> anisotropy_parameter(const int spec_index) const;
48  virtual const AutoDerivative<double> breon_factor(const int spec_index) const;
49 
50  virtual void weight_intercept(const int spec_index, const AutoDerivative<double>& val);
51  virtual void weight_slope(const int spec_index, const AutoDerivative<double>& val);
52  virtual void rahman_factor(const int spec_index, const AutoDerivative<double>& val);
53  virtual void hotspot_parameter(const int spec_index, const AutoDerivative<double>& val);
54  virtual void asymmetry_parameter(const int spec_index, const AutoDerivative<double>& val);
55  virtual void anisotropy_parameter(const int spec_index, const AutoDerivative<double>& val);
56  virtual void breon_factor(const int spec_index, const AutoDerivative<double>& val);
57 
58  const blitz::Array<double, 2> brdf_covariance(const int spec_index) const;
59 
61  virtual const double refractive_index(const int Spec_idx) const { return 1.5; }
62 
63  // Uses LIDORT to compute the black sky albedo from the parameters
64  virtual const double black_sky_albedo(const int Spec_index, const double Sza) = 0;
65 
66  // Computes kernel value using parameters and specified geometry
67  virtual const double kernel_value(const int Spec_index, const double Sza, const double Vza, const double Azm) = 0;
68 
70  virtual const std::string breon_type() const = 0;
71 
73  virtual const DoubleWithUnit reference_point(const int spec_index) const { return reference_points(spec_index); }
74 
75  virtual boost::shared_ptr<Ground> clone() const = 0;
76 
77  virtual std::string sub_state_identifier() const { return "ground/brdf"; }
78 
79  virtual std::string state_vector_name_i(int i) const;
80 
81  virtual void print(std::ostream& Os) const;
82 
83  virtual std::string desc() const { return "GroundBrdf"; }
84 
85 protected:
86 
87  GroundBrdf(const blitz::Array<double, 1>& Spec_coeffs,
88  const blitz::Array<bool, 1>& Flag,
89  const ArrayWithUnit<double, 1>& Ref_points,
90  const std::vector<std::string>& Desc_band_names);
91 
93  std::vector<std::string> desc_band_names;
94 
95  // Helper function for routines that call fortran codes
96  blitz::Array<double, 1> black_sky_params(const int Spec_index);
97  blitz::Array<double, 1> kernel_value_params(const int Spec_index);
98 };
99 
100 
101 class GroundBrdfVeg: public GroundBrdf {
102 public:
103  GroundBrdfVeg(const blitz::Array<double, 2>& Coeffs,
104  const blitz::Array<bool, 2>& Flag,
105  const ArrayWithUnit<double, 1>& Ref_points,
106  const std::vector<std::string>& Desc_band_names) :
107  GroundBrdf(Coeffs, Flag, Ref_points, Desc_band_names) {}
108 
109  virtual const double black_sky_albedo(const int Spec_index, const double Sza);
110  virtual const double kernel_value(const int Spec_index, const double Sza, const double Vza, const double Azm);
111  virtual const std::string breon_type() const { return "Vegetative"; }
112 
115  }
116 private:
117  GroundBrdfVeg(const blitz::Array<double, 1>& Spec_coeffs,
118  const blitz::Array<bool, 1>& Flag,
119  const ArrayWithUnit<double, 1>& Ref_points,
120  const std::vector<std::string>& Desc_band_names) :
121  GroundBrdf(Spec_coeffs, Flag, Ref_points, Desc_band_names) {}
122 };
123 
124 class GroundBrdfSoil: public GroundBrdf {
125 public:
126  GroundBrdfSoil(const blitz::Array<double, 2>& Coeffs,
127  const blitz::Array<bool, 2>& Flag,
128  const ArrayWithUnit<double, 1>& Ref_points,
129  const std::vector<std::string>& Desc_band_names) :
130  GroundBrdf(Coeffs, Flag, Ref_points, Desc_band_names) {}
131 
132  virtual const double black_sky_albedo(const int Spec_index, const double Sza);
133  virtual const double kernel_value(const int Spec_index, const double Sza, const double Vza, const double Azm);
134  virtual const std::string breon_type() const { return "Soil"; }
135 
138  }
139 private:
140  GroundBrdfSoil(const blitz::Array<double, 1>& Spec_coeffs,
141  const blitz::Array<bool, 1>& Flag,
142  const ArrayWithUnit<double, 1>& Ref_points,
143  const std::vector<std::string>& Desc_band_names) :
144  GroundBrdf(Spec_coeffs, Flag, Ref_points, Desc_band_names) {}
145 };
146 
147 } // End of namespace
148 
149  #endif
virtual ArrayAd< double, 1 > surface_parameter(const double wn, const int spec_index) const
Surface parmeters.
Definition: ground_brdf.cc:134
virtual const std::string breon_type() const
String describing which type of Breon surface type, also makes this class abstract.
Definition: ground_brdf.h:134
virtual const AutoDerivative< double > anisotropy_parameter(const int spec_index) const
Definition: ground_brdf.cc:193
virtual const std::string breon_type() const =0
String describing which type of Breon surface type, also makes this class abstract.
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...
Definition: ground_brdf.h:77
virtual const AutoDerivative< double > breon_factor(const int spec_index) const
Definition: ground_brdf.cc:200
virtual const AutoDerivative< double > weight_slope(const int spec_index) const
Definition: ground_brdf.cc:165
virtual const std::string breon_type() const
String describing which type of Breon surface type, also makes this class abstract.
Definition: ground_brdf.h:111
virtual const double refractive_index(const int Spec_idx) const
Returns hard coded value of 1.5 since that is the value hardcoded into LIDORT.
Definition: ground_brdf.h:61
virtual const AutoDerivative< double > hotspot_parameter(const int spec_index) const
Definition: ground_brdf.cc:179
virtual std::string desc() const
Definition: ground_brdf.h:83
blitz::Array< double, 1 > kernel_value_params(const int Spec_index)
Definition: ground_brdf.cc:307
GroundBrdf(const blitz::Array< double, 2 > &Coeffs, const blitz::Array< bool, 2 > &Flag, const ArrayWithUnit< double, 1 > &Ref_points, const std::vector< std::string > &Desc_band_names)
Constructor that defines coefficients in a 2d array: Num_spectrometer * NUM_COEFF Each row has the NU...
Definition: ground_brdf.cc:79
virtual const AutoDerivative< double > weight_intercept(const int spec_index) const
Definition: ground_brdf.cc:158
const blitz::Array< bool, 1 > & used_flag_value() const
virtual boost::shared_ptr< Ground > clone() const =0
Clone a Ground object.
virtual const int number_spectrometer() const
Definition: ground_brdf.h:38
ArrayWithUnit< double, 1 > reference_points
Definition: ground_brdf.h:92
std::vector< std::string > desc_band_names
Definition: ground_brdf.h:93
virtual std::string state_vector_name_i(int i) const
Return state vector name for ith entry in coeff.
Definition: ground_brdf.cc:342
virtual boost::shared_ptr< Ground > clone() const
Clone a Ground object.
Definition: ground_brdf.h:136
virtual const DoubleWithUnit reference_point(const int spec_index) const
Center wavelength that spectrally dependent parameter is referenced to.
Definition: ground_brdf.h:73
virtual boost::shared_ptr< Ground > clone() const
Clone a Ground object.
Definition: ground_brdf.h:113
We frequently have a double with units associated with it.
GroundBrdfSoil(const blitz::Array< double, 2 > &Coeffs, const blitz::Array< bool, 2 > &Flag, const ArrayWithUnit< double, 1 > &Ref_points, const std::vector< std::string > &Desc_band_names)
Definition: ground_brdf.h:126
virtual const AutoDerivative< double > weight(const double wn, const int spec_index) const
Definition: ground_brdf.cc:147
virtual void print(std::ostream &Os) const
Definition: ground_brdf.cc:377
const ArrayAd< double, 1 > & coefficient() const
It is common to have a class that is an Observable with a set of coefficients, a subset of which are ...
Contains classes to abstract away details in various Spurr Radiative Transfer software.
Definition: doxygen_python.h:1
GroundBrdfVeg(const blitz::Array< double, 2 > &Coeffs, const blitz::Array< bool, 2 > &Flag, const ArrayWithUnit< double, 1 > &Ref_points, const std::vector< std::string > &Desc_band_names)
Definition: ground_brdf.h:103
blitz::Array< double, 1 > black_sky_params(const int Spec_index)
Definition: ground_brdf.cc:292
const blitz::Array< double, 2 > brdf_covariance(const int spec_index) const
Definition: ground_brdf.cc:258
virtual const double black_sky_albedo(const int Spec_index, const double Sza)=0
virtual const double kernel_value(const int Spec_index, const double Sza, const double Vza, const double Azm)=0
virtual const AutoDerivative< double > rahman_factor(const int spec_index) const
Definition: ground_brdf.cc:172
virtual const AutoDerivative< double > asymmetry_parameter(const int spec_index) const
Definition: ground_brdf.cc:186
This class implements the Breon + Rahman ground type.
Definition: ground_brdf.h:19
double value(const FullPhysics::AutoDerivative< double > &Ad)

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