37 const std::string& i_anetz1,
const std::string& i_anetz2,
const std::string& i_anetz3,
38 const size_t& nr_coeffs,
39 const double& coeff1,
const double& coeff2,
const double& coeff3)
66 ImisIO(
const std::string& configfile);
72 std::vector< std::vector<MeteoData> >& vecMeteo);
75 void openDBConnection(oracle::occi::Environment*& env, oracle::occi::Connection*& conn)
const;
76 void closeDBConnection(oracle::occi::Environment*& env, oracle::occi::Connection*& conn)
const;
77 void getDBParameters();
79 std::vector<std::string> getStationIDs(
const std::string& stat_code,
80 const std::string& sqlQuery, oracle::occi::Statement*& stmt)
const;
81 std::vector<std::string> getStationMetaData(
const std::string& stat_abk,
const std::string& stao_nr,
82 const std::string& sqlQuery, oracle::occi::Statement*& stmt)
const;
83 std::vector<std::string> getSensorDepths(
const std::string& stat_abk,
const std::string& stao_nr,
84 const std::string& sqlQuery, oracle::occi::Statement*& stmt)
const;
85 bool getStationData(
const std::string& stat_abk,
const std::string& stao_nr,
86 const Date& dateS,
const Date& dateE,
87 const std::vector<std::string>& i_vecHTS1,
88 std::vector< std::vector<std::string> >& vecMeteoData,
89 oracle::occi::Environment*& env, oracle::occi::Statement*& stmt);
91 static void parseDataSet(
const std::vector<std::string>& meteo_in,
MeteoData& md,
const bool& fullStation);
92 void readData(
const Date& dateStart,
const Date& dateEnd, std::vector< std::vector<MeteoData> >& vecMeteo,
93 const size_t& stationindex,
const std::vector<StationData>& vecStationID,
94 oracle::occi::Environment*& env, oracle::occi::Statement*& stmt);
95 void readSWE(
const Date& dateStart,
const Date& dateEnd, std::vector< std::vector<MeteoData> >& vecMeteo,
96 const size_t& stationindex,
const std::vector<StationData>& vecStationIDs,
97 oracle::occi::Environment*& env, oracle::occi::Statement*& stmt);
98 std::vector<std::string> readStationIDs();
99 static void parseStationID(
const std::string& stationID, std::string& stnAbbrev, std::string& stnNumber);
101 void readStationMetaData(oracle::occi::Connection*& conn);
102 void convertSnowTemperature(
MeteoData& meteo,
const std::string& parameter);
103 void convertSensorDepth(
MeteoData& meteo,
const std::string& parameter);
104 void convertUnits(
MeteoData& meteo,
const bool& reduce_pressure);
107 void findAnetzStations(std::map<std::string, size_t>& mapAnetzNames, std::vector<StationData>& vecAnetzStation)
const;
108 void assimilateAnetzData(
const AnetzData& ad,
109 const std::map<std::string, size_t>& mapAnetzNames,
const std::vector< std::vector< std::pair<Date, double> > > &vecPsum,
110 const size_t& stationindex, std::vector< std::vector<MeteoData> >& vecMeteo);
111 static std::vector< std::pair<Date, double> > computeAnetzPSUM(std::vector<MeteoData> &vecMeteo);
113 static const double in_tz;
115 std::string coordout, coordoutparam;
116 std::vector<StationData> vecStationMetaData;
117 std::map<std::string, std::string> mapDriftStation;
118 static const double plugin_nodata;
119 static const std::string sqlQueryStationIDs;
120 static const std::string sqlQueryStationMetaData;
121 static const std::string sqlQuerySensorDepths;
122 static const std::string sqlQueryMeteoDataDrift;
123 static const std::string sqlQueryMeteoData;
124 static const std::string sqlQuerySWEData;
125 static const std::string coordin, coordinparam;
126 std::string oracleUserName_in;
127 std::string oraclePassword_in;
128 std::string oracleDBName_in;
129 bool useAnetz, use_imis_psum, use_psum_snowpack;
131 static std::map<std::string, AnetzData> mapAnetz;
132 static std::map< std::string, std::pair<double, double> > mapSlopes;
133 static const bool __init;
134 static bool initStaticData();
size_t nrOfAnetzStations
Definition: ImisIO.h:52
std::vector< double > coeffs
Definition: ImisIO.h:51
std::vector< std::string > anetzstations
Definition: ImisIO.h:50
AnetzData(const size_t &nr_anetz, const std::string &i_anetz1, const std::string &i_anetz2, const std::string &i_anetz3, const size_t &nr_coeffs, const double &coeff1, const double &coeff2, const double &coeff3)
Definition: ImisIO.h:36
size_t nrOfCoefficients
Definition: ImisIO.h:52
AnetzData()
Definition: ImisIO.h:33
A class that reads a key/value file. These files (typically named *.ini) follow the INI file format s...
Definition: Config.h:79
A class to handle timestamps. This class handles conversion between different time display formats (I...
Definition: Date.h:87
A class representing the IO Layer of the software Alpine3D. For each type of IO (File,...
Definition: IOInterface.h:98
The class with-in the data from the database are treated. The MeteoData and the StationData will be s...
Definition: ImisIO.h:64
ImisIO(const std::string &configfile)
Definition: ImisIO.cc:249
virtual void readStationData(const Date &date, std::vector< StationData > &vecStation)
Fill vecStation with StationData objects for a certain date of interest.
Definition: ImisIO.cc:285
virtual void readMeteoData(const Date &dateStart, const Date &dateEnd, std::vector< std::vector< MeteoData > > &vecMeteo)
Fill vecMeteo with a time series of objects corresponding to the interval indicated by dateStart and ...
Definition: ImisIO.cc:411
A class to represent a singular measurement received from one station at a certain time (represented ...
Definition: MeteoData.h:107
const double nodata
This is the internal nodata value.
Definition: IOUtils.h:75