WSL/SLF GitLab Repository
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
snow-models
meteoio
Commits
cb39797b
Commit
cb39797b
authored
Mar 23, 2013
by
Mathias Bavay
Browse files
Improved the documentation for the data generators
parent
ecb388b5
Changes
4
Hide whitespace changes
Inline
Side-by-side
meteoio/GeneratorAlgorithms.h
View file @
cb39797b
...
...
@@ -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
...
...
meteoio/IOUtils.cc
View file @
cb39797b
...
...
@@ -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
);
...
...
meteoio/MeteoData.cc
View file @
cb39797b
...
...
@@ -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
)
{
...
...
meteoio/MeteoData.h
View file @
cb39797b
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment