ReFRACtor
lidort_driver.h
Go to the documentation of this file.
1 #ifndef LIDORT_DRIVER_H
2 #define LIDORT_DRIVER_H
3 
4 #include "spurr_driver.h"
6 
7 namespace FullPhysics {
8 
9 /****************************************************************/
14 public:
15  LidortBrdfDriver(int nstream, int nmoment);
16  virtual ~LidortBrdfDriver() {}
17 
19  // other than default
21 
22  virtual void setup_geometry(double sza, double azm, double zen) const;
23 
24  virtual int n_brdf_kernels() const;
25 
26  virtual int n_kernel_factor_wfs() const;
27  virtual int n_kernel_params_wfs() const;
28  virtual int n_surface_wfs() const;
29  virtual bool do_kparams_derivs(const int kernel_index) const;
30  virtual bool do_shadow_effect() const;
31 
32 protected:
33  int nmoment_;
34 
35  virtual void calculate_brdf() const;
36 
37  virtual void n_brdf_kernels(const int n_kernels);
38  virtual void n_kernel_factor_wfs(const int n_factors);
39  virtual void n_kernel_params_wfs(const int n_params);
40  virtual void n_surface_wfs(const int n_wfs);
41  virtual void do_kparams_derivs(const int kernel_index, const bool do_kparams);
42  virtual void do_shadow_effect(const bool do_shadow) const;
43 
44  virtual void initialize_kernel_parameters(const int kernel_index,
45  const int which_brdf,
46  const bool lambertian_flag,
47  const int n_brdf_parameters,
48  const bool do_factor_wfs,
49  const blitz::Array<bool, 1>& do_params_wfs);
50 
52 };
53 
54 /****************************************************************/
58 class LidortRtDriver : public SpurrRtDriver {
59 public:
60  LidortRtDriver(int nstream, int nmoment, bool do_multi_scatt_only, int surface_type,
61  const blitz::Array<double, 1>& zen, bool pure_nadir,
62  bool do_solar = true, bool do_thermal = false);
63 
64  int number_moment() const;
65  int number_stream() const;
66 
67  void setup_sphericity(double zen) const;
68  void set_plane_parallel() const;
69  void set_pseudo_spherical() const;
70  void set_plane_parallel_plus_ss_correction() const;
71  void set_line_of_sight() const;
72 
73  bool do_multi_scatt_only() const { return do_multi_scatt_only_; }
74 
75  bool pure_nadir() const { return pure_nadir_; }
76 
79  { return boost::shared_ptr<LidortBrdfDriver>(boost::dynamic_pointer_cast<LidortBrdfDriver>(brdf_driver_)); }
80 
82  { return boost::dynamic_pointer_cast<LidortBrdfDriver>(brdf_driver_)->brdf_interface(); }
83 
85  const boost::shared_ptr<Lidort_Lps_Masters> lidort_interface() const { return lidort_interface_; }
86 
87  void setup_height_grid(const blitz::Array<double, 1>& height_grid) const;
88  void setup_geometry(double sza, double azm, double zen) const;
89 
90  void setup_thermal_inputs(double surface_bb, const blitz::Array<double, 1> atmosphere_bb) const;
91 
92  void setup_optical_inputs(const blitz::Array<double, 1>& od,
93  const blitz::Array<double, 1>& ssa,
94  const blitz::Array<double, 2>& pf) const;
95  void clear_linear_inputs() const;
96  void setup_linear_inputs(const ArrayAd<double, 1>& od,
97  const ArrayAd<double, 1>& ssa,
98  const ArrayAd<double, 2>& pf,
99  bool do_surface_linearization) const;
100 
101  void calculate_rt() const;
102  double get_intensity() const;
103  void copy_jacobians(blitz::Array<double, 2>& jac_atm, blitz::Array<double, 1>& jac_surf) const;
104 
105 protected:
106  void initialize_rt();
107  void copy_brdf_sup_outputs() const;
108 
114 };
115 
116 }
117 #endif
const boost::shared_ptr< Brdf_Linsup_Masters > brdf_interface() const
Definition: lidort_driver.h:81
const boost::shared_ptr< Lidort_Lps_Masters > lidort_interface() const
Interface to LIDORT RT software inputs to allow changing LIDORT configuration to values other than de...
Definition: lidort_driver.h:85
virtual int n_kernel_params_wfs() const
LidortBrdfDriver(int nstream, int nmoment)
Initialize Lidort BRDF interface.
boost::shared_ptr< Brdf_Linsup_Masters > brdf_interface_
Definition: lidort_driver.h:51
boost::shared_ptr< Lidort_Lps_Masters > lidort_interface_
Abstracts away set up of BRDF kernel interfaces.
Definition: spurr_driver.h:37
virtual int n_kernel_factor_wfs() const
virtual int n_brdf_kernels() const
const boost::shared_ptr< LidortBrdfDriver > lidort_brdf_driver() const
Access to BRDF driver.
Definition: lidort_driver.h:78
virtual bool do_kparams_derivs(const int kernel_index) const
LIDORT specific Radiative transfer interface implementation.
Definition: lidort_driver.h:58
const boost::shared_ptr< Brdf_Linsup_Masters > brdf_interface() const
Interface to BRDF interface to allow changing configuration to values.
Definition: lidort_driver.h:20
virtual void initialize_kernel_parameters(const int kernel_index, const int which_brdf, const bool lambertian_flag, const int n_brdf_parameters, const bool do_factor_wfs, const blitz::Array< bool, 1 > &do_params_wfs)
Abstracts away set up of Radiative Transfer software from Rob Spurr into a simpler common inteface us...
Definition: spurr_driver.h:90
virtual void setup_geometry(double sza, double azm, double zen) const
Contains classes to abstract away details in various Spurr Radiative Transfer software.
Definition: doxygen_python.h:1
LIDORT specific BRDF driver implementation.
Definition: lidort_driver.h:13
virtual void calculate_brdf() const
virtual int n_surface_wfs() const
virtual bool do_shadow_effect() const
bool do_multi_scatt_only() const
Definition: lidort_driver.h:73

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