ReFRACtor
absorber_vmr_level_scaled.cc
Go to the documentation of this file.
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<Pressure>&,
11  const blitz::Array<double, 1>&,
12  double,
13  bool,
14  const std::string&>())
16 #endif
17 
18 //-----------------------------------------------------------------------
20 //-----------------------------------------------------------------------
21 
24  const blitz::Array<double, 1>& Vmr_profile,
25  double Scale,
26  bool Scale_flag,
27  const std::string& Gas_name)
28 : AbsorberVmrScaled(Press, Scale, Scale_flag, Gas_name), vmr_profile_(Vmr_profile)
29 {
30 }
31 
32 blitz::Array<double, 1> AbsorberVmrLevelScaled::vmr_profile() const
33 {
34  return vmr_profile_;
35 }
36 
37 blitz::Array<double, 1> AbsorberVmrLevelScaled::pressure_profile() const
38 {
39  return press->pressure_grid().value.value();
40 }
41 
43 (const boost::shared_ptr<Pressure>& Press) const
44 {
46  (new AbsorberVmrLevelScaled(Press, vmr_profile_, coeff(0).value(),used_flag(0),
47  gas_name()));
48 }
49 
50 void AbsorberVmrLevelScaled::print(std::ostream& Os) const
51 {
52  OstreamPad opad(Os, " ");
53  Os << "AbsorberVmrLevelScaled:\n"
54  << " Gas name: " << gas_name() << "\n"
55  << " Scale: " << scale_factor() << "\n"
56  << " Retrieval flag: " << (used_flag_value()(0) ?
57  "True\n" : "False\n")
58  << " VMR Profile:\n";
59  opad << vmr_profile_ << "\n";
60  opad.strict_sync();
61 }
AbsorberVmrLevelScaled(const boost::shared_ptr< Pressure > &Press, const blitz::Array< double, 1 > &Vmr_profile, double Scale, bool Scale_flag, const std::string &Gas_name)
Constructor.
This is a filtering stream that adds a pad to the front of every line written out.
Definition: ostream_pad.h:32
This class maps the state vector to the absorber VMR on each level.
virtual boost::shared_ptr< AbsorberVmr > clone() const
Clone a AbsorberVmr object.
virtual void print(std::ostream &Os) const
Print to stream.
#define REGISTER_LUA_DERIVED_CLASS(X, Y)
Definition: register_lua.h:136
Apply value function to a blitz array.
virtual blitz::Array< double, 1 > pressure_profile() const
Pressure levels that vmr is on.
This gives the Gas Absorber Volumn mixing ratio for a single gas.
Definition: absorber_vmr.h:17
virtual blitz::Array< double, 1 > vmr_profile() const
VMR values passed in from input.
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 maps the state vector to the absorber VMR on each level.
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:08