#include <GridsManager.h>
Public Member Functions | |
GridsManager (IOHandler &in_iohandler, const Config &in_cfg) | |
void | read2DGrid (Grid2DObject &grid_out, const std::string &option="") |
Read the requested grid, according to the configured processing level. More... | |
void | read2DGrid (Grid2DObject &grid_out, const MeteoGrids::Parameters ¶meter, const Date &date, const bool &enable_grid_resampling=true) |
Read the requested grid, according to the configured processing level. More... | |
void | read3DGrid (Grid3DObject &grid_out, const std::string &i_filename="") |
void | read3DGrid (Grid3DObject &grid_out, const MeteoGrids::Parameters ¶meter, const Date &date) |
void | readDEM (DEMObject &dem_out) |
void | readAssimilationData (const Date &date_in, Grid2DObject &da_out) |
void | readLanduse (Grid2DObject &landuse_out) |
void | readGlacier (Grid2DObject &landuse_out) |
void | write2DGrid (const Grid2DObject &grid_in, const std::string &options="") |
void | write2DGrid (const Grid2DObject &grid_in, const MeteoGrids::Parameters ¶meter, const Date &date) |
void | write3DGrid (const Grid3DObject &grid_out, const std::string &options="") |
void | write3DGrid (const Grid3DObject &grid_out, const MeteoGrids::Parameters ¶meter, const Date &date) |
void | setProcessingLevel (const unsigned int &i_level) |
Set the desired ProcessingLevel. More... | |
void | clear_cache () |
const Config | getConfig () const |
Returns a copy of the internal Config object. This is convenient to clone an iomanager. More... | |
IOHandler & | getIOHandler () const |
Returns a copy of the internal IOHandler object. This is convenient to clone an iomanager. More... | |
std::vector< StationData > | initVirtualStationsAtAllGridPoints (const DEMObject &dem) const |
Create a list of virtual stations from each grid point. More... | |
std::vector< StationData > | initVirtualStations (const DEMObject &dem, const bool &adjust_coordinates, const bool &fourNeighbors) const |
Create a list of virtual stations from the user-provided input. More... | |
METEO_SET | getVirtualStationsFromGrid (const DEMObject &dem, const std::vector< size_t > &v_params, const std::vector< StationData > &v_stations, const Date &date, const bool &PtsExtract=false) |
Extract time series from grids at the specified points (virtual stations). More... | |
std::vector< METEO_SET > | getVirtualStationsFromGrid (const DEMObject &dem, const std::vector< size_t > &v_params, const std::vector< StationData > &v_stations, const Date &dateStart, const Date &dateEnd, const bool &PtsExtract=false) |
Extract time series from grids at the specified points (virtual stations). More... | |
const std::string | toString () const |
|
inline |
|
inline |
|
inline |
METEO_SET mio::GridsManager::getVirtualStationsFromGrid | ( | const DEMObject & | dem, |
const std::vector< size_t > & | v_params, | ||
const std::vector< StationData > & | v_stations, | ||
const Date & | date, | ||
const bool & | PtsExtract = false |
||
) |
Extract time series from grids at the specified points (virtual stations).
[in] | dem | the Digital Elevation Model to use to check the geolocalization of the grids |
[in] | v_params | the MeteoGrids parameter index that have to be extracted |
[in] | v_stations | a vector of StationData where to provide the meteorological data |
[in] | date | when to extract the virtual stations |
[in] | PtsExtract | use the method to only request points instead of full grids from the plugin? |
std::vector< METEO_SET > mio::GridsManager::getVirtualStationsFromGrid | ( | const DEMObject & | dem, |
const std::vector< size_t > & | v_params, | ||
const std::vector< StationData > & | v_stations, | ||
const Date & | dateStart, | ||
const Date & | dateEnd, | ||
const bool & | PtsExtract = false |
||
) |
Extract time series from grids at the specified points (virtual stations).
[in] | dem | the Digital Elevation Model to use to check the geolocalization of the grids |
[in] | v_params | the MeteoGrids parameter index that have to be extracted |
[in] | v_stations | a vector of StationData where to provide the meteorological data |
[in] | dateStart | when to start extracting the virtual stations |
[in] | dateEnd | when to stop extracting the virtual stations |
[in] | PtsExtract | use the method to only request points instead of full grids from the plugin? |
std::vector< StationData > mio::GridsManager::initVirtualStations | ( | const DEMObject & | dem, |
const bool & | adjust_coordinates, | ||
const bool & | fourNeighbors | ||
) | const |
Create a list of virtual stations from the user-provided input.
Please note that the two options are mutually exclusive.
[in] | dem | the Digital Elevation Model to use |
[in] | adjust_coordinates | should the coordinates be recomputed to match DEM cells? |
[in] | fourNeighbors | pick the surrounding four nodes instead of only the exact one? |
std::vector< StationData > mio::GridsManager::initVirtualStationsAtAllGridPoints | ( | const DEMObject & | dem | ) | const |
Create a list of virtual stations from each grid point.
Please note that the two options are mutually exclusive.
[in] | dem | the Digital Elevation Model to use (each grid point will be made into a virtual station) |
void mio::GridsManager::read2DGrid | ( | Grid2DObject & | grid2D, |
const MeteoGrids::Parameters & | parameter, | ||
const Date & | date, | ||
const bool & | enable_grid_resampling = true |
||
) |
Read the requested grid, according to the configured processing level.
If the grid has been buffered, it will be returned from the buffer. If it is not available but can be generated, it will be generated transparently. If everything fails, it will thrown an exception.
[out] | grid2D | a grid filled with the requested parameter |
parameter | the parameter to get | |
[in] | date | the timestamp that we would like to have |
[in] | enable_grid_resampling | Completely enable or disable temporal grid resampling. |
void mio::GridsManager::read2DGrid | ( | Grid2DObject & | grid2D, |
const std::string & | option = "" |
||
) |
Read the requested grid, according to the configured processing level.
If the grid has been buffered, it will be returned from the buffer. If it is not available but can be generated, it will be generated transparently. If everything fails, it will throw an exception.
[out] | grid2D | a grid filled with the requested parameter |
option | a parameter used to figure out which filename or grid to read |
|
inline |
|
inline |
void mio::GridsManager::readAssimilationData | ( | const Date & | date_in, |
Grid2DObject & | da_out | ||
) |
void mio::GridsManager::readDEM | ( | DEMObject & | dem_out | ) |
void mio::GridsManager::readGlacier | ( | Grid2DObject & | landuse_out | ) |
void mio::GridsManager::readLanduse | ( | Grid2DObject & | landuse_out | ) |
void mio::GridsManager::setProcessingLevel | ( | const unsigned int & | i_level | ) |
Set the desired ProcessingLevel.
The processing level affects the way meteo data is read and processed. Three values are possible:
This only affects the function getMeteoData(const Date&, METEO_DATASET&). The three values can be combined: e.g. IOUtils::filtered | IOUtils:resampled
i_level | The ProcessingLevel values that shall be used to process data |
const std::string mio::GridsManager::toString | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |