SNOWPACK  SNOWPACK-3.6.0
Snowpack Class Reference

#include <Snowpack.h>

Public Member Functions

 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 1d-snowpack model. The main program will probably be replaced in future – or, at least modified. For now, it is responsible for several tasks:

  1. In the next step the program enters the time-integration, or, time-stepping 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:
    1. 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
    2. 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 <<<<<<<
    3. 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 <<<<<<<
  2. 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.
  3. 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 <<<<<<<<
  4. 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 <<<<<
  5. 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<<<<<.
More...
 
void snowPreparation (const mio::Date &currentDate, SnowStation &Xdata) const
 Perform snow preparation (grooming, etc) on a given snowpack. More...
 
void setUseSoilLayers (const bool &value)
 

Static Public Attributes

static const double new_snow_albedo = 0.9
 
static const double min_ice_content = SnLaws::min_hn_density / Constants::density_ice
 Min volumetric ice content allowed. More...
 

Constructor & Destructor Documentation

◆ Snowpack()

Snowpack::Snowpack ( const SnowpackConfig i_cfg)

Member Function Documentation

◆ runSnowpackModel()

void Snowpack::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 1d-snowpack model. The main program will probably be replaced in future – or, at least modified. For now, it is responsible for several tasks:

  1. In the next step the program enters the time-integration, or, time-stepping 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:
    1. 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
    2. 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 <<<<<<<
    3. 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 <<<<<<<
  2. 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.
  3. 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 <<<<<<<<
  4. 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 <<<<<
  5. 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
MdataThe Meteorological forcing is now passed by copy so changes won't propagate to the caller
Xdata
cumu_precipVariable to store amount of precipitation (kg m-2)
Bdata
Sdata

◆ 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
currentDatethe current date, to determine if grooming should be performed
Xdatasnowpack to work on

Member Data Documentation

◆ min_ice_content

const double Snowpack::min_ice_content = SnLaws::min_hn_density / Constants::density_ice
static

Min volumetric ice content allowed.

◆ new_snow_albedo

const double Snowpack::new_snow_albedo = 0.9
static

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