#include <meteofiledata.h>


Public Member Functions | |
| MeteoFileData (const std::string &name, const std::string &mode="r") | |
| constructor | |
| virtual | ~MeteoFileData () |
| destructor | |
| const unsigned short | get_nb_height_level () |
| access to the number of height levels | |
| const double * | get_height_level () |
| return the height level values | |
| const unsigned short | get_nb_time_level () |
| access to the number of time levels load the time level if needed | |
| const double * | get_time_level () |
| return the time level values load the time level if needed | |
| virtual double | get_time_min () const |
| access to the time of the start of the acquisition | |
| virtual double | get_time_max () const |
| access to the time of the end of the acquisition | |
| virtual const int | get_lat_index (const float &lat) const |
| return the index of the grid latitude that is the nearest to lat. | |
| virtual const int | get_lon_index (const float &lon) const |
| return the index of the grid longitude that is the nearest to lon. | |
| virtual const int | get_time_index (const double &time) const |
| return the index of the grid time that is the nearest to lon. | |
| virtual const bool | get_index (const float &lat, const float &lon, int *index) const |
| search the indexes of the data coincident with the point (lat,lon) If the coincidence can't be found, the output indexes index will be set to {-1,-1} | |
| virtual const bool | get_index (const float &lat, const float &lon, const double &time, int *index) |
| search the indexes of the data coincident with the point (lat,lon,time) If the coincidence can't be found, the output indexes index will be set to {-1,-1,-1} | |
| short | get_nb_time_level () const |
| get the number of time levels for this type of meteo file | |
| double | get_delta_time () const |
| accessor to the time step between 2 successive time | |
| double | get_delta_lat () const |
| accessor to the time step between 2 successive grid latitudes | |
| double | get_delta_lon () const |
| accessor to the time step between 2 successive grid longitudes | |
Protected Member Functions | |
| virtual bool | check_filename (const std::string &filename) const =0 |
| check is a the file seems to be a valid meteo data file The analysis is done with a filename parsing, not with parsing the data inside | |
| virtual void | parse_filename (const std::string &filename)=0 |
| extract some informations using the filename (acquisition start time,etc) PRECONDITION the file name must be valid. The validity check is done by check_filename | |
| virtual const bool | is_height_level_loaded () const |
| check if the height levels have already been set | |
| virtual void | load_height_level () |
if not already set, read the height levels in the file To implement this interface : the method must :
| |
| void | free_height_level () |
| if loaded, free the height levels If the product is a 2D one, no height levels are defined. In this case, nothing's done. | |
| virtual const bool | is_time_level_loaded () const |
| check if the time levels have already been set | |
| virtual void | load_time_level ()=0 |
if not already set, read the time levels in the file To implement this interface : the method must :
| |
| void | free_time_level () |
| if loaded, free the time levels | |
Protected Attributes | |
| double | delta_time |
| The time resolution. | |
| double | delta_lat |
| The average step between two latitudes. | |
| double | delta_lon |
| The average step between two longitudes. | |
| short | nb_height_level |
| The number of different heights levels (depend of the meteo file). | |
| double * | height_level |
| the height levels (the Z axis for 3D products) For 2D products, will always be NULL | |
| short | nb_time_level |
| The number of different times levels (depend of the meteo file). | |
| double * | time_level |
| the time stamp of each measure | |
Generic abstract interface to manage the reading of meteo files
| MeteoFileData::MeteoFileData | ( | const std::string & | name, | |
| const std::string & | mode = "r" | |||
| ) |
constructor
| name | the filename (with the path) | |
| mode | opening mode. only "r" at this time |
References delta_lat, delta_lon, delta_time, height_level, nb_height_level, nb_time_level, FileData::time_coverage, and time_level.
| virtual bool MeteoFileData::check_filename | ( | const std::string & | filename | ) | const [protected, pure virtual] |
check is a the file seems to be a valid meteo data file The analysis is done with a filename parsing, not with parsing the data inside
| filename | the filename without its path |
| double MeteoFileData::get_delta_lat | ( | ) | const [inline] |
accessor to the time step between 2 successive grid latitudes
References delta_lat.
| double MeteoFileData::get_delta_lon | ( | ) | const [inline] |
accessor to the time step between 2 successive grid longitudes
References delta_lon.
| double MeteoFileData::get_delta_time | ( | ) | const [inline] |
accessor to the time step between 2 successive time
References delta_time.
| const double * MeteoFileData::get_height_level | ( | ) |
| const bool MeteoFileData::get_index | ( | const float & | lat, | |
| const float & | lon, | |||
| int * | index | |||
| ) | const [virtual] |
search the indexes of the data coincident with the point (lat,lon) If the coincidence can't be found, the output indexes index will be set to {-1,-1}
| lat | the latitude | |
| lon | the longitude | |
| index | the output indexes as a 2 values array. Mustn't be NULL |
References get_lat_index(), and get_lon_index().
| const bool MeteoFileData::get_index | ( | const float & | lat, | |
| const float & | lon, | |||
| const double & | time, | |||
| int * | index | |||
| ) | [virtual] |
search the indexes of the data coincident with the point (lat,lon,time) If the coincidence can't be found, the output indexes index will be set to {-1,-1,-1}
| lat | the latitude | |
| lon | the longitude | |
| time | the time (using TAI convention : in sec since the 1993/01/01) | |
| index | the output indexes as a 3 values array. Mustn't be NULL |
References get_lat_index(), get_lon_index(), get_time_index(), load_time_level(), and time_level.
| const int MeteoFileData::get_lat_index | ( | const float & | lat | ) | const [virtual] |
return the index of the grid latitude that is the nearest to lat.
| lat | the latitude |
References delta_lat.
Referenced by get_index().
| const int MeteoFileData::get_lon_index | ( | const float & | lon | ) | const [virtual] |
return the index of the grid longitude that is the nearest to lon.
| lon | the longitude |
References delta_lon.
Referenced by get_index().
| const unsigned short MeteoFileData::get_nb_height_level | ( | ) |
access to the number of height levels
References nb_height_level.
| short MeteoFileData::get_nb_time_level | ( | ) | const [inline] |
get the number of time levels for this type of meteo file
References nb_time_level.
| const unsigned short MeteoFileData::get_nb_time_level | ( | ) |
access to the number of time levels load the time level if needed
References nb_time_level.
| const int MeteoFileData::get_time_index | ( | const double & | time | ) | const [virtual] |
return the index of the grid time that is the nearest to lon.
| time | the time |
References FileData::date, delta_time, Date::get_TAI93_time(), nb_time_level, and FileData::time_coverage.
Referenced by get_index().
| const double * MeteoFileData::get_time_level | ( | ) |
return the time level values load the time level if needed
References time_level.
| double MeteoFileData::get_time_max | ( | ) | const [virtual] |
access to the time of the end of the acquisition
References FileData::date, Date::get_TAI93_time(), and FileData::time_coverage.
| double MeteoFileData::get_time_min | ( | ) | const [virtual] |
access to the time of the start of the acquisition
References FileData::date, and Date::get_TAI93_time().
| const bool MeteoFileData::is_height_level_loaded | ( | ) | const [protected, virtual] |
check if the height levels have already been set
References height_level.
| const bool MeteoFileData::is_time_level_loaded | ( | ) | const [protected, virtual] |
check if the time levels have already been set
References time_level.
| virtual void MeteoFileData::parse_filename | ( | const std::string & | filename | ) | [protected, pure virtual] |
extract some informations using the filename (acquisition start time,etc) PRECONDITION the file name must be valid. The validity check is done by check_filename
| filename | the filename without its path |
1.7.1