SNOWPACK 3.7.0
Stability.h
Go to the documentation of this file.
1/*
2 * SNOWPACK stand-alone
3 *
4 * Copyright WSL Institute for Snow and Avalanche Research SLF, DAVOS, SWITZERLAND
5*/
6/* This file is part of Snowpack.
7 Snowpack is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 Snowpack is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with Snowpack. If not, see <http://www.gnu.org/licenses/>.
19*/
20#ifndef STABILITY_H
21#define STABILITY_H
22
25
26#include <map>
27#include <string>
28
29class InstabilityData;
30
31typedef double (*StabMemFn)(const ElementData&, const double&);
32typedef bool (*StabFnShearStrength)(const double&, const double&, const mio::Date&,
34
49class Stability {
50 public:
51 Stability (const SnowpackConfig& i_cfg, const bool& i_classify_profile=false);
52
53 void checkStability(const CurrentMeteo& Mdata, SnowStation& Xdata);
54
57 static const int sh_mod, prof_classi;
58 static const size_t nmax_lemon;
59
60 private:
61 void initStability(SnowStation& Xdata);
62 static double initStructuralStabilityIndex(const ElementData& Edata_lower, const ElementData& Edata_upper,
63 const double& Sk, unsigned short &n_lemon);
64
65 static void findWeakLayer(const double& Pk, std::vector<unsigned short>& n_lemon, SnowStation& Xdata, double &Swl_ssi, double &Swl_Sk38, size_t &Swl_lemon);
66
67 static const bool __init;
68 static bool initStaticData();
69 static std::map<std::string, StabMemFn> mapHandHardness;
70 static std::map<std::string, StabFnShearStrength> mapShearStrength;
71
72 std::string strength_model, hardness_parameterization;
73 double hoar_density_buried;
74 bool plastic;
75 bool classify_profile, multi_layer_sk38, RTA_ssi;
76};
77
78#endif //End of Stability.h
bool(* StabFnShearStrength)(const double &, const double &, const mio::Date &, ElementData &, NodeData &, StabilityData &)
Definition: Stability.h:32
double(* StabMemFn)(const ElementData &, const double &)
Definition: Stability.h:31
CurrentMeteo is the class of interpolated meteo data for the current calculation time step It contai...
Definition: DataClasses.h:83
ELEMENT DATA used as a pointer in the SnowStation structure NOTE on M below: this is the mass of an e...
Definition: DataClasses.h:285
NODAL DATA used as a pointer in the SnowStation structure.
Definition: DataClasses.h:393
Definition: DataClasses.h:604
Definition: SnowpackConfig.h:28
Layer shear strength evaluation parameters. This class contains layer properties useful for the shear...
Definition: StabilityAlgorithms.h:32
This class contains the stability routines for the snowpack model. Stability is found for each LAYER ...
Definition: Stability.h:49
static const double ground_rough
The first GROUND_ROUGH m of snow will not be unstable due to ground roughness.
Definition: Stability.h:55
static const int sh_mod
Defines regression model for surface hoar shear strength.
Definition: Stability.h:57
static const double min_depth_ssi
MIN_DEPTH_SSI m of snow must be left after discarding penetration depth.
Definition: Stability.h:56
static const double minimum_slab
Minimum slab thickness for natural and deformation stability index (m)
Definition: Stability.h:55
static const size_t nmax_lemon
Maximum number of structural instabilities looked at ("lemons")
Definition: Stability.h:58
void checkStability(const CurrentMeteo &Mdata, SnowStation &Xdata)
The stability information is based on a very empirical principle. First a distinction is made between...
Definition: Stability.cc:150
static const int prof_classi
Defines classification scheme for snow profiles.
Definition: Stability.h:57
Stability(const SnowpackConfig &i_cfg, const bool &i_classify_profile=false)
Definition: Stability.cc:71
static const double max_stability
Upper stability limit.
Definition: Stability.h:55
static const double skier_depth
Skiers will not trigger failures SKIER_DEPTH m below penetration depth.
Definition: Stability.h:56
static const double min_thick_crust
Minimum thickness for a supporting melt-freeze crust (perp to slope, in m)
Definition: Stability.h:56
static const double psi_ref
Reference slope angle.
Definition: Stability.h:55