MeteoIODoc  MeteoIODoc-2.6.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mio::WinstralAlgorithm Class Reference

Detailed Description

DEM-based wind-exposure interpolation algorithm. This is an implementation of the method described in Winstral, Elder, & Davis, "Spatial snow modeling of wind-redistributed snow using terrain-based parameters", 2002, Journal of Hydrometeorology, 3(5), 524-538. The DEM is used to compute wind exposure factors that are used to alter the precipitation fields. It is usually a good idea to provide a DEM that also contain the accumulated snow height in order to get a progressive softening of the terrain features.

This method must therefore first use another algorithm to generate an initial precipitation field, and then modifies this field accordingly. By default, this base method is "idw_lapse" and switches to "avg" if only one station can provide the precipitation at a given time step.

Then it requires a synoptic wind direction that can be provided by different means:

  • without any extra argument, the stations are located in the DEM and their wind shading (or exposure) is computed. If at least one station is found that is not sheltered from the wind (in every direction), it provides the synoptic wind (in case of multiple stations, the vector average is used). Please note that the stations that are not included in the DEM are considered to be sheltered. If no such station is found, the vector average of all the available stations is used.
  • by providing a fixed synoptic wind bearing that is used for all time steps
  • by providing the station_id of the station to get the wind direction from. In this case, the base algorithm for generating the initial wind field must be specified in the first position.
Remarks
Only cells with an air temperature below freezing participate in the redistribution
PSUM::algorithms = WINSTRAL
PSUM::winstral = idw_lapse 180

#include <WinstralAlgorithm.h>

Public Member Functions

 WinstralAlgorithm (Meteo2DInterpolator &i_mi, const std::vector< std::string > &i_vecArgs, const std::string &i_algo, TimeSeriesManager &i_tsmanager, GridsManager &i_gridsmanager)
 
virtual double getQualityRating (const Date &i_date, const MeteoData::Parameters &in_param)
 
virtual void calculate (const DEMObject &dem, Grid2DObject &grid)
 
- Public Member Functions inherited from mio::InterpolationAlgorithm
 InterpolationAlgorithm (Meteo2DInterpolator &i_mi, const std::vector< std::string > &i_vecArgs, const std::string &i_algo, TimeSeriesManager &i_tsmanager, GridsManager &i_gridsmanager)
 
virtual ~InterpolationAlgorithm ()
 
std::string getInfo () const
 Return an information string about the interpolation process. More...
 

Additional Inherited Members

- Public Attributes inherited from mio::InterpolationAlgorithm
const std::string algo
 
- Protected Member Functions inherited from mio::InterpolationAlgorithm
size_t getData (const Date &i_date, const MeteoData::Parameters &i_param, std::vector< double > &o_vecData)
 
size_t getData (const Date &i_date, const MeteoData::Parameters &i_param, std::vector< double > &o_vecData, std::vector< StationData > &o_vecMeta)
 
void getTrend (const std::vector< double > &vecAltitudes, const std::vector< double > &vecDat, Fit1D &trend) const
 Read the interpolation arguments and compute the trend accordingly. More...
 
void simpleWindInterpolate (const DEMObject &dem, const std::vector< double > &vecDataVW, const std::vector< double > &vecDataDW, Grid2DObject &VW, Grid2DObject &DW)
 
- Static Protected Member Functions inherited from mio::InterpolationAlgorithm
static size_t getStationAltitudes (const std::vector< StationData > &i_vecMeta, std::vector< double > &o_vecData)
 
static void detrend (const Fit1D &trend, const std::vector< double > &vecAltitudes, std::vector< double > &vecDat, const double &min_alt=-1e4, const double &max_alt=1e4)
 
static void retrend (const DEMObject &dem, const Fit1D &trend, Grid2DObject &grid, const double &min_alt=-1e4, const double &max_alt=1e4)
 
- Protected Attributes inherited from mio::InterpolationAlgorithm
Meteo2DInterpolatormi
 
TimeSeriesManagertsmanager
 
GridsManagergridsmanager
 
Date date
 
const std::vector< std::string > vecArgs
 
std::vector< MeteoDatavecMeteo
 
std::vector< double > vecData
 store the measurement for the given parameter More...
 
std::vector< StationDatavecMeta
 store the station data for the given parameter More...
 
std::ostringstream info
 to store some extra information about the interplation process More...
 
MeteoData::Parameters param
 the parameter that we will interpolate More...
 
size_t nrOfMeasurments
 the available number of measurements More...
 

Constructor & Destructor Documentation

mio::WinstralAlgorithm::WinstralAlgorithm ( Meteo2DInterpolator i_mi,
const std::vector< std::string > &  i_vecArgs,
const std::string &  i_algo,
TimeSeriesManager i_tsmanager,
GridsManager i_gridsmanager 
)

Member Function Documentation

void mio::WinstralAlgorithm::calculate ( const DEMObject dem,
Grid2DObject grid 
)
virtual
double mio::WinstralAlgorithm::getQualityRating ( const Date i_date,
const MeteoData::Parameters in_param 
)
virtual

The documentation for this class was generated from the following files: