Skip to content

Commit 0a707d8

Browse files
committed
Refactor each constituent into separate files
1 parent 7b1608f commit 0a707d8

64 files changed

Lines changed: 1057 additions & 462 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { defineCompoundConstituent } from "./index.js";
2+
import M2 from "./M2.js";
3+
import O1 from "./O1.js";
4+
5+
/**
6+
* Shallow-water terdiurnal (2MK3).
7+
* Compound constituent: M2 + O1
8+
* Speed ~42.93°/h with period ~8.39 hours (terdiurnal).
9+
* Lunar-lunar interaction from M2 semi-diurnal and O1 diurnal components.
10+
* Nodal factors combine fM2 with fO1.
11+
* Generated in shallow-water environments; typical amplitude <1 cm.
12+
*
13+
* @see https://tidesandcurrents.noaa.gov/ NOAA CO-OPS
14+
*/
15+
export default defineCompoundConstituent("2MK3", [
16+
{ constituent: M2, factor: 1 },
17+
{ constituent: O1, factor: 1 },
18+
]);
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { defineCompoundConstituent } from "./index.js";
2+
import M2 from "./M2.js";
3+
import K1 from "./K1.js";
4+
5+
/**
6+
* Shallow-water quinte-diurnal from M2-K1 interaction.
7+
* Doodson Number: ~465.555 (estimated; compounded frequency)
8+
* Components: 2×M2 (lunar semi-diurnal × 2) + K1 (lunisolar diurnal).
9+
* Speed 44.025°/h with period ~8.18 hours.
10+
* Nodal factors combine (fM2)² with fK1.
11+
*
12+
* Note: Found in coastal tide predictions, especially in enclosed bays and harbors.
13+
* Amplitude typically 0.1-0.5 cm depending on location and water depth.
14+
* Shallow-water constituent only; not present in deep ocean.
15+
*
16+
* @see NOAA CO-OPS
17+
*/
18+
export default defineCompoundConstituent("2MK5", [
19+
{ constituent: M2, factor: 2 },
20+
{ constituent: K1, factor: 1 },
21+
]);
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { defineCompoundConstituent } from "./index.js";
2+
import M2 from "./M2.js";
3+
import O1 from "./O1.js";
4+
5+
/**
6+
* Shallow-water quinte-diurnal from M2-O1 interaction.
7+
* Doodson Number: ~445.555 (estimated; compounded frequency)
8+
* Components: 2×M2 (lunar semi-diurnal × 2) + O1 (lunar diurnal).
9+
* Speed 43.47°/h with period ~8.28 hours.
10+
* Nodal factors combine (fM2)² with fO1.
11+
*
12+
* Note: Primarily shallow-water coastal phenomenon, not present in deep ocean.
13+
* Amplitude typically <0.5 cm except in extreme shallow-water or enclosed basins.
14+
* Found in coastal tide predictions alongside other shallow-water constituents.
15+
*
16+
* @see NOAA CO-OPS
17+
*/
18+
export default defineCompoundConstituent("2MO5", [
19+
{ constituent: M2, factor: 2 },
20+
{ constituent: O1, factor: 1 },
21+
]);
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { defineCompoundConstituent } from "./index.js";
2+
import M2 from "./M2.js";
3+
import S2 from "./S2.js";
4+
5+
/**
6+
* Quarter-diurnal shallow-water interaction: 2×M2 + S2.
7+
* Doodson Number: 473.555
8+
* Speed 58.984°/h with period ~6.10 hours.
9+
* Nodal factor: f(M2)²(S2) / u(M2)²(S2) = combined M2² and S2 factors.
10+
*
11+
* Note: Sometimes denoted as MS4 in alternative notation systems.
12+
* Generated only in shallow water; typical amplitude 0.01-0.2 meters depending on depth.
13+
* Included in IHO shallow-water constituent tables and NOAA analysis (order #37).
14+
*
15+
* @see https://iho.int/en/standards-and-specifications/standards/s-14 IHO Tidal Constituent Bank
16+
* @see https://tidesandcurrents.noaa.gov/ NOAA CO-OPS
17+
* @see https://en.wikipedia.org/wiki/Theory_of_tides
18+
*/
19+
export default defineCompoundConstituent("2MS6", [
20+
{ constituent: M2, factor: 2 },
21+
{ constituent: S2, factor: 1 },
22+
]);
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { defineConstituent } from "./index.js";
2+
import nc from "../node-corrections/index.js";
3+
4+
/**
5+
* Lunar semi-diurnal (2N2).
6+
* Doodson Number: 2.-2.0.2.0.0.0
7+
* Speed 27.895°/h with period ~12.91 hours (lunar semi-diurnal).
8+
* Second-order lunar semi-diurnal from Moon's orbital ellipticity.
9+
* Uses M2 nodal factors (fM2/uM2) for amplitude and phase modulation.
10+
* Nodal factor ranges: f from ~0.4 to ~1.6; u from 0° to ±180°.
11+
* Amplitude typically 5-10% of M2; significant in semi-diurnal analysis.
12+
*
13+
* @see https://tidesandcurrents.noaa.gov/ NOAA CO-OPS
14+
*/
15+
export default defineConstituent("2N2", [2, -2, 0, 2, 0, 0, 0], nc.uM2, nc.fM2);
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { defineCompoundConstituent } from "./index.js";
2+
import N2 from "./N2.js";
3+
import J1 from "./J1.js";
4+
5+
/**
6+
* Shallow-water diurnal (2Q1).
7+
* Compound constituent: N2-J1
8+
* Speed ~12.854°/h with period ~27.93 hours (diurnal).
9+
* Derived from interaction of semi-diurnal N2 and diurnal J1 constituents.
10+
* Nodal factor combines effects from both parent constituents: fN2/fJ1 with phase uN2-uJ1.
11+
* Amplitude typically very small; rarely significant.
12+
* Found only in shallow-water regions with strong tidal distortion.
13+
*
14+
* @see https://tidesandcurrents.noaa.gov/ NOAA CO-OPS
15+
*/
16+
export default defineCompoundConstituent("2Q1", [
17+
{ constituent: N2, factor: 1 },
18+
{ constituent: J1, factor: -1 },
19+
]);
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { defineCompoundConstituent } from "./index.js";
2+
import S2 from "./S2.js";
3+
import M2 from "./M2.js";
4+
5+
/**
6+
* Shallow-water semi-diurnal (2SM2).
7+
* Compound constituent: 2×S2 - M2
8+
* Speed ~31.02°/h with period ~11.61 hours.
9+
* Solar-lunar interaction constituent generated in shallow-water environments.
10+
* Nodal factors combine (fS2)² with inverse M2 effects.
11+
* Amplitude typically <2% of M2; complementary to MU2.
12+
*
13+
* @see https://tidesandcurrents.noaa.gov/ NOAA CO-OPS
14+
*/
15+
export default defineCompoundConstituent("2SM2", [
16+
{ constituent: S2, factor: 2 },
17+
{ constituent: M2, factor: -1 },
18+
]);
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { defineCompoundConstituent } from "./index.js";
2+
import L2 from "./L2.js";
3+
4+
/**
5+
* Triple lunar elliptic; 3 times L2 interaction.
6+
* Doodson Number: ~265 (estimated; not standard Doodson notation)
7+
* Speed ~88.5°/h (≈ 3 × 29.5°/h) with period ~4.14 hours.
8+
* Nodal factor: (fL2)³ / (uL2)³ = cubic L2 nodal modulation (very small).
9+
*
10+
* Warning: Not in standard IHO constituent bank. Mainly historical/theoretical interest.
11+
* Very small amplitude (<0.1 cm); found only in extreme shallow water or enclosed basins.
12+
* Often ignored in routine tide predictions.
13+
*
14+
* @see Schureman, P. (1958). Manual of Harmonic Analysis and Prediction of Tides
15+
*/
16+
export default defineCompoundConstituent("3L2", [{ constituent: L2, factor: 3 }]);
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { defineCompoundConstituent } from "./index.js";
2+
import N2 from "./N2.js";
3+
4+
/**
5+
* Triple N2 shallow-water harmonic (3 × N2).
6+
* Doodson Number: ~336 (estimated; not standard Doodson notation)
7+
* Speed 85.32°/h (≈ 3 × 28.44°/h) with period ~4.23 hours.
8+
* Nodal factor: (fN2)³ / (uN2)³ = cubic N2 nodal modulation.
9+
*
10+
* Note: Shallow-water constituent with definition based on compound frequency estimates.
11+
* Typical amplitude <0.5 cm; often <0.1 cm except in extreme shallow-water or enclosed basins.
12+
* Rarely significant in routine tide predictions.
13+
*
14+
* @see NOAA CO-OPS shallow-water constituents
15+
*/
16+
export default defineCompoundConstituent("3N2", [{ constituent: N2, factor: 3 }]);
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { defineConstituent } from "./index.js";
2+
import nc from "../node-corrections/index.js";
3+
4+
/**
5+
* Lunar elliptic semi-diurnal constituent (ε2).
6+
* Doodson Number: 256.555
7+
* From Moon's elliptical orbit; speed 29.6°/h with period of ~12.0 hours.
8+
* Uses M2 nodal factors (fM2/uM2) for amplitude and phase modulation.
9+
*
10+
* Note: Sometimes called ν2 variant in some sources, but IHO designation is definitive.
11+
*
12+
* @see https://iho.int/en/standards-and-specifications/standards/s-14 IHO Tidal Constituent Bank
13+
* @see https://tidesandcurrents.noaa.gov/ NOAA CO-OPS constituent tables
14+
* @see https://en.wikipedia.org/wiki/Theory_of_tides Theory of Tides
15+
*/
16+
export default defineConstituent("EP2", [2, 0, 1, 0, 0, 0, 0], nc.uM2, nc.fM2);

0 commit comments

Comments
 (0)