This class contains the phase change routines for the 1d snowpack model It also updates the volumetric contents of each element.
#include <PhaseChange.h>
Public Member Functions | |
PhaseChange (const SnowpackConfig &i_cfg) | |
void | reset () |
void | initialize (SnowStation &Xdata) |
void | finalize (const SurfaceFluxes &Sdata, SnowStation &Xdata, const mio::Date &date_in) |
double | compPhaseChange (SnowStation &Xdata, const mio::Date &date_in, const bool &verbose=true) |
Driving routine for subsurface melting and refreezing as well as surface melting. The basic equation in both subsurface processes is: d_th(i) = A * dt with th(i) volumetric ice content (1), c_p(T) specific heat capacity of ice (J kg-1 K-1), Q_f the freezing / melting energy (J kg-1), T the absolute temperature (K), and the coefficient: A = c_p(T) * th(i) * Q_f ql_Rest is the Energy that is transferred from the upper element to the lower one (J m-2) in case of complete melting of the former. More... | |
Static Public Attributes | |
static const double | RE_theta_r = 1E-5/10. |
Residual Water Content for snow, when using water transport model "RICHARDSEQUATION". More... | |
static const double | RE_theta_threshold = 1E-5 |
Threshold Water Content for snow, when using water transport model "RICHARDSEQUATION", to determine what is dry and wet snow. More... | |
static const double | theta_r = 0.0 |
Residual Water Content for snow and soil, when using water transport model "BUCKET" or "NIED". More... | |
PhaseChange::PhaseChange | ( | const SnowpackConfig & | i_cfg | ) |
double PhaseChange::compPhaseChange | ( | SnowStation & | Xdata, |
const mio::Date & | date_in, | ||
const bool & | verbose = true |
||
) |
Driving routine for subsurface melting and refreezing as well as surface melting. The basic equation in both subsurface processes is:
d_th(i) = A * dt
with th(i) volumetric ice content (1), c_p(T) specific heat capacity of ice (J kg-1 K-1), Q_f the freezing / melting energy (J kg-1), T the absolute temperature (K), and the coefficient:
A = c_p(T) * th(i) * Q_f
ql_Rest is the Energy that is transferred from the upper element to the lower one (J m-2) in case of complete melting of the former.
Xdata | |
date_in | is the current date |
verbose | print detailed warnings for various situations? (default=true) |
void PhaseChange::finalize | ( | const SurfaceFluxes & | Sdata, |
SnowStation & | Xdata, | ||
const mio::Date & | date_in | ||
) |
void PhaseChange::initialize | ( | SnowStation & | Xdata | ) |
void PhaseChange::reset | ( | ) |
|
static |
Residual Water Content for snow, when using water transport model "RICHARDSEQUATION".
|
static |
Threshold Water Content for snow, when using water transport model "RICHARDSEQUATION", to determine what is dry and wet snow.
|
static |
Residual Water Content for snow and soil, when using water transport model "BUCKET" or "NIED".