MeteoIODoc 2.11.0
mio::SunObject Class Reference

Detailed Description

A class to calculate Solar radiation characteristics This is largely based on M. Iqbal, "An introduction to solar radiation", 1983, Academic Press, ISBN: 0-12-373750-8. The Sun's position is provided by the SunTrajectory class (currently the only implemented algorithm is Meeus). All units are SI. See http://www.meteoexploration.com/products/solarcalc.php for a validation calculator.

Author
Mathias Bavay
Date
2010-06-10

#include <Sun.h>

Public Types

enum  position_algo { MEEUS }
 this enum provides the different position algorithms available More...
 

Public Member Functions

 SunObject (const SunObject::position_algo &alg=MEEUS)
 
 SunObject (const double &i_latitude, const double &i_longitude, const double &i_altitude)
 
 SunObject (const double &i_latitude, const double &i_longitude, const double &i_altitude, const double &i_julian, const double &i_TZ=0.)
 
void setDate (const double &i_julian, const double &i_TZ=0.)
 
void setDate (const Date &date)
 
void setLatLon (const double &i_latitude, const double &i_longitude, const double &i_altitude)
 
void resetAltitude (const double &i_altitude)
 
void setElevationThresh (const double &i_elevation_threshold)
 
void calculateRadiation (const double &ta, const double &rh, double pressure, const double &ground_albedo)
 
void calculateRadiation (const double &ta, const double &rh, const double &mean_albedo)
 
void getBeamRadiation (double &R_toa, double &R_direct, double &R_diffuse) const
 
void getHorizontalRadiation (double &R_toa, double &R_direct, double &R_diffuse) const
 
void getSlopeRadiation (const double &slope_azi, const double &slope_elev, double &R_toa, double &R_direct, double &R_diffuse) const
 
double getElevationThresh () const
 
double getSplittingBoland (const double &toa_h, const double &iswr_measured, const double &t) const
 Evaluate the splitting coefficient between direct and diffuse components of the incoming short wave radiation. Splitting is based on "clearness of the sky", ie. the ratio of measured incoming global radiation to top of the atmosphere radiation toa_h. This is based on Boland, John, Lynne Scott, and Mark Luther, "Modelling the diffuse fraction of global solar radiation on a horizontal surface", Environmetrics 12.2, 2001, pp103-116. More...
 
double getSplitting (const double &toa_h, const double &iswr_measured) const
 Evaluate the splitting coefficient between direct and diffuse components of the incoming short wave radiation. Splitting is based on "clearness of the sky", ie. the ratio of measured incoming global radiation to top of the atmosphere radiation toa_h, see D. G. Erbs, S.A. Klein, J.A. Duffie, "Estimation of the diffuse radiation fraction for hourly, daily and monthly-average global radiation", Solar Energy, 28, 4, 1982, Pages 293-302 and M. Iqbal, "An introduction to solar radiation", 1983, Academic Press, ISBN: 0-12-373750-8 and D. T. Reindl, W. A. Beckman, J. A. Duffle, "Diffuse fraction correlations", Solar Energy, 45, 1990, pp 1-7. More...
 
double getSplitting (const double &iswr_measured) const
 
double getCorrectionFactor (const double &iswr_measured, double &Md, bool &day, bool &night) const
 Evaluate an atmospheric losses factor. This correction factor is evaluated by comparing the global potential and the global measured radiation. The booleans "day" and "night" are returned in order to allow further optimizations. At dawn or dusk, both are set to false. More...
 
double getCorrectionFactor (const double &iswr_measured) const
 Evaluate an atmospheric losses factor. This correction factor is evaluated by comparing the global potential and the global measured radiation. More...
 
double getJulian (const double &o_TZ) const
 
Date getDate () const
 
const std::string toString () const
 

Public Attributes

SunMeeus position
 

Static Public Attributes

static const double elevation_dftlThreshold = 5.
 
static const double rad_threshold = 4.
 

Member Enumeration Documentation

◆ position_algo

this enum provides the different position algorithms available

Enumerator
MEEUS 

Jean Meeus' algorithm (Meeus, j. "Astronomical Algorithms", second edition, 1998, Willmann-Bell, Inc., Richmond, VA, USA)

Constructor & Destructor Documentation

◆ SunObject() [1/3]

mio::SunObject::SunObject ( const SunObject::position_algo alg = MEEUS)

◆ SunObject() [2/3]

mio::SunObject::SunObject ( const double &  i_latitude,
const double &  i_longitude,
const double &  i_altitude 
)

◆ SunObject() [3/3]

mio::SunObject::SunObject ( const double &  i_latitude,
const double &  i_longitude,
const double &  i_altitude,
const double &  i_julian,
const double &  i_TZ = 0. 
)

Member Function Documentation

◆ calculateRadiation() [1/2]

void mio::SunObject::calculateRadiation ( const double &  ta,
const double &  rh,
const double &  mean_albedo 
)

◆ calculateRadiation() [2/2]

