PyFLEXTRKR
A Flexible Feature Tracking Python Software for Convective Cloud Analysis.
https://github.com/flextrkr/pyflextrkr
Category: Atmosphere
Sub Category: Atmospheric Chemistry and Aerosol
Last synced: about 18 hours ago
JSON representation
Repository metadata
PyFlexTRKR
- Host: GitHub
- URL: https://github.com/flextrkr/pyflextrkr
- Owner: FlexTRKR
- License: other
- Created: 2021-08-04T23:46:08.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2026-03-13T16:39:04.000Z (11 days ago)
- Last Synced: 2026-03-14T04:50:53.609Z (11 days ago)
- Language: Jupyter Notebook
- Size: 34.2 MB
- Stars: 101
- Watchers: 16
- Forks: 35
- Open Issues: 11
- Releases: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Citation: CITATION.cff
README.md
PyFLEXTRKR: a Flexible Feature Tracking Python Software for Convective Cloud Analysis

1. Introduction
The Python FLEXible object TRacKeR (PyFLEXTRKR) is a flexible atmospheric feature tracking software package. The software can track any 2D objects and handle merging and splitting explicitly. PyFLEXTRKR has specific capabilities to track convective clouds from a variety of observations and model simulations, including: 1) individual convective cells, and 2) mesoscale convective systems (MCSs) using radar, satellite, and model data. The package has scalable parallelization options and has been optimized to work on large datasets including global kilometer-scale data.
For a more detailed user guide, click this link.
2. Input Data Requirements
PyFLEXTRKR works with netCDF files using Xarray's capability to handle N-dimension arrays of gridded data. Currently, PyFLEXTRKR supports tracking:
- Individual convective cells using radar reflectivity data [Feng et al. (2022), MWR];
- MCSs using infrared brightness temperature (Tb) data from geostationary satellites, or outgoing longwave radiation (OLR) data from model simulations, with optional collocated precipitation data [Feng et al. (2021), JGR] or 3D radar reflectivity data [Feng et al. (2018) JAMES; Feng et al. (2019), JCLI] to identify robust MCSs;
- Generic 2D objects defined by customizable feature identification functions.
The input data must contain at least 3 dimensions: time, y, x, with corresponding coordinates of time, latitude, longitude. The latitude and longitude coordinates can be either 1D or 2D. But the data must be on a fixed 2D grid (any projection is fine) since PyFLEXTRKR only supports tracking data on 2D arrays. Irregular grids such as those in E3SM or MPAS model must first be regridded to a regular grid before tracking. Additional variable names and coordinate names are specified in the config file. See user guide for more details in preparing the input dataset.
3. Installing PyFLEXTRKR
PyFLEXTRKR requires Python 3.6 and above. Support for Python 3.8 and lower has reached end-of-life so it is recommended to use Python 3.9 or higher.
Install via Conda
The easiest way to install the most recent version of PyFLEXTRKR is via conda through the conda-forge channel:
conda install pyflextrkr -c conda-forge
This will also install all dependencies and should be sufficient for most users. You can update the installation by:
conda update pyflextrkr -c conda-forge
Install from source via Github
Clone PyFLEXTRKR to your local computer (e.g., /PyFLEXTRKR):
git clone https://github.com/FlexTRKR/PyFLEXTRKR.git
Go to that directory:
cd /PyFLEXTRKR
Use the included environment.yml file to create a Conda virtual environment, make sure you change conda_env_dir to where your conda environments are installed:
conda env create -f environment.yml --prefix /conda_env_dir/flextrkr
or ...
conda create -n flextrkr -c conda-forge --file requirements.txt
Pro Tips: using mamba to create the virtual environment is much faster:
mamba env create -f environment.yml --prefix /conda_env_dir/flextrkr
After setting up the Conda virtual environment, activate it with:
conda activate flextrkr
Then install the package with:
pip install -e .
Any changes to the source code will be reflected in the running version.
4. Example Data and Runscripts
Several scripts are provided to download example input data, run tracking, and produce visualizations of the tracking results below:
-
Convective cell tracking from 500 m gridded NEXRAD radar data
-
Convective cell tracking from 500 m gridded ARM CSAPR radar data
![]()
![]()
![]()
To run these demo scripts, download the script, modify the dir_demo in the script to a directory on your computer to store the sample data, and run the following command:
bash demo_cell_nexrad.sh
The demo script downloads and untar the sample data, runs the tracking code, and generates visualizations. Once the demo script finishes running, a sub-directory within the dir_demo named quicklooks_trackpaths will be created that contains quicklook visualization of the tracking results, as shown in the example animations above.
5. Running PyFLEXTRKR
To run the code, type the following in the command line:
Activate PyFLEXTRKR virtual environment:
conda activate flextrkr
Run PyFLEXTRKR:
python ../runscripts/run_celltracking.py ./config/config_nexrad500m_example.yml
python ./runscripts/run_mcs_tbpf.py ./config/config_wrf4km_mcs_tbpf_example.yml
Example run scripts and config files are in the highlighted directories:

