#include <Laws_sn.h>
Public Types  
enum  EventType { event_none , event_wind } 
Types of events for computing new snow density. More...  
enum  TempDependence { t_term_arrhenius_critical =11 , t_term_arrhenius =911 , t_term_837 =977 , t_term_stk =999 } 
Defines temperature dependence of snow viscosity. More...  
enum  ViscosityVersion { visc_dflt =111 , visc_cal =333 , visc_ant =335 , visc_897 =555 , visc_837 =977 , visc_stk =999 } 
Defines which snow viscosity version to use. More...  
Static Public Member Functions  
static double  conductivity_air (void)  
THERMAL CONDUCTIVITY OF ICE  
Based on master thesis of Tobias Hipp, who used relationships by Ling & Zhang (2004).
 
static double  conductivity_ice (const double &Temperature)  
THERMAL CONDUCTIVITY OF WATER  
Based on master thesis of Tobias Hipp, who used relationships by Ling & Zhang (2004).
 
static double  conductivity_water (const double &Temperature)  
Snow albedo  
Computes the density of new snow. The options for SNOW_ALBEDO are:
 
static double  compWindPumpingDisplacement (const SnowStation &Xdata)  
Computes the displacement depth in case of ventilation. More...  
static double  compWindPumpingVelocity (const CurrentMeteo &Mdata, const double &d_pump)  
Computes the wind pumping velocity at the surface. More...  
static double  compWindGradientSnow (const ElementData &Edata, double &v_pump)  
Computes the wind gradient near the snowcover surface. More...  
static double  compSensibleHeatCoefficient (const CurrentMeteo &Mdata, const SnowStation &Xdata, const double &height_of_meteo_values)  
SENSIBLE HEAT EXCHANGE COEFFICIENT (Surface Energy Exchange) More...  
static double  compLatentHeat_Rh (const std::string soil_evaporation, const CurrentMeteo &Mdata, SnowStation &Xdata, const double &height_of_meteo_values)  
Latent heat flux including consideration of soil (one active element) This method uses the Relative Humidity approach: ql = beta*(eA  eS) Latent heat transfer. eA and eS are the vapor pressures of air and snow, respectively. More...  
static double  compLatentHeat (const std::string soil_evaporation, const CurrentMeteo &Mdata, SnowStation &Xdata, const double &height_of_meteo_values)  
LATENT HEAT EXCHANGE (Surface Energy Exchange) David Gustafsson (david.nosp@m.g@kt.nosp@m.h.se) has introduced a resistance approach for latent heat exchange from bare soil as alternative to the relative hyumidity (RH) approach implemented in Snowpack.c (line 473): An additional resistance, dependent on the relative saturation of the top soil layer, is used to reduce the heat exchange coefficient in the case of evaporation: c = 1/(Ra + Rsoil), where Ra = 1/c as computed above, and Rsoil = 50 [s/m] * field_capacity_soil / theta_soil. A key SNOWPACK_ADVANCED::soil_evaporation is defined to select method. The resistance formulation originates from van den Hurk et al.(2000) "Offline validation of the ERA40 surface scheme": ECMWF Tech.Memo 295. A difference from the RH method is that the surface vapour pressure is always assumed to be at saturation at the surface. Thus, some unrealistic effects of the RH method in present form are avoided > the RH approach tend to estimate negative vapour gradient between the surface and the atmosphere, causing large condensation, even if the top soil layer is saturated, and even if the soil surface is warmer than the atmosphere! If a RH method should work in a discretized model, it is important to consider the difference between vapour pressure at the surface and the average of the top soil layer. The soil resistance is only used for bare soil layers, when TSS >= 0C and eSurf >= eAtm. More...  
static double  compSoilThermalConductivity (const ElementData &Edata, const double &dvdz, const std::string &soil_thermal_conductivity)  
Heat conduction in soil. The formulation is based on curve fitting, the frozen soil data from Kersten in "Geotechnical Engeneering for Cold Regions" article by Harlan and Nixon, the water influence deduced from deVries and Afgan in "Heat and Mass Transfer in the Biosphere". More...  
static double  soilVaporDiffusivity (const ElementData &Edata)  
Water vapor diffusion coefficient in soil. The formulation is based on Saito et al., 2006 "Numerical analysis of coupled water vapor
and heat transport in the vadose zone", see eq. [14] and [15]. It is defined as the product of the tortuosity factor () as defined by Millington and Quirck (1961), the airfilled porosity (m3 m3) and the diffusivity of water vapor in air (m2 s1). More...  
static double  compEnhanceWaterVaporTransportSoil (const ElementData &Edata, const double &clay_fraction)  
Computes the enhancement factor for water vapor transport in soil. Derived from Cass et al., 1984 "Enhancement of thermal water vapor diffusion in soil", see eq. [19]. Describe the increase in thermal vapor flux as a result of liquid islands and increased temperature gradients in the air phase. More...  
static double  compSoilThermalVaporConductivity (const ElementData &Edata_bot, const ElementData &Edata_top, const double &Te_bot, const double &Te_top, const double &clay_fraction)  
Computes the soil THERMAL vapor hydraulic conductivity. Requires the use of RE to determine pressure head (Edata.h) and saturated water content (theta_s). The THERMAL vapor hydraulic conductivy formulation is based on Saito et al., 2006 "Numerical analysis of coupled water, vapor, and heat transport in the vadose zone", see eq. [13]. It is used to determine the flux density of water vapor in soil due to THERMAL gradient: q_vT = Kvapor_T*gradT. The enhancement factor is used to describe the increase in the thermal vapor flux as a result of liquid islands and increased temperature gradients in the air phase (Philip and de Vries, 1957) The relative humidity is calculated from the pressure head (h), using a thermodynamic relationship between liquid water and water vapour in soil pores (Philip and de Vries, 1957) More...  
static double  compSoilIsothermalVaporConductivity (const ElementData &Edata_bot, const ElementData &Edata_top, const double &Te_bot, const double &Te_top, const double &T_node)  
Computes the soil ISOTHERMAL vapor hydraulic conductivity. The ISOTHERMAL vapor hydraulic conductivy formulation is based on Saito et al., 2006 "Numerical analysis of coupled water, vapor, and heat transport in the vadose zone", see eq. [12]. It is used to determine the flux density of water vapor in soil due to MOISTURE gradient: q_vh = Kvapor_h*gradH. More...  
static double  compSnowThermalConductivity (const ElementData &Edata, const double &dvdz, const bool &show_warnings=true)  
Heat conduction in snow Actual version: k = C1*[C2 + C3 + C4 + C5] Adams/Sato model. The following piece of code was programmed by Perry on a warm June afternoon in Birmensdorf. H.U. Gubler was viciously attacking Ammann, saying nasty things about our beloved chef, (even if his hair is a bit funny), in the DAVOSER ZEITUNG. Perry was dreaming about San Diego and .... and Michael was dreamy about rock climbing in Italy with funky, spunky Italian girls, Borolo Bob was busy with his wife on his way to Mallorca – to watch sexy TOPLESS bikinislip clad GERMAN secretaries on the BEACH. As usual, if this code does not work it is his FAULT .... (Hey, Bob, when are we going to meet ED ADAMS? And remember PLEDGE 7 of Metamorphism.c. The theory behind this piece of code can be found in Bob's ROUGH DRAFT on MICROSTRUCTURE. More...  
static double  compEnhanceWaterVaporTransportSnow (const SnowStation &Xdata, const size_t &i_e)  
Computes the enhancement factor for water vapor transport in wet snow. More...  
static double  compLWRadCoefficient (const double &t_snow, const double &t_atm, const double &e_atm)  
LONGWAVE RADIATION COEFFICIENT This routine might look a bit unusual: Radiation is treated as a CONVECTIVE boundary condition, similar to the sensible and latent heat exchanges. The exchange coefficient, however, is not a constant, dependent on say the wind velocity, rather it is dependent on the temperature. This routine computes the "pseudo" convective heat exchange coefficient for radiation. More...  
static double  parameterizedSnowAlbedo (const std::string &i_albedo, const std::string &i_albedo_parameterization, const std::string &i_albAverageSchmucki, const double &i_albNIED_av, const double &i_hn_albedo_fixedValue, const ElementData &Edata, const double &Tss, const CurrentMeteo &Mdata, const bool &ageAlbedo=true)  
static void  compShortWaveAbsorption (const std::string &i_sw_absorption_scheme, SnowStation &Xdata, const double &I0)  
Helen LeVesconte's Solution to short wave absorption by the snowpack NOTE on fudge_bohren (fb): Larger values increase extinction > Energy stays on top. More...  
static void  compAdvectiveHeat (SnowStation &Xdata, const double &advective_heat, const double &depth_begin, const double &depth_end)  
Advective Heat Flux injection (mimicking heat advection by infiltrating water?) More...  
static double  newSnowDensityPara (const std::string &i_hn_model, double TA, double TSS, double RH, double VW, double HH)  
Parameterized newsnow density. More...  
static double  newSnowDensityEvent (const std::string &variant, const SnLaws::EventType &i_event, const CurrentMeteo &Mdata)  
Event driven newsnow density. More...  
static double  newSnowDensityHendrikx (const double ta, const double tss, const double rh, const double vw)  
Jordy Hendrikx' new snow density parameterization for strong winds (> 2.9 m s1) More...  
New snow density  
Computes the density of new snow. The options for HN_DENSITY are:
 
static double  compNewSnowDensity (const std::string &i_hn_density, const std::string &i_hn_density_parameterization, const double &i_hn_density_fixedValue, const CurrentMeteo &Mdata, const SnowStation &Xdata, const double &tss, const std::string &variant)  
static double  NewSnowViscosityLehning (const ElementData &Edata)  
NEW SNOW VISCOSITY (dendritic snow, i.e., dd > 0.) Actual version : ml_lw_VS_Lehning from r7.7 This is Michael's viscosity routine, which is not a function of microstructure, but which is nonetheless pretty important because it is numerically STABLE and does predict decent settling rates, sometimes a bit too high. This routine was (is) used for NEW or WET snow. More...  
static double  snowViscosityTemperatureTerm (const double &Te)  
Computes the temperature term of viscosity The modifications for POLAR variant are described in: Steger CR, Reijmer CH, van den Broeke MR, Wever N, Forster RR, Koenig LS, Kuipers Munneke P, Lehning M, Lhermitte S, Ligtenberg SRM, Miège C and Noël BPY (2017) Firn Meltwater Retention on the Greenland Ice Sheet: A Model Comparison. Front. Earth Sci. 5:3. doi: 10.3389/feart.2017.00003: "To improve the agreement with observations, the tunable factors in the snow
viscosity scheme (Groot Zwaaftink et al., 2013) for the activation energy of snow Qs and the critical exponent
β are set to 16,080 J mol−1 and 0.3, respectively.". More...  
static double  compLoadingRateStress (const std::string &variant, ElementData &Edata, const mio::Date &date)  
Computes the additional stress due to loading rate. More...  
static double  loadingRateStressDEFAULT (ElementData &Edata, const mio::Date &date)  
static double  loadingRateStressCALIBRATION (ElementData &Edata, const mio::Date &date)  
static double  snowViscosityFudgeDEFAULT (const ElementData &Edata)  
Determines the fudge factor for viscosity This fudge factor takes into account bondice imperfections and the effect of liquid water. More...  
static double  snowViscosityFudgeCALIBRATION (const ElementData &Edata, const mio::Date &date)  
To calibrate the fudge factor for viscosity. More...  
Static Public Attributes  
static const double  field_capacity_soil = 0.15 
Field capacity of the soil (1). Above this levels, water begins to drain. More...  
static const bool  wind_pump = true 
Switch on or off wind pumping in snow. More...  
static const bool  wind_pump_soil = true 
Switch on or off wind pumping in soil. More...  
static double  sn_dt 
static std::string  current_variant = "DEFAULT" 
static size_t  swa_nBands = 5 
Snow extinction coefficients for absorbtion of SW radiation (swa) More...  
static std::vector< double >  swa_k 
mean extinction coefficient for pure ice per band More...  
static std::vector< double >  swa_pc 
fraction of sun power spectrum per band More...  
static std::vector< double >  swa_fb 
fudge_bohren More...  
static const double  rsoilmin = 50.0 
Minimum soil surface resistance, 50 sm1 (van den Hurk et al, 2000) More...  
static const double  relsatmin = 0.05 
Minimum relative saturation of top soil layer. More...  
static const double  alpha_por_tor_soil = 0.05 
Ratio of porosity to tortuosity for Soil. More...  
static const double  pore_length_soil = 0.01 
Pore length for surface soil for ventilation (m) More...  
WIND PUMPING  
 
static const double  smallest_viscosity = 1.0e6 
Defines the smallest allowable viscosity (Pa s) that a viscosity law will return Value is DAMM SMALL – smaller values than this are pretty unrealistic. More...  
static const bool  jordy_new_snow = false 
To use J. Hendrikx's parameterization for wind speeds > 2.9 m s1. More...  
static const double  wind_ext_coef = 0.1 
Used to decribe advective flux attenuation. More...  
static const double  displacement_coef = 0.7 
Integral of snow density corresponding to the maximal displacement depth d_pump (m) More...  
static const double  alpha_por_tor = 0.07 
Ratio of porosity to tortuosity. More...  
THERMAL CONDUCTIVITY  
Defines the constants and parameters for computing snow and soil thermal conductivity  
static const double  montana_c_fudge = 0.13 
Factor controlling ice to ice conduction. More...  
static const double  montana_vapor_fudge = 2.5 
Factor controlling increase in water vapor transport and thus energy transport in wet snow. More...  
static const double  montana_v_water_fudge = 20. 
Defines the formerly used MONTANA fudge factor for old wet snow settling (up to snowpack_r8.0). More...  
Event driven density of new snow  
 
static double  min_hn_density = 30. 
static double  max_hn_density = 250.0 
static double  event_wind_lowlim = 0.0 
static double  event_wind_highlim = 0.0 
static EventType  event = SnLaws::event_none 
static const bool  __init = SnLaws::setStaticData("DEFAULT", "BUCKET") 
static bool  setStaticData (const std::string &variant, const std::string &watertransportmodel) 
This function is used to give default values to a bunch of static members of SnLaws it is called when the helper variable __init is initialized (compiletime) and everytime the user changes the variant and invokes either compAlbedo(..) or compSnowViscosity(...) More...  
SNOW VISCOSITY  
Computes snow viscosity according to the following options:
 
static TempDependence  t_term = SnLaws::t_term_arrhenius_critical  
static ViscosityVersion  visc = SnLaws::visc_cal  
static double  visc_ice_fudge = 1.  
static double  visc_sp_fudge = 1.  
static double  visc_water_fudge = 0.  
static bool  setfix = false  
static double  SnowViscosityMSU (const ElementData &Edata)  
MONTANA snow viscosity (nondendritic snow, i.e. if dd=0.); From bb_lw_VS_Montana() (Laws.c r7.7). Bob Brown's MICROSTRUCTURE law. Clearly the BEST law we have right now but also the most UNSTABLE: note that the viscosity is not only a function of the grain dimensions, but also a function of the overburden stress. A series of equations that collectively give the viscosity Vis = S/eDot. The microstructure parameters rb and rg are obtained through Edata pointer and are in mm. The secondary microstructure parameters L and rc are also calculated in mm. This means that the dimensions of rg, rb, L, & rc are in mm since they show up in the following equations as ratios to give dimensionless numbers. NOTE: The theory is NOT valid for NEW SNOW or WET SNOW. However, we try it for wet snow, since it makes sense for wet snow and is related to the wet snow bond growth (Pressure Sintering) If the snow is new, however, then use LEHNING's law, or any other law ... No, do not use any other law, they don't work. More...  
static double  compSnowViscosity (const std::string &variant, const std::string &i_viscosity_model, const std::string &i_watertransport_model, ElementData &Edata, const mio::Date &date)  
static double  snowViscosityDEFAULT (ElementData &Edata)  
SNOW VISCOSITY (all types of snow) More...  
static double  snowViscosityKOJIMA (const ElementData &Edata)  
SNOW VISCOSITY according to formulation by Kojima. More...  
static double  snowViscosityCALIBRATION (ElementData &Edata, const mio::Date &date)  
Calibrate snow viscosity NOTE This is the test or playground version for calibrating settling. More...  
static double  AirEmissivity (mio::MeteoData &md, const std::string &variant)  
Compute the air emissivity It relies on mio::ILWR_parametrized to get a parametrized ILWR if no measured ILWR is available. This in turn relies either on Brutsaert (clear sky) or Omstedt (cloudiness) or Crawford(cloudiness from ISWR). The air temperature and relative humidity should be available for meanigful results. In any case, the returned air emissivity will be between min_air_emissivity and 1, min_air_emissivity depending on the variant. More...  
static double  AirEmissivity (const double &ilwr, const double &ta, const std::string &variant, const bool &max_limit=true)  
Compute the air emissivity In any case, the returned air emissivity will be between min_air_emissivity and 1, min_air_emissivity depending on the variant. It returns min_air_emissivity if ta==nodata or ilwr==nodata. More...  
static double  ArrheniusLaw (const double ActEnergy, const double T, const double T_ref)  
Computes an Arrheniustype temperature dependency. More...  
enum SnLaws::EventType 
Defines temperature dependence of snow viscosity.
Defines which snow viscosity version to use.

static 
Compute the air emissivity In any case, the returned air emissivity will be between min_air_emissivity and 1, min_air_emissivity depending on the variant. It returns min_air_emissivity if ta==nodata or ilwr==nodata.
ilwr  incoming long wave radiation (W/m^2) 
ta  air temperature (K) 
variant  variant to use for the minimum allowed air emissivity 

static 
Compute the air emissivity It relies on mio::ILWR_parametrized to get a parametrized ILWR if no measured ILWR is available. This in turn relies either on Brutsaert (clear sky) or Omstedt (cloudiness) or Crawford(cloudiness from ISWR). The air temperature and relative humidity should be available for meanigful results. In any case, the returned air emissivity will be between min_air_emissivity and 1, min_air_emissivity depending on the variant.
md  meteorological conditions 
variant  variant to use for the minimum allowed air emissivity 

static 
Computes an Arrheniustype temperature dependency.
ActEnergy  (J mol1) 
T  snow temperature (K) 
T_ref  a reference temperature (K) 

static 
Advective Heat Flux injection (mimicking heat advection by infiltrating water?)
Xdata  The advective heat flux will be added to Xdata.sw_abs 
advective_heat  heat flux (positive or negative) to add (W m3) //NO_HACK: input as W/m2 seems more logical but wrong! It is a source term! 
depth_begin  depth where to begin injecting the heat flux (in m from the soil surface) 
depth_end  depth where to stop injecting the heat flux (in m from the soil surface) 

static 
Computes the enhancement factor for water vapor transport in wet snow.
Xdata  
i_e  Element index to start from 

static 
Computes the enhancement factor for water vapor transport in soil. Derived from Cass et al., 1984 "Enhancement of thermal water vapor diffusion in soil", see eq. [19]. Describe the increase in thermal vapor flux as a result of liquid islands and increased temperature gradients in the air phase.
Edata  element data 
clay_fraction  fraction of clay in the soil 

static 
LATENT HEAT EXCHANGE (Surface Energy Exchange) David Gustafsson (david.nosp@m.g@kt.nosp@m.h.se) has introduced a resistance approach for latent heat exchange from bare soil as alternative to the relative hyumidity (RH) approach implemented in Snowpack.c (line 473):
An additional resistance, dependent on the relative saturation of the top soil layer, is used to reduce the heat exchange coefficient in the case of evaporation: c = 1/(Ra + Rsoil), where Ra = 1/c as computed above, and Rsoil = 50 [s/m] * field_capacity_soil / theta_soil.
A key SNOWPACK_ADVANCED::soil_evaporation is defined to select method. The resistance formulation originates from van den Hurk et al.(2000) "Offline validation
of the ERA40 surface scheme": ECMWF Tech.Memo 295.
A difference from the RH method is that the surface vapour pressure is always assumed to be at saturation at the surface. Thus, some unrealistic effects of the RH method in present form are avoided > the RH approach tend to estimate negative vapour gradient between the surface and the atmosphere, causing large condensation, even if the top soil layer is saturated, and even if the soil surface is warmer than the atmosphere! If a RH method should work in a discretized model, it is important to consider the difference between vapour pressure at the surface and the average of the top soil layer.
The soil resistance is only used for bare soil layers, when TSS >= 0C and eSurf >= eAtm.
[in]  soil_evaporation  The evaporation method to be used 
[in]  Mdata  
[in]  Xdata  
[in]  height_of_meteo_values  Height at which meteo parameters are measured 

static 
Latent heat flux including consideration of soil (one active element) This method uses the Relative Humidity approach: ql = beta*(eA  eS) Latent heat transfer. eA and eS are the vapor pressures of air and snow, respectively.
soil_evaporation  The evaporation method to be used 
Mdata  
Xdata  
height_of_meteo_values  Height at which meteo parameters are measured 

static 
Computes the additional stress due to loading rate.
i_viscosity_model  see compSnowViscosity() 
Edata  
date  current 

static 
LONGWAVE RADIATION COEFFICIENT This routine might look a bit unusual: Radiation is treated as a CONVECTIVE boundary condition, similar to the sensible and latent heat exchanges. The exchange coefficient, however, is not a constant, dependent on say the wind velocity, rather it is dependent on the temperature. This routine computes the "pseudo" convective heat exchange coefficient for radiation.
t_snow  Snow surface temperature (K) 
t_atm  Temperature of the atmosphere, i.e., air (K) 
e_atm  Emissivity of the atmosphere (1) 

static 

static 
SENSIBLE HEAT EXCHANGE COEFFICIENT (Surface Energy Exchange)
Mdata  
Xdata  
height_of_meteo_values  Height at which meteo parameters are measured 

static 
Helen LeVesconte's Solution to short wave absorption by the snowpack NOTE on fudge_bohren (fb): Larger values increase extinction > Energy stays on top.
i_sw_absorption_scheme  use multi band or single band approach 
Xdata  
I0  net shortwave radiation (W m2) 

static 
Heat conduction in snow Actual version: k = C1*[C2 + C3 + C4 + C5]
Adams/Sato model. The following piece of code was programmed by Perry on a warm June afternoon in Birmensdorf. H.U. Gubler was viciously attacking Ammann, saying nasty things about our beloved chef, (even if his hair is a bit funny), in the DAVOSER ZEITUNG. Perry was dreaming about San Diego and .... and Michael was dreamy about rock climbing in Italy with funky, spunky Italian girls, Borolo Bob was busy with his wife on his way to Mallorca – to watch sexy TOPLESS bikinislip clad GERMAN secretaries on the BEACH. As usual, if this code does not work it is his FAULT .... (Hey, Bob, when are we going to meet ED ADAMS? And remember PLEDGE 7 of Metamorphism.c. The theory behind this piece of code can be found in Bob's ROUGH DRAFT on MICROSTRUCTURE.
Much much later, Michael reprogrammed this code and introduced the effect of liquid water. He extended the Adams/Sato model and hoped that he would not loose contact with Keegan, even he was not going to fulfill the explicit wishes of his Grandma. The model was now being used from Finland to the US. We will also conquer the southern hemis sphere.
Edata  
dvdz  Wind velocity gradient (s1) 
show_warnings  If warnings are produced, show them (default=true) 

static 

static 
Computes the soil ISOTHERMAL vapor hydraulic conductivity. The ISOTHERMAL vapor hydraulic conductivy formulation is based on Saito et al., 2006 "Numerical analysis of coupled water, vapor, and heat transport in the vadose zone", see eq. [12]. It is used to determine the flux density of water vapor in soil due to MOISTURE gradient: q_vh = Kvapor_h*gradH.
Edata_bot  element data 
Edata_top  element data 
Te_bot  lower element temperature (K) 
Te_top  upper element temperature (K) 
T_node  nodal temperature (K) 

static 
Heat conduction in soil. The formulation is based on curve fitting, the frozen soil data from Kersten in "Geotechnical Engeneering for Cold Regions" article by Harlan and Nixon, the water influence deduced from deVries and Afgan in "Heat and Mass Transfer in the Biosphere".
[in]  Edata  
[in]  dvdz  Wind velocity gradient (s1) 
[in]  soil_thermal_conductivity  Thermal conductivity model to use (either "FITTED", "COSENZA2003", or "RAW") 

static 
Computes the soil THERMAL vapor hydraulic conductivity. Requires the use of RE to determine pressure head (Edata.h) and saturated water content (theta_s). The THERMAL vapor hydraulic conductivy formulation is based on Saito et al., 2006 "Numerical analysis of coupled water, vapor, and heat transport in the vadose zone", see eq. [13]. It is used to determine the flux density of water vapor in soil due to THERMAL gradient: q_vT = Kvapor_T*gradT. The enhancement factor is used to describe the increase in the thermal vapor flux as a result of liquid islands and increased temperature gradients in the air phase (Philip and de Vries, 1957) The relative humidity is calculated from the pressure head (h), using a thermodynamic relationship between liquid water and water vapour in soil pores (Philip and de Vries, 1957)
Edata_bot  element data 
Edata_top  element data 
Te_bot  lower element temperature (K) 
Te_top  upper element temperature (K) 
clay_fraction  fraction of clay in the soil 

static 
Computes the wind gradient near the snowcover surface.
Edata  
v_pump  Wind velocity at element depth (m s1) 

static 
Computes the displacement depth in case of ventilation.
Xdata 

static 
Computes the wind pumping velocity at the surface.
Mdata  
d_pump  Displacement depth (m) 

static 

static 

static 

static 

static 

static 
Event driven newsnow density.
variant  Snowpack variant (such as DEFAULT, POLAR...) 
i_event   event_wind: rho = 250.3 kg m3 @ 4 m s1; rho = 338 kg m3 @ 7 m s1 Antarctica 
Mdata  Meteorological input 

static 
Jordy Hendrikx' new snow density parameterization for strong winds (> 2.9 m s1)
ta  Air temperature (degC) 
tss  Snow surface temperature (degC) 
rh  Relative air humidity (%) 
vw  Mean wind velocity (m s1) 

static 
Parameterized newsnow density.
TA  Air temperature (K) 
TSS  Snow surface temperature (K) 
RH  Relative air humidity (1) 
VW  Mean wind velocity (m s1) 
HH  Altitude a.s.l. (m) 
i_hn_model  Parameterization to be used 

static 
NEW SNOW VISCOSITY (dendritic snow, i.e., dd > 0.)
Actual version : ml_lw_VS_Lehning from r7.7
This is Michael's viscosity routine, which is not a function of microstructure, but which is nonetheless pretty important because it is numerically STABLE and does predict decent settling rates, sometimes a bit too high. This routine was (is) used for NEW or WET snow.

static 

static 
This function is used to give default values to a bunch of static members of SnLaws it is called when the helper variable __init is initialized (compiletime) and everytime the user changes the variant and invokes either compAlbedo(..) or compSnowViscosity(...)

static 
Calibrate snow viscosity NOTE This is the test or playground version for calibrating settling.
Edata  
date  current 

static 
SNOW VISCOSITY (all types of snow)
Edata 

static 
To calibrate the fudge factor for viscosity.
Edata  
date  current date 

static 
Determines the fudge factor for viscosity
This fudge factor takes into account bondice imperfections and the effect of liquid water.
Edata 

static 
SNOW VISCOSITY according to formulation by Kojima.
Edata 

static 
MONTANA snow viscosity (nondendritic snow, i.e. if dd=0.); From bb_lw_VS_Montana() (Laws.c r7.7). Bob Brown's MICROSTRUCTURE law. Clearly the BEST law we have right now but also the most UNSTABLE: note that the viscosity is not only a function of the grain dimensions, but also a function of the overburden stress. A series of equations that collectively give the viscosity Vis = S/eDot. The microstructure parameters rb and rg are obtained through Edata pointer and are in mm. The secondary microstructure parameters L and rc are also calculated in mm. This means that the dimensions of rg, rb, L, & rc are in mm since they show up in the following equations as ratios to give dimensionless numbers. NOTE: The theory is NOT valid for NEW SNOW or WET SNOW. However, we try it for wet snow, since it makes sense for wet snow and is related to the wet snow bond growth (Pressure Sintering) If the snow is new, however, then use LEHNING's law, or any other law ... No, do not use any other law, they don't work.
*Edata 

static 
Computes the temperature term of viscosity The modifications for POLAR variant are described in: Steger CR, Reijmer CH, van den Broeke MR, Wever N, Forster RR, Koenig LS, Kuipers Munneke P, Lehning M, Lhermitte S, Ligtenberg SRM, Miège C and Noël BPY (2017) Firn Meltwater Retention on the Greenland Ice Sheet: A Model Comparison. Front. Earth Sci. 5:3. doi: 10.3389/feart.2017.00003: "To improve the agreement with observations, the tunable factors in the snow viscosity scheme (Groot Zwaaftink et al., 2013) for the activation energy of snow Qs and the critical exponent β are set to 16,080 J mol−1 and 0.3, respectively.".
Te  Element temperature (K) 

static 
Water vapor diffusion coefficient in soil. The formulation is based on Saito et al., 2006 "Numerical analysis of coupled water vapor and heat transport in the vadose zone", see eq. [14] and [15]. It is defined as the product of the tortuosity factor () as defined by Millington and Quirck (1961), the airfilled porosity (m3 m3) and the diffusivity of water vapor in air (m2 s1).
Edata  element data 

static 

static 
Ratio of porosity to tortuosity.

static 
Ratio of porosity to tortuosity for Soil.

static 

static 
Integral of snow density corresponding to the maximal displacement depth d_pump (m)

static 

static 

static 

static 
Field capacity of the soil (1). Above this levels, water begins to drain.

static 
To use J. Hendrikx's parameterization for wind speeds > 2.9 m s1.

static 

static 

static 
Factor controlling ice to ice conduction.

static 
Defines the formerly used MONTANA fudge factor for old wet snow settling (up to snowpack_r8.0).

static 
Factor controlling increase in water vapor transport and thus energy transport in wet snow.

static 
Pore length for surface soil for ventilation (m)

static 
Minimum relative saturation of top soil layer.

static 
Minimum soil surface resistance, 50 sm1 (van den Hurk et al, 2000)

static 

static 
Defines the smallest allowable viscosity (Pa s) that a viscosity law will return
Value is DAMM SMALL – smaller values than this are pretty unrealistic.

static 

static 
fudge_bohren

static 
mean extinction coefficient for pure ice per band

static 
Snow extinction coefficients for absorbtion of SW radiation (swa)
Number of bands used

static 
fraction of sun power spectrum per band

static 

static 

static 

static 

static 

static 
Used to decribe advective flux attenuation.

static 
Switch on or off wind pumping in snow.

static 
Switch on or off wind pumping in soil.