void mio::SunObject::calculateRadiation ( const double &  ta,
const double &  rh,
double  pressure,
const double &  ground_albedo 
)

◆ getBeamRadiation()

void mio::SunObject::getBeamRadiation ( double &  R_toa,
double &  R_direct,
double &  R_diffuse 
) const

◆ getCorrectionFactor() [1/2]

double mio::SunObject::getCorrectionFactor ( const double &  iswr_measured) const

Evaluate an atmospheric losses factor. This correction factor is evaluated by comparing the global potential and the global measured radiation.

Parameters
[in]iswr_measuredmeasured Incoming Short Wave Radiation on the ground (W/m²)
Returns
correction coefficient (between 0 and 1)

◆ getCorrectionFactor() [2/2]

double mio::SunObject::getCorrectionFactor ( const double &  iswr_measured,
double &  Md,
bool &  day,
bool &  night 
) const

Evaluate an atmospheric losses factor. This correction factor is evaluated by comparing the global potential and the global measured radiation. The booleans "day" and "night" are returned in order to allow further optimizations. At dawn or dusk, both are set to false.

Parameters
[in]iswr_measuredmeasured Incoming Short Wave Radiation on the ground (W/m²)
[out]Mdsplitting coefficient (between 0 and 1, 1 being 100% diffuse radiation)
[out]dayis it daytime?
[out]nightist it nightime?
Returns
correction coefficient (between 0 and 1)

◆ getDate()

Date mio::SunObject::getDate ( ) const
inline

◆ getElevationThresh()

double mio::SunObject::getElevationThresh ( ) const
inline

◆ getHorizontalRadiation()

void mio::SunObject::getHorizontalRadiation ( double &  R_toa,
double &  R_direct,
double &  R_diffuse 
) const

◆ getJulian()

double mio::SunObject::getJulian ( const double &  o_TZ) const
inline

◆ getSlopeRadiation()

void mio::SunObject::getSlopeRadiation ( const double &  slope_azi,
const double &  slope_elev,
double &  R_toa,
double &  R_direct,
double &  R_diffuse 
) const

◆ getSplitting() [1/2]

double mio::SunObject::getSplitting ( const double &  iswr_measured) const

◆ getSplitting() [2/2]

double mio::SunObject::getSplitting ( const double &  toa_h,
const double &  iswr_measured 
) const

Evaluate the splitting coefficient between direct and diffuse components of the incoming short wave radiation. Splitting is based on "clearness of the sky", ie. the ratio of measured incoming global radiation to top of the atmosphere radiation toa_h, see D. G. Erbs, S.A. Klein, J.A. Duffie, "Estimation of the diffuse radiation fraction for hourly, daily and monthly-average global radiation", Solar Energy, 28, 4, 1982, Pages 293-302 and M. Iqbal, "An introduction to solar radiation", 1983, Academic Press, ISBN: 0-12-373750-8 and D. T. Reindl, W. A. Beckman, J. A. Duffle, "Diffuse fraction correlations", Solar Energy, 45, 1990, pp 1-7.

Parameters
toa_hhorizontal top of atmosphere Radiation (W/m²)
iswr_measuredmeasured Incoming Short Wave Radiation on the ground (W/m²)
Returns
splitting coefficient (between 0 and 1, 1 being 100% diffuse radiation)

◆ getSplittingBoland()

double mio::SunObject::getSplittingBoland ( const double &  toa_h,
const double &  iswr_measured,
const double &  t 
) const

Evaluate the splitting coefficient between direct and diffuse components of the incoming short wave radiation. Splitting is based on "clearness of the sky", ie. the ratio of measured incoming global radiation to top of the atmosphere radiation toa_h. This is based on Boland, John, Lynne Scott, and Mark Luther, "Modelling the diffuse fraction of global solar radiation on a horizontal surface", Environmetrics 12.2, 2001, pp103-116.

Parameters
toa_hhorizontal top of Atmosphere radiation (W/m²)
iswr_measuredmeasured Incoming Short Wave Radiation on the ground (W/m²)
tsolar time of day, ie solar time between 0 and 24
Returns
splitting coefficient (between 0 and 1, 1 being 100% diffuse radiation)

◆ resetAltitude()

void mio::SunObject::resetAltitude ( const double &  i_altitude)

◆ setDate() [1/2]

void mio::SunObject::setDate ( const Date date)
inline

◆ setDate() [2/2]

void mio::SunObject::setDate ( const double &  i_julian,
const double &  i_TZ = 0. 
)

◆ setElevationThresh()

void mio::SunObject::setElevationThresh ( const double &  i_elevation_threshold)

◆ setLatLon()

void mio::SunObject::setLatLon ( const double &  i_latitude,
const double &  i_longitude,
const double &  i_altitude 
)

◆ toString()

const std::string mio::SunObject::toString ( ) const

Member Data Documentation

◆ elevation_dftlThreshold

const double mio::SunObject::elevation_dftlThreshold = 5.
static

◆ position

SunMeeus mio::SunObject::position

◆ rad_threshold

const double mio::SunObject::rad_threshold = 4.
static

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