Hi Mike, Some answers to your questions
Gary On Wednesday, 2 January 2019 07:36:46 UTC+10, MikeQ wrote: > > > 1. I assumed (we all know that didn't go well) that weeWX would recognize > there was new info added to the DB and regenerate the previous NOAA > reports. Apparently though, those files are only generated if they are > missing. Is that correct? > Missing NOAA format reports are generated automatically but .... there are conditions. Only reports that are newer (younger ?) than the most recent NOAA format report are generated and then only when there is at least one archive record in the weeWX archive for that month/year report. Perhaps an example will explain it better. If your archive has data from 00:05 1 January 2017 up to and including midnight on 30 November 2017 a normal functioning weeWX system would have monthly NOAA format reports for January to November 2017 inclusive and a yearly NOAA format report for 2017. If you then import archive data for the period 1-7 December 2017. The next time the weeWX report cycle executes the NOAA format report for December 2017 would be produced and the 2017 yearly report would be updated to include the December data. If we then imported data for 10 March to 29 September 2018 the next weeWX report cycle would see monthly NOAA format reports generated for March to September 2018 inclusive and a yearly report for 2018. No January or February 2018 report would be produced. If we now import data for 1 January to 7 March 2018 the next weeWX report cycle will not generate monthly reports for January and February 2018 and the March 2018 report would not be updated (the yearly report would be updated but that would be a function of new (current) data being added rather than any January to March 2018 data being added). Another way of looking at it is that any NOAA format report that is older than the most recent monthly report and the most recent yearly report will not be automatically generated. So if I wanted to regenerate the entire /var/www/html/weewx directory, I > could just delete the files from it and at the next archive interval weeWX > would regenerate it? > Deleting all the NOAA format reports forces weeWX to generate all NOAA format reports. Likewise with any of the other template based reports. It is possible to set a report to be only generated once per day or every hour. You can force weeWX to generate any/all reports on the next report cycle, irrespective of whether they would have been generated or not, by deleting all or individual reports. Same thing applies to plots; weeWX yearly plots are generated (by default) every 24 hours. You can force regeneration on the next report cycle by deleting the plot(s) concerned. > 2. I also read in another post about importing Cumulus files in ascending > date order and running 'wee_database --drop-daily' if that was not done. In > reviewing wee_database I see there is also a --check option and a > --rebuild-daily option. Since I have been bouncing around chronologically > doing my imports (I thought there might be an issue with Cumulus v1.9.1 -> > v1.9.4 log files which I have), should I run one or more of the > wee_database options after my imports are completed to verify there are no > issues with the DB? > I am not sure that the order of the data blocks being imported is particularly critical. We advise to import in ascending chronological order to try to avoid some of the corner cases that come up when there is an abnormal jump in time in the data. The rebuilding of the daily summaries fixes almost all of these issues. The --check action you refer to is for checking the version of the daily summaries, it has nothing to do with importing data or checking the consistency of any data in the database, but rather was added when a change was made to the algorithm used for calculating some fields in the daily summaries. It also checks for null strings in a SQLite database, hopefully importing data will not introduce any null strings; they usually come about when folks edit a SQLite database with a GUI based tool and delete data from fields. You can use the action by all means, it won't cause any harm. If I was importing data I would certainly use the --rebuild-daily action to rebuild the daily summaries but I would use the --from and --to actions to limit the rebuild to the overall period that I imported. this helps preserve some of the fine detail data in your existing data (obviously this does not apply if you have no existing data ie you are importing it all) > Does weeWX need to be stopped when running wee_database? > There is no particular reason to but it may be prudent to do so to avoid any contention with weeWX and wee_database wanting access to the same data at the same time. Probably less of an issue with MySQL/MariaDB but more likely to be an issue with SQLite. -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
