ReFRACtor
ground_coxmunk_output.cc
Go to the documentation of this file.
2 
3 using namespace FullPhysics;
4 using namespace blitz;
5 
6 #ifdef HAVE_LUA
7 #include "register_lua.h"
8 
10 {
12  (new GroundCoxmunkOutput(boost::dynamic_pointer_cast<GroundCoxmunk>(ground)));
13 }
14 
16 .def(luabind::constructor<const boost::shared_ptr<GroundCoxmunk>&>())
17 .scope
18 [
19  luabind::def("create", &ground_cm_output_create)
20 ]
22 #endif
23 
25 {
26  return Coxmunk->coefficient()(0).value();
27 }
28 
30 {
31  Array<double, 2> cov = Coxmunk->statevector_covariance();
32  if(cov.rows() > 0 and cov.rows() > 0) {
33  return (cov(0, 0) < 0 ? 0.0 : sqrt(cov(0, 0)));
34  } else {
35  return 0.0;
36  }
37 }
38 
40 {
42  boost::dynamic_pointer_cast<GroundCoxmunk>(coxmunk->clone());
43 
44  { boost::function<double ()> f = boost::bind(&windspeed, cm_freeze);
45  out->register_data_source("/RetrievalResults/wind_speed_apriori", f); }
46 
47 }
48 
50 {
51 
52  { boost::function<double ()> f = boost::bind(&windspeed, coxmunk);
53  out->register_data_source("/RetrievalResults/wind_speed", f); }
54 
55  { boost::function<double ()> f = boost::bind(&windspeed_uncert, coxmunk);
56  out->register_data_source("/RetrievalResults/wind_speed_uncertainty", f); }
57 
58  out->register_data_source("/RetrievalResults/surface_type", surface_type.c_str());
59 }
virtual void register_output_apriori(const boost::shared_ptr< Output > &out) const
Register apriori portions of class.
double windspeed_uncert(boost::shared_ptr< GroundCoxmunk > &Coxmunk)
#define REGISTER_LUA_DERIVED_CLASS(X, Y)
Definition: register_lua.h:136
Apply value function to a blitz array.
double windspeed(boost::shared_ptr< GroundCoxmunk > &Coxmunk)
As described in the Output class, we have a decentralized model of producing output for L2 Full Physi...
virtual void register_output(const boost::shared_ptr< Output > &out) const
Register portions of class that will be written to output.
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
def(luabind::constructor< int >()) .def("rows"
This registers the portions of the GroundCoxmunk class that should be written as output.
This class implements a Coxmunk ground type.
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:11