VegWriter¶
This page desctibes the class VegWriter
The class VegWriter
is used to write the vegetation data to a vegetation group in a qdf file.
- Code:
Public Methods¶
constructor
¶
VegWriter(Vegetation *pVeg);
The constructor.
write
¶
int write(hid_t hFile);
Write the vegetation 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 vegetation group and writes the vegetation 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¶
writeVegAttributes
¶
int writeVegAttributes(hid_t hClimateGroup);
Writes the vegetation attributes to the vegetation group in the qdf file.
hClimateGroup
HDF pointer to the climate group in the qdf file.
Returns 0 on success, -1 on failure.