34 BUFRFile(
const std::string &filename,
const std::string& ref_coords,
bool verbose =
false,
double default_timezone =
IOUtils::nodata);
39 void readData(std::vector<METEO_SET> &vecMeteo, std::map<std::string,size_t>& station_ids,
const std::vector<std::string> &additional_params);
41 const std::map<std::string, StationData>&
getMetadata()
const {
return meta_data; };
43 bool hasMultipleSubets(
const size_t &msg_index)
const {
return subset_numbers[msg_index] > 1; };
47 std::map<std::string, StationData> meta_data;
48 std::map<std::string, double> station_timezones;
53 double default_timezone;
55 bool isMeteoTimeseries;
58 std::vector<size_t> subset_numbers;
60 std::vector<std::string> station_ids_in_file;
65 bool isNewStation(
const std::string &station_id) {
return station_ids_in_file.end() == std::find(station_ids_in_file.begin(), station_ids_in_file.end(), station_id); };
66 double getNumSubsets(
CodesHandlePtr &message,
double default_value);
67 void processSubsets(
CodesHandlePtr &message,
const std::string &ref_coords,
const size_t& num_subsets, std::map<std::string, std::set<Date>> &station_dates);
68 void processNewStation(
const std::string &station_id,
const StationData &new_meta,
const Date &new_date, std::map<std::string, std::set<Date>> &station_dates);
69 void processExistingStation(
const std::string &station_id,
const StationData &new_meta,
const Date &new_date, std::map<std::string, std::set<Date>> &station_dates);
70 void updateDateRange(
const Date &new_date);
71 void updateStationIdsMapping(std::vector<METEO_SET> &vecMeteo, std::map<std::string, size_t>& station_ids_mapping);
72 void processMessage(std::vector<METEO_SET> &vecMeteo, std::map<std::string, size_t>& station_ids_mapping,
const std::vector<std::string> &additional_params,
CodesHandlePtr &message,
size_t msg_id);
Definition: BUFRFile.h:32
void readMetaData(const std::string &ref_coords)
Definition: BUFRFile.cc:192
bool hasMultipleSubets(const size_t &msg_index) const
Definition: BUFRFile.h:43
BUFRFile(const std::string &filename, const std::string &ref_coords, bool verbose=false, double default_timezone=IOUtils::nodata)
Definition: BUFRFile.cc:30
void readData(std::vector< METEO_SET > &vecMeteo, std::map< std::string, size_t > &station_ids, const std::vector< std::string > &additional_params)
Definition: BUFRFile.cc:287
const std::map< std::string, StationData > & getMetadata() const
Definition: BUFRFile.h:41
A class to handle timestamps. This class handles conversion between different time display formats (I...
Definition: Date.h:87
This namespace handles all the low level manipulation of GRIB and BUFR files with ecCodes.
const double nodata
This is the internal nodata value.
Definition: IOUtils.h:75
std::unique_ptr< codes_handle, HandleDeleter > CodesHandlePtr
Definition: libcodes.h:52