93 static std::vector<std::string> paramname, description, units;
94 static const bool __init;
95 static bool initStaticData();
125 typedef enum MERGE_TYPE {
137 typedef enum MERGE_CONFLICTS {
224 void setResampled(
const bool& in_resampled) {resampled = in_resampled;}
227 void setFiltered(
const size_t& param,
const bool& in_filtered =
true);
229 void setGenerated(
const size_t& param,
const bool& in_generated =
true);
236 const double&
operator()(
const size_t& parindex)
const;
237 double&
operator()(
const std::string& parname);
238 const double&
operator()(
const std::string& parname)
const;
399 unsigned int extra_flag : 3;
404 static std::vector<std::string> s_default_paramname;
405 static const double epsilon;
406 static const bool __init;
407 static bool initStaticData();
410 std::vector<std::string> extra_param_name;
411 std::vector<double> data;
413 size_t nrOfAllParameters;
417 std::vector<flag_field> flags;
418 static flag_field zero_flag;
A class to handle timestamps. This class handles conversion between different time display formats (I...
Definition: Date.h:87
A class to represent a singular measurement received from one station at a certain time (represented ...
Definition: MeteoData.h:107
double & operator()(const size_t &parindex)
Definition: MeteoData.cc:292
bool isNodata() const
Are all the fields set to nodata?
Definition: MeteoData.cc:343
size_t getNrOfParameters() const
Definition: MeteoData.h:242
bool isGenerated(const size_t ¶m) const
Definition: MeteoData.cc:367
friend std::istream & operator>>(std::istream &is, MeteoData &data)
Definition: MeteoData.cc:441
StationData meta
The meta data of the measurement.
Definition: MeteoData.h:385
FORMATS
Keywords for selecting the toString formats.
Definition: MeteoData.h:110
@ COMPACT
output optimized to print the content of vector<MeteoData>
Definition: MeteoData.h:113
@ FULL
Shows detailed information, including nodata fields.
Definition: MeteoData.h:112
@ DFLT
Shows detailed information, skipping nodata fields.
Definition: MeteoData.h:111
void setGenerated(const size_t ¶m, const bool &in_generated=true)
Definition: MeteoData.cc:362
Merge_Type
Available MeteoData merging strategies. When the two stations both have data at a given time step,...
Definition: MeteoData.h:125
@ WINDOW_MERGE
Similar to a full merge but within the time range of station1.
Definition: MeteoData.h:129
@ FULL_MERGE
All timestamps from station2 are brought into station1 even if the timestamps don't match.
Definition: MeteoData.h:128
@ STRICT_MERGE
Station1 receives data from station2 only for common timestamps.
Definition: MeteoData.h:126
@ EXPAND_MERGE
If station2 can provide some data before/after station1, this extra data is added to station1.
Definition: MeteoData.h:127
static const std::string & getParameterName(const size_t &parindex)
Definition: MeteoData.cc:159
void setFiltered(const size_t ¶m, const bool &in_filtered=true)
Definition: MeteoData.cc:352
void standardizeNodata(const double &plugin_nodata)
Standardize nodata values The plugin-specific nodata values are replaced by MeteoIO's internal nodata...
Definition: MeteoData.cc:266
static MeteoGrids::Parameters findGridParam(const Parameters &mpar)
Definition: MeteoData.cc:177
bool operator!=(const MeteoData &in) const
Operator that tests for inequality.
Definition: MeteoData.h:379
void reset()
Resets all the meteo parameters to IOUtils::nodata NOTE: member vars date and resampled are not affec...
Definition: MeteoData.cc:257
static void merge(std::vector< MeteoData > &vec1, const std::vector< MeteoData > &vec2, const bool &simple_merge=false, const Merge_Conflicts &conflicts_strategy=CONFLICTS_PRIORITY_FIRST)
Simple merge strategy for vectors containing meteodata for a given timestamp. If some fields of the M...
Definition: MeteoData.cc:605
static Parameters findMeteoParam(const MeteoGrids::Parameters &gpar)
Definition: MeteoData.cc:184
bool param_exists(const std::string &parname) const
Check whether a certain parameter is a part of this MeteoData instance.
Definition: MeteoData.cc:204
Date date
Timestamp of the measurement.
Definition: MeteoData.h:384
bool isFiltered(const size_t ¶m) const
Definition: MeteoData.cc:357
const std::string getStationID() const
Definition: MeteoData.h:389
void setResampled(const bool &in_resampled)
Definition: MeteoData.h:224
static std::set< std::string > listAvailableParameters(const std::vector< MeteoData > &vecMeteo)
List the parameters that have a least one valid value in a vector of MeteoData.
Definition: MeteoData.cc:787
size_t addParameter(const std::string &i_paramname)
Add another variable to the MeteoData object, a double value will be added and the nrOfParameters inc...
Definition: MeteoData.cc:219
bool isResampled() const
Definition: MeteoData.h:223
bool hasConflicts(const MeteoData &meteo2) const
Check for data conflicts between two MeteoData objects Conflicts are defined as two identical data fi...
Definition: MeteoData.cc:764
Parameters
this enum provides indexed access to meteorological fields
Definition: MeteoData.h:144
@ P
Air pressure.
Definition: MeteoData.h:145
@ HS
Height of snow.
Definition: MeteoData.h:150
@ ISWR
Incoming short wave radiation.
Definition: MeteoData.h:155
@ TAU_CLD
Cloud transmissivity or ISWR/ISWR_clear_sky.
Definition: MeteoData.h:157
@ VW
Wind velocity.
Definition: MeteoData.h:151
@ VW_MAX
Maximum wind velocity.
Definition: MeteoData.h:153
@ PSUM
Water equivalent of precipitations, either solid or liquid.
Definition: MeteoData.h:158
@ PSUM_PH
Precipitation phase: between 0 (fully solid) and 1(fully liquid)
Definition: MeteoData.h:159
@ TA
Air temperature.
Definition: MeteoData.h:146
@ TSS
Temperature of the snow surface.
Definition: MeteoData.h:149
@ ILWR
Incoming long wave radiation (downwelling)
Definition: MeteoData.h:156
@ firstparam
Definition: MeteoData.h:144
@ RH
Relative humidity.
Definition: MeteoData.h:147
@ lastparam
Definition: MeteoData.h:160
@ TSG
Temperature of the ground surface.
Definition: MeteoData.h:148
@ DW
Wind direction.
Definition: MeteoData.h:152
@ RSWR
Reflected short wave radiation.
Definition: MeteoData.h:154
static MeteoData::Merge_Conflicts getMergeConflicts(std::string merge_conflicts)
Parse a string containing a merge conflcits type and return the proper enum member for it.
Definition: MeteoData.cc:475
static const size_t nrOfParameters
holds the number of meteo parameters stored in MeteoData
Definition: MeteoData.h:387
bool operator<(const MeteoData &in) const
so vectors can be sorted by timestamps
Definition: MeteoData.h:380
const std::string toString(const FORMATS format=DFLT) const
Print the content of the current object.
Definition: MeteoData.cc:382
void setResampledParam(const size_t ¶m, const bool &in_resampled=true)
Definition: MeteoData.cc:372
static MeteoData::Merge_Type getMergeType(std::string merge_type)
Parse a string containing a merge type and return the proper enum member for it.
Definition: MeteoData.cc:464
static void unifyMeteoData(METEO_SET &vecMeteo)
Ensure all elements in a METEO_SET have the same parameters.
Definition: MeteoData.cc:802
static size_t getStaticParameterIndex(const std::string &parname)
Definition: MeteoData.cc:167
static size_t mergeTimeSeries(std::vector< MeteoData > &vec1, const std::vector< MeteoData > &vec2, const Merge_Type &strategy=STRICT_MERGE, const Merge_Conflicts &conflicts_strategy=CONFLICTS_PRIORITY_FIRST)
Simple merge strategy for two vectors containing meteodata time series for two stations....
Definition: MeteoData.cc:495
const std::string & getNameForParameter(const size_t &parindex) const
Definition: MeteoData.cc:195
Merge_Conflicts
Available MeteoData conflict resolution strategies. When two stations are merged, there is a merge co...
Definition: MeteoData.h:137
@ CONFLICTS_PRIORITY_LAST
Station2 has priority over station 1.
Definition: MeteoData.h:139
@ CONFLICTS_AVERAGE
The merged value is the average of station1 and station2.
Definition: MeteoData.h:140
@ CONFLICTS_PRIORITY_FIRST
Station1 has priority over station 2.
Definition: MeteoData.h:138
friend std::ostream & operator<<(std::ostream &os, const MeteoData &data)
Definition: MeteoData.cc:421
bool isResampledParam(const size_t ¶m) const
Definition: MeteoData.cc:377
void setDate(const Date &in_date)
A setter function for the measurement date.
Definition: MeteoData.h:194
bool operator==(const MeteoData &) const
Operator that tests for equality.
Definition: MeteoData.cc:275
bool operator>(const MeteoData &in) const
so vectors can be sorted by timestamps
Definition: MeteoData.h:381
size_t getParameterIndex(const std::string &parname) const
Definition: MeteoData.cc:328
MeteoData(void)
The default constructor initializing every double attribute to nodata and the Date to julian==0....
Definition: MeteoData.cc:237
A class to represent the meteorological parameters that could be contained in a grid....
Definition: MeteoData.h:43
static const std::string getParameterName(const size_t &parindex)
Definition: MeteoData.cc:82
Parameters
this enum provides names for possible meteogrids (from an ARPS file, etc)
Definition: MeteoData.h:46
@ PSUM_L
Water equivalent of liquid precipitation.
Definition: MeteoData.h:65
@ OLWR
Outgoing long wave radiation.
Definition: MeteoData.h:59
@ TSS
Temperature snow surface.
Definition: MeteoData.h:68
@ firstparam
Definition: MeteoData.h:46
@ TSG
Temperature ground surface.
Definition: MeteoData.h:67
@ TA
Air temperature.
Definition: MeteoData.h:47
@ VW
Wind velocity.
Definition: MeteoData.h:51
@ ISWR
Incoming short wave radiation.
Definition: MeteoData.h:54
@ P
Air pressure.
Definition: MeteoData.h:70
@ SLOPE
DEM slope angle.
Definition: MeteoData.h:81
@ V
North component of wind.
Definition: MeteoData.h:73
@ DEM
Digital Elevation Model.
Definition: MeteoData.h:79
@ ISWR_DIFF
Incoming short wave, diffuse.
Definition: MeteoData.h:56
@ AZI
DEM slope azimuth.
Definition: MeteoData.h:82
@ RSNO
Snow mean density.
Definition: MeteoData.h:76
@ ISWR_DIR
Incoming short wave, direct.
Definition: MeteoData.h:57
@ PSUM_S
Water equivalent of solid precipitation.
Definition: MeteoData.h:66
@ TD
Dew Point temperature.
Definition: MeteoData.h:50
@ W
Vertical component of wind.
Definition: MeteoData.h:74
@ VW_MAX
Maximum wind velocity.
Definition: MeteoData.h:53
@ CLD
Total cloud cover in oktas (see https://en.wikipedia.org/wiki/Okta)
Definition: MeteoData.h:61
@ lastparam
Definition: MeteoData.h:83
@ TAU_CLD
Cloud transmissivity or ISWR/ISWR_clear_sky.
Definition: MeteoData.h:60
@ TSOIL
Temperature within the soil, at a given depth.
Definition: MeteoData.h:69
@ PSUM
Water equivalent of precipitations, either solid or liquid.
Definition: MeteoData.h:63
@ U
East component of wind.
Definition: MeteoData.h:72
@ ILWR
Incoming long wave radiation.
Definition: MeteoData.h:58
@ P_SEA
Sea level air pressure.
Definition: MeteoData.h:71
@ RH
Relative humidity.
Definition: MeteoData.h:48
@ RSWR
Reflected short wave radiation.
Definition: MeteoData.h:55
@ ROT
Total generated runoff.
Definition: MeteoData.h:77
@ SHADE
Hillshade.
Definition: MeteoData.h:80
@ QI
Specific humidity.
Definition: MeteoData.h:49
@ ALB
Albedo.
Definition: MeteoData.h:78
@ PSUM_PH
Precipitation phase, between 0 (fully solid) and 1 (fully liquid)
Definition: MeteoData.h:64
@ HS
Height of snow.
Definition: MeteoData.h:62
@ DW
Wind direction.
Definition: MeteoData.h:52
@ SWE
Snow Water Equivalent.
Definition: MeteoData.h:75
static const std::string getParameterDescription(const size_t &parindex, const bool &allow_ws=true)
Definition: MeteoData.cc:90
static const size_t nrOfParameters
holds the number of meteo parameters stored in MeteoData
Definition: MeteoData.h:85
static size_t getParameterIndex(const std::string &parname)
Definition: MeteoData.cc:112
static const std::string getParameterUnits(const size_t &parindex)
Definition: MeteoData.cc:104
A class to represent meteo stations with attributes like longitude, latitude, etc.
Definition: StationData.h:41
std::string stationID
ID of the Station, typically a short string.
Definition: StationData.h:132
@ filtered
Definition: IOUtils.h:56
@ generated
Definition: IOUtils.h:58
std::vector< MeteoData > METEO_SET
Definition: MeteoData.h:32