Skip to content

Add extended 67-constituent tidal set#1

Open
WPringle wants to merge 5 commits into
oceanum:masterfrom
WPringle:add-tidal-constituents
Open

Add extended 67-constituent tidal set#1
WPringle wants to merge 5 commits into
oceanum:masterfrom
WPringle:add-tidal-constituents

Conversation

@WPringle

@WPringle WPringle commented Jun 22, 2026

Copy link
Copy Markdown

Add the 34 constituents from Tidal_constituents_67.csv that were not yet defined in pytides, and expose the full table as constituent.extended (NOAA set left unchanged as the default).

  • 15 base constituents (MSm; alpha1, sigma1, tau1, beta1, NO1, chi1, phi1, theta1, upsilon1, pi1, psi1; OQ2, H1, H2) with Doodson numbers derived from the table frequencies and group-assigned nodal corrections.
  • 19 compound constituents (SO1, epsilon2, MKS2, MSN2, eta2, MO3, SO3, SK3, SN4, MK4, SK4, 2MK5, 2SK5, 2MN6, 2MS6, 2MK6, 2SM6, MSK6, 3MK7) defined via member combinations so nodal corrections derive automatically.

Greek letters are spelled out in lower case, Latin abbreviations upper case, matching the existing pytides convention.

Also:

  • Add tests validating the extended set against the bundled CSV provided by Pengcheng Wang and a synthetic decompose round-trip (also added on for NOAA set).
  • Fix a pre-existing np.float deprecation crash in tide.py that broke decompose() on current NumPy.
  • Made correction to factor in lunisolar K2 tides as in Correct a factor of the lunisolar K2 tides sam-cox/pytides#20

WPringle and others added 4 commits June 22, 2026 12:30
Add the 34 constituents from Tidal_constituents_67.csv that were not yet
defined in pytides, and expose the full table as `constituent.extended`
(NOAA set left unchanged as the default).

- 15 base constituents (MSm; alpha1, sigma1, tau1, beta1, NO1, chi1,
  phi1, theta1, upsilon1, pi1, psi1; OQ2, H1, H2) with Doodson numbers
  derived from the table frequencies and group-assigned nodal corrections.
- 19 compound constituents (SO1, epsilon2, MKS2, MSN2, eta2, MO3, SO3,
  SK3, SN4, MK4, SK4, 2MK5, 2SK5, 2MN6, 2MS6, 2MK6, 2SM6, MSK6, 3MK7)
  defined via member combinations so nodal corrections derive automatically.

Greek letters are spelled out in lower case, Latin abbreviations upper
case, matching the existing pytides convention.

Also:
- Add tests validating the extended set against the bundled CSV and a
  synthetic decompose round-trip; move the CSV into test/data/.
- Fix a pre-existing np.float deprecation crash in tide.py that broke
  decompose() on current NumPy.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The numpy pin (>=1.18,<1.19.4) forced pip to build numpy 1.18 from
source on Python 3.14 (no wheels available), which failed with
"Cannot import 'setuptools.build_meta'". The code runs fine on current
numpy (2.4) after the np.float fix, so loosen the numpy constraint and
relax the python constraint to a simple lower bound.

Also make the test_Tide formzahl assertion tolerant: the exact value
drifts with the numpy/scipy/BLAS version because the solver does not
fully converge on the short sample record.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Mirror test_Tide_extended for the NOAA constituent set: predict from
known constants and confirm decompose() recovers them.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@WPringle WPringle changed the title Add tidal constituents Add extended 67-constituent tidal set Jun 22, 2026
@WPringle WPringle marked this pull request as ready for review June 22, 2026 18:54
@WPringle

Copy link
Copy Markdown
Author

See oceanmodeling/detide#5 for related PR which uses pytides2 and this new extended tidal constituent list capability .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant