Open MayDey9 opened 4 months ago
Hi. Interesting data! Thanks for getting in touch.
The tidal fit looks reasonably good to me. Maybe you can plot the residuals and compare them with other signals that you think are relevant? (Maybe you have precipitation data, for example. Or for groundwater, salinity would help.)
My first step would be to plot the residual. (I like stacked plots for this, not plotting in one panel.). If that residual "looks" tidal then you will know that there is a problem in dynamics at tidal periods. Maybe, for example, there are hydraulic controls on water entering an isolated region where you're sampling. I don't have a picture of your situation in my mind, so it's hard to guess. But lots of things can alter signals. For example, a frictional pendulum has a different period than a frictionless one of the same length. Lots of systems have such features, making them be not quite what one expects, viewing through an idealized lens. And tidal fitting is definitely idealized -- those frequencies are fixed.
In addition to time-series plots, I'd be doing spectral analysis as well. That might show that you have a signal that is not quite at a tidal frequency, which gets me back to ideas of friction, hydraulic control, etc.
As a general matter, I find it helpful to try to express my ideas in mathematical form with simple models (maybe flow models, oscillator models etc).
I know I'm being a bit vague here, but these are general thoughts.
Of course, you'll want to look in the literature as well. I don't mean tidal-analysis literature, I mean literature on flow systems like you have. That depends on your system, of course. I only have a couple of keywords from your question, but you will know more and so you can do searches that are relevant. I assume you've done that already?
Note that this forum is "open" so other folks can see your data. If you want to send the data privately to Clark and me, we could maybe take a look. Ditto the code.
I agree with everything @dankelley said. It looks to me like the tidal fit is "pretty good", but that you're likely to have "tidal-looking" residuals indicating that the frequencies are not quite the same as the astronomical forcing or that the frequencies/amplitudes/phases of the tides in the groundwater levels are not stationary. This is a common problem in systems like estuaries, where the influence of the tide is moderated by other factors (as Dan indicated).
I think the first thing I would look at is comparing the groundwater levels against a representative measure of the assumed tidal forcing -- i.e. a time series of tidal levels for the open ocean forcing. Do you have an ocean tide gauge nearby that you could use?
Hi. No images appeared in your post. I think the system will let youi edit. I advise not using email to reply, because that includes more information than may be desired (e.g. sometimes people have email set up to show phone numbers, which you might not want to be visible).
Hello Dr. Dan and Dr. Clark,
Thanks so much for your prompt response. Pardon my delayed response as finding stable internet connection on the island is a little tricky.
I should provide some context to this question of mine. These measurements are for a thin layer of freshwater which floats above the denser saltwater under atolls. Since the aquifer is connected to the surrounding sea, we see signatures of tides even within the groundwater aquifer...although the signatures are less pronounced as you go away from the shore and towards the centre of atolls. However, these atolls are about 700-800 m in width and thus, there are still appreciable quantities of tidal forcing.
Below are some reference images to show the system.
A researcher digging an observation well
The final set-up of the observation well. The acoustic water-level sensor is placed on the top and reads measurements of the groundwater every 5 mins.
Only recently, I have managed to get a year's worth of groundwater fluctuation data, but have not analysed it in any formal way. A preliminary look at the data along with a spectral decomposition shows interesting trends. Attaching the graph below. There seems to have been a gap for about 2 weeks or so in September due to the equipment toppling over.
The basic assumption was that the residuals, especially values that are below the projected water level due to tides can perhaps be attributed to loss of water. This loss is due to groundwater abstraction by pumps in the vicinity, or by transpiration loss by coconuts. I've tried to look at any initial pattern and this is the something that I got. The graph highlights values from the month of Jan, Feb, and March. The greater spread of values in the low tide can perhaps be attributed to submarine groundwater discharge which is rather strong in atoll systems. Further, the dip in water levels beyond 12 noon can perhaps also be attributed to some degree of transpiration loss. These are of course just indications, and are not conclusive evidence, for now.
Regarding looking at data from a reference tide station, or rainfall, it is notoriously difficult to get our hands on such data. Either they do not exist or wherever they do, are of such poor quality that not much can be said reliably. Surprisingly, we do not have a tidal station in our region so I don't know if comparing this with a reference tidal data is feasible. Rainfall is something I've been trying to get my hands on but have not been successful yet. Next year, we plan on installing our own rain gauges so we can monitor some of these basic variables.
I have read about the general system, yes, but none of the analytical methods used are similar to this method which is why I'm a little uncertain on the assumptions and models to use. I am currently reading up on fluid dynamics but I am an ecologist by training and therefore take a little longer than usual to be up to speed with such concepts.
Is any of this information relevant to your understanding of the system? If so, do you have some strong recommendations on how I can proceed? I can share some of this data with you if you feel that will help, along with the codes.
Thanks once again for your help. I look forward to hearing from you.
I think Clark and I might be having a meeting next week, and we can discuss it then. Thanks for sending that fascinating information. Dan.
HI again. I just had a moment to read your comment, and I think it would be helpful if you could email the data to me (kelley.dan@gmail.com) and Clark (clark.richards@gmail.com) so we can take a look. The spectrum looks strange, and my first step will be to remove the time interval where you have no data, etc.
Also, if by any chance you could also email us some images of the atoll (maybe google earth has one?) that would help.
And, thirdly, an idea of the water depth would help also.
It's possible that a model can be constructed of tidal flow getting into your domain through what we might consider to be a "sponge region" (just a region that resists flow).
The reason I ask you to email these things is that it can save a lot of time, so Clark and/or I can try some things. Interacting over github can be slow, when everyone is busy.
Again -- please send those things by email, not over github. I ask this because we don't want someone else taking your data and publishing them before you get a chance to do so.
I'm quite busy this week while traveling, but I concur that Dan and I could probably help better if we had a copy of the data. I also noticed that the spectrum seems strange -- it almost looks like it's been pre-filtered, though as Dan suggests it could be an effect of including the two weeks of "zero" data. As a start you can just replace any data that is < 3000 with NA, and redo the creation of the sealevel
object and the tidal analysis.
Clark is right on the odd spectrum. I have an example prepared, but I'm doing something else for half an hour so I won't upload it right away.
Here is an experiment that shows what a "notch" (time interval of anomalous data) does. Click "details" to see the example.
NOTE: I removed the data for the final test. Setting them to NA does not work because R refuses to do a spectrum of a time series that has NA values. (Therefore the spectrum you see in the bottom panel is not quite right, since the time interval has a jump mid-way. However, these plots are just for casual interest. The main result is the tidal fit, and that is immune to NA values.)
In case it's of any interest, I made a little model of groundwater flow and results are as shown, with some basically random values for the parameters of the problem. I suspect this is not especially relevant, because it's a very crude model, but I mentioned it in an email to @richardsc so I wanted to show the diagram here.
i am forcing it with a month of the Halifax dataset (that is in oce), from which I removed non-tidal components and then the mean level as well. The left column shows the timeseries at top and a spectral plot below. The right column is for the response. There are geometrical aspects to the problem, which I've simply guessed at. Another key parameter is the ground porosity, and for that I looked up numbers for sand and gravel and made a mixture (see title of top-right plot). All of this is a guess of course, but I fiddled a bit to get heights that might make sense. The main point is that, as expected, higher-frequency components are diminished relative to lower-frequency components (look at the reductions for semidiurnal and diurnal bands).
I know this is not really relevant to the main question, but just to show you that I am curious to see the data and learn more about the problem.
Back to the main question --
I advise removing tides with tidem()
, not with filtering, because filters can have odd effects. Also, filters do not work well with missing data, whereas tidal-component regression can handle that case.
The topic is much too large to get into in a context like a GH issue. Many papers have been written on it, and the usual advice is to remove tides instead of filtering. I think I have maybe 50 to 100 papers in my database relating to tides, for example. A sampling of the papers and books is as below. Note that Pugh has an appendix with the coefficients for tidal convolution filters.
Defant, A. Ebb and Flow: The Tides of Earth, Air, and Water. University of Michigan Press, 1958. https://books.google.ca/books?id=L4ULAAAAMAAJ.
Doodson, A. T. “The Analysis and Prediction of Tides in Shallow Water.” The International Hydrographic Review 41 (1957). https://journals.lib.unb.ca/index.php/ihr/article/view/26682.
Doodson, Arthur Thomas, and Joseph Proudman. “VI. The Analysis of Tidal Observations.” Philosophical Transactions of the Royal Society of London. Series A, Containing Papers of a Mathematical or Physical Character 227, no. 647–658 (January 1, 1928): 223–79. https://doi.org/10.1098/rsta.1928.0006.
Foreman, Michael G.G., William R. Crawford, and Richard F. Marsden. “De–Tiding: Theory and Practice.” In Coastal and Estuarine Studies, edited by Daniel R. Lynch and Alan M. Davies, 47:203–39. Washington, D. C.: American Geophysical Union, 1995. https://doi.org/10.1029/CE047p0203.
Gargett, Ann E., and Dana K. Savidge. “Separation of Short Time Series of Currents into ‘Fluctuations,’ ‘Tides,’ and ‘Mean’ Flow.” Journal of Atmospheric and Oceanic Technology 33, no. 5 (April 1, 2016): 1089–95. https://doi.org/10.1175/JTECH-D-15-0232.1.
Pugh, David. Tides, Surges, and Mean Sea-Level. Chichester ; New York: J. Wiley, 1987.
Sánchez-Úbeda, Juan Pedro, María Luisa Calvache, Carlos Duque, and Manuel López-Chicano. “Filtering Methods in Tidal-Affected Groundwater Head Measurements: Application of Harmonic Analysis and Continuous Wavelet Transform.” Advances in Water Resources 97 (November 2016): 52–72. https://doi.org/10.1016/j.advwatres.2016.08.016.
Walters, Roy A., and Cynthia Heston. “Removing Tidal-Period Variations from Time-Series Data Using Low-Pass Digital Filters.” Journal of Physical Oceanography 12, no. 1 (January 1982): 112–15. https://doi.org/10.1175/1520-0485(1982)012<0112:RTPVFT>2.0.CO;2.
Dear DR Dan and Dr Richard,
Thank you very much for taking the time and explaining the data to me. These exchanges have been immensely helpful. I apologise for my delayed response as I was still on field. I'm now at a place with stable internet conditions. I will write to you both separately over email and share the year-long dataset that I have along with all relevant information.
I may not be able to do this now but I can potentially get at the sediment size distribution around the well, in case this is a variable that needs to measured. Anyway, I will share the data with you.
Thank you once again for not just answering the question I had posed but engaging with this topic so enthusiastically.
Note: we are planning a CRAN release, but I don't see that this issue will block such a release, do you, @richardsc and @clayton33?
I just watched the following video, and it's really interesting. It's not needed for the present issue, but I do think that anyone reading through this issue might really enjoy watching it. This person makes lots of interesting content relating to engineering, actually.
Hillhouse, Grady. “How French Drains Work.” Practical Engineering, August 6, 2024. https://practical.engineering/blog/2024/8/6/how-french-drains-work.
Hello,
I'm working on examining how groundwater levels fluctuate with human abstraction and plant transpiration in coral atolls. I have installed multiple acoustic water-level recorders with a recording interval of 5 mins. Since these atolls are small and situated in the middle of the ocean, there are strong tidal forces that shape the fluctuations in groundwater level.
I have tried de-tiding the data using harmonic constituents and have tried using the residuals to observe any changes in groundwater level. However, I was wondering if a filtering approach would be better suited for this task.
My assumption is that any change in water level, after accounting for tidal constituents, can be attributed to either input of water into the system (rainfall), or removal of water (groundwater abstraction, plant transpiration, and submarine groundwater discharge). Do you have any recommendation for what is an ideal method?
Some of the initial plots from de-tiding a small time series is attached below.
Please let me know if I need to provide any further details/code/data to help answer this question.
Many thanks!