Using OTC data with a Slackwater station-JSON engine

Load an OTC station file through your existing Slackwater station-JSON loader. Use the same engine to predict a tide.

Get the files

Download OTC_20261130-stations.zip, the station-JSON report and the export checksums.

Predict with your engine

  1. Extract the ZIP. It contains one directory of station files. The report lists which stations the format can represent.
  2. In the extracted station directory, run npm install @slackwater/engine@1.0.0-beta.16 for this example. It loads OTC-000d594d.json for Plum Island.
  3. Save the example as check-tide.mjs in the same directory. Run it with node check-tide.mjs.
    import { readFileSync } from 'node:fs';
    import { useStation } from '@slackwater/engine';
    
    const station = JSON.parse(readFileSync('OTC-000d594d.json', 'utf8'));
    const time = new Date('2026-11-30T16:00:00-08:00');
    const prediction = useStation(station).getWaterLevelAtTime({
        time, datum: station.chart_datum, units: 'meters',
        nodeCorrections: station.source.otc.target_astronomy
    });
    console.log(station.id, station.chart_datum, prediction.level, 'm');
  4. Check the station ID, datum and units. Keep the data's attribution with the result.

For a subordinate station such as Warrington, load the reference named by offsets.reference. Use the reference's harmonics and keep the subordinate's own published datums and offsets.

import { readFileSync } from 'node:fs';
import { useStation } from '@slackwater/engine';

const load = (id) => JSON.parse(readFileSync(id + '.json', 'utf8'));
const station = load('OTC-014c6c11');
const reference = load(station.offsets.reference);
const predictor = useStation({
    ...station, harmonic_constituents: reference.harmonic_constituents
}, undefined, {reference});
const prediction = predictor.getWaterLevelAtTime({
    time: new Date('2026-07-01T00:00:00-07:00'),
    datum: station.chart_datum, units: 'meters',
    nodeCorrections: station.source.otc.target_astronomy
});
console.log(station.id, station.chart_datum, prediction.level, 'm');

Find a saved station

Download the ID map for the same release. In the map directory, look up your exact saved ID.

jq -er --arg saved 'noaa/8440452' '.stations[$saved]' OTC_20261130-slackwater-id-map.json

This example returns OTC-000d594d for Plum Island. Look for OTC-000d594d.json in the station directory. If the map has no entry or the file is absent, keep the saved ID and check the station report.

What these files carry

The station files cover 11,864 tide stations with source and licence details. The checked Slackwater catalog lists 9,796 tide station IDs. Across 184 paired mean-level tide heights at 23 stations, the largest difference from the OTC SDK was 64.953 mm.

The directory holds tide stations. The report explains which stations this tide-only format leaves out. When a saved station is absent, look for it in the report.

  • The export contains at most one file for a station. Each file carries the default or a reference needed by another station.
  • A station with no chart-datum or mean-sea-level tie has an empty chart datum. Its heights are relative to the harmonic mean.
  • The export leaves out sets that require daily corrections.

Keep the datum, the quality labels and the attribution text with each result. The release files keep each record. See Data format.

For current predictions, daily corrections or direct subordinate-station prediction, use an OTC library.