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:algorithms:akima [2011-03-14 00:44:58] paule |
kvalobs:kvoss:system:qc2:test:algorithms:akima [2022-05-31 09:29:32] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Akima Tests ====== | ====== Akima Tests ====== | ||
+ | |||
+ | |||
The following graphs illustrate comparisons between an Akima Interpolation and Linear Interpolation for single missing points. The title gives the time of the missing value, which is located at Hours=3 on each graph. The linear interpolation is the square on the straight line segment. The real data are displayed as blue squares. The curve is the Akima Spline and the corrected value that would be provided by the Akima Interpolation is indicated by the triangle. | The following graphs illustrate comparisons between an Akima Interpolation and Linear Interpolation for single missing points. The title gives the time of the missing value, which is located at Hours=3 on each graph. The linear interpolation is the square on the straight line segment. The real data are displayed as blue squares. The curve is the Akima Spline and the corrected value that would be provided by the Akima Interpolation is indicated by the triangle. | ||
- | {{: | + | {{kvalobs: |
+ | {{kvalobs: | ||
+ | {{kvalobs: | ||
+ | {{kvalobs: | ||
+ | |||
+ | ====== StationID = 59800; Start Time=20080706-06 ====== | ||
+ | |||
+ | Investigation with some longer time intervals. | ||
+ | |||
+ | * Point selected at Hour=33, **Actual Original Value = 15.9** degrees Celsius. | ||
+ | * Neighbours: (32, | ||
+ | * The point is treated as a missing point for the following Akima interpolations. | ||
+ | |||
+ | **Key:** | ||
+ | |||
+ | ^Blue Squares: |Original data | | ||
+ | ^Red circles: |Points used in the interpolation | | ||
+ | ^Triangle: |The Akima Point | | ||
+ | ^Curve: |The Akima Fit | | ||
+ | |||
+ | {{kvalobs: | ||
+ | {{kvalobs: | ||
+ | {{kvalobs: | ||
+ | {{kvalobs: | ||
+ | {{kvalobs: | ||
+ | |||
+ | |||
+ | ====== StationID = 18700; Start Time=20080706-06; | ||
+ | |||
+ | * Actual original = 10.1 Degrees Celsius | ||
+ | * {{kvalobs: | ||
+ | * {{kvalobs: | ||
+ | * {{kvalobs: | ||
+ | * Square below is the linear interpolation: | ||
+ | * {{kvalobs: | ||
+ | |||
+ | ====== StationID = 18700; Start Time=20080706-06; | ||
+ | |||
+ | * {{kvalobs: | ||
+ | * {{kvalobs: | ||
+ | * {{kvalobs: | ||
+ | |||
+ | |||
+ | ====== Using Akima in the DipTest Algorithm ====== | ||
+ | |||
+ | < | ||
+ | stationid | | ||
+ | -----------+---------------------+----------+---------+---------------------+--------+--------+-------+-----------+------------------+------------------+------------------------------------ | ||
+ | 99990 | 2027-07-08 12:00:00 | -30.8 | 211 | 2007-07-08 12:03:18 | 1 | 0 | 0 | -30.8 | 1111000000100010 | 7000000000000000 | | ||
+ | 99990 | 2027-07-08 13:00:00 | -28.1 | 211 | 2007-07-08 13:03:26 | 1 | 0 | 0 | -28.1 | 1111000000100010 | 7000000000000000 | | ||
+ | 99990 | 2027-07-08 14:00:00 | -27.8 | 211 | 2007-07-08 14:03:27 | 1 | 0 | 0 | -27.8 | 1111000000100010 | 7000000000000000 | | ||
+ | 99990 | 2027-07-08 15:00:00 | -32 | 211 | 2007-07-08 15:03:35 | 1 | 0 | 0 | -32 | 1111000000100010 | 7000000000000000 | | ||
+ | 99990 | 2027-07-08 16:00:00 | -31.8 | 211 | 2007-07-08 16:03:39 | 1 | 0 | 0 | -31.8 | 1111000000100010 | 7000000000000000 | | ||
+ | 99990 | 2027-07-08 17:00:00 | -24.1 | 211 | 2007-07-08 17:03:20 | 1 | 0 | 0 | -31 | 1119000000100010 | 5033300000000001 | QC1-3a-211: | ||
+ | 99990 | 2027-07-08 18:00:00 | -29.8 | 211 | 2007-07-08 18:03:25 | 1 | 0 | 0 | -29.8 | 1114000000100010 | 5010300000000001 | QC2d-1 | ||
+ | 99990 | 2027-07-08 19:00:00 | -26.8 | 211 | 2007-07-08 19:03:31 | 1 | 0 | 0 | -26.8 | 1111000000100010 | 7000000000000000 | | ||
+ | 99990 | 2027-07-08 20:00:00 | -25.6 | 211 | 2007-07-08 20:03:12 | 1 | 0 | 0 | -25.6 | 1111000000100010 | 7000000000000000 | | ||
+ | 99990 | 2027-07-08 21:00:00 | -26.8 | 211 | 2007-07-08 21:03:18 | 1 | 0 | 0 | -26.8 | 1111000000100010 | 7000000000000000 | | ||
+ | 99990 | 2027-07-08 22:00:00 | -26.6 | 211 | 2007-07-08 22:02:43 | 1 | 0 | 0 | -26.6 | 1111000000100010 | 7000000000000000 | | ||
+ | 99990 | 2027-07-08 23:00:00 | -25.5 | 211 | 2007-07-08 23:03:28 | 1 | 0 | 0 | -25.5 | 1111000000100010 | 7000000000000000 | | ||
+ | |||
+ | |||
+ | 99990 | 2027-07-09 17:00:00 | -31.3 | 211 | 2007-07-09 17:02:50 | 1 | 0 | 0 | -31.3 | 1111000000100010 | 7000000000000000 | | ||
+ | 99990 | 2027-07-09 18:00:00 | -29.3 | 211 | 2007-07-09 18:02:55 | 1 | 0 | 0 | -29.3 | 1111000000100010 | 7000000000000000 | | ||
+ | 99990 | 2027-07-09 19:00:00 | -30.6 | 211 | 2007-07-09 19:03:01 | 1 | 0 | 0 | -30.6 | 1111000000100010 | 7000000000000000 | | ||
+ | 99990 | 2027-07-09 20:00:00 | -28.8 | 211 | 2007-07-09 20:03:20 | 1 | 0 | 0 | -28.8 | 1111000000100010 | 7000000000000000 | | ||
+ | 99990 | 2027-07-09 21:00:00 | -25.1 | 211 | 2007-07-09 21:02:25 | 1 | 0 | 0 | -25.1 | 1111000000100010 | 7000000000000000 | | ||
+ | 99990 | 2027-07-09 22:00:00 | -32.7 | 211 | 2007-07-09 22:03:39 | 1 | 0 | 0 | -28 | 1119000000100010 | 5033300000000001 | QC1-3a-211: | ||
+ | 99990 | 2027-07-09 23:00:00 | -32 | 211 | 2007-07-09 23:04:18 | 1 | 0 | 0 | -32 | 1114000000100010 | 5010300000000001 | QC2d-1 | ||
+ | 99990 | 2027-07-10 00:00:00 | -32 | 211 | 2007-07-10 00:03:19 | 1 | 0 | 0 | -32 | 1111000000100010 | 7000000000000000 | | ||
+ | 99990 | 2027-07-10 01:00:00 | -34.7 | 211 | 2007-07-10 01:03:28 | 1 | 0 | 0 | -34.7 | 1111000000100010 | 7000000000000000 | | ||
+ | 99990 | 2027-07-10 02:00:00 | -34.7 | 211 | 2007-07-10 02:03:53 | 1 | 0 | 0 | -34.7 | 1111000000100010 | 7000000000000000 | | ||
+ | 99990 | 2027-07-10 03:00:00 | -31.3 | 211 | 2007-07-10 03:03:55 | 1 | 0 | 0 | -31.3 | 1111000000100010 | 7000000000000000 | | ||
+ | 99990 | 2027-07-10 04:00:00 | -30.3 | 211 | 2007-07-10 04:04:01 | 1 | 0 | 0 | -30.3 | 1111000000100010 | 7000000000000000 | | ||
+ | 99990 | 2027-07-10 05:00:00 | -31 | 211 | 2007-07-10 05:04:32 | 1 | 0 | 0 | -31 | 1111000000100010 | 7000000000000000 | | ||
+ | paule@pc3029: | ||
+ | </ | ||
+ | |||
+ | ====== Some results from dev-vm101 ====== | ||
+ | |||
+ | |||
+ | < | ||
+ | | ||
+ | -----------+---------------------+----------+---------+---------------------------+--------+--------+-------+-----------+------------------+------------------+-------------------- | ||
+ | 90800 | 2011-03-23 12:00:00 | 29.4 | 90 | 2011-03-23 11: | ||
+ | 90800 | 2011-03-23 13:00:00 | 16.1 | 90 | 2011-03-23 12: | ||
+ | 90800 | 2011-03-23 14:00:00 | 33.4 | 90 | 2011-03-23 13: | ||
+ | (3 rows) | ||
+ | </ | ||
+ | |||
+ | Note: in this first case for StationID=90800 Linear Interpolation is used because there is a missing neighbour and therefore not enough points for Akima Interpolation: | ||
+ | |||
+ | < | ||
+ | | ||
+ | -----------+---------------------+----------+---------+----------------------------+--------+--------+-------+-----------+------------------+------------------+-------------------- | ||
+ | 90800 | 2011-03-23 08:00:00 | 22.5 | 90 | 2011-03-23 07: | ||
+ | 90800 | 2011-03-23 09:00:00 | 25.5 | 90 | 2011-03-23 08: | ||
+ | 90800 | 2011-03-23 10:00:00 | 27 | 90 | 2011-03-23 09: | ||
+ | 90800 | 2011-03-23 11:00:00 | | ||
+ | 90800 | 2011-03-23 12:00:00 | 29.4 | 90 | 2011-03-23 11: | ||
+ | 90800 | 2011-03-23 13:00:00 | 16.1 | 90 | 2011-03-23 12: | ||
+ | 90800 | 2011-03-23 14:00:00 | 33.4 | 90 | 2011-03-23 13: | ||
+ | 90800 | 2011-03-23 15:00:00 | 33.3 | 90 | 2011-03-23 14: | ||
+ | 90800 | 2011-03-23 16:00:00 | 30.1 | 90 | 2011-03-23 15: | ||
+ | 90800 | 2011-03-23 17:00:00 | 26.1 | 90 | 2011-03-23 16: | ||
+ | 90800 | 2011-03-23 18:00:00 | 23.4 | 90 | 2011-03-23 17: | ||
+ | (11 rows) | ||
+ | </ | ||
+ | |||
+ | Next an Akima interpolation is applied but note that the Linear value is also recorded in CFAILED for reference (NB only for testing). | ||
+ | |||
+ | < | ||
+ | | ||
+ | -----------+---------------------+----------+---------+----------------------------+--------+--------+-------+-----------+------------------+------------------+--------------------------------------- | ||
+ | 79600 | 2011-03-23 15:00:00 | 19.3 | 90 | 2011-03-23 14: | ||
+ | 79600 | 2011-03-23 16:00:00 | 36.4 | 90 | 2011-03-23 15: | ||
+ | 79600 | 2011-03-23 17:00:00 | 10.8 | 90 | 2011-03-23 16: | ||
+ | (3 rows) | ||
+ | </ | ||
+ | |||
+ | The following example is incorrect implementation. The Akima interpolkation gives a -ve value for Vindhastighet that is always positive! | ||
+ | < | ||
+ | | ||
+ | -----------+---------------------+----------+---------+----------------------------+--------+--------+-------+-----------+------------------+------------------+---------------------------------------------- | ||
+ | 25830 | 2011-03-23 16:00:00 | 0.6 | 81 | 2011-03-23 15: | ||
+ | 25830 | 2011-03-23 17:00:00 | 11.8 | 81 | 2011-03-23 16: | ||
+ | 25830 | 2011-03-23 18:00:00 | 1.6 | 81 | 2011-03-23 17: | ||
+ | (3 rows) | ||
+ | </ | ||
+ | |||
+ | The case is even more interesting. Qc1 identifies a Dip at Hour=17:00 where the value is 11.8. If one ignores the points at Hours 16 and 18 then 11.8 doe snot look like a Dip. | ||
+ | |||
+ | {{kvalobs: | ||
+ | |||
+ | < | ||
+ | | ||
+ | -----------+---------------------+----------+---------+----------------------------+--------+--------+-------+-----------+------------------+------------------+----------------------------------------- | ||
+ | 39100 | 2011-03-24 00:00:00 | 12.4 | 90 | 2011-03-23 23: | ||
+ | 39100 | 2011-03-24 01:00:00 | 25 | 90 | 2011-03-24 00: | ||
+ | 39100 | 2011-03-24 02:00:00 | 10.4 | 90 | 2011-03-24 01: | ||
+ | (3 rows) | ||
+ | |||
+ | | ||
+ | -----------+---------------------+----------+---------+---------------------------+--------+--------+-------+-----------+------------------+------------------+----------------------------------------- | ||
+ | 94500 | 2011-03-24 01:00:00 | 24.5 | 90 | 2011-03-24 00: | ||
+ | 94500 | 2011-03-24 02:00:00 | 41.9 | 90 | 2011-03-24 01: | ||
+ | 94500 | 2011-03-24 03:00:00 | 22.5 | 90 | 2011-03-24 02: | ||
+ | (3 rows) | ||
+ | |||
+ | | ||
+ | -----------+---------------------+----------+---------+----------------------------+--------+--------+-------+-----------+------------------+------------------+------------------------------- | ||
+ | 85040 | 2011-03-24 04:00:00 | 8.3 | 90 | 2011-03-24 03: | ||
+ | 85040 | 2011-03-24 05:00:00 | 24.5 | 90 | 2011-03-24 04: | ||
+ | 85040 | 2011-03-24 06:00:00 | 9.2 | 90 | 2011-03-24 05: | ||
+ | (3 rows) | ||
+ | |||
+ | | ||
+ | -----------+---------------------+----------+---------+----------------------------+--------+--------+-------+-----------+------------------+------------------+--------------------------------------- | ||
+ | 85450 | 2011-03-25 02:00:00 | 5.2 | 90 | 2011-03-25 01: | ||
+ | 85450 | 2011-03-25 03:00:00 | 32.5 | 90 | 2011-03-25 02: | ||
+ | 85450 | 2011-03-25 04:00:00 | 16.8 | 90 | 2011-03-25 03: | ||
+ | (3 rows) | ||
+ | |||
+ | | ||
+ | -----------+---------------------+----------+---------+----------------------------+--------+--------+-------+-----------+------------------+------------------+---------------------------------------- | ||
+ | 79600 | 2011-03-25 21:00:00 | 3.2 | 90 | 2011-03-25 20: | ||
+ | 79600 | 2011-03-25 22:00:00 | 28.6 | 90 | 2011-03-25 21: | ||
+ | 79600 | 2011-03-25 23:00:00 | 4.6 | 90 | 2011-03-25 22: | ||
+ | (3 rows) | ||
+ | </ | ||
+ | |||
+ | Finally ... another example where linear is adopted rather than Akima. | ||
+ | |||
+ | |||
+ | < | ||
+ | | ||
+ | -----------+---------------------+----------+---------+----------------------------+--------+--------+-------+-----------+------------------+------------------+-------------------- | ||
+ | 94500 | 2011-03-25 09:00:00 | 15.8 | 90 | 2011-03-25 08: | ||
+ | 94500 | 2011-03-25 10:00:00 | 15.6 | 90 | 2011-03-25 09: | ||
+ | 94500 | 2011-03-25 11:00:00 | | ||
+ | 94500 | 2011-03-25 12:00:00 | 15.6 | 90 | 2011-03-25 11: | ||
+ | 94500 | 2011-03-25 13:00:00 | 16.6 | 90 | 2011-03-25 12: | ||
+ | 94500 | 2011-03-25 14:00:00 | 36 | 90 | 2011-03-25 13: | ||
+ | 94500 | 2011-03-25 15:00:00 | 16.8 | 90 | 2011-03-25 14: | ||
+ | 94500 | 2011-03-25 16:00:00 | 18.5 | 90 | 2011-03-25 15: | ||
+ | 94500 | 2011-03-25 17:00:00 | 18.5 | 90 | 2011-03-25 16: | ||
+ | 94500 | 2011-03-25 18:00:00 | 18.4 | 90 | 2011-03-25 17: | ||
+ | 94500 | 2011-03-25 19:00:00 | 17.4 | 90 | 2011-03-25 18: | ||
+ | |||
+ | </ |