A line made fast to the quay must be long enough for the lowest tide: when the bow sinks away from the bollard the line goes taut (red).
Blue: level. Dashed: now. The shaded band is the stretch of rock that dries out at this tide.
Drag to orbit, wheel / pinch to zoom, right-drag to pan. Arrow keys orbit when the scene has focus.
The science
Two constituents. Real tides are sums of cosines at astronomical frequencies. Here eta(t) = Z0 + A_M2 cos(w_M2 t + phi) + A_S2 cos(w_S2 t) with the lunar M2 period 12.4206 h and the solar S2 period 12.000 h. The two drift in and out of step, giving springs (range 2(A_M2 + A_S2) = 3.6 m) and neaps (2(A_M2 - A_S2) = 1.8 m) every 1/(1/12 - 1/12.4206) = 14.77 days, half a synodic month.
Current from continuity. A harbour basin of area A fills through a mouth of width W and depth d = eta - sill. Mass conservation gives A d(eta)/dt = u W d, so u = A (d eta/dt) / (W d): the stream is strongest half-way through the rise or fall, where the level changes fastest, and zero at high and low water (slack). Flood runs into the harbour, ebb out.
Exposure. Rocks and weed are uncovered when the level drops below their height; the percentage shown is the share of foreshore bed above the water. The wet band on the wall and rocks follows the water level.
Honest simplifications. Only two constituents (no shallow-water or weather effects), a rectangular mouth and basin, no friction, no waves or wind set-up, and the moon phase tied to the beat by a model phase. Amplitudes, basin size and harbour shape are model values chosen so that the reference state (2.4 m, rising, 16:30) gives about 0.6 kn; they are not measurements of a real harbour, and a real port's tide table must be used for real boating.
Check. node scripts/check.mjs re-derives the level and current at 16:30 by finite differences, the 12.42 h interval and the 14.77-day beat by scanning, the spring and neap ranges, the flood volume A x range by quadrature, and the foreshore percentage by brute force. Virtual simulation only; not for navigation, mooring or safety decisions.