Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
kvalobs:kvoss:system:qc2:user:version:kvqc2d-1.1.2 [2011-05-08 14:28:07] paule |
kvalobs:kvoss:system:qc2:user:version:kvqc2d-1.1.2 [2022-05-31 09:29:32] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | |||
- | .... in preparation ... FIXME | ||
- | |||
====== kvqc2d Version: 1.1.2 ====== | ====== kvqc2d Version: 1.1.2 ====== | ||
Source: [[https:// | Source: [[https:// | ||
+ | |||
+ | **Significant Changes** | ||
+ | |||
+ | * Release of DipTest (including new strategy with corresponding configuration files) | ||
+ | * Algorithm Called by Name | ||
+ | |||
+ | In addition, it is proposed to manage the weekly run of the Redistribution | ||
**Algorithms in this release:** | **Algorithms in this release:** | ||
- | ^ AlgoCode ^Name | + | ^ Algorithm(+) |
- | | 10 | SingleLinear_v32 | Replaces a single missing value with a linear interpolated value. If a corresponding max or min paramids are also specified then checks that the correction lies within the available max ... min range, if the interpolated values falls outside this range then the algorithm sets the corrected value to the nearest of max or min. Run for any paramid and optional max, min specified | + | | SingleLinear |
- | | 1 | Redistribution of RR_24 | See https:// | + | | Redistribute | As in previous release kvqc2d_1.1.0: https:// |
+ | | DipTest | New algorithm: | ||
+ | |||
+ | (+) This is the name to specify in the configuration | ||
+ | |||
+ | **Install Configuration Files and Cron Jobs** | ||
+ | |||
+ | For this release all the configuration files need to be re-installed since the use of AlgoCode=" | ||
+ | |||
+ | The new configuration files are held in subversion in the directory https:// | ||
- | **Sample data from the new algorithm** (scroll right for cfailed format) | + | This includes a tar file of all of the required contents |
- | **NB** on dev-vm101 this data could only be generated with I_fd=0 ... normally this is set to I_fd=1 so that only QC1-controlled data is used for interpolation model values for the redistribution. | + | To install new configuration files and setup the associated cronjobs: |
+ | **New cfg files** | ||
< | < | ||
- | kvalobs=# select * from data where obstime between ' | + | # log into the operational machine as the kvalobs user |
- | | + | |
- | -----------+---------------------+----------+---------+---------------------+--------+--------+-------+-----------+------------------+------------------+--------------------------------------------------------------------------- | + | |
- | 25260 | 2010-12-07 06:00:00 | | + | |
- | 25260 | 2010-12-08 06:00:00 | | + | |
- | 25260 | 2010-12-09 06:00:00 | -1 | 110 | 2010-12-09 07:21:52 | 302 | 0 | 0 | -1 | 0110004000007000 | 5336900000000000 | QC1-7-110, | + | |
- | 45350 | 2010-12-07 06:00:00 | | + | # stop the existing kvqc2d |
- | 45350 | 2010-12-08 06:00:00 | | + | $ kvstop |
- | 45350 | 2010-12-09 06:00:00 | 9 | 110 | 2010-12-09 11:40:20 | 302 | 0 | 0 | 3.7 | 0110004000007000 | 5336900000000000 | QC1-7-110, | + | |
- | 84070 | 2010-12-07 06:00:00 | | + | #setup new configuration |
- | 84070 | 2010-12-08 06:00:00 | | + | |
- | 84070 | 2010-12-09 06:00:00 | 1.5 | 110 | 2010-12-09 07:03:10 | 302 | 0 | 0 | 1.3 | 0140004000007000 | 5336900000000001 | QC1-2-72.b12, | + | $ cd / |
- | (9 rows) | + | # remove the old files (-i is suggested below so that the user is prompted to confirm removal and verify that only the desired files are removed). |
+ | $ rm -i ./*.cfg | ||
+ | $ rm -i ./*.hold | ||
+ | # fetch the new files, e.g.: | ||
+ | $ wget https://svn.met.no/ | ||
+ | $ tar xvzf cfg.tar.gz | ||
+ | $ rm cfg.tar.gz | ||
+ | |||
+ | # The configuration files are now in place. | ||
+ | |||
+ | # restart kvqc2d when ready: | ||
+ | |||
+ | $ kvstart | ||
</ | </ | ||
+ | **cron jobs** | ||
+ | < | ||
+ | # In order to set up the crontab for the weekly redistribution run | ||
+ | |||
+ | $ cd / | ||
+ | # The scripts are present in the cfg.tar.gz archive and should be present if the new cfg file installation steps above have been followed. | ||
+ | $ chmod +x Redistribution_14days_off_cron.sh | ||
+ | $ chmod +x Redistribution_14days_on_cron.sh | ||
+ | |||
+ | # next edit the crontab and insert the following two lines | ||
+ | # i.e. as user kvalobs: | ||
+ | |||
+ | $ crontab -e | ||
+ | |||
+ | # insert the following lines: | ||
+ | |||
+ | 23 0 * * 3 / | ||
+ | 23 0 * * 4 / | ||
+ | |||
+ | </ | ||
+ | |||
+ | Notes: the new scripts in cron renames " | ||
+ | |||
+ | The Redistribution algorithm will then run automatically to the following schedule: | ||
+ | * typically daily run at **06:35** looking at the last 4 days | ||
+ | * **01:20** Wednesday Night/ | ||
+ | |||
+ | Previously the management of the Redistribution configuration files (i.e. hold -> cfg -> hold) has been handled manually. | ||
**Example Configuration Files** | **Example Configuration Files** | ||
^SingleLinear_v32^ | ^SingleLinear_v32^ | ||
- | |||
- | *NB* Different/ | ||
< | < | ||
- | # AlgCode 10 corresponds to https:// | ||
# Performs simple linear interpolation for a single point replacement. | # Performs simple linear interpolation for a single point replacement. | ||
- | # If the result is outside an available max min range, the nearest of the | + | Algorithm=SingleLinear |
- | # max or min values are used. | + | RunAtHour=6 |
- | AlgoCode=10 | + | RunAtMinute=50 |
- | # Time to run the algorithm | + | Last_NDays=1 |
- | RunAtHour=16 | + | |
- | RunAtMinute=47 | + | |
- | # Check data from the last three days | + | |
- | Last_NDays=40 | + | |
#[Specific Data Type and Paramters ids etc.] | #[Specific Data Type and Paramters ids etc.] | ||
- | ParamId=211 | + | ParamId=104 |
- | # MaxParamId=215 | + | # Only write back the result if not prviously |
- | # MinParamId=213 | + | |
- | # Only write back the result if not previously | + | |
W_fhqc=0 | W_fhqc=0 | ||
Line 66: | Line 105: | ||
change_fmis=0-> | change_fmis=0-> | ||
change_fmis=2-> | change_fmis=2-> | ||
- | + | #Flag to check if the algorithm | |
- | #If there is already a 1 in place then we do not want run the algorithm | + | U_2=0 |
- | U_2=0 | + | |
</ | </ | ||
Line 75: | Line 113: | ||
< | < | ||
# Algorithm configuration for redistribution of accumulated precipitation | # Algorithm configuration for redistribution of accumulated precipitation | ||
- | AlgoCode=1 | + | Algorithm=Redistribute |
InterpCode=2 | InterpCode=2 | ||
- | RunAtHour=23 | + | RunAtHour=6 |
RunAtMinute=35 | RunAtMinute=35 | ||
- | Last_NDays=14 | + | Last_NDays=4 |
#[Time Range] The time window for when to apply the algorithm | #[Time Range] The time window for when to apply the algorithm | ||
Line 110: | Line 148: | ||
# | # | ||
# Only write data it it has not been analysed by HQC | # Only write data it it has not been analysed by HQC | ||
+ | # W_fhqc=9 | ||
W_fhqc=0 | W_fhqc=0 | ||
- | |||
- | # Added for a special test run | ||
- | # CfailedString=" | ||
- | |||
# Condition for running the algorithm | # Condition for running the algorithm | ||
Line 130: | Line 165: | ||
</ | </ | ||
- | **Notes** | ||
- | * This algorithm will redistribute data flagged with fd=2 (A_fd) | + | ^DipTest^ |
- | * To re-run the algorithm on the same data again set A_fd=7 and keep W_fhqc=0, i.e. do not re-write any decision by HQC. | + | |
+ | The DipTest configuration comprises two files: | ||
+ | **DipTest.cfg** | ||
+ | < | ||
+ | # DIP-TEST | ||
+ | Algorithm=DipTest | ||
+ | RunAtHour=5 | ||
+ | RunAtMinute=5 | ||
+ | #[Time Range] | ||
+ | Last_NDays=1 | ||
- | The schedule | + | #[Specific Data Type and Paramters ids etc.] |
- | * **06:35** perform a run looking at the last 4 days - the last 4 days is selected since from the first run on murky (see above) about 30 redistributions were made of which 15 were over 3 days and 10 over 4 days. | + | ParValFilename="/ |
- | | + | |
+ | # Only write data it it has not been analysed by HQC | ||
+ | # W_fhqc=9 | ||
+ | W_fhqc=0 | ||
+ | |||
+ | #Flag required | ||
+ | U_2=0 | ||
+ | </ | ||
+ | |||
+ | That works through | ||
+ | < | ||
+ | 1 | ||
+ | 2 | ||
+ | 81 | ||
+ | 85 | ||
+ | 86 | ||
+ | 87 | ||
+ | 88 | ||
+ | 89 | ||
+ | 90 | ||
+ | 91 | ||
+ | 92 | ||
+ | 93 | ||
+ | 94 | ||
+ | 105 3.0 | ||
+ | 113 | ||
+ | 123 | ||
+ | 172 | ||
+ | 174 | ||
+ | 175 | ||
+ | 176 | ||
+ | 177 | ||
+ | 197 | ||
+ | 198 | ||
+ | 199 | ||
+ | 200 | ||
+ | 211 7.5 | ||
+ | 212 7.5 | ||
+ | 213 7.5 | ||
+ | 215 7.5 | ||
+ | 221 | ||
+ | 222 | ||
+ | </ | ||
+ | |||
+ | **Note:** Previously " | ||
+ | |||
+ | ====== Notes on first production | ||
+ | |||
+ | * Released into operations | ||
+ | |||
+ | Algorithms ran as expected: | ||
+ | |||
+ | ^DipTest^ | ||
+ | |||
+ | First result | ||
+ | |||
+ | < | ||
+ | kvalobs=# select * from data where stationid=79600 and obstime between ' | ||
+ | | ||
+ | -----------+---------------------+----------+---------+----------------------------+--------+--------+-------+-----------+------------------+------------------+----------------------------- | ||
+ | 79600 | 2011-05-18 | ||
+ | 79600 | 2011-05-18 16:00:00 | | ||
+ | 79600 | 2011-05-18 17:00:00 | 3.5 | 90 | 2011-05-18 16: | ||
+ | 79600 | 2011-05-18 18:00:00 | 22 | 90 | 2011-05-18 17: | ||
+ | 79600 | 2011-05-18 19:00:00 | 3.1 | 90 | 2011-05-18 18: | ||
+ | 79600 | 2011-05-18 20:00:00 | 3.5 | 90 | 2011-05-18 19: | ||
+ | 79600 | 2011-05-18 21:00:00 | 2.4 | 90 | 2011-05-18 20:53:16.250386 | 311 | 0 | 0 | 2.4 | 0101000000000000 | 7000000000000000 | | ||
+ | 79600 | 2011-05-18 22:00:00 | 2 | 90 | 2011-05-18 21: | ||
+ | |||
+ | |||
+ | **Propagated downstream?** | ||
+ | |||
+ | In this link the data appears as ' | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | But when resetting the limit qa=6 ... | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | the data is visible downstream. | ||
+ | |||
+ | **...more DipTest data from later runs are included hereafter as they are spotted:** | ||
+ | |||
+ | < | ||
+ | 15270 | 2011-05-21 02:00:00 | 20.1 | 81 | 2011-05-21 01: | ||
+ | 15270 | 2011-05-21 03:00:00 | 18.5 | 81 | 2011-05-21 02: | ||
+ | 15270 | 2011-05-21 04:00:00 | 2.7 | 81 | 2011-05-21 03: | ||
+ | 15270 | 2011-05-21 05:00:00 | 17 | 81 | 2011-05-21 04: | ||
+ | 15270 | 2011-05-21 06:00:00 | 17.2 | 81 | 2011-05-21 05: | ||
+ | 15270 | 2011-05-21 07:00:00 | 19.4 | 81 | 2011-05-21 06: | ||
+ | </code> | ||
+ | |||
+ | ^Single Linear^ | ||
+ | |||
+ | < | ||
+ | 39100 | 2011-05-18 11:00:00 | 9.9 | 213 | 2011-05-18 10: | ||
+ | 39100 | 2011-05-18 12:00:00 | 9.9 | 213 | 2011-05-18 11: | ||
+ | 39100 | 2011-05-18 13:00:00 | 10.2 | 213 | 2011-05-18 12: | ||
+ | 39100 | 2011-05-18 | ||
+ | 39100 | 2011-05-18 15:00:00 | 10 | 213 | 2011-05-18 14: | ||
+ | 39100 | 2011-05-18 16:00:00 | 9.9 | 213 | 2011-05-18 15: | ||
+ | 39100 | 2011-05-18 17:00:00 | 9.8 | 213 | 2011-05-18 16: | ||
+ | </ | ||
+ | |||
+ | |||
+ | ^Redistribution^ | ||
+ | |||
+ | The algorithm ran but no redistribution took for place for the last 4 days. Results will be checked again after the next runs ... and here they are: | ||
+ | |||
+ | < | ||
+ | 48780 | 2011-05-11 06:00:00 | -1 | 110 | 2011-05-11 05: | ||
+ | 48780 | 2011-05-12 06:00:00 | 1.9 | 110 | 2011-05-12 05: | ||
+ | 48780 | 2011-05-13 06:00:00 | | ||
+ | 48780 | 2011-05-14 06:00:00 | | ||
+ | 48780 | 2011-05-15 06:00:00 | | ||
+ | 48780 | 2011-05-16 06:00:00 | | ||
+ | 48780 | 2011-05-17 06:00:00 | | ||
+ | 48780 | 2011-05-18 06:00:00 | 54.8 | 110 | 2011-05-18 09: | ||
+ | 48780 | 2011-05-19 06:00:00 | 8.2 | 110 | 2011-05-19 05: | ||
+ | </ | ||
+ | |||
+ | ^crontab control of weekly, | ||
+ | |||
+ | The crontab called the scripts successfully but the timing was wrong so the wrong script was called resulting in no algorithm running (but no other impact). | ||
+ | |||
+ | Problem identified as the wrong time in the crontab (hours and minutes mixed up ... pilot error!) | ||
+ | |||
+ | The erroneous entry: | ||
+ | |||
+ | < | ||
+ | # kvqc2d | ||
+ | 23 0 * * 3 / | ||
+ | 23 0 * * 4 / | ||
+ | </ | ||
+ | |||
+ | shall be changed to | ||
+ | |||
+ | < | ||
+ | # kvqc2d | ||
+ | 25 23 * * 3 / | ||
+ | 25 23 * * 4 / | ||
+ | </ | ||
+ | and installed on Friday (i.e. day=5) so that the cron runs next week. The belated 14 day run is now ready to go for this week. | ||
+ | These are real time notes on 2011-05-19 | ||
+ | **Update** For 2011-05-25 (Wednesday) to 26 (Thursday) : the cron cycling worked OK. |