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:test:acceptance:alg004 [2010-03-21 15:43:38] paule |
kvalobs:kvoss:system:qc2:test:acceptance:alg004 [2022-05-31 09:29:32] (current) |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== ALG004 ====== | ====== ALG004 ====== | ||
| - | |||
| - | Working ... FIXME | ||
| ===== Acceptance Test for single point missing temperature values with TAN, TAX method ===== | ===== Acceptance Test for single point missing temperature values with TAN, TAX method ===== | ||
| Line 7: | Line 5: | ||
| ^Step ^Direction ^Expected Result ^Pass/Fail Criteria or Comment ^ | ^Step ^Direction ^Expected Result ^Pass/Fail Criteria or Comment ^ | ||
| |001 | Prepare test data in the test database. | -- | -- | | |001 | Prepare test data in the test database. | -- | -- | | ||
| - | | | Download {{: | + | | | Download {{kvalobs: |
| | | $ psql kvalobs | -- | -- | | | | $ psql kvalobs | -- | -- | | ||
| - | | | < | + | | | < |
| - | | | < | + | | | < |
| | | NB specify the actual path to the test data above as required. | -- | -- | | | | NB specify the actual path to the test data above as required. | -- | -- | | ||
| | | | -- | -- | | | | | -- | -- | | ||
| | | Check that the time interval contains no Qc2 processed data: | -- | -- | | | | Check that the time interval contains no Qc2 processed data: | -- | -- | | ||
| - | | | kvalobs=# select count(*) from data WHERE obstime>'2020-02-28' | + | | | kvalobs=# select count(*) from data WHERE obstime |
| - | |002 |Download and gunzip {{: | + | |002 |Download and gunzip {{kvalobs: |
| - | |003 | Check log files to verify that the algorithm runs as scheduled, e.g. $ tail -f / | + | | |The configuration by default has W_fhqc=0 and Wbool=true. The algorithm will only work on data that ha not been controlled by HQC | -- | -- | |
| + | |||
| + | The configuration file also needs to be edited to include further flag controls ( -> ) and include this: | ||
| + | < | ||
| + | ... | ||
| + | #Flag to set if value is corrected | ||
| + | S_ftime=1 | ||
| + | change_fmis=3-> | ||
| + | change_fmis=0-> | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | |||
| + | |003 | Check log files to verify that the algorithm runs as scheduled, e.g. $ tail -f /var/log/Kvalobs/Qc2.log | -- | -- | | ||
| |004 | Check that Qc2 processed data now resides in the database: | -- | -- | | |004 | Check that Qc2 processed data now resides in the database: | -- | -- | | ||
| - | | | kvalobs=# select count(*) from data WHERE obstime>'2020-02-28' | + | | | kvalobs=# select count(*) from data WHERE obstime |
| - | |005 | Delete any existing data output (rm ALG004.dat) and then EXTRACT THE DATA: | -- | -- |^ | + | |005 | Delete any existing data output (rm ALG004-Step5.dat) and then EXTRACT THE DATA: |{{kvalobs: |
| - | < | + | < |
| </ | </ | ||
| - | |006 | Plot the data | -- | -- | | + | |006 | Plot the data. Download and use the two scripts |
| - | | | ./unit_T_plot.bash ALG004.dat | + | | |Make the bash file executable: | -- | -- | |
| - | | | and inspect the produced image "*.jpg" | + | | | chmod u+x unit_t_plot.bash| -- | -- | |
| - | |007 | -- | -- | -- | | + | | |Run the script |
| - | |008 | -- | -- | -- | | + | | | |
| - | |009 | -- | -- | -- | | + | | | and inspect the produced image ALG004-Step5.dat.jpg file. | -- |-- | |
| - | |010 | -- | -- | -- | | + | |
| + | **Alternative to step 006 for use on dev-vm101** | ||
| + | |||
| + | These files are already installed under / | ||
| + | |||
| + | As user kvalobs: | ||
| + | < | ||
| + | $ cd | ||
| + | $ ./ | ||
| + | |||
| + | The data file ALG004-Step5.dat.XY.dat has been created ... | ||
| + | |||
| + | Now run the following commands in R: | ||
| + | -------------------------------------- | ||
| + | |||
| + | FileName=" | ||
| + | UTD <- read.table(FileName, | ||
| + | pdf() | ||
| + | plot(UTD[, | ||
| + | lines(c(-20, | ||
| + | lines(c(-30, | ||
| + | lines(c(0, | ||
| + | lines(c(-30, | ||
| + | dev.off() | ||
| + | |||
| + | -------------------------------------- | ||
| + | </ | ||
| + | i.e. ... enter R: | ||
| + | < | ||
| + | $ R | ||
| + | ... | ||
| + | > FileName=" | ||
| + | > UTD <- read.table(FileName, | ||
| + | > pdf() | ||
| + | > plot(UTD[, | ||
| + | > lines(c(-20, | ||
| + | > lines(c(-30, | ||
| + | > lines(c(0, | ||
| + | > lines(c(-30, | ||
| + | > dev.off() | ||
| + | > | ||
| + | > quit() | ||
| + | </ | ||
| + | |||
| + | The above creates the file Rplots.pdf: | ||
| + | < | ||
| + | $ xpdf Rplots.pdf | ||
| + | </ | ||
| + | **NB** if you have logged in using ssh -X kvalobs@dev-vm101 then the above will probably work! | ||
| + | |||
| + | |||
| + | |007 | Edit the configuration file and set Wbool=false. Rerun the algorithm. The algorithm will reprocess the data flagged as controlled by HQC already. | ||
| + | | | kvalobs=# select count(*) from data WHERE obstime BETWEEN '2024-02-28' AND '2024-04-01' and cfailed like ' | ||
| + | | |Capture the results. (rm ALG004-Step7.dat any previous test results) |{{kvalobs: | ||
| + | < | ||
| + | </ | ||
| + | |008 | Plot results as in step 006 above. | ||
| **Prerequisites** | **Prerequisites** | ||
| Line 36: | Line 103: | ||
| Set up the test data (these are prepatory notes for now for set up on pak) | Set up the test data (these are prepatory notes for now for set up on pak) | ||
| - | {{: | + | {{kvalobs: |
| - | {{: | + | {{kvalobs: |
| + | |||
| + | Setting-up or refreshing the database. (some database management may be required to stop page errors and the like ????, vacuum cleaning etc ???) | ||
| * $ psql kvalobs | * $ psql kvalobs | ||
| - | * psql=> DELETE FROM data WHERE obstime>'2020-02-28' | + | * psql=> DELETE FROM data WHERE obstime |
| - | * psql=> | + | * psql=> |
| + | |||
| + | Script for plotting the test results. See the Step # above: {{kvalobs: | ||
| + | |||
| + | ... and not to forget the corresponding R-script called by the shell script: {{kvalobs: | ||
| - | Script for plotting the test results. See the Step # above: {{: | ||
| - | ... and not to forget the corresponding R-script called by the shell script: {{: | ||
| - | {{: | ||
| - | {{: | ||