Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions packages/tide-predictor/src/constituents/2MK3.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { defineCompoundConstituent } from "./definition.js";
import M2 from "./M2.js";
import O1 from "./O1.js";

/**
* Shallow-water terdiurnal (2MK3 = M2 + O1).
* Lunar-lunar interaction from M2 semi-diurnal and O1 diurnal components.
* Generated in shallow-water environments; typical amplitude <1 cm.
*/
export default defineCompoundConstituent("2MK3", [
{ constituent: M2, factor: 1 },
{ constituent: O1, factor: 1 },
]);
17 changes: 17 additions & 0 deletions packages/tide-predictor/src/constituents/2MK5.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { defineCompoundConstituent } from "./definition.js";
import M2 from "./M2.js";
import K1 from "./K1.js";

/**
* Shallow-water fifth-diurnal from M2-K1 interaction.
*
* Note: Found in coastal tide predictions, especially in enclosed bays and harbors.
* Amplitude typically 0.1-0.5 cm depending on location and water depth.
* Shallow-water constituent only; not present in deep ocean.
*
* @see NOAA CO-OPS
*/
export default defineCompoundConstituent("2MK5", [
{ constituent: M2, factor: 2 },
{ constituent: K1, factor: 1 },
]);
17 changes: 17 additions & 0 deletions packages/tide-predictor/src/constituents/2MO5.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { defineCompoundConstituent } from "./definition.js";
import M2 from "./M2.js";
import O1 from "./O1.js";

/**
* Shallow-water fifth-diurnal from M2-O1 interaction.
*
* Note: Primarily shallow-water coastal phenomenon, not present in deep ocean.
* Amplitude typically <0.5 cm except in extreme shallow-water or enclosed basins.
* Found in coastal tide predictions alongside other shallow-water constituents.
*
* @see NOAA CO-OPS
*/
export default defineCompoundConstituent("2MO5", [
{ constituent: M2, factor: 2 },
{ constituent: O1, factor: 1 },
]);
14 changes: 14 additions & 0 deletions packages/tide-predictor/src/constituents/2MS6.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { defineCompoundConstituent } from "./definition.js";
import M2 from "./M2.js";
import S2 from "./S2.js";

/**
* Sixth-diurnal shallow-water interaction: 2×M2 + S2.
*
* Generated only in shallow water; typical amplitude 0.01-0.2 meters depending on depth.
* Included in IHO shallow-water constituent tables and NOAA analysis (order #37).
*/
export default defineCompoundConstituent("2MS6", [
{ constituent: M2, factor: 2 },
{ constituent: S2, factor: 1 },
]);
9 changes: 9 additions & 0 deletions packages/tide-predictor/src/constituents/2N2.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineConstituent } from "./definition.js";
import nc from "../node-corrections/index.js";

/**
* Lunar semi-diurnal (2N2).
* Second-order lunar semi-diurnal from Moon's orbital ellipticity.
* Amplitude typically 5-10% of M2; significant in semi-diurnal analysis.
*/
export default defineConstituent("2N2", [2, -2, 0, 2, 0, 0, 0], nc.uM2, nc.fM2);
14 changes: 14 additions & 0 deletions packages/tide-predictor/src/constituents/2Q1.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { defineCompoundConstituent } from "./definition.js";
import N2 from "./N2.js";
import J1 from "./J1.js";

/**
* Shallow-water diurnal (2Q1 = N2-J1).
* Derived from interaction of semi-diurnal N2 and diurnal J1 constituents.
* Amplitude typically very small; rarely significant.
* Found only in shallow-water regions with strong tidal distortion.
*/
export default defineCompoundConstituent("2Q1", [
{ constituent: N2, factor: 1 },
{ constituent: J1, factor: -1 },
]);
14 changes: 14 additions & 0 deletions packages/tide-predictor/src/constituents/2SM2.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { defineCompoundConstituent } from "./definition.js";
import S2 from "./S2.js";
import M2 from "./M2.js";

/**
* Shallow-water semi-diurnal (2SM2).
* Compound constituent: 2×S2 - M2
* Solar-lunar interaction constituent generated in shallow-water environments.
* Amplitude typically <2% of M2; complementary to MU2.
*/
export default defineCompoundConstituent("2SM2", [
{ constituent: S2, factor: 2 },
{ constituent: M2, factor: -1 },
]);
13 changes: 13 additions & 0 deletions packages/tide-predictor/src/constituents/3L2.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { defineCompoundConstituent } from "./definition.js";
import L2 from "./L2.js";

/**
* Triple lunar elliptic; 3 times L2 interaction.
*
* Warning: Not in standard IHO constituent bank. Mainly historical/theoretical interest.
* Very small amplitude (<0.1 cm); found only in extreme shallow water or enclosed basins.
* Often ignored in routine tide predictions.
*
* @see Schureman, P. (1958). Manual of Harmonic Analysis and Prediction of Tides
*/
export default defineCompoundConstituent("3L2", [{ constituent: L2, factor: 3 }]);
13 changes: 13 additions & 0 deletions packages/tide-predictor/src/constituents/3N2.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { defineCompoundConstituent } from "./definition.js";
import N2 from "./N2.js";

/**
* Triple N2 shallow-water harmonic (3 × N2).
*
* Note: Shallow-water constituent with definition based on compound frequency estimates.
* Typical amplitude <0.5 cm; often <0.1 cm except in extreme shallow-water or enclosed basins.
* Rarely significant in routine tide predictions.
*
* @see NOAA CO-OPS shallow-water constituents
*/
export default defineCompoundConstituent("3N2", [{ constituent: N2, factor: 3 }]);
7 changes: 7 additions & 0 deletions packages/tide-predictor/src/constituents/EP2.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { defineConstituent } from "./definition.js";
import nc from "../node-corrections/index.js";

/**
* Lunar elliptic semi-diurnal constituent (ε2).
*/
export default defineConstituent("EP2", [2, -3, 2, 1, 0, 0, 0], nc.uM2, nc.fM2);
10 changes: 10 additions & 0 deletions packages/tide-predictor/src/constituents/J1.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { defineConstituent } from "./definition.js";
import nc from "../node-corrections/index.js";

/**
* Lunar diurnal (J1).
* Shallow-water lunar diurnal constituent; generally much smaller than O1 and K1.
* Typically important only in shallow-water systems and enclosed basins.
* Amplitude usually <5% of O1; rarely significant in routine predictions.
*/
export default defineConstituent("J1", [1, 2, 0, -1, 0, 0, -1], nc.uJ1, nc.fJ1);
9 changes: 9 additions & 0 deletions packages/tide-predictor/src/constituents/K1.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineConstituent } from "./definition.js";
import nc from "../node-corrections/index.js";

/**
* Lunisolar diurnal (K1).
* Combined lunar and solar diurnal constituent; strongest diurnal tide in many regions.
* Often comparable in amplitude to O1; amplitude ratio K1/O1 varies with latitude.
*/
export default defineConstituent("K1", [1, 1, 0, 0, 0, 0, -1], nc.uK1, nc.fK1);
10 changes: 10 additions & 0 deletions packages/tide-predictor/src/constituents/K2.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { defineConstituent } from "./definition.js";
import nc from "../node-corrections/index.js";

/**
* Lunisolar semi-diurnal (K2).
* Combined lunar and solar semi-diurnal constituent from declination effects.
* Amplitude typically 10-30% of S2; second-largest solar-related semi-diurnal component.
* Important in semi-diurnal tidal analysis, especially at mid-latitudes.
*/
export default defineConstituent("K2", [2, 2, 0, 0, 0, 0, 0], nc.uK2, nc.fK2);
10 changes: 10 additions & 0 deletions packages/tide-predictor/src/constituents/L2.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { defineConstituent } from "./definition.js";
import nc from "../node-corrections/index.js";

/**
* Lunar elliptic semi-diurnal (L2).
* Secondary lunar elliptic semi-diurnal from Moon's orbital variations and perigee effects.
* Amplitude typically 1-3% of M2; often grouped with other lunar elliptic constituents.
* Important in detailed harmonic analyses of semi-diurnal tides.
*/
export default defineConstituent("L2", [2, 1, 0, -1, 0, 0, 2], nc.uL2, nc.fL2);
8 changes: 8 additions & 0 deletions packages/tide-predictor/src/constituents/LAM2.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import LAMBDA2 from "./LAMBDA2.js";

/**
* Alias for compatibility between NOAA and IHO
*
* @see LAMBDA2
*/
export default LAMBDA2;
10 changes: 10 additions & 0 deletions packages/tide-predictor/src/constituents/LAMBDA2.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { defineConstituent } from "./definition.js";
import nc from "../node-corrections/index.js";

