Weather from db
This unit contains the process Weather. It reads weather data from a database that contains daily data for a series of years.
It has a number of modes by which years can be drawn from the database:
- sequential from the first to the last year in the series. The sequence is repeated once the last year has been used. The series in the database should not contain any gaps, for then year + 1 would not be found.
- randomly from a uniform or from a biased distribution. The database must have a query (
qryGetOrderedYears} the returns the years ordered from dry to wet. Based on
WeatherYear, the random selection is truly random (
WeatherYear="random"), or biased to the dry end the centre, or the wetter end (
WeatherYear="dry", "avg", or "wet" respectively).
- the same year everytime. To to this, a label (e.g. "wet") can be assigned to one year in the database and drawn if
WeatherYearcontains the same label.
- programmatically a year may be selected by setting CurrentYear.
In addition, temperature and CO2 can be changed over time by manipulation of TemperatureOffset, AmbientCO2Multiplier and GlobalChangeFactor.