The Implicit Filter Python Package provides a collection of functions and classes for filtering data using implicit filtering techniques. Originally FESOM, and now ICON models are supported.
For optimal performance usage of Nvidia GPU is highly recommended.
Aaron Wienkers, 2024
- Built-in support for the
ICON
grid- Uses new JAX routines for vertex- and cell-centred transformations
- Support for spatially-varying length-scale filters, e.g.
$\Delta \propto \mathcal{L}_\mathrm{Ro}$ - Implements Neumann Boundary Conditions in a conservative fashion
- This is necessary when filtering deeper layers in the ocean when the sea-floor boundaries change
- These BCs ensure no artificial mass/energy/tracer leakage through the boundaries, and which otherwise produces halos in the high-pass fields
- Adds MPI support for multi-GPU machines
- Batches GPU computations (in time & wavenumber space) to avoid running out of memory
- Improves convergence properties of 2nd Order filter using a fine-tuned Algebriac Multigrid Solver (AMGX)
- CG Convergence of the 2nd Order filter with the original block-wise structure was either slow or (for larger filter length-scales
$\sim 100$ km) divergent - AMGX Solver Converges faster on 2nd Order Filter compared to
cupy
CG implementation of 1st Order Filter, even up to$\Delta \approx 10^4$ km - N.B.: Using 2nd Order filter is necessary for many higher-order filtered statistics and when a sharp(er) filter cutoff is required
- CG Convergence of the 2nd Order filter with the original block-wise structure was either slow or (for larger filter length-scales
Other Notes:
- AMGX Filter cannot handle un-masked NaNs within the domain (e.g. if large values are dropped)
- Batch processing in time (or spectrally) requires that dimension to be in a single chunk
See the attached Jupyter Notebook, ./examples/intro_icon_filtering.ipynb
for a short introduction to using specifically implicit_filter_ICON
with ICON model data.
Base:
- NumPy & ScipPy
- JAX
- CuPy — Most success when installing from
pip
- AMGX — Build from source
- pyAMGX — Define
AMGX_DIR
(location above), and thenpip install pyamgx
- Alternatively, point to build on DKRZ Levante
AMGX_DIR=/home/b/b382615/opt/AMGX
- Alternatively, point to build on DKRZ Levante
IO:
- Xarray
- Dask
Visualization:
- Matplotlib
Easiest:
pip install git+https://github.com/wienkers/implicit_filter_ICON.git
Development Installation:
source ./path/to/enviroment/of/your/choice
git clone https://github.com/wienkers/implicit_filter_ICON.git
cd implicit_filter
pip install -e .