For my observational instrument, I want to create some sort of tide clock. I am interested in making something that can inform users about how the moon, time of year, and location can influence the way the tides work. it is something that has so many variables that it is almost impossible to really know what the tides will be in an area without taking tons of measurements. So, the first question I had to ask is "how do tides get calculated". I will keep this brief, as I will very likely need to elaborate on this further during the observational instrument.
The first thing to understand is that tides come in about 3 different patterns: Diurnal, SemiDiurnal, and Mixed. Diurnal tides are in locations where there is 1 high and 1 low tide per day, semi-diurnal which is 2 equal high and low tides, and mixed diurnal is diurnal but the tides are unequal.
While the moon accounts for ~67% of the tides ebb and flow, the last third is determined by all sorts of factors. In the long island sound (which is what this is clock is based on), our tides are determined largely by the currents flowing in and out of the sound. For this reason, the long island sound has a mixed diurnal tide. In fact, the tides can vary across the coast of CT by up to an hour.
So, knowing this, how do they know the tides? Well, frankly nobody ever knows exactly, we can only predict the tides. Even the original tide clocks were not perfect. The complex mechanisms were based on the lunar cycle and were plenty accurate for navigation, but also only work for the place they are set in (which is still the case).
The best way to do it is to record the sea surface elevation regularly at your locations. Eventually that data can be turned into a "Fournier Transform" which gives something called a Tidal Constituent. Which is defined as: "the amplitudes of oscillations at each of various wave-lengths. These include oscillations on time-scales that are roughly monthly, daily, and twice daily, amongst others." (link). You can find a list of tidal constituents here. This process is known as harmonic analysis.
After this is done, you can use the data to represent complex sine curves that will now predict the data.
Since there isn't an easy way for me to go and take these measurements, nor do I have the know how to complete a harmonic analysis, I have been using the NOAA Tides and Currents CO-OP API to pull data from the station out of Bridgeport, CT.
This was my first time using this API and I spent a long time trying to figure out how to get the data that I wanted from the location. My code is commented with the documentation and outline for what I am filtering out of the API's database.
https://preview.p5js.org/FlupC/embed/j0ddY5LQs
This piece isn't as polished as I'd like it to be, but it was my first time back in javascript since last semester. Understanding how to use and calculate with date and time as two separate numbers is tough, but I started to get the hang of it.
The sketch uses the NOAA tide data and maps them to the width of the sketch. Then, the boat slowly goes across the screen relative to the time of day, which helps to indicate where in the tides we are.
I don't think that this will be the design for the observational instrument, but its nice to be able to map these data points. I also have the data for the water level, but will need to speak with Jeff in order to properly map these values to time.
More details about the observational instrument in other post.