Fronts-Toolbox documentation#

Collection of tools to detect oceanic fronts in Python.

Despite being widely used in the literature, some front-detection algorithms are not easily available in Python. This packages implements different methods directly in Python: they are accelerated by Numba and support Numpy arrays, Dask arrays, or Xarray data. Support for Cuda array could be added if necessary.

The goal of this package is to provide various methods in such a way that they can be easily read and modified by researchers. In that regard, Numba allows to write directly in Python and retain access to a lot of functions from Numpy and Scipy. This package provides a common framework to easily add other algorithms, while benefiting from automatic testing and documentation.

Algorithms

Front detection algorithms, filters to apply before front detection, post-processing of detected fronts

algorithms
Gallery

Examples of applying the various algorithms.

gallery
Developer’s guide

Information to modify or add algorithms.

developer’s guide
API reference
api reference

Install#

From PyPI:

pip install fronts-toolbox

From source:

git clone https://github.com/Descanonge/fronts-toolbox
cd fronts-toolbox
pip install -e .

Testing#

Testing these various front-detection algorithms automatically is not straightforward. Only basic automatic tests are run: the functions terminate without crashing, the output is the correct type and shape, the output is not all invalid. Checking the correctness of the methods is left to the user. The documentation includes a gallery that is automatically constructed and allows to visually check the methods.

Checking the results is especially important when dealing with Dask and chunked core dimensions.

Important

I am doing this on the side. I do not have the time to thoroughly test every algorithm with actual data (beyond the gallery).

Contents#