/**
* Lunar semi-diurnal (λ2, lambda2).
* Lunar semi-diurnal constituent from Moon's perigee effects.
* Amplitude typically <5% of M2; important in detailed constituent analysis.
* IHO standard designation (previously abbreviated as LAM2).
*/
export default defineConstituent("LAMBDA2", [2, 1, -2, 1, 0, 0, 2], nc.uM2, nc.fM2);
10 changes: 10 additions & 0 deletions packages/tide-predictor/src/constituents/M1.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { defineConstituent } from "./definition.js";
import nc from "../node-corrections/index.js";

/**
* Lunar diurnal elliptic (M1).
* Secondary lunar diurnal constituent from Moon's elliptical orbit.
* Typically very small amplitude; usually <1% of O1.
* Rarely significant except in detailed harmonic analyses.
*/
export default defineConstituent("M1", [1, 0, 0, 0, 0, 0, 1], nc.uM1, nc.fM1);
10 changes: 10 additions & 0 deletions packages/tide-predictor/src/constituents/M2.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { defineConstituent } from "./definition.js";
import nc from "../node-corrections/index.js";

/**
* Lunar semi-diurnal (M2).
* Primary principal lunar constituent; largest semi-diurnal tidal component globally.
* Amplitude varies 10-20% over lunar node cycle; typically 0.2-0.5m in coastal areas.
* Base constituent for many compound shallow-water constituents.
*/
export default defineConstituent("M2", [2, 0, 0, 0, 0, 0, 0], nc.uM2, nc.fM2);
20 changes: 20 additions & 0 deletions packages/tide-predictor/src/constituents/M3.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { defineConstituent } from "./definition.js";
import nc from "../node-corrections/index.js";

/**
* Lunar terdiurnal (M3).
* Third-diurnal lunar constituent from Moon's orbital motion.
* Typically found in shallow water and resonant systems.
* Amplitude usually <2% of M2; important in some shallow-water analyses.
*/
// Third diurnal
export default defineConstituent(
"M3",
[3, 0, 0, 0, 0, 0, 0],
(a) => {
return nc.uModd(a, 3);
},
(a) => {
return nc.fModd(a, 3);
},
);
10 changes: 10 additions & 0 deletions packages/tide-predictor/src/constituents/M4.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { defineCompoundConstituent } from "./definition.js";
import M2 from "./M2.js";

/**
* Shallow-water quarter-diurnal (M4 = 2×M2).
* First overtide of M2; generated in shallow-water environments.
* Amplitude typically 2-10% of M2; largest of the quarter-diurnal constituents.
* Important indicator of shallow-water tidal distortion.
*/
export default defineCompoundConstituent("M4", [{ constituent: M2, factor: 2 }]);
10 changes: 10 additions & 0 deletions packages/tide-predictor/src/constituents/M6.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { defineCompoundConstituent } from "./definition.js";
import M2 from "./M2.js";

/**
* Shallow-water sixth-diurnal (M6 = 3×M2).
* Second overtide of M2; generated in shallow-water environments.
* Amplitude typically 0.5-3% of M2; important in extreme shallow water.
* Indicator of significant tidal distortion and non-linear effects.
*/
export default defineCompoundConstituent("M6", [{ constituent: M2, factor: 3 }]);
10 changes: 10 additions & 0 deletions packages/tide-predictor/src/constituents/M8.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { defineCompoundConstituent } from "./definition.js";
import M2 from "./M2.js";

/**
* Shallow-water eighth-diurnal (M8 = 4×M2).
* Third overtide of M2; generated in extreme shallow-water environments.
* Amplitude typically <0.5% of M2; very rarely significant.
* Found only in highly distorted tidal regimes (extreme shallow water, enclosed basins).
*/
export default defineCompoundConstituent("M8", [{ constituent: M2, factor: 4 }]);
11 changes: 11 additions & 0 deletions packages/tide-predictor/src/constituents/MA2.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { defineConstituent } from "./definition.js";
import nc from "../node-corrections/index.js";

/**
* Lunar variational semi-diurnal constituent (μ2, mu2).
* Derived from Moon's orbital parameter variations.
*
* Note: Often included with M2 family in modern analysis. Minor constituent with
* location-dependent amplitude.
*/
export default defineConstituent("MA2", [2, 0, -1, 0, 0, 0, 0], nc.uM2, nc.fM2);
17 changes: 17 additions & 0 deletions packages/tide-predictor/src/constituents/MB2.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { defineConstituent } from "./definition.js";
import nc from "../node-corrections/index.js";

