ClimateWriter

The class ClimateWriter is used to write the climate data to the climate group in a qdf file.

Code:

Public Methods

constructor

ClimateWriter(Climate *pC);

The constructor.

write

int write(hid_t hFile);

Write the climate data to an open qdf file.

hFile

HDF handle to the opened file.

writeToQDF

int writeToQDF(const std::string sFileName, int iStep,
               float fStartTime,            const std::string sInfoString);

Creates a new qdf file, creates a climate group and writes the climate data to it.

sFileName

Name of output file.

iStep

The current simulation step. This number is saved as an attribute in the output file’s root group.

fStartTime

The start time of the simulation (i.e. the ‘real’ time at step 0). This number is also saved as an attribute in the output file’s root group.

sInfoString

An arbitrary string which will be saved as an attribute in the output file’s root group.

Returns 0 on success, -1 on failure.

Protected Methods

writeClimateAttributes

int writeClimateAttributes(hid_t hClimateGroup);

Writes the climate attributes to the climate group in the qdf file.

hClimateGroup

HDF pointer to the climate group in the qdf file.

Returns 0 on success, -1 on failure.