Assimilation of snowline elevation information into snow maps.
This algorithm applies a base interpolation method and reads in snowline elevation information to be able to
a) set snow heights below the snowline elevation to zero
b) check the lapse rate of the base algorithm, and if this is "reversed" inject one derived from the snowline elevation.
A problem that may turn up for practitioners when creating snow maps is that a station higher up is more eposed to wind, or may measure less snow than a station further down in the valley for any other reason. Then, if applying an algorithm that computes a lapse rate, snow is transported downwards resulting in maps that show little snow on the mountain tops and a lot of snow in the valleys.
To combat this, external knowledge is required. In case of this SNOWLINE algorithm the user provides a text file containing information about the (estimated) snowline elevation, i. e. the elevation above which there is snow. This can for example come from satellite images, webcams, or manual observations. If it is deemed unphysical in the calculated domain to have less snow further up, then the trend can be forced to be the other way around.
The algorithm takes the following parameters:
IDW_LAPSE
).CUTOFF
(hard cut to zero below snowline, default), BANDS
(simple linear gradient from zero to the measured data), or FORMULA
(evaluate all pixels according to a custom formula).BANDS
smoothing, use this many steps to go from zero snow to measured snow (default: 10).BANDS
smoothing, use bands of this height (default: 10 m).FORMULA
smoothing. The same mathematics as in FilterMaths are available. In addition, you can use the following substitutions: snowline
(the snowline elevation), altitude
(the pixel's altitude) and param
(the original value as calculated by the base algorithm).In addition, you can set the base algorithm's parameters as usual.
The minimal settings to control the default IDW_LAPSE
interpolation by setting HS
to zero below the snowline elevation are the following:
To calculate the lapse rate from the snowline and inject it in an IDW_SLOPES
interpolation if necessary (using a fixed rate if the snowline is n/a) use the following setup:
The format specification of the text file containing snowline elevations per slope aspect is as follows: aspect_#,beg_azimuth end_azimuth snowline
with one line per slope aspect. For example:
Set elevations to the nodata
value (usually -999) to mark them as unknown.
A minimal file for a single slope aspect (complete circle from 0 to 360/0 degrees) might look like this for a snowline elevation of 2500 m:
#include <SnowlineAlgorithm.h>
Public Member Functions | |
SnowlineAlgorithm (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 | |
TimeSeriesManager & | tsmanager |
Date | date |
std::vector< MeteoData > | vecMeteo |
std::vector< double > | vecData |
store the measurement for the given parameter More... | |
std::vector< StationData > | vecMeta |
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... | |
mio::SnowlineAlgorithm::SnowlineAlgorithm | ( | 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 |
Implements mio::InterpolationAlgorithm.
|
virtual |
Implements mio::InterpolationAlgorithm.