This repository contains the full processing scripts developed for the Quality Index (Q) applied to weather radar reflectivity data from the XRAD C‑band radar network of the Servei Meteorològic de Catalunya (SMC). The software computes gate‑level quality indicators, transforms them into Cartesian radar products, and generates network‑wide composites suitable for operational meteorology.
The repository structure is as follows:
QI_radar/
├── MAIN.py # Main script orchestrating the pipeline
├── Import_config.py # Loads and parses the configuration file and arguments
├── FindIRISFiles.py # Search and locate IRIS radar data files
├── Polar2Cartesian_PPI.py # Polar to Cartesian conversion of PPI radar data
├── Composite_tools.py # Compositing radar data from multiple radars
├── CAPPI_LUE_tools.py # Tools for generating CAPPI and LUE products
├── AutoPlot.py # Plotting a PNG image file of each product generated
|
├── config_template.txt # Configuration file with processing parameters
├── HIST_TOP12.nc # Climatological echo tops data file
├── README.md # This documentation file
The pipeline requires the following input data:
-
Raw Radar Data Files: IRIS format (.RAW) files containing polar radar reflectivity data from the XRAD C-band radar network. Examples of such files can be found in the following repository: https://github.com/meteocat/QI_radar_data.
-
Auxiliary Data:
- DEM files (GeoTIFF format) for terrain correction, specified in
config.txt. - Climatological echo tops data (NetCDF format) for quality index computation (
HIST_TOP12.nc).
- DEM files (GeoTIFF format) for terrain correction, specified in
-
Configuration File:
config.txt- A text file specifying processing parameters, including:- Initial and final UTC times for processing (note that the final time is not processed).
- Volume scan type (VOLA, VOLB, or VOLBC). Choose according to the desired products.
- Product type to compute: Lowest Usable Elevation (LUE) and/or Constant Altitude Plan Position Indicator (CAPPI).
- Composite types to compute (MAXZ, MAXQI and/or MAXQCOND). Each type has a different radar priorization methodology where more than one radar detects reflectivity.
- CAPPI height in meters.
- Cartesian grid resolution in meters. Note that modifying this parameter will significantly affect processing time.
- Region shapefile path necessary to plot images.
- Paths to Digital Elevation Model (DEM) files for short-range and long-range processing.
- Temporal storage directory name for individual radar PPI fields.
- Path to echo tops 12dBZ climatology file.
-
Command Line Arguments:
- Input directory path containing the raw radar data files.
- Output directory path where processed NetCDF and PNG files will be saved.
To run the processing pipeline, use the following command:
python MAIN.py -i /path/to/raw/radar/data -o /path/to/output/directoryReplace /path/to/raw/radar/data with the actual path to the directory containing the IRIS .RAW files, and /path/to/output/directory with the desired output directory for the processed products.
The pipeline generates the following composite products as NetCDF (.nc) and as PNG image files organized by volume type, product type, composite type, and date:
- CAPPI (Constant Altitude Plan Position Indicator): Cartesian reflectivity fields at a specified height, with MAX-Z (maximum reflectivity) and MAX-QI (maximum quality index) composites.
- LUE (Lowest Usable Elevation): Products from the lowest usable elevation angles, with MAX-Z and MAX-QI composites.
Each output file contains variables:
Z: Reflectivity (dBZ)QI: Quality Index (dimensionless, 0-1)RAD: Radar identifier chosen by the composite criteria (integer)ELEV: Elevation angle used (degrees)