ReFRACtor
radiative_transfer_single_wn.cc
Go to the documentation of this file.
2 #include "ostream_pad.h"
3 using namespace FullPhysics;
4 using namespace blitz;
5 
6 Array<double, 2>
8  int Spec_index) const
9 {
10  Array<double, 1> wn(Spec_domain.wavenumber());
11  boost::shared_ptr<boost::progress_display> disp = progress_display(wn);
12  Array<double, 2> res(wn.rows(), number_stokes());
13  for(int i = 0; i < wn.rows(); ++i) {
14  res(i, Range::all()) = stokes_single_wn(wn(i), Spec_index);
15  if(disp)
16  *disp += 1;
17  }
18  return res;
19 }
20 
23  int Spec_index) const
24 {
25  Array<double, 1> wn(Spec_domain.wavenumber());
26  if(wn.rows() < 1) // Handle degenerate case.
27  return ArrayAd<double, 2>(0,number_stokes(),0);
28  boost::shared_ptr<boost::progress_display> disp = progress_display(wn);
30  stokes_and_jacobian_single_wn(wn(0), Spec_index);
31  ArrayAd<double, 2> res(wn.rows(), number_stokes(), t.number_variable());
32  res(0, Range::all()) = t;
33  for(int i = 1; i < wn.rows(); ++i) {
34  res(i, Range::all()) = stokes_and_jacobian_single_wn(wn(i), Spec_index);
35  if(disp)
36  *disp += 1;
37  }
38  return res;
39 }
40 
41 void RadiativeTransferSingleWn::print(std::ostream& Os, bool Short_form) const
42 {
44  OstreamPad opad(Os, " ");
45  if(!Short_form) {
46  Os << "\nAtmosphere:\n";
47  opad << *atm << "\n";
48  opad.strict_sync();
49  }
50 }
This is a filtering stream that adds a pad to the front of every line written out.
Definition: ostream_pad.h:32
For different instruments, it is more natural to either work with wavenumbers (e.g., GOSAT) or wavelength (e.g., OCO).
Apply value function to a blitz array.
virtual void print(std::ostream &Os, bool Short_form=false) const
Print to stream.
virtual blitz::Array< double, 2 > stokes(const SpectralDomain &Spec_domain, int Spec_index) const
Calculate stokes vector for the given set of wavenumbers/wavelengths.
int number_variable() const
Definition: array_ad.h:376
virtual ArrayAd< double, 2 > stokes_and_jacobian(const SpectralDomain &Spec_domain, int Spec_index) const
Calculate stokes vector for the given set of wavenumbers/wavelengths.
blitz::Array< double, 1 > wavenumber(const Unit &Units=units::inv_cm) const
Return data as wavenumbers.
Contains classes to abstract away details in various Spurr Radiative Transfer software.
Definition: doxygen_python.h:1
virtual void print(std::ostream &Os, bool Short_form=false) const
Print to stream.

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