2.0.0b10
catchment modelling framework
Loading...
Searching...
No Matches
cmf::atmosphere Namespace Reference

Contains classes to describe interactions with the atmosphere. More...

Detailed Description

Contains classes to describe interactions with the atmosphere.

Classes

class  aerodynamic_resistance
 Abstract class. Child classes can be used to calculate aerodynamic resistances against turbulent heat fluxes. More...
 
class  ConstantMeteorology
 A primitive implementation of the Meteorology interface. More...
 
class  ConstantRainSource
 A simple implementation of RainSource. More...
 
class  IDW_Meteorology
 Regionalizes meteorological measurements using a simple inverse distance weighted (IDW) method. More...
 
class  IDWRainfall
 A RainSource using a spatially interpolated rainfall intensity from all stations. More...
 
class  log_wind_profile
 , A logarithmic wind profile More...
 
class  Meteorology
 An abstract class, for objects generating Weather records at a specific time. More...
 
class  MeteoStation
 A meteorological station holding timeseries to create Weather records. More...
 
class  MeteoStationList
 A list of meteorological stations. More...
 
class  MeteoStationReference
 A reference to a meteorological station. More...
 
class  RainfallStation
 RainfallStation describes a rainfall timeseries in mm/day at a certain place. More...
 
class  RainfallStationList
 A list of rainfall stations. More...
 
class  RainfallStationReference
 References a single RainfallStation to provide rainfall intensity data. More...
 
class  RainSource
 An abstract class for different types of rainfall sources. More...
 
class  TimeseriesRainSource
 A rainsource with a timeseries. More...
 
struct  Weather
 

Functions

double extraterrestrial_radiation (cmf::math::Time t, double longitude=8, double latitude=51, double time_zone=1, bool daily=false)
 Calculates the global radiation in MJ/(m2 day) from the sun position and the sunshine fraction.
 
double global_radiation (double Ra, double height, double sunshine_fraction)
 Calculates the global radiation in MJ/(m2 day) from the sun position and the sunshine fraction.
 
double MJ_to_watts (double MJ)
 Transforms an energy flux from MJ/day to W.
 
double Pressure (double height)
 Returns the average air pressure for a height (m a.s.l.)
 
double rH_from_vpd (double T, double vpd)
 Returns the rel.
 
double vapour_pressure (double T)
 Returns the saturated vapor pressure in Pa for temperature T [degC].
 
double vpd_from_rH (double T, double rH)
 Returns the vapor pressure deficit in Pa for temperature T [degC] and rel.
 
double watts_to_MJ (double Watts)
 Transforms an energy flux from W to MJ/day.
 

Function Documentation

◆ extraterrestrial_radiation()

double extraterrestrial_radiation ( cmf::math::Time t,
double longitude = 8,
double latitude = 51,
double time_zone = 1,
bool daily = false )

Calculates the global radiation in MJ/(m2 day) from the sun position and the sunshine fraction.

Parameters
tactual time step
longitude,latitudeGeographical position in degree. Latitude is only taken into acount for subdaily calculation
time_zoneOffset by timezone from GMT, eg. central Europe=1 US west coast = -8
dailyIf true, the average radiation for the whole day is given (therefore latitude and time zone ignored), otherwise the average of the current hour is returned

The calculation of the global radiation follows http://www.fao.org/docrep/X0490E/x0490e07.htm#radiation.

The following formula is used:

  • \( \phi\) Latitude in \(rad\)
  • \( \delta = 0.409 \sin\left(\frac{2\pi}{365}DOY - 1.39\right)\) Declination, DOY is day of year
  • \( \omega_s = \arccos(-\tan\phi\tan\delta) \) Sunset angle
  • \( G_{sc} = 0.0802 \frac{MJ}{m^2min} \) Solar constant
  • \( d_r = 1+0.033 \cos\left(\frac{2\pi}{365}DOY\right) \) Inverse relative distance Earth-Sun
  • \( b = \frac{2\pi(DOY-81)}{364}\)
  • \( S_c = 0.1645\sin(2b)-0.1255\cos(b)-0.025\sin(b) \) Seasonal correction for solar time
  • \( \omega = \frac {\pi} {12} \left(t_h+\frac{(\mbox{geogr. Longitude})^\circ}{15^\circ}-\mbox{Timezone}+S_c-12\right) \) solar time in \(rad\)
  • If daily: \( R_a = \frac{24\ 60}{\pi}G_{sc}\ d_r \left(\omega_s \sin\phi \sin\delta + \cos\phi \cos\delta \sin\omega_s\right) \)
  • If sub daily: \( R_a = \frac{12\ 24\ 60}{\pi}G_{sc}\ d_r \left(\left(\omega^+ -\omega^-\right) \sin\phi \sin\delta + \cos\phi \cos\delta \left(\sin\omega^+ - \sin\omega^-\right)\right) \)
  • \( \omega^+,\omega^- = \omega \pm\frac{\pi}{24} \)

◆ global_radiation()

double global_radiation ( double Ra,
double height,
double sunshine_fraction )

Calculates the global radiation in MJ/(m2 day) from the sun position and the sunshine fraction.

Parameters
Raextra terrestrial radiation
heightHeight above sea level
sunshine_fractionFraction of sunshine hours per potential sunshine duration in h/h

The calculation of the global radiation follows http://www.fao.org/docrep/X0490E/x0490e07.htm#radiation.

The following formula is used:

  • \(R_a(t, \phi, \lambda)\) Extraterrestrial radiation (cmf::atmosphere::extraterrestrial_radiation) \(\frac{MJ}{m^2 day}\)
  • \(\frac n N\) Fractional sunshine duration
  • \(R_s = \left(0.25+\left(0.5+2\ 10^{-5}z\right)\frac{n}{N}\right)R_a \) Global radiation in \(\frac{MJ}{m^2 day}\)
  • \(z\): Height a.s.l. in m

◆ rH_from_vpd()

double rH_from_vpd ( double T,
double vpd )

Returns the rel.

humidity in % for temperature T [degC] and vapor pressure deficit vpd [Pa]

the rel. humidity is calculated from the vapor pressure deficit \(vpd = e_s - e_a\) as:

\[rH = 100 * \frac{e_a}{e_s(T)}, e_a = e_s(T) - vpd\]

The definition is from http://www.fao.org/docrep/X0490E/x0490e07.htm#concepts

Parameters
TAir temperature in degC
vpdVapor pressure deficit in Pa

\(e_s(T)\) is calculated using cmf::atmosphere::vapor_pressure(double)

◆ vapour_pressure()

double vapour_pressure ( double T)

Returns the saturated vapor pressure in Pa for temperature T [degC].

The saturated vapor pressure \(e_s\) is calculated follwing the following formula

\[e_s = 0.6108 \exp{\frac{17.27 T}{T+237.3}}\]

The definition is from http://www.fao.org/docrep/X0490E/x0490e07.htm#concepts

◆ vpd_from_rH()

double vpd_from_rH ( double T,
double rH )

Returns the vapor pressure deficit in Pa for temperature T [degC] and rel.

humidity rH [%]

The vapor pressure deficit \(e_s - e_a\) is calculated from rel. humidity as:

\[e_s - e_a = (1-rH/100) * e_s(T)\]

The definition is from http://www.fao.org/docrep/X0490E/x0490e07.htm#concepts

Parameters
TAir temperature in degC
rHRel. humidity in %

\(e_s(T)\) is calculated using cmf::atmosphere::vapor_pressure(double)