Recent Releases of PyFES

PyFES - 2026.5.2

Bug Fixes

  • Fixed Darwin wave cloning to preserve the dynamic wave type when copying
    through WaveInterface pointers. The Wave::clone() implementation now
    dispatches to a virtual clone_impl() helper, with overrides for derived
    classes such as M1 and L2 so clones keep their concrete type instead
    of being sliced to Wave.

Performance

  • Optimised the evaluate_tide hot path: faster wave-table indexing,
    reduced per-call allocations, vectorised LPE arguments, zero-copy numpy
    outputs from the Python bindings, and stack-allocated triangle storage
    for the LGP2 mesh interpolation. Median wall-clock improvements versus
    2026.4.0, measured on Apple Silicon (arm64): ~-25 % on small Cartesian
    batches (10 k-100 k points), ~-5 % on the 1 M-point Cartesian case, and
    ~-20 % to ~-30 % on LGP2 mesh interpolation across the same range.

Full Changelog: https://github.com/CNES/aviso-fes/compare/2026.4.0...2026.5.2

Hydrosphere - Waves and Currents - C++
Published by fbriol 8 days ago

PyFES - 2026.4.0

Distribution

  • Binary wheels on PyPI: pyfes is now distributed as pre-built wheels for
    Linux (manylinux_2_28 x86_64 and aarch64), macOS (arm64, deployment target
    13.4) and Windows (x86_64), removing the need to compile Boost, Eigen and
    the pybind11 extension locally. pip install pyfes is enough on all
    supported platforms.
  • Python 3.14 and free-threaded 3.14t support: wheels are built for
    CPython 3.11, 3.12, 3.13, 3.14 and the free-threaded 3.14t build.
  • Pre-release routing: PEP 440 pre-release tags (e.g. 2026.4.0rc1,
    2026.4.0.dev1) are published to TestPyPI, while plain X.Y.Z tags
    go to the real PyPI index, both via OIDC Trusted Publishing.

Build System

  • Added a [tool.cibuildwheel] configuration so wheels can be reproduced
    locally with pipx run cibuildwheel.
  • Switched the Boost lookup to a CONFIG-mode find_package with a manual
    boost/version.hpp fallback, so builds work with CMake 4.x (which
    removed FindBoost.cmake) and with the conda-forge libboost-headers
    package used inside the manylinux container and on Windows.
  • Forwarded Python3_EXECUTABLE to pybind11 and set
    Python3_FIND_STRATEGY=LOCATION so each cibuildwheel slot links the
    extension against the matching interpreter — fixes a case where the
    manylinux image's system Python was selected and produced a wheel with
    the wrong ABI tag.
  • Made the non-editable build path absolute in setup.py so
    CMAKE_LIBRARY_OUTPUT_DIRECTORY is resolved correctly when CMake runs
    from the temporary build directory — fixes the free-threaded 3.14t wheels
    that previously shipped without the compiled extension.

Dependencies

  • Added pyyaml to the runtime dependencies (used by pyfes.config).

Full Changelog: https://github.com/CNES/aviso-fes/compare/2026.3.1...2026.4.0

Hydrosphere - Waves and Currents - C++
Published by fbriol about 1 month ago

PyFES - 2026.3.0

Bug Fixes

  • Added case-insensitive NetCDF variable name resolution in the Python
    configuration loader (src/pyfes/config.py) to handle constituent
    variables such as MSf_amplitude vs Msf_amplitude while preserving
    exact-match preference and ambiguity detection.
  • Added case-insensitive NetCDF variable name resolution in the C++ prediction
    example (examples/prediction.cpp), with explicit ambiguity checks when
    multiple variables differ only by case.

Hydrosphere - Waves and Currents - C++
Published by fbriol 3 months ago

PyFES - 2026.2.0

[!IMPORTANT]
Major API Changes: This release introduces the PERTH/Doodson prediction
engine and significantly restructures the Python API. Existing code will
require updates. See the Migration Guide below for details.

New Features

  • Added PERTH/Doodson prediction engine: Introduced support for the PERTH
    tidal prediction engine, which uses Doodson number classification with group
    modulations. This engine is compatible with GOT (Goddard Ocean Tide) models
    including GOT4.10, GOT5.5, and GOT5.6. The PERTH engine was developed by
    Dr. Richard Ray at NASA GSFC and supports 80 tidal constituents.
  • Dual prediction engine support: The library now supports two prediction
    engines:
    • FES/Darwin Engine: Classical Darwin notation with Schureman nodal
      corrections (99 constituents). Compatible with FES2014 and FES2022 atlases.
    • PERTH/Doodson Engine: Doodson number classification with group
      modulations (80 constituents). Compatible with GOT atlases.
  • Automatic UTC to TT conversion: The evaluate_tide() function no longer
    requires a leap_seconds parameter. The library now automatically converts
    UTC dates to Terrestrial Time (TT) using dynamically updated IERS tables that
    include leap second data and Earth rotation parameters (UT1-UTC).

Breaking Changes

  • Restructured Python API: The API has been significantly reorganized:

    • pyfes.darwin and pyfes.perth submodules have been introduced for
      engine-specific constituents
    • pyfes.FESSettings for FES/Darwin engine configuration
    • pyfes.PerthSettings for PERTH/Doodson engine configuration
    • The generic pyfes.Settings class has been removed
  • Changed pyfes.config.load() return type: Now returns a
    Configuration named tuple with models and settings attributes
    instead of a plain dictionary.

  • Changed evaluate_tide() signature: The function signature has been
    simplified. The leap_seconds parameter has been removed since time
    conversion is now automatic. The num_threads parameter has been removed
    from the function call and is now configured through the settings object
    using the .with_num_threads() method.

    # Old API
    tide, lp, flags = pyfes.evaluate_tide(
        handler['tide'],
        dates,
        leap_seconds,
        lon,
        lat,
        settings,
        num_threads=0
    )
    
    # New API
    config = pyfes.config.load('config.yaml')
    tide, lp, flags = pyfes.evaluate_tide(
        config.models['tide'],
        dates,
        lon,
        lat,
        settings=config.settings,
    )
    
  • Configuration file changes: Configuration files now support an engine
    parameter to specify which prediction engine to use:

    tide:
      lgp:
        engine: fes  # or 'perth5' for GOT models, default is 'fes'
        path: ${FES_DATA}/ocean_tide.nc
        # ... other parameters
    
  • Source code reorganization: Python source code has been moved from
    src/pyfes/ and src/core/ to src/python/pyfes/ and
    src/python/core/ respectively.

Migration Guide

For basic tide evaluation:

Old code (2025.9.0)

import pyfes
import pyfes.config as config_handler

config = config_handler.load('config.yaml')
tide, lp, flags = pyfes.evaluate_tide(
    config['tide'],
    dates,
    leap_secons,
    lon,
    lat,
    settings,
    num_threads=0
)

New code (2026.2.0)

import pyfes

config = pyfes.config.load('config.yaml')
tide, lp, flags = pyfes.evaluate_tide(
    config.models['tide'],
    dates,
    lon,
    lat,
    settings=config.settings,
)

For custom runtime settings

FES/Darwin engine

settings = (
    pyfes.FESSettings()
    .with_astronomic_formulae(pyfes.Formulae.SCHUREMAN_ORDER_1)
    .with_time_tolerance(3600.0)
    .with_num_threads(0)
)

PERTH/Doodson engine

settings = (
    pyfes.PerthSettings()
    .with_group_modulations(True)
    .with_inference_type(pyfes.InterpolationType.LINEAR_ADMITTANCE)
    .with_astronomic_formulae(pyfes.Formulae.IERS)
    .with_num_threads(0)
)

Documentation

  • Added comprehensive prediction engines documentation comparing FES/Darwin and
    PERTH/Doodson engines.
  • Added C++ API documentation with examples for both prediction engines.
  • Added constituent reference tables with speeds and Doodson numbers.

Bug Fixes

  • Fixed bounding box filtering for vertex interpolation in LGP models:
    Resolved a bug where vertex interpolation in LGP tidal models didn't properly
    handle bounding box constraints.
  • Fixed Box construction when crossing dateline in LGP mesh triangle
    selection
    : Resolved an issue where bounding box construction failed when
    crossing the international dateline.
  • Improved NetCDF reading performance: Enhanced performance by loading
    selected indices directly rather than loading all elements before subsampling.

Testing

  • Added comprehensive test coverage for leap seconds handling.
  • Added pickle serialization tests for configuration objects.

Build System

  • Reorganized source directory structure for clearer separation of Python
    bindings.

Hydrosphere - Waves and Currents - C++
Published by fbriol 3 months ago

PyFES - 2025.9.0

🔥Git History Rewritten: The git history has been rewritten to remove git
LFS files. The test dataset is now hosted on osf.io and downloaded
automatically during testing. Existing clones of the repository must be
deleted and cloned again
to avoid conflicts and ensure proper operation.

New Features

  • Improved LGP extrapolation algorithm: Previously, extrapolation for points
    outside the LGP mesh only used the single closest vertex. The new algorithm
    now considers multiple vertices within the maximum allowed distance, applying
    inverse distance weighting based on all nearby vertices. This provides
    smoother transitions in extrapolated regions and more accurate results near
    mesh boundaries. The quality flag reflects this change by returning a negative
    value equal to the number of vertices used in the extrapolation (limited to
    -127).
  • Enhanced quality flag reporting: The quality flag now provides more
    detailed information for extrapolated values. A negative flag (e.g., -3)
    indicates that the value was extrapolated using that number of vertices (e.g.,
    3). This allows for a more precise assessment of data quality in extrapolated
    regions, particularly for LGP meshes. See the Breaking Changes section for
    details on the updated quality flag semantics.
  • Updated documentation: The API documentation has been updated to reflect
    the new quality flag semantics and the improved LGP extrapolation algorithm.
  • Added new tidal constituents: M1, M11, M12, M13, N2P, and L2P, with
    corresponding formulas, classes, and updates to constituent and wave handling.
  • Enhanced Wave class to support initialization with Darwin parameters using a
    new Darwin builder pattern.
  • Implemented IERS formula for astronomical angle calculations and added related
    tests.
  • Added arcseconds function to convert angles from arcseconds to radians.

Breaking Changes

  • Removed the Quality enum: The pyfes.Quality enum has been removed
    from the public API. Quality flags are now returned as integer values instead
    of enum constants.

    • pyfes.Quality.kUndefined (0) → 0
    • pyfes.Quality.kExtrapolated1 (1) → -1 (negative values indicate
      extrapolation)
    • pyfes.Quality.kExtrapolated2 (2) → -2
    • pyfes.Quality.kExtrapolated3 (3) → -3
    • pyfes.Quality.kInterpolated (4) → positive values (indicate
      interpolation using N data points)
  • Updated quality flag semantics: Quality flags returned by interpolation
    functions now use a more intuitive system:

    • 0: Value is undefined (no data available)
    • Positive values: Value is interpolated using :math:N data points
      (where :math:N equals the quality flag value)
    • Negative values: Value is extrapolated using :math:\lvert N\rvert
      data points (where :math:\lvert N\rvert equals the absolute value)
  • API signature changes: Functions that previously returned Quality
    enum values now return int8_t or VectorInt8 types. This affects:

    • evaluate_tide() return type changed from VectorQuality to
      VectorInt8
    • AbstractTidalModel.interpolate() methods now return int instead of
      Quality
  • Removed documentation: The pyfes.core.Quality class documentation has
    been removed from the API reference.

Migration Guide

For quality flag checking in user code:


   # Old code
   if quality == pyfes.Quality.kUndefined:
       # handle undefined
   elif quality == pyfes.Quality.kInterpolated:
       # handle interpolated
   elif quality in [pyfes.Quality.kExtrapolated1, pyfes.Quality.kExtrapolated2, pyfes.Quality.kExtrapolated3]:
       # handle extrapolated

   # New code
   if quality == 0:
       # handle undefined
   elif quality > 0:
       # handle interpolated (quality = number of data points used)
   elif quality < 0:
       # handle extrapolated (abs(quality) = number of data points used)

For filtering interpolated vs extrapolated values:


   # Old code
   interpolated_mask = (quality == pyfes.Quality.kInterpolated)

   # New code
   interpolated_mask = (quality > 0)

Bug Fixes

  • Corrected mean_c20 and mean_c30 calculations for mass conservation in long
    period equilibrium.
  • Updated expected values in tide tests for improved accuracy.
  • Fixed handling of NaN values in Cartesian interpolation by resetting to
    undefined.
  • Updated frequency documentation to reflect correct units in wave.hpp and
    wave_table.py.
  • Updated copyright year in LICENSE and corrected license type in setup.cfg.

Documentation

  • Improved documentation for formulae, wave constructors, and frequency units
    for clarity and consistency.

Build System

  • Updated pre-commit hook versions for pyupgrade and clang-format.

Testing

  • Added tests for new wave constituents and additional assertions for IERS
    astronomical angle calculations.

Hydrosphere - Waves and Currents - C++
Published by fbriol 9 months ago

PyFES - Test Dataset v1.0.0

Test dataset for AVISO-FES validation

Hydrosphere - Waves and Currents - C++
Published by fbriol 10 months ago

PyFES - 2025.3.0

Add the keyword argument bbox to the function load_config to specify the bounding box of the region to load from the tidal model files.

Hydrosphere - Waves and Currents - C++
Published by fbriol about 1 year ago

PyFES - 2025.2.0

Bug Fixes

  • Fix the calculation of the quality flag from LGP models

New Features

  • Add evaluate_equilibrium_long_period function to the API
  • Remove excluded constituents parameter from Settings class and related functions
  • Allow dates before January 1st, 1972 to determine the leap seconds between TAI/UTC. In this case, a user warning is thrown and the leap seconds are set to 0.

Documentation

  • enhance documentation and add examples for the LGP discretization

Miscellaneous

  • Refactor type hinting and improve code clarity with TYPE_CHECKING imports

Full Changelog: https://github.com/CNES/aviso-fes/compare/2025.1.0...2025.2.0

Hydrosphere - Waves and Currents - C++
Published by fbriol over 1 year ago

PyFES - 2024.12.0

  • Fixed incorrect mapping between waves and their indices in sparse wave tables.

Hydrosphere - Waves and Currents - C++
Published by fbriol over 1 year ago

PyFES - 2024.11.1

Build System

  • Add custom build backend and update documentation to use build option with pip.

Bug Fixes

  • Fix incorrect wave identifier mapping in harmonic analysis for sparse tables of constituents (#36).

Hydrosphere - Waves and Currents - C++
Published by fbriol over 1 year ago

PyFES - 2024.6.0

New code and Python library designed to handle the new finite element grids of FES2022.

Full Changelog: https://github.com/CNES/aviso-fes/compare/2.9.7...2024.6.0

Hydrosphere - Waves and Currents - C++
Published by fbriol almost 2 years ago

PyFES - 2.9.7

Release Notes for Version 2.9.7

Updates & Refactorings

  • Updated the FES example to the latest library version. This ensures compatibility and leverages the latest features and improvements of the library.
  • Exclude MSF_LP from the long-period equilibrium wave calculation routine (lpe_minus_n_waves) because it is already included in the MSF atlas with FES2022.

Features

  • Introduced a new keyword to optionally disable wave computation by admittance and in the long-period equilibrium wave calculation routine (lpe_minus_n_waves).

Fixes

  • Fixed the tide type for the "MSF" wave in prediction.c to correct a previously incorrect tide type setting.

Maintenance

  • Updated version to 2.9.7 in conda/meta.yaml and include/fes.h to align with the current release.

This release includes several important updates and improvements aimed at enhancing the functionality, accuracy, and usability of the FES library.

Hydrosphere - Waves and Currents - C++
Published by fbriol almost 2 years ago

PyFES - FES2022B

Hydrosphere - Waves and Currents - C++
Published by fbriol almost 2 years ago

PyFES - FES2022

Adding new waves : SA_1, STA, MM_1, MF_1, MSF_LP, M0, MM_2 and MF_2.

Hydrosphere - Waves and Currents - C++
Published by fbriol almost 4 years ago