📈 Water Level Time Series
📊 Tidal Range vs Moon Distance Scatter
🌙 Tidal Range vs Moon Phase 0°=New · 90°=First Q · 180°=Full
📋 Daily Data Tidal Range & Lunar Parameters
| Date | Tidal Range (m) | High Tide (m) | Low Tide (m) | Moon Phase (°) | Moon Dist (km) | Tide |
|---|
🔮 Tidal Prediction EXPERIMENTAL
Linear regression model based on historical data + moon position (Skyfield JPL DE421).
📋 Daily Prediction 7-day forecast
| Date | Pred. Range (m) | Pred. High (m) | Pred. Low (m) | Moon Phase (°) | Moon Dist (km) |
|---|
📐 Model Parameters Multiple Linear Regression
📐 Regression Fit Actual vs Predicted Tidal Range
📋 Model History Evolution of regression coefficients
| No | Formula Coefficients | N | R² | RMSE | Last Update |
|---|---|---|---|---|---|
| Loading data... | |||||
📈 Walk-Forward Validation Actual vs Predicted — accuracy improves with more data
About This Application
Tidal History and Predictions analyzes the relationship between tidal range (the vertical difference between high and low tide) and lunar parameters (moon distance and phase) for Tanjung Perak, Surabaya.
A multiple linear regression model predicts the daily tidal range using two lunar predictors:
- Moon Phase (Elongation) — the angular separation between the Moon and Sun as seen from Earth. 0° = New Moon (conjunction), 180° = Full Moon (opposition). The model captures the spring-neap cycle using a sinusoidal factor:
1 − |sin(phase)|. Spring tides peak at 0° and 180°, neap tides at 90° and 270°. - Moon Distance — Earth-Moon distance in km. Perigee (closest approach) amplifies tidal range; apogee (farthest) reduces it.
Linear regression model:
Range = β₀ + β₁·(1−|sin(phase)|) + β₂·(dist − mean_dist)
Prediction pipeline:
Moon computation: Skyfield JPL DE421
Every 6 hours for N days ahead (position, distance, elongation)
Apply the regression model → get predicted tidal range
High/Low estimate: Assume water level symmetry around recent mean
Walk-Forward Validation simulates real-world use: for each day, the model is trained only on past data, then used to predict that day.
⚙️ Technology Stack
| Parameter | Water Level (m) — 10-minute interval |
| Location | BMKG01 — BMKG Maritim Tanjung Perak-7.1957° S, 112.7289° E |
| Data Source | PostgreSQL (migrated from MySQL) — auto-sync tiap 5 menit |
| Cache | 1-hour TTL |
| Backend | Python 3.11 + Flask Gunicorn NumPy Skyfield |
| Charts | Highcharts 13.0 |
| Deploy | Docker Gunicorn Nginx |
📚 Scientific References
- Pugh, D., & Woodworth, P. (2014). Sea-Level Science: Understanding Tides, Surges, Tsunamis and Mean Sea-Level Changes. Cambridge University Press.
- Godin, G. (1972). The Analysis of Tides. University of Toronto Press.
- Foreman, M. G. G., Cherniawsky, J. Y., & Ballantyne, V. A. (2009). A review of tidal analysis and prediction methods. Ocean Science, 5(2), 117–130.
- Cartwright, D. E. (1999). Tides: A Scientific History. Cambridge University Press.
- Melchior, P. (1978). The Tides of the Planet Earth. Pergamon Press.
- Vallis, G. K. (2017). Atmospheric and Oceanic Fluid Dynamics. Cambridge University Press.
- Pawlowicz, R. (2020). Classical tidal analysis: A review. Progress in Oceanography, 183, 102297.