Skip to main content

Welcome to RADAR-API

Radars currently accessible through RADAR-API

Deployment PyPI Conda
Activity PyPI Downloads Conda Downloads
Python Versions Python Versions
Supported Systems Linux macOS Windows
Project Status Project Status
Build Status Tests Lint Docs
Linting Black Ruff Codespell
Code Coverage Coveralls Codecov
Code Quality Codefactor Codebeat Codacy Codescene
License License
Community Discourse GitHub Discussions
Citation DOI

Documentation: https://radar-api.readthedocs.io

🚀 Quick start

RADAR-API provides an easy-to-use python interface to find, download and read weather radar data from several meteorological services.

RADAR-API currently provides data access to the following radar networks: NEXRAD, IDEAM and FMI.

The list of available radars can be retrieved using:

import radar_api

radar_api.available_networks()
radar_api.available_radars()
radar_api.available_radars(network="NEXRAD")

Before starting using RADAR-API, we highly suggest to save into a configuration file the directory on your local disk where to save the radar data of interest.

To facilitate the creation of the RADAR-API configuration file, you can adapt and execute the following script:

import radar_api

base_dir = (
    "<path/to/directory/RADAR"  # path to the directory where to download the data
)
radar_api.define_configs(base_dir=base_dir)

# You can check that the config file has been correctly created with:
configs = radar_api.read_configs()
print(configs)

📥 Download radar data

You can start to download radar data editing the following code example:

import radar_api

start_time = "2021-02-01 12:00:00"
end_time = "2021-02-01 13:00:00"

radar = "KABR"
network = "NEXRAD"

filepaths = radar_api.download_files(
    network=network,
    radar=radar,
    start_time=start_time,
    end_time=end_time,
)

💫 Open radar files into xarray or pyart

RADAR-API allows to read directly radar data from the cloud without the need to previously download and save the files on your disk.

RADAR-API make use of pyart and xradar readers to open the files into either an xarray object or pyart radar object.

import radar_api
import pyart

# Search for files on cloud bucket
filepaths = radar_api.find_files(
    network=network,
    radar=radar,
    start_time=start_time,
    end_time=end_time,
    protocol="s3",
)
print(filepaths)
 
# Define the file to open
filepath = filepaths[0]

# Open all sweeps of a radar volume into a xradar datatree
dt = radar_api.open_datatree(filepath, network=network)

# Extract the radar sweep of interest
ds = dt["sweep_0"].to_dataset()

# Open directly a single radar sweep into a xradar dataset
ds = radar_api.open_dataset(filepath, network=network, sweep="sweep_0")

# Open all sweeps of a radar volume into a pyart radar object
radar_obj = radar_api.open_pyart(filepath, network=network)

# Display the data with pyart
display = pyart.graph.RadarDisplay(radar_obj)
display.plot("reflectivity")
display.set_limits((-150, 150), (-150, 150))

📖 Documentation

To discover RADAR-API utilities and functionalities, please read the software documentation available at https://radar-api.readthedocs.io/en/latest/.

All RADAR-API tutorials are available as Jupyter Notebooks in the tutorial directory.


🛠️ Installation

conda

RADAR-API can be installed via conda on Linux, Mac, and Windows. Install the package by typing the following command in the terminal:

conda install radar-api

In case conda-forge is not set up for your system yet, see the easy to follow instructions on conda-forge.

pip

RADAR-API can be installed also via pip on Linux, Mac, and Windows. On Windows you can install WinPython to get Python and pip running. Then, install the RADAR-API package by typing the following command in the terminal:

pip install radar-api

To install the latest development version via pip, see the documentation.

💭 Feedback and Contributing Guidelines

If you aim to contribute your data or discuss the future development of RADAR-API, we suggest to join the Open Radar Science Discourse Group.

Feel free to also open a GitHub Issue or a GitHub Discussion specific to your questions or ideas.

Citation

If you are using RADAR-API in your publication please cite our Zenodo repository:

Ghiggi Gionata. ghiggi/radar_api. Zenodo. https://doi.org/10.5281/zenodo.14743651

If you want to cite a specific software version, have a look at the Zenodo site.

License

The content of this repository is released under the terms of the MIT license.

Metadata

Release files for radar-api 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for radar-api 0.1.0
File Size Uploaded
radar_api-0.1.0.tar.gz 62.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for radar-api 0.1.0
File Interpreter ABI Platform
radar_api-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 187.8 kB

Release files / radar_api-0.1.0.tar.gz

Download URL radar_api-0.1.0.tar.gz
Size 62.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0238a6008653b05af16e6716cd5991f0b91f5bec8b6915c9ef7d9dd45084b203
BLAKE2b-256 checksum
How to use checksums
a52b63e5f111d036b4d184640239247593ad66953c6330b5896e575be8c5d37b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.8

Release files / radar_api-0.1.0-py3-none-any.whl

Download URL radar_api-0.1.0-py3-none-any.whl
Size 125.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c25082b06b136fcb4b42ebec2b40ac86f5d8878e5c52bb5f08480eef30f256bf
BLAKE2b-256 checksum
How to use checksums
201879ba7da90d3f9d6e88804d9856a824a2b6d24db50cf52ba84b668a15646c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.8

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.1

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page