This is an old revision of the document!
GAP INTERPOLATION
The Akima Spline interpolates based on the gradients between points of the nearest neighbours in the time series. At least five neighbours are required (this may be satisfied by having two to three points on either side of a gap). The values of more distant neighbours appear to have little effect on the finally interpolated data.
Advantage is taken of this behaviour in the proposed variable length gap algorithm, as described here:
- For a given station an arbitrary length time series of data is selected.
- Points in the time series that satisfy a given quality condition are used to generate the Akima Spline. (in the first version of the algorithm only data where useinfo(2)=0 , any other criteria may also be set).
- The time series is then parsed for missing values. If a value is missing but it is sufficiently close to enough good neigbours (details on this to be added below) then it can be replaced with the value from the Akima spline.
Using Akima For Variable Length Gaps
Original Data
Simulated Gaps
For this example we generate our own gaps so that the results may also be compared to the original values.
Akima Fit
Akima Fit also indicating the interpolated data points
Comparison of data
Hour | … | 21 | 22 | 23 | 24 | 25 | … | 38 | 39 | 40 | … | 48 | 49 | 50 | 51 | … | 97 | 98 | 99 | 100 | 101 | 102 | 103 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Original Value | … | -0.2 | 0.1 | -0.4 | 1 | 0.7 | … | 3.8 | 4.5 | 4 | … | 2.7 | 2.5 | 2.4 | 2.5 | … | 1.8 | 1.7 | 1.5 | 1.6 | 1.4 | 1.4 | 1.8 |
Akima | … | -0.6 | -0.6 | -0.4 | 0.0 | 0.3 | … | 4.1 | 3.8 | 3.7 | … | 2.7 | 2.6 | 2.6 | 2.6 | … | 1.7 | 1.5 | 1.4 | 1.4 | 1.4 | 1.6 | 1.8 |