/**
* Lunar elliptic constituent from parameter variations.
*
* From https://iho.int/mtg_docs/com_wg/IHOTC/IHOTC_Misc/TWCWG_Constituent_list.pdf:
*
* > MB2 was originally called Ma2 but this became ambiguous when spoken, or typed on
* > computers without lower case, and so it was initially changed to MA2*. However, this
* > in turn was thought to be clumsy and hence MB2 was finally adopted. Although
* > theoretically they should have the same values of u and f as M2, they are so small
* > that they are commonly treated as having values of u = 0 and f = 1.
*
* @see Schureman, P. (1958). Manual of Harmonic Analysis and Prediction of Tides
*/
export default defineConstituent("MB2", [2, 0, 1, 0, 0, 0, 0], nc.uM2, nc.fM2);
9 changes: 9 additions & 0 deletions packages/tide-predictor/src/constituents/MF.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineConstituent } from "./definition.js";
import nc from "../node-corrections/index.js";

/**
* Lunar fortnightly (MF).
* Long-period constituent from lunar inequality interactions.
* Significant in long-term water level records and coastal resonances.
*/
export default defineConstituent("MF", [0, 2, 0, 0, 0, 0, 0], nc.uMf, nc.fMf);
15 changes: 15 additions & 0 deletions packages/tide-predictor/src/constituents/MK3.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { defineCompoundConstituent } from "./definition.js";
import M2 from "./M2.js";
import K1 from "./K1.js";

/**
* Shallow-water terdiurnal (MK3).
* Compound constituent: M2 + K1
* Lunisolar interaction from M2 semi-diurnal and K1 diurnal components.
* Generated in shallow-water environments; typical amplitude 0.5-2 cm.
* Often paired with 2MK3 in terdiurnal tide analysis.
*/
export default defineCompoundConstituent("MK3", [
{ constituent: M2, factor: 1 },
{ constituent: K1, factor: 1 },
]);
19 changes: 19 additions & 0 deletions packages/tide-predictor/src/constituents/MKS2.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { defineCompoundConstituent } from "./definition.js";
import M2 from "./M2.js";
import K1 from "./K1.js";
import S2 from "./S2.js";

/**
* Three-way shallow-water interaction of M2, K1, and S2.
*
* Warning: Not in standard IHO constituent bank. Shallow-water specific constituent
* with definition varying by application and water depth. Use with caution and document
* the specific convention used in your analysis.
*
* @see NOAA CO-OPS shallow-water constituents
*/
export default defineCompoundConstituent("MKS2", [
{ constituent: M2, factor: 1 },
{ constituent: K1, factor: 1 },
{ constituent: S2, factor: -1 },
]);
9 changes: 9 additions & 0 deletions packages/tide-predictor/src/constituents/MM.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineConstituent } from "./definition.js";
import nc from "../node-corrections/index.js";

/**
* Lunar monthly (MM).
* Long-period constituent from lunar declination variations.
* Important for long-term water level studies.
*/
export default defineConstituent("MM", [0, 1, 0, -1, 0, 0, 0], nc.uZero, nc.fMm);
15 changes: 15 additions & 0 deletions packages/tide-predictor/src/constituents/MN4.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { defineCompoundConstituent } from "./definition.js";
import M2 from "./M2.js";
import N2 from "./N2.js";

/**
* Shallow-water quarter-diurnal (MN4).
* Compound constituent: M2 + N2
* Lunar-lunar elliptic interaction from M2 and N2 semi-diurnal components.
* Generated in shallow-water environments; typical amplitude 1-5 cm.
* Often significant in shallow seas and estuaries.
*/
export default defineCompoundConstituent("MN4", [
{ constituent: M2, factor: 1 },
{ constituent: N2, factor: 1 },
]);
15 changes: 15 additions & 0 deletions packages/tide-predictor/src/constituents/MS4.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { defineCompoundConstituent } from "./definition.js";
import M2 from "./M2.js";
import S2 from "./S2.js";

/**
* Shallow-water quarter-diurnal (MS4).
* Compound constituent: M2 + S2
* Lunar-solar interaction from M2 and S2 semi-diurnal components.
* Generated in shallow-water environments; typical amplitude 1-5 cm.
* Often second-largest quarter-diurnal component after M4.
*/
export default defineCompoundConstituent("MS4", [
{ constituent: M2, factor: 1 },
{ constituent: S2, factor: 1 },
]);
Loading