ReFRACtor
FullPhysics::RtAtmosphere Class Referenceabstract

This class is responsible for setting up the atmosphere and ground information needed to run the Radiative transfer code. More...

#include <rt_atmosphere.h>

+ Inheritance diagram for FullPhysics::RtAtmosphere:
+ Collaboration diagram for FullPhysics::RtAtmosphere:

Public Member Functions

virtual ~RtAtmosphere ()
 
virtual void add_observer (Observer< RtAtmosphere > &Obs)
 Add an observer. More...
 
void add_observer_and_keep_reference (boost::shared_ptr< Observer< RtAtmosphere > > &Obs)
 Add an observer and keep a reference to it. More...
 
virtual ArrayAdWithUnit< double, 1 > altitude (int spec_index) const =0
 Altitude grid for current pressure grid. More...
 
virtual ArrayAd< double, 1 > atmosphere_blackbody (double wn, int spec_index) const =0
 The atmospheric thermal blackbody values per level. More...
 
virtual AutoDerivative< double > column_optical_depth (double wn, int spec_index, const std::string &Gas_name) const =0
 Total column optical depth for the given gas. More...
 
virtual const boost::shared_ptr< Groundground () const =0
 Object that represents the ground surface. More...
 
virtual ArrayAd< double, 2 > intermediate_variable (double wn, int spec_index) const =0
 This gives the values of the intermediate variables and the Jacobian with respect to the state vector. More...
 
virtual void mark_used (const StateVector &Sv, blitz::Array< bool, 1 > &Used) const
 Mark elements that we are actively using (i.e., that aren't ignored). More...
 
virtual void notify_add (StateVector &Observed_object)
 Called when an object is added to an Observable. More...
 
virtual void notify_add ()
 
virtual void notify_remove (StateVector &Observed_object)
 Called when an object is removed from an Observable. More...
 
virtual void notify_remove ()
 
virtual void notify_update (const StateVector &Observed_object)
 Called when the Observed object is updated. More...
 
virtual int number_layer () const =0
 Number of layers we currently have. More...
 
virtual int number_spectrometer () const =0
 Number of spectrometers we have. More...
 
virtual ArrayAd< double, 1 > optical_depth_wrt_iv (double wn, int spec_index) const =0
 The optical depth for each layer, for the given wave number. More...
 
virtual ArrayAd< double, 1 > optical_depth_wrt_iv (double wn, int spec_index, const ArrayAd< double, 2 > &iv) const =0
 This is a variation of optical_depth that takes the supplied value for the intermediate variables rather than calculating it own value. More...
 
ArrayAd< double, 1 > optical_depth_wrt_state_vector (double wn, int spec_index) const
 The optical depth for each layer, for the given wave number. More...
 
virtual void print (std::ostream &Os) const
 
std::string print_to_string () const
 Print to string. More...
 
virtual void remove_observer (Observer< RtAtmosphere > &Obs)
 Remove an observer. More...
 
virtual void reset_timer ()
 Reset timer. More...
 
virtual ArrayAd< double, 3 > scattering_moment_wrt_iv (double wn, int spec_index, int nummom=-1, int numscat=-1) const =0
 The scattering moments for for each layer, for the given wave number. More...
 
virtual ArrayAd< double, 3 > scattering_moment_wrt_iv (double wn, int spec_index, const ArrayAd< double, 2 > &iv, int nummom=-1, int numscat=-1) const =0
 This is a variation of scattering_moment that takes the supplied value for the intermediate variables rather than calculating it own value. More...
 
ArrayAd< double, 3 > scattering_moment_wrt_state_vector (double wn, int spec_index, int nummom=-1, int numscat=-1) const
 The scattering moments for for each layer, for the given wave number. More...
 
virtual ArrayAd< double, 1 > single_scattering_albedo_wrt_iv (double wn, int spec_index) const =0
 The single scattering albedo for each layer, for the given wave number. More...
 
virtual ArrayAd< double, 1 > single_scattering_albedo_wrt_iv (double wn, int spec_index, const ArrayAd< double, 2 > &iv) const =0
 This is a variation of single_scattering_albedo that takes the supplied value for the intermediate variables rather than calculating it own value. More...
 
ArrayAd< double, 1 > single_scattering_albedo_wrt_state_vector (double wn, int spec_index) const
 The single scattering albedo for each layer, for the given wave number. More...
 
virtual void state_vector_name (const StateVector &Sv, blitz::Array< std::string, 1 > &Sv_name) const
 Update any portion of the list of the state vector names that apply to this object. More...
 
virtual AutoDerivative< double > surface_blackbody (double wn, int spec_index) const =0
 The surface thermal blackbody. More...
 
virtual std::string timer_info () const
 Return timer information. More...
 

Static Public Attributes

static AccumulatedTimer timer
 Timer for RtAtmosphere. More...
 

Protected Member Functions

void add_observer_do (Observer< RtAtmosphere > &Obs, RtAtmosphere &t)
 Add an observer. More...
 
void add_observer_do (Observer< RtAtmosphere > &Obs)
 
void clean_dead_ptr ()
 Remove any dead pointers. More...
 
void notify_update_do (const RtAtmosphere &Self)
 Function to call to notify Observers of a state change. More...
 
void remove_observer_do (Observer< RtAtmosphere > &Obs, RtAtmosphere &t)
 Remove an observer. More...
 
void remove_observer_do (Observer< RtAtmosphere > &Obs)
 

Protected Attributes

std::list< boost::weak_ptr< Observer< RtAtmosphere > > > olist
 
std::vector< boost::shared_ptr< Observer< RtAtmosphere > > > ref_list
 

Detailed Description

This class is responsible for setting up the atmosphere and ground information needed to run the Radiative transfer code.

There are many, many properties associated with the atmosphere. This class is not meant to model these properties, it is really the very limited information needed to run the Radiative transfer code.

Note that this includes both the atmosphere and surface parameters needed by the RT code.

The calculation of the Jacobians in LIDORT takes a time directly proportional to the number of variables we are taking the Jacobian with respect to, we use an "intermediate" set of variables for some of the reported gradients (e.g., AtmosphereOco uses taur, taug, and tau for each of the aerosol). To support future Atmosphere classes, we are purposely vague on exactly what these intermediate variables are, at least through the RtAtmosphere interface. The "intermediate_variable" function can be used to get the value of these intermediate variables and Jacobian with the state vector variables.

A description of the intermediate variables can be found in doc/LIDORT_Jacobian.pdf.

Note that it is assumed by the LSI that averaging these intermediate variables to get average optical properties makes sense. This is true if the variables are taur etc., but might not be true in general. If we add a class derived from RtAtmosphere where this doesn't make sense, we will need to rework this interface.

Other objects may depend on the RtAtmosphere, and should be updated when the RtAtmosphere is updated. To facilitate that, this class is an Oberverable, and objects can add themselves as Observers to be notified when the RtAtmosphere is updated.

Because the absorber calculation tends to be a bottle neck, we keep a timer in this class. This class keeps track of the time used in the atmosphere calculations. Other classes can make use of this information for logging if desired.

Definition at line 51 of file rt_atmosphere.h.

Constructor & Destructor Documentation

◆ ~RtAtmosphere()

virtual FullPhysics::RtAtmosphere::~RtAtmosphere ( )
inlinevirtual

Definition at line 54 of file rt_atmosphere.h.

Member Function Documentation

◆ add_observer()

virtual void FullPhysics::RtAtmosphere::add_observer ( Observer< RtAtmosphere > &  Obs)
inlinevirtual

Add an observer.

Implements FullPhysics::Observable< RtAtmosphere >.

Definition at line 56 of file rt_atmosphere.h.

◆ add_observer_and_keep_reference()

void FullPhysics::Observable< RtAtmosphere >::add_observer_and_keep_reference ( boost::shared_ptr< Observer< RtAtmosphere > > &  Obs)
inlineinherited

Add an observer and keep a reference to it.

See the discussion in the Observer class description for details.

Definition at line 107 of file observer.h.

◆ add_observer_do() [1/2]

void FullPhysics::Observable< RtAtmosphere >::add_observer_do ( Observer< RtAtmosphere > &  Obs,
RtAtmosphere t 
)
inlineprotectedinherited

Add an observer.

Definition at line 148 of file observer.h.

◆ add_observer_do() [2/2]

void FullPhysics::Observable< RtAtmosphere >::add_observer_do ( Observer< RtAtmosphere > &  Obs)
inlineprotectedinherited

Definition at line 159 of file observer.h.

◆ altitude()

virtual ArrayAdWithUnit<double, 1> FullPhysics::RtAtmosphere::altitude ( int  spec_index) const
pure virtual

Altitude grid for current pressure grid.

Implemented in FullPhysics::AtmosphereOco.

◆ atmosphere_blackbody()

virtual ArrayAd<double, 1> FullPhysics::RtAtmosphere::atmosphere_blackbody ( double  wn,
int  spec_index 
) const
pure virtual

The atmospheric thermal blackbody values per level.

Implemented in FullPhysics::AtmosphereOco.

◆ clean_dead_ptr()

void FullPhysics::Observable< RtAtmosphere >::clean_dead_ptr ( )
inlineprotectedinherited

Remove any dead pointers.

Definition at line 196 of file observer.h.

◆ column_optical_depth()

virtual AutoDerivative<double> FullPhysics::RtAtmosphere::column_optical_depth ( double  wn,
int  spec_index,
const std::string &  Gas_name 
) const
pure virtual

Total column optical depth for the given gas.

This is 0 if the band isn't one that sees that gas.

Implemented in FullPhysics::AtmosphereOco.

◆ ground()

virtual const boost::shared_ptr<Ground> FullPhysics::RtAtmosphere::ground ( ) const
pure virtual

Object that represents the ground surface.

If null then there is no surface for this atmosphere.

Implemented in FullPhysics::AtmosphereOco.

◆ intermediate_variable()

virtual ArrayAd<double, 2> FullPhysics::RtAtmosphere::intermediate_variable ( double  wn,
int  spec_index 
) const
pure virtual

This gives the values of the intermediate variables and the Jacobian with respect to the state vector.

This is number_layer() x number variables

Implemented in FullPhysics::AtmosphereOco.

◆ mark_used()

virtual void FullPhysics::StateVectorObserver::mark_used ( const StateVector Sv,
blitz::Array< bool, 1 > &  Used 
) const
inlinevirtualinherited

Mark elements that we are actively using (i.e., that aren't ignored).

You only need to mark the ones that are used as true, everything is already initialized as false. Default is to do nothing.

Reimplemented in FullPhysics::SubStateVectorObserver.

Definition at line 26 of file state_vector_observer.h.

◆ notify_add() [1/2]

virtual void FullPhysics::Observer< StateVector >::notify_add ( StateVector Observed_object)
inlinevirtualinherited

Called when an object is added to an Observable.

Default is to do nothing.

Reimplemented in FullPhysics::AtmosphereOco, and FullPhysics::SubStateVectorObserver.

Definition at line 47 of file observer.h.

◆ notify_add() [2/2]

virtual void FullPhysics::Observer< StateVector >::notify_add ( )
inlinevirtualinherited

Definition at line 48 of file observer.h.

◆ notify_remove() [1/2]

virtual void FullPhysics::Observer< StateVector >::notify_remove ( StateVector Observed_object)
inlinevirtualinherited

Called when an object is removed from an Observable.

Default is to do nothing.

Reimplemented in FullPhysics::AtmosphereOco, and FullPhysics::SubStateVectorObserver.

Definition at line 55 of file observer.h.

◆ notify_remove() [2/2]

virtual void FullPhysics::Observer< StateVector >::notify_remove ( )
inlinevirtualinherited

Definition at line 56 of file observer.h.

◆ notify_update()

virtual void FullPhysics::Observer< StateVector >::notify_update ( const StateVector Observed_object)
inlinevirtualinherited

Called when the Observed object is updated.

Reimplemented in FullPhysics::AtmosphereOco, FullPhysics::RadianceScalingSvFit, FullPhysics::AbsorberAbsco, FullPhysics::AerosolOptical, and FullPhysics::SubStateVectorObserver.

Definition at line 40 of file observer.h.

◆ notify_update_do()

void FullPhysics::Observable< RtAtmosphere >::notify_update_do ( const RtAtmosphere Self)
inlineprotectedinherited

Function to call to notify Observers of a state change.

The object should pass itself to this function, so it can be passed to the Observers.

Definition at line 121 of file observer.h.

◆ number_layer()

virtual int FullPhysics::RtAtmosphere::number_layer ( ) const
pure virtual

Number of layers we currently have.

Implemented in FullPhysics::AtmosphereOco.

◆ number_spectrometer()

virtual int FullPhysics::RtAtmosphere::number_spectrometer ( ) const
pure virtual

Number of spectrometers we have.

Implemented in FullPhysics::AtmosphereOco.

◆ optical_depth_wrt_iv() [1/2]

virtual ArrayAd<double, 1> FullPhysics::RtAtmosphere::optical_depth_wrt_iv ( double  wn,
int  spec_index 
) const
pure virtual

The optical depth for each layer, for the given wave number.

The derivatives of the optical depth are with respect to the intermediate variables, rather than the state vector variables (see description of RtAtmosphere class for discussion of this).

Parameters
wnThe wave number to calculate parameters for.
spec_indexThe spectrometer index
Returns
Optical depth for each layer. This is number_layer() in size

Implemented in FullPhysics::AtmosphereOco.

◆ optical_depth_wrt_iv() [2/2]

virtual ArrayAd<double, 1> FullPhysics::RtAtmosphere::optical_depth_wrt_iv ( double  wn,
int  spec_index,
const ArrayAd< double, 2 > &  iv 
) const
pure virtual

This is a variation of optical_depth that takes the supplied value for the intermediate variables rather than calculating it own value.

This is used by the LSI to get "average optical properties".

Parameters
wnThe wave number to calculate parameters for.
spec_indexThe spectrometer index
ivIntermediate variable values to use.
Returns
Optical depth for each layer. This is number_layer() in size

Implemented in FullPhysics::AtmosphereOco.

◆ optical_depth_wrt_state_vector()

ArrayAd< double, 1 > RtAtmosphere::optical_depth_wrt_state_vector ( double  wn,
int  spec_index 
) const

The optical depth for each layer, for the given wave number.

This variation gives the derivatives with respect to the state vector, this just combines optical_depth with the Jacobian of the intermediate variables given by intermediate_variable.

Parameters
wnThe wave number to calculate parameters for.
spec_indexThe spectrometer index
Returns
Optical depth for each layer. This is number_layer() in size

Definition at line 43 of file rt_atmosphere.cc.

◆ print()

virtual void FullPhysics::StateVectorObserver::print ( std::ostream &  Os) const
inlinevirtualinherited

Reimplemented in FullPhysics::AtmosphereOco, FullPhysics::EmpiricalOrthogonalFunction, FullPhysics::AbsorberAbsco, FullPhysics::SolarAbsorptionAndContinuum, FullPhysics::PressureFixedLevel, FullPhysics::Instrument, FullPhysics::DispersionPolynomial, FullPhysics::GroundBrdf, FullPhysics::AerosolOptical, FullPhysics::SubStateVectorObserver, FullPhysics::RadianceScaling, FullPhysics::IlsInstrument, FullPhysics::AerosolPropertyRhHdf, FullPhysics::IlsConvolution, FullPhysics::RadianceScalingSvFit, FullPhysics::AerosolShapeGaussian, FullPhysics::AerosolPropertyImpBase, FullPhysics::AerosolExtinctionLog, FullPhysics::PressureSigma, FullPhysics::RadianceScalingLinearFit, FullPhysics::AerosolExtinctionLinear, FullPhysics::AerosolExtinctionImpBase, FullPhysics::PressureImpBase, FullPhysics::StokesCoefficientImpBase, FullPhysics::GroundLambertian, FullPhysics::TemperatureImpBase, FullPhysics::AerosolPropertyHdf, FullPhysics::FluorescenceEffect, FullPhysics::AbsorberVmrImpBase, FullPhysics::SolarModel, FullPhysics::InstrumentDoppler, FullPhysics::GroundCoxmunk, FullPhysics::ApplyInstrumentUnits, FullPhysics::GroundCoxmunkPlusLambertian, FullPhysics::AbsorberVmrFixedLevel, FullPhysics::AbsorberVmrFixedLevelScaled, FullPhysics::AbsorberVmrMet, FullPhysics::SubStateVectorProxy, FullPhysics::AbsorberVmrLevel, FullPhysics::AbsorberVmrLevelScaled, FullPhysics::TemperatureFixedLevel, FullPhysics::AbsorberVmrScaled, FullPhysics::StokesCoefficientFraction, FullPhysics::TemperatureMet, FullPhysics::TemperatureLevelOffset, FullPhysics::TemperatureOffset, and FullPhysics::StokesCoefficientConstant.

Definition at line 37 of file state_vector_observer.h.

◆ print_to_string()

std::string FullPhysics::Printable< StateVectorObserver >::print_to_string ( ) const
inlineinherited

Print to string.

This is primarily useful for SWIG wrappers to this class, e.g. a to_s method in ruby.

Definition at line 31 of file printable.h.

◆ remove_observer()

virtual void FullPhysics::RtAtmosphere::remove_observer ( Observer< RtAtmosphere > &  Obs)
inlinevirtual

Remove an observer.

Implements FullPhysics::Observable< RtAtmosphere >.

Definition at line 58 of file rt_atmosphere.h.

◆ remove_observer_do() [1/2]

void FullPhysics::Observable< RtAtmosphere >::remove_observer_do ( Observer< RtAtmosphere > &  Obs,
RtAtmosphere t 
)
inlineprotectedinherited

Remove an observer.

Definition at line 173 of file observer.h.

◆ remove_observer_do() [2/2]

void FullPhysics::Observable< RtAtmosphere >::remove_observer_do ( Observer< RtAtmosphere > &  Obs)
inlineprotectedinherited

Definition at line 181 of file observer.h.

◆ reset_timer()

virtual void FullPhysics::RtAtmosphere::reset_timer ( )
inlinevirtual

Reset timer.

Reimplemented in FullPhysics::AtmosphereOco.

Definition at line 249 of file rt_atmosphere.h.

◆ scattering_moment_wrt_iv() [1/2]

virtual ArrayAd<double, 3> FullPhysics::RtAtmosphere::scattering_moment_wrt_iv ( double  wn,
int  spec_index,
int  nummom = -1,
int  numscat = -1 
) const
pure virtual

The scattering moments for for each layer, for the given wave number.

The scattering moments use the de Rooij convention for the 6 scattering matrix element.

The derivatives of the optical depth are with respect to the intermediate variables, rather than the state vector variables (see description of RtAtmosphere class for discussion of this).

Parameters
wnThe wave number to calculate parameters for.
spec_indexThe spectrometer index
nummomNumber of moments to include in scatt_mom_each_layer, the default it to include all of them.
numscatNumber of scattering matrix elements to include in scatt_mom_each_layer, the default it to include all of them.
Returns
Scattering moments for each layer. This is number_moment + 1 x number_layer() x number scattering matrix elements

Implemented in FullPhysics::AtmosphereOco.

◆ scattering_moment_wrt_iv() [2/2]

virtual ArrayAd<double, 3> FullPhysics::RtAtmosphere::scattering_moment_wrt_iv ( double  wn,
int  spec_index,
const ArrayAd< double, 2 > &  iv,
int  nummom = -1,
int  numscat = -1 
) const
pure virtual

This is a variation of scattering_moment that takes the supplied value for the intermediate variables rather than calculating it own value.

This is used by the LSI to get "average optical properties".

Parameters
wnThe wave number to calculate parameters for.
spec_indexThe spectrometer index
ivIntermediate variable values to use.
nummomNumber of moments to include in scatt_mom_each_layer, the default it to include all of them.
numscatNumber of scattering matrix elements to include in scatt_mom_each_layer, the default it to include all of them.
Returns
Scattering moments for each layer. This is number_moment + 1 x number_layer() x number scattering matrix elements

Implemented in FullPhysics::AtmosphereOco.

◆ scattering_moment_wrt_state_vector()

ArrayAd< double, 3 > RtAtmosphere::scattering_moment_wrt_state_vector ( double  wn,
int  spec_index,
int  nummom = -1,
int  numscat = -1 
) const

The scattering moments for for each layer, for the given wave number.

The scattering moments use the de Rooij convention for the 6 scattering matrix element.

This variation gives the derivatives with respect to the state vector, this just combines single_scattering_albedo with the Jacobian of the intermediate variables given by intermediate_variable.

Parameters
wnThe wave number to calculate parameters for.
spec_indexThe spectrometer index
nummomNumber of moments to include in scatt_mom_each_layer, the default it to include all of them.
numscatNumber of scattering matrix elements to include in scatt_mom_each_layer, the default it to include all of them.
Returns
Scattering moments for each layer. This is number_moment + 1 x number_layer() x number scattering matrix elements

Definition at line 114 of file rt_atmosphere.cc.

◆ single_scattering_albedo_wrt_iv() [1/2]

virtual ArrayAd<double, 1> FullPhysics::RtAtmosphere::single_scattering_albedo_wrt_iv ( double  wn,
int  spec_index 
) const
pure virtual

The single scattering albedo for each layer, for the given wave number.

The derivatives of the optical depth are with respect to the intermediate variables, rather than the state vector variables (see description of RtAtmosphere class for discussion of this).

Parameters
wnThe wave number to calculate parameters for.
spec_indexThe spectrometer index
Returns
Single scattering albedo for each layer. This is number_layer() in size

Implemented in FullPhysics::AtmosphereOco.

◆ single_scattering_albedo_wrt_iv() [2/2]

virtual ArrayAd<double, 1> FullPhysics::RtAtmosphere::single_scattering_albedo_wrt_iv ( double  wn,
int  spec_index,
const ArrayAd< double, 2 > &  iv 
) const
pure virtual

This is a variation of single_scattering_albedo that takes the supplied value for the intermediate variables rather than calculating it own value.

This is used by the LSI to get "average optical properties".

Parameters
wnThe wave number to calculate parameters for.
spec_indexThe spectrometer index
ivIntermediate variable values to use.
Returns
Single scattering albedo for each layer. This is number_layer() in size

Implemented in FullPhysics::AtmosphereOco.

◆ single_scattering_albedo_wrt_state_vector()

ArrayAd< double, 1 > RtAtmosphere::single_scattering_albedo_wrt_state_vector ( double  wn,
int  spec_index 
) const

The single scattering albedo for each layer, for the given wave number.

This variation gives the derivatives with respect to the state vector, this just combines single_scattering_albedo with the Jacobian of the intermediate variables given by intermediate_variable.

Parameters
wnThe wave number to calculate parameters for.
spec_indexThe spectrometer index
Returns
Single scattering albedo for each layer. This is number_layer() in size

Definition at line 73 of file rt_atmosphere.cc.

◆ state_vector_name()

virtual void FullPhysics::StateVectorObserver::state_vector_name ( const StateVector Sv,
blitz::Array< std::string, 1 > &  Sv_name 
) const
inlinevirtualinherited

Update any portion of the list of the state vector names that apply to this object.

Default is to do nothing.

Reimplemented in FullPhysics::SubStateVectorObserver.

Definition at line 34 of file state_vector_observer.h.

◆ surface_blackbody()

virtual AutoDerivative<double> FullPhysics::RtAtmosphere::surface_blackbody ( double  wn,
int  spec_index 
) const
pure virtual

The surface thermal blackbody.

Implemented in FullPhysics::AtmosphereOco.

◆ timer_info()

std::string RtAtmosphere::timer_info ( ) const
virtual

Return timer information.

Reimplemented in FullPhysics::AtmosphereOco.

Definition at line 22 of file rt_atmosphere.cc.

Member Data Documentation

◆ olist

std::list<boost::weak_ptr<Observer<RtAtmosphere > > > FullPhysics::Observable< RtAtmosphere >::olist
protectedinherited

Definition at line 200 of file observer.h.

◆ ref_list

std::vector<boost::shared_ptr<Observer<RtAtmosphere > > > FullPhysics::Observable< RtAtmosphere >::ref_list
protectedinherited

Definition at line 201 of file observer.h.

◆ timer

AccumulatedTimer RtAtmosphere::timer
static

Timer for RtAtmosphere.

Definition at line 55 of file rt_atmosphere.h.


The documentation for this class was generated from the following files:

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