This is an old revision of the document!


Test Case for Qc2 Single Linear

This test case is in reponse to version 3.2 of the ftime flag specification.

The following steps are performed on dev-vm101. The test data source file and algorithm configuration have been pre-loaded. When necessary the test data may be restored from this FILE and the configuration from the Reference Section below.

For shell commands the prefix “$” represents the Unix prompt. All the SQL commands are typed with no admonishments.

The test case data includes one example of a missing value and one example of rejected data. There is also a run of two missing values (in the middle) that is ignored.

87120;2025-09-16 11:00:00;6.6;211;2010-09-16 11:03:21;330;0;0;6.6;0111000000000010;7000000000000000;
87120;2025-09-16 12:00:00;-19.1;211;2010-09-16 12:03:25;330;0;0;-32766;05120020000000A0;7038300000000002;QC1-1-211:1,QC1-3a-211:1,QC1-9-211:1
87120;2025-09-16 13:00:00;6.7;211;2010-09-16 13:03:17;330;0;0;6.7;0110000000000010;7000000000000000;
...
87120;2025-09-16 15:00:00;7;211;2010-09-16 15:03:21;330;0;0;7;0111000000000010;7000000000000000;
87120;2025-09-16 16:00:00;-32767;211;2010-09-16 16:51:24;330;0;0;-32767;0000003000000000;9899900000000000;
87120;2025-09-16 17:00:00;-32767;211;2010-09-16 17:33:00;330;0;0;-32767;0000003000000000;9899900000000000;
87120;2025-09-16 18:00:00;8.3;211;2010-09-16 18:04:25;330;0;0;8.3;0110000000000010;7000000000000000;
...
87120;2025-09-17 09:00:00;8.7;211;2010-09-17 09:03:50;330;0;0;8.7;0111000000000010;7000000000000000;
87120;2025-09-17 10:00:00;-32767;211;2010-09-17 10:32:33;330;0;0;-32767;0100003000000000;7899900000000000;
87120;2025-09-17 11:00:00;9.5;211;2010-09-17 11:03:44;330;0;0;9.5;0110000000000010;7000000000000000;

PROCEDURE

Step 1
  • Open two terminals (A) and (B) on dev-vm1010 as user “kvalobs”.
  • (A) is for monitoring database changes and (B) for managing the algorithm
Step 2
  • (A) Enter the kvalobs database
$ psql kvalobs
  • Check for presence of no test data
SELECT * FROM data WHERE stationid=87120 AND obstime BETWEEN '2025-09-16 06:00:00' AND '2025-09-17 16:00:00' AND paramid=211 ORDER BY obstime;
  • Load the test data and view it with the same select statement:
COPY data FROM '/home/kvalobs/QC2/TESTDATA/qc2-211-singlepointtest.db.dat' USING DELIMITERS ';' ;
SELECT * FROM data WHERE stationid=87120 AND obstime BETWEEN '2025-09-16 06:00:00' AND '2025-09-17 16:00:00' AND paramid=211 ORDER BY obstime;
  • Please see the Reference Section below for a printout of the test data that is inserted.
Step 3
  • In terminal (B):
$ cd /etc/kvalobs/Qc2Config/
$cp SLv32.hold SLv32.cfg
  • Edit the SLv32.cfg file so that the values of RunAtHour and RunAtMinute are set to the next minute. This will cause the algorithm specified in SLv32.cfg to be run in the next minute (provided there are no conflicts with another scheduled algorithm).
  • If one opens a third terminal (C) when the algorithm runs may be monitored with, for example:
$tail -f /var/log/kvalobs/Qc2.log 
  • Approximately, one minute later check the values in the kvalobs database, i.e. on (A) Enter the command
SELECT * FROM data WHERE stationid=87120 AND obstime BETWEEN '2025-09-16 06:00:00' AND '2025-09-17 16:00:00' AND paramid=211 ORDER BY obstime;
  • Observe the updates to the single missing values.
Step 4
  • (B) Edit the SLv32.cfg file so that the values of RunAtHour and RunAtMinute are set to the next minute. So that the algorithm runs again.
  • Confirm that there is no change to the data. (Rerun the previous SELECT).
Step 5
  • Change the test data so that the algorithm will make a correction again by changing the value of a neighbour.
  • (A):
UPDATE data SET corrected=5, original=5 WHERE stationid=87120 AND  obstime='2025-09-17 09:00:00' AND paramid=211;
UPDATE data SET corrected=7.2, original=7.2 WHERE stationid=87120 AND  obstime='2025-09-16 11:00:00' AND paramid=211;
  • (B) Edit the SLv32.cfg file so that the values of RunAtHour and RunAtMinute are set to the next minute. So that the algorithm runs again.
  • Confirm that there is a change to the corrected data. (Rerun the previous SELECT).
Step 6
  • (B) Edit the SLv32.cfg file so that the values of RunAtHour and RunAtMinute are set to the next minute. So that the algorithm runs again.
  • Confirm that there is no change to the data.
Step 7
  • Change the test data so that one of the nighbours becomes invalid to run, so that the missing or rejected value is reset.
  • (A):
UPDATE data SET useinfo='7010000000000000' WHERE stationid=87120 and  obstime='2025-09-17 09:00:00' and paramid=211;
UPDATE data SET useinfo='7010000000000000' WHERE stationid=87120 and  obstime='2025-09-16 11:00:00' and paramid=211;
  • Confirm that the data is reset to missing or rejected as appropriate. (Rerun the previous SELECT).
Step 8
  • Run the algorithm once more and confirm that no further change occurs.
  • Continue ad hoc tests if required.
  • When finished remove the configuration file (B):
$rm /etc/kvalobs/Qc2Config/SLv32.cfg
  • And remove the test data (A):
DELETE from DATA where  stationid=87120 and  obstime BETWEEN '2025-09-16 06:00:00' AND '2025-09-17 16:00:00' and paramid=211;

RESULTS

The following lists the changes to the database either through UPDATES or by the action of the algorithm that occurs between each step.

kvalobs=# DELETE from DATA where  stationid=87120 and  obstime BETWEEN '2025-09-16 06:00:00' AND '2025-09-17 16:00:00' and paramid=211;
DELETE 35
kvalobs=# COPY data FROM '/home/kvalobs/QC2/TESTDATA/qc2-211-singlepointtest.db.dat' USING DELIMITERS ';' ;
COPY 35
kvalobs=# SELECT * FROM data WHERE stationid=87120 AND obstime BETWEEN '2025-09-16 06:00:00' AND '2025-09-17 16:00:00' AND paramid=211 ORDER BY obstime;
 stationid |       obstime       | original | paramid |       tbtime        | typeid | sensor | level | corrected |   controlinfo    |     useinfo      |               cfailed                
