5,838
edits
m (→Create Missing) |
m (→Using the Cumulus 1 editing feature: paste) |
||
== Create Missing ==
If a date is missing from dayfile.txt, and not available in a back-up, then it is possible to create a missing line (with approximations for the derived extreme values) in Cumulus 1. That functionality is known as "Create Missing" and is found [[Cumulus_Screenshots#File.2FEdit.2FHelp_Menu|within the edit dayfile.txt screen]].
If you do have a 'duplicate' error, you need to decide which row to ''delete'', and whether to copy any values from that row into the row you are keeping to ensure the correct extremes are retained.
==Missing or Corrupted dayfile.txt lines==
If you accidentally corrupt a line in the [[dayfile.txt|daily summary log]], then both the [[Cumulus_Screenshots#File.2FEdit.2FHelp_Menu|original Cumulus software]] and [[MX_Administrative_Interface#The_Data_Log_Viewing_and_Editing_interface|MX's admin interface]] have editors for viewing and modifying content.
If you have one, or more, dates missing in your dayfile.txt file, then the next question is, '''has the line been deleted by accident?'''
If a line for a particular date was present before, but is now corrupted or missing:
#See if you have a back-up of dayfile.txt with the line present and correct
#*If it is a recent date, then Cumulus makes a backup of dayfile.txt every time it is restarted and after every end-of-day rollover
#*If it is an older date, then maybe you took a back-up onto a separate drive or separate device
#If you have a suitable backup available, take a copy of that file
#Append onto the copy, any dates after when that copy ends, taking the extra lines from the current dayfile.txt
#Rename the current dayfile.txt to say dayfile.old
#Rename the copy you have edited to dayfile.txt and place into '''[[Data folder|data]]''' sub-folder
#Cumulus will now use the file with all days correct
''One lesson here, is to try to remember (once a week), to check your dayfile.txt log file is okay, because Cumulus retains back-ups for only the last 7 days''
'''Another lesson here, is to periodically take a backup, stored away from your Cumulus running environment in case you ever corrupt an old line'''
==Correcting individual fields in existing dayfile.txt lines==
The "Create Missing" functionality, described in earlier sub-section, is designed for when an entire line is missing for a prior date. Often people want to correct an individual field, in all lines within a particular period. This might be because you have suddenly discovered your daily pressure high and low are wrong by a certain offset, because you used the wrong setting for converting absolute pressure to the sea level equivalent you want to store in the file.
Neither Cumulus 1 nor MX provide any functionality to make such multi-line editing easy.
However, this can be resolved by opening dayfile.txt in a spreadsheet (carefully ensuring each column is treated as either text (date and time fields) or number (the value fields) and that your field separator is set in the filter conditions to be a column separator. Spreadsheets have a "Paste Special" function that allows you to add/subtract a constant to every cell in a column.
==Correcting individual fields in multiple lines of Daily summary Log in Cumulus 1==
In the '''Edit''' menu, select '''Dayfile.txt''' screen, for a text editor where you can overwrite entries, delete entire lines, and insert new lines (and then manually type in values for every field). You can scroll left and right between fields, with a header row identifying which field is which, and you can scroll up and down through all the lines. If you know what you want to change (such as replacing a rogue figure), this is a very easy to use editor.
For the daily summary log, the original Cumulus software includes functionality to '''Create Missing''' in its daily summary log editor, see [[Amending_dayfile#Create_Missing]]. This functionality creates an entire missing log line and will insert highs and lows whether they are extremes of source values, or extremes of derived values.
== Workaround==
This functionality is not designed to work out individual missing extreme figures, only to insert complete missing lines. However, we can workaround that constraint:
'''WORKAROUND FOR DAYFILE.TXT if required dates are present in both the standard log and dayfile.txt, but not all fields for that date exist in dayfile.txt'''
There are two common reasons for needing to use this, Cumulus 1 only, workaround:
# To add extra derived fields now calculated by Cumulus, to past lines created by an earlier version of Cumulus that did not calculate those derived fields at the time
# If you are importing into Cumulus records from other software, and that other software does not provide derived extremes (e.g. dew point, apparent temperature, heat index, rain rate, wind run) so your insert in the daily summary log file has only populated a sub-set of the fields.
The steps you need to take, to implement this Cumulus 1 only workaround:
#Select a time to do this work that is at least 10 minutes, preferably a whole hour, after Cumulus has performed a daily rollover, and ensure you finish this work long before the next rollover time. This will ensure your work cannot conflict with when Cumulus 1 is updating dayfile.txt.
# Take a copy of dayfile.txt original as backup,
# Use the Cumulus 1 editor (in '''Edit''' menu, select '''Dayfile.txt''' screen), and let it edit the original file
# Delete any days with partial information (e.g. from Cumulus versions that created fewer fields)
# Click the ''Create Missing'' button
# Wait while Cumulus scans all the standard log files, and for each source or derived field in those files, tracks the highest and lowest for each meteorological day that is now missing in dayfile.txt.
#* As an aside, be aware that when the contents of [[today.ini]] was used to create a new line in dayfile.txt originally, the high and low that were copied across were derived from all source values that Cumulus obtained from your weather station (depending on your weather station type this might be around every minute; some weather stations provide new readings less frequently, some provide them more frequently).
#*Continuing this aside, the high and low that Cumulus is now deriving are based purely on those values stored in the standard data log, by default that is just every 10 minutes.
#The new lines that Cumulus 1 adds to your dayfile.txt are also added to another log file '''dayfileeditlog.txt''', so we can access that to find the new values.
#For simplicity, click '''OK''' to save the edited '''dayfile.txt''' file, and exit the editor.
#Rename the amended dayfile.txt as "dayfile(generated).txt".
#Create an empty text file in a suitable temporary directory, and name it "dayfile.txt",
#Use an external editor to open your empty file.
#*You can use a Comma Separated Value file editor, although you will find this difficult starting with an empty file
#*You can use an editor designed for computer programmers or developers that can edit text file
#*You can use a spreadsheet application, such as "Libre Office Calc" or "Microsoft Excel", providing you obey the editing rules defined later
#Now merge in (as read-only text) the previous contents of the original dayfile.txt from the copy taken in step 2
#Now merge in (where there are fields missing) just those fields from the respective lines in "dayfile(generated).txt".
#Finally, copy your temporary "dayfile.txt" into the "Cumulus\data" folder, so from now on Cumulus accesses the file with the maximum number of fields present.
One note of caution:
*If a required source or derived value is not present in the standard data log lines, Cumulus will write into related dayfile.txt fields zero for values, and "00:00" for time stamps, because it does not understand the concept of "Null".
*Cumulus 1 does not have the functionality to retrospectively calculate derived values when it is reading source values in the standard data log line.
= [[File:Badge vMx.png]]Using the Cumulus MX editing functionality=
|
edits