Dayfile.txt: Difference between revisions

264 bytes added ,  17:24, 20 August 2013
m
→‎Manipulation outside Cumulus: Minor rewrite to clarify rules after reported problem in support forum
m (→‎Manipulation outside Cumulus: explain connection between low/high value and timestamp as mentioned by Steve Loft in forum reply)
m (→‎Manipulation outside Cumulus: Minor rewrite to clarify rules after reported problem in support forum)
Line 33: Line 33:


==Manipulation outside Cumulus==
==Manipulation outside Cumulus==
The file is called <tt>dayfile.txt</tt> which can be viewed in a text editor or imported into various database systems or spreadsheets to manipulate as you wish.  Just remember that Cumulus updates it as part of the rollover process, so do not work on it when Cumulus has just been restarted or around the midnight/9am/10am local rollover time.
The file is called <tt>dayfile.txt</tt> which can be viewed in a text editor or imported into various database systems or spreadsheets to manipulate as you wish.  Just remember that Cumulus updates it as part of the rollover process, so never attempt to work on it either when Cumulus has just been restarted and is checking/updating the logs, or around the midnight/9am/10am local rollover time when Cumulus is writing a new row.


'''Tip''':  Take a copy of the file before you work on it outside Cumulus (perhaps call the copy 'dayfile.csv' so Windows can recognise its structure).
'''Tip''':  Take a copy of the file before you work on it outside Cumulus (perhaps call the copy 'dayfile.csv' so Windows can recognise its structure).


'''Rules''': Each line must contain the fields in correct sequence (since new versions/builds can add to number of fields, Cumulus will accept lines of various lengths without the more recent fields at the end)[Additions for the last few builds only are indicated below, you can explore details of earlier versions via the official [http://sandaysoft.com/products/cumulus product] page].
'''Note''': Since new versions/builds can add to number of fields, Cumulus will accept lines of various lengths without the more recent fields at the end.  (Additions for the last few builds only are indicated below, you can explore details of earlier versions via the official [http://sandaysoft.com/products/cumulus product] page).


'''Important''':  
'''Important Rules''':  
* The (meteorological) date format uses two digits for the year. Edit this file using an editor that treats all fields as text (a text editor or a spreadsheet program that can be instructed ''not'' to recognise special field types).  -  ''Do not edit this file using Excel'' or any similar tool that recognizes dates, as it is likely to change the dates to have four figure years, and then Cumulus will no longer be able to use the file.  
* The (meteorological) date format uses ''two digits for the year''. Edit this file using an editor that treats all fields as text (a text editor or a spreadsheet program that can be instructed ''not'' to recognise special field types).  -  ''Do not edit this file using Excel'' or any similar tool that recognizes dates, as it is likely to change the dates to have four figure years, and then Cumulus will no longer be able to use the file.  
* Times are in format hh:mm, and most value fields are in format x.y using your system decimal notation.
* Times are in ''format hh:mm'', and most value fields are in format x.y using your system decimal notation, a few are integers.
* If you insert a lowest or highest value into a day, where there was none before, insert a timestamp too, as a dayfile.txt row is only accepted by the Cumulus editor if a value and any related timestamp are either both present or both absent.
* If you insert a ''lowest or highest value'' into a day, where there was none before, insert a ''timestamp'' too, as a dayfile.txt row is only accepted by the Cumulus editor if a value and any related timestamp are either both present or both absent.  
* Also, make sure that any editing does not create any ''blank lines'' in the file, all must start with date and include some of the parameters listed in correct sequence.
* Nulls ',,' are not allowed in the line, so if you do not know the value for a particular field within the line, then type in an extreme with opposite value (e.g. -999.9 for a signed decimal maximum, and 999.9 for a decimal minimum - assuming your system decimal format is using full stops).
* Nulls ',,' are not allowed in the line, so if you do not know the value for a particular field within the line, then type in an extreme with opposite value (e.g. -999.9 for a signed decimal maximum, and 999.9 for a decimal minimum - assuming your system decimal format is using full stops).
* Make sure that any editing does not create any ''blank lines'' in the file.
* All rows must ''start with date'' and include some of the parameters listed ''in correct sequence''.
* Rows can vary in length but only by missing off ''fields at the end''.
* The row terminator normally expected is ''CRLF'', ensure any external editor does not change the terminator.


==Format of the file==
==Format of the file==
5,838

edits