23 : absorber(Abs), temp(Temp), press(Press)
49 Os <<
"RelativeHumidity:\n";
51 opad << *absorber <<
"\n";
53 Os <<
" Temperature:\n";
54 opad << *temp <<
"\n";
57 opad << *press <<
"\n";
67 blitz::Array<AutoDerivative<double>, 1> vgrid =
68 absorber->absorber_vmr(
"H2O")->vmr_grid(*press).to_array();
69 blitz::Array<AutoDerivative<double>, 1> shgrid(vgrid.rows());
70 shgrid = vgrid / (c + vgrid);
81 blitz::Array<AutoDerivative<double>, 1> pgrid =
82 press->pressure_grid().convert(
Unit(
"Pa")).value.to_array();
83 blitz::Array<AutoDerivative<double>, 1> shgrid =
85 blitz::Array<AutoDerivative<double>, 1> tgrid =
86 temp->temperature_grid(*press).convert(
Unit(
"K")).value.to_array();
87 blitz::Array<AutoDerivative<double>, 1> res(pgrid.rows());
88 res = 0.263 * pgrid * shgrid * exp(-17.67*(tgrid-273.16)/(tgrid-29.65));
101 for(
int i = 0; i < res.rows(); ++i)
102 res(i) = (rh_lev(i) + rh_lev(i+1)) / 2.0;
This is a filtering stream that adds a pad to the front of every line written out.
void print(std::ostream &Os)
Print to a string.
This class is an implementation of Constant that uses hard coded values suitable for Earth...
ArrayAd< double, 1 > specific_humidity_grid() const
Calculate specific humidity.
blitz::Array< AutoDerivative< T >, D > to_array() const
#define REGISTER_LUA_CLASS(X)
This calculates the relative humidity.
virtual DoubleWithUnit molar_weight_dry_air() const
Molar weight of dry air.
int number_variable() const
Libraries such as boost::units allow unit handling where we know the units at compile time...
virtual DoubleWithUnit molar_weight_water() const
Molar weight of water.
Contains classes to abstract away details in various Spurr Radiative Transfer software.
#define REGISTER_LUA_END()
virtual boost::shared_ptr< RelativeHumidity > clone() const
double value(const FullPhysics::AutoDerivative< double > &Ad)
ArrayAd< double, 1 > relative_humidity_grid() const
Calculate relative humidity.
RelativeHumidity(const boost::shared_ptr< Absorber > &Abs, const boost::shared_ptr< Temperature > &Temp, const boost::shared_ptr< Pressure > &Press)
Constructor.
ArrayAd< double, 1 > relative_humidity_layer() const
Relative humidity for each layer.