2.0.0b10
catchment modelling framework
Loading...
Searching...
No Matches
Weather Struct Reference

Detailed Description

A structure holding meteorological information, excluding precipitation

Public Member Functions

 Weather (double T=15.0, double Tmax=17.0, double Tmin=13.0, double rH=70.0, double wind=2.0, double sunshine=0.5, double Rs=15, double Ra=30, double daylength=12)
 Creates a "weather" from given data.
 
Weather operator* (double factor)
 Multiply.
 
Weatheroperator*= (double factor)
 inplace multiplication
 
Weather operator+ (const Weather &w)
 add operator
 
Weatheroperator+= (const Weather &w)
 inplace add
 
double Rn (double albedo, bool daily=false) const
 Calculates the net radiation flux \(R_n \left[\frac{MJ}{m^2 day}\right]\).
 
std::string to_string () const
 Returns a string representation.
 

Static Public Member Functions

static double get_snow_threshold ()
 Returns the actual snow threshold value in degC.
 
static void set_snow_threshold (double new_threshold)
 Sets the snow threshold globally for cmf.
 

Public Attributes

double e_a
 Actual vapor pressure \(e_a\ [kPa]\).
 
double e_s
 Saturated vapor pressure in \(e_s [kPa]\).
 
double instrument_height
 length of the day in h
 
double Ra
 Extra terrestrial radiation \(R_s \left[\frac{MJ}{m^2 day}\right]\).
 
double Rs
 Global Radiation in \(R_s \left[\frac{MJ}{m^2 day}\right]\).
 
double sunshine
 Fractional sunshine duration (per potential sunshine duration) \(\frac n N\ [-]\).
 
double T
 actual Temperature \(T \left[^\circ C\right]\)
 
double Tground
 actual Temperature of the ground
 
double Tmax
 Maximum daily Temperature \(T_{max} \left[^\circ C\right]\).
 
double Tmin
 daily minimum Temperature \(T_{min} \left[^\circ C\right]\)
 
double Windspeed
 Windspeed \(u \left[\frac{m}{s}\right] \).
 

Constructor & Destructor Documentation

◆ Weather()

Weather ( double T = 15.0,
double Tmax = 17.0,
double Tmin = 13.0,
double rH = 70.0,
double wind = 2.0,
double sunshine = 0.5,
double Rs = 15,
double Ra = 30,
double daylength = 12 )

Creates a "weather" from given data.

Parameters
Tactual Temperature in deg C
Tmaxdaily maximum Temperature in deg C
Tmindaily minimum Temperature in deg C
rHactual relative humidity in % [0..100]
windactual wind speed in m/s
sunshineactual fraction of sunshine duration per potential sunshine duration in h/h
Rsactual incoming shortwave global radiation in MJ/(m2 day)
Raactual extraterrestrial shortwave global radiation in MJ/(m2 day)
daylengthlength of the day in h

Member Function Documentation

◆ Rn()

double Rn ( double albedo,
bool daily = false ) const

Calculates the net radiation flux \(R_n \left[\frac{MJ}{m^2 day}\right]\).

\begin{eqnarray*} R_{n} = R_{ns} - R_{nl} \\ \mbox{ Net short wave radiation: }R_{ns} = (1-\alpha) R_s \\ \mbox{ Net long wave radiation: }R_{nl} = R_{black}\ \beta_{v}\ \beta_{c} \\ \mbox{Black body radiation: } R_{black} = \left\{\begin{array}{cl} \sigma T^4 & \mbox{for less than daily time steps} \\ \sigma \frac {T_{max}^4 + T_{min}^4} 2 & \mbox{for daily time steps} \end{array} \right. \\ T = \mbox{Temperature }[K] \\ \sigma = 4.903\ 10^{-9} \frac{MJ}{K^4 m^2 day} \mbox{ Stefan-Boltzmann constant } \\ \mbox{Long wave reflectance: } \\ \mbox{by water vapor: }\beta_{v} = 0.34 - 0.14 \sqrt{e_a} \\ \mbox{ by clouds: }\beta_{c} = 0.1 + 0.9 \frac n N \end{eqnarray*}

Parameters
albedothe albedo \(\alpha\) of the surface
dailyIf true, the net radiation for daily averages will be calculated

Member Data Documentation

◆ instrument_height

double instrument_height

length of the day in h

Height of the measuring instuments above the vegetation