Climate¶
This page describes the class Climate
The Climate
class contains various climate data.
All data items are associated with a node of the SCellGrid.
Initially the climate data was used to calculate net primary production. Currently the climate data is not used in QHG because there are simulated NPP data sets for the past.
- Code:
Public Members¶
uint m_iNumCells;
Number of cells.
climatecount m_iNumSeasons;
Number of seasons.
Geography *m_pGeography;
Pointer to Geography object.
climatecount m_iSeasonMonths;
Season size in months (1,2,3,4,6,12).
climatecount m_iCurSeason;
Current season (0,…m_iSeasonStep-1).
climatenumber *m_adActualTemps;
Actual temperatures.
climatenumber *m_adActualRains;
Actual seasonal rainfall.
climatenumber *m_adAnnualMeanTemp;
Current annual mean temperature.
climatenumber *m_adAnnualRainfall;
Current annual total rainfall.
climatenumber **m_aadSeasonalTempD;
Differences of seasonal temperature to mean annual temperature.
climatenumber **m_aadSeasonalRainR;
Ratios of seasonal rainfall to total annual rainfall.
bool m_bUpdated;
Update flag.
Public Methods¶
constructor
¶
Climate(uint iNumCells, climatecount iNumSeasons, Geography *pGeography);
iNumCells
Number of grid cells.
iNumSeasons
Number of seasons.
pGeography
Pointer to a Geography object.
The constructor allocates the arrays by calling prepareArrays()
.
destructor
¶
virtual ~Climate();
The destructor deletes all allocated arrays.
prepareArrays
¶
void prepareArrays();
This method allocates all arrays needed by this class.
setSeason
¶
void setSeason(climatecount iSeason=0);
Sets current season (only used if there is different climate data for various seasons).
resetUpdated
¶
inline void resetUpdated() { m_bUpdated = false; };
Reset update state.