Smoothing Lake Level Data
This is a follow up to a post on lake level data smoothing written about 5 years ago, in 2012..
Lake level measurements have a tendency to fluctuate up and down, and an early attempt to investigate these changes concluded that there was a natural sloshing of the waters from one end of the lake to the other. It was guessed that this was due to winds flowing over the lake. No serious analysis was done, except to observe that it was possible sloshing.
R has an extensive set of methodologies to smooth data which can possibly reveal more of the periodicity of the lake levels. This post processed a recent weeks worth of lake measurements with various smoothing methods. These methods are:
- Savitsky-Golay smoothing filters - changing data spans give different outcomes
- Tukeys smoothers - there are various smoothing options
- Lowess smoothing
- Smoothing with splines
- Smoothing with Loess
This post will present results of each of these smoothers for parameters that control the resulting smooth function.
The data set used is from January 18, 2018 starting at 12:34:58 am and ending January 26, 2018 at 12:27:35 am. The collection interval for the measurements is about every 10 minutes. The data set can be downloaded from here.. The file contains three columns of data: ‘Datetime’ is the date (year-month-day) and time (hr:min:sec) the measurement was extracted from the Deep Creek Hydro website, ‘ONOFF’ is the status of the generator system, either ON or OFF and the third column is the ‘lake level’ in ft Above Mean Sea Level.
Figure 1a is the raw data plotted. The oscillations in the measurements are clearly seen. Some are generator induced, drawdown and recharge from groundwater. It is desired to understand where those oscillations come from, whether inherent noise, water removal or addition to the lake, or some other phenomena. On the Feb 2012 post it was assessed that the water was sloshing back and forth.
Figure 1a. As Recorded Lake Level Data for the Period Investigated.
Figure 1b superimposes the status of the generator and the number of hours they ran. The one thing that can be determined from the data retrieved from the Deep Creek Hydro website is whether the generators were always running at their design conditions. In all of the work reported here, it is assumed that they were. As noted above, the generators draw down the lake a small amount, clearly depending on how long they operate contineously, of which some is recovered by inflow of ground water.
Figure 1b. As Recorded Lake Level Data for the Period Investigated with Generator Status.
In the remaining figures in this post, various data smoothing techniques are employed in an attempt to isolate the periodic components of the the lake level measurements.
Figures 2 through 12 are panels of two images each. The title above each individual image explains what smoothing method that was used and the value of the parameter that alters the smooth curve. The black lines are the ‘smooth’ lines, while the red points and lines are the original data.
Lowess smoothing with ff=0.2 and Loess smoothing with span=2 provide the most visually pleasing overall smooth curves through the data.
Figure 2. Smoothing with Savitsky-Golay filters. Figure 3. Smoothing with Savitsky-Golay filters. Figure 4. Smoothing with Tukey filters. Figure 5. Smoothing with Tukey filters. Figure 6. Smoothing with Tukey filters. Figure 7. Smoothing with Tukey filters. Figure 8. Smoothing with Lowess filters. Figure 9. Smoothing with Lowess filters. Figure 10. Smoothing with Lowess and Spline filters. Figure 11. Smoothing with Loess filters. Figure 12. Smoothing with Loess filters.
Probably the most accurate representation of the data is given by the Savitsky-Golay filter with n=31, the spline filter and Loess with span=0.05. From these the on-ff status of the generators is easily discerned.
During the period around January 20, additional oscillations are observed while the generators are not operating and therefore when no water is being withdrawn from the lake. Various smoothing algorithms were chose from the previous work to assess the oscillations in more detail, with the results shown in Figures 13-15.
Figure 13. Raw Data of Jan 20. Figure 14. Smoothing of Jan 20 Data with Savitsky-Golay with n=9 Filter. Figure 15. Smoothing of Jan 20 Data with Spline Filter. Figure 16. Smoothing of Jan 20 Data with Lowess and ff=0.05 Filter.
Using a Lowess filter with ff=0.05 the peaks are fairly clearly marked. Drawing vertical lines from the peaks to a lower horizontal line and measuring the number of units between peaks and using a scale factor to convert to minutes and plotting the results as a histogram one gets Figure 17 and 18. The average value of this set is 87.4 minutes, not horribly different to the 90-110 minutes result obtained in 2012 (see the post referenced here). For the Jan lake level there is roughly a foot of ice on the lake.
Figure 17. Marked Periods of Jan 20 Data with Lowess and ff=0.05 Filter. Figure 18. Histogram of Jan 20 Data Measured Periods with Lowess and ff=0.05 Filter.
There is a fair amount of literature on seiches, short-period oscillations in an enclosed or semi-enclosed body of water. The following are some works that explore their behavior.
- Alexander B. Rabinovich1, “Seiches and Harbour Oscillations.”
- G. T. Csanady, “Hydrodynamics of Large Lakes.”
- Seiches, “From the McGraw-Hill Encyclopedia of Science&Technology, 9th Edition.”
- G. Kirillin1, M. S. Lorang, T. C. Lippmann, C. C. Gotschalk, and S. Schimmelpfennig, “Surface seiches in Flathead Lake.”
- Alexander B. Rabinovich, “Chapter 9, Seiches and Harbor Oscillations.”
- Martijn de Jong, “Origin and prediction of seiches in Rotterdam harbour basins.”
An analytical solution for a rectangular basin of lenght L and a uniform depth of H is given by the following, Merrians’s formula for the fundamental mode, n=1, addapted from Ref.3 above:
For Deep Creek Lake using a length of 11.6 miles and an average depth of 25 ft one obtains 72 minutes, somewhat in the ballpark of the observed values of 50-120 minutes.
First Published: 2018-01-27
Updated: 2018-01-30 FILE: 2018-01-27-Smoothing Lake Level Data
2018 PLV Some Rights Reserved