MeteoIODoc 2.11.0
WinstralAlgorithm.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2/***********************************************************************************/
3/* Copyright 2013 WSL Institute for Snow and Avalanche Research SLF-DAVOS */
4/***********************************************************************************/
5/* This file is part of MeteoIO.
6 MeteoIO is free software: you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 MeteoIO is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public License
17 along with MeteoIO. If not, see <http://www.gnu.org/licenses/>.
18*/
19#ifndef WINSTRAL_ALGORITHM_H
20#define WINSTRAL_ALGORITHM_H
21
23
24namespace mio {
25
80 public:
81 WinstralAlgorithm(const std::vector< std::pair<std::string, std::string> >& vecArgs, const std::string& i_algo, const std::string& i_param, TimeSeriesManager& i_tsm,
82 GridsManager& i_gdm, Meteo2DInterpolator& i_mi);
83 virtual double getQualityRating(const Date& i_date);
84 virtual void calculate(const DEMObject& dem, Grid2DObject& grid);
85 private:
86 void initGrid(const DEMObject& dem, Grid2DObject& grid);
87 static bool windIsAvailable(const std::vector<MeteoData>& i_vecMeteo, const std::string& i_ref_station);
88 static bool isExposed(const DEMObject& dem, Coords location);
89 static double getSynopticBearing(const std::vector<MeteoData>& i_vecMeteo, const std::string& i_ref_station);
90 static double getSynopticBearing(const std::vector<MeteoData>& i_vecMeteo);
91 static double getSynopticBearing(const DEMObject& dem, const std::vector<MeteoData>& i_vecMeteo);
92
93 typedef enum TYPE {
94 FIXED,
95 REF_STATION,
96 AUTO
97 } synoptic_wind_type;
98
100 GridsManager& gdm;
101 std::string base_algo_user, ref_station;
102 double user_synoptic_bearing;
103 bool inputIsAllZeroes;
104 double dmax;
105};
106
107} //end namespace mio
108
109#endif
A class to handle geographic coordinate systems. This class offers an easy way to transparently conve...
Definition: Coords.h:83
A class to represent DEMs and automatically compute some properties. This class stores elevation grid...
Definition: DEMObject.h:40
A class to handle timestamps. This class handles conversion between different time display formats (I...
Definition: Date.h:87
A class to represent 2D Grids. Typical application as DEM or Landuse Model.
Definition: Grid2DObject.h:42
Definition: GridsManager.h:33
A class to perform 2D spatial interpolations. For more, see Spatial interpolations.
Definition: InterpolationAlgorithms.h:70
A class to spatially interpolate meteo parameters. For more, see Spatial interpolations.
Definition: Meteo2DInterpolator.h:97
Definition: TimeSeriesManager.h:31
DEM-based wind-exposure interpolation algorithm.
Definition: WinstralAlgorithm.h:79
WinstralAlgorithm(const std::vector< std::pair< std::string, std::string > > &vecArgs, const std::string &i_algo, const std::string &i_param, TimeSeriesManager &i_tsm, GridsManager &i_gdm, Meteo2DInterpolator &i_mi)
Definition: WinstralAlgorithm.cc:27
virtual void calculate(const DEMObject &dem, Grid2DObject &grid)
Definition: WinstralAlgorithm.cc:210
virtual double getQualityRating(const Date &i_date)
Definition: WinstralAlgorithm.cc:63
Definition: Config.cc:31