FAILURE MAP
← Case archive

FA-68886 / Tide and marine navigation tables / Open access

Harmonic tide prediction: Prediction is referenced to mean sea level instead of chart datum · case 01

All heights are low by the datum offset and many are negative.

Verified by executionVariant 1 · 7 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The mean level z0 above chart datum is never added.

VERIFIED REPAIR

Start the sum from z0.

Unsuccessful approach: Starting from -z0 applies the datum shift in the wrong direction.

Case contract

Input [t_minutes, z0, constituents]; each constituent is [H metres, g phase lag deg, speed deg/hour, nodal factor f, nodal phase u deg, equilibrium argument V0 deg]. Height above chart datum is z0 + sum f*H*cos(V0+u+speed*t_hours-g). Return rounded to 4 decimals.

Why this case matters

Tide tables and passage plans turn published predictions into go/no-go decisions about depth, clearance and timing.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
    t,z0,cons=x
    hours=t/60
    h=0
    for H,g,spd,f,u,v0 in cons:
        arg=(v0+u+spd*hours-g)%360
        h+=f*H*math.cos(math.radians(arg))
    return round(h,4)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('harmonic tide prediction [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.8751), ('harmonic tide prediction [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 2.3585), ('harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.2364), ('harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9476), ('harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9225), ('harmonic tide prediction [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.6113), ('harmonic tide prediction [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.3542)], [('harmonic tide prediction [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 2.3585), ('harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9476), ('harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9225), ('harmonic tide prediction [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.6113), ('harmonic tide prediction [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.3542), ('harmonic tide prediction [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2733), ('harmonic tide prediction [200, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [200, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 4.1537)], [('harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.2364), ('harmonic tide prediction [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.3542), ('harmonic tide prediction [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2733), ('harmonic tide prediction [200, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [200, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 4.1537), ('harmonic tide prediction [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2709), ('harmonic tide prediction [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]]', [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]], 0.7071), ('harmonic tide prediction [0, 1.5, []]', [0, 1.5, []], 1.5)], [('harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9476), ('harmonic tide prediction [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2709), ('harmonic tide prediction [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]]', [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]], 0.7071), ('harmonic tide prediction [0, 1.5, []]', [0, 1.5, []], 1.5), ('harmonic tide prediction [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.2259), ('harmonic tide prediction [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 1.6646), ('harmonic tide prediction [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.6277)], [('harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9225), ('harmonic tide prediction [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.2259), ('harmonic tide prediction [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 1.6646), ('harmonic tide prediction [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.6277), ('harmonic tide prediction [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.8751), ('harmonic tide prediction [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 2.3585), ('harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.2364)]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
harmonic tide prediction [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]-0.22491.8751Failed
harmonic tide prediction [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]0.25852.3585Failed
harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]1.13643.2364Failed
harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]-0.15241.9476Failed
harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]-0.17751.9225Failed
harmonic tide prediction [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]1.51133.6113Failed
harmonic tide prediction [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]-0.74581.3542Failed

SHA-256 / 8509264af310367ef8e8cc2b7f840cb1df693ec00ad36334b7c423693faaf3db

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
    t,z0,cons=x
    hours=t/60
    h=-z0
    for H,g,spd,f,u,v0 in cons:
        arg=(v0+u+spd*hours-g)%360
        h+=f*H*math.cos(math.radians(arg))
    return round(h,4)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('harmonic tide prediction [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.8751), ('harmonic tide prediction [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 2.3585), ('harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.2364), ('harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9476), ('harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9225), ('harmonic tide prediction [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.6113), ('harmonic tide prediction [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.3542)], [('harmonic tide prediction [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 2.3585), ('harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9476), ('harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9225), ('harmonic tide prediction [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.6113), ('harmonic tide prediction [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.3542), ('harmonic tide prediction [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2733), ('harmonic tide prediction [200, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [200, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 4.1537)], [('harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.2364), ('harmonic tide prediction [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.3542), ('harmonic tide prediction [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2733), ('harmonic tide prediction [200, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [200, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 4.1537), ('harmonic tide prediction [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2709), ('harmonic tide prediction [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]]', [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]], 0.7071), ('harmonic tide prediction [0, 1.5, []]', [0, 1.5, []], 1.5)], [('harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9476), ('harmonic tide prediction [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2709), ('harmonic tide prediction [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]]', [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]], 0.7071), ('harmonic tide prediction [0, 1.5, []]', [0, 1.5, []], 1.5), ('harmonic tide prediction [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.2259), ('harmonic tide prediction [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 1.6646), ('harmonic tide prediction [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.6277)], [('harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9225), ('harmonic tide prediction [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.2259), ('harmonic tide prediction [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 1.6646), ('harmonic tide prediction [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.6277), ('harmonic tide prediction [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.8751), ('harmonic tide prediction [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 2.3585), ('harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.2364)]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
harmonic tide prediction [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]-2.32491.8751Failed
harmonic tide prediction [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]-1.84152.3585Failed
harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]-0.96363.2364Failed
harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]-2.25241.9476Failed
harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]-2.27751.9225Failed
harmonic tide prediction [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]-0.58873.6113Failed
harmonic tide prediction [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]-2.84581.3542Failed

SHA-256 / a46de993d0c0099732dfa8926ed99e48088e976db12cb3c9a6f1514fa583914f

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
    t,z0,cons=x
    hours=t/60
    h=z0
    for H,g,spd,f,u,v0 in cons:
        arg=(v0+u+spd*hours-g)%360
        h+=f*H*math.cos(math.radians(arg))
    return round(h,4)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('harmonic tide prediction [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.8751), ('harmonic tide prediction [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 2.3585), ('harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.2364), ('harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9476), ('harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9225), ('harmonic tide prediction [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.6113), ('harmonic tide prediction [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.3542)], [('harmonic tide prediction [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 2.3585), ('harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9476), ('harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9225), ('harmonic tide prediction [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.6113), ('harmonic tide prediction [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.3542), ('harmonic tide prediction [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2733), ('harmonic tide prediction [200, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [200, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 4.1537)], [('harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.2364), ('harmonic tide prediction [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.3542), ('harmonic tide prediction [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2733), ('harmonic tide prediction [200, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [200, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 4.1537), ('harmonic tide prediction [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2709), ('harmonic tide prediction [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]]', [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]], 0.7071), ('harmonic tide prediction [0, 1.5, []]', [0, 1.5, []], 1.5)], [('harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9476), ('harmonic tide prediction [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2709), ('harmonic tide prediction [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]]', [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]], 0.7071), ('harmonic tide prediction [0, 1.5, []]', [0, 1.5, []], 1.5), ('harmonic tide prediction [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.2259), ('harmonic tide prediction [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 1.6646), ('harmonic tide prediction [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.6277)], [('harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9225), ('harmonic tide prediction [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.2259), ('harmonic tide prediction [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 1.6646), ('harmonic tide prediction [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.6277), ('harmonic tide prediction [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.8751), ('harmonic tide prediction [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 2.3585), ('harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.2364)]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
harmonic tide prediction [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]1.87511.8751Passed
harmonic tide prediction [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]2.35852.3585Passed
harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]3.23643.2364Passed
harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]1.94761.9476Passed
harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]1.92251.9225Passed
harmonic tide prediction [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]3.61133.6113Passed
harmonic tide prediction [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]1.35421.3542Passed

SHA-256 / 76428624c2c2da11d3646dced55f0417084f9e371384c52be46abd30140a3dbd

Verification & scope

A deterministic toy model with stipulated rules and constants; not certified hydrographic software or a substitute for official tide tables. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:48:06.386826+00:00.

Case digest / a86a3cee6b316d3ccbd8566f96b7fde767a6bb46136d188df25fdb31d5cb635e