-----------+---------------------+----------+---------+---------------------+--------+--------+-------+-----------+------------------+------------------+--------------------------------------
     87120 | 2025-09-16 06:00:00 |     11.3 |     211 | 2010-09-16 06:03:18 |    330 | 0      |     0 |      11.3 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 07:00:00 |     11.5 |     211 | 2010-09-16 07:03:24 |    330 | 0      |     0 |      11.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 08:00:00 |     10.7 |     211 | 2010-09-16 08:03:19 |    330 | 0      |     0 |      10.7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 09:00:00 |      9.7 |     211 | 2010-09-16 09:03:22 |    330 | 0      |     0 |       9.7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 10:00:00 |      7.9 |     211 | 2010-09-16 10:03:21 |    330 | 0      |     0 |       7.9 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 11:00:00 |      6.6 |     211 | 2010-09-16 11:03:21 |    330 | 0      |     0 |       6.6 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 12:00:00 |    -19.1 |     211 | 2010-09-16 12:03:25 |    330 | 0      |     0 |    -32766 | 05120020000000A0 | 7038300000000002 | QC1-1-211:1,QC1-3a-211:1,QC1-9-211:1
     87120 | 2025-09-16 13:00:00 |      6.7 |     211 | 2010-09-16 13:03:17 |    330 | 0      |     0 |       6.7 | 0110000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 14:00:00 |      6.4 |     211 | 2010-09-16 14:03:19 |    330 | 0      |     0 |       6.4 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 15:00:00 |        7 |     211 | 2010-09-16 15:03:21 |    330 | 0      |     0 |         7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 16:00:00 |   -32767 |     211 | 2010-09-16 16:51:24 |    330 | 0      |     0 |    -32767 | 0000003000000000 | 9899900000000000 | 
     87120 | 2025-09-16 17:00:00 |   -32767 |     211 | 2010-09-16 17:33:00 |    330 | 0      |     0 |    -32767 | 0000003000000000 | 9899900000000000 | 
     87120 | 2025-09-16 18:00:00 |      8.3 |     211 | 2010-09-16 18:04:25 |    330 | 0      |     0 |       8.3 | 0110000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 19:00:00 |        8 |     211 | 2010-09-16 19:04:22 |    330 | 0      |     0 |         8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 20:00:00 |      7.8 |     211 | 2010-09-16 20:04:23 |    330 | 0      |     0 |       7.8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 21:00:00 |      8.2 |     211 | 2010-09-16 21:04:21 |    330 | 0      |     0 |       8.2 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 22:00:00 |      8.1 |     211 | 2010-09-16 22:04:25 |    330 | 0      |     0 |       8.1 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 23:00:00 |        8 |     211 | 2010-09-16 23:04:25 |    330 | 0      |     0 |         8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 00:00:00 |      7.7 |     211 | 2010-09-17 00:04:20 |    330 | 0      |     0 |       7.7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 01:00:00 |      7.6 |     211 | 2010-09-17 01:03:46 |    330 | 0      |     0 |       7.6 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 02:00:00 |      7.5 |     211 | 2010-09-17 02:03:44 |    330 | 0      |     0 |       7.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 03:00:00 |      7.1 |     211 | 2010-09-17 03:03:42 |    330 | 0      |     0 |       7.1 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 04:00:00 |      7.3 |     211 | 2010-09-17 04:03:46 |    330 | 0      |     0 |       7.3 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 05:00:00 |      7.8 |     211 | 2010-09-17 05:03:49 |    330 | 0      |     0 |       7.8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 06:00:00 |      7.4 |     211 | 2010-09-17 06:03:46 |    330 | 0      |     0 |       7.4 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 07:00:00 |      7.6 |     211 | 2010-09-17 07:03:49 |    330 | 0      |     0 |       7.6 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 08:00:00 |      8.5 |     211 | 2010-09-17 08:03:43 |    330 | 0      |     0 |       8.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 09:00:00 |      8.7 |     211 | 2010-09-17 09:03:50 |    330 | 0      |     0 |       8.7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 10:00:00 |   -32767 |     211 | 2010-09-17 10:32:33 |    330 | 0      |     0 |    -32767 | 0100003000000000 | 7899900000000000 | 
     87120 | 2025-09-17 11:00:00 |      9.5 |     211 | 2010-09-17 11:03:44 |    330 | 0      |     0 |       9.5 | 0110000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 12:00:00 |      9.5 |     211 | 2010-09-17 12:04:47 |    330 | 0      |     0 |       9.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 13:00:00 |      9.8 |     211 | 2010-09-17 13:04:51 |    330 | 0      |     0 |       9.8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 14:00:00 |      9.3 |     211 | 2010-09-17 14:04:48 |    330 | 0      |     0 |       9.3 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 15:00:00 |      9.5 |     211 | 2010-09-17 15:04:48 |    330 | 0      |     0 |       9.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 16:00:00 |      9.3 |     211 | 2010-09-17 16:21:26 |    330 | 0      |     0 |       9.3 | 0111000000000010 | 7100000400000000 | 
(35 rows)

kvalobs=# SELECT * FROM data WHERE stationid=87120 AND obstime BETWEEN '2025-09-16 06:00:00' AND '2025-09-17 16:00:00' AND paramid=211 ORDER BY obstime;
 stationid |       obstime       | original | paramid |       tbtime        | typeid | sensor | level | corrected |   controlinfo    |     useinfo      |                   cfailed                    
-----------+---------------------+----------+---------+---------------------+--------+--------+-------+-----------+------------------+------------------+----------------------------------------------
     87120 | 2025-09-16 06:00:00 |     11.3 |     211 | 2010-09-16 06:03:18 |    330 | 0      |     0 |      11.3 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 07:00:00 |     11.5 |     211 | 2010-09-16 07:03:24 |    330 | 0      |     0 |      11.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 08:00:00 |     10.7 |     211 | 2010-09-16 08:03:19 |    330 | 0      |     0 |      10.7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 09:00:00 |      9.7 |     211 | 2010-09-16 09:03:22 |    330 | 0      |     0 |       9.7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 10:00:00 |      7.9 |     211 | 2010-09-16 10:03:21 |    330 | 0      |     0 |       7.9 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 11:00:00 |      6.6 |     211 | 2010-09-16 11:03:21 |    330 | 0      |     0 |       6.6 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 12:00:00 |    -19.1 |     211 | 2010-09-16 12:03:25 |    330 | 0      |     0 |       6.7 | 05120041000000A0 | 5033300000000002 | QC1-1-211:1,QC1-3a-211:1,QC1-9-211:1 QC2d-2 
     87120 | 2025-09-16 13:00:00 |      6.7 |     211 | 2010-09-16 13:03:17 |    330 | 0      |     0 |       6.7 | 0110000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 14:00:00 |      6.4 |     211 | 2010-09-16 14:03:19 |    330 | 0      |     0 |       6.4 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 15:00:00 |        7 |     211 | 2010-09-16 15:03:21 |    330 | 0      |     0 |         7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 16:00:00 |   -32767 |     211 | 2010-09-16 16:51:24 |    330 | 0      |     0 |    -32767 | 0000003000000000 | 9899900000000000 | 
     87120 | 2025-09-16 17:00:00 |   -32767 |     211 | 2010-09-16 17:33:00 |    330 | 0      |     0 |    -32767 | 0000003000000000 | 9899900000000000 | 
     87120 | 2025-09-16 18:00:00 |      8.3 |     211 | 2010-09-16 18:04:25 |    330 | 0      |     0 |       8.3 | 0110000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 19:00:00 |        8 |     211 | 2010-09-16 19:04:22 |    330 | 0      |     0 |         8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 20:00:00 |      7.8 |     211 | 2010-09-16 20:04:23 |    330 | 0      |     0 |       7.8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 21:00:00 |      8.2 |     211 | 2010-09-16 21:04:21 |    330 | 0      |     0 |       8.2 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 22:00:00 |      8.1 |     211 | 2010-09-16 22:04:25 |    330 | 0      |     0 |       8.1 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 23:00:00 |        8 |     211 | 2010-09-16 23:04:25 |    330 | 0      |     0 |         8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 00:00:00 |      7.7 |     211 | 2010-09-17 00:04:20 |    330 | 0      |     0 |       7.7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 01:00:00 |      7.6 |     211 | 2010-09-17 01:03:46 |    330 | 0      |     0 |       7.6 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 02:00:00 |      7.5 |     211 | 2010-09-17 02:03:44 |    330 | 0      |     0 |       7.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 03:00:00 |      7.1 |     211 | 2010-09-17 03:03:42 |    330 | 0      |     0 |       7.1 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 04:00:00 |      7.3 |     211 | 2010-09-17 04:03:46 |    330 | 0      |     0 |       7.3 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 05:00:00 |      7.8 |     211 | 2010-09-17 05:03:49 |    330 | 0      |     0 |       7.8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 06:00:00 |      7.4 |     211 | 2010-09-17 06:03:46 |    330 | 0      |     0 |       7.4 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 07:00:00 |      7.6 |     211 | 2010-09-17 07:03:49 |    330 | 0      |     0 |       7.6 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 08:00:00 |      8.5 |     211 | 2010-09-17 08:03:43 |    330 | 0      |     0 |       8.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 09:00:00 |      8.7 |     211 | 2010-09-17 09:03:50 |    330 | 0      |     0 |       8.7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 10:00:00 |   -32767 |     211 | 2010-09-17 10:32:33 |    330 | 0      |     0 |       9.1 | 0100001100000000 | 5894900000000000 |  QC2d-2 
     87120 | 2025-09-17 11:00:00 |      9.5 |     211 | 2010-09-17 11:03:44 |    330 | 0      |     0 |       9.5 | 0110000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 12:00:00 |      9.5 |     211 | 2010-09-17 12:04:47 |    330 | 0      |     0 |       9.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 13:00:00 |      9.8 |     211 | 2010-09-17 13:04:51 |    330 | 0      |     0 |       9.8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 14:00:00 |      9.3 |     211 | 2010-09-17 14:04:48 |    330 | 0      |     0 |       9.3 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 15:00:00 |      9.5 |     211 | 2010-09-17 15:04:48 |    330 | 0      |     0 |       9.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 16:00:00 |      9.3 |     211 | 2010-09-17 16:21:26 |    330 | 0      |     0 |       9.3 | 0111000000000010 | 7100000400000000 | 
(35 rows)

