Python software to retrieve weather radar data from cloud buckets
Project description
Welcome to RADAR-API
| Deployment | |
| Activity | |
| Python Versions | |
| Supported Systems | |
| Project Status | |
| Build Status | |
| Linting | |
| Code Coverage | |
| Code Quality | |
| License | |
| Community | |
| Citation |
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:
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file radar_api-0.1.0.tar.gz.
File metadata
- Download URL: radar_api-0.1.0.tar.gz
- Upload date:
- Size: 62.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0238a6008653b05af16e6716cd5991f0b91f5bec8b6915c9ef7d9dd45084b203
|
|
| MD5 |
bc50fc547d8bac5e75fa0da60061aebf
|
|
| BLAKE2b-256 |
a52b63e5f111d036b4d184640239247593ad66953c6330b5896e575be8c5d37b
|
File details
Details for the file radar_api-0.1.0-py3-none-any.whl.
File metadata
- Download URL: radar_api-0.1.0-py3-none-any.whl
- Upload date:
- Size: 125.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c25082b06b136fcb4b42ebec2b40ac86f5d8878e5c52bb5f08480eef30f256bf
|
|
| MD5 |
db993920de072d615703b8a73eb11099
|
|
| BLAKE2b-256 |
201879ba7da90d3f9d6e88804d9856a824a2b6d24db50cf52ba84b668a15646c
|