5,838
edits
m (→Table listing Fields: release 3.20.0) |
m (Correcting Typos (mostly missing, but critical, colon characters in links), and mention of some more release 3.20.0 changes) |
||
As part of a redevelopment of Wiki, this page has been simplified, by moving some content to new pages. Old links in the support forum, that were to content no longer on this page, will bring you here.
'''Content previously on this page has been moved as follows''':
* Explanations about Cumulus terminology can be accessed from [[:Category:Terminology]] page
* Each line in this file represents one day, but the start time need not be same for all fields,
** If you import historic data from before you started using Cumulus into [[Standard log files]],
** then see [[Calculate Missing Values]] page for how to generate new lines in dayfile.txt
* Cumulus MX is more fussy, than Cumulus 1, about various
The content that remains on this page is summarised by the table of contents that follows.
* This Wiki page describes one of the [[:Category:Cumulus Files|files]] not included in any release download.
* This daily summary file (Steve Loft shortened that to "day" plus "file") uses a ".txt" extension, and is essentially a plain text file in CSV format.
** CSV stands for "Comma Separated Values", but in the Cumulus context the field separator can be other characters including ";" or "|"
* The file is created in [[
* Cumulus MX reads the whole of this file
** So if you move house, it is probably best to archive the old "dayfile.txt", and avoid any discontinuities in any graphs plotted from active file▼
** Please see [[Amending_dayfile#Warning_if_editing_outside_MX|here for implications]]
▲**
* Thus it is worth backing up this file, to another device than that running Cumulus, on a regular basis, probably a few times a week, to ensure this precious data is not lost if your device running Cumulus has a malfunction (or is damaged), or an electrical blip (or mistake by you) causes corruption to the original file,
Cumulus does periodically copy this file within the installation, but the copies are only kept for a limited time, and are on the same physical storage device, and so your main file is corrupted you might not be able to access the Cumulus back up or might not be able to go far back enough
* The file is backed up when MX is restarted into a date/time stamped sub-folder of the [[Backup folder|'''backup''' folder]]
*The file is also backed up (to a date/time stamped sub-folder within '''daily''' sub-folder of that backup sub-folder) during the end of day process, but (depending on the release you are running) the back-up copy may, or may not, include a line for the previous day (the line that is appended in the same end of day)
Retention of these back ups:
* [[File:Badge vMx.png]] MX only keeps the last 9 of the date/time stamped
* [[File:Badge v1.png]] Legacy Cumulus 1 only keeps up to 8 of the date/time stamped
== Specific issues for MX ==
WARNING: It is important to note that some releases of MX are very fussy about consistency in all lines of '''dayfile.txt'''. Earlier releases tended to have better compatibility with the legacy software. Subsequent releases expected every line to be expressed exactly as specified in the locale. MX in its latest release is trying to cope better with inconsistent date separators
Date field: Cumulus 1 (C1) 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. C1 used the '''Region''' settings in Microsoft's Control Panel to determine how to store (and output) numbers for you, but (except if ''list separation character'' was comma) was fairly tolerant when reading old data in files. At the time of writing this, it was proposed the next major release will force this file to use decimal points (full stops not commas) regardless of locale. This proposal may or may not happen, the point is that information here might be incorrect for the release that you are using.
Time-stamp fields: MX insists on HH:mm format being consistently used in every line of file, C1 did not care what (non-space, non-field separator) symbol separated the minutes from the hours.
Number of fields: The number of fields in the file increases in various versions as shown in [[#List_of_fields]].
* C1 will accept (as did Cumulus 2) any line with 15 to 45 fields in it. This is because the earliest version only stored 15 fields, as C1 was developed fields were added (as shown in field list) until there were 45 fields.
* Each release of MX
** If you have some lines in your file that were created by an earlier release of Cumulus, and so have less than whatever is the current number of fields for the release you are using, there is a utility to run that will create a new dayfile.txt with all fields populated, please see [[Calculate Missing Values]] page. Please ensure you use the right version of the "Create Missing" utility mentioned on that page as it also get upgraded when fields are added, and it uses various software libraries contained within .dll files specific to a particular CumulusMX.exe release.
==How to view or edit this file==
An editor has been included within Cumulus:▼
* [[File:Badge vMx.png]] From release 3.4.5 (13 Mar 2020) onwards: In [[MX_Administrative_Interface#The_Data_Log_Viewing_and_Editing_interface|the interface]] go to '''Data logs''' menu and select ''Dayfile''▼
▲An editor has been included within recent Cumulus releases of each flavour:
* [[File:Badge v1.png]] From version 1.9.2 (5th October 2011) to final legacy release: On Main Screen from [[Cumulus_Screenshots#File.2FEdit.2FHelp_Menu|'''Edit''' menu]] select ''Dayfile.txt''▼
▲* [[File:Badge vMx.png]]
▲* [[File:Badge v1.png]]
**'''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 lines to be stored in incorrect date order (dayfile.txt uses dd.mm.yy, dd/mm/yy or dd-mm-yy, for its date field; and all lines 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.
▲For detailed information, please see [[Amending dayfile|viewing/editing '''dayfile.txt''']].
The MX editor does not let you change the date, you can only change other fields or delete an entire line, so you have no control over the order of the lines in the file.
==Reading the file==
See [[Daily Summary]] page for a full discussion of ways, external to Cumulus, to read this file.
Apart from the viewing/editing options just described, Cumulus software reads this daily summary file in
* [[File:Badge vMx.png]] From release 3.9.2 - b3097 (7 Dec 2020), MX reads the entire '''dayfile.txt''' file, to drive the [[Highcharts_-_Historic|'''historic charts functionality''']]; both in the [[MX Administrative Interface|interface]], and the example included [[New Default Web Site Information|Historic Charts web page]]. ▼
* [[File:Badge v1.png]] The legacy software only reads the file when the Cumulus user makes a specific request, in normal operation the existing content is ignored:
** The legacy Cumulus has a number of [[Cumulus_Screenshots#View_data|screens for viewing data for various periods]], to populate these screens Cumulus has to read all of the [[:Category:Files with Comma Separated Values|Files with Comma Separated Values]] as the derivatives shown generally do not match the extremes tracked in [[:Category:Ini Files|.Ini files]].
** The '''Select a graph''' feature also uses all of the [[:Category:Files with Comma Separated Values|Files with Comma Separated Values]].
** The end of day action uses a simple "append" instruction, so it does not need to read the file
▲* [[File:Badge vMx.png]]
** From release 3.20.0 - b3200 (21 Aug 2022) there is a '''This Period Highs and Lows''' web page (accessed from ''Records'' menu) which is similar to the ''screens for viewing data for various periods'' except that the extremes it shows match those tracked in [[:Category:Ini Files|.Ini files]].
** From release 3.20.0 - b3200 (21 Aug 2022) there is an option to '''Reload dayfile''' in a ''Utils'' menu, this updates the internal held array by reading the file again; essential if an edit has been made to the file.
==Line numbering and Error messages==
Cumulus MX stores the contents of the file in an internal two dimensional array. The outer dimension is identified by numbering (from zero) what were lines in the file. The inner dimension has that line number as element zero, and the fields taken from file are therefore numbered from one.
Obviously, line numbering uniquely identifies the line, even if a date is duplicated, or a line feed has been deleted so two lines are merged in the file. This is why you will see line numbers quoted in any error messages related to this file.
Some of the editors you may use to view/edit the file may number the lines (in some cases always, in others as an option). If you have seen an error message, then to correct the file you need to use a tool that does number the lines in order to find where the correction is needed. Error messages report just the first error found, so check subsequent lines in case they have same error.
= List of fields in dayfile.txt =
That file has changed location from release 3.20.0 - b3200 (21 Aug 2022), it is now in [[data folder]], for Cumulus 1 and all earlier MX releases it was in same directory as the Cumulus executable.
As explained earlier, the number of fields in a line has (with one exception when fields were added in error) increased as the Cumulus software has been developed. The table below therefore groups the fields under labels that indicate which version/release introduced them.
==Field numbering==
The table below was first created when the only flavour of Cumulus software available was what we now call the legacy Cumulus 1. Back then the fields '''were''' numbered starting from zero. This reflected the way fields were identified when processed as elements of an single-dimension array variable representing a line.
Please note the list of fields has been rewritten especially for MX. As part of the rewrite, the fields have been renumbered, in some forum posts you might see references to old numbering, in others to new numbering.▼
▲** Cumulus 1 does not actually number lines, however it does count lines as it reads them, so if there is an error when it reads the file, the original Cumulus will report the line number where it first found an error (this uniquely identifies the line even if a date is duplicated or a line feed has been deleted so two lines are merged).
▲** Please note that the editor in Cumulus 1 allows you to change the date, as well as all the other fields, although the lines must be kept in ascending date order to avoid errors when subsequently reading the file
The old numbering from zero had two advantages:
# It stressed that the date field was different to the rest, all other fields were either values or time-stamps
# Numbering starting from zero is consistent with standard indexing used for arrays in programming languages (like JavaScript), so the number shown '''was''' the number to quote in any scripts where a Cumulus 1 line was converted to an array, and you needed to address a single field.
▲Please note the list of fields has been rewritten especially for MX. As part of the rewrite, the fields have been renumbered, in some forum posts you might see references to old numbering, in others to new numbering. As explained [[#Line numbering and Error messages|above]] the fields are now numbered starting from 1 to fit in with an internal array created when the log file is read, the processing code adds a line number in front of the date field on each array 'line' it holds.
== Information shown in the table ==
* The date '''
** The dates, as mentioned earlier, should be in ascending order.
* The remaining fields were all either numerical values, or a time paired with (except for first wind field) preceding numerical value.▼
** Please see [[amending dayfile]] page for more information on dates
** Cumulus 1 actually enforces this pairing (i.e. it validates that a time is present where it is needed).▼
** Both Cumulus 1 and MX may get confused if you restart the software close to rollover time, and in that confused state they may create a second line with same date as a date already in the file.
*The alphabetic column identifiers used by many spreadsheets are shown▼
** If you regularly restart Cumulus close to rollover time, then a whole sequence of dates can be repeated either as a block or as pairs.
** IMPORTANT: Ensure '''all columns are set to "text" format''', ▼
▲* The remaining fields
** Note that you will corrupt this file if you let your spreadsheet recognise content as dates or time, change the number of decimal places.▼
▲** Cumulus 1 actually enforces this pairing (i.e. it validates that a time is present where it is needed). Cumulus MX only validates that each field is of correct type, it does not recognise any relationships between fields.
* The type of field is shown in the table, ▼
▲*The alphabetic column identifiers used by many
** you must not include a sign for an unsigned field, ▼
▲** IMPORTANT:
** you can not specify a decimal point in an integer field, ▼
▲** Note that you will corrupt this file if you let your spreadsheet recognise content as dates or time, or let it change the number of decimal places.
▲** Note you must not include a sign for an unsigned field,
▲** Note you can not specify a decimal comma/point in an integer field,
** Note all fields of type time must use 5 character "HH:mm" format, although Cumulus 1 will accept other separator characters where ":" shown.
* The field description is shown, together with references to where that terminology is explained
|-
|0
|
If you are processing this log file using a third party (or your own) script, that probably does not place the line number into any array, and your array elements will start at 0 for the field labelled 1 in this table, so putting all field numbers out by 1.
|
edits