kvalobs=# SELECT * FROM data WHERE stationid=87120 AND obstime BETWEEN '2025-09-16 06:00:00' AND '2025-09-17 16:00:00' AND paramid=211 ORDER BY obstime;
 stationid |       obstime       | original | paramid |       tbtime        | typeid | sensor | level | corrected |   controlinfo    |     useinfo      |                   cfailed                    
-----------+---------------------+----------+---------+---------------------+--------+--------+-------+-----------+------------------+------------------+----------------------------------------------
     87120 | 2025-09-16 06:00:00 |     11.3 |     211 | 2010-09-16 06:03:18 |    330 | 0      |     0 |      11.3 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 07:00:00 |     11.5 |     211 | 2010-09-16 07:03:24 |    330 | 0      |     0 |      11.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 08:00:00 |     10.7 |     211 | 2010-09-16 08:03:19 |    330 | 0      |     0 |      10.7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 09:00:00 |      9.7 |     211 | 2010-09-16 09:03:22 |    330 | 0      |     0 |       9.7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 10:00:00 |      7.9 |     211 | 2010-09-16 10:03:21 |    330 | 0      |     0 |       7.9 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 11:00:00 |      6.6 |     211 | 2010-09-16 11:03:21 |    330 | 0      |     0 |       6.6 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 12:00:00 |    -19.1 |     211 | 2010-09-16 12:03:25 |    330 | 0      |     0 |       6.7 | 05120041000000A0 | 5033300000000002 | QC1-1-211:1,QC1-3a-211:1,QC1-9-211:1 QC2d-2 
     87120 | 2025-09-16 13:00:00 |      6.7 |     211 | 2010-09-16 13:03:17 |    330 | 0      |     0 |       6.7 | 0110000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 14:00:00 |      6.4 |     211 | 2010-09-16 14:03:19 |    330 | 0      |     0 |       6.4 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 15:00:00 |        7 |     211 | 2010-09-16 15:03:21 |    330 | 0      |     0 |         7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 16:00:00 |   -32767 |     211 | 2010-09-16 16:51:24 |    330 | 0      |     0 |    -32767 | 0000003000000000 | 9899900000000000 | 
     87120 | 2025-09-16 17:00:00 |   -32767 |     211 | 2010-09-16 17:33:00 |    330 | 0      |     0 |    -32767 | 0000003000000000 | 9899900000000000 | 
     87120 | 2025-09-16 18:00:00 |      8.3 |     211 | 2010-09-16 18:04:25 |    330 | 0      |     0 |       8.3 | 0110000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 19:00:00 |        8 |     211 | 2010-09-16 19:04:22 |    330 | 0      |     0 |         8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 20:00:00 |      7.8 |     211 | 2010-09-16 20:04:23 |    330 | 0      |     0 |       7.8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 21:00:00 |      8.2 |     211 | 2010-09-16 21:04:21 |    330 | 0      |     0 |       8.2 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 22:00:00 |      8.1 |     211 | 2010-09-16 22:04:25 |    330 | 0      |     0 |       8.1 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 23:00:00 |        8 |     211 | 2010-09-16 23:04:25 |    330 | 0      |     0 |         8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 00:00:00 |      7.7 |     211 | 2010-09-17 00:04:20 |    330 | 0      |     0 |       7.7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 01:00:00 |      7.6 |     211 | 2010-09-17 01:03:46 |    330 | 0      |     0 |       7.6 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 02:00:00 |      7.5 |     211 | 2010-09-17 02:03:44 |    330 | 0      |     0 |       7.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 03:00:00 |      7.1 |     211 | 2010-09-17 03:03:42 |    330 | 0      |     0 |       7.1 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 04:00:00 |      7.3 |     211 | 2010-09-17 04:03:46 |    330 | 0      |     0 |       7.3 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 05:00:00 |      7.8 |     211 | 2010-09-17 05:03:49 |    330 | 0      |     0 |       7.8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 06:00:00 |      7.4 |     211 | 2010-09-17 06:03:46 |    330 | 0      |     0 |       7.4 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 07:00:00 |      7.6 |     211 | 2010-09-17 07:03:49 |    330 | 0      |     0 |       7.6 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 08:00:00 |      8.5 |     211 | 2010-09-17 08:03:43 |    330 | 0      |     0 |       8.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 09:00:00 |      8.7 |     211 | 2010-09-17 09:03:50 |    330 | 0      |     0 |       8.7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 10:00:00 |   -32767 |     211 | 2010-09-17 10:32:33 |    330 | 0      |     0 |       9.1 | 0100001100000000 | 5894900000000000 |  QC2d-2 
     87120 | 2025-09-17 11:00:00 |      9.5 |     211 | 2010-09-17 11:03:44 |    330 | 0      |     0 |       9.5 | 0110000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 12:00:00 |      9.5 |     211 | 2010-09-17 12:04:47 |    330 | 0      |     0 |       9.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 13:00:00 |      9.8 |     211 | 2010-09-17 13:04:51 |    330 | 0      |     0 |       9.8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 14:00:00 |      9.3 |     211 | 2010-09-17 14:04:48 |    330 | 0      |     0 |       9.3 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 15:00:00 |      9.5 |     211 | 2010-09-17 15:04:48 |    330 | 0      |     0 |       9.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 16:00:00 |      9.3 |     211 | 2010-09-17 16:21:26 |    330 | 0      |     0 |       9.3 | 0111000000000010 | 7100000400000000 | 
(35 rows)

kvalobs=# UPDATE data SET corrected=5, original=5 WHERE stationid=87120 AND  obstime='2025-09-17 09:00:00' AND paramid=211;
UPDATE 1
kvalobs=# UPDATE data SET corrected=7.2, original=7.2 WHERE stationid=87120 AND  obstime='2025-09-16 11:00:00' AND paramid=211;
UPDATE 1
kvalobs=# SELECT * FROM data WHERE stationid=87120 AND obstime BETWEEN '2025-09-16 06:00:00' AND '2025-09-17 16:00:00' AND paramid=211 ORDER BY obstime;
 stationid |       obstime       | original | paramid |       tbtime        | typeid | sensor | level | corrected |   controlinfo    |     useinfo      |                       cfailed                        
-----------+---------------------+----------+---------+---------------------+--------+--------+-------+-----------+------------------+------------------+------------------------------------------------------
     87120 | 2025-09-16 06:00:00 |     11.3 |     211 | 2010-09-16 06:03:18 |    330 | 0      |     0 |      11.3 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 07:00:00 |     11.5 |     211 | 2010-09-16 07:03:24 |    330 | 0      |     0 |      11.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 08:00:00 |     10.7 |     211 | 2010-09-16 08:03:19 |    330 | 0      |     0 |      10.7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 09:00:00 |      9.7 |     211 | 2010-09-16 09:03:22 |    330 | 0      |     0 |       9.7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 10:00:00 |      7.9 |     211 | 2010-09-16 10:03:21 |    330 | 0      |     0 |       7.9 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 11:00:00 |      7.2 |     211 | 2010-09-16 11:03:21 |    330 | 0      |     0 |       7.2 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 12:00:00 |    -19.1 |     211 | 2010-09-16 12:03:25 |    330 | 0      |     0 |         7 | 05120041000000A0 | 5033300000000002 | QC1-1-211:1,QC1-3a-211:1,QC1-9-211:1 QC2d-2  QC2d-2 
     87120 | 2025-09-16 13:00:00 |      6.7 |     211 | 2010-09-16 13:03:17 |    330 | 0      |     0 |       6.7 | 0110000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 14:00:00 |      6.4 |     211 | 2010-09-16 14:03:19 |    330 | 0      |     0 |       6.4 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 15:00:00 |        7 |     211 | 2010-09-16 15:03:21 |    330 | 0      |     0 |         7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 16:00:00 |   -32767 |     211 | 2010-09-16 16:51:24 |    330 | 0      |     0 |    -32767 | 0000003000000000 | 9899900000000000 | 
     87120 | 2025-09-16 17:00:00 |   -32767 |     211 | 2010-09-16 17:33:00 |    330 | 0      |     0 |    -32767 | 0000003000000000 | 9899900000000000 | 
     87120 | 2025-09-16 18:00:00 |      8.3 |     211 | 2010-09-16 18:04:25 |    330 | 0      |     0 |       8.3 | 0110000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 19:00:00 |        8 |     211 | 2010-09-16 19:04:22 |    330 | 0      |     0 |         8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 20:00:00 |      7.8 |     211 | 2010-09-16 20:04:23 |    330 | 0      |     0 |       7.8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 21:00:00 |      8.2 |     211 | 2010-09-16 21:04:21 |    330 | 0      |     0 |       8.2 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 22:00:00 |      8.1 |     211 | 2010-09-16 22:04:25 |    330 | 0      |     0 |       8.1 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 23:00:00 |        8 |     211 | 2010-09-16 23:04:25 |    330 | 0      |     0 |         8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 00:00:00 |      7.7 |     211 | 2010-09-17 00:04:20 |    330 | 0      |     0 |       7.7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 01:00:00 |      7.6 |     211 | 2010-09-17 01:03:46 |    330 | 0      |     0 |       7.6 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 02:00:00 |      7.5 |     211 | 2010-09-17 02:03:44 |    330 | 0      |     0 |       7.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 03:00:00 |      7.1 |     211 | 2010-09-17 03:03:42 |    330 | 0      |     0 |       7.1 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 04:00:00 |      7.3 |     211 | 2010-09-17 04:03:46 |    330 | 0      |     0 |       7.3 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 05:00:00 |      7.8 |     211 | 2010-09-17 05:03:49 |    330 | 0      |     0 |       7.8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 06:00:00 |      7.4 |     211 | 2010-09-17 06:03:46 |    330 | 0      |     0 |       7.4 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 07:00:00 |      7.6 |     211 | 2010-09-17 07:03:49 |    330 | 0      |     0 |       7.6 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 08:00:00 |      8.5 |     211 | 2010-09-17 08:03:43 |    330 | 0      |     0 |       8.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 09:00:00 |        5 |     211 | 2010-09-17 09:03:50 |    330 | 0      |     0 |         5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 10:00:00 |   -32767 |     211 | 2010-09-17 10:32:33 |    330 | 0      |     0 |       7.3 | 0100001100000000 | 5894900000000000 |  QC2d-2  QC2d-2 
     87120 | 2025-09-17 11:00:00 |      9.5 |     211 | 2010-09-17 11:03:44 |    330 | 0      |     0 |       9.5 | 0110000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 12:00:00 |      9.5 |     211 | 2010-09-17 12:04:47 |    330 | 0      |     0 |       9.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 13:00:00 |      9.8 |     211 | 2010-09-17 13:04:51 |    330 | 0      |     0 |       9.8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 14:00:00 |      9.3 |     211 | 2010-09-17 14:04:48 |    330 | 0      |     0 |       9.3 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 15:00:00 |      9.5 |     211 | 2010-09-17 15:04:48 |    330 | 0      |     0 |       9.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 16:00:00 |      9.3 |     211 | 2010-09-17 16:21:26 |    330 | 0      |     0 |       9.3 | 0111000000000010 | 7100000400000000 | 
