RENAME input editing command.
It is possible to rename a meteorological parameter thanks to the RENAME key. This key can take multiple source names that will be processed in the order of declaration and renamed into a single destination name. Original names that are not found in the current dataset will silently be ignored, so it is safe to provide a list that contain many possible names:
This can be used to rename non-standard parameter names into standard ones. In this example, if TA already had some values, it will keep those and only points not having a value will be filled by either air_temp or air_temperature or temperature_air (the first one in the list to have a value has the priority).
#include <DataEditingAlgorithms.h>
Public Member Functions | |
EditingRename (const std::string &i_stationID, const std::vector< std::pair< std::string, std::string > > &vecArgs, const std::string &name, const Config &cfg) | |
virtual void | editTimeSeries (std::vector< METEO_SET > &vecMeteo) |
Apply this editing block. More... | |
Public Member Functions inherited from mio::EditingBlock | |
EditingBlock (const std::string &i_stationID, const std::vector< std::pair< std::string, std::string > > &vecArgs, const std::string &name, const Config &cfg) | |
virtual | ~EditingBlock () |
virtual void | editTimeSeries (std::vector< METEO_SET > &vecMeteo) |
Apply this editing block. More... | |
virtual void | editTimeSeries (STATIONS_SET &vecStation) |
Apply this editing block to the StationData. More... | |
virtual std::set< std::string > | requiredIDs () const |
Get the station IDs this editing block depends on for this station. More... | |
virtual std::set< std::string > | providedIDs () const |
Get the station IDs this editing block provides based on this station. More... | |
virtual std::set< std::string > | purgeIDs () const |
Get the station IDs to purge after using them for this station ID. More... | |
const std::string | toString () const |
Additional Inherited Members | |
Protected Member Functions inherited from mio::EditingBlock | |
std::string | getName () const |
bool | skipStation (const std::vector< MeteoData > &vecMeteo) const |
Return true if this station ID should be skipped. More... | |
METEO_SET | timeFilterFromStation (const METEO_SET &vecMeteo) const |
Prepare a station that will be merged in case of time restrictions. More... | |
Static Protected Member Functions inherited from mio::EditingBlock | |
static std::set< std::string > | initStationSet (const std::vector< std::pair< std::string, std::string > > &vecArgs, const std::string &keyword) |
Protected Attributes inherited from mio::EditingBlock | |
const std::set< std::string > | excluded_stations |
const std::set< std::string > | kept_stations |
const std::vector< DateRange > | time_restrictions |
const std::string | stationID |
const std::string | block_name |
mio::EditingRename::EditingRename | ( | const std::string & | i_stationID, |
const std::vector< std::pair< std::string, std::string > > & | vecArgs, | ||
const std::string & | name, | ||
const Config & | cfg | ||
) |
|
virtual |
Apply this editing block.
This applies the editing block for its station that has been declared in the constructor on the provided MeteoData timeseries.
vecMeteo | MeteoData timeseries for all stations |
Reimplemented from mio::EditingBlock.