{"id":7944,"library":"arm-pyart","title":"Py-ART: Python ARM Radar Toolkit","description":"Py-ART is an open-source Python library designed for working with weather radar data. It provides tools for reading, processing, visualizing, and analyzing data from a variety of radar formats, including NEXRAD, UF, and ODIM_H5. Version 2.2.0, released recently, continues to build on its foundation with improvements in data handling and integration with other scientific libraries like xradar and cmweather. The project maintains an active release cadence with minor releases and bug fixes.","status":"active","version":"2.2.0","language":"en","source_language":"en","source_url":"https://github.com/ARM-DOE/pyart","tags":["radar","meteorology","atmospheric science","geospatial","data analysis","xarray","weather"],"install":[{"cmd":"pip install arm-pyart","lang":"bash","label":"Default Install"}],"dependencies":[{"reason":"Requires Python 3.10 or higher.","package":"python","optional":false},{"reason":"Fundamental for numerical operations.","package":"numpy","optional":false},{"reason":"Scientific computing routines.","package":"scipy","optional":false},{"reason":"Core plotting functionality.","package":"matplotlib","optional":false},{"reason":"Required for reading NetCDF-based radar formats.","package":"netCDF4","optional":false},{"reason":"Primary data model for radar objects.","package":"xarray","optional":false},{"reason":"For geographical plotting; often a complex install.","package":"cartopy","optional":false},{"reason":"Used as the main backend for reading radar data since v2.0.0.","package":"xradar","optional":false},{"reason":"Provides colormaps and plotting utilities since v2.0.0.","package":"cmweather","optional":false}],"imports":[{"note":"While `pyart.core.Radar` is the underlying class, `pyart.io.read` is the standard factory function for loading radar data into a Radar object from a file, which is the most common use case.","wrong":"from pyart.core import Radar","symbol":"Radar","correct":"import pyart; radar = pyart.io.read('file.nc')"},{"note":"Prefer accessing `RadarDisplay` via the `pyart.graph` module (e.g., `pyart.graph.RadarDisplay`) for better readability and to follow typical Py-ART usage patterns.","wrong":"from pyart.graph.radardisplay import RadarDisplay","symbol":"RadarDisplay","correct":"import pyart; display = pyart.graph.RadarDisplay(radar)"},{"note":"The primary function for loading various radar file formats into a Radar object.","symbol":"read","correct":"import pyart; radar = pyart.io.read('file.nc')"}],"quickstart":{"code":"import pyart\nimport matplotlib.pyplot as plt\n\n# Create a dummy radar object for demonstration\nradar = pyart.testing.make_empty_ppi_radar(10, 10, 10)\n\n# Initialize a RadarDisplay object\ndisplay = pyart.graph.RadarDisplay(radar)\n\n# Plot a PPI (Plan Position Indicator) slice of reflectivity\nfig = plt.figure(figsize=(8, 6))\nax = fig.add_subplot(111)\ndisplay.plot('reflectivity', 0, title='Simulated Reflectivity (PPI)', ax=ax)\nplt.show()","lang":"python","description":"This quickstart demonstrates how to create a dummy radar object and plot a basic Plan Position Indicator (PPI) reflectivity slice using Py-ART's `RadarDisplay`. This allows for immediate visualization without needing external data files."},"warnings":[{"fix":"Review data loading routines, especially for new formats, and adapt to `xradar`'s approach. For colormaps, import from `cmweather` (e.g., `cmweather.colormaps`) or verify existing colormaps are still available and behave as expected.","message":"Py-ART v2.0.0 introduced significant internal changes, primarily adopting `xradar` as the main backend for reading radar datasets and utilizing `cmweather` for colormaps. Code relying on direct internal reader implementations or Py-ART's older colormap handling may break.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Upgrade your Python environment to version 3.10 or newer. It is recommended to use `conda` or a virtual environment for managing Python versions.","message":"As of v1.19.3, Py-ART officially requires Python 3.10 or newer. Installations on older Python versions will fail or result in `ImportError`.","severity":"breaking","affected_versions":">=1.19.3"},{"fix":"For `cartopy` or `netCDF4` installation issues, consult their respective documentation for system-level dependencies. Using `conda` (`conda install -c conda-forge pyart`) is strongly recommended, as it often resolves complex binary dependency chains automatically.","message":"Installation of geospatial dependencies like `cartopy` and `netCDF4` can be challenging, often requiring system-level libraries (e.g., GEOS, PROJ, HDF5). `pip` installations might fail without these prerequisites.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Run `pip install arm-pyart` to install the library.","cause":"The Py-ART library is not installed in your active Python environment.","error":"ImportError: No module named 'pyart'"},{"fix":"Install the missing package directly (e.g., `pip install cartopy`). If `pip` fails due to binary issues, consider using `conda install -c conda-forge pyart` which often resolves complex dependency chains by providing pre-built binaries.","cause":"A core dependency of Py-ART, `cartopy` (or `netCDF4`, `xarray`, etc.), is missing or failed to install correctly due to underlying system dependencies.","error":"ModuleNotFoundError: No module named 'cartopy'"},{"fix":"Consult the Py-ART v2.0.0 release notes and updated documentation regarding changes to the `Radar` object's attributes and methods. Use helper functions or updated methods if available, or access data through the `xarray` dataset wrapped by the `Radar` object.","cause":"Changes in the internal data model or how data attributes are exposed, particularly after the `xradar` integration in v2.0.0, may mean previously accessible attributes have moved or been renamed.","error":"AttributeError: 'Radar' object has no attribute 'gate_altitude'"},{"fix":"Verify how colormaps are now handled with `cmweather`. You might need to import colormaps from `cmweather.colormaps` or ensure your custom colormaps are compatible with the new plotting interface.","cause":"Py-ART transitioned to using `cmweather` for colormaps in v2.0.0, which may alter how colormaps are passed to plotting functions or require specific `cmweather` colormap objects.","error":"TypeError: plot() got an unexpected keyword argument 'cmap'"}]}