(35 rows)

kvalobs=# SELECT * FROM data WHERE stationid=87120 AND obstime BETWEEN '2025-09-16 06:00:00' AND '2025-09-17 16:00:00' AND paramid=211 ORDER BY obstime;
 stationid |       obstime       | original | paramid |       tbtime        | typeid | sensor | level | corrected |   controlinfo    |     useinfo      |                       cfailed                        
-----------+---------------------+----------+---------+---------------------+--------+--------+-------+-----------+------------------+------------------+------------------------------------------------------
     87120 | 2025-09-16 06:00:00 |     11.3 |     211 | 2010-09-16 06:03:18 |    330 | 0      |     0 |      11.3 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 07:00:00 |     11.5 |     211 | 2010-09-16 07:03:24 |    330 | 0      |     0 |      11.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 08:00:00 |     10.7 |     211 | 2010-09-16 08:03:19 |    330 | 0      |     0 |      10.7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 09:00:00 |      9.7 |     211 | 2010-09-16 09:03:22 |    330 | 0      |     0 |       9.7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 10:00:00 |      7.9 |     211 | 2010-09-16 10:03:21 |    330 | 0      |     0 |       7.9 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 11:00:00 |      7.2 |     211 | 2010-09-16 11:03:21 |    330 | 0      |     0 |       7.2 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 12:00:00 |    -19.1 |     211 | 2010-09-16 12:03:25 |    330 | 0      |     0 |         7 | 05120041000000A0 | 5033300000000002 | QC1-1-211:1,QC1-3a-211:1,QC1-9-211:1 QC2d-2  QC2d-2 
     87120 | 2025-09-16 13:00:00 |      6.7 |     211 | 2010-09-16 13:03:17 |    330 | 0      |     0 |       6.7 | 0110000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 14:00:00 |      6.4 |     211 | 2010-09-16 14:03:19 |    330 | 0      |     0 |       6.4 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 15:00:00 |        7 |     211 | 2010-09-16 15:03:21 |    330 | 0      |     0 |         7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 16:00:00 |   -32767 |     211 | 2010-09-16 16:51:24 |    330 | 0      |     0 |    -32767 | 0000003000000000 | 9899900000000000 | 
     87120 | 2025-09-16 17:00:00 |   -32767 |     211 | 2010-09-16 17:33:00 |    330 | 0      |     0 |    -32767 | 0000003000000000 | 9899900000000000 | 
     87120 | 2025-09-16 18:00:00 |      8.3 |     211 | 2010-09-16 18:04:25 |    330 | 0      |     0 |       8.3 | 0110000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 19:00:00 |        8 |     211 | 2010-09-16 19:04:22 |    330 | 0      |     0 |         8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 20:00:00 |      7.8 |     211 | 2010-09-16 20:04:23 |    330 | 0      |     0 |       7.8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 21:00:00 |      8.2 |     211 | 2010-09-16 21:04:21 |    330 | 0      |     0 |       8.2 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 22:00:00 |      8.1 |     211 | 2010-09-16 22:04:25 |    330 | 0      |     0 |       8.1 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 23:00:00 |        8 |     211 | 2010-09-16 23:04:25 |    330 | 0      |     0 |         8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 00:00:00 |      7.7 |     211 | 2010-09-17 00:04:20 |    330 | 0      |     0 |       7.7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 01:00:00 |      7.6 |     211 | 2010-09-17 01:03:46 |    330 | 0      |     0 |       7.6 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 02:00:00 |      7.5 |     211 | 2010-09-17 02:03:44 |    330 | 0      |     0 |       7.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 03:00:00 |      7.1 |     211 | 2010-09-17 03:03:42 |    330 | 0      |     0 |       7.1 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 04:00:00 |      7.3 |     211 | 2010-09-17 04:03:46 |    330 | 0      |     0 |       7.3 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 05:00:00 |      7.8 |     211 | 2010-09-17 05:03:49 |    330 | 0      |     0 |       7.8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 06:00:00 |      7.4 |     211 | 2010-09-17 06:03:46 |    330 | 0      |     0 |       7.4 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 07:00:00 |      7.6 |     211 | 2010-09-17 07:03:49 |    330 | 0      |     0 |       7.6 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 08:00:00 |      8.5 |     211 | 2010-09-17 08:03:43 |    330 | 0      |     0 |       8.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 09:00:00 |        5 |     211 | 2010-09-17 09:03:50 |    330 | 0      |     0 |         5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 10:00:00 |   -32767 |     211 | 2010-09-17 10:32:33 |    330 | 0      |     0 |       7.3 | 0100001100000000 | 5894900000000000 |  QC2d-2  QC2d-2 
     87120 | 2025-09-17 11:00:00 |      9.5 |     211 | 2010-09-17 11:03:44 |    330 | 0      |     0 |       9.5 | 0110000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 12:00:00 |      9.5 |     211 | 2010-09-17 12:04:47 |    330 | 0      |     0 |       9.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 13:00:00 |      9.8 |     211 | 2010-09-17 13:04:51 |    330 | 0      |     0 |       9.8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 14:00:00 |      9.3 |     211 | 2010-09-17 14:04:48 |    330 | 0      |     0 |       9.3 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 15:00:00 |      9.5 |     211 | 2010-09-17 15:04:48 |    330 | 0      |     0 |       9.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 16:00:00 |      9.3 |     211 | 2010-09-17 16:21:26 |    330 | 0      |     0 |       9.3 | 0111000000000010 | 7100000400000000 | 
(35 rows)

kvalobs=# UPDATE data SET useinfo='7010000000000000' WHERE stationid=87120 and  obstime='2025-09-17 09:00:00' and paramid=211;
UPDATE 1
kvalobs=# UPDATE data SET useinfo='7010000000000000' WHERE stationid=87120 and  obstime='2025-09-16 11:00:00' and paramid=211;
UPDATE 1
kvalobs=# SELECT * FROM data WHERE stationid=87120 AND obstime BETWEEN '2025-09-16 06:00:00' AND '2025-09-17 16:00:00' AND paramid=211 ORDER BY obstime;
 stationid |       obstime       | original | paramid |       tbtime        | typeid | sensor | level | corrected |   controlinfo    |     useinfo      |                       cfailed                        
-----------+---------------------+----------+---------+---------------------+--------+--------+-------+-----------+------------------+------------------+------------------------------------------------------
     87120 | 2025-09-16 06:00:00 |     11.3 |     211 | 2010-09-16 06:03:18 |    330 | 0      |     0 |      11.3 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 07:00:00 |     11.5 |     211 | 2010-09-16 07:03:24 |    330 | 0      |     0 |      11.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 08:00:00 |     10.7 |     211 | 2010-09-16 08:03:19 |    330 | 0      |     0 |      10.7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 09:00:00 |      9.7 |     211 | 2010-09-16 09:03:22 |    330 | 0      |     0 |       9.7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 10:00:00 |      7.9 |     211 | 2010-09-16 10:03:21 |    330 | 0      |     0 |       7.9 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 11:00:00 |      7.2 |     211 | 2010-09-16 11:03:21 |    330 | 0      |     0 |       7.2 | 0111000000000010 | 7010000000000000 | 
     87120 | 2025-09-16 12:00:00 |    -19.1 |     211 | 2010-09-16 12:03:25 |    330 | 0      |     0 |         7 | 05120041000000A0 | 5033300000000002 | QC1-1-211:1,QC1-3a-211:1,QC1-9-211:1 QC2d-2  QC2d-2 
     87120 | 2025-09-16 13:00:00 |      6.7 |     211 | 2010-09-16 13:03:17 |    330 | 0      |     0 |       6.7 | 0110000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 14:00:00 |      6.4 |     211 | 2010-09-16 14:03:19 |    330 | 0      |     0 |       6.4 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 15:00:00 |        7 |     211 | 2010-09-16 15:03:21 |    330 | 0      |     0 |         7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 16:00:00 |   -32767 |     211 | 2010-09-16 16:51:24 |    330 | 0      |     0 |    -32767 | 0000003000000000 | 9899900000000000 | 
     87120 | 2025-09-16 17:00:00 |   -32767 |     211 | 2010-09-16 17:33:00 |    330 | 0      |     0 |    -32767 | 0000003000000000 | 9899900000000000 | 
     87120 | 2025-09-16 18:00:00 |      8.3 |     211 | 2010-09-16 18:04:25 |    330 | 0      |     0 |       8.3 | 0110000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 19:00:00 |        8 |     211 | 2010-09-16 19:04:22 |    330 | 0      |     0 |         8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 20:00:00 |      7.8 |     211 | 2010-09-16 20:04:23 |    330 | 0      |     0 |       7.8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 21:00:00 |      8.2 |     211 | 2010-09-16 21:04:21 |    330 | 0      |     0 |       8.2 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 22:00:00 |      8.1 |     211 | 2010-09-16 22:04:25 |    330 | 0      |     0 |       8.1 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 23:00:00 |        8 |     211 | 2010-09-16 23:04:25 |    330 | 0      |     0 |         8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 00:00:00 |      7.7 |     211 | 2010-09-17 00:04:20 |    330 | 0      |     0 |       7.7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 01:00:00 |      7.6 |     211 | 2010-09-17 01:03:46 |    330 | 0      |     0 |       7.6 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 02:00:00 |      7.5 |     211 | 2010-09-17 02:03:44 |    330 | 0      |     0 |       7.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 03:00:00 |      7.1 |     211 | 2010-09-17 03:03:42 |    330 | 0      |     0 |       7.1 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 04:00:00 |      7.3 |     211 | 2010-09-17 04:03:46 |    330 | 0      |     0 |       7.3 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 05:00:00 |      7.8 |     211 | 2010-09-17 05:03:49 |    330 | 0      |     0 |       7.8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 06:00:00 |      7.4 |     211 | 2010-09-17 06:03:46 |    330 | 0      |     0 |       7.4 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 07:00:00 |      7.6 |     211 | 2010-09-17 07:03:49 |    330 | 0      |     0 |       7.6 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 08:00:00 |      8.5 |     211 | 2010-09-17 08:03:43 |    330 | 0      |     0 |       8.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 09:00:00 |        5 |     211 | 2010-09-17 09:03:50 |    330 | 0      |     0 |         5 | 0111000000000010 | 7010000000000000 | 
     87120 | 2025-09-17 10:00:00 |   -32767 |     211 | 2010-09-17 10:32:33 |    330 | 0      |     0 |       7.3 | 0100001100000000 | 5894900000000000 |  QC2d-2  QC2d-2 
     87120 | 2025-09-17 11:00:00 |      9.5 |     211 | 2010-09-17 11:03:44 |    330 | 0      |     0 |       9.5 | 0110000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 12:00:00 |      9.5 |     211 | 2010-09-17 12:04:47 |    330 | 0      |     0 |       9.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 13:00:00 |      9.8 |     211 | 2010-09-17 13:04:51 |    330 | 0      |     0 |       9.8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 14:00:00 |      9.3 |     211 | 2010-09-17 14:04:48 |    330 | 0      |     0 |       9.3 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 15:00:00 |      9.5 |     211 | 2010-09-17 15:04:48 |    330 | 0      |     0 |       9.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 16:00:00 |      9.3 |     211 | 2010-09-17 16:21:26 |    330 | 0      |     0 |       9.3 | 0111000000000010 | 7100000400000000 | 
(35 rows)

kvalobs=# SELECT * FROM data WHERE stationid=87120 AND obstime BETWEEN '2025-09-16 06:00:00' AND '2025-09-17 16:00:00' AND paramid=211 ORDER BY obstime;
 stationid |       obstime       | original | paramid |       tbtime        | typeid | sensor | level | corrected |   controlinfo    |     useinfo      |                           cfailed                            
-----------+---------------------+----------+---------+---------------------+--------+--------+-------+-----------+------------------+------------------+--------------------------------------------------------------
     87120 | 2025-09-16 06:00:00 |     11.3 |     211 | 2010-09-16 06:03:18 |    330 | 0      |     0 |      11.3 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 07:00:00 |     11.5 |     211 | 2010-09-16 07:03:24 |    330 | 0      |     0 |      11.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 08:00:00 |     10.7 |     211 | 2010-09-16 08:03:19 |    330 | 0      |     0 |      10.7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 09:00:00 |      9.7 |     211 | 2010-09-16 09:03:22 |    330 | 0      |     0 |       9.7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 10:00:00 |      7.9 |     211 | 2010-09-16 10:03:21 |    330 | 0      |     0 |       7.9 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 11:00:00 |      7.2 |     211 | 2010-09-16 11:03:21 |    330 | 0      |     0 |       7.2 | 0111000000000010 | 7010000000000000 | 
     87120 | 2025-09-16 12:00:00 |    -19.1 |     211 | 2010-09-16 12:03:25 |    330 | 0      |     0 |    -32766 | 05120021000000A0 | 5038300000000002 | QC1-1-211:1,QC1-3a-211:1,QC1-9-211:1 QC2d-2  QC2d-2  QC2d-2 
     87120 | 2025-09-16 13:00:00 |      6.7 |     211 | 2010-09-16 13:03:17 |    330 | 0      |     0 |       6.7 | 0110000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 14:00:00 |      6.4 |     211 | 2010-09-16 14:03:19 |    330 | 0      |     0 |       6.4 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 15:00:00 |        7 |     211 | 2010-09-16 15:03:21 |    330 | 0      |     0 |         7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 16:00:00 |   -32767 |     211 | 2010-09-16 16:51:24 |    330 | 0      |     0 |    -32767 | 0000003000000000 | 9899900000000000 | 
     87120 | 2025-09-16 17:00:00 |   -32767 |     211 | 2010-09-16 17:33:00 |    330 | 0      |     0 |    -32767 | 0000003000000000 | 9899900000000000 | 
     87120 | 2025-09-16 18:00:00 |      8.3 |     211 | 2010-09-16 18:04:25 |    330 | 0      |     0 |       8.3 | 0110000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 19:00:00 |        8 |     211 | 2010-09-16 19:04:22 |    330 | 0      |     0 |         8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 20:00:00 |      7.8 |     211 | 2010-09-16 20:04:23 |    330 | 0      |     0 |       7.8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 21:00:00 |      8.2 |     211 | 2010-09-16 21:04:21 |    330 | 0      |     0 |       8.2 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 22:00:00 |      8.1 |     211 | 2010-09-16 22:04:25 |    330 | 0      |     0 |       8.1 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 23:00:00 |        8 |     211 | 2010-09-16 23:04:25 |    330 | 0      |     0 |         8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 00:00:00 |      7.7 |     211 | 2010-09-17 00:04:20 |    330 | 0      |     0 |       7.7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 01:00:00 |      7.6 |     211 | 2010-09-17 01:03:46 |    330 | 0      |     0 |       7.6 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 02:00:00 |      7.5 |     211 | 2010-09-17 02:03:44 |    330 | 0      |     0 |       7.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 03:00:00 |      7.1 |     211 | 2010-09-17 03:03:42 |    330 | 0      |     0 |       7.1 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 04:00:00 |      7.3 |     211 | 2010-09-17 04:03:46 |    330 | 0      |     0 |       7.3 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 05:00:00 |      7.8 |     211 | 2010-09-17 05:03:49 |    330 | 0      |     0 |       7.8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 06:00:00 |      7.4 |     211 | 2010-09-17 06:03:46 |    330 | 0      |     0 |       7.4 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 07:00:00 |      7.6 |     211 | 2010-09-17 07:03:49 |    330 | 0      |     0 |       7.6 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 08:00:00 |      8.5 |     211 | 2010-09-17 08:03:43 |    330 | 0      |     0 |       8.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 09:00:00 |        5 |     211 | 2010-09-17 09:03:50 |    330 | 0      |     0 |         5 | 0111000000000010 | 7010000000000000 | 
     87120 | 2025-09-17 10:00:00 |   -32767 |     211 | 2010-09-17 10:32:33 |    330 | 0      |     0 |    -32767 | 0100003100000000 | 5899900000000000 |  QC2d-2  QC2d-2  QC2d-2 
     87120 | 2025-09-17 11:00:00 |      9.5 |     211 | 2010-09-17 11:03:44 |    330 | 0      |     0 |       9.5 | 0110000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 12:00:00 |      9.5 |     211 | 2010-09-17 12:04:47 |    330 | 0      |     0 |       9.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 13:00:00 |      9.8 |     211 | 2010-09-17 13:04:51 |    330 | 0      |     0 |       9.8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 14:00:00 |      9.3 |     211 | 2010-09-17 14:04:48 |    330 | 0      |     0 |       9.3 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 15:00:00 |      9.5 |     211 | 2010-09-17 15:04:48 |    330 | 0      |     0 |       9.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 16:00:00 |      9.3 |     211 | 2010-09-17 16:21:26 |    330 | 0      |     0 |       9.3 | 0111000000000010 | 7100000400000000 | 
(35 rows)

kvalobs=# SELECT * FROM data WHERE stationid=87120 AND obstime BETWEEN '2025-09-16 06:00:00' AND '2025-09-17 16:00:00' AND paramid=211 ORDER BY obstime;
 stationid |       obstime       | original | paramid |       tbtime        | typeid | sensor | level | corrected |   controlinfo    |     useinfo      |                           cfailed                            
-----------+---------------------+----------+---------+---------------------+--------+--------+-------+-----------+------------------+------------------+--------------------------------------------------------------
     87120 | 2025-09-16 06:00:00 |     11.3 |     211 | 2010-09-16 06:03:18 |    330 | 0      |     0 |      11.3 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 07:00:00 |     11.5 |     211 | 2010-09-16 07:03:24 |    330 | 0      |     0 |      11.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 08:00:00 |     10.7 |     211 | 2010-09-16 08:03:19 |    330 | 0      |     0 |      10.7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 09:00:00 |      9.7 |     211 | 2010-09-16 09:03:22 |    330 | 0      |     0 |       9.7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 10:00:00 |      7.9 |     211 | 2010-09-16 10:03:21 |    330 | 0      |     0 |       7.9 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 11:00:00 |      7.2 |     211 | 2010-09-16 11:03:21 |    330 | 0      |     0 |       7.2 | 0111000000000010 | 7010000000000000 | 
     87120 | 2025-09-16 12:00:00 |    -19.1 |     211 | 2010-09-16 12:03:25 |    330 | 0      |     0 |    -32766 | 05120021000000A0 | 5038300000000002 | QC1-1-211:1,QC1-3a-211:1,QC1-9-211:1 QC2d-2  QC2d-2  QC2d-2 
     87120 | 2025-09-16 13:00:00 |      6.7 |     211 | 2010-09-16 13:03:17 |    330 | 0      |     0 |       6.7 | 0110000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 14:00:00 |      6.4 |     211 | 2010-09-16 14:03:19 |    330 | 0      |     0 |       6.4 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 15:00:00 |        7 |     211 | 2010-09-16 15:03:21 |    330 | 0      |     0 |         7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 16:00:00 |   -32767 |     211 | 2010-09-16 16:51:24 |    330 | 0      |     0 |    -32767 | 0000003000000000 | 9899900000000000 | 
     87120 | 2025-09-16 17:00:00 |   -32767 |     211 | 2010-09-16 17:33:00 |    330 | 0      |     0 |    -32767 | 0000003000000000 | 9899900000000000 | 
     87120 | 2025-09-16 18:00:00 |      8.3 |     211 | 2010-09-16 18:04:25 |    330 | 0      |     0 |       8.3 | 0110000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 19:00:00 |        8 |     211 | 2010-09-16 19:04:22 |    330 | 0      |     0 |         8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 20:00:00 |      7.8 |     211 | 2010-09-16 20:04:23 |    330 | 0      |     0 |       7.8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 21:00:00 |      8.2 |     211 | 2010-09-16 21:04:21 |    330 | 0      |     0 |       8.2 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 22:00:00 |      8.1 |     211 | 2010-09-16 22:04:25 |    330 | 0      |     0 |       8.1 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 23:00:00 |        8 |     211 | 2010-09-16 23:04:25 |    330 | 0      |     0 |         8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 00:00:00 |      7.7 |     211 | 2010-09-17 00:04:20 |    330 | 0      |     0 |       7.7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 01:00:00 |      7.6 |     211 | 2010-09-17 01:03:46 |    330 | 0      |     0 |       7.6 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 02:00:00 |      7.5 |     211 | 2010-09-17 02:03:44 |    330 | 0      |     0 |       7.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 03:00:00 |      7.1 |     211 | 2010-09-17 03:03:42 |    330 | 0      |     0 |       7.1 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 04:00:00 |      7.3 |     211 | 2010-09-17 04:03:46 |    330 | 0      |     0 |       7.3 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 05:00:00 |      7.8 |     211 | 2010-09-17 05:03:49 |    330 | 0      |     0 |       7.8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 06:00:00 |      7.4 |     211 | 2010-09-17 06:03:46 |    330 | 0      |     0 |       7.4 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 07:00:00 |      7.6 |     211 | 2010-09-17 07:03:49 |    330 | 0      |     0 |       7.6 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 08:00:00 |      8.5 |     211 | 2010-09-17 08:03:43 |    330 | 0      |     0 |       8.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 09:00:00 |        5 |     211 | 2010-09-17 09:03:50 |    330 | 0      |     0 |         5 | 0111000000000010 | 7010000000000000 | 
     87120 | 2025-09-17 10:00:00 |   -32767 |     211 | 2010-09-17 10:32:33 |    330 | 0      |     0 |    -32767 | 0100003100000000 | 5899900000000000 |  QC2d-2  QC2d-2  QC2d-2 
     87120 | 2025-09-17 11:00:00 |      9.5 |     211 | 2010-09-17 11:03:44 |    330 | 0      |     0 |       9.5 | 0110000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 12:00:00 |      9.5 |     211 | 2010-09-17 12:04:47 |    330 | 0      |     0 |       9.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 13:00:00 |      9.8 |     211 | 2010-09-17 13:04:51 |    330 | 0      |     0 |       9.8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 14:00:00 |      9.3 |     211 | 2010-09-17 14:04:48 |    330 | 0      |     0 |       9.3 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 15:00:00 |      9.5 |     211 | 2010-09-17 15:04:48 |    330 | 0      |     0 |       9.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 16:00:00 |      9.3 |     211 | 2010-09-17 16:21:26 |    330 | 0      |     0 |       9.3 | 0111000000000010 | 7100000400000000 | 
(35 rows)

kvalobs=# 

Corresponding Log file

