ReFRACtor
temperature_level_offset.cc
Go to the documentation of this file.
2 #include "fp_exception.h"
3 #include "ostream_pad.h"
4 #include <boost/lexical_cast.hpp>
5 using namespace FullPhysics;
6 using namespace blitz;
7 
8 #ifdef HAVE_LUA
9 #include "register_lua.h"
11 .def(luabind::constructor<const boost::shared_ptr<Pressure>&,
12  const blitz::Array<double, 1>&,
13  double, bool>())
15 #endif
16 
17 //-----------------------------------------------------------------------
19 //-----------------------------------------------------------------------
20 
23  const blitz::Array<double, 1>& Temp_levels,
24  double Temp_offset,
25  bool Temp_flag)
26 : TemperatureOffset(Press, Temp_offset, Temp_flag), temp_levels(Temp_levels)
27 {
28 }
29 
30 // See base class for description of this function
31 
34 {
36  (new TemperatureLevelOffset(Press, temp_levels, coefficient()(0).value(),
37  used_flag_value()(0)));
38  return res;
39 }
40 
41 void TemperatureLevelOffset::print(std::ostream& Os) const
42 {
43  OstreamPad opad(Os, " ");
44  Os << "TemperatureLevelOffset:\n"
45  << " Temperature offset: " << coefficient()(0) << "\n"
46  << " Retrieval flag: " << (used_flag_value()(0) ?
47  "True\n" : "False\n")
48  << " Level Initial Guess:\n";
49  opad << temp_levels << "\n";
50  opad.strict_sync();
51 }
This is a filtering stream that adds a pad to the front of every line written out.
Definition: ostream_pad.h:32
This class maintains the temperature portion of the state.
TemperatureLevelOffset(const boost::shared_ptr< Pressure > &Press, const blitz::Array< double, 1 > &Temp_levels, double Temp_offset, bool Temp_flag)
Create an Temperature.
#define REGISTER_LUA_DERIVED_CLASS(X, Y)
Definition: register_lua.h:136
This class maintains the temperature portion of the state.
Apply value function to a blitz array.
virtual boost::shared_ptr< Temperature > clone() const
Clone a Temperature object.
virtual void print(std::ostream &Os) const
Print to stream.
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
This class maintains the temperature portion of the state.
Definition: temperature.h:22
double value(const FullPhysics::AutoDerivative< double > &Ad)

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