Home

Awesome

Image-Processing based Atmospheric River Tracking (IPART) algorithms

DOI

Introduction

IPART (Image-Processing based Atmospheric River Tracking) is a Python package for automated Atmospheric River (AR) detection, axis finding and AR tracking from gridded Integrated Vapor Transport (IVT) data, for instance Reanalysis datasets, or model simulations.

IPART is intended for researchers and students who are interested in the field of atmospheric river studies in the present day climate or future projections. Unlike the convectional detection methods that rely on magnitude thresholding on the intensities of atmospheric vapor fluxes, IPART tackles the detection task from a spatio-temporal scale perspective and is thus free from magnitude thresholds.

Documentation

Further documentation can be found at https://ipart.readthedocs.io/en/latest/. A description of the methods is given in this work: Xu, G., Ma, X., Chang, P., and Wang, L.: Image-processing-based atmospheric river tracking method version 1 (IPART-1), Geosci. Model Dev., 13, 4639–4662, https://doi.org/10.5194/gmd-13-4639-2020, 2020..

Example use case

fig3
(a) The IVT field in kg/m/s at 1984-01-26 00:00 UTC over the North Hemisphere. (b) the IVT reconstruction field (IVT_rec) at the same time point. (c) the IVT anomaly field (IVT_ano) from the THR process at the same time point.
Locations of a track labelled "198424" found in year 1984. Black to yellow color scheme indicates the evolution.

Dependencies

Installation

Recommend building the Python environment using Anaconda.

Install from conda-forge

In your working Python environment:

conda install -c conda-forge ipart

will install ipart and its dependencies for Python 3.

Create conda environment using environment file

This way will install the optional cartopy package and allow you to run the notebook examples.

After Anaconda installation, git clone this repository:

git clone https://github.com/ihesp/IPART

Then build a new conda environment using the environment file provided. For example:

cd IPART
conda env create -f environment_py3.yml

This creates a new environment named ipartpy3. Activate the environment using

conda activate ipartpy3

After that, you can check the list of packages installed by

conda list

Similarly for Python 2.7, use

conda env create -f environment_py2.yml

Finally install IPART using:

pip install -e .

tests

To validate installation, issue a new Python session and run

import ipart

If nothing prints out, installation is successful.

The tests folder also contains a number of unittests, to run them (only if you have done a source code install):

python -m unittest discover -s tests

Inventory

Changelog

v3.5.0

Minor fix:

v3.4.0

Minor fixes:

v3.3.0

Use agg backend of matplotlib in utils/funcs.py to prevent memory leaking.

Allow specifying the calendar type (e.g. noleap) when reading netCDF data using readNC(): readNC(data_path, varid, calendar='noleap').

v3.2.0

For computations in scripts/detect_ARs.py and scripts/detect_ARs_generator_version.py, expect to see a 200 - 300 % speed up (only when the data resolution is higher than 1.0 degree latitude/longitude).

If the opencv module is also installed, up to 300 - 500 % speed gain (tested with 0.25 degree resolution data).

v3.0

Make algorithms zonally cyclic.

v2.0

v1.0

Contributing

Following the guidelines by the Neurohackademy 2020 curriculum, we welcome contributions from the community. Please create a fork of the project on GitHub and use a pull request to propose your changes. We strongly encourage creating an issue before starting to work on major changes, to discuss these changes first.

Citation

If you use IPART in published research, please cite it by referencing the peer-reviewed work published in JOSS.

Getting help

Please post issues on the project GitHub page.