ReFRACtor
twostream_rt.cc
Go to the documentation of this file.
1 #include "twostream_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 .def(luabind::constructor<const boost::shared_ptr<RtAtmosphere>&,
17  const blitz::Array<double, 1>&,
18  const blitz::Array<double, 1>&,
19  const blitz::Array<double, 1>&,
20  bool>())
22 #endif
23 
24 // For debugging purposes, it can be useful to dump out the input
25 // used by this class. We'll leave this code in place, in case we
26 // need it again, but normally this turned off.
27 const bool dump_data = false;
28 
29 //-----------------------------------------------------------------------
41 //-----------------------------------------------------------------------
42 
44  const boost::shared_ptr<StokesCoefficient>& Stokes_coef,
45  const blitz::Array<double, 1>& Sza,
46  const blitz::Array<double, 1>& Zen,
47  const blitz::Array<double, 1>& Azm,
48  bool do_fullquadrature, bool do_solar, bool do_thermal)
49 : SpurrRt(Atm, Stokes_coef, Sza, Zen, Azm, do_solar, do_thermal)
50 {
51  rt_driver_.reset(new TwostreamRtDriver(atm->number_layer(), surface_type(), do_fullquadrature, do_solar, do_thermal));
52  if(dump_data)
53  std::cout << "# Nlayer:\n" << atm->number_layer() << "\n"
54  << "# Surface type:\n" << surface_type() << "\n"
55  << "# do_fullquadrature:\n" << do_fullquadrature << "\n";
56 }
57 
58 //-----------------------------------------------------------------------
60 //-----------------------------------------------------------------------
61 
62 void TwostreamRt::print(std::ostream& Os, bool Short_form) const
63 {
64  Os << "TwostreamRt\n";
65  OstreamPad opad1(Os, " ");
66  SpurrRt::print(opad1, Short_form);
67  opad1.strict_sync();
68  Os << "do_full_quadrature = " << (rt_driver()->do_full_quadrature() ? "true" : "false") << "\n";
69  opad1.strict_sync();
70 }
This is a filtering stream that adds a pad to the front of every line written out.
Definition: ostream_pad.h:32
virtual void print(std::ostream &Os, bool Short_form=false) const
Print to a stream.
Definition: twostream_rt.cc:62
boost::shared_ptr< SpurrRtDriver > rt_driver_
Definition: spurr_rt.h:61
const bool dump_data
Definition: twostream_rt.cc:27
#define REGISTER_LUA_DERIVED_CLASS(X, Y)
Definition: register_lua.h:136
Apply value function to a blitz array.
This runs a Radiative Transfer code to determine the reflectance for a given set of wavelengths...
Abstract Interface for Rt classes based on Spurr driver implementations.
Definition: spurr_rt.h:16
TwostreamRt(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 do_fullquadrature=true, bool do_solar=true, bool do_thermal=false)
Constructor.
Definition: twostream_rt.cc:43
Uses the Spurr interfaces to construct a radiative transfer class connecting L2 FP and TwoStream...
Definition: twostream_rt.h:13
TwoStream specific Radiative transfer driver implementation.
virtual void print(std::ostream &Os, bool Short_form=false) const
Print to a stream.
Definition: spurr_rt.cc:282
Contains classes to abstract away details in various Spurr Radiative Transfer software.
Definition: doxygen_python.h:1
#define REGISTER_LUA_END()
Definition: register_lua.h:134
const boost::shared_ptr< TwostreamRtDriver > rt_driver() const
Convenience routine to get rt driver object.
Definition: twostream_rt.h:35
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