Mon Sep 27 00:25:27 CEST 2010
kvalobs@dev-vm101:~/QC2/TESTDATA$ tail -f /var/log/kvalobs/Qc2.log
20100926083305: INFO 
--------------- Single Linear
20100926083308: INFO 
--------------- ProcessUnitT Writing Data 0.3 25110 2010-9-26 2:0:0
20100926083309: INFO 
--------------- ProcessUnitT Writing Data 3.5 49800 2010-9-26 1:0:0
20100926125805: INFO 
--------------- Case 10: Single Linear
20100926125805: INFO 
--------------- Single Linear
20100927002955: INFO 
--------------- Case 10: Single Linear
20100927002955: INFO 
--------------- Single Linear
20100927002955: INFO 
--------------- ProcessUnitT Writing Data 9.1 87120 2025-9-17 10:0:0
20100927002955: INFO 
--------------- ProcessUnitT Writing Data 6.7 87120 2025-9-16 12:0:0
20100927003054: INFO 
--------------- Case 9: Single Min Max Average
20100927003054: INFO 
--------------- Algorithm chosen is not available in this release.
20100927003054: INFO 
--------------- Case 10: Single Linear
20100927003054: INFO 
--------------- Single Linear
20100927003252: INFO 
--------------- Case 10: Single Linear
20100927003252: INFO 
--------------- Single Linear
20100927003252: INFO 
--------------- ProcessUnitT Writing Data 7.3 87120 2025-9-17 10:0:0
20100927003252: INFO 
--------------- ProcessUnitT Writing Data 7 87120 2025-9-16 12:0:0
20100927003352: INFO 
--------------- Case 10: Single Linear
20100927003352: INFO 
--------------- Single Linear
20100927003451: INFO 
--------------- Case 10: Single Linear
20100927003451: INFO 
--------------- Single Linear
20100927003451: INFO 
--------------- ProcessUnitT Writing Data -32767 87120 2025-9-17 10:0:0
20100927003451: INFO 
--------------- ProcessUnitT Writing Data -32766 87120 2025-9-16 12:0:0
20100927003550: INFO 
--------------- Case 10: Single Linear
20100927003550: INFO 
--------------- Single Linear

Data History

kvalobs=# select * from data_history where obstime='2025-09-16 12:00:00' and stationid=87120 and paramid=211 order by modificationtime;
 
Cancel request sent
ERROR:  canceling statement due to user request
kvalobs=# select * from data_history where obstime='2025-09-16 12:00:00' and stationid=87120 and paramid=211 order by modificationtime;
 version  | stationid |       obstime       | original | paramid |       tbtime        | typeid | sensor | level | corrected |   controlinfo    |     useinfo      |                           cfailed                            |      modificationtime      
----------+-----------+---------------------+----------+---------+---------------------+--------+--------+-------+-----------+------------------+------------------+--------------------------------------------------------------+----------------------------
 87813610 |     87120 | 2025-09-16 12:00:00 |    -19.1 |     211 | 2010-09-16 12:03:25 |    330 | 0      |     0 |    -32766 | 05120020000000A0 | 7038300000000002 | QC1-1-211:1,QC1-3a-211:1,QC1-9-211:1                         | 2010-09-24 10:52:27.021832
 88015727 |     87120 | 2025-09-16 12:00:00 |          |     211 | 2010-09-16 12:03:25 |    330 | 0      |     0 |           |                  |                  |                                                              | 2010-09-25 10:58:55.972068
 88015728 |     87120 | 2025-09-16 12:00:00 |    -19.1 |     211 | 2010-09-16 12:03:25 |    330 | 0      |     0 |       6.7 | 05120041000000A0 | 5033300000000002 | QC1-1-211:1,QC1-3a-211:1,QC1-9-211:1 QC2d-2                  | 2010-09-25 10:58:55.983701
 88310641 |     87120 | 2025-09-16 12:00:00 |          |     211 | 2010-09-16 12:03:25 |    330 | 0      |     0 |           |                  |                  |                                                              | 2010-09-26 22:21:01.274446
 88310829 |     87120 | 2025-09-16 12:00:00 |    -19.1 |     211 | 2010-09-16 12:03:25 |    330 | 0      |     0 |    -32766 | 05120020000000A0 | 7038300000000002 | QC1-1-211:1,QC1-3a-211:1,QC1-9-211:1                         | 2010-09-26 22:24:30.465528
 88310864 |     87120 | 2025-09-16 12:00:00 |          |     211 | 2010-09-16 12:03:25 |    330 | 0      |     0 |           |                  |                  |                                                              | 2010-09-26 22:24:35.941759
 88310899 |     87120 | 2025-09-16 12:00:00 |    -19.1 |     211 | 2010-09-16 12:03:25 |    330 | 0      |     0 |    -32766 | 05120020000000A0 | 7038300000000002 | QC1-1-211:1,QC1-3a-211:1,QC1-9-211:1                         | 2010-09-26 22:24:37.960795
 88310930 |     87120 | 2025-09-16 12:00:00 |          |     211 | 2010-09-16 12:03:25 |    330 | 0      |     0 |           |                  |                  |                                                              | 2010-09-26 22:29:55.536605
 88310931 |     87120 | 2025-09-16 12:00:00 |    -19.1 |     211 | 2010-09-16 12:03:25 |    330 | 0      |     0 |       6.7 | 05120041000000A0 | 5033300000000002 | QC1-1-211:1,QC1-3a-211:1,QC1-9-211:1 QC2d-2                  | 2010-09-26 22:29:55.545059
 88311611 |     87120 | 2025-09-16 12:00:00 |          |     211 | 2010-09-16 12:03:25 |    330 | 0      |     0 |           |                  |                  |                                                              | 2010-09-26 22:32:52.957787
 88311612 |     87120 | 2025-09-16 12:00:00 |    -19.1 |     211 | 2010-09-16 12:03:25 |    330 | 0      |     0 |         7 | 05120041000000A0 | 5033300000000002 | QC1-1-211:1,QC1-3a-211:1,QC1-9-211:1 QC2d-2  QC2d-2          | 2010-09-26 22:32:52.96432
 88311617 |     87120 | 2025-09-16 12:00:00 |          |     211 | 2010-09-16 12:03:25 |    330 | 0      |     0 |           |                  |                  |                                                              | 2010-09-26 22:34:51.328849
 88311618 |     87120 | 2025-09-16 12:00:00 |    -19.1 |     211 | 2010-09-16 12:03:25 |    330 | 0      |     0 |    -32766 | 05120021000000A0 | 5038300000000002 | QC1-1-211:1,QC1-3a-211:1,QC1-9-211:1 QC2d-2  QC2d-2  QC2d-2  | 2010-09-26 22:34:51.33704
(13 rows)

kvalobs=# select * from data_history where obstime='2025-09-17 10:00:00' and stationid=87120 and paramid=211 order by modificationtime;
 version  | stationid |       obstime       | original | paramid |       tbtime        | typeid | sensor | level | corrected |   controlinfo    |     useinfo      |         cfailed          |      modificationtime      
----------+-----------+---------------------+----------+---------+---------------------+--------+--------+-------+-----------+------------------+------------------+--------------------------+----------------------------
 87813632 |     87120 | 2025-09-17 10:00:00 |   -32767 |     211 | 2010-09-17 10:32:33 |    330 | 0      |     0 |    -32767 | 0100003000000000 | 7899900000000000 |                          | 2010-09-24 10:52:27.021832
 88015725 |     87120 | 2025-09-17 10:00:00 |          |     211 | 2010-09-17 10:32:33 |    330 | 0      |     0 |           |                  |                  |                          | 2010-09-25 10:58:55.846379
 88015726 |     87120 | 2025-09-17 10:00:00 |   -32767 |     211 | 2010-09-17 10:32:33 |    330 | 0      |     0 |       9.1 | 0100001100000000 | 5894900000000000 |  QC2d-2                  | 2010-09-25 10:58:55.915267
 88310663 |     87120 | 2025-09-17 10:00:00 |          |     211 | 2010-09-17 10:32:33 |    330 | 0      |     0 |           |                  |                  |                          | 2010-09-26 22:21:01.274446
 88310851 |     87120 | 2025-09-17 10:00:00 |   -32767 |     211 | 2010-09-17 10:32:33 |    330 | 0      |     0 |    -32767 | 0100003000000000 | 7899900000000000 |                          | 2010-09-26 22:24:30.465528
 88310886 |     87120 | 2025-09-17 10:00:00 |          |     211 | 2010-09-17 10:32:33 |    330 | 0      |     0 |           |                  |                  |                          | 2010-09-26 22:24:35.941759
 88310921 |     87120 | 2025-09-17 10:00:00 |   -32767 |     211 | 2010-09-17 10:32:33 |    330 | 0      |     0 |    -32767 | 0100003000000000 | 7899900000000000 |                          | 2010-09-26 22:24:37.960795
 88310928 |     87120 | 2025-09-17 10:00:00 |          |     211 | 2010-09-17 10:32:33 |    330 | 0      |     0 |           |                  |                  |                          | 2010-09-26 22:29:55.509838
 88310929 |     87120 | 2025-09-17 10:00:00 |   -32767 |     211 | 2010-09-17 10:32:33 |    330 | 0      |     0 |       9.1 | 0100001100000000 | 5894900000000000 |  QC2d-2                  | 2010-09-26 22:29:55.519257
 88311609 |     87120 | 2025-09-17 10:00:00 |          |     211 | 2010-09-17 10:32:33 |    330 | 0      |     0 |           |                  |                  |                          | 2010-09-26 22:32:52.939681
 88311610 |     87120 | 2025-09-17 10:00:00 |   -32767 |     211 | 2010-09-17 10:32:33 |    330 | 0      |     0 |       7.3 | 0100001100000000 | 5894900000000000 |  QC2d-2  QC2d-2          | 2010-09-26 22:32:52.940653
 88311615 |     87120 | 2025-09-17 10:00:00 |          |     211 | 2010-09-17 10:32:33 |    330 | 0      |     0 |           |                  |                  |                          | 2010-09-26 22:34:51.312347
 88311616 |     87120 | 2025-09-17 10:00:00 |   -32767 |     211 | 2010-09-17 10:32:33 |    330 | 0      |     0 |    -32767 | 0100003100000000 | 5899900000000000 |  QC2d-2  QC2d-2  QC2d-2  | 2010-09-26 22:34:51.313104
(13 rows)

kvalobs=# 

Reference

Configuration file

AlgoCode=10
# Time to run the algorithm
RunAtHour=22
RunAtMinute=28 
#[Time Range]
Start_YYYY=2025
Start_MM=9
Start_DD=16  
Start_hh=6
Start_mm=0
Start_ss=0
#
End_YYYY=2025
End_MM=9
End_DD=17 
End_hh=16
End_mm=0
End_ss=0

#[Specific Data Type and Paramters ids etc.]
ParamId=211
MaxParamId=215
MinParamId=213
# Only write back the result if not previously controlled
W_fhqc=0

#Flag to set if value is corrected
S_ftime=1
change_fmis=3->1
change_fmis=0->4
change_fmis=2->4

#If there is already a 1 in place then we do not want run the algorithm again!
U_2=0   

Sql for the test:

SELECT * FROM data WHERE stationid=87120 AND obstime BETWEEN '2025-09-16 06:00:00' AND '2025-09-17 16:00:00' AND paramid=211 ORDER BY obstime;
COPY data FROM '/metno/kvalobs/TESTDATA/kvqc2_1.0.4/Qc2-211-SinglePointTest.db.dat' USING DELIMITERS ';' ;
SELECT * FROM data WHERE stationid=87120 AND obstime BETWEEN '2025-09-16 06:00:00' AND '2025-09-17 16:00:00' AND paramid=211;
UPDATE data SET corrected=5, original=5 WHERE stationid=87120 AND  obstime='2025-09-17 09:00:00' AND paramid=211;
UPDATE data SET corrected=7.2, original=7.2 WHERE stationid=87120 AND  obstime='2025-09-16 11:00:00' AND paramid=211;
SELECT * FROM data WHERE stationid=87120 AND obstime BETWEEN '2025-09-16 06:00:00' AND '2025-09-17 16:00:00' AND paramid=211;
UPDATE data SET useinfo='7010000000000000' WHERE stationid=87120 and  obstime='2025-09-17 09:00:00' and paramid=211;
UPDATE data SET useinfo='7010000000000000' WHERE stationid=87120 and  obstime='2025-09-16 11:00:00' and paramid=211;
DELETE from DATA where  stationid=87120 and  obstime BETWEEN '2025-09-16 06:00:00' AND '2025-09-17 16:00:00' and paramid=211;

The test data set:

 stationid |       obstime       | original | paramid |       tbtime        | typeid | sensor | level | corrected |   controlinfo    |     useinfo      |               cfailed                
-----------+---------------------+----------+---------+---------------------+--------+--------+-------+-----------+------------------+------------------+--------------------------------------
     87120 | 2025-09-16 07:00:00 |     11.5 |     211 | 2010-09-16 07:03:24 |    330 | 0      |     0 |      11.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 08:00:00 |     10.7 |     211 | 2010-09-16 08:03:19 |    330 | 0      |     0 |      10.7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 09:00:00 |      9.7 |     211 | 2010-09-16 09:03:22 |    330 | 0      |     0 |       9.7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 10:00:00 |      7.9 |     211 | 2010-09-16 10:03:21 |    330 | 0      |     0 |       7.9 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 11:00:00 |      6.6 |     211 | 2010-09-16 11:03:21 |    330 | 0      |     0 |       6.6 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 12:00:00 |    -19.1 |     211 | 2010-09-16 12:03:25 |    330 | 0      |     0 |    -32766 | 05120020000000A0 | 7038300000000002 | QC1-1-211:1,QC1-3a-211:1,QC1-9-211:1
     87120 | 2025-09-16 13:00:00 |      6.7 |     211 | 2010-09-16 13:03:17 |    330 | 0      |     0 |       6.7 | 0110000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 14:00:00 |      6.4 |     211 | 2010-09-16 14:03:19 |    330 | 0      |     0 |       6.4 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 15:00:00 |        7 |     211 | 2010-09-16 15:03:21 |    330 | 0      |     0 |         7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 16:00:00 |   -32767 |     211 | 2010-09-16 16:51:24 |    330 | 0      |     0 |    -32767 | 0000003000000000 | 9899900000000000 | 
     87120 | 2025-09-16 17:00:00 |   -32767 |     211 | 2010-09-16 17:33:00 |    330 | 0      |     0 |    -32767 | 0000003000000000 | 9899900000000000 | 
     87120 | 2025-09-16 18:00:00 |      8.3 |     211 | 2010-09-16 18:04:25 |    330 | 0      |     0 |       8.3 | 0110000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 19:00:00 |        8 |     211 | 2010-09-16 19:04:22 |    330 | 0      |     0 |         8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 20:00:00 |      7.8 |     211 | 2010-09-16 20:04:23 |    330 | 0      |     0 |       7.8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 21:00:00 |      8.2 |     211 | 2010-09-16 21:04:21 |    330 | 0      |     0 |       8.2 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 22:00:00 |      8.1 |     211 | 2010-09-16 22:04:25 |    330 | 0      |     0 |       8.1 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-16 23:00:00 |        8 |     211 | 2010-09-16 23:04:25 |    330 | 0      |     0 |         8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 00:00:00 |      7.7 |     211 | 2010-09-17 00:04:20 |    330 | 0      |     0 |       7.7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 01:00:00 |      7.6 |     211 | 2010-09-17 01:03:46 |    330 | 0      |     0 |       7.6 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 02:00:00 |      7.5 |     211 | 2010-09-17 02:03:44 |    330 | 0      |     0 |       7.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 03:00:00 |      7.1 |     211 | 2010-09-17 03:03:42 |    330 | 0      |     0 |       7.1 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 04:00:00 |      7.3 |     211 | 2010-09-17 04:03:46 |    330 | 0      |     0 |       7.3 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 05:00:00 |      7.8 |     211 | 2010-09-17 05:03:49 |    330 | 0      |     0 |       7.8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 06:00:00 |      7.4 |     211 | 2010-09-17 06:03:46 |    330 | 0      |     0 |       7.4 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 07:00:00 |      7.6 |     211 | 2010-09-17 07:03:49 |    330 | 0      |     0 |       7.6 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 08:00:00 |      8.5 |     211 | 2010-09-17 08:03:43 |    330 | 0      |     0 |       8.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 09:00:00 |      8.7 |     211 | 2010-09-17 09:03:50 |    330 | 0      |     0 |       8.7 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 10:00:00 |   -32767 |     211 | 2010-09-17 10:32:33 |    330 | 0      |     0 |    -32767 | 0100003000000000 | 7899900000000000 | 
     87120 | 2025-09-17 11:00:00 |      9.5 |     211 | 2010-09-17 11:03:44 |    330 | 0      |     0 |       9.5 | 0110000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 12:00:00 |      9.5 |     211 | 2010-09-17 12:04:47 |    330 | 0      |     0 |       9.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 13:00:00 |      9.8 |     211 | 2010-09-17 13:04:51 |    330 | 0      |     0 |       9.8 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 14:00:00 |      9.3 |     211 | 2010-09-17 14:04:48 |    330 | 0      |     0 |       9.3 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 15:00:00 |      9.5 |     211 | 2010-09-17 15:04:48 |    330 | 0      |     0 |       9.5 | 0111000000000010 | 7000000000000000 | 
     87120 | 2025-09-17 16:00:00 |      9.3 |     211 | 2010-09-17 16:21:26 |    330 | 0      |     0 |       9.3 | 0111000000000010 | 7100000400000000 | 
(34 rows)
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
  • kvalobs/kvoss/system/qc2/test/slv32.1285541000.txt.gz
  • Last modified: 2022-05-31 09:23:18
  • (external edit)