PyFES is a Python library for predicting ocean tides anywhere on Earth. Using global tidal atlases such as FES2022 and GOT5.6, it evaluates tidal heights and currents through harmonic analysis -- the same scientific method developed by Lord Kelvin over 150 years ago.
- Tidal height prediction at any coastal or oceanic location from global atlases (FES2022, GOT5.6, etc.)
- Tidal current computation for marine navigation and oceanographic studies
- Harmonic analysis to extract tidal constituents from observed sea-level time series
- Prediction from known constituents without requiring a tidal atlas
- Long-period equilibrium tide computation from Cartwright-Tayler-Edden spectral tables
- Multiple tidal model formats: regular Cartesian grids and unstructured finite-element meshes (LGP1/LGP2)
- Dual prediction engines supporting both Darwin (FES) and Doodson (GOT) harmonic notation systems
- Configurable inference modes (zero, linear, spline, Fourier) for minor constituent estimation
Launch interactive notebooks in Binder to explore examples including tidal prediction, harmonic analysis, interpolation techniques, and engine comparison. Everything runs in the cloud.
conda install -c conda-forge pyfesPyFES requires a C++14 compiler and CMake:
git clone https://github.com/CNES/aviso-fes.git
cd aviso-fes
pip install -e .Create a YAML configuration file describing your tidal model:
engine: darwin
tide:
cartesian:
paths:
M2: ${FES_DATA}/M2_tide.nc
S2: ${FES_DATA}/S2_tide.nc
K1: ${FES_DATA}/K1_tide.nc
O1: ${FES_DATA}/O1_tide.ncThen load and predict:
import numpy as np
import pyfes
config = pyfes.config.load('ocean_tide.yaml')
dates = np.arange(
np.datetime64('2024-01-01'),
np.datetime64('2024-01-02'),
np.timedelta64(1, 'h'),
)
lons = np.full(dates.shape, -7.688)
lats = np.full(dates.shape, 59.195)
tide, lp, flags = pyfes.evaluate_tide(
config.models['tide'], dates, lons, lats,
settings=config.settings,
)
total_tide = tide + lp # in the same units as the tidal atlasconstituents = {
'M2': (205.1, 109.0), # (amplitude_cm, phase_deg)
'S2': (74.9, 148.3),
'K1': (6.4, 75.1),
'O1': (6.6, 327.9),
}
tide, lp = pyfes.evaluate_tide_from_constituents(
constituents, dates, latitude=48.38,
)PyFES provides two prediction engines to support different tidal atlas formats:
| Feature | FES/Darwin | PERTH/Doodson |
|---|---|---|
| YAML key | engine: darwin |
engine: perth |
| Notation | Darwin notation | Doodson numbers |
| Constituents | 99 | 80 |
| Nodal corrections | Individual Schureman factors | Individual (group modulations optional) |
| Default inference | SPLINE |
LINEAR |
| Compatible atlases | FES2014, FES2022 | GOT4.10, GOT5.5, GOT5.6 |
Both engines share the same high-level API and support the same set of configurable inference types. The choice depends on your tidal atlas format: FES atlases use the Darwin engine, while GOT atlases use the PERTH engine.
See the Prediction Engines documentation for a detailed comparison and usage guidance.
PyFES provides two catalogues of tidal constituents, one for each prediction engine. Every constituent is characterised by its name, angular speed, and XDO notation encoding.
- Darwin catalogue -- 99 constituents used by the FES/Darwin engine. See the full list.
- Doodson catalogue -- 80 constituents used by the PERTH/Doodson engine. See the full list.
This package is the fully revised version of the FES2022 distribution, including both the PyFES prediction software and access to the FES2022 tides databases. FES2022 represents the state-of-the-art in global tidal modeling, with improved accuracy especially for satellite altimetry applications.
A full technical description is available in the FES2022 handbook and the scientific paper (Lyard et al. 2024).
The complete documentation is available on GitHub Pages, including:
- Getting Started -- installation and quickstart examples
- User Guide -- configuration, settings, inference modes, and prediction functions
- Prediction Engines -- Darwin vs Doodson engine comparison
- Tidal Constituents -- complete constituent catalogues
- Theoretical Background -- mathematical foundations of the harmonic method
- API Reference -- detailed function documentation
- Examples -- worked examples with plots
This library provides a C++ API for high-performance tide prediction. The C++
part of the library is documented using Doxygen. You can generate the
documentation by running doxygen in the docs directory after installing
Doxygen.
For users requiring the original C implementation, the legacy version remains available on its own branch. The reference version used to compute the FES2022b tidal solution is 2.9.7.
Note: The legacy C version is archived and will not receive further updates. For new projects, we recommend using the current Python version or the C++ library.
Please note: The C++ library does not include a reader for the tidal databases -- you will need to implement your own reader to access them.
When using FES2022, please mention: FES2022 was produced by LEGOS, NOVELTIS and CLS Ocean and Climate Division; the project was funded by CNES. It is distributed by AVISO, with support from CNES (http://www.aviso.altimetry.fr/)
-
Lyard, F., Carrere, L., Fouchet, E., Cancet, M., Greenberg, D., Dibarboure, G., and Picot, N.: FES2022 a step towards a SWOT-compliant tidal correction, Submitted to J. Geophy. Res., in review, 2025
-
Lyard, F. H., Allain, D. J., Cancet, M., Carrere, L., and Picot, N.: FES2014 global ocean tide atlas: design and performance, Ocean Sci., 17, 615-649, https://doi.org/10.5194/os-17-615-2021, 2021.
-
Carrere L., F. Lyard, M. Cancet, A. Guillot, N. Picot: FES 2014, a new tidal model - Validation results and perspectives for improvements, presentation to ESA Living Planet Conference, Prague 2016.
Questions, suggestions, or need support? Reach out to the AVISO team: aviso@altimetry.fr