6. Statistical Analysis
A Gallery of Statistical Analysis that can be applied to the tracking outputs is provided. Below are some examples.





7. References
Feng, Z., Hardin, J., Barnes, H. C., Li, J., Leung, L. R., Varble, A., & Zhang, Z. (2023). PyFLEXTRKR: a flexible feature tracking Python software for convective cloud analysis. Geosci. Model Dev., 16(10), 2753-2776. https://doi.org/10.5194/gmd-16-2753-2023
Feng, Z., Varble, A., Hardin, J., Marquis, J., Hunzinger, A., Zhang, Z., & Thieman, M. (2022). Deep Convection Initiation, Growth, and Environments in the Complex Terrain of Central Argentina during CACTI. Monthly Weather Review, 150(5), 1135-1155. https://doi.org/10.1175/MWR-D-21-0237.1
Feng, Z., Leung, L. R., Liu, N., Wang, J., Houze, R. A., Li, J., et al. (2021). A Global High‐Resolution Mesoscale Convective System Database Using Satellite‐Derived Cloud Tops, Surface Precipitation, and Tracking. Journal of Geophysical Research: Atmospheres, 126(8). https://doi.org/10.1029/2020JD034202
Feng, Z., Leung, L. R., Houze, R. A., Hagos, S., Hardin, J., Yang, Q., et al. (2018). Structure and Evolution of Mesoscale Convective Systems: Sensitivity to Cloud Microphysics in Convection-Permitting Simulations Over the United States. Journal of Advances in Modeling Earth Systems, 10(7), 1470-1494. https://doi.org/10.1029/2018MS001305
Feng, Z., Houze, R. A., Leung, L. R., Song, F., Hardin, J. C., Wang, J., et al. (2019). Spatiotemporal Characteristics and Large-scale Environments of Mesoscale Convective Systems East of the Rocky Mountains. Journal of Climate, 32(21), 7303-7328. https://doi.org/10.1175/JCLI-D-19-0137.1
Citation (CITATION.cff)
cff-version: 1.0.0 message: "If you use this software, please cite it as below." authors: - family-names: "Feng" given-names: "Zhe" orcid: "https://orcid.org/0000-0002-7540-9017" - family-names: "Hardin" given-names: "Joseph" orcid: "https://orcid.org/0000-0002-8489-4763" - family-names: "Barnes" given-names: "Hannah" orcid: "https://orcid.org/0000-0002-1699-5749" - family-names: "Li" given-names: "Jianfeng" orcid: "https://orcid.org/0000-0002-1091-9753" - family-names: "Leung" given-names: "L. Ruby" orcid: "https://orcid.org/0000-0002-3221-9467" - family-names: "Varble" given-names: "Adam" orcid: "https://orcid.org/0000-0001-5926-7154" - family-names: "Zhang" given-names: "Zhixiao" orcid: "" title: "PyFLEXTRKR: a flexible feature tracking Python software for convective cloud analysis" version: 2023.10.0 doi: 10.5194/gmd-16-2753-2023 date-released: 2022-12-12 url: "https://github.com/FlexTRKR/PyFLEXTRKR"
Owner metadata
- Name: FlexTRKR
- Login: FlexTRKR
- Email:
- Kind: organization
- Description:
- Website:
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/88464559?v=4
- Repositories: 2
- Last ynced at: 2023-05-09T20:30:09.981Z
- Profile URL: https://github.com/FlexTRKR
GitHub Events
Total
- Release event: 6
- Pull request event: 39
- Fork event: 8
- Issues event: 16
- Watch event: 26
- Issue comment event: 14
- Push event: 19
- Pull request review event: 3
- Create event: 6
Last Year
- Release event: 2
- Pull request event: 24
- Fork event: 4
- Issues event: 9
- Watch event: 10
- Issue comment event: 9
- Push event: 12
- Pull request review event: 3
- Create event: 2
Committers metadata
Last synced: 3 days ago
Total Commits: 372
Total Committers: 15
Avg Commits per committer: 24.8
Development Distribution Score (DDS): 0.5
Commits in past year: 16
Committers in past year: 3
Avg Commits per committer in past year: 5.333
Development Distribution Score (DDS) in past year: 0.125
| Name | Commits | |
|---|---|---|
| Zhe Feng | z****g@p****v | 186 |
| Hannah C Barnes | h****s@p****v | 76 |
| Joseph C. Hardin | j****e@g****m | 57 |
| Feng Z | z****1@o****v | 16 |
| Katelyn A Barber | k****r@p****v | 11 |
| Jingyi Chen | j****n@p****v | 8 |
| Zhixiao Zhang | z****g@u****u | 5 |
| Zhe Feng | z****1@c****v | 4 |
| Barnes | b****7@w****v | 3 |
| Stella Heflin | s****n@u****u | 1 |
| Laura Paccini | l****i@g****m | 1 |
| Katelyn Barber | b****2@c****v | 1 |
| Katelyn A Barber | b****2@c****v | 1 |
| Jianfeng Li | j****8@c****v | 1 |
| Feng Z | z****1@o****v | 1 |
Committer domains:
- pnnl.gov: 4
- or-condo-c224.ornl.gov: 1
- cori04.nersc.gov: 1
- constance03.pnl.gov: 1
- cori13.nersc.gov: 1
- uw.edu: 1
- we32441.pnl.gov: 1
- cirrus-login1.ccs.ornl.gov: 1
- utah.edu: 1
- or-condo-login01.ornl.gov: 1
Issue and Pull Request metadata
Last synced: 2 months ago
Total issues: 26
Total pull requests: 101
Average time to close issues: about 1 month
Average time to close pull requests: 2 days
Total issue authors: 16
Total pull request authors: 8
Average comments per issue: 1.77
Average comments per pull request: 0.13
Merged pull request: 89
Bot issues: 0
Bot pull requests: 0
Past year issues: 5
Past year pull requests: 15
Past year average time to close issues: 3 days
Past year average time to close pull requests: 6 days
Past year issue authors: 4
Past year pull request authors: 3
Past year average comments per issue: 0.6
Past year average comments per pull request: 0.07
Past year merged pull request: 12
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- jiligulu-cqs (4)
- DebjitP1997 (4)
- gewitterblitz (2)
- feiduduyyc (2)
- met-sree (2)
- lyuhm (2)
- lbdieng (1)
- weiming9115 (1)
- feliperiosg (1)
- oluwafemiomitusa (1)
- llccl (1)
- LluisFB (1)
- Invin-Invin (1)
- VISION0310 (1)
- ealucy (1)
Top Pull Request Authors
- feng045 (91)
- laurapaccini (2)
- feliperiosg (2)
- AdrienBq (2)
- mbaidu (1)
- candiceT233 (1)
- DrOrange123 (1)
- jli628 (1)
Top Issue Labels
Top Pull Request Labels
Dependencies
- astropy
- basemap
- cartopy >=0.17
- colorcet
- dask >=2.9
- ffmpeg
- ipython >7.0
- joblib >=0.14
- matplotlib >=3
- netcdf4 >=1.5
- numpy >=1.17
- pandas >=0.25
- pip
- python >=3.8
- pytz >=2019
- scikit-image >=0.16
- scikit-learn
- scipy >=1.4
- seaborn
- wrf-python
- xarray >=0.14
- cartopy >=0.17
- dask >=2.9
- ipython >=7.0
- joblib >=0.14
- matplotlib >=3
- netcdf4 >=1.5
- numpy >=1.17
- pandas >=0.25
- pytz >=2019
- pyyaml *
- scikit-image >=0.16
- scipy >=1.4
- setuptools *
- xarray >=0.14
Score: 7.426549072397304