How Tideline works
A field note on a small analysis tool, built by Andrew Ly as part of a series on hazard data. Every source it uses works with no key.
The question
How much sea level rise turns today's highest tide of the year into an ordinary high tide, and where does that water go? A king tide is a preview of a future everyday high. Tideline puts a number on that gap at each gauge and draws the matching water on the shoreline.
At Alameda the next king tide is 7.7 ft on Nov 24, or 1.1 ft above mean higher high water (MHHW). Predicted days over the gauge's minor flood threshold in the next 12 months go from 0 today to 22 with 1 ft of rise, 200 with 2 ft, and 342 with 3 ft. Predictions as of Thu, Nov 19, 12:51 PM PST.
Data sources
NOAA CO-OPS tide predictions and water levels
The CO-OPS data API supplies high and low predictions, 6-minute predicted curves, and observed water levels, all in feet above mean lower low water (MLLW) on local time. Predictions refresh once a day through a cron job, and observed levels refresh every 6 minutes. NOAA limits high and low requests to 1 year and 6-minute requests to 1 month, so longer ranges are split. Observed values are preliminary and can change after NOAA reviews them. Predictions cover astronomy alone, so they leave out weather and river flow.
NOAA CO-OPS datums and flood levels
Datums come from the metadata API, on the 1983 to 2001 tidal epoch. Flood levels come from the same API, which publishes them above the station datum. Tideline restates them above MHHW. The derived product API supplies counts of observed flood days and holds no thresholds. Four of the seven gauges have minor, moderate, and major levels. Datums and flood levels are built by script and committed, since they change rarely.
NOAA Sea Level Rise Viewer layers
Water extents come from the tiled dc_slr map services behind the Sea Level Rise Viewer, one layer per foot from 0 to 10 above MHHW, where 0 is current MHHW. These are screening-level layers built with a modified bathtub method that accounts for tidal variation and hydrologic connectivity. NOAA describes them as showing the scale of potential flooding, and says to verify any feature with a site visit. They leave out erosion and future construction. Each layer has a matching confidence layer, drawn here as a hatch where the cell could be wet or dry. Tiles are cached to level 16, or about 2.4 m per pixel.
Tideline repaints NOAA's tiles in the browser. Flooded land takes a blue that darkens with each foot, and NOAA's depth ramp darkens it further. Open water goes clear so the base water tint shows. Land below the water level with no connection to the Bay, which NOAA calls low-lying, becomes a dot grid.
California King Tides Project
The California Coastal Commission confirms official statewide dates each fall. Those dates are stored by hand and shown as a separate label. Tideline computes its own highest tides from predictions and never treats the two as the same thing. Photos go to the Project through its upload form.
Map layers
Aerial imagery comes from the USGS National Map, which is public domain. It shows banding over open water, so a flat water tint from OpenFreeMap covers the Bay. Terrain comes from AWS Terrain Tiles (Mapzen) in Terrarium encoding. That dataset includes Bay bathymetry, and Tideline sets everything below sea level to zero so the Bay stays one flat surface at 3x exaggeration. Roads, labels, and building footprints come from OpenFreeMap with OpenStreetMap data.
How each number is calculated
Height above MHHW
above = predicted height (ft above MLLW) - MHHW (ft above MLLW)
King tide list
The 20 predicted high tides in the next 12 months with the largest height above MHHW, per station. The Bay calendar takes the 20 largest across Bay gauges and leaves out Point Reyes, which sits on the open coast. Next king tide means the earliest upcoming tide on a station's list.
Future-tide equivalent
equivalent = max(0, above)
This is the sea level rise, in feet, at which a water level becomes an ordinary daily high. It assumes the tide range stays the same as sea level rises.
Days over threshold
days(add) = count of Pacific calendar days with a high where height + add - MHHW > threshold
Counted for add values of 0, 1, 2, and 3 ft across the next 12 months of predicted highs. The threshold is NOAA's minor level above MHHW. At gauges with no minor level, the count uses the action level and says so.
Surge
residual = observed - predicted
Matched on 6-minute time stamps over the last 72 hours. Surge is the largest residual in that window, with its time. Predictions use a 1983 to 2001 reference, so part of every residual is sea level rise that has already happened. When residuals near 1 ft last for days across every gauge, the cause is larger than wind at one site.
First flood step at a shoreline spot
NOAA's identify service answered with the same polygon at every point during testing, so Tideline reads the map tiles directly. Each spot's point sits on the feature people go to see. Where a place spans a range of heights, such as a park on old fill, the point goes on its lowest public road or path, chosen by sampling OpenStreetMap paths.
- Take a 5 by 5 grid of points within about 15 m of the spot.
- Read each point's pixel in the level 16 tile for the 0 ft layer, and drop points that are open water.
- Read the remaining points in the tile for each foot from 0 to 10.
- Record the lowest foot where at least a quarter of them are wet and connected.
Wide places on the slider, such as airports, use a larger grid and need half of their land wet. Several spots have reports of water at king tides well below their step on NOAA's layer, and their pages say so. The Embarcadero is one example. That gap is a limit of the layer.
Water on the map
layer = round(slider + max(0, tide above MHHW at the selected gauge))
The scrubber can add its tide to the slider, which is on by default. Water above MHHW raises the layer to the nearest foot. A checkbox in the Layers tab turns this off. Gauge columns show water level above MHHW at the scrubber time plus the slider. Observed readings replace predictions wherever both exist. Column heights are drawn for legibility and exaggerated with the terrain setting, and each label prints the true value.
What this tool cannot tell you
It cannot tell you whether a given street will flood on a given day. Predictions leave out weather. The sea level rise layers leave out storms and waves. They also miss storm drains and recent levees. A point query reports what a screening map shows at a pixel, so a flooded step on a spot page is a reason to go look. A site survey is the real test.
Spot tide times come from the nearest active gauge, which can be miles away, and the local peak can differ. The future-tide equivalent assumes tides keep today's shape, and real tidal range can shift as the Bay deepens. Sea level rise on this site is a set of what-if steps with no dates attached. Tideline makes no forecast of when any step arrives.
Questions
What is a king tide?
A king tide is an informal name for the highest predicted tides of the year. They happen when the Moon sits closest to Earth and lines up with the Sun. In San Francisco Bay they arrive around the winter and summer solstices.
Does a king tide mean flooding?
Sometimes. A king tide on a calm day may only wet low paths and parking lots. The same tide with a storm on top can flood roads. Tide predictions leave out weather, so the residual chart shows how far real water is running from the prediction.
Why do thresholds differ from the slider?
The slider moves NOAA's mapped water extent. Flood thresholds are water levels at one gauge. They answer different questions, and the map shows both so they can be compared.
Why do some gauges have no flood threshold?
NOAA publishes minor, moderate, and major levels for San Francisco, Alameda, Point Reyes, and Port Chicago. Redwood City, Richmond, and Martinez have an action level only. Tideline says so on those pages and counts days over the action level, labeled as such.
Safety
For situational awareness only. Follow official alerts and evacuation orders. For the Bay Area, that means NWS Bay Area coastal flood advisories and NOAA Tides and Currents.
Changelog
- November 6, 2026. First release, with 7 stations and 15 shoreline spots.
Back to the 3D map or the king tide calendar. The code is in the GitHub repo.