Yadr

From Cumulus Wiki

Introduction

This module provides access to the daily data as found in the dayfile.txt datafile. Only a limit number of weather variables is displayed as not all data are deemed important (like derivatives, EVT or wind direction). This is not the first Dayfile Reader and probably not the last therefore its name: YADR (Yet Another Dayfile Reader).

Other dayfile readers, notably the beteljuice one, use PHP, MySql and daily transfer of the Dayfile to the website which require a totally different technical and data infrastructure. If you wish you can simply use that one beside CumulusUtils. The tools don't bite each other.

The work of both beteljuice and Murry Conarroe of Wildwood Weather helped a lot in determining the how and what.

Operation

This module is included in the website. When needed as a single output the following command is given:

  utils/bin/cumulusutils.exe Yadr

Output

The output of the YADR module consists of the following files:

  1. Yadr.txt which contains the javascript menu, the css and the HTML container code.
  2. YadrTempYYYY.txt which contains the colour formatted data table for the temperature for year YYYY.
  3. YadrRainYYYY.txt which contains the colour formatted data table for the rain for year YYYY.
  4. YadrWindYYYY.txt which contains the colour formatted data table for the wind speed for year YYYY.
  5. YadrWindRunYYYY.txt which contains the colour formatted data table for the wind run for year YYYY.
  6. YadrPressYYYY.txt which contains the colour formatted data table for the pressure for year YYYY.
  7. YadrHumYYYY.txt which contains the colour formatted data table for the humidity for year YYYY.

See Thrifty for efficiency considerations.

Inifile parameters

The YADR module has no inifile parameters of its own. However, it borrows the parameter WindrunClassWidth from the Graphs section in order to create the legend for the Windrun table. As a result - and in the rare occasion of - IF you only use YADR, you will notice the WindrunClassWidth parameter in the graphs section even though you do not use graphs.

Inner working

In a simple loop of the years, the tables are created in three steps:

  1. Within simple loops over days and months the formatted table of values is created
  2. Within a simple loop over the months the statistics are calculated using the LINQ functions Count, Sum, Min, Max and Average.
  3. Finally the legend is written assuming a fixed number of thirteen classes dividing the space between the assumed extremes. The extremes can be limits (never a negative amount of rain) or open values (there is no upper or lower limit for temperature) for which the legend is adapted.