WSL/SLF GitLab Repository

Commit cb39797b authored by Mathias Bavay's avatar Mathias Bavay
Browse files

Improved the documentation for the data generators

parent ecb388b5
......@@ -36,11 +36,16 @@ namespace mio {
* cases, even fully arbitrary data might be helpful (replacing missing value by a given constant so a model can
* run over the data gap).
*
* @note it is generally not advised to use data generators in combination with spatial interpolations as this would
* potentially mix measured and generated values in the resulting grid. It is therefore advised to turn the data generators
* off and let the spatial interpolations algorithms adjust to the amount of measured data.
*
* @section generators_section Data generators section
* The data generators are defined per meteorological parameter. They are applied to all stations
* (if using multiple meteorological stations). If multiple dat generators are specified for each parameter,
* they would be used in the order of declaration, meaning that only the data points that could not be
* generated by the first generator would be tentatively generated by the second generator, etc
* generated by the first generator would be tentatively generated by the second generator, etc. Please also keep
* in mind that at this stage, all data <b>must be in SI</b> units!
* @code
* [Generators]
* RH::generators = CST
......@@ -103,7 +108,7 @@ class GeneratorAlgorithmFactory {
/**
* @class ConstGenerator
* @brief Constant value generator.
* Generate a constant value for this parameter, as provided in argument.
* Generate a constant value for this parameter, as provided in argument (please remember that it must be in SI units).
* @code
* RH::generators = Cst
* RH::Cst = .7
......
......@@ -485,9 +485,9 @@ template<> bool convertString<bool>(bool& t, const std::string& str, std::ios_ba
std::string s(str);
trim(s); //delete trailing and leading whitespaces and tabs
if (toupper(s[0])=='T' || toupper(s[0])=='Y' ) {
if (toupper(s[0])=='T' || toupper(s[0])=='Y') {
t = true;
} else if (toupper(s[0])=='F' || toupper(s[0])=='N' ) {
} else if (toupper(s[0])=='F' || toupper(s[0])=='N') {
t = false;
} else {
std::istringstream iss(s);
......
......@@ -164,17 +164,13 @@ size_t MeteoData::getNrOfParameters() const
return nrOfAllParameters;
}
MeteoData::MeteoData() : date(0.0, 0.), meta(), nrOfAllParameters(MeteoData::nrOfParameters), param_name(s_default_paramname), data(nrOfAllParameters, IOUtils::nodata), resampled(false)
{
/*param_name = s_default_paramname;
data.resize(nrOfAllParameters, IOUtils::nodata);*/
}
MeteoData::MeteoData()
: date(0.0, 0.), meta(), nrOfAllParameters(MeteoData::nrOfParameters), param_name(s_default_paramname), data(nrOfAllParameters, IOUtils::nodata), resampled(false)
{ }
MeteoData::MeteoData(const Date& date_in) : date(date_in), meta(), nrOfAllParameters(MeteoData::nrOfParameters), param_name(s_default_paramname), data(nrOfAllParameters, IOUtils::nodata), resampled(false)
{
/*param_name = s_default_paramname;
data.resize(nrOfAllParameters, IOUtils::nodata);*/
}
MeteoData::MeteoData(const Date& date_in)
: date(date_in), meta(), nrOfAllParameters(MeteoData::nrOfParameters), param_name(s_default_paramname), data(nrOfAllParameters, IOUtils::nodata), resampled(false)
{ }
void MeteoData::setDate(const Date& in_date)
{
......
......@@ -241,7 +241,7 @@ class MeteoData {
size_t nrOfAllParameters;
std::vector<std::string> param_name;
std::vector<double> data;
bool resampled; ///<set this to true if MeteoData is result of resampling
bool resampled; ///<set this to true if MeteoData is result of resampling
};
} //end namespace
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment