Dayfile.txt: Difference between revisions

206 bytes removed ,  11:47, 2 June 2021
m
cut
m (→‎Introduction: add link)
m (cut)
Line 5: Line 5:
Cumulus maintains a daily log file that holds the highs and lows of each day, as well as a few other nuggets of information. In all flavours of Cumulus, this file is only updated (with exclusive lock) during the end of meteorological day process. In that process it is also read, if the generation of NOAA reports has been requested.
Cumulus maintains a daily log file that holds the highs and lows of each day, as well as a few other nuggets of information. In all flavours of Cumulus, this file is only updated (with exclusive lock) during the end of meteorological day process. In that process it is also read, if the generation of NOAA reports has been requested.


Both Cumulus 1 and MX have ways to [[Amending dayfile|edit '''dayfile.txt''']] while Cumulus is running. Cumulus 2 does not even allow you to view this log file.  If you have a file created by Cumulus 1 (C1), please note that Cumulus 1 is not as fussy as MX about the character used to separate different parts of the date. Also MX uses the locale to decide what character (decimal comma or decimal point) separates integer and decimal parts of numbers, so for MX to read a file created by C1, the MX locale must match the Windows settings.
Both Cumulus 1 and MX have ways to [[Amending dayfile|edit '''dayfile.txt''']] while Cumulus is running. Cumulus 2 does not even allow you to view this log file.   
 
==[[File:Badge vMx.png]] WARNING==
 
It is important to note that MX is very fussy about consistency in all lines of '''dayfile.txt'''.
 
MX reads the entire '''dayfile.txt''' file, to drive the  '''historic charts functionality'''; both in the [[MX Administrative Interface|admin interface]], and the example included [[New Default Web Site Information|web page]]. Consequently, any error in say the date field (or change of separating character) will stop historic charts working.
 
Date field: Cumulus 1 did not care what character (or characters) separated the day, month, and year elements of the date field. MX insists that the same character (or characters), as defined in the locale, is used for all lines in file.  
 
Real number fields: MX uses the locale to decide what character (decimal comma or decimal point) separates integer and decimal parts of numbers. Every line of the file must be consistent in use of integer/decimal separator.
 
Number of fields: The number of fields in the file increases in various versions as shown at the end of this article.  C1 can cope with 15 to 45 fields in each line. MX (except for the early releases) assumes 48 fields in each line. If you have some lines in your file that were created by an earlier release of Cumulus, and so have less than 48 fields, you can add the missing derived fields, please see [[Calculate Missing Values]] page.
 
Please see [[Amending dayfile]] page for information about how to edit this file.


Please see [[Correcting Extremes]] page for information about fixing where the highest/lowest/total recorded for day has been corrupted by rogue values.  
Please see [[Correcting Extremes]] page for information about fixing where the highest/lowest/total recorded for day has been corrupted by rogue values.  


The number of fields in the file increases in various versions as shown at the end of this article.  C1 can cope with 15 to 45 fields in each line. MX (except for the early releases) assumes 48 fields in each line. If you have some lines in your file that were created by an earlier release of Cumulus, and so have less than 48 fields, you can add the missing derived fields, please see [[Calculate Missing Values]] page.
 


{{TOCright}}
{{TOCright}}


[[File:Badge vMx.png]]In MX only, the figures contained in the file are used for the historic charts functionality; both in the admin interface, and the example included web page.
{{Version badge 1}}In Cumulus 1 only, the figures contained in the file are used for the 'This period' display (and the month/year displays) accessed from the '''View''' menu; and to build any graphs based on daily values.




Line 22: Line 33:
Be aware that this article was written for Cumulus 1, amended to also cover MX 3.0.0.  Whilst the list of fields has been kept updated for more recent MX versions, other parts of this article may not be applicable to latest MX version, check for edits by developer.
Be aware that this article was written for Cumulus 1, amended to also cover MX 3.0.0.  Whilst the list of fields has been kept updated for more recent MX versions, other parts of this article may not be applicable to latest MX version, check for edits by developer.


