1 #ifndef ATMOSPHERE_OCO_H 2 #define ATMOSPHERE_OCO_H 103 nlay = pressure->number_layer();
109 if (totaltaug_cache) {
110 if (not totaltaug_cache->is_valid(wn))
111 fill_cache(wn, spec_index);
113 return (*totaltaug_cache)[
wn](absorber->gas_index(Gas_name));
115 fill_cache(wn, spec_index);
116 return totaltaug(absorber->gas_index(Gas_name));
121 return totaltaug_cache;
126 fill_cache(wn, spec_index);
132 fill_cache(wn, spec_index);
138 fill_cache(wn, spec_index);
139 return scattering_moment_common(wn, nummom, numscat);
146 calc_rt_parameters(wn, iv);
154 calc_rt_parameters(wn, iv);
161 int numscat = -1)
const 164 calc_rt_parameters(wn, iv);
165 return scattering_moment_common(wn, nummom, numscat);
178 fill_cache(wn, spec_index);
179 return intermediate_v;
187 { sv_size = (int) Sv.
state().size(); }
189 { sv_size = (int) Sv.
state().size(); }
193 virtual void print(std::ostream& Os)
const;
204 {
return temperature;}
223 return !aerosol || aerosol->number_particle() == 0;
245 std::vector<boost::shared_ptr<Altitude> > alt;
253 mutable double wn_tau_cache;
254 mutable int spec_index_tau_cache;
268 void calc_intermediate_variable(
double wn,
int spec_index)
const;
269 bool fill_cache(
double wn,
int spec_index)
const;
271 int nummom,
int numscat)
const;
virtual ArrayAd< double, 1 > optical_depth_wrt_iv(double wn, int spec_index, const ArrayAd< double, 2 > &iv) const
This is a variation of optical_depth that takes the supplied value for the intermediate variables rat...
#define range_check(V, Min, Max)
Range check.
virtual ArrayAd< double, 1 > single_scattering_albedo_wrt_iv(double wn, int spec_index, const ArrayAd< double, 2 > &iv) const
This is a variation of single_scattering_albedo that takes the supplied value for the intermediate va...
virtual std::string timer_info() const
Return timer information.
This class is responsible for setting up the atmosphere and ground information needed to run the Radi...
bool rayleigh_only_atmosphere() const
Indicate we have rayleigh only atmosphere, i.e., we don't have any aerosol content.
void set_aerosol(boost::shared_ptr< Aerosol > &new_aerosol, StateVector &Sv)
Changes the aerosol class used.
const blitz::Array< double, 1 > & state() const
Current state vector.
const boost::shared_ptr< Pressure > & pressure_ptr() const
virtual ArrayAd< double, 1 > optical_depth_wrt_iv(double wn, int spec_index) const
The optical depth for each layer, for the given wave number.
virtual void notify_add(StateVector &Sv)
Called when an object is added to an Observable.
boost::shared_ptr< AtmosphereOco > clone() const
This clones a Atmosphere object.
static AccumulatedTimer timer
Timer for RtAtmosphere.
virtual void notify_remove(StateVector &Sv)
Called when an object is removed from an Observable.
virtual AutoDerivative< double > column_optical_depth(double wn, int spec_index, const std::string &Gas_name) const
Total column optical depth for the given gas.
const boost::shared_ptr< RelativeHumidity > & relative_humidity_ptr() const
const boost::shared_ptr< Constant > & constant_ptr() const
virtual ArrayAd< double, 3 > scattering_moment_wrt_iv(double wn, int spec_index, int nummom=-1, int numscat=-1) const
The scattering moments for for each layer, for the given wave number.
virtual ArrayAd< double, 2 > intermediate_variable(double wn, int spec_index) const
This gives the values of the intermediate variables and the Jacobian with respect to the state vector...
virtual int number_layer() const
Number of layers we currently have.
const boost::shared_ptr< Temperature > & temperature_ptr() const
virtual void reset_timer()
Reset timer.
void notify_update_do(const RtAtmosphere &Self)
Function to call to notify Observers of a state change.
const Unit A("A", 1.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0)
virtual const boost::shared_ptr< Ground > ground() const
Object that represents the ground surface.
const boost::shared_ptr< Altitude > & altitude_ptr(int Spec_index) const
This class maintains the aerosol portion of the state.
FunctionTimer function_timer(bool Auto_log=false) const
Function timer.
virtual int number_spectrometer() const
Number of spectrometers we have.
virtual AutoDerivative< double > surface_blackbody(double wn, int spec_index) const
The surface thermal blackbody.
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
This is a variation of scattering_moment that takes the supplied value for the intermediate variables...
This handles informing a set of interested objects when the state vector has updated.
const boost::shared_ptr< Rayleigh > & rayleigh_ptr() const
virtual void print(std::ostream &Os) const
This class maintains the pressure portion of the state.
const boost::shared_ptr< Aerosol > & aerosol_ptr() const
virtual void notify_update(const Pressure &P)
Called when the Observed object is updated.
Contains classes to abstract away details in various Spurr Radiative Transfer software.
virtual boost::shared_ptr< ArrayAdCache< double, double, 1 > > & column_optical_depth_cache()
const std::vector< boost::shared_ptr< Altitude > > & altitude_ptr() const
This class maintains the atmosphere portion of the state, and uses this to set up the atmosphere and ...
Helper class for AccumulatedTimer.
void set_surface_pressure_for_testing(double x)
For unit test purposes, it is useful to be able to directly change the surface pressure.
virtual ArrayAd< double, 1 > single_scattering_albedo_wrt_iv(double wn, int spec_index) const
The single scattering albedo for each layer, for the given wave number.
void attach_children_to_sv(StateVector &statev)
For unit test purposes, it is useful to be able to clone or create a new atmosphere class then attach...
virtual void notify_update(const StateVector &Sv)
Called when the Observed object is updated.
virtual ArrayAd< double, 1 > atmosphere_blackbody(double wn, int spec_index) const
The atmospheric thermal blackbody values per level.
const boost::shared_ptr< Absorber > & absorber_ptr() const
virtual ArrayAdWithUnit< double, 1 > altitude(int spec_index) const
Altitude grid for current pressure grid.
Simple Mixin to be and Observer of another object of class T.
AtmosphereOco(const boost::shared_ptr< Absorber > &absorberv, const boost::shared_ptr< Pressure > &pressurev, const boost::shared_ptr< Temperature > &temperaturev, const boost::shared_ptr< Aerosol > &aerosolv, const boost::shared_ptr< RelativeHumidity > &rhv, const boost::shared_ptr< Ground > &groundv, const boost::shared_ptr< SurfaceTemperature > &surface_tempv, const std::vector< boost::shared_ptr< Altitude > > &altv, const boost::shared_ptr< Constant > &C)
Create an an Atmosphere with all available components: