SNOWPACK 20260217.97ebebde
Physically based, energy balance snow cover model
Loading...
Searching...
No Matches
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
48class Stability {
49 public:
50 Stability (const SnowpackConfig& i_cfg, const bool& i_classify_profile=false);
51
52 void checkStability(const CurrentMeteo& Mdata, SnowStation& Xdata);
53
56 static const int sh_mod, prof_classi;
57 static const size_t nmax_lemon;
58
59 private:
60 void initStability(SnowStation& Xdata);
61 static double initStructuralStabilityIndex(const ElementData& Edata_lower, const ElementData& Edata_upper,
62 const double& Sk, unsigned short &n_lemon);
63
64 static void findWeakLayer(const double& Pk, std::vector<unsigned short>& n_lemon, SnowStation& Xdata, double &Swl_ssi, double &Swl_Sk38, size_t &Swl_lemon);
65
66 static const bool __init;
67 static bool initStaticData();
68 static std::map<std::string, StabMemFn> mapHandHardness;
69 static std::map<std::string, StabFnShearStrength> mapShearStrength;
70
71 std::string strength_model, hardness_parameterization;
72 double hoar_density_buried;
73 bool plastic;
74 bool classify_profile, multi_layer_sk38;
75};
76
77#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.
Definition DataClasses.h:86
The physical properties of an individual element used in snow layers (one or multiple elements are co...
Definition DataClasses.h:288
NODAL DATA used as a pointer in the SnowStation structure.
Definition DataClasses.h:396
Station data including all information on snowpack layers (elements and nodes) and on canopy.
Definition DataClasses.h:609
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 snow stability routines for the snowpack model.
Definition Stability.h:48
static const double ground_rough
The first GROUND_ROUGH m of snow will not be unstable due to ground roughness.
Definition Stability.h:54
static const int sh_mod
Defines regression model for surface hoar shear strength.
Definition Stability.h:56
static const double min_depth_ssi
MIN_DEPTH_SSI m of snow must be left after discarding penetration depth.
Definition Stability.h:55
static const double minimum_slab
Minimum slab thickness for natural and deformation stability index (m)
Definition Stability.h:54
static const size_t nmax_lemon
Maximum number of structural instabilities looked at ("lemons")
Definition Stability.h:57
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:149
static const int prof_classi
Defines classification scheme for snow profiles.
Definition Stability.h:56
static const double max_stability
Upper stability limit.
Definition Stability.h:54
static const double skier_depth
Skiers will not trigger failures SKIER_DEPTH m below penetration depth.
Definition Stability.h:55
static const double min_thick_crust
Minimum thickness for a supporting melt-freeze crust (perp to slope, in m)
Definition Stability.h:55
static const double psi_ref
Reference slope angle.
Definition Stability.h:54