ReFRACtor
chapman_boa.h
Go to the documentation of this file.
1 #ifndef CHAPMAN_BOA_H
2 #define CHAPMAN_BOA_H
3 
4 #include <blitz/array.h>
5 #include <vector>
6 #include <boost/shared_ptr.hpp>
7 
8 #include "auto_derivative.h"
9 #include "refractive_index.h"
10 
11 namespace FullPhysics {
12 
13 void straightline_geometry( // Inputs
14  bool do_plane_parallel,
15  double rearth,
16  const blitz::Array<AutoDerivative<double>, 1>& heights,
17  const blitz::Array<double, 1>& sza_values,
18  // Outputs
19  blitz::Array<AutoDerivative<double>, 2>& chapmanfactors,
20  blitz::Array<AutoDerivative<double>, 1>& toa_nadir_szangles,
21  blitz::Array<AutoDerivative<double>, 1>& toa_entry_szangles);
22 
23 void refractive_geometry( // Input
24  double rearth,
25  const blitz::Array<AutoDerivative<double>, 1>& heights,
26  const std::vector<boost::shared_ptr<AtmRefractiveIndex> >& refr_index,
27  const blitz::Array<double, 1>& sza_values,
28  // Output
29  blitz::Array<AutoDerivative<double>, 2>& chapmanfactors,
30  blitz::Array<AutoDerivative<double>, 1>& toa_nadir_szangles,
31  blitz::Array<AutoDerivative<double>, 1>& toa_entry_szangles);
32 
33 void refractive_bending( // Input
34  int start_lay, // Starting at Level n and working out to TOA
35  double theta, // Function Guess (level angle)
36  double dtr,
37  const blitz::Array<AutoDerivative<double>, 1>& rtimesn,
38  const blitz::Array<int, 1>& nquad,
39  // layer fine gridding
40  const blitz::Array<AutoDerivative<double>, 2>& fineweight,
41  const blitz::Array<AutoDerivative<double>, 2>& fineradii,
42  const blitz::Array<AutoDerivative<double>, 2>& finersqnsq,
43  // Output local distances, cumulative angles and function value
44  blitz::Array<AutoDerivative<double>, 1>& distances,
45  AutoDerivative<double>& alpha,
46  AutoDerivative<double>& anglefunc );
47 
55 
56 void full_gridding( // Inputs
57  double rearth,
58  // Gridding Control
59  int nlower,
60  int nupper,
61  double changeheight,
62  const blitz::Array<AutoDerivative<double>, 1>& heights,
63  const std::vector<boost::shared_ptr<AtmRefractiveIndex> >& refr_index,
64  // Outputs
65  // Fine layering stuff
66  blitz::Array<AutoDerivative<double>, 2>& fineweight,
67  blitz::Array<AutoDerivative<double>, 2>& fineradii,
68  blitz::Array<AutoDerivative<double>, 3>& finersqnsq,
69  // partial and whole layer fine gridding
70  blitz::Array<int, 1>& nquad);
71 
72 /****************************************************************/
76 class ChapmanBOA {
77 
78 public:
79 
80  ChapmanBOA(double rearth,
81  bool do_plane_parallel,
82  const blitz::Array<double, 1>& sza_values,
83  const blitz::Array<AutoDerivative<double>, 1>& heights);
84 
85  ChapmanBOA(double rearth,
86  const blitz::Array<double, 1>& sza_values,
87  const blitz::Array<AutoDerivative<double>, 1>& heights,
88  const std::vector<boost::shared_ptr<AtmRefractiveIndex> >& refr_index);
89 
90  ChapmanBOA(double rearth,
91  const double sza,
92  const blitz::Array<AutoDerivative<double>, 1>& heights,
93  const boost::shared_ptr<AtmRefractiveIndex>& refr_index);
94 
95  // Access angles set up during class construction
96  const blitz::Array<AutoDerivative<double>, 2>& chapman_factors() const { return chapmanfactors_; }
97  const blitz::Array<AutoDerivative<double>, 1>& toa_nadir_szangles() const { return toa_nadir_szangles_; }
98  const blitz::Array<AutoDerivative<double>, 1>& toa_entry_szangles() const { return toa_entry_szangles_; }
99 
101  const blitz::Array<AutoDerivative<double>, 1> transmittance(const blitz::Array<AutoDerivative<double>, 1>& extinction) const;
102  const AutoDerivative<double> transmittance(const blitz::Array<AutoDerivative<double>, 1>& extinction, int beam_index) const;
103 
104 private:
105 
106  blitz::Array<AutoDerivative<double>, 2> chapmanfactors_;
107  blitz::Array<AutoDerivative<double>, 1> toa_nadir_szangles_;
108  blitz::Array<AutoDerivative<double>, 1> toa_entry_szangles_;
109 
110 };
111 }
112 #endif
void refractive_geometry(double rearth, const blitz::Array< AutoDerivative< double >, 1 > &heights, const std::vector< boost::shared_ptr< AtmRefractiveIndex > > &refr_index, const blitz::Array< double, 1 > &sza_values, blitz::Array< AutoDerivative< double >, 2 > &chapmanfactors, blitz::Array< AutoDerivative< double >, 1 > &toa_nadir_szangles, blitz::Array< AutoDerivative< double >, 1 > &toa_entry_szangles)
Definition: chapman_boa.cc:151
const blitz::Array< AutoDerivative< double >, 1 > & toa_entry_szangles() const
Definition: chapman_boa.h:98
const blitz::Array< AutoDerivative< double >, 2 > & chapman_factors() const
Definition: chapman_boa.h:96
const blitz::Array< AutoDerivative< double >, 1 > & toa_nadir_szangles() const
Definition: chapman_boa.h:97
void full_gridding(double rearth, int nlower, int nupper, double changeheight, const blitz::Array< AutoDerivative< double >, 1 > &heights, const std::vector< boost::shared_ptr< AtmRefractiveIndex > > &refr_index, blitz::Array< AutoDerivative< double >, 2 > &fineweight, blitz::Array< AutoDerivative< double >, 2 > &fineradii, blitz::Array< AutoDerivative< double >, 3 > &finersqnsq, blitz::Array< int, 1 > &nquad)
Output partial and whole layer fine gridding: nquad
Definition: chapman_boa.cc:314
void straightline_geometry(bool do_plane_parallel, double rearth, const blitz::Array< AutoDerivative< double >, 1 > &heights, const blitz::Array< double, 1 > &sza_values, blitz::Array< AutoDerivative< double >, 2 > &chapmanfactors, blitz::Array< AutoDerivative< double >, 1 > &toa_nadir_szangles, blitz::Array< AutoDerivative< double >, 1 > &toa_entry_szangles)
Free functions translated from Fortran.
Definition: chapman_boa.cc:69
void refractive_bending(int start_lay, double theta, double dtr, const blitz::Array< AutoDerivative< double >, 1 > &rtimesn, const blitz::Array< int, 1 > &nquad, const blitz::Array< AutoDerivative< double >, 2 > &fineweight, const blitz::Array< AutoDerivative< double >, 2 > &fineradii, const blitz::Array< AutoDerivative< double >, 2 > &finersqnsq, blitz::Array< AutoDerivative< double >, 1 > &distances, AutoDerivative< double > &alpha, AutoDerivative< double > &anglefunc)
Definition: chapman_boa.cc:250
ChapmanBOA(double rearth, bool do_plane_parallel, const blitz::Array< double, 1 > &sza_values, const blitz::Array< AutoDerivative< double >, 1 > &heights)
Straight line geometry constructor.
Definition: chapman_boa.cc:10
Contains classes to abstract away details in various Spurr Radiative Transfer software.
Definition: doxygen_python.h:1
const blitz::Array< AutoDerivative< double >, 1 > transmittance(const blitz::Array< AutoDerivative< double >, 1 > &extinction) const
Compute transmittance using molecular extinction and pre-computed angles.
Definition: chapman_boa.cc:43
This class computes Bottom of the Atmosphere radiance.
Definition: chapman_boa.h:76

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