xradar (version 0.11.1) provides tools to load and process weather radar data into the xarray data model, enabling efficient, labeled multi-dimensional array computing. It focuses on reading various radar formats (e.g., ODIM H5, IRIS, GPM) and converting them into structured xarray Datasets or Groups, often leveraging internal dependencies like wradlib and pyodim. The library is actively maintained with several releases per year, evolving its API and adding support for new data formats and processing capabilities.
pip install xradarVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to load a common ODIM H5 radar file using `xradar.io.read_odim_h5`. It then shows how to access the resulting xarray Group, navigate to individual sweeps (which are xarray Datasets), and inspect a data variable like reflectivity (DBZH). A helper comment is included to assist in downloading a suitable example file if you don't have one.
Always consult the latest documentation for `xradar.io` functions. Pin your xradar version for production environments to avoid unexpected API changes in minor releases, or carefully review release notes before upgrading.
Familiarize yourself with the `xarray.Group` API. Use `ds_group.keys()` to see available sweeps and `ds_group['sweep_idx']` to select a specific sweep. The official xradar documentation provides examples of navigating this structure.
Understand the coordinate reference system (CRS) embedded in your radar data (if any). Use `wradlib.georef` or `pyproj` for transformations if mapping to common geographic projections. Refer to `xradar`'s plotting examples or integrate with `wradlib`'s mapping capabilities.
Ensure you have the necessary system-level dependencies for HDF5 and NetCDF. On Linux, this usually involves `sudo apt-get install libhdf5-dev libnetcdf-dev`. On other OS, consult the documentation for `h5py` and `netcdf4`.