#include <Snowpack.h>

enum  BoundaryCondition { NEUMANN_BC
, DIRICHLET_BC
} 
 Specifies what kind of boundary condition is to be implemented at the top surface. Either use surface fluxes (NEUMANN_BC) or use a prescribed surface temperature (DIRICHLET_BC) More...



 Snowpack (const SnowpackConfig &i_cfg) 

void  runSnowpackModel (CurrentMeteo &Mdata, SnowStation &Xdata, double &cumu_precip, BoundCond &Bdata, SurfaceFluxes &Sdata) 
 The near future (s. below) has arrived on Wednesday Feb. 6, when it was finally snowing in Davos and Sergey, Michael and Perry were working furiously on SNOWPACK again. Michael prepared the coupling of the model to the energy balance model of Olivia and his own snow drift model. He found it therefore necessary to move the time loop into the Main.c frame. He also cleaned the data structure handling, i.e. made sure that all variables are handed to the subroutines and that there is no longer a global referencing. In the meantime, Perry and Sergey prepared the introduction of a vapor transport equation. While Sergey was sad that his family had to go back, Perry was exchanging a lot of wet kisses with his new women probably causing some of his confusion about vapor and heat transport. Driving routine for the 1dsnowpack model. The main program will probably be replaced in future – or, at least modified. For now, it is responsible for several tasks: More...


void  snowPreparation (const mio::Date ¤tDate, SnowStation &Xdata) const 
 Perform snow preparation (grooming, etc) on a given snowpack. More...


void  setUseSoilLayers (const bool &value) 

double  getSnDt () const 

void  setSnDt (const double &snDt) 

double  getParameterizedAlbedo (const SnowStation &Xdata, const CurrentMeteo &Mdata) const 

double  getModelAlbedo (const SnowStation &Xdata, CurrentMeteo &Mdata) const 

◆ BoundaryCondition
Specifies what kind of boundary condition is to be implemented at the top surface. Either use surface fluxes (NEUMANN_BC) or use a prescribed surface temperature (DIRICHLET_BC)
Enumerator 

NEUMANN_BC  
DIRICHLET_BC  
◆ Snowpack()
◆ compTemperatureProfile()
Computes the snow temperatures which are given by the following formula:
.
 dT d^2T rho*c(T)*—  k(T)*— = Q dt dz^2
with initial and Dirichlet and/or Neumann boundary conditions.
T(z,t) = temperature (K); rho = snow density (kg m3); c = specific heat capacity (J K1 kg1); k = heat conductivity (W K1 m1); t = time (s);
Note: The equations are solved with a fully implicit timeintegration scheme and the system of finite element matrices are solved using a sparse matrix solver.
 Parameters

 Xdata  Snow profile data 
[in]  Mdata  Meteorological forcing 
 Bdata  Boundary conditions 
[in]  ThrowAtNoConvergence  If true, throw exception when temperature equation does not converge; if false, function will return false after non convergence and true otherwise. 
 Returns
 true when temperature equation converged, false if it did not.
◆ getModelAlbedo()
◆ getParameterizedAlbedo()
◆ getSnDt()
double Snowpack::getSnDt 
( 
 ) 
const 

inline 
◆ runSnowpackModel()
The near future (s. below) has arrived on Wednesday Feb. 6, when it was finally snowing in Davos and Sergey, Michael and Perry were working furiously on SNOWPACK again. Michael prepared the coupling of the model to the energy balance model of Olivia and his own snow drift model. He found it therefore necessary to move the time loop into the Main.c frame. He also cleaned the data structure handling, i.e. made sure that all variables are handed to the subroutines and that there is no longer a global referencing. In the meantime, Perry and Sergey prepared the introduction of a vapor transport equation. While Sergey was sad that his family had to go back, Perry was exchanging a lot of wet kisses with his new women probably causing some of his confusion about vapor and heat transport. Driving routine for the 1dsnowpack model. The main program will probably be replaced in future – or, at least modified. For now, it is responsible for several tasks:
 In the next step the program enters the timeintegration, or, timestepping loop. Moreover, we find the solution at TimeN = Time0 + sn_dt. For now, we will assume that sn_dt = 15min and Time0 = 0.0. These restrictions can be later relaxed. The program must then "check" three modules before finding the temperature distribution and creep deformations, these are:
 Determine the METEO parameters at time TimeN. (The METEO parameters include air temperature, relative humidity, short wave radiation, incoming longwave radiation, etc. as well as the ground temperature) >>>>>> METEO MODULE <<<<<<< Change: ML, 06.02.02: Mdata needs to be handed to the function
 Determine if a SNOWFALL event as occcured. (This implies that the dynamically allocated data structures must be reallocated and the new material defined. The mesh connectivies (sn_NewMesh=TRUE) must be rebuilt for the numerical solution and the energy exchanges at the top surface initialized.) >>>>>> SNOWFALL MODULE <<<<<<<
 Determine if SNOWDRIFT is occuring. Note that SNOWFALL distributes mass equally at ALL EXPOSITIONS. SNOWDRIFT can occur in conjunction WITH SNOWFALL or WITHOUT SNOWFALL. Mass is redistributed between the expositions. (Again, the internal data structures must be reinitialized.) >>>>>> SNOWDRIFT MODULE <<<<<<<
 The phase change module can generate water; this water is moved downwards by the WATER TRANSPORT module. At present, a simple, mass conserving scheme is employed to move the water; when the water content is greater than the residual water content then the excess water is moved to the next element. If the element reaches the bottom of the snowpack water is removed – this is called MELTWATER RUNOFF. Also, elements which do not contain any ice are removed from the finite element mesh.
 In the next step the TEMPERATURE distribution within the snowpack at each exposition is found. If SNOWFALL and SNOWDRIFT has occured then the finite element matrices must be rebuilt. >>>>> TEMPERATURE MODULE <<<<<<<<
 If the computed temperatures are above zero degrees then PHASECHANGES are occuring. This means that the volumetric contents of the elements must be updated. >>>>>> PHASE CHANGE MODULE <<<<<
 In the next step the CREEPING deformations and 1d state of stress within the snowpack at each exposition are found. If SNOWFALL and SNOWDRIFT has occured then the finite element matrices (connectivities) must be rebuilt. >>>>CREEP MODULE<<<<<
 Parameters

Mdata  The Meteorological forcing is now passed by copy so changes won't propagate to the caller 
Xdata  
cumu_precip  Variable to store amount of precipitation (kg m2) 
Bdata  
Sdata  
◆ setSnDt()
void Snowpack::setSnDt 
( 
const double & 
snDt  ) 


inline 
◆ setUseSoilLayers()
void Snowpack::setUseSoilLayers 
( 
const bool & 
value  ) 

◆ snowPreparation()
void Snowpack::snowPreparation 
( 
const mio::Date & 
currentDate, 


SnowStation & 
Xdata 

) 
 const 
Perform snow preparation (grooming, etc) on a given snowpack.
 Parameters

currentDate  the current date, to determine if grooming should be performed 
Xdata  snowpack to work on 
◆ min_ice_content
Min volumetric ice content allowed.
◆ surfaceCode
The documentation for this class was generated from the following files: