Public Member Functions | Protected Member Functions | Protected Attributes

GMAOFileData Class Reference

Inheritance diagram for GMAOFileData:
Inheritance graph
[legend]
Collaboration diagram for GMAOFileData:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 GMAOFileData (const string &name="", const int geos_version=0)
 constructor
 ~GMAOFileData ()
 Destructor.
void get_sds_fill_value (const string &sds_name, void *fill_value)
 read the fill value of the sds given in parametre This overrides the hdffiledata get_sds_fill_value method because in GMAO files, the fill value has a non standard name "missing_value"
string get_product_id () const
 Accessor to the product ID.
int get_geos_version () const
 Accessor to the GEOS version.

Protected Member Functions

bool check_filename (const string &short_filename) const
void parse_filename (const string &short_filename)
void load_height_level ()
 if not already set, read the pressure levels in the file If the product is a 2D one, no pressure levels are defined. In this case, nothing's done.
void load_time_level ()
 if not already set, read the time levels in the file If the product is a 2D one, no time levels are defined. In this case, nothing's done.

Protected Attributes

int lat_lon_index_max [2]
 the bigger valid indexes for the geolocation : format {lat_index, lon_index}

Detailed Description

to manage the reading of GMAO meteo files


Constructor & Destructor Documentation

GMAOFileData::GMAOFileData ( const string &  name = "",
const int  geos_version = 0 
)

constructor

Parameters:
name the name (path included) of the file to be opened
geos_version the geos version of the product. If 0 (default), the class tries to automatically set it

References parse_filename().


Member Function Documentation

bool GMAOFileData::check_filename ( const string &  short_filename  )  const [protected]

Check is a the file is a valid meteo data file ( the analysis is done with a filename parsing, not with parsing the data inside )

Parameters:
short_filename string : the filename without its path
Returns:
bool : true if the filename seems to be valid, false else or in case of problem (exception...)

Referenced by parse_filename().

int GMAOFileData::get_geos_version (  )  const [inline]

Accessor to the GEOS version.

Returns:
the GEOS major version number
string GMAOFileData::get_product_id (  )  const [inline]

Accessor to the product ID.

Returns:
the product ID
void GMAOFileData::get_sds_fill_value ( const string &  sds_name,
void *  fill_value 
)

read the fill value of the sds given in parametre This overrides the hdffiledata get_sds_fill_value method because in GMAO files, the fill value has a non standard name "missing_value"

Parameters:
sds_name the name of the sds where to read the fill value
fill_value (output) the read value. Must not be NULL

References HDFFileData::get_hdf_file().

void GMAOFileData::parse_filename ( const string &  short_filename  )  [protected]

Once the filename has been checked (that's a precondition : no verification on it are done in this method), some informations can be extracted of it :

  • the date
  • the hour
    Parameters:
    short_filename string : the filename without its path

References check_filename(), FileData::date, and Date::set_date_str().

Referenced by GMAOFileData().


The documentation for this class was generated from the following files: