PyFES
The prediction of tides is based on the principle of harmonic analysis, a method developed into a practical application by Sir William Thomson (Lord Kelvin) around 1867.
https://github.com/cnes/aviso-fes
Category: Hydrosphere
Sub Category: Waves and Currents
Keywords
cxx-library ocean prediction prediction-model python radial tide
Keywords from Contributors
c-library ocean-sciences
Last synced: about 7 hours ago
JSON representation
Repository metadata
FES is the last version of the FES (Finite Element Solution) tide model.
- Host: GitHub
- URL: https://github.com/cnes/aviso-fes
- Owner: CNES
- License: bsd-3-clause
- Created: 2021-08-11T07:29:06.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2026-05-18T14:11:56.000Z (8 days ago)
- Last Synced: 2026-05-19T09:48:19.575Z (7 days ago)
- Topics: cxx-library, ocean, prediction, prediction-model, python, radial, tide
- Language: C++
- Homepage: https://cnes.github.io/aviso-fes
- Size: 1.64 MB
- Stars: 122
- Watchers: 5
- Forks: 44
- Open Issues: 0
- Releases: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Authors: AUTHORS
README.md
PyFES - Ocean Tide Prediction Software
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.
Features
- 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
Try It -- No Installation Required
Launch interactive notebooks in Binder
to explore examples including tidal prediction, harmonic analysis,
interpolation techniques, and engine comparison. Everything runs in the cloud.
Installation
From conda-forge
conda install -c conda-forge pyfes
From source
PyFES requires a C++14 compiler and CMake:
git clone https://github.com/CNES/aviso-fes.git
cd aviso-fes
pip install -e .
Quick Start
Predicting tides from a tidal atlas
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.nc
Then 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 atlas
Predicting from known constituents
constituents = {
'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,
)
Prediction Engines
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.
Tidal Constituents
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.
About FES2022
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).
Operational Use
PyFES (release 2026.3.1)
is the tidal correction component embedded in the SWOT KaRIn ground segment
for Level-2 product generation. It is also being extended to integrate Richard
Ray's GOT model (via the Perth engine) for upcoming SWOT product versions, so
that the same code path produces both FES- and GOT-based corrections in the
operational pipeline.
Documentation
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
C++ API
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.
Legacy C Version
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.
Credits
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/)
The PERTH engine is a C++ port of the original Fortran
PERTH5 library by Richard Ray (NASA GSFC).
The integration into pyfes was developed under CNES funding to support tidal
correction for SWOT (Surface Water and Ocean Topography) altimetry products.
Related Projects
PyFES focuses on high-performance tidal prediction from FES atlases (Darwin
engine) and GOT atlases (Perth engine), including loaders for FES2022's
unstructured native grid. For a broader pure-Python tide-modeling toolbox
covering OTIS, IERS pole tides, ocean and solid-Earth tides, and
tide-generating force computations -- complementary to the FES / GOT scope
covered here -- see
pyTMD by Tyler Sutterley (NASA GSFC).
References
-
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.
Contact
Questions, suggestions, or need support? Reach out to the AVISO team:
aviso@altimetry.fr
Owner metadata
- Name: CNES
- Login: CNES
- Email:
- Kind: organization
- Description:
- Website: https://cnes.fr
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/30655936?v=4
- Repositories: 67
- Last ynced at: 2024-05-07T18:05:20.164Z
- Profile URL: https://github.com/CNES
GitHub Events
Total
- Release event: 7
- Delete event: 3
- Pull request event: 10
- Fork event: 9
- Issues event: 22
- Watch event: 40
- Issue comment event: 15
- Push event: 116
- Pull request review event: 4
- Pull request review comment event: 2
- Create event: 10
Last Year
- Release event: 3
- Delete event: 3
- Pull request event: 5
- Fork event: 2
- Issues event: 7
- Watch event: 22
- Issue comment event: 6
- Push event: 71
- Pull request review event: 2
- Create event: 3
Committers metadata
Last synced: 3 days ago
Total Commits: 730
Total Committers: 14
Avg Commits per committer: 52.143
Development Distribution Score (DDS): 0.051
Commits in past year: 344
Committers in past year: 4
Avg Commits per committer in past year: 86.0
Development Distribution Score (DDS) in past year: 0.015
| Name | Commits | |
|---|---|---|
| Frédéric BRIOL | f****l@g****m | 693 |
| jpolton | j****n@g****m | 7 |
| Florian REY | f****o@g****m | 5 |
| locarrere | l****e@g****m | 4 |
| LudwigVonKoopa | 4****a | 4 |
| Loren Carrere | l****e@c****r | 3 |
| tomsail | s****s@g****m | 2 |
| robin-cls | 7****s | 2 |
| copilot-swe-agent[bot] | 1****t | 2 |
| alcoat | a****t@a****r | 2 |
| Robin Chevrier | r****r@c****r | 2 |
| Frederic Briol | f****l@t****r | 2 |
| Yuriy Chernyshov | t****g@y****m | 1 |
| Philippe Poilbarbe | p****e@g****m | 1 |
Committer domains:
- cls.fr: 2
- groupcls.com: 2
- yandex-team.com: 1
- tux-briol.pc.cls.fr: 1
- actimar.fr: 1
Issue and Pull Request metadata
Last synced: 29 days ago
Total issues: 36
Total pull requests: 12
Average time to close issues: 4 months
Average time to close pull requests: 12 days
Total issue authors: 30
Total pull request authors: 9
Average comments per issue: 1.69
Average comments per pull request: 0.75
Merged pull request: 8
Bot issues: 0
Bot pull requests: 0
Past year issues: 7
Past year pull requests: 2
Past year average time to close issues: 12 days
Past year average time to close pull requests: 4 days
Past year issue authors: 6
Past year pull request authors: 2
Past year average comments per issue: 1.29
Past year average comments per pull request: 2.0
Past year merged pull request: 1
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- ezaron (2)
- AimAlee (2)
- remkos (2)
- tomsail (2)
- alcoat (2)
- diegoiglesias (2)
- SebSwan (1)
- ruby-vallarino (1)
- cseaton (1)
- lherdman (1)
- robbibt (1)
- ricsatjr (1)
- turekg (1)
- xwanner (1)
- nicholasmetherall (1)
Top Pull Request Authors
- alcoat (3)
- ludwigVonKoopa (2)
- tomsail (1)
- florianwns (1)
- georgthegreat (1)
- remkos (1)
- jpolton (1)
- robin-cls (1)
- Misiorama (1)
Top Issue Labels
Top Pull Request Labels
Dependencies
- actions/checkout v2 composite
- actions/setup-python v2 composite
- pre-commit/action v2.0.0 composite
- numpy *
- actions/checkout v4 composite
- actions/configure-pages v5 composite
- actions/deploy-pages v4 composite
- actions/upload-pages-artifact v3 composite
- mamba-org/setup-micromamba v1 composite
- binutils
- boost-cpp
- cartopy
- cmake
- cxx-compiler
- eigen
- gtest
- make
- matplotlib
- netcdf4
- pytest
- pyyaml
- setuptools_scm
- sphinx
- sphinx-book-theme
- sphinx-gallery
Score: 7.443078374348515