===Notes for Legacy Cumulus===
==={{Version badge 1}} Notes for Legacy Cumulus===
 
In Cumulus 1 only, the figures contained in the file are used for the 'This period' display (and the month/year displays) accessed from the '''View''' menu; and to build any graphs based on daily values.
*The original Cumulus software reads the contents of '''dayfile.txt''' for many of the display and edit menu options that can be selected from the main Cumulus 1 screen.
**As the file is read each time you select to display a period, or update for a new period, you will see the results of any edit of dayfile.txt, whether with in-built editor or an external editor.


{{Version badge 1}}
*'''Note for obsolete version 1.9.0 to 1.9.3:''' There is a bug in these versions in that 'Create missing' inserts 'heating and cooling degree day' values the wrong way round.
*'''Note for obsolete version 1.9.0 to 1.9.3:''' There is a bug in these versions in that 'Create missing' inserts 'heating and cooling degree day' values the wrong way round.
*'''Note for obsolete version 1.9.3 only:''' Create missing might in some cases be affected by a bug in 1.9.3 that can cause incorrect date order for records (dayfile.txt uses dd/mm/yy  or dd-mm-yy and all records should be in ascending chronological order)
*'''Note for obsolete version 1.9.3 only:''' Create missing might in some cases be affected by a bug in 1.9.3 that can cause incorrect date order for records (dayfile.txt uses dd/mm/yy  or dd-mm-yy and all records should be in ascending chronological order)
*There are no known bugs for dayfile.txt handling in version 1.9.4 builds 1086 to 1101. Build 1099 is the standard stable final release of Cumulus 1 for most weather station types, 1100 and 1101 are for specific weather station types.
*There are no known bugs for dayfile.txt handling in version 1.9.4 builds 1086 to 1101. Build 1099 is the standard stable final release of Cumulus 1 for most weather station types, 1100 and 1101 are for specific weather station types.


= When Cumulus is left running =
* Cumulus is frequently reading observations from your weather station.
* Cumulus tracks the highs and lows in weather observations by comparing read values against those it has stored in [[Today.ini]], updating that file as required.
*{{Version badge 1}}The original Cumulus software reads the contents of '''dayfile.txt''' for many of the display and edit menu options that can be selected from the main Cumulus 1 screen.
**As the file is read each time you select to display a period, or update for a new period, you will see the results of any edit of dayfile.txt, whether with in-built editor or an external editor.
[[File:Badge vMx.png]]
*'''Cumulus MX beta version 3.0.0 (checked at build 3043) does not provide an editor'''
*'''Cumulus MX Version 3.4.5 - Build 3069 onwards provides an editor'''
*From MX release 3.9.2 - b3097 historic charts are added to admin interface
**If you use the in-built editor to update dayfile.txt, your change will be reflected in the historic graphs
**If you edit dayfile.txt outside Cumulus MX, historic graphs will not be updated until Cumulus MX is restarted


== When Cumulus processes the end of the (meteorological) day ==
== When Cumulus processes the end of the (meteorological) day ==
Line 48: Line 48:
*A new row is appended to dayfile.txt, the values are prepared from reading "today.ini" file, not all values available in "today.ini" are stored in dayfile.txt.
*A new row is appended to dayfile.txt, the values are prepared from reading "today.ini" file, not all values available in "today.ini" are stored in dayfile.txt.
*Some of this information is also stored in [[yesterday.ini]].
*Some of this information is also stored in [[yesterday.ini]].
*Back ups of both today.ini, and dayfile.txt, log files ''in their state '''after''' the end of day update'' are copied to [[Backup folder]].
*Back ups of both today.ini, and dayfile.txt, log files ''in their once a day state (either '''before''' or '''after''' changes in the end of day update'', depending on which version you have running) are copied to [[Backup folder]].


===Options for reading dayfile.txt for other uses===
===Options for reading dayfile.txt for other uses===
5,838

edits