ReFRACtor
twostream_driver.h
Go to the documentation of this file.
1 #ifndef TWOSTREAM_DRIVER_H
2 #define TWOSTREAM_DRIVER_H
3 
4 #include "spurr_driver.h"
5 #include "twostream_interface.h"
6 
7 namespace FullPhysics {
8 
9 /****************************************************************/
14 public:
15  TwostreamBrdfDriver(int surface_type);
16  virtual ~TwostreamBrdfDriver() {}
17 
18  virtual void setup_geometry(double sza, double azm, double zen) const;
19 
20  virtual int n_brdf_kernels() const;
21 
22  virtual int n_kernel_factor_wfs() const;
23  virtual int n_kernel_params_wfs() const;
24  virtual int n_surface_wfs() const;
25  virtual bool do_kparams_derivs(const int kernel_index) const;
26  virtual bool do_shadow_effect() const;
27 
29 
30 protected:
31  virtual void calculate_brdf() const;
32 
33  virtual void n_brdf_kernels(const int n_kernels);
34  virtual void n_kernel_factor_wfs(const int n_factors);
35  virtual void n_kernel_params_wfs(const int n_params);
36  virtual void n_surface_wfs(const int n_wfs);
37  virtual void do_kparams_derivs(const int kernel_index, const bool do_kparams);
38  virtual void do_shadow_effect(const bool do_shadow) const;
39 
40  virtual void initialize_kernel_parameters(const int kernel_index,
41  const int which_brdf,
42  const bool lambertian_flag,
43  const int n_brdf_parameters,
44  const bool do_factor_wfs,
45  const blitz::Array<bool, 1>& do_params_wfs);
46 
48 };
49 
50 /****************************************************************/
55 public:
56  TwostreamRtDriver(int nlayers, int surface_type, bool do_fullquadrature = true,
57  bool do_solar = true, bool do_thermal = false);
58 
59  void setup_height_grid(const blitz::Array<double, 1>& height_grid) const;
60  void setup_geometry(double sza, double azm, double zen) const;
61 
62  void setup_thermal_inputs(double surface_bb, const blitz::Array<double, 1> atmosphere_bb) const;
63 
64  void setup_optical_inputs(const blitz::Array<double, 1>& od,
65  const blitz::Array<double, 1>& ssa,
66  const blitz::Array<double, 2>& pf) const;
67 
68  void clear_linear_inputs() const;
69  void setup_linear_inputs(const ArrayAd<double, 1>& od,
70  const ArrayAd<double, 1>& ssa,
71  const ArrayAd<double, 2>& pf,
72  bool do_surface_linearization) const;
73 
74  void calculate_rt() const;
75  double get_intensity() const;
76  void copy_jacobians(blitz::Array<double, 2>& jac_atm, blitz::Array<double, 1>& jac_surf) const;
77 
79  return boost::shared_ptr<TwostreamBrdfDriver>(boost::dynamic_pointer_cast<TwostreamBrdfDriver>(brdf_driver_));
80  }
81 
82  boost::shared_ptr<Twostream_Ls_Brdf_Supplement> brdf_interface() const { return twostream_brdf_driver()->brdf_interface(); }
83 
84  boost::shared_ptr<Twostream_Lps_Master> twostream_interface() const { return twostream_interface_; }
85 
86  bool do_full_quadrature() const { return do_fullquadrature_; };
87 
88 protected:
89  void initialize_rt();
90 
93 
95 };
96 
97 }
98 #endif
boost::shared_ptr< Twostream_Ls_Brdf_Supplement > brdf_interface() const
virtual int n_kernel_factor_wfs() const
boost::shared_ptr< Twostream_Lps_Master > twostream_interface() const
virtual void setup_geometry(double sza, double azm, double zen) const
boost::shared_ptr< Twostream_Lps_Master > twostream_interface_
TwostreamBrdfDriver(int surface_type)
Initialize Twostream BRDF interface.
TwoStream specific BRDF driver implementation.
Abstracts away set up of BRDF kernel interfaces.
Definition: spurr_driver.h:37
virtual bool do_kparams_derivs(const int kernel_index) const
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)
boost::shared_ptr< TwostreamBrdfDriver > twostream_brdf_driver() const
boost::shared_ptr< Twostream_Ls_Brdf_Supplement > twostream_brdf_
TwoStream specific Radiative transfer driver implementation.
Abstracts away set up of Radiative Transfer software from Rob Spurr into a simpler common inteface us...
Definition: spurr_driver.h:90
Contains classes to abstract away details in various Spurr Radiative Transfer software.
Definition: doxygen_python.h:1
virtual int n_kernel_params_wfs() const
virtual void calculate_brdf() const
boost::shared_ptr< Twostream_Ls_Brdf_Supplement > brdf_interface() const
virtual bool do_shadow_effect() const

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