iLand
Public Member Functions | List of all members
Climate Class Reference

Climate handles climate input data and performs some basic related calculations on that data. More...

#include <climate.h>

Public Member Functions

 Climate ()
 
void setup ()
 setup routine that opens database connection More...
 
bool isSetup () const
 
const QString & name () const
 table name of this climate More...
 
void nextYear ()
 
const ClimateDaydayOfYear (const int dayofyear) const
 get pointer to climate structure by day of year (0-based-index) More...
 
const ClimateDayday (const int month, const int day) const
 gets pointer to climate structure of given day (0-based indices, i.e. month=11=december!) More...
 
int whichDayOfYear (const ClimateDay *climate) const
 get the 0-based index of the climate given by 'climate' within the current year More...
 
void monthRange (const int month, const ClimateDay **rBegin, const ClimateDay **rEnd) const
 returns two pointer (arguments!!!) to the begin and one after end of the given month (month: 0..11) More...
 
double days (const int month) const
 returns number of days of given month (0..11) More...
 
int daysOfYear () const
 returns number of days of current year. More...
 
const ClimateDaybegin () const
 STL-like (pointer)-iterator to the first day of the current year. More...
 
const ClimateDayend () const
 STL-like pointer iterator to the day after last day of the current year. More...
 
void toDate (const int yearday, int *rDay=0, int *rMonth=0, int *rYear=0) const
 decode "yearday" to the actual year, month, day if provided More...
 
double totalRadiation () const
 return radiation sum (MJ) of the whole year More...
 
const double * precipitationMonth () const
 
double meanAnnualTemperature () const
 the mean annual temperature of the current year (degree C) More...
 
double annualPrecipitation () const
 annual precipitation sum (mm) More...
 
const double * temperatureMonth () const
 get a array with mean temperatures per month (deg C) More...
 
int climateDataYear () const
 retrieve the year provided in the climate table More...
 
int phenologyGroupCount () const
 
const Phenologyphenology (const int phenologyGroup) const
 phenology class of given type More...
 
const Sunsun () const
 solar radiation class More...
 
double daylength_h (const int doy) const
 length of the day in hours More...
 

Detailed Description

Climate handles climate input data and performs some basic related calculations on that data.

See also
http://iland-model.org/ClimateData

Constructor & Destructor Documentation

◆ Climate()

Climate::Climate ( )

Member Function Documentation

◆ annualPrecipitation()

double Climate::annualPrecipitation ( ) const
inline

annual precipitation sum (mm)

◆ begin()

const ClimateDay * Climate::begin ( ) const
inline

STL-like (pointer)-iterator to the first day of the current year.

◆ climateDataYear()

int Climate::climateDataYear ( ) const
inline

retrieve the year provided in the climate table

◆ day()

const ClimateDay * Climate::day ( const int  month,
const int  day 
) const

gets pointer to climate structure of given day (0-based indices, i.e. month=11=december!)

◆ daylength_h()

double Climate::daylength_h ( const int  doy) const
inline

length of the day in hours

◆ dayOfYear()

const ClimateDay * Climate::dayOfYear ( const int  dayofyear) const
inline

get pointer to climate structure by day of year (0-based-index)

◆ days()

double Climate::days ( const int  month) const

returns number of days of given month (0..11)

◆ daysOfYear()

int Climate::daysOfYear ( ) const

returns number of days of current year.

◆ end()

const ClimateDay * Climate::end ( ) const
inline

STL-like pointer iterator to the day after last day of the current year.

◆ isSetup()

bool Climate::isSetup ( ) const
inline

◆ meanAnnualTemperature()

double Climate::meanAnnualTemperature ( ) const
inline

the mean annual temperature of the current year (degree C)

◆ monthRange()

void Climate::monthRange ( const int  month,
const ClimateDay **  rBegin,
const ClimateDay **  rEnd 
) const

returns two pointer (arguments!!!) to the begin and one after end of the given month (month: 0..11)

◆ name()

const QString & Climate::name ( ) const
inline

table name of this climate

◆ nextYear()

void Climate::nextYear ( )

◆ phenology()

const Phenology & Climate::phenology ( const int  phenologyGroup) const

phenology class of given type

return the phenology of the group...

◆ phenologyGroupCount()

int Climate::phenologyGroupCount ( ) const
inline

◆ precipitationMonth()

const double * Climate::precipitationMonth ( ) const
inline

◆ setup()

void Climate::setup ( )

setup routine that opens database connection

◆ sun()

const Sun & Climate::sun ( ) const
inline

solar radiation class

◆ temperatureMonth()

const double * Climate::temperatureMonth ( ) const
inline

get a array with mean temperatures per month (deg C)

◆ toDate()

void Climate::toDate ( const int  yearday,
int *  rDay = 0,
int *  rMonth = 0,
int *  rYear = 0 
) const

decode "yearday" to the actual year, month, day if provided

◆ totalRadiation()

double Climate::totalRadiation ( ) const
inline

return radiation sum (MJ) of the whole year

◆ whichDayOfYear()

int Climate::whichDayOfYear ( const ClimateDay climate) const
inline

get the 0-based index of the climate given by 'climate' within the current year


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