37 OshdIO(
const std::string& configfile);
44 std::vector< std::vector<MeteoData> >& vecMeteo);
49 file_index(
const Date& i_date,
const std::string& i_path,
const std::string& i_file_suffix,
const std::string& i_run_date)
50 : date(i_date), run_date(i_run_date), path(i_path), file_suffix(i_file_suffix) {}
51 bool operator<(
const file_index& a)
const {
54 bool operator>(
const file_index& a)
const {
60 std::string file_suffix;
62 void parseInputOutputSection();
63 void readSWRad(
const Date& station_date,
const std::string& path,
const std::string& file_suffix,
const size_t& nrIDs, std::vector< std::vector<MeteoData> >& vecMeteo)
const;
64 void readPPhase(
const Date& station_date,
const std::string& path,
const std::string& file_suffix,
const size_t& nrIDs, std::vector< std::vector<MeteoData> >& vecMeteo)
const;
65 void readFromFile(
const std::string& filename,
const MeteoData::Parameters& param,
const Date& in_timestep, std::vector<double> &vecData)
const;
66 void buildVecIdx(
const std::vector<std::string>& vecAcro);
67 void fillStationMeta();
69 size_t getFileIdx(
const Date& start_date)
const;
70 static void scanMeteoPath(
const std::string& meteopath_in,
const bool& is_recursive, std::vector< struct file_index > &meteo_files);
72 static double convertUnits(
const double& val,
const std::string& units,
const MeteoData::Parameters& param);
75 std::vector< struct file_index > cache_meteo_files;
76 std::vector<StationData> vecMeta;
77 std::vector<std::string> vecIDs;
78 std::vector< std::pair<MeteoData::Parameters, std::string> > params_map;
79 std::vector<size_t> vecIdx;
80 std::string in_meteopath, in_metafile;
83 static const char* meteo_ext;
A class representing the IO Layer of the software Alpine3D. For each type of IO (File, DB, Webservice, etc) a derived class is to be created that holds the specific implementation of the appropriate virtual methods. The IOHandler class is a wrapper class that is able to deal with all above implementations of the IOInterface abstract base class.
Definition: IOInterface.h:43
virtual void readStationData(const Date &date, std::vector< StationData > &vecStation)
Fill vecStation with StationData objects for a certain date of interest.
Definition: OshdIO.cc:363
static const double in_dflt_TZ
Definition: OshdIO.h:46
OshdIO(const std::string &configfile)
Definition: OshdIO.cc:251
Parameters
Definition: MeteoData.h:119
This plugin reads Matlab binary files, relying on the MatIO library.
Definition: OshdIO.h:35
A class that reads a key/value file. These files (typically named *.ini) follow the INI file format s...
Definition: Config.h:58
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: OshdIO.cc:370
A class to handle timestamps. This class handles conversion between different time display formats (I...
Definition: Date.h:79