This guide walks you through installing PyGTide, verifying the installation, and updating its internal data files.
| Requirement | Details |
|---|---|
| Python | ≥ 3.10 (pre-compiled wheels available for CPython 3.12–3.14) |
| Package manager | Anaconda or Miniconda recommended, but any pip works |
| Fortran compiler | Only needed for source builds (Python 3.10/3.11), e.g. gfortran |
pip install pygtidePre-compiled wheels are provided for Linux, macOS and Windows on Python 3.12 and newer — no compiler required. On Python 3.10 and 3.11, pip automatically builds from the source distribution instead, which requires a Fortran compiler (see Option 2). NumPy and pandas are installed automatically as dependencies.
To upgrade an existing installation:
pip install -U pygtideNote
Always use the latest release. Several numerical bug fixes in the Fortran core (geodetic coefficients, shear strain, leap-second handling) were shipped in v0.9 and v0.9.1 — see Troubleshooting — Known issues by version.
Requirements for building:
- A Fortran compiler (e.g.
gfortran, viaconda install gfortranor your system package manager) - Meson and ninja (installed automatically by pip)
Clone the repository and install:
git clone https://github.com/hydrogeoscience/pygtide.git
cd pygtide
pip install .Warning
Keep the installation path reasonably short. Versions before v0.9.1 silently truncated data paths longer than ~244 characters; v0.9.1 raises a clear RuntimeError instead. See Troubleshooting.
Run the bundled test suite:
python -c "import pygtide; pygtide.test(msg=True)"The test compares a calculated strain series against a proven reference array and checks the M2 tidal frequency. You should see:
Successfully finished PyGTide tests!
PyGTide ships with data files for leap seconds (etddt.dat) and Earth orientation (etpolut1.dat) in its commdat subdirectory. Update them to the latest IERS/USNO data with:
python -c "import pygtide; pygtide.update()"Note
The update requires an internet connection. If a download server is unreachable, the updater fails gracefully and the bundled (slightly older) files remain in use — see Troubleshooting — Database update fails.
- Quickstart — compute your first tide in two minutes
- Usage Guide — full feature walkthrough
- Configuration — every parameter and keyword