ReFRACtor
temperature_met.cc
Go to the documentation of this file.
1 #include "temperature_met.h"
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<Meteorology>&,
13  double, bool>())
15 #endif
16 
17 //-----------------------------------------------------------------------
19 //-----------------------------------------------------------------------
20 
23  const boost::shared_ptr<Pressure>& Press,
24  double Temp_offset,
25  bool Temp_flag)
26 : TemperatureOffset(Press, Temp_offset, Temp_flag), met(Met_file)
27 {
28 }
29 
30 // See base class for description of this function
33 {
35  (new TemperatureMet(met, Press, coefficient()(0).value(),
36  used_flag_value()(0)));
37  return res;
38 }
39 
40 void TemperatureMet::print(std::ostream& Os) const
41 {
42  OstreamPad opad(Os, " ");
43  Os << "TemperatureMet:\n"
44  << " Temperature offset: " << temperature_offset() << "\n"
45  << " Retrieval flag: " << (used_flag_value()(0) ?
46  "True\n" : "False\n")
47  << " Meteorology:\n";
48  opad << *met << "\n";
49  opad.strict_sync();
50 }
This is a filtering stream that adds a pad to the front of every line written out.
Definition: ostream_pad.h:32
TemperatureMet(const boost::shared_ptr< Meteorology > &Met_file, const boost::shared_ptr< Pressure > &Press, double Temp_offset, bool Temp_flag)
Create an Temperature.
virtual void print(std::ostream &Os) const
Print to stream.
#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.
This class maintains the temperature portion of the state.
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
virtual boost::shared_ptr< Temperature > clone() const
Clone a Temperature object.
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