ClimateGroupReader¶
This page describes the class ClimateGroupReader
The class ClimateGroupReader
reads attributes and arrays from the climate group of a qdf file.
This file extends the attribute structure:
struct ClimateAttributes : Attributes {
int m_iNumSeasons;
};
- Code:
Public Methods¶
createClimateGroupReader
¶
static ClimateGroupReader *createClimateGroupReader(const std::string sFileName);
static ClimateGroupReader *createClimateGroupReader(hid_t hFile);
Creates a ClimateGroupReader
object for a qdf file.
sFileName
Name of the file to read the climate data from.
hFile
HDF5 handle for the file to read the climate data from.
Returns a pointer to the ClimateGridGroupReader
object or NULL
on failure.
tryReadAttributes
¶
virtual int tryReadAttributes(ClimateAttributes *pAttributes);
Reads the attributes “NumCells” and “NumSeasons” from the climate group into the attribute structure.
pAttributes
A pointer to a
ClimateAttributes
object to hold the attributes.
Returns 0 on success, -1 on failure.
readArray
¶
virtual int readArray(Climate *pClimate, const std::string sArrayName);
Read the specified array from the “Climate” group of the qdf file.
pClimate
A pointer to the Climate object into which to read the array,
sArrayName
Name of the array in the “Climate” group of the qdf file.
Returns 0 on succes, or -1 on failure.
readData
¶
virtual int readData(Climate *pClimate);
Reads the arrays “ActualTemps”, “ActualRains”, “AnnualMeanTemp”, “AnnualRainFall”, “SeasonalTempDiff”, “SeasonalRainRatios” and “CurSeason”.
pClimate
A Pointer to a Climate object.
Returns 0 on succes, or -1 on failure.
Protected Methods¶
constructor
¶
ClimateGroupReader();
The constructor.