openwatersio / openwatersio/tide-database
Use CHS published chart-datum offsets for Canadian stations instead of computed LLWLT
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 25
- Forks
- 6
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 10
Description
While validating #110, I benchmarked our datums against the CHS API for the 186 quality-accepted -can-meds stations. CHS metadata publishes each station's chart-datum offset, so we can compare their real chart datum against what we compute.
The result: computed LLWLT is a worse stand-in for CHS chart datum than LAT was.
| CHS CD above LAT | Our LLWLT above LAT | median error with CD=LAT | median error with CD=LLWLT | |
|---|---|---|---|---|
| All (n=186) | 0.09 m | 0.27 m | 0.13 m | 0.19 m |
| Pacific (n=102) | 0.11 m | 0.38 m | 0.13 m | 0.23 m |
| Atlantic/Arctic (n=84) | 0.04 m | 0.13 m | 0.12 m | 0.12 m |
The cause is not a bug in the LLWLT math. CHS chart datum is a frozen benchmark: it was established decades ago and is deliberately not recomputed, while our LLWLT is the textbook construct derived from today's constituents over the current epoch. Decades of relative sea-level change leave the operational datum much closer to modern LAT than a fresh LLWLT calculation, and occasionally below it. No constituent-derived datum can reproduce a fixed benchmark.
The saving grace of LLWLT is direction: our zero now sits about 0.17 m above CHS's, so predictions understate water depth, which is the safe error for navigation. The old LAT fallback overstated depth by about 0.09 m.
Proposal
For -can-meds stations, fetch the station's chart-datum offset from the CHS API (api-sine.dfo-mpo.gc.ca, the same metadata endpoint the neaps benchmark uses) during import and reference chart_datum to that published value instead of the computed LLWLT. That makes the error zero by construction, since we would be using the agency's own number.
Open questions:
- Where to store it. Probably overwrite the
LLWLTvalue with the official offset (keeping the name), or add a separate datum entry so the computed value stays available. - Terms of use for the CHS API data in a redistributed dataset need a check before we bake values into the repo.
- The same reasoning applies to any agency with a fixed benchmark. Japan (NLLW) and China (TLT) may have the same drift between the official surface and our computed one; worth checking if an equivalent API or table exists before trusting the computed values there.
Benchmark data and method are in the PR discussion for #110; the comparison used cached CHS metadata from neaps/benchmarks.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the PR discussion for #110 and the cached CHS metadata in neaps/benchmarks, then trace the -can-meds import path and the neaps benchmark's CHS metadata endpoint at api-sine.dfo-mpo.gc.ca. Determine how the published chart_datum should be stored, verify redistribution terms, and confirm that imported Canadian stations use the published offset rather than computed LLWLT.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- data, databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100