ReFRACtor
|
This class is responsible for setting up the atmosphere and ground information needed to run the Radiative transfer code. More...
#include <rt_atmosphere.h>
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< Ground > | ground () 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 |
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.
|
inlinevirtual |
Definition at line 54 of file rt_atmosphere.h.
|
inlinevirtual |
Add an observer.
Implements FullPhysics::Observable< RtAtmosphere >.
Definition at line 56 of file rt_atmosphere.h.
|
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.
|
inlineprotectedinherited |
Add an observer.
Definition at line 148 of file observer.h.
|
inlineprotectedinherited |
Definition at line 159 of file observer.h.
|
pure virtual |
Altitude grid for current pressure grid.
Implemented in FullPhysics::AtmosphereOco.
|
pure virtual |
The atmospheric thermal blackbody values per level.
Implemented in FullPhysics::AtmosphereOco.
|
inlineprotectedinherited |
Remove any dead pointers.
Definition at line 196 of file observer.h.
|
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.
|
pure virtual |
Object that represents the ground surface.
If null then there is no surface for this atmosphere.
Implemented in FullPhysics::AtmosphereOco.
|
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.
|
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.
|
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.
|
inlinevirtualinherited |
Definition at line 48 of file observer.h.
|
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.
|
inlinevirtualinherited |
Definition at line 56 of file observer.h.
|
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.
|
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.
|
pure virtual |
Number of layers we currently have.
Implemented in FullPhysics::AtmosphereOco.
|
pure virtual |
Number of spectrometers we have.
Implemented in FullPhysics::AtmosphereOco.
|
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).
wn | The wave number to calculate parameters for. |
spec_index | The spectrometer index |
Implemented in FullPhysics::AtmosphereOco.
|
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".
wn | The wave number to calculate parameters for. |
spec_index | The spectrometer index |
iv | Intermediate variable values to use. |
Implemented in FullPhysics::AtmosphereOco.
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.
wn | The wave number to calculate parameters for. |
spec_index | The spectrometer index |
Definition at line 43 of file rt_atmosphere.cc.
|
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.
|
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.
|
inlinevirtual |
Remove an observer.
Implements FullPhysics::Observable< RtAtmosphere >.
Definition at line 58 of file rt_atmosphere.h.
|
inlineprotectedinherited |
Remove an observer.
Definition at line 173 of file observer.h.
|
inlineprotectedinherited |
Definition at line 181 of file observer.h.
|
inlinevirtual |
Reset timer.
Reimplemented in FullPhysics::AtmosphereOco.
Definition at line 249 of file rt_atmosphere.h.
|
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).
wn | The wave number to calculate parameters for. |
spec_index | The spectrometer index |
nummom | Number of moments to include in scatt_mom_each_layer, the default it to include all of them. |
numscat | Number of scattering matrix elements to include in scatt_mom_each_layer, the default it to include all of them. |
Implemented in FullPhysics::AtmosphereOco.
|
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".
wn | The wave number to calculate parameters for. |
spec_index | The spectrometer index |
iv | Intermediate variable values to use. |
nummom | Number of moments to include in scatt_mom_each_layer, the default it to include all of them. |
numscat | Number of scattering matrix elements to include in scatt_mom_each_layer, the default it to include all of them. |
Implemented in FullPhysics::AtmosphereOco.
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.
wn | The wave number to calculate parameters for. |
spec_index | The spectrometer index |
nummom | Number of moments to include in scatt_mom_each_layer, the default it to include all of them. |
numscat | Number of scattering matrix elements to include in scatt_mom_each_layer, the default it to include all of them. |
Definition at line 114 of file rt_atmosphere.cc.
|
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).
wn | The wave number to calculate parameters for. |
spec_index | The spectrometer index |
Implemented in FullPhysics::AtmosphereOco.
|
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".
wn | The wave number to calculate parameters for. |
spec_index | The spectrometer index |
iv | Intermediate variable values to use. |
Implemented in FullPhysics::AtmosphereOco.
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.
wn | The wave number to calculate parameters for. |
spec_index | The spectrometer index |
Definition at line 73 of file rt_atmosphere.cc.
|
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.
|
pure virtual |
The surface thermal blackbody.
Implemented in FullPhysics::AtmosphereOco.
|
virtual |
Return timer information.
Reimplemented in FullPhysics::AtmosphereOco.
Definition at line 22 of file rt_atmosphere.cc.
|
protectedinherited |
Definition at line 200 of file observer.h.
|
protectedinherited |
Definition at line 201 of file observer.h.
|
static |
Timer for RtAtmosphere.
Definition at line 55 of file rt_atmosphere.h.