SNOWPACK 20241221.26c8720
Aggregate.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
21#ifndef AGGREGATE_H
22#define AGGREGATE_H
23
25#include <vector>
26
27#include <cstddef> //needed for size_t
28
35class Aggregate {
36
37 public:
38 static size_t aggregate(std::vector<SnowProfileLayer>& Pdata);
39 static bool joinSimilarLayers(ElementData& Edata_upper, ElementData& Edata_lower);
40 static bool mergeThinLayer(ElementData& Edata_upper, ElementData& Edata_lower);
41
42 private:
43 static void shift(const size_t& nL_ini, std::vector<SnowProfileLayer>& Pdata);
44 static bool joinSimilarLayers(const size_t& e_upper, std::vector<SnowProfileLayer>& Pdata);
45 static bool mergeThinLayer(const size_t& e_lower, std::vector<SnowProfileLayer>& Pdata);
46
47 static const double limit_dry;
48 static const double diff_theta_w;
49 static const double diff_jul;
50 static const double diff_dg;
51 static const double diff_dg_rel;
52 static const double diff_sp;
53 static const double diff_dd;
54 static const double min_l_element;
55};
56
57#endif
This module contains the routines to perform profile aggregation.
Definition: Aggregate.h:35
static bool mergeThinLayer(ElementData &Edata_upper, ElementData &Edata_lower)
Definition: Aggregate.cc:198
static size_t aggregate(std::vector< SnowProfileLayer > &Pdata)
Aggregate snow profile layers and compute the grain class.
Definition: Aggregate.cc:247
static bool joinSimilarLayers(ElementData &Edata_upper, ElementData &Edata_lower)
Definition: Aggregate.cc:113
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