MeteoIODoc 2.11.0
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.

It takes the following arguments:

  • BASE:: provide the base algorithm to pre-fill the grid, since this method must first use another algorithm to generate an initial precipitation field, and then modify it. 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 (for an easy fallback). Please do not forget to provide any necessary arguments for this base method!
  • TYPE: specify how the synoptic wind direction is derived. It is either of the following:
    • AUTO: automatic computation of the synoptic wind direction (default, see below);
    • FIXED: provide a fixed synoptic wind bearing that is used for all time steps. It then needs the following argument:
      • DW_SYNOP: fixed synoptic wind bearing that is used for all time steps;
    • REF_STATION: the wind direction at the provided station is assumed to be the synoptic wind direction. It then needs the following argument:
      • REF_STATION: the station ID providing the wind direction;
  • DMAX: maximum search distance or radius (default: 300m);

If type=AUTO, the synoptic wind direction will be computed as follow: 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.

PSUM::algorithms = WINSTRAL
PSUM::winstral::base = idw_lapse
PSUM::winstral::type = fixed
PSUM::winstral::dw_synop = 180
PSUM::winstral::dmax = 300

Another example, using non-default values for the base algorithm:

PSUM::ALGORITHMS = WINSTRAL IDW_LAPSE
PSUM::WINSTRAL::BASE = idw_lapse
PSUM::WINSTRAL::DMAX = 300
PSUM::WINSTRAL::TYPE = AUTO
PSUM::IDW_LAPSE::SOFT = TRUE
PSUM::IDW_LAPSE::TREND_MIN_ALT = 500.0
PSUM::IDW_LAPSE::TREND_MAX_ALT = 1500.0
Remarks
Only cells with an air temperature below freezing participate in the redistribution

#include <WinstralAlgorithm.h>

Public Member Functions

 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)
 
virtual double getQualityRating (const Date &i_date)
 
virtual void calculate (const DEMObject &dem, Grid2DObject &grid)
 
- Public Member Functions inherited from mio::InterpolationAlgorithm
 InterpolationAlgorithm (const std::vector< std::pair< std::string, std::string > > &, const std::string &i_algo, const std::string &i_param, TimeSeriesManager &i_tsm)
 
virtual ~InterpolationAlgorithm ()
 
virtual double getQualityRating (const Date &i_date)=0
 
virtual void calculate (const DEMObject &dem, Grid2DObject &grid)=0
 
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
std::vector< double > getData (const Date &i_date, const std::string &i_param)
 
size_t getData (const Date &i_date, const std::string &i_param, std::vector< double > &o_vecData, std::vector< StationData > &o_vecMeta)
 
- Protected Attributes inherited from mio::InterpolationAlgorithm
TimeSeriesManagertsmanager
 
Date date
 
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...
 
const std::string param
 the parameter that we will interpolate More...
 
size_t nrOfMeasurments
 Number of stations that have been used, so this can be reported to the user. More...
 

Constructor & Destructor Documentation

◆ WinstralAlgorithm()

mio::WinstralAlgorithm::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 
)

Member Function Documentation

◆ calculate()

void mio::WinstralAlgorithm::calculate ( const DEMObject dem,
Grid2DObject grid 
)
virtual

◆ getQualityRating()

double mio::WinstralAlgorithm::getQualityRating ( const Date i_date)
virtual

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