ReFRACtor
lidort_rt.cc
Go to the documentation of this file.
1 #include "lidort_rt.h"
2 #include "ostream_pad.h"
3 
4 using namespace FullPhysics;
5 using namespace blitz;
6 
7 #ifdef HAVE_LUA
8 #include "register_lua.h"
10 .def(luabind::constructor<const boost::shared_ptr<RtAtmosphere>&,
12  const blitz::Array<double, 1>&,
13  const blitz::Array<double, 1>&,
14  const blitz::Array<double, 1>&,
15  bool, int, int, bool>())
16 .enum_("constants")
17 [
18  luabind::value("maxmoments_input", Lidort_Pars::instance().maxmoments_input)
19 ]
21 #endif
22 
23 //-----------------------------------------------------------------------
42 //-----------------------------------------------------------------------
43 
45  const boost::shared_ptr<StokesCoefficient>& Stokes_coef,
46  const blitz::Array<double, 1>& Sza,
47  const blitz::Array<double, 1>& Zen,
48  const blitz::Array<double, 1>& Azm,
49  bool Pure_nadir,
50  int Number_streams,
51  int Number_moments,
52  bool Do_multi_scatt_only,
53  bool do_solar,
54  bool do_thermal)
55 : SpurrRt(Atm, Stokes_coef, Sza, Zen, Azm, do_solar, do_thermal)
56 {
57  rt_driver_.reset(new LidortRtDriver(Number_streams, Number_moments, Do_multi_scatt_only, surface_type(), Zen, Pure_nadir, do_solar, do_thermal));
58 }
59 
60 //-----------------------------------------------------------------------
62 //-----------------------------------------------------------------------
63 
64 void LidortRt::print(std::ostream& Os, bool Short_form) const
65 {
66  Os << "LidortRt\n";
67  OstreamPad opad1(Os, " ");
68  SpurrRt::print(opad1, Short_form);
69  opad1.strict_sync();
70  OstreamPad opad(Os, " ");
71  Os << " Number stream: " << number_stream() << "\n"
72  << " Number moments: " << number_moment() << "\n"
73  << " Use first order scattering calc: "
74  << (rt_driver()->do_multi_scatt_only() ? "True\n" : "False\n")
75  << (rt_driver()->pure_nadir() ? "True\n" : "False\n");
76 
77  opad << "\n";
78  opad.strict_sync();
79 }
80 
static Lidort_Pars & instance()
This is a filtering stream that adds a pad to the front of every line written out.
Definition: ostream_pad.h:32
int number_moment() const
Number of moments for scattering matrix.
Definition: lidort_rt.h:31
boost::shared_ptr< SpurrRtDriver > rt_driver_
Definition: spurr_rt.h:61
#define REGISTER_LUA_DERIVED_CLASS(X, Y)
Definition: register_lua.h:136
Apply value function to a blitz array.
LIDORT specific Radiative transfer interface implementation.
Definition: lidort_driver.h:58
This runs a Radiative Transfer code to determine the reflectance for a given set of wavelengths...
Uses the Spurr interfaces to construct a radiative transfer class connecting L2 FP and LIDORT 3...
Definition: lidort_rt.h:13
LidortRt(const boost::shared_ptr< RtAtmosphere > &Atm, const boost::shared_ptr< StokesCoefficient > &Stokes_coef, const blitz::Array< double, 1 > &Sza, const blitz::Array< double, 1 > &Zen, const blitz::Array< double, 1 > &Azm, bool Pure_nadir, int Number_streams, int Number_moments, bool Do_multi_scatt_only, bool do_solar=true, bool do_thermal=false)
Constructor.
Definition: lidort_rt.cc:44
Abstract Interface for Rt classes based on Spurr driver implementations.
Definition: spurr_rt.h:16
virtual void print(std::ostream &Os, bool Short_form=false) const
Print to a stream.
Definition: spurr_rt.cc:282
const boost::shared_ptr< LidortRtDriver > rt_driver() const
Convenience routine to get rt driver object.
Definition: lidort_rt.h:37
Contains classes to abstract away details in various Spurr Radiative Transfer software.
Definition: doxygen_python.h:1
virtual int number_stream() const
Number of quadtature streams in the cosine half space.
Definition: lidort_rt.h:28
#define REGISTER_LUA_END()
Definition: register_lua.h:134
virtual void print(std::ostream &Os, bool Short_form=false) const
Print to a stream.
Definition: lidort_rt.cc:64
double value(const FullPhysics::AutoDerivative< double > &Ad)
virtual int surface_type() const
Integer representing the surface type using the LIDORT indexing nomenclature.
Definition: spurr